Bug 218692

Summary: Implement the imperative slotting API
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: annevk, chi187, emilio, mike, sam, tetsuharu.ohzeki, webkit-bug-importer, westbrook.johnson
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 219261, 220768, 242376, 242379, 243460, 243634, 243635, 243649, 243654, 243655, 243772, 243815, 243817, 243860, 243867, 243869, 243923    
Bug Blocks: 148695    
Description Flags
Alternative WIP
WIP none

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
Comment 5 Tetsuharu Ohzeki [UTC+9] 2020-11-23 10:34:39 PST
Created attachment 414807 [details]
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]
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]
Comment 11 Ryosuke Niwa 2022-08-08 02:42:43 PDT
Created attachment 461479 [details]

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]

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.