Bug 218692 - Implement the imperative slotting API
Summary: Implement the imperative slotting API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 219261 220768 242376 242379 243460 243634 243635 243649 243654 243655 243772 243815 243817 243860 243867 243869 243923
Blocks: 148695
  Show dependency treegraph
 
Reported: 2020-11-07 20:51 PST by Ryosuke Niwa
Modified: 2022-08-13 19:42 PDT (History)
8 users (show)

See Also:


Attachments
wip (28.25 KB, patch)
2020-11-23 10:34 PST, Tetsuharu Ohzeki [UTC+9]
no flags Details | Formatted Diff | Diff
wip (34.03 KB, patch)
2022-03-02 07:31 PST, Tetsuharu Ohzeki [UTC+9]
no flags Details | Formatted Diff | Diff
Alternative WIP (40.67 KB, patch)
2022-03-02 22:10 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
WIP (27.37 KB, patch)
2022-08-08 02:18 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
WIP (11.31 KB, patch)
2022-08-08 02:42 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Tetsuharu Ohzeki [UTC+9] 2020-11-08 00:32:03 PST
May I take this?

————

When we start to implement this, should we add an experimental flag for this?
Comment 2 Sam Weinig 2020-11-08 10:17:47 PST
(In reply to Tetsuharu Ohzeki [UTC+9] from comment #1)
> May I take this?
> 
> ————
> 
> When we start to implement this, should we add an experimental flag for this?

You may! Please do!

Yeah, adding an experimental flag to Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml would be a great thing to do for this.

Please let us know if you have any questions.
Comment 3 Anne van Kesteren 2020-11-09 03:37:03 PST
(If one of you could also do another pass over those PRs against DOM and HTML, perhaps after the latest round of feedback is addressed, that would be terrific. I'm afraid I'm starting to miss the bigger picture due to the long review cycles.)
Comment 4 Radar WebKit Bug Importer 2020-11-14 20:52:17 PST
<rdar://problem/71407958>
Comment 5 Tetsuharu Ohzeki [UTC+9] 2020-11-23 10:34:39 PST
Created attachment 414807 [details]
wip
Comment 7 Westbrook 2022-02-18 16:46:42 PST
With this fully landed in Chrome and Firefox, any word on prioritization for bringing this to WebKit?
Comment 8 Tetsuharu Ohzeki [UTC+9] 2022-03-02 07:31:14 PST
Created attachment 453608 [details]
wip
Comment 9 Ryosuke Niwa 2022-03-02 22:10:28 PST
Created attachment 453697 [details]
Alternative WIP
Comment 10 Ryosuke Niwa 2022-08-08 02:18:48 PDT
Created attachment 461478 [details]
WIP
Comment 11 Ryosuke Niwa 2022-08-08 02:42:43 PDT
Created attachment 461479 [details]
WIP

The most basic aspect of the feature works with this WIP.
Comment 12 Ryosuke Niwa 2022-08-08 02:57:22 PDT
(In reply to Ryosuke Niwa from comment #10)
> Created attachment 461478 [details]
> WIP

hm... on my second thought, this approach doesn't quite work. I was trying to avoid having a dedicated back reference from a Node to its manually assigned slot but I don't think there is a way around it. When a slot that's outside "this" shadow tree is assigned of a node that had previously been assigned to another slot in "this" shadow tree, we still need to sever the slot assignment but we won't be able to find the slot without having some kind of a back reference from the node to its manually assigned slot.

So we probably need a new member in NodeRareData which is about back reference from a Node to its manually assigned slot. It kind of stinks that we have to use NodeRareData for this.
Comment 13 Ryosuke Niwa 2022-08-12 18:01:39 PDT
This feature is basically complete. We just need to enable it by default everywhere.
Comment 14 Tetsuharu Ohzeki [UTC+9] 2022-08-13 00:31:17 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3290
Comment 15 EWS 2022-08-13 02:13:02 PDT
Committed 253402@main (80742bc96322): <https://commits.webkit.org/253402@main>

Reviewed commits have been landed. Closing PR #3290 and removing active labels.