2011-04-19 Roland Steiner <rolandsteiner@chromium.org>
authorrolandsteiner@chromium.org <rolandsteiner@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 17:25:33 +0000 (17:25 +0000)
committerrolandsteiner@chromium.org <rolandsteiner@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 17:25:33 +0000 (17:25 +0000)
commitb1e124d08759df8d6b0942baa2a2442ff652bd11
tree150b62fe52b76da3ddda5a3f59d858f9a2c58fd1
parent975bfd1eaca590e01d8c9a3d38594f9f5f38f98d
2011-04-19  Roland Steiner  <rolandsteiner@chromium.org>

        Reviewed by Dimitri Glazkov.

        Bug 52963 - Enable O(1) access to root from any node in shadow DOM subtree
        https://bugs.webkit.org/show_bug.cgi?id=52963

        .) Change base class of ShadowRoot from DocumentFragment to TreeScope.
        .) Re-enable tree scope handling in Node (had ASSERT_NOT_REACHED, etc.).
        .) Merged setTreeScope() with setTreeScopeRecursively()
        .) Call setTreeScopeRecursively in DOM manipulation functions where applicable.
        .) Adapt JavaScript Node wrappers (temporary code - see https://bugs.webkit.org/show_bug.cgi?id=58704).

        No new tests. (refactoring)

        * bindings/js/JSNodeCustom.cpp:
        (WebCore::createWrapperInline):
        * bindings/v8/custom/V8NodeCustom.cpp:
        (WebCore::toV8Slow):
        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::takeAllChildrenFrom):
        (WebCore::ContainerNode::removeBetween):
        (WebCore::ContainerNode::removeChildren):
        (WebCore::ContainerNode::parserAddChild):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::~Document):
        (WebCore::Document::setDocType):
        * dom/Element.h:
        * dom/Node.cpp:
        (WebCore::Node::treeScope):
        (WebCore::Node::setTreeScopeRecursively):
        * dom/Node.h:
        (WebCore::Node::document):
        * dom/ShadowRoot.cpp:
        (WebCore::ShadowRoot::ShadowRoot):
        (WebCore::ShadowRoot::~ShadowRoot):
        (WebCore::ShadowRoot::nodeType):
        (WebCore::ShadowRoot::cloneNode):
        (WebCore::ShadowRoot::childTypeAllowed):
        * dom/ShadowRoot.h:
        (WebCore::toShadowRoot):
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::TreeScope):
        (WebCore::TreeScope::setParentTreeScope):
        * dom/TreeScope.h:
        * rendering/RenderSlider.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSNodeCustom.cpp
Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/dom/ShadowRoot.h
Source/WebCore/dom/TreeScope.cpp
Source/WebCore/dom/TreeScope.h
Source/WebCore/rendering/RenderSlider.cpp