Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[Refactoring] Shadow related attach paths should be in ShadowTree.
https://bugs.webkit.org/show_bug.cgi?id=79854 Reviewed by Ryosuke Niwa. No new tests. No behavior change. This change introduces ShadowTree::attachHost() and ShadowTree::detachHost() and moves shadow-enabled attachment code from Element to ShadowRoot. This also factored out small ContainerNode method to use it from ShadowTree. Even after this change, the traveral order in ShadowTree attachment has some unclear part. Coming changes will clarify these. This change is aimed to be purely textural. * dom/ContainerNode.cpp: (WebCore::ContainerNode::attach): (WebCore::ContainerNode::detach): * dom/ContainerNode.h: (ContainerNode): (WebCore::ContainerNode::attachAsNode): Added. (WebCore::ContainerNode::attachChildren): Added. (WebCore::ContainerNode::attachChildrenIfNeeded): Added. (WebCore::ContainerNode::attachChildrenLazily): Added. (WebCore::ContainerNode::detachAsNode): Added. (WebCore::ContainerNode::detachChildrenIfNeeded): Added. (WebCore::ContainerNode::detachChildren): Added. * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::detach): * dom/ShadowTree.cpp: (WebCore::ShadowTree::addShadowRoot): (WebCore::ShadowTree::removeAllShadowRoots): (WebCore::ShadowTree::detachHost): (WebCore): (WebCore::ShadowTree::attachHost): (WebCore::ShadowTree::reattachHostChildrenAndShadow): * dom/ShadowTree.h: (ShadowTree): Canonical link: https://commits.webkit.org/96960@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
125 additions
and 47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -62,6 +62,8 @@ class ShadowTree { | ||
void attach(); | ||
void detach(); | ||
void reattach(); | ||
void attachHost(Element*); | ||
void detachHost(Element*); | ||
|
||
bool childNeedsStyleRecalc(); | ||
bool needsStyleRecalc(); | ||