ShadowRootList should have recalculation flag instead of ShadowRoot.
authorshinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 02:37:02 +0000 (02:37 +0000)
committershinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 02:37:02 +0000 (02:37 +0000)
commit4cd0f7f4fd157666bbb21bbbb72d29c3dda48c5a
tree07125636bd42bf3f6fabf1e7b277f4d3f20f3ae9
parent1e1918881357295f4d970e186018697f94a03353
ShadowRootList should have recalculation flag instead of ShadowRoot.
https://bugs.webkit.org/show_bug.cgi?id=79071

Reviewed by Hajime Morita.

When light children or shadow children are changed, we currently re-construct a shadow subtree.
However, when supporting multiple shadow subtrees, all shadow subtrees should be re-constructed.
So ShadowRootList should have re-construction flag instead of ShadowRoot.

Also, re-construction methods in ShadowRoot should be moved to ShadowRootList.

No new tests, should be convered by existing tests.

* dom/Element.cpp:
(WebCore::Element::recalcStyle):
(WebCore::Element::childrenChanged):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::hostChildrenChanged):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::list):
* dom/ShadowRoot.h:
(WebCore):
(ShadowRoot):
* dom/ShadowRootList.cpp:
(WebCore::ShadowRootList::ShadowRootList):
(WebCore::ShadowRootList::reattach):
(WebCore):
(WebCore::ShadowRootList::childNeedsStyleRecalc):
(WebCore::ShadowRootList::needsStyleRecalc):
(WebCore::ShadowRootList::recalcShadowTreeStyle):
(WebCore::ShadowRootList::needsReattachHostChildrenAndShadow):
(WebCore::ShadowRootList::hostChildrenChanged):
(WebCore::ShadowRootList::setNeedsReattachHostChildrenAndShadow):
(WebCore::ShadowRootList::reattachHostChildrenAndShadow):
* dom/ShadowRootList.h:
(WebCore):
(ShadowRootList):
(WebCore::ShadowRootList::clearNeedsReattachHostChildrenAndShadow):
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::attach):
(WebCore::HTMLContentElement::detach):
(WebCore::HTMLContentElement::parseAttribute):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/NodeRenderingContext.cpp
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/dom/ShadowRoot.h
Source/WebCore/dom/ShadowRootList.cpp
Source/WebCore/dom/ShadowRootList.h
Source/WebCore/html/shadow/HTMLContentElement.cpp