Changeset 83796 in webkit


Ignore:
Timestamp:
Apr 13, 2011 6:11:46 PM (13 years ago)
Author:
tkent@chromium.org
Message:

2011-04-13 Kent Tamura <tkent@chromium.org>

Reviewed by Dimitri Glazkov.

Change the representation of ShadowRoot nodes in render tree dumps
https://bugs.webkit.org/show_bug.cgi?id=58432

Show "#shadow-root" for ShadorRoot nodes instead of "#document-fragment"
in DRT results.

No new tests. This change doesn't affect existing tests yet.

  • dom/DocumentFragment.h: Make nodeName() protected in order that ShdowRoot can override it.
  • dom/ShadowRoot.cpp: (WebCore::ShadowRoot::nodeName): Returns "#shadow-root".
  • dom/ShadowRoot.h: Declare nodeName().
  • rendering/RenderTreeAsText.cpp: (WebCore::nodePosition): Don't show "child N " if the node is a shadow boundary. We don't use isShadowRoot() here because the legacy shadow root nodes return true for isShadowRoot() and we don't want to update existing test results.
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83794 r83796  
     12011-04-13  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Change the representation of ShadowRoot nodes in render tree dumps
     6        https://bugs.webkit.org/show_bug.cgi?id=58432
     7
     8        Show "#shadow-root" for ShadorRoot nodes instead of "#document-fragment"
     9        in DRT results.
     10
     11        No new tests. This change doesn't affect existing tests yet.
     12
     13        * dom/DocumentFragment.h:
     14          Make nodeName() protected in order that ShdowRoot can override it.
     15        * dom/ShadowRoot.cpp:
     16        (WebCore::ShadowRoot::nodeName): Returns "#shadow-root".
     17        * dom/ShadowRoot.h: Declare nodeName().
     18        * rendering/RenderTreeAsText.cpp:
     19        (WebCore::nodePosition): Don't show "child N " if the node is a shadow boundary.
     20          We don't use isShadowRoot() here because the legacy shadow root nodes
     21          return true for isShadowRoot() and we don't want to update existing
     22          test results.
     23
    1242011-04-13  Ryosuke Niwa  <rniwa@webkit.org>
    225
  • trunk/Source/WebCore/dom/DocumentFragment.h

    r83256 r83796  
    3939protected:
    4040    DocumentFragment(Document*);
     41    virtual String nodeName() const;
    4142
    4243private:
    43     virtual String nodeName() const;
    4444    virtual NodeType nodeType() const;
    4545    virtual PassRefPtr<Node> cloneNode(bool deep);
  • trunk/Source/WebCore/dom/ShadowRoot.cpp

    r83256 r83796  
    3636}
    3737
     38String ShadowRoot::nodeName() const
     39{
     40    return "#shadow-root";
     41}
     42
    3843void ShadowRoot::recalcStyle(StyleChange change)
    3944{
  • trunk/Source/WebCore/dom/ShadowRoot.h

    r83256 r83796  
    4343private:
    4444    ShadowRoot(Document*);
     45    virtual String nodeName() const;
    4546};
    4647
  • trunk/Source/WebCore/rendering/RenderTreeAsText.cpp

    r81943 r83796  
    723723                break;
    724724            }
    725             result += "child " + String::number(n->nodeIndex()) + " {" + getTagName(n) + "}";
     725            if (n->isShadowBoundary())
     726                result += "{" + getTagName(n) + "}";
     727            else
     728                result += "child " + String::number(n->nodeIndex()) + " {" + getTagName(n) + "}";
    726729        } else
    727730            result += "document";
Note: See TracChangeset for help on using the changeset viewer.