2011-06-09 Dimitri Glazkov <dglazkov@chromium.org>
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2011 20:24:59 +0000 (20:24 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2011 20:24:59 +0000 (20:24 +0000)
commitee3978f2343bf4c1282b339d356b84d0fd07069e
treef8d87d9a6b7b0920a8aae9b1db9b8ec1da4e0b3a
parenta44533485abae316f03971cd0784afcf8877fea6
2011-06-09  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Kent Tamura.

        Fold isShadowBoundary into isShadowRoot.
        https://bugs.webkit.org/show_bug.cgi?id=62317

        Since there are no longer cases where Node::isShadowBoundary() != Node::isShadowRoot, we can remove this function.

        In one case where isShadowBoundary was also tested to find ShadowContentElemnt, added a new isContentElement function.

        Refactoring, covered by existing tests.

        * css/CSSStyleSelector.cpp:
        (WebCore::isAtShadowBoundary): Changed to use isShadowRoot.
        * dom/Element.cpp:
        (WebCore::Element::isSpellCheckingEnabled): Ditto.
        * dom/Node.cpp:
        (WebCore::Node::nonBoundaryShadowTreeRootNode): Ditto.
        (WebCore::Node::nonShadowBoundaryParentNode): Ditto.
        * dom/Node.h:
        (WebCore::Node::isContentElement): Added.
        * dom/NodeRenderingContext.cpp:
        (WebCore::NodeRenderingContext::NodeRenderingContext): Changed to use isShadowRoot.
        * dom/Position.cpp:
        (WebCore::Position::Position): Ditto.
        * dom/ShadowContentElement.h:
        (WebCore::ShadowContentElement::isContentElement): Added.
        * dom/ShadowRoot.cpp:
        (WebCore::ShadowRoot::hasContentElement): Changed to use isContentElement.
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::insertNodeAfter): Changed to use isShadowRoot.
        * editing/htmlediting.cpp:
        (WebCore::visiblePositionBeforeNode): Ditto.
        (WebCore::visiblePositionAfterNode): Ditto.
        * page/DragController.cpp:
        (WebCore::asFileInput): Ditto.
        * rendering/RenderTreeAsText.cpp:
        (WebCore::nodePosition): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/NodeRenderingContext.cpp
Source/WebCore/dom/Position.cpp
Source/WebCore/dom/ShadowContentElement.h
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/rendering/RenderTreeAsText.cpp