https://bugs.webkit.org/show_bug.cgi?id=85265
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 May 2012 06:05:42 +0000 (06:05 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 May 2012 06:05:42 +0000 (06:05 +0000)
[Shadow DOM] ShadowTree needs a better name

Reviewed by Dimitri Glazkov.

.:

* Source/autotools/symbols.filter: Updated exported symbol names according to the rename.

Source/WebCore:

Renamed ShadowTree to ElementShadow, The ElementShadow class is
going to be a facade of Shadow related APIs.

Following renames follow:
- Element::shadowTree() to Element::shadow()
- ShadowRoot::tree() to ShadowRoot::owner()
- ShadowTree::recalcShadowTreeStyle() to ElementShadow::recalcStyle()

No new tests. Just renames.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::shadowFor):
(WebCore::shadowOfParent):
(WebCore::ComposedShadowTreeWalker::traverseChild):
(WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
(WebCore::ComposedShadowTreeWalker::traverseParent):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::willRemove):
(WebCore::Element::attach):
(WebCore::Element::detach):
(WebCore::Element::recalcStyle):
(WebCore::Element::hasShadowRoot):
(WebCore::Element::shadow):
(WebCore::Element::ensureShadow):
(WebCore::Element::ensureShadowRoot):
(WebCore::Element::childrenChanged):
* dom/Element.h:
(WebCore):
(Element):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::~ElementRareData):
* dom/ElementShadow.cpp: Renamed from Source/WebCore/dom/ShadowTree.cpp.
(WebCore):
(WebCore::ElementShadow::ElementShadow):
(WebCore::ElementShadow::~ElementShadow):
(WebCore::validateShadowRoot):
(WebCore::ElementShadow::addShadowRoot):
(WebCore::ElementShadow::removeAllShadowRoots):
(WebCore::ElementShadow::willRemove):
(WebCore::ElementShadow::setParentTreeScope):
(WebCore::ElementShadow::attach):
(WebCore::ElementShadow::attachHost):
(WebCore::ElementShadow::detach):
(WebCore::ElementShadow::detachHost):
(WebCore::ElementShadow::insertionPointFor):
(WebCore::ElementShadow::selectionFor):
(WebCore::ElementShadow::reattach):
(WebCore::ElementShadow::childNeedsStyleRecalc):
(WebCore::ElementShadow::needsStyleRecalc):
(WebCore::ElementShadow::recalcStyle):
(WebCore::ElementShadow::needsReattachHostChildrenAndShadow):
(WebCore::ElementShadow::hostChildrenChanged):
(WebCore::ElementShadow::setNeedsReattachHostChildrenAndShadow):
(WebCore::ElementShadow::reattachHostChildrenAndShadow):
* dom/ElementShadow.h: Renamed from Source/WebCore/dom/ShadowTree.h.
(WebCore):
(ElementShadow):
(WebCore::ElementShadow::hasShadowRoot):
(WebCore::ElementShadow::youngestShadowRoot):
(WebCore::ElementShadow::oldestShadowRoot):
(WebCore::ElementShadow::selector):
(WebCore::ElementShadow::clearNeedsReattachHostChildrenAndShadow):
(WebCore::ElementShadow::host):
(ShadowRootVector):
(WebCore::ShadowRootVector::ShadowRootVector):
* dom/Node.cpp:
(WebCore::oldestShadowRootFor):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRenderingContext::hostChildrenChanged):
* dom/NodeRenderingContext.h:
(WebCore):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::create):
(WebCore::ShadowRoot::owner):
* dom/ShadowRoot.h:
(WebCore):
(ShadowRoot):
* dom/TreeScopeAdopter.cpp:
(WebCore::shadowFor):
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
(WebCore::TreeScopeAdopter::moveTreeToNewDocument):
(WebCore::TreeScopeAdopter::moveShadowToNewDocument):
* dom/TreeScopeAdopter.h:
(TreeScopeAdopter):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtree):
(WebCore::ColorInputType::shadowColorSwatch):
* html/FileInputType.cpp:
(WebCore::FileInputType::createShadowSubtree):
(WebCore::FileInputType::multipleAttributeChanged):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::findMainSummary):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::shadowSelect):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaControls):
(WebCore::HTMLMediaElement::hasMediaControls):
* html/HTMLSummaryElement.cpp:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::innerTextElement):
(WebCore::HTMLTextAreaElement::updatePlaceholderText):
* html/InputType.cpp:
(WebCore::InputType::destroyShadowSubtree):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::createShadowSubtree):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::updatePlaceholderText):
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::deleteBubbleTree):
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::parseAttribute):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::attach):
(WebCore::InsertionPoint::detach):
(WebCore::InsertionPoint::distributeHostChildren):
(WebCore::InsertionPoint::clearDistribution):
* html/shadow/InsertionPoint.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::sliderThumbElementOf):
(WebCore::RenderSliderContainer::layout):
(WebCore::trackLimiterElementOf):
* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::getDecorationRootAndDecoratedRoot):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::unbind):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* page/FocusController.cpp:
(WebCore::FocusScope::focusScopeOf):
(WebCore::FocusScope::focusScopeOwnedByShadowHost):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::uploadButton):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::updateReferencedText):
(WebCore::SVGTRefElement::detachTarget):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::clearResourceReferences):
(WebCore::SVGUseElement::buildShadowAndInstanceTree):
(WebCore::SVGUseElement::buildShadowTree):
* testing/Internals.cpp:
(WebCore::Internals::ensureShadowRoot):
(WebCore::Internals::youngestShadowRoot):
(WebCore::Internals::oldestShadowRoot):
(WebCore::Internals::removeShadowRoot):

Source/WebKit2:

* win/WebKit2.def: Updated exported symbol names according to the rename.
* win/WebKit2CFLite.def: Updated exported symbol names according to the rename.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116277 268f45cc-cd09-0410-ab3c-d52691b4dbfc

50 files changed:
ChangeLog
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/ComposedShadowTreeWalker.cpp
Source/WebCore/dom/ContainerNodeAlgorithms.cpp
Source/WebCore/dom/DOMAllInOne.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementRareData.h
Source/WebCore/dom/ElementShadow.cpp [moved from Source/WebCore/dom/ShadowTree.cpp with 86% similarity]
Source/WebCore/dom/ElementShadow.h [moved from Source/WebCore/dom/ShadowTree.h with 83% similarity]
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/NodeRenderingContext.cpp
Source/WebCore/dom/NodeRenderingContext.h
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/dom/ShadowRoot.h
Source/WebCore/dom/TreeScopeAdopter.cpp
Source/WebCore/dom/TreeScopeAdopter.h
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/FileInputType.cpp
Source/WebCore/html/HTMLDetailsElement.cpp
Source/WebCore/html/HTMLKeygenElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLSummaryElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/ValidationMessage.cpp
Source/WebCore/html/shadow/HTMLContentElement.cpp
Source/WebCore/html/shadow/InsertionPoint.cpp
Source/WebCore/html/shadow/InsertionPoint.h
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/shadow/TextFieldDecorationElement.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/page/FocusController.cpp
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/svg/SVGTRefElement.cpp
Source/WebCore/svg/SVGUseElement.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter

index 1519db6..2aae25f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-06  MORITA Hajime  <morrita@google.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=85265
+        [Shadow DOM] ShadowTree needs a better name
+
+        Reviewed by Dimitri Glazkov.
+
+        * Source/autotools/symbols.filter: Updated exported symbol names according to the rename.
+
 2012-05-06  Dan Bernstein  <mitz@apple.com>
 
         Part of: Building and debugging WebKit in the Xcode IDE requires a lot of setup
index 84f0c27..b8fc7e4 100644 (file)
@@ -574,6 +574,7 @@ SET(WebCore_SOURCES
     dom/DynamicNodeList.cpp
     dom/EditingText.cpp
     dom/Element.cpp
+    dom/ElementShadow.cpp
     dom/ElementAttributeData.cpp
     dom/EntityReference.cpp
     dom/ErrorEvent.cpp
@@ -629,7 +630,6 @@ SET(WebCore_SOURCES
     dom/SecurityContext.cpp
     dom/SelectorQuery.cpp
     dom/ShadowRoot.cpp
-    dom/ShadowTree.cpp
     dom/SpaceSplitString.cpp
     dom/StaticHashSetNodeList.cpp
     dom/StaticNodeList.cpp
index 6aa9727..ba67d17 100644 (file)
@@ -1,3 +1,173 @@
+2012-05-06  MORITA Hajime  <morrita@google.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=85265
+        [Shadow DOM] ShadowTree needs a better name
+
+        Reviewed by Dimitri Glazkov.
+
+        Renamed ShadowTree to ElementShadow, The ElementShadow class is
+        going to be a facade of Shadow related APIs.
+
+        Following renames follow:
+        - Element::shadowTree() to Element::shadow()
+        - ShadowRoot::tree() to ShadowRoot::owner()
+        - ShadowTree::recalcShadowTreeStyle() to ElementShadow::recalcStyle()
+
+        No new tests. Just renames.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.exp.in:
+        * WebCore.gypi:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/ComposedShadowTreeWalker.cpp:
+        (WebCore::shadowFor):
+        (WebCore::shadowOfParent):
+        (WebCore::ComposedShadowTreeWalker::traverseChild):
+        (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
+        (WebCore::ComposedShadowTreeWalker::traverseParent):
+        * dom/ContainerNodeAlgorithms.cpp:
+        (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
+        (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
+        (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
+        (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
+        * dom/DOMAllInOne.cpp:
+        * dom/Document.cpp:
+        (WebCore::Document::buildAccessKeyMap):
+        * dom/Element.cpp:
+        (WebCore::Element::~Element):
+        (WebCore::Element::willRemove):
+        (WebCore::Element::attach):
+        (WebCore::Element::detach):
+        (WebCore::Element::recalcStyle):
+        (WebCore::Element::hasShadowRoot):
+        (WebCore::Element::shadow):
+        (WebCore::Element::ensureShadow):
+        (WebCore::Element::ensureShadowRoot):
+        (WebCore::Element::childrenChanged):
+        * dom/Element.h:
+        (WebCore):
+        (Element):
+        * dom/ElementRareData.h:
+        (ElementRareData):
+        (WebCore::ElementRareData::~ElementRareData):
+        * dom/ElementShadow.cpp: Renamed from Source/WebCore/dom/ShadowTree.cpp.
+        (WebCore):
+        (WebCore::ElementShadow::ElementShadow):
+        (WebCore::ElementShadow::~ElementShadow):
+        (WebCore::validateShadowRoot):
+        (WebCore::ElementShadow::addShadowRoot):
+        (WebCore::ElementShadow::removeAllShadowRoots):
+        (WebCore::ElementShadow::willRemove):
+        (WebCore::ElementShadow::setParentTreeScope):
+        (WebCore::ElementShadow::attach):
+        (WebCore::ElementShadow::attachHost):
+        (WebCore::ElementShadow::detach):
+        (WebCore::ElementShadow::detachHost):
+        (WebCore::ElementShadow::insertionPointFor):
+        (WebCore::ElementShadow::selectionFor):
+        (WebCore::ElementShadow::reattach):
+        (WebCore::ElementShadow::childNeedsStyleRecalc):
+        (WebCore::ElementShadow::needsStyleRecalc):
+        (WebCore::ElementShadow::recalcStyle):
+        (WebCore::ElementShadow::needsReattachHostChildrenAndShadow):
+        (WebCore::ElementShadow::hostChildrenChanged):
+        (WebCore::ElementShadow::setNeedsReattachHostChildrenAndShadow):
+        (WebCore::ElementShadow::reattachHostChildrenAndShadow):
+        * dom/ElementShadow.h: Renamed from Source/WebCore/dom/ShadowTree.h.
+        (WebCore):
+        (ElementShadow):
+        (WebCore::ElementShadow::hasShadowRoot):
+        (WebCore::ElementShadow::youngestShadowRoot):
+        (WebCore::ElementShadow::oldestShadowRoot):
+        (WebCore::ElementShadow::selector):
+        (WebCore::ElementShadow::clearNeedsReattachHostChildrenAndShadow):
+        (WebCore::ElementShadow::host):
+        (ShadowRootVector):
+        (WebCore::ShadowRootVector::ShadowRootVector):
+        * dom/Node.cpp:
+        (WebCore::oldestShadowRootFor):
+        * dom/NodeRenderingContext.cpp:
+        (WebCore::NodeRenderingContext::NodeRenderingContext):
+        (WebCore::NodeRenderingContext::hostChildrenChanged):
+        * dom/NodeRenderingContext.h:
+        (WebCore):
+        * dom/ShadowRoot.cpp:
+        (WebCore::ShadowRoot::create):
+        (WebCore::ShadowRoot::owner):
+        * dom/ShadowRoot.h:
+        (WebCore):
+        (ShadowRoot):
+        * dom/TreeScopeAdopter.cpp:
+        (WebCore::shadowFor):
+        (WebCore::TreeScopeAdopter::moveTreeToNewScope):
+        (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
+        (WebCore::TreeScopeAdopter::moveShadowToNewDocument):
+        * dom/TreeScopeAdopter.h:
+        (TreeScopeAdopter):
+        * html/ColorInputType.cpp:
+        (WebCore::ColorInputType::createShadowSubtree):
+        (WebCore::ColorInputType::shadowColorSwatch):
+        * html/FileInputType.cpp:
+        (WebCore::FileInputType::createShadowSubtree):
+        (WebCore::FileInputType::multipleAttributeChanged):
+        * html/HTMLDetailsElement.cpp:
+        (WebCore::HTMLDetailsElement::findMainSummary):
+        * html/HTMLKeygenElement.cpp:
+        (WebCore::HTMLKeygenElement::shadowSelect):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::mediaControls):
+        (WebCore::HTMLMediaElement::hasMediaControls):
+        * html/HTMLSummaryElement.cpp:
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::innerTextElement):
+        (WebCore::HTMLTextAreaElement::updatePlaceholderText):
+        * html/InputType.cpp:
+        (WebCore::InputType::destroyShadowSubtree):
+        * html/RangeInputType.cpp:
+        (WebCore::RangeInputType::handleMouseDownEvent):
+        (WebCore::RangeInputType::createShadowSubtree):
+        * html/TextFieldInputType.cpp:
+        (WebCore::TextFieldInputType::createShadowSubtree):
+        (WebCore::TextFieldInputType::updatePlaceholderText):
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::deleteBubbleTree):
+        * html/shadow/HTMLContentElement.cpp:
+        (WebCore::HTMLContentElement::parseAttribute):
+        * html/shadow/InsertionPoint.cpp:
+        (WebCore::InsertionPoint::attach):
+        (WebCore::InsertionPoint::detach):
+        (WebCore::InsertionPoint::distributeHostChildren):
+        (WebCore::InsertionPoint::clearDistribution):
+        * html/shadow/InsertionPoint.h:
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::sliderThumbElementOf):
+        (WebCore::RenderSliderContainer::layout):
+        (WebCore::trackLimiterElementOf):
+        * html/shadow/TextFieldDecorationElement.cpp:
+        (WebCore::getDecorationRootAndDecoratedRoot):
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::unbind):
+        (WebCore::InspectorDOMAgent::buildObjectForNode):
+        * page/FocusController.cpp:
+        (WebCore::FocusScope::focusScopeOf):
+        (WebCore::FocusScope::focusScopeOwnedByShadowHost):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::uploadButton):
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefElement::updateReferencedText):
+        (WebCore::SVGTRefElement::detachTarget):
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::clearResourceReferences):
+        (WebCore::SVGUseElement::buildShadowAndInstanceTree):
+        (WebCore::SVGUseElement::buildShadowTree):
+        * testing/Internals.cpp:
+        (WebCore::Internals::ensureShadowRoot):
+        (WebCore::Internals::youngestShadowRoot):
+        (WebCore::Internals::oldestShadowRoot):
+        (WebCore::Internals::removeShadowRoot):
+
 2012-05-06  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r116235.
index 3637b38..916286d 100644 (file)
@@ -1830,6 +1830,8 @@ webcore_sources += \
        Source/WebCore/dom/EditingText.h \
        Source/WebCore/dom/Element.cpp \
        Source/WebCore/dom/Element.h \
+       Source/WebCore/dom/ElementShadow.cpp \
+       Source/WebCore/dom/ElementShadow.h \
        Source/WebCore/dom/ElementAttributeData.cpp \
        Source/WebCore/dom/ElementAttributeData.h \
        Source/WebCore/dom/ElementRareData.h \
@@ -1959,8 +1961,6 @@ webcore_sources += \
        Source/WebCore/dom/SelectorQuery.h \
        Source/WebCore/dom/ShadowRoot.cpp \
        Source/WebCore/dom/ShadowRoot.h \
-       Source/WebCore/dom/ShadowTree.cpp \
-       Source/WebCore/dom/ShadowTree.h \
        Source/WebCore/dom/SpaceSplitString.cpp \
        Source/WebCore/dom/SpaceSplitString.h \
        Source/WebCore/dom/StaticHashSetNodeList.cpp \
index b25f580..c932193 100644 (file)
@@ -550,6 +550,7 @@ SOURCES += \
     dom/DynamicNodeList.cpp \
     dom/EditingText.cpp \
     dom/Element.cpp \
+    dom/ElementShadow.cpp \
     dom/ElementAttributeData.cpp \
     dom/EntityReference.cpp \
     dom/ErrorEvent.cpp \
@@ -608,7 +609,6 @@ SOURCES += \
     dom/SecurityContext.cpp \
     dom/SelectorQuery.cpp \
     dom/ShadowRoot.cpp \
-    dom/ShadowTree.cpp \
     dom/SpaceSplitString.cpp \
     dom/StaticNodeList.cpp \
     dom/StyledElement.cpp \
@@ -1707,6 +1707,7 @@ HEADERS += \
     dom/DynamicNodeList.h \
     dom/EditingText.h \
     dom/Element.h \
+    dom/ElementShadow.h \
     dom/ElementAttributeData.h \
     dom/Entity.h \
     dom/EntityReference.h \
@@ -1756,7 +1757,6 @@ HEADERS += \
     dom/ScriptExecutionContext.h \
     dom/SelectorQuery.h \
     dom/ShadowRoot.h \
-    dom/ShadowTree.h \
     dom/SpaceSplitString.h \
     dom/StaticNodeList.h \
     dom/StyledElement.h \
index 8f6764a..78fbb73 100644 (file)
@@ -147,7 +147,6 @@ __ZN7WebCore10JSDocument6s_infoE
 __ZN7WebCore10MouseEvent6createERKN3WTF12AtomicStringENS1_10PassRefPtrINS_9DOMWindowEEERKNS_18PlatformMouseEventEiNS5_INS_4NodeEEE
 __ZN7WebCore10MouseEventC1ERKN3WTF12AtomicStringEbbNS1_10PassRefPtrINS_9DOMWindowEEEiiiiibbbbtNS5_INS_11EventTargetEEENS5_INS_9ClipboardEEEb
 __ZN7WebCore10RenderView10compositorEv
-__ZN7WebCore10ShadowTree20removeAllShadowRootsEv
 __ZN7WebCore10ScrollView17setUseFixedLayoutEb
 __ZN7WebCore10ScrollView18setFixedLayoutSizeERKNS_7IntSizeE
 __ZN7WebCore10ScrollView21setDelegatesScrollingEb
@@ -303,6 +302,7 @@ __ZN7WebCore13AXObjectCache18rootObjectForFrameEPNS_5FrameE
 __ZN7WebCore13AXObjectCache21gAccessibilityEnabledE
 __ZN7WebCore13AXObjectCache23focusedUIElementForPageEPKNS_4PageE
 __ZN7WebCore13AXObjectCache42gAccessibilityEnhancedUserInterfaceEnabledE
+__ZN7WebCore13ElementShadow20removeAllShadowRootsEv
 __ZN7WebCore13HTTPHeaderMapC1Ev
 __ZN7WebCore13HTTPHeaderMapD1Ev
 __ZN7WebCore13HitTestResultC1ERKS0_
@@ -1482,7 +1482,7 @@ __ZNK7WebCore6Widget25convertToContainingWindowERKNS_7IntRectE
 __ZNK7WebCore6Widget25convertToContainingWindowERKNS_8IntPointE
 __ZNK7WebCore6Widget9frameRectEv
 __ZNK7WebCore7Element10screenRectEv
-__ZNK7WebCore7Element10shadowTreeEv
+__ZNK7WebCore7Element6shadowEv
 __ZNK7WebCore7Element12getAttributeERKNS_13QualifiedNameE
 __ZNK7WebCore7Element13hasShadowRootEv
 __ZNK7WebCore7IntRect10intersectsERKS0_
index ae58a68..66d8134 100644 (file)
             'dom/DocumentTiming.h',
             'dom/DocumentType.h',
             'dom/Element.h',
+            'dom/ElementShadow.h',
             'dom/ElementAttributeData.h',
             'dom/Event.h',
             'dom/EventListener.h',
             'dom/ScriptExecutionContext.h',
             'dom/ScriptRunner.h',
             'dom/ShadowRoot.h',
-            'dom/ShadowTree.h',
             'dom/SpaceSplitString.h',
             'dom/StyledElement.h',
             'dom/Text.h',
             'dom/DynamicNodeList.h',
             'dom/EditingText.cpp',
             'dom/EditingText.h',
+            'dom/ElementShadow.cpp',
             'dom/Element.cpp',
             'dom/ElementAttributeData.cpp',
             'dom/ElementRareData.h',
             'dom/SelectorQuery.h',
             'dom/ShadowRoot.cpp',
             'dom/ShadowRoot.h',
-            'dom/ShadowTree.cpp',
-            'dom/ShadowTree.h',
             'dom/SpaceSplitString.cpp',
             'dom/StaticHashSetNodeList.cpp',
             'dom/StaticHashSetNodeList.h',
index d069329..317514c 100644 (file)
                57B791AA14C6A63300F202D1 /* HTMLContentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 57B791A814C6A63300F202D1 /* HTMLContentElement.h */; };
                57CF497414EE36D700ECFF14 /* InsertionPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */; };
                57CF497514EE36D700ECFF14 /* InsertionPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 57CF497314EE36D700ECFF14 /* InsertionPoint.h */; };
-               57CF4C8614F7597A00ECFF14 /* ShadowTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57CF4C8414F7597A00ECFF14 /* ShadowTree.cpp */; };
-               57CF4C8714F7597A00ECFF14 /* ShadowTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 57CF4C8514F7597A00ECFF14 /* ShadowTree.h */; };
+               57CF4C8614F7597A00ECFF14 /* ElementShadow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57CF4C8414F7597A00ECFF14 /* ElementShadow.cpp */; };
+               57CF4C8714F7597A00ECFF14 /* ElementShadow.h in Headers */ = {isa = PBXBuildFile; fileRef = 57CF4C8514F7597A00ECFF14 /* ElementShadow.h */; };
                5905ADBF1302F3CE00F116DF /* XMLTreeViewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */; };
                5905ADC01302F3CE00F116DF /* XMLTreeViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */; };
                590E1B4911E4EF4B0069F784 /* DeviceOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = 590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                57B791A814C6A63300F202D1 /* HTMLContentElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLContentElement.h; sourceTree = "<group>"; };
                57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InsertionPoint.cpp; sourceTree = "<group>"; };
                57CF497314EE36D700ECFF14 /* InsertionPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InsertionPoint.h; sourceTree = "<group>"; };
-               57CF4C8414F7597A00ECFF14 /* ShadowTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShadowTree.cpp; sourceTree = "<group>"; };
-               57CF4C8514F7597A00ECFF14 /* ShadowTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadowTree.h; sourceTree = "<group>"; };
+               57CF4C8414F7597A00ECFF14 /* ElementShadow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ElementShadow.cpp; sourceTree = "<group>"; };
+               57CF4C8514F7597A00ECFF14 /* ElementShadow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementShadow.h; sourceTree = "<group>"; };
                5905ADBD1302F3CE00F116DF /* XMLTreeViewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLTreeViewer.cpp; sourceTree = "<group>"; };
                5905ADBE1302F3CE00F116DF /* XMLTreeViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLTreeViewer.h; sourceTree = "<group>"; };
                590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientation.h; sourceTree = "<group>"; };
                                A8C4A7F609D563270003AC8D /* Element.cpp */,
                                A8C4A7F509D563270003AC8D /* Element.h */,
                                93EEC1EA09C2877700C515D1 /* Element.idl */,
+                               57CF4C8414F7597A00ECFF14 /* ElementShadow.cpp */,
+                               57CF4C8514F7597A00ECFF14 /* ElementShadow.h */,
                                2CF6878714D32EB500340F39 /* ElementAttributeData.cpp */,
                                2CF6878914D32EFF00340F39 /* ElementAttributeData.h */,
                                637B7ADE0E8767B800E32194 /* ElementRareData.h */,
                                A6D169611346B49B000EB770 /* ShadowRoot.cpp */,
                                A6D169631346B4C1000EB770 /* ShadowRoot.h */,
                                A7DB418114CE1F0A00A2E316 /* ShadowRoot.idl */,
-                               57CF4C8414F7597A00ECFF14 /* ShadowTree.cpp */,
-                               57CF4C8514F7597A00ECFF14 /* ShadowTree.h */,
                                D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */,
                                D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */,
                                CEA3949A11D45CDA003094CF /* StaticHashSetNodeList.cpp */,
                                4BAE95B10B2FA9CE00AED8A0 /* EditorDeleteAction.h in Headers */,
                                93FDAFCA0B11307400E2746F /* EditorInsertAction.h in Headers */,
                                A8C4A80709D563270003AC8D /* Element.h in Headers */,
+                               57CF4C8714F7597A00ECFF14 /* ElementShadow.h in Headers */,
                                2CF6878A14D32EFF00340F39 /* ElementAttributeData.h in Headers */,
                                63F5D4F70E8C4B7100C0BD04 /* ElementRareData.h in Headers */,
                                E415F1840D9A1A830033CE97 /* ElementTimeControl.h in Headers */,
                                0F3DD45012F5EA1B000D9190 /* ShadowBlur.h in Headers */,
                                BC5EB8C40E82031B00B25965 /* ShadowData.h in Headers */,
                                A6D169641346B4C1000EB770 /* ShadowRoot.h in Headers */,
-                               57CF4C8714F7597A00ECFF14 /* ShadowTree.h in Headers */,
                                A80E6CE80A1989CA007FB8C5 /* ShadowValue.h in Headers */,
                                B2AFFC940D00A5DF0030074D /* ShapeArabic.h in Headers */,
                                1A4A954E0B4EDCCB002D8C3C /* SharedBuffer.h in Headers */,
                                93A38B4B0D0E5808006872C2 /* EditorCommand.cpp in Sources */,
                                ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */,
                                A8C4A80809D563270003AC8D /* Element.cpp in Sources */,
+                               57CF4C8614F7597A00ECFF14 /* ElementShadow.cpp in Sources */,
                                2CF6878814D32EB500340F39 /* ElementAttributeData.cpp in Sources */,
                                A8CFF6CB0A1561CD000A4234 /* EllipsisBox.cpp in Sources */,
                                F55B3DBB1251F12D003EF269 /* EmailInputType.cpp in Sources */,
                                0F3DD44F12F5EA1B000D9190 /* ShadowBlur.cpp in Sources */,
                                BC5EB8C30E82031B00B25965 /* ShadowData.cpp in Sources */,
                                A6D169621346B49B000EB770 /* ShadowRoot.cpp in Sources */,
-                               57CF4C8614F7597A00ECFF14 /* ShadowTree.cpp in Sources */,
                                A80E6CF40A1989CA007FB8C5 /* ShadowValue.cpp in Sources */,
                                B2AFFC930D00A5DF0030074D /* ShapeArabic.c in Sources */,
                                1A4A954D0B4EDCCB002D8C3C /* SharedBuffer.cpp in Sources */,
index 9fdcb9f..5a6936c 100644 (file)
 #include "ComposedShadowTreeWalker.h"
 
 #include "Element.h"
+#include "ElementShadow.h"
 #include "HTMLContentSelector.h"
 #include "InsertionPoint.h"
-#include "ShadowTree.h"
+
 
 namespace WebCore {
 
@@ -39,17 +40,17 @@ static inline bool isShadowHost(const Node* node)
     return node && node->isElementNode() && toElement(node)->hasShadowRoot();
 }
 
-static inline ShadowTree* shadowTreeFor(const Node* node)
+static inline ElementShadow* shadowFor(const Node* node)
 {
     if (node && node->isElementNode())
-        return toElement(node)->shadowTree();
+        return toElement(node)->shadow();
     return 0;
 }
 
-static inline ShadowTree* shadowTreeOfParent(const Node* node)
+static inline ElementShadow* shadowOfParent(const Node* node)
 {
     if (node && node->parentNode())
-        return shadowTreeFor(node->parentNode());
+        return shadowFor(node->parentNode());
     return 0;
 }
 
@@ -97,8 +98,8 @@ Node* ComposedShadowTreeWalker::traverseChild(const Node* node, TraversalDirecti
 {
     ASSERT(node);
     if (canCrossUpperBoundary()) {
-        ShadowTree* shadowTree = shadowTreeFor(node);
-        return (shadowTree && shadowTree->hasShadowRoot()) ? traverseLightChildren(shadowTree->youngestShadowRoot(), direction)
+        ElementShadow* shadow = shadowFor(node);
+        return (shadow && shadow->hasShadowRoot()) ? traverseLightChildren(shadow->youngestShadowRoot(), direction)
             : traverseLightChildren(node, direction);
     }
     if (isShadowHost(node))
@@ -143,10 +144,10 @@ void ComposedShadowTreeWalker::previousSibling()
 Node* ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint(const Node* node, TraversalDirection direction)
 {
     ASSERT(node);
-    ShadowTree* shadowTree = shadowTreeOfParent(node);
-    if (!shadowTree)
+    ElementShadow* shadow = shadowOfParent(node);
+    if (!shadow)
         return traverseSiblingInCurrentTree(node, direction);
-    HTMLContentSelection* selection = shadowTree->selectionFor(node);
+    HTMLContentSelection* selection = shadow->selectionFor(node);
     if (!selection)
         return traverseSiblingInCurrentTree(node, direction);
     if (HTMLContentSelection* nextSelection = (direction == TraversalDirectionForward ? selection->next() : selection->previous()))
@@ -207,8 +208,8 @@ Node* ComposedShadowTreeWalker::traverseParent(const Node* node) const
         ASSERT(toShadowRoot(node)->isYoungest());
         return 0;
     }
-    if (ShadowTree* shadowTree = shadowTreeOfParent(node)) {
-        if (HTMLContentSelection* selection = shadowTree->selectionFor(node))
+    if (ElementShadow* shadow = shadowOfParent(node)) {
+        if (HTMLContentSelection* selection = shadow->selectionFor(node))
             return traverseParent(selection->insertionPoint());
     }
     return traverseParentInCurrentTree(node);
index edb84da..8c4ce5e 100644 (file)
@@ -27,7 +27,7 @@
 #include "ContainerNodeAlgorithms.h"
 
 #include "Element.h"
-#include "ShadowTree.h"
+#include "ElementShadow.h"
 
 namespace WebCore {
 
@@ -46,8 +46,8 @@ void ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument(ContainerN
     if (!node->isElementNode())
         return;
 
-    if (ShadowTree* tree = toElement(node)->shadowTree()) {
-        ShadowRootVector roots(tree);
+    if (ElementShadow* shadow = toElement(node)->shadow()) {
+        ShadowRootVector roots(shadow);
         for (size_t i = 0; i < roots.size(); ++i)
             notifyNodeInsertedIntoDocument(roots[i].get());
     }
@@ -63,8 +63,8 @@ void ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree(ContainerNode*
     if (!node->isElementNode())
         return;
 
-    if (ShadowTree* tree = toElement(node)->shadowTree()) {
-        for (ShadowRoot* root = tree->youngestShadowRoot(); root; root = root->olderShadowRoot())
+    if (ElementShadow* shadow = toElement(node)->shadow()) {
+        for (ShadowRoot* root = shadow->youngestShadowRoot(); root; root = root->olderShadowRoot())
             notifyNodeInsertedIntoTree(root);
     }
 }
@@ -87,8 +87,8 @@ void ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument(ContainerNode
     if (node->document()->cssTarget() == node)
         node->document()->setCSSTarget(0);
 
-    if (ShadowTree* tree = toElement(node)->shadowTree()) {
-        ShadowRootVector roots(tree);
+    if (ElementShadow* shadow = toElement(node)->shadow()) {
+        ShadowRootVector roots(shadow);
         for (size_t i = 0; i < roots.size(); ++i)
             notifyNodeRemovedFromDocument(roots[i].get());
     }
@@ -104,8 +104,8 @@ void ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree(ContainerNode* no
     if (!node->isElementNode())
         return;
 
-    if (ShadowTree* tree = toElement(node)->shadowTree()) {
-        ShadowRootVector roots(tree);
+    if (ElementShadow* shadow = toElement(node)->shadow()) {
+        ShadowRootVector roots(shadow);
         for (size_t i = 0; i < roots.size(); ++i)
             notifyNodeRemovedFromTree(roots[i].get());
     }
index 426a8ca..6f65c00 100644 (file)
@@ -69,6 +69,7 @@
 #include "EditingText.cpp"
 #include "Element.cpp"
 #include "ElementAttributeData.cpp"
+#include "ElementShadow.cpp"
 #include "EntityReference.cpp"
 #include "ErrorEvent.cpp"
 #include "Event.cpp"
 #include "SecurityContext.cpp"
 #include "SelectorQuery.cpp"
 #include "ShadowRoot.cpp"
-#include "ShadowTree.cpp"
 #include "SpaceSplitString.cpp"
 #include "StaticHashSetNodeList.cpp"
 #include "StaticNodeList.cpp"
index a50cb99..014c253 100644 (file)
@@ -60,6 +60,7 @@
 #include "EditingText.h"
 #include "Editor.h"
 #include "Element.h"
+#include "ElementShadow.h"
 #include "EntityReference.h"
 #include "Event.h"
 #include "EventFactory.h"
 #include "SegmentedString.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "StaticHashSetNodeList.h"
 #include "StyleResolver.h"
 #include "StyleSheetList.h"
@@ -713,7 +713,7 @@ void Document::buildAccessKeyMap(TreeScope* scope)
             m_elementsByAccessKey.set(accessKey.impl(), element);
 
         if (element->hasShadowRoot()) {
-            for (ShadowRoot* root = element->shadowTree()->youngestShadowRoot(); root; root = root->olderShadowRoot())
+            for (ShadowRoot* root = element->shadow()->youngestShadowRoot(); root; root = root->olderShadowRoot())
                 buildAccessKeyMap(root);
         }
     }
index b4f894b..646ce5e 100644 (file)
@@ -133,8 +133,8 @@ Element::~Element()
     }
 #endif
 
-    if (shadowTree())
-        rareData()->m_shadowTree.clear();
+    if (shadow())
+        rareData()->m_shadow.clear();
     if (m_attributeData)
         m_attributeData->clearAttributes(this);
 }
@@ -908,8 +908,8 @@ void Element::willRemove()
     if (containsFullScreenElement())
         setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
 #endif
-    if (ShadowTree* tree = shadowTree())
-        tree->willRemove();
+    if (ElementShadow* shadow = this->shadow())
+        shadow->willRemove();
     ContainerNode::willRemove();
 }
 
@@ -974,9 +974,9 @@ void Element::attach()
     StyleResolverParentPusher parentPusher(this);
 
     // When a shadow root exists, it does the work of attaching the children.
-    if (ShadowTree* tree = shadowTree()) {
+    if (ElementShadow* shadow = this->shadow()) {
         parentPusher.push();
-        tree->attachHost(this);
+        shadow->attachHost(this);
     } else {
         if (firstChild())
             parentPusher.push();
@@ -1012,8 +1012,8 @@ void Element::detach()
     if (hasRareData())
         rareData()->resetComputedStyle();
 
-    if (ShadowTree* tree = shadowTree())
-        tree->detachHost(this);
+    if (ElementShadow* shadow = this->shadow())
+        shadow->detachHost(this);
     else
         ContainerNode::detach();
 
@@ -1157,10 +1157,10 @@ void Element::recalcStyle(StyleChange change)
 
     // FIXME: This does not care about sibling combinators. Will be necessary in XBL2 world.
     if (hasShadowRoot()) {
-        ShadowTree* tree = shadowTree();
-        if (change >= Inherit || tree->childNeedsStyleRecalc() || tree->needsStyleRecalc()) {
+        ElementShadow* shadow = this->shadow();
+        if (change >= Inherit || shadow->childNeedsStyleRecalc() || shadow->needsStyleRecalc()) {
             parentPusher.push();
-            tree->recalcShadowTreeStyle(change);
+            shadow->recalcStyle(change);
         }
     }
 
@@ -1197,32 +1197,32 @@ void Element::recalcStyle(StyleChange change)
 
 bool Element::hasShadowRoot() const
 {
-    if (ShadowTree* tree = shadowTree())
-        return tree->hasShadowRoot();
+    if (ElementShadow* shadow = this->shadow())
+        return shadow->hasShadowRoot();
     return false;
 }
 
-ShadowTree* Element::shadowTree() const
+ElementShadow* Element::shadow() const
 {
     if (!hasRareData())
         return 0;
 
-    return rareData()->m_shadowTree.get();
+    return rareData()->m_shadow.get();
 }
 
-ShadowTree* Element::ensureShadowTree()
+ElementShadow* Element::ensureShadow()
 {
-    if (ShadowTree* tree = ensureRareData()->m_shadowTree.get())
-        return tree;
+    if (ElementShadow* shadow = ensureRareData()->m_shadow.get())
+        return shadow;
 
-    rareData()->m_shadowTree = adoptPtr(new ShadowTree());
-    return rareData()->m_shadowTree.get();
+    rareData()->m_shadow = adoptPtr(new ElementShadow());
+    return rareData()->m_shadow.get();
 }
 
 ShadowRoot* Element::ensureShadowRoot()
 {
     if (hasShadowRoot())
-        return shadowTree()->oldestShadowRoot();
+        return shadow()->oldestShadowRoot();
 
     return ShadowRoot::create(this, ShadowRoot::CreatingUserAgentShadowRoot).get();
 }
@@ -1359,7 +1359,7 @@ void Element::childrenChanged(bool changedByParser, Node* beforeChange, Node* af
 
     if (hasRareData()) {
         if (hasShadowRoot())
-            shadowTree()->hostChildrenChanged();
+            shadow()->hostChildrenChanged();
     }
 }
 
index db5b8d0..7f3d607 100644 (file)
@@ -42,7 +42,7 @@ class DOMTokenList;
 class ElementRareData;
 class IntSize;
 class ShadowRoot;
-class ShadowTree;
+class ElementShadow;
 class WebKitAnimationList;
 
 enum SpellcheckAttributeState {
@@ -262,8 +262,8 @@ public:
     void recalcStyle(StyleChange = NoChange);
 
     bool hasShadowRoot() const;
-    ShadowTree* shadowTree() const;
-    ShadowTree* ensureShadowTree();
+    ElementShadow* shadow() const;
+    ElementShadow* ensureShadow();
 
     // FIXME: Remove Element::ensureShadowRoot
     // https://bugs.webkit.org/show_bug.cgi?id=77608
index 8bb26a4..8e7bcbc 100644 (file)
 #include "ClassList.h"
 #include "DatasetDOMStringMap.h"
 #include "Element.h"
+#include "ElementShadow.h"
 #include "HTMLCollection.h"
 #include "NamedNodeMap.h"
 #include "NodeRareData.h"
-#include "ShadowTree.h"
 #include <wtf/OwnPtr.h>
 
 namespace WebCore {
@@ -69,7 +69,7 @@ public:
 
     OwnPtr<DatasetDOMStringMap> m_datasetDOMStringMap;
     OwnPtr<ClassList> m_classList;
-    OwnPtr<ShadowTree> m_shadowTree;
+    OwnPtr<ElementShadow> m_shadow;
     OwnPtr<NamedNodeMap> m_attributeMap;
 
     bool m_styleAffectedByEmpty;
@@ -98,7 +98,7 @@ inline ElementRareData::ElementRareData()
 
 inline ElementRareData::~ElementRareData()
 {
-    ASSERT(!m_shadowTree);
+    ASSERT(!m_shadow);
 }
 
 inline void ElementRareData::resetComputedStyle()
similarity index 86%
rename from Source/WebCore/dom/ShadowTree.cpp
rename to Source/WebCore/dom/ElementShadow.cpp
index 2959d1e..7cc22e9 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "config.h"
-#include "ShadowTree.h"
+#include "ElementShadow.h"
 
 #include "ContainerNodeAlgorithms.h"
 #include "Document.h"
 
 namespace WebCore {
 
-ShadowTree::ShadowTree()
+ElementShadow::ElementShadow()
     : m_needsRecalculateContent(false)
 {
 }
 
-ShadowTree::~ShadowTree()
+ElementShadow::~ElementShadow()
 {
     if (hasShadowRoot())
         removeAllShadowRoots();
@@ -68,7 +68,7 @@ static bool validateShadowRoot(Document* document, ShadowRoot* shadowRoot, Excep
     return true;
 }
 
-void ShadowTree::addShadowRoot(Element* shadowHost, PassRefPtr<ShadowRoot> shadowRoot, ExceptionCode& ec)
+void ElementShadow::addShadowRoot(Element* shadowHost, PassRefPtr<ShadowRoot> shadowRoot, ExceptionCode& ec)
 {
     ASSERT(shadowHost);
     ASSERT(shadowRoot);
@@ -89,7 +89,7 @@ void ShadowTree::addShadowRoot(Element* shadowHost, PassRefPtr<ShadowRoot> shado
     InspectorInstrumentation::didPushShadowRoot(shadowHost, shadowRoot.get());
 }
 
-void ShadowTree::removeAllShadowRoots()
+void ElementShadow::removeAllShadowRoots()
 {
     if (!hasShadowRoot())
         return;
@@ -115,20 +115,20 @@ void ShadowTree::removeAllShadowRoots()
         shadowHost->attachChildrenLazily();
 }
 
-void ShadowTree::willRemove()
+void ElementShadow::willRemove()
 {
     ShadowRootVector roots(this);
     for (size_t i = 0; i < roots.size(); ++i)
         roots[i]->willRemove();
 }
 
-void ShadowTree::setParentTreeScope(TreeScope* scope)
+void ElementShadow::setParentTreeScope(TreeScope* scope)
 {
     for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot())
         root->setParentTreeScope(scope);
 }
 
-void ShadowTree::attach()
+void ElementShadow::attach()
 {
     // Children of m_selector is populated lazily in
     // ensureSelector(), and here we just ensure that it is in clean state.
@@ -142,14 +142,14 @@ void ShadowTree::attach()
     selector().didSelect();
 }
 
-void ShadowTree::attachHost(Element* host)
+void ElementShadow::attachHost(Element* host)
 {
     attach();
     host->attachChildrenIfNeeded();
     host->attachAsNode();
 }
 
-void ShadowTree::detach()
+void ElementShadow::detach()
 {
     for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) {
         if (root->attached())
@@ -157,14 +157,14 @@ void ShadowTree::detach()
     }
 }
 
-void ShadowTree::detachHost(Element* host)
+void ElementShadow::detachHost(Element* host)
 {
     host->detachChildrenIfNeeded();
     detach();
     host->detachAsNode();
 }
 
-InsertionPoint* ShadowTree::insertionPointFor(const Node* node) const
+InsertionPoint* ElementShadow::insertionPointFor(const Node* node) const
 {
     ASSERT(node && node->parentNode());
 
@@ -181,18 +181,18 @@ InsertionPoint* ShadowTree::insertionPointFor(const Node* node) const
     return found->insertionPoint();
 }
 
-HTMLContentSelection* ShadowTree::selectionFor(const Node* node) const
+HTMLContentSelection* ElementShadow::selectionFor(const Node* node) const
 {
     return m_selector.findFor(node);
 }
 
-void ShadowTree::reattach()
+void ElementShadow::reattach()
 {
     detach();
     attach();
 }
 
-bool ShadowTree::childNeedsStyleRecalc()
+bool ElementShadow::childNeedsStyleRecalc()
 {
     ASSERT(youngestShadowRoot());
     for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot())
@@ -202,7 +202,7 @@ bool ShadowTree::childNeedsStyleRecalc()
     return false;
 }
 
-bool ShadowTree::needsStyleRecalc()
+bool ElementShadow::needsStyleRecalc()
 {
     ASSERT(youngestShadowRoot());
     for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot())
@@ -212,7 +212,7 @@ bool ShadowTree::needsStyleRecalc()
     return false;
 }
 
-void ShadowTree::recalcShadowTreeStyle(Node::StyleChange change)
+void ElementShadow::recalcStyle(Node::StyleChange change)
 {
     ShadowRoot* youngest = youngestShadowRoot();
     if (!youngest)
@@ -240,12 +240,12 @@ void ShadowTree::recalcShadowTreeStyle(Node::StyleChange change)
     }
 }
 
-bool ShadowTree::needsReattachHostChildrenAndShadow()
+bool ElementShadow::needsReattachHostChildrenAndShadow()
 {
     return m_needsRecalculateContent || (youngestShadowRoot() && youngestShadowRoot()->hasInsertionPoint());
 }
 
-void ShadowTree::hostChildrenChanged()
+void ElementShadow::hostChildrenChanged()
 {
     ASSERT(youngestShadowRoot());
 
@@ -256,14 +256,14 @@ void ShadowTree::hostChildrenChanged()
     setNeedsReattachHostChildrenAndShadow();
 }
 
-void ShadowTree::setNeedsReattachHostChildrenAndShadow()
+void ElementShadow::setNeedsReattachHostChildrenAndShadow()
 {
     m_needsRecalculateContent = true;
 
     host()->setNeedsStyleRecalc();
 }
 
-void ShadowTree::reattachHostChildrenAndShadow()
+void ElementShadow::reattachHostChildrenAndShadow()
 {
     ASSERT(youngestShadowRoot());
 
similarity index 83%
rename from Source/WebCore/dom/ShadowTree.h
rename to Source/WebCore/dom/ElementShadow.h
index 3ba086d..80480b8 100644 (file)
@@ -24,8 +24,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef ShadowTree_h
-#define ShadowTree_h
+#ifndef ElementShadow_h
+#define ElementShadow_h
 
 #include "ExceptionCode.h"
 #include "HTMLContentSelector.h"
@@ -44,10 +44,10 @@ class InsertionPoint;
 class TreeScope;
 class HTMLContentSelection;
 
-class ShadowTree {
+class ElementShadow {
 public:
-    ShadowTree();
-    ~ShadowTree();
+    ElementShadow();
+    ~ElementShadow();
 
     Element* host() const;
 
@@ -70,7 +70,7 @@ public:
 
     bool childNeedsStyleRecalc();
     bool needsStyleRecalc();
-    void recalcShadowTreeStyle(Node::StyleChange);
+    void recalcStyle(Node::StyleChange);
     void setNeedsReattachHostChildrenAndShadow();
     void clearNeedsReattachHostChildrenAndShadow();
     bool needsReattachHostChildrenAndShadow();
@@ -88,40 +88,40 @@ private:
     DoublyLinkedList<ShadowRoot> m_shadowRoots;
     HTMLContentSelector m_selector;
     bool m_needsRecalculateContent : 1;
-    WTF_MAKE_NONCOPYABLE(ShadowTree);
+    WTF_MAKE_NONCOPYABLE(ElementShadow);
 };
 
-inline bool ShadowTree::hasShadowRoot() const
+inline bool ElementShadow::hasShadowRoot() const
 {
     return !m_shadowRoots.isEmpty();
 }
 
-inline ShadowRoot* ShadowTree::youngestShadowRoot() const
+inline ShadowRoot* ElementShadow::youngestShadowRoot() const
 {
     return m_shadowRoots.head();
 }
 
-inline ShadowRoot* ShadowTree::oldestShadowRoot() const
+inline ShadowRoot* ElementShadow::oldestShadowRoot() const
 {
     return m_shadowRoots.tail();
 }
 
-inline HTMLContentSelector& ShadowTree::selector()
+inline HTMLContentSelector& ElementShadow::selector()
 {
     return m_selector;
 }
 
-inline const HTMLContentSelector& ShadowTree::selector() const
+inline const HTMLContentSelector& ElementShadow::selector() const
 {
     return m_selector;
 }
 
-inline void ShadowTree::clearNeedsReattachHostChildrenAndShadow()
+inline void ElementShadow::clearNeedsReattachHostChildrenAndShadow()
 {
     m_needsRecalculateContent = false;
 }
 
-inline Element* ShadowTree::host() const
+inline Element* ElementShadow::host() const
 {
     ASSERT(hasShadowRoot());
     return youngestShadowRoot()->host();
@@ -129,7 +129,7 @@ inline Element* ShadowTree::host() const
 
 class ShadowRootVector : public Vector<RefPtr<ShadowRoot> > {
 public:
-    explicit ShadowRootVector(ShadowTree* tree)
+    explicit ShadowRootVector(ElementShadow* tree)
     {
         for (ShadowRoot* root = tree->youngestShadowRoot(); root; root = root->olderShadowRoot())
             append(root);
index bdbdd5a..c644ba1 100644 (file)
@@ -47,6 +47,7 @@
 #include "DocumentType.h"
 #include "DynamicNodeList.h"
 #include "Element.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "EventContext.h"
 #include "EventDispatchMediator.h"
@@ -85,7 +86,6 @@
 #include "SelectorQuery.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "StaticNodeList.h"
 #include "StorageEvent.h"
 #include "StyleResolver.h"
@@ -835,7 +835,7 @@ bool Node::hasNonEmptyBoundingBox() const
 
 inline static ShadowRoot* oldestShadowRootFor(const Node* node)
 {
-    return node->isElementNode() && toElement(node)->hasShadowRoot() ? toElement(node)->shadowTree()->oldestShadowRoot() : 0;
+    return node->isElementNode() && toElement(node)->hasShadowRoot() ? toElement(node)->shadow()->oldestShadowRoot() : 0;
 }
 
 inline void Node::setStyleChange(StyleChangeType changeType)
index 25f6a2b..271f5ca 100644 (file)
@@ -27,6 +27,7 @@
 #include "NodeRenderingContext.h"
 
 #include "ContainerNode.h"
+#include "ElementShadow.h"
 #include "FlowThreadController.h"
 #include "HTMLContentElement.h"
 #include "HTMLContentSelector.h"
@@ -38,7 +39,6 @@
 #include "RenderObject.h"
 #include "RenderView.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 
 #if ENABLE(SVG)
 #include "SVGNames.h"
@@ -55,7 +55,7 @@ NodeRenderingContext::NodeRenderingContext(Node* node)
     : m_phase(AttachingNotInTree)
     , m_node(node)
     , m_parentNodeForRenderingAndStyle(0)
-    , m_visualParentShadowTree(0)
+    , m_visualParentShadow(0)
     , m_insertionPoint(0)
     , m_style(0)
     , m_parentFlowRenderer(0)
@@ -72,12 +72,12 @@ NodeRenderingContext::NodeRenderingContext(Node* node)
 
     if (parent->isElementNode() || parent->isShadowRoot()) {
         if (parent->isElementNode() && toElement(parent)->hasShadowRoot())
-            m_visualParentShadowTree = toElement(parent)->shadowTree();
+            m_visualParentShadow = toElement(parent)->shadow();
         else if (parent->isShadowRoot())
-            m_visualParentShadowTree = toShadowRoot(parent)->tree();
+            m_visualParentShadow = toShadowRoot(parent)->owner();
 
-        if (m_visualParentShadowTree) {
-            if ((m_insertionPoint = m_visualParentShadowTree->insertionPointFor(m_node))) {
+        if (m_visualParentShadow) {
+            if ((m_insertionPoint = m_visualParentShadow->insertionPointFor(m_node))) {
                 if (toShadowRoot(m_insertionPoint->shadowTreeRootNode())->isUsedForRendering()) {
                     m_phase = AttachingDistributed;
                     m_parentNodeForRenderingAndStyle = NodeRenderingContext(m_insertionPoint).parentNodeForRenderingAndStyle();
@@ -118,7 +118,7 @@ NodeRenderingContext::NodeRenderingContext(Node* node, RenderStyle* style)
     : m_phase(Calculating)
     , m_node(node)
     , m_parentNodeForRenderingAndStyle(0)
-    , m_visualParentShadowTree(0)
+    , m_visualParentShadow(0)
     , m_insertionPoint(0)
     , m_style(style)
     , m_parentFlowRenderer(0)
@@ -293,8 +293,8 @@ RenderObject* NodeRenderingContext::parentRenderer() const
 
 void NodeRenderingContext::hostChildrenChanged()
 {
-    if (m_phase == AttachingNotDistributed && m_visualParentShadowTree)
-        m_visualParentShadowTree->hostChildrenChanged();
+    if (m_phase == AttachingNotDistributed && m_visualParentShadow)
+        m_visualParentShadow->hostChildrenChanged();
 }
 
 bool NodeRenderingContext::shouldCreateRenderer() const
index 1ede708..1d3daf3 100644 (file)
@@ -39,7 +39,7 @@ class Node;
 class RenderNamedFlowThread;
 class RenderObject;
 class RenderStyle;
-class ShadowTree;
+class ElementShadow;
 
 class NodeRenderingContext {
 public:
@@ -83,7 +83,7 @@ private:
     AttachingPhase m_phase;
     Node* m_node;
     ContainerNode* m_parentNodeForRenderingAndStyle;
-    ShadowTree* m_visualParentShadowTree;
+    ElementShadow* m_visualParentShadow;
     InsertionPoint* m_insertionPoint;
     RefPtr<RenderStyle> m_style;
     RenderNamedFlowThread* m_parentFlowRenderer;
index 8c1d8b2..772613f 100644 (file)
 #include "Document.h"
 #include "DocumentFragment.h"
 #include "Element.h"
+#include "ElementShadow.h"
 #include "HTMLContentElement.h"
 #include "HTMLContentSelector.h"
 #include "HTMLNames.h"
 #include "InsertionPoint.h"
 #include "NodeRareData.h"
-#include "ShadowTree.h"
 #include "SVGNames.h"
 #include "StyleResolver.h"
 #include "markup.h"
@@ -118,7 +118,7 @@ PassRefPtr<ShadowRoot> ShadowRoot::create(Element* element, ShadowRootCreationPu
     RefPtr<ShadowRoot> shadowRoot = adoptRef(new ShadowRoot(element->document()));
 
     ec = 0;
-    element->ensureShadowTree()->addShadowRoot(element, shadowRoot, ec);
+    element->ensureShadow()->addShadowRoot(element, shadowRoot, ec);
     if (ec)
         return 0;
     ASSERT(element == shadowRoot->host());
@@ -171,10 +171,10 @@ bool ShadowRoot::childTypeAllowed(NodeType type) const
     }
 }
 
-ShadowTree* ShadowRoot::tree() const
+ElementShadow* ShadowRoot::owner() const
 {
     if (host())
-        return host()->shadowTree();
+        return host()->shadow();
     return 0;
 }
 
index e5b221b..68bc47a 100644 (file)
@@ -41,7 +41,7 @@ class DOMSelection;
 class HTMLContentElement;
 class HTMLContentSelector;
 class InsertionPoint;
-class ShadowTree;
+class ElementShadow;
 
 class ShadowRoot : public DocumentFragment, public TreeScope, public DoublyLinkedListNode<ShadowRoot> {
     friend class WTF::DoublyLinkedListNode<ShadowRoot>;
@@ -71,7 +71,7 @@ public:
     void setApplyAuthorSheets(bool);
 
     Element* host() const { return shadowHost(); }
-    ShadowTree* tree() const;
+    ElementShadow* owner() const;
 
     String innerHTML() const;
     void setInnerHTML(const String&, ExceptionCode&);
index 82ea477..ed37456 100644 (file)
 #include "TreeScopeAdopter.h"
 
 #include "Document.h"
+#include "ElementShadow.h"
 #include "NodeRareData.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 
 namespace WebCore {
 
-static inline ShadowTree* shadowTreeFor(Node* node)
+static inline ElementShadow* shadowFor(Node* node)
 {
-    return node->isElementNode() ? toElement(node)->shadowTree() : 0;
+    return node->isElementNode() ? toElement(node)->shadow() : 0;
 }
 
 void TreeScopeAdopter::moveTreeToNewScope(Node* root) const
@@ -63,10 +63,10 @@ void TreeScopeAdopter::moveTreeToNewScope(Node* root) const
         if (willMoveToNewDocument)
             moveNodeToNewDocument(node, oldDocument, newDocument);
 
-        if (ShadowTree* tree = shadowTreeFor(node)) {
-            tree->setParentTreeScope(m_newScope);
+        if (ElementShadow* shadow = shadowFor(node)) {
+            shadow->setParentTreeScope(m_newScope);
             if (willMoveToNewDocument)
-                moveShadowTreeToNewDocument(tree, oldDocument, newDocument);
+                moveShadowToNewDocument(shadow, oldDocument, newDocument);
         }
     }
 }
@@ -75,14 +75,14 @@ void TreeScopeAdopter::moveTreeToNewDocument(Node* root, Document* oldDocument,
 {
     for (Node* node = root; node; node = node->traverseNextNode(root)) {
         moveNodeToNewDocument(node, oldDocument, newDocument);
-        if (ShadowTree* tree = shadowTreeFor(node))
-            moveShadowTreeToNewDocument(tree, oldDocument, newDocument);
+        if (ElementShadow* shadow = shadowFor(node))
+            moveShadowToNewDocument(shadow, oldDocument, newDocument);
     }
 }
 
-inline void TreeScopeAdopter::moveShadowTreeToNewDocument(ShadowTree* tree, Document* oldDocument, Document* newDocument) const
+inline void TreeScopeAdopter::moveShadowToNewDocument(ElementShadow* shadow, Document* oldDocument, Document* newDocument) const
 {
-    for (ShadowRoot* root = tree->youngestShadowRoot(); root; root = root->olderShadowRoot())
+    for (ShadowRoot* root = shadow->youngestShadowRoot(); root; root = root->olderShadowRoot())
         moveTreeToNewDocument(root, oldDocument, newDocument);
 }
 
index 94255f4..c32a112 100644 (file)
@@ -46,7 +46,7 @@ private:
     void moveTreeToNewScope(Node*) const;
     void moveTreeToNewDocument(Node*, Document* oldDocument, Document* newDocument) const;
     void moveNodeToNewDocument(Node*, Document* oldDocument, Document* newDocument) const;
-    void moveShadowTreeToNewDocument(ShadowTree*, Document* oldDocument, Document* newDocument) const;
+    void moveShadowToNewDocument(ElementShadow*, Document* oldDocument, Document* newDocument) const;
 
     Node* m_toAdopt;
     TreeScope* m_newScope;
index 1d19f89..4eb3922 100644 (file)
 #include "CSSPropertyNames.h"
 #include "Chrome.h"
 #include "Color.h"
+#include "ElementShadow.h"
 #include "HTMLDivElement.h"
 #include "HTMLInputElement.h"
 #include "MouseEvent.h"
 #include "ScriptController.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/WTFString.h>
@@ -117,7 +117,7 @@ void ColorInputType::createShadowSubtree()
     ExceptionCode ec = 0;
     wrapperElement->appendChild(colorSwatch.release(), ec);
     ASSERT(!ec);
-    element()->shadowTree()->oldestShadowRoot()->appendChild(wrapperElement.release(), ec);
+    element()->shadow()->oldestShadowRoot()->appendChild(wrapperElement.release(), ec);
     ASSERT(!ec);
     
     updateColorSwatch();
@@ -191,7 +191,7 @@ void ColorInputType::updateColorSwatch()
 
 HTMLElement* ColorInputType::shadowColorSwatch() const
 {
-    ShadowRoot* shadow = element()->shadowTree()->oldestShadowRoot();
+    ShadowRoot* shadow = element()->shadow()->oldestShadowRoot();
     return shadow ? toHTMLElement(shadow->firstChild()->firstChild()) : 0;
 }
 
index bc68e36..44bd13f 100644 (file)
@@ -23,6 +23,7 @@
 #include "FileInputType.h"
 
 #include "Chrome.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "File.h"
 #include "FileList.h"
@@ -36,7 +37,6 @@
 #include "RenderFileUploadControl.h"
 #include "ScriptController.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
@@ -294,13 +294,13 @@ void FileInputType::createShadowSubtree()
 {
     ASSERT(element()->hasShadowRoot());
     ExceptionCode ec = 0;
-    element()->shadowTree()->oldestShadowRoot()->appendChild(element()->multiple() ? UploadButtonElement::createForMultiple(element()->document()): UploadButtonElement::create(element()->document()), ec);
+    element()->shadow()->oldestShadowRoot()->appendChild(element()->multiple() ? UploadButtonElement::createForMultiple(element()->document()): UploadButtonElement::create(element()->document()), ec);
 }
 
 void FileInputType::multipleAttributeChanged()
 {
     ASSERT(element()->hasShadowRoot());
-    UploadButtonElement* button = static_cast<UploadButtonElement*>(element()->shadowTree()->oldestShadowRoot()->firstChild());
+    UploadButtonElement* button = static_cast<UploadButtonElement*>(element()->shadow()->oldestShadowRoot()->firstChild());
     if (button)
         button->setValue(element()->multiple() ? fileButtonChooseMultipleFilesLabel() : fileButtonChooseFileLabel());
 }
index 332f1a7..e4e4a92 100644 (file)
@@ -23,6 +23,7 @@
 
 #if ENABLE(DETAILS)
 
+#include "ElementShadow.h"
 #include "HTMLContentElement.h"
 #include "HTMLNames.h"
 #include "HTMLSummaryElement.h"
@@ -31,7 +32,6 @@
 #include "NodeRenderingContext.h"
 #include "RenderBlock.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "Text.h"
 
 namespace WebCore {
@@ -124,7 +124,7 @@ Element* HTMLDetailsElement::findMainSummary() const
             return toElement(child);
     }
 
-    return static_cast<DetailsSummaryElement*>(shadowTree()->oldestShadowRoot()->firstChild())->fallbackSummary();
+    return static_cast<DetailsSummaryElement*>(shadow()->oldestShadowRoot()->firstChild())->fallbackSummary();
 }
 
 void HTMLDetailsElement::parseAttribute(Attribute* attr)
index 3094c93..b1099f1 100644 (file)
 
 #include "Attribute.h"
 #include "Document.h"
+#include "ElementShadow.h"
 #include "FormDataList.h"
 #include "HTMLNames.h"
 #include "HTMLSelectElement.h"
 #include "HTMLOptionElement.h"
 #include "SSLKeyGenerator.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "Text.h"
 #include <wtf/StdLibExtras.h>
 
@@ -132,8 +132,8 @@ void HTMLKeygenElement::reset()
 HTMLSelectElement* HTMLKeygenElement::shadowSelect() const
 {
     ASSERT(hasShadowRoot());
-    ShadowRoot* shadow = shadowTree()->oldestShadowRoot();
-    return shadow ? toHTMLSelectElement(shadow->firstChild()) : 0;
+    ShadowRoot* root = this->shadow()->oldestShadowRoot();
+    return root ? toHTMLSelectElement(root->firstChild()) : 0;
 }
 
 } // namespace
index 1c18f66..1e27cd4 100644 (file)
@@ -40,6 +40,7 @@
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "DocumentLoader.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
@@ -75,7 +76,6 @@
 #include "SecurityPolicy.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "TimeRanges.h"
 #include "UUID.h"
 #include <limits>
@@ -4069,7 +4069,7 @@ void HTMLMediaElement::privateBrowsingStateDidChange()
 
 MediaControls* HTMLMediaElement::mediaControls()
 {
-    return toMediaControls(shadowTree()->oldestShadowRoot()->firstChild());
+    return toMediaControls(shadow()->oldestShadowRoot()->firstChild());
 }
 
 bool HTMLMediaElement::hasMediaControls()
@@ -4077,7 +4077,7 @@ bool HTMLMediaElement::hasMediaControls()
     if (!hasShadowRoot())
         return false;
 
-    Node* node = shadowTree()->oldestShadowRoot()->firstChild();
+    Node* node = shadow()->oldestShadowRoot()->firstChild();
     return node && node->isMediaControls();
 }
 
index 5557c45..1331963 100644 (file)
@@ -24,6 +24,7 @@
 #if ENABLE(DETAILS)
 
 #include "DetailsMarkerControl.h"
+#include "ElementShadow.h"
 #include "HTMLContentElement.h"
 #include "HTMLDetailsElement.h"
 #include "HTMLNames.h"
@@ -33,7 +34,6 @@
 #include "PlatformMouseEvent.h"
 #include "RenderBlock.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 
 namespace WebCore {
 
index 347eccf..63663a9 100644 (file)
@@ -30,6 +30,7 @@
 #include "BeforeTextInsertedEvent.h"
 #include "CSSValueKeywords.h"
 #include "Document.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
@@ -38,7 +39,6 @@
 #include "HTMLNames.h"
 #include "RenderTextControlMultiLine.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "Text.h"
 #include "TextControlInnerElements.h"
 #include "TextIterator.h"
@@ -294,7 +294,7 @@ String HTMLTextAreaElement::sanitizeUserInputValue(const String& proposedValue,
 
 HTMLElement* HTMLTextAreaElement::innerTextElement() const
 {
-    Node* node = shadowTree()->oldestShadowRoot()->firstChild();
+    Node* node = shadow()->oldestShadowRoot()->firstChild();
     ASSERT(!node || node->hasTagName(divTag));
     return toHTMLElement(node);
 }
@@ -472,7 +472,7 @@ void HTMLTextAreaElement::updatePlaceholderText()
     String placeholderText = strippedPlaceholder();
     if (placeholderText.isEmpty()) {
         if (m_placeholder) {
-            shadowTree()->oldestShadowRoot()->removeChild(m_placeholder.get(), ec);
+            shadow()->oldestShadowRoot()->removeChild(m_placeholder.get(), ec);
             ASSERT(!ec);
             m_placeholder.clear();
         }
@@ -481,7 +481,7 @@ void HTMLTextAreaElement::updatePlaceholderText()
     if (!m_placeholder) {
         m_placeholder = HTMLDivElement::create(document());
         m_placeholder->setShadowPseudoId("-webkit-input-placeholder");
-        shadowTree()->oldestShadowRoot()->insertBefore(m_placeholder, shadowTree()->oldestShadowRoot()->firstChild()->nextSibling(), ec);
+        shadow()->oldestShadowRoot()->insertBefore(m_placeholder, shadow()->oldestShadowRoot()->firstChild()->nextSibling(), ec);
         ASSERT(!ec);
     }
     m_placeholder->setInnerText(placeholderText, ec);
index 129fc5e..9a3f162 100644 (file)
@@ -35,6 +35,7 @@
 #include "DateInputType.h"
 #include "DateTimeInputType.h"
 #include "DateTimeLocalInputType.h"
+#include "ElementShadow.h"
 #include "EmailInputType.h"
 #include "ExceptionCode.h"
 #include "FileInputType.h"
@@ -59,7 +60,6 @@
 #include "RuntimeEnabledFeatures.h"
 #include "SearchInputType.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "SubmitInputType.h"
 #include "TelephoneInputType.h"
 #include "TextInputType.h"
@@ -394,7 +394,7 @@ void InputType::destroyShadowSubtree()
     if (!element()->hasShadowRoot())
         return;
 
-    ShadowRoot* root = element()->shadowTree()->oldestShadowRoot();
+    ShadowRoot* root = element()->shadow()->oldestShadowRoot();
     ASSERT(root);
     root->removeAllChildren();
 
index 90769d9..4949b0a 100644 (file)
@@ -33,6 +33,7 @@
 #include "RangeInputType.h"
 
 #include "AXObjectCache.h"
+#include "ElementShadow.h"
 #include "HTMLDivElement.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
@@ -42,7 +43,6 @@
 #include "PlatformMouseEvent.h"
 #include "RenderSlider.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "SliderThumbElement.h"
 #include "StepRange.h"
 #include <limits>
@@ -161,7 +161,7 @@ void RangeInputType::handleMouseDownEvent(MouseEvent* event)
     if (event->button() != LeftButton || !targetNode)
         return;
     ASSERT(element()->hasShadowRoot());
-    if (targetNode != element() && !targetNode->isDescendantOf(element()->shadowTree()->oldestShadowRoot()))
+    if (targetNode != element() && !targetNode->isDescendantOf(element()->shadow()->oldestShadowRoot()))
         return;
     SliderThumbElement* thumb = sliderThumbElementOf(element());
     if (targetNode == thumb)
@@ -247,7 +247,7 @@ void RangeInputType::createShadowSubtree()
     RefPtr<HTMLElement> container = SliderContainerElement::create(document);
     container->appendChild(track.release(), ec);
     container->appendChild(TrackLimiterElement::create(document), ec);
-    element()->shadowTree()->oldestShadowRoot()->appendChild(container.release(), ec);
+    element()->shadow()->oldestShadowRoot()->appendChild(container.release(), ec);
 }
 
 RenderObject* RangeInputType::createRenderer(RenderArena* arena, RenderStyle*) const
index f3e3766..d63f7ef 100644 (file)
@@ -35,6 +35,7 @@
 #include "BeforeTextInsertedEvent.h"
 #include "Chrome.h"
 #include "ChromeClient.h"
+#include "ElementShadow.h"
 #include "FormDataList.h"
 #include "Frame.h"
 #include "HTMLInputElement.h"
@@ -45,7 +46,6 @@
 #include "RenderTextControlSingleLine.h"
 #include "RenderTheme.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "TextControlInnerElements.h"
 #include "TextEvent.h"
 #include "TextIterator.h"
@@ -236,11 +236,11 @@ void TextFieldInputType::createShadowSubtree()
     ExceptionCode ec = 0;
     m_innerText = TextControlInnerTextElement::create(document);
     if (!createsContainer) {
-        element()->shadowTree()->oldestShadowRoot()->appendChild(m_innerText, ec);
+        element()->shadow()->oldestShadowRoot()->appendChild(m_innerText, ec);
         return;
     }
 
-    ShadowRoot* shadowRoot = element()->shadowTree()->oldestShadowRoot();
+    ShadowRoot* shadowRoot = element()->shadow()->oldestShadowRoot();
     m_container = HTMLDivElement::create(document);
     m_container->setShadowPseudoId("-webkit-textfield-decoration-container");
     shadowRoot->appendChild(m_container, ec);
@@ -405,7 +405,7 @@ void TextFieldInputType::updatePlaceholderText()
     if (!m_placeholder) {
         m_placeholder = HTMLDivElement::create(element()->document());
         m_placeholder->setShadowPseudoId("-webkit-input-placeholder");
-        element()->shadowTree()->oldestShadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling(), ec);
+        element()->shadow()->oldestShadowRoot()->insertBefore(m_placeholder, m_container ? m_container->nextSibling() : innerTextElement()->nextSibling(), ec);
         ASSERT(!ec);
     }
     m_placeholder->setInnerText(placeholderText, ec);
index bfda986..a144bab 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
+#include "ElementShadow.h"
 #include "ExceptionCodePlaceholder.h"
 #include "FormAssociatedElement.h"
 #include "HTMLBRElement.h"
@@ -43,7 +44,6 @@
 #include "RenderObject.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "StyleResolver.h"
 #include "Text.h"
 #include <wtf/PassOwnPtr.h>
@@ -187,7 +187,7 @@ void ValidationMessage::deleteBubbleTree(Timer<ValidationMessage>*)
         m_messageBody = 0;
         HTMLElement* host = toHTMLElement(m_element);
         ExceptionCode ec;
-        host->shadowTree()->oldestShadowRoot()->removeChild(m_bubble.get(), ec);
+        host->shadow()->oldestShadowRoot()->removeChild(m_bubble.get(), ec);
         m_bubble = 0;
     }
     m_message = String();
index 2443d15..5436795 100644 (file)
 #include "HTMLContentElement.h"
 
 #include "ContentSelectorQuery.h"
+#include "ElementShadow.h"
 #include "HTMLContentSelector.h"
 #include "HTMLNames.h"
 #include "QualifiedName.h"
 #include "RuntimeEnabledFeatures.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
@@ -90,7 +90,7 @@ void HTMLContentElement::parseAttribute(Attribute* attr)
 {
     if (attr->name() == selectAttr) {
         if (ShadowRoot* root = toShadowRoot(shadowTreeRootNode()))
-            root->tree()->setNeedsReattachHostChildrenAndShadow();
+            root->owner()->setNeedsReattachHostChildrenAndShadow();
     } else
         InsertionPoint::parseAttribute(attr);
 }
index 70af85e..37e5101 100644 (file)
@@ -31,8 +31,8 @@
 #include "config.h"
 #include "InsertionPoint.h"
 
+#include "ElementShadow.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 
 namespace WebCore {
 
@@ -51,7 +51,7 @@ void InsertionPoint::attach()
     if (isShadowBoundary()) {
         ShadowRoot* root = toShadowRoot(treeScope()->rootNode());
         if (doesSelectFromHostChildren()) {
-            distributeHostChildren(root->tree());
+            distributeHostChildren(root->owner());
             attachDistributedNode();
         } else if (!root->olderShadowRoot()->assignedTo()) {
             ASSERT(!root->olderShadowRoot()->attached());
@@ -67,16 +67,16 @@ void InsertionPoint::detach()
 {
     ShadowRoot* root = toShadowRoot(shadowTreeRootNode());
     if (root && isActive()) {
-        ShadowTree* tree = root->tree();
+        ElementShadow* shadow = root->owner();
 
         if (doesSelectFromHostChildren())
-            clearDistribution(tree);
+            clearDistribution(shadow);
         else if (ShadowRoot* assignedShadowRoot = assignedFrom())
             clearAssignment(assignedShadowRoot);
 
         // When shadow element is detached, shadow tree should be recreated to re-calculate selector for
         // other insertion points.
-        tree->setNeedsReattachHostChildrenAndShadow();
+        shadow->setNeedsReattachHostChildrenAndShadow();
     }
 
     ASSERT(m_selections.isEmpty());
@@ -117,23 +117,23 @@ bool InsertionPoint::rendererIsNeeded(const NodeRenderingContext& context)
     return !isShadowBoundary() && HTMLElement::rendererIsNeeded(context);
 }
 
-inline void InsertionPoint::distributeHostChildren(ShadowTree* tree)
+inline void InsertionPoint::distributeHostChildren(ElementShadow* shadow)
 {
-    if (!tree->selector().isSelecting()) {
+    if (!shadow->selector().isSelecting()) {
         // If HTMLContentSelector is not int selecting phase, it means InsertionPoint is attached from
-        // non-ShadowTree node. To run distribute algorithm, we have to reattach ShadowTree.
-        tree->setNeedsReattachHostChildrenAndShadow();
+        // non-ElementShadow node. To run distribute algorithm, we have to reattach ElementShadow.
+        shadow->setNeedsReattachHostChildrenAndShadow();
         return;
     }
 
-    tree->selector().populateIfNecessary(tree->host());
-    tree->selector().unselect(&m_selections);
-    tree->selector().select(this, &m_selections);
+    shadow->selector().populateIfNecessary(shadow->host());
+    shadow->selector().unselect(&m_selections);
+    shadow->selector().select(this, &m_selections);
 }
 
-inline void InsertionPoint::clearDistribution(ShadowTree* tree)
+inline void InsertionPoint::clearDistribution(ElementShadow* shadow)
 {
-    tree->selector().unselect(&m_selections);
+    shadow->selector().unselect(&m_selections);
 }
 
 inline void InsertionPoint::attachDistributedNode()
index 1da8c80..840dd06 100644 (file)
@@ -62,8 +62,8 @@ protected:
     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
 
 private:
-    void distributeHostChildren(ShadowTree*);
-    void clearDistribution(ShadowTree*);
+    void distributeHostChildren(ElementShadow*);
+    void clearDistribution(ElementShadow*);
     void attachDistributedNode();
 
     void assignShadowRoot(ShadowRoot*);
index f8af39f..fee991d 100644 (file)
@@ -34,6 +34,7 @@
 #include "SliderThumbElement.h"
 
 #include "CSSValueKeywords.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "Frame.h"
 #include "HTMLInputElement.h"
@@ -43,7 +44,6 @@
 #include "RenderSlider.h"
 #include "RenderTheme.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "StepRange.h"
 #include <wtf/MathExtras.h>
 
@@ -67,7 +67,7 @@ inline static bool hasVerticalAppearance(HTMLInputElement* input)
 SliderThumbElement* sliderThumbElementOf(Node* node)
 {
     ASSERT(node);
-    ShadowRoot* shadow = node->toInputElement()->shadowTree()->oldestShadowRoot();
+    ShadowRoot* shadow = node->toInputElement()->shadow()->oldestShadowRoot();
     ASSERT(shadow);
     Node* thumb = shadow->firstChild()->firstChild()->firstChild();
     ASSERT(thumb);
@@ -144,7 +144,7 @@ void RenderSliderContainer::layout()
     Length inputHeight = input->renderer()->style()->height();
     RenderObject* trackRenderer = node()->firstChild()->renderer();
     if (!isVertical && input->renderer()->isSlider() && !inputHeight.isFixed() && !inputHeight.isPercent()) {
-        RenderObject* thumbRenderer = input->shadowTree()->oldestShadowRoot()->firstChild()->firstChild()->firstChild()->renderer();
+        RenderObject* thumbRenderer = input->shadow()->oldestShadowRoot()->firstChild()->firstChild()->firstChild()->renderer();
         if (thumbRenderer) {
             style()->setHeight(thumbRenderer->style()->height());
             if (trackRenderer)
@@ -359,7 +359,7 @@ TrackLimiterElement* trackLimiterElementOf(Node* node)
 {
     ASSERT(node);
     ASSERT(node->toInputElement()->hasShadowRoot());
-    ShadowRoot* shadow = node->toInputElement()->shadowTree()->oldestShadowRoot();
+    ShadowRoot* shadow = node->toInputElement()->shadow()->oldestShadowRoot();
     ASSERT(shadow);
     Node* limiter = shadow->firstChild()->lastChild();
     ASSERT(limiter);
index 0b00c95..580ebad 100644 (file)
 
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "HTMLInputElement.h"
 #include "HTMLShadowElement.h"
 #include "NodeRenderStyle.h"
 #include "RenderImage.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 
 namespace WebCore {
 
@@ -68,7 +68,7 @@ PassRefPtr<TextFieldDecorationElement> TextFieldDecorationElement::create(Docume
 
 static inline void getDecorationRootAndDecoratedRoot(HTMLInputElement* input, ShadowRoot*& decorationRoot, ShadowRoot*& decoratedRoot)
 {
-    ShadowRoot* existingRoot = input->shadowTree()->youngestShadowRoot();
+    ShadowRoot* existingRoot = input->shadow()->youngestShadowRoot();
     ShadowRoot* newRoot = 0;
     while (existingRoot->childNodeCount() == 1 && existingRoot->firstChild()->hasTagName(shadowTag)) {
         newRoot = existingRoot;
index 48abd12..6103077 100644 (file)
@@ -53,6 +53,7 @@
 #include "Document.h"
 #include "DocumentFragment.h"
 #include "DocumentType.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "EventContext.h"
 #include "EventListener.h"
@@ -82,7 +83,6 @@
 #include "ScriptEventListener.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "StylePropertySet.h"
 #include "StyleResolver.h"
 #include "StyleSheetList.h"
@@ -341,7 +341,7 @@ void InspectorDOMAgent::unbind(Node* node, NodeToIdMap* nodesMap)
     }
 
     if (node->isElementNode() && toElement(node)->hasShadowRoot()) {
-        for (ShadowRoot* root = toElement(node)->shadowTree()->youngestShadowRoot(); root; root = root->olderShadowRoot())
+        for (ShadowRoot* root = toElement(node)->shadow()->youngestShadowRoot(); root; root = root->olderShadowRoot())
             unbind(root, nodesMap);
     }
 
@@ -1228,7 +1228,7 @@ PassRefPtr<TypeBuilder::DOM::Node> InspectorDOMAgent::buildObjectForNode(Node* n
         }
         if (element->hasShadowRoot()) {
             RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > shadowRoots = TypeBuilder::Array<TypeBuilder::DOM::Node>::create();
-            for (ShadowRoot* root = element->shadowTree()->youngestShadowRoot(); root; root = root->olderShadowRoot())
+            for (ShadowRoot* root = element->shadow()->youngestShadowRoot(); root; root = root->olderShadowRoot())
                 shadowRoots->addItem(buildObjectForNode(root, 0, nodesMap));
             value->setShadowRoots(shadowRoots);
         }
index 511bc33..9292ab1 100644 (file)
@@ -34,6 +34,7 @@
 #include "Editor.h"
 #include "EditorClient.h"
 #include "Element.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "EventHandler.h"
 #include "EventNames.h"
@@ -54,7 +55,6 @@
 #include "ScrollAnimator.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "SpatialNavigation.h"
 #include "Widget.h"
 #include "htmlediting.h" // For firstPositionInOrBeforeNode
@@ -126,14 +126,14 @@ FocusScope FocusScope::focusScopeOf(Node* node)
     ASSERT(node);
     TreeScope* scope = node->treeScope();
     if (scope->rootNode()->isShadowRoot())
-        return FocusScope(toShadowRoot(scope->rootNode())->tree()->youngestShadowRoot());
+        return FocusScope(toShadowRoot(scope->rootNode())->owner()->youngestShadowRoot());
     return FocusScope(scope);
 }
 
 FocusScope FocusScope::focusScopeOwnedByShadowHost(Node* node)
 {
     ASSERT(isShadowHost(node));
-    return FocusScope(toElement(node)->shadowTree()->youngestShadowRoot());
+    return FocusScope(toElement(node)->shadow()->youngestShadowRoot());
 }
 
 FocusScope FocusScope::focusScopeOwnedByIFrame(HTMLFrameOwnerElement* frame)
index b8cb628..fd62630 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #include "RenderFileUploadControl.h"
 
+#include "ElementShadow.h"
 #include "FileList.h"
 #include "GraphicsContext.h"
 #include "HTMLInputElement.h"
@@ -32,7 +33,6 @@
 #include "RenderText.h"
 #include "RenderTheme.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "TextRun.h"
 #include "VisiblePosition.h"
 #include <math.h>
@@ -225,7 +225,7 @@ HTMLInputElement* RenderFileUploadControl::uploadButton() const
 
     ASSERT(input->hasShadowRoot());
 
-    Node* buttonNode = input->shadowTree()->oldestShadowRoot()->firstChild();
+    Node* buttonNode = input->shadow()->oldestShadowRoot()->firstChild();
     return buttonNode && buttonNode->isHTMLElement() && buttonNode->hasTagName(inputTag) ? static_cast<HTMLInputElement*>(buttonNode) : 0;
 }
 
index 14024ce..d774e5d 100644 (file)
@@ -24,6 +24,7 @@
 #if ENABLE(SVG)
 #include "SVGTRefElement.h"
 
+#include "ElementShadow.h"
 #include "EventListener.h"
 #include "EventNames.h"
 #include "MutationEvent.h"
@@ -32,7 +33,6 @@
 #include "RenderSVGInlineText.h"
 #include "RenderSVGResource.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "SVGDocument.h"
 #include "SVGElementInstance.h"
 #include "SVGNames.h"
@@ -165,7 +165,7 @@ void SVGTRefElement::updateReferencedText()
         textContent = target->textContent();
 
     ASSERT(hasShadowRoot());
-    ShadowRoot* root = shadowTree()->oldestShadowRoot();
+    ShadowRoot* root = shadow()->oldestShadowRoot();
     if (!root->firstChild())
         root->appendChild(SVGShadowText::create(document(), textContent), ASSERT_NO_EXCEPTION);
     else
@@ -181,7 +181,7 @@ void SVGTRefElement::detachTarget()
     ExceptionCode ignore = 0;
 
     ASSERT(hasShadowRoot());
-    Node* container = shadowTree()->oldestShadowRoot()->firstChild();
+    Node* container = shadow()->oldestShadowRoot()->firstChild();
     if (container)
         container->setTextContent(emptyContent, ignore);
 
index 6ecd00f..0b82fad 100755 (executable)
@@ -30,6 +30,7 @@
 #include "Attribute.h"
 #include "CachedResourceLoader.h"
 #include "Document.h"
+#include "ElementShadow.h"
 #include "Event.h"
 #include "EventListener.h"
 #include "HTMLNames.h"
@@ -38,7 +39,6 @@
 #include "RenderSVGResource.h"
 #include "RenderSVGTransformableContainer.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "SVGElementInstance.h"
 #include "SVGElementRareData.h"
 #include "SVGElementInstanceList.h"
@@ -393,7 +393,7 @@ static bool subtreeContainsDisallowedElement(Node* start)
 void SVGUseElement::clearResourceReferences()
 {
     // FIXME: We should try to optimize this, to at least allow partial reclones.
-    if (ShadowRoot* shadowTreeRootElement =  shadowTree()->oldestShadowRoot())
+    if (ShadowRoot* shadowTreeRootElement =  shadow()->oldestShadowRoot())
         shadowTreeRootElement->removeAllChildren();
 
     if (m_targetElementInstance) {
@@ -480,7 +480,7 @@ void SVGUseElement::buildShadowAndInstanceTree(SVGElement* target)
     ASSERT(m_targetElementInstance->directUseElement() == this);
     ASSERT(m_targetElementInstance->correspondingElement() == target);
 
-    ShadowRoot* shadowTreeRootElement = shadowTree()->oldestShadowRoot();
+    ShadowRoot* shadowTreeRootElement = shadow()->oldestShadowRoot();
     ASSERT(shadowTreeRootElement);
 
     // Build shadow tree from instance tree
@@ -695,7 +695,7 @@ void SVGUseElement::buildShadowTree(SVGElement* target, SVGElementInstance* targ
     if (subtreeContainsDisallowedElement(newChild.get()))
         removeDisallowedElementsFromSubtree(newChild.get());
 
-    shadowTree()->oldestShadowRoot()->appendChild(newChild.release());
+    shadow()->oldestShadowRoot()->appendChild(newChild.release());
 }
 
 void SVGUseElement::expandUseElementsInShadowTree(Node* element)
index 3c2a9d5..67839f6 100644 (file)
@@ -35,6 +35,7 @@
 #include "DocumentMarker.h"
 #include "DocumentMarkerController.h"
 #include "Element.h"
+#include "ElementShadow.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
 #include "FrameView.h"
@@ -57,7 +58,6 @@
 #include "RenderTreeAsText.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
-#include "ShadowTree.h"
 #include "SpellChecker.h"
 #include "TextIterator.h"
 #include "TreeScope.h"
@@ -303,7 +303,7 @@ Internals::ShadowRootIfShadowDOMEnabledOrNode* Internals::ensureShadowRoot(Eleme
     }
 
     if (host->hasShadowRoot())
-        return host->shadowTree()->youngestShadowRoot();
+        return host->shadow()->youngestShadowRoot();
 
     return ShadowRoot::create(host, ec).get();
 }
@@ -325,7 +325,7 @@ Internals::ShadowRootIfShadowDOMEnabledOrNode* Internals::youngestShadowRoot(Ele
     if (!host->hasShadowRoot())
         return 0;
 
-    return host->shadowTree()->youngestShadowRoot();
+    return host->shadow()->youngestShadowRoot();
 }
 
 Internals::ShadowRootIfShadowDOMEnabledOrNode* Internals::oldestShadowRoot(Element* host, ExceptionCode& ec)
@@ -338,7 +338,7 @@ Internals::ShadowRootIfShadowDOMEnabledOrNode* Internals::oldestShadowRoot(Eleme
     if (!host->hasShadowRoot())
         return 0;
 
-    return host->shadowTree()->oldestShadowRoot();
+    return host->shadow()->oldestShadowRoot();
 }
 
 Internals::ShadowRootIfShadowDOMEnabledOrNode* Internals::youngerShadowRoot(Node* shadow, ExceptionCode& ec)
@@ -369,7 +369,7 @@ void Internals::removeShadowRoot(Element* host, ExceptionCode& ec)
     }
 
     if (host->hasShadowRoot())
-        host->shadowTree()->removeAllShadowRoots();
+        host->shadow()->removeAllShadowRoots();
 }
 
 Element* Internals::includerFor(Node* node, ExceptionCode& ec)
index 1059b6b..03d1095 100644 (file)
@@ -1,3 +1,13 @@
+2012-05-06  MORITA Hajime  <morrita@google.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=85265
+        [Shadow DOM] ShadowTree needs a better name
+
+        Reviewed by Dimitri Glazkov.
+
+        * win/WebKit2.def: Updated exported symbol names according to the rename.
+        * win/WebKit2CFLite.def: Updated exported symbol names according to the rename.
+
 2012-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Convert isPageBoxVisible to use Internals interface.
index c4a1039..0342c1f 100644 (file)
@@ -201,7 +201,7 @@ EXPORTS
         ?paintControlTints@FrameView@WebCore@@AAEXXZ
         ?placeholderShouldBeVisible@HTMLTextFormControlElement@WebCore@@QBE_NXZ
         ?rangeFromLocationAndLength@TextIterator@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@PAVElement@2@HH_N@Z
-        ?removeAllShadowRoots@ShadowTree@WebCore@@QAEXXZ
+        ?removeAllShadowRoots@ElementShadow@WebCore@@QAEXXZ
         ?remove@String@WTF@@QAEXIH@Z
         ?reverseFind@StringImpl@WTF@@QAEI_WI@Z
         ?s_frontendCounter@InspectorInstrumentation@WebCore@@0HA
@@ -229,7 +229,7 @@ EXPORTS
         ?settings@Document@WebCore@@QBEPAVSettings@2@XZ
         ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ
         ?setFixedElementsLayoutRelativeToFrame@Settings@WebCore@@QAEX_N@Z
-        ?shadowTree@Element@WebCore@@QBEPAVShadowTree@2@XZ
+        ?shadow@Element@WebCore@@QBEPAVElementShadow@2@XZ
         ?substring@String@WTF@@QBE?AV12@II@Z
         ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
         ?text@Range@WebCore@@QBE?AVString@WTF@@XZ
index 44bb87b..b6e0f36 100644 (file)
@@ -194,7 +194,7 @@ EXPORTS
         ?paintControlTints@FrameView@WebCore@@AAEXXZ
         ?placeholderShouldBeVisible@HTMLTextFormControlElement@WebCore@@QBE_NXZ
         ?rangeFromLocationAndLength@TextIterator@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@PAVElement@2@HH_N@Z
-        ?removeAllShadowRoots@ShadowTree@WebCore@@QAEXXZ
+        ?removeAllShadowRoots@ElementShadow@WebCore@@QAEXXZ
         ?remove@String@WTF@@QAEXIH@Z
         ?reverseFind@StringImpl@WTF@@QAEI_WI@Z
         ?s_frontendCounter@InspectorInstrumentation@WebCore@@0HA
@@ -222,7 +222,7 @@ EXPORTS
         ?settings@Document@WebCore@@QBEPAVSettings@2@XZ
         ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ
         ?setFixedElementsLayoutRelativeToFrame@Settings@WebCore@@QAEX_N@Z
-        ?shadowTree@Element@WebCore@@QBEPAVShadowTree@2@XZ
+        ?shadow@Element@WebCore@@QBEPAVElementShadow@2@XZ
         ?substring@String@WTF@@QBE?AV12@II@Z
         ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
         ?text@Range@WebCore@@QBE?AVString@WTF@@XZ
index 4d750cf..c033853 100644 (file)
@@ -43,7 +43,7 @@ _ZN7WebCore10toDocumentEN3JSC7JSValueE;
 _ZN7WebCore10ClientRectC1Ev;
 _ZN7WebCore10ClientRectC1ERKNS_7IntRectE;
 _ZN7WebCore10ShadowRoot6createEPNS_7ElementERi;
-_ZN7WebCore10ShadowTree20removeAllShadowRootsEv;
+_ZN7WebCore13ElementShadow20removeAllShadowRootsEv;
 _ZN7WebCore11EventTarget17toGeneratedStreamEv;
 _ZN7WebCore11EventTarget8toStreamEv;
 _ZN7WebCore12TextIterator26rangeFromLocationAndLengthEPNS_7ElementEiib;
@@ -98,7 +98,7 @@ _ZNK7WebCore26HTMLTextFormControlElement21lastChangeWasUserEditEv;
 _ZNK7WebCore26HTMLTextFormControlElement26placeholderShouldBeVisibleEv;
 _ZNK7WebCore5Frame8settingsEv;
 _ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE;
-_ZNK7WebCore7Element10shadowTreeEv;
+_ZNK7WebCore7Element6shadowEv;
 _ZNK7WebCore7Element13hasShadowRootEv;
 _ZNK7WebCore8Document4pageEv;
 _ZNK7WebCore8Document8settingsEv;