Bug 85263
Summary: | [Meta][Shadow DOM] Early Summer Refactoring. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Hajime Morrita <morrita> |
Component: | DOM | Assignee: | Hajime Morrita <morrita> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | dglazkov, hayato, shinyak, tasak |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 77608, 79220, 85265, 85970, 86064, 86427, 87216, 87223 | ||
Bug Blocks: | 72352 |
Hajime Morrita
The talk at contributor's meeting force us to realize that
the current shadow DOM implementation needs to be understandable and explainable rather than something black magic.
I talked Dimitri and made up an initial plan. I won't file bugs for each until we actually start working
since the list is more like rough thoughts than real bugs to fix.
----
Relatively Solid takes (will be attacked at first):
- Rename ShadowTree to something more mindful: ElementShadow?
- Simplify API surface on ShadowTree(will be renamed)
- This will take a few takes.
- Renaming objects around HTMLContentElement for picking more spec-like terms:
- HTMLContentSelection -> ShadowDistributedNode // This should be killed eventually.
- HTMLContentSelectionList -> ShadowDistributedNodeList
- HTMLContentSelector -> ShadowNodeDistributor
- Split node distribution out from the attachment/detachment.
- Encapsulate tree stack operations by introducing ShadowTreeStack over DoublyLinkedList.
- Eliminate "right children" names if there are any.
Rather rough ideas:
- Eliminate RefPtr from selection to kill potential cycle.
- Simplify NodeRenderingContext by ensuring that the node attachment to start from the Shadow host.
- We can employ global stack to pass around the "rendering context" of shadow dom then.
- Optimize memory usage.
- Reduce the number of NodeRareaData instances
- Eliminate extra pointers (including turning doubly-linked list to singly-linked).
- Kill HTMLContentSelection
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Hajime Morrita
Looks like all subbugs are closed. closing this - The summer has come.