Title: [125000] trunk/Source/WebCore
Revision
125000
Author
[email protected]
Date
2012-08-08 00:02:52 -0700 (Wed, 08 Aug 2012)

Log Message

showNodePath should show the age of ShadowRoot
https://bugs.webkit.org/show_bug.cgi?id=93347

Patch by Takashi Sakamoto <[email protected]> on 2012-08-08
Reviewed by Ryosuke Niwa.

No new tests, because this patch is for fixing a bug of a method for
debugging. If NDEBUG is defined, the method is not compiled.

* dom/Node.cpp:
(WebCore::Node::showNodePathForThis):
Fixed the bug to obtain the oldest shadow root from a shadow root.
oldestShadowRootFor only works for an element node, not for a shadow root.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124999 => 125000)


--- trunk/Source/WebCore/ChangeLog	2012-08-08 06:58:16 UTC (rev 124999)
+++ trunk/Source/WebCore/ChangeLog	2012-08-08 07:02:52 UTC (rev 125000)
@@ -1,3 +1,18 @@
+2012-08-08  Takashi Sakamoto  <[email protected]>
+
+        showNodePath should show the age of ShadowRoot
+        https://bugs.webkit.org/show_bug.cgi?id=93347
+
+        Reviewed by Ryosuke Niwa.
+
+        No new tests, because this patch is for fixing a bug of a method for
+        debugging. If NDEBUG is defined, the method is not compiled.
+
+        * dom/Node.cpp:
+        (WebCore::Node::showNodePathForThis):
+        Fixed the bug to obtain the oldest shadow root from a shadow root.
+        oldestShadowRootFor only works for an element node, not for a shadow root.
+
 2012-08-07  Kent Tamura  <[email protected]>
 
         Remove fractionDigits argument of WebCore::convertToLocalizedNumber()

Modified: trunk/Source/WebCore/dom/Node.cpp (124999 => 125000)


--- trunk/Source/WebCore/dom/Node.cpp	2012-08-08 06:58:16 UTC (rev 124999)
+++ trunk/Source/WebCore/dom/Node.cpp	2012-08-08 07:02:52 UTC (rev 125000)
@@ -2132,7 +2132,7 @@
         const Node* node = chain[index - 1];
         if (node->isShadowRoot()) {
             int count = 0;
-            for (ShadowRoot* shadowRoot = oldestShadowRootFor(node); shadowRoot && shadowRoot != node; shadowRoot = shadowRoot->youngerShadowRoot())
+            for (ShadowRoot* shadowRoot = oldestShadowRootFor(toShadowRoot(node)->host()); shadowRoot && shadowRoot != node; shadowRoot = shadowRoot->youngerShadowRoot())
                 ++count;
             fprintf(stderr, "/#shadow-root[%d]", count);
             continue;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to