Title: [116437] trunk/Source/WebCore
Revision
116437
Author
[email protected]
Date
2012-05-08 11:09:51 -0700 (Tue, 08 May 2012)

Log Message

Unreviewed, rolling out r116402.
http://trac.webkit.org/changeset/116402
https://bugs.webkit.org/show_bug.cgi?id=85898

Caused a 3% regression on Chromium's bloat-http test on Linux
(Requested by ojan_gardening on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-05-08

* WebCore.exp.in:
* bindings/v8/RetainedDOMInfo.cpp:
* dom/ContainerNode.h:
* dom/Node.cpp:
(WebCore::Node::traverseNextNode):
(WebCore):
(WebCore::Node::traverseNextSibling):
* dom/Node.h:
(Node):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (116436 => 116437)


--- trunk/Source/WebCore/ChangeLog	2012-05-08 17:58:28 UTC (rev 116436)
+++ trunk/Source/WebCore/ChangeLog	2012-05-08 18:09:51 UTC (rev 116437)
@@ -1,3 +1,22 @@
+2012-05-08  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r116402.
+        http://trac.webkit.org/changeset/116402
+        https://bugs.webkit.org/show_bug.cgi?id=85898
+
+        Caused a 3% regression on Chromium's bloat-http test on Linux
+        (Requested by ojan_gardening on #webkit).
+
+        * WebCore.exp.in:
+        * bindings/v8/RetainedDOMInfo.cpp:
+        * dom/ContainerNode.h:
+        * dom/Node.cpp:
+        (WebCore::Node::traverseNextNode):
+        (WebCore):
+        (WebCore::Node::traverseNextSibling):
+        * dom/Node.h:
+        (Node):
+
 2012-05-08  Hironori Bono  <[email protected]>
 
         [Chromium] Fix the position of an RTL resizer

Modified: trunk/Source/WebCore/WebCore.exp.in (116436 => 116437)


--- trunk/Source/WebCore/WebCore.exp.in	2012-05-08 17:58:28 UTC (rev 116436)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-05-08 18:09:51 UTC (rev 116437)
@@ -2096,6 +2096,7 @@
 __ZN7WebCore8Document36setFullScreenRendererBackgroundColorENS_5ColorE
 __ZN7WebCore8Document22setAnimatingFullScreenEb
 __ZNK7WebCore8Document9domWindowEv
+__ZNK7WebCore4Node16traverseNextNodeEPKS0_
 #endif
 
 __ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE

Modified: trunk/Source/WebCore/bindings/v8/RetainedDOMInfo.cpp (116436 => 116437)


--- trunk/Source/WebCore/bindings/v8/RetainedDOMInfo.cpp	2012-05-08 17:58:28 UTC (rev 116436)
+++ trunk/Source/WebCore/bindings/v8/RetainedDOMInfo.cpp	2012-05-08 18:09:51 UTC (rev 116437)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "RetainedDOMInfo.h"
 
-#include "ContainerNode.h"
+#include "Node.h"
 
 namespace WebCore {
 

Modified: trunk/Source/WebCore/dom/ContainerNode.h (116436 => 116437)


--- trunk/Source/WebCore/dom/ContainerNode.h	2012-05-08 17:58:28 UTC (rev 116436)
+++ trunk/Source/WebCore/dom/ContainerNode.h	2012-05-08 18:09:51 UTC (rev 116437)
@@ -228,62 +228,6 @@
     return highest;
 }
 
-inline Node* Node::traverseNextNode() const
-{
-    if (firstChild())
-        return firstChild();
-    if (nextSibling())
-        return nextSibling();
-    const Node* node = this;
-    while (node && !node->nextSibling())
-        node = node->parentNode();
-    if (UNLIKELY(!node))
-        return 0;
-    return node->nextSibling();
-}
-
-inline Node* Node::traverseNextNode(const Node* stayWithin) const
-{
-    if (firstChild())
-        return firstChild();
-    if (UNLIKELY(this == stayWithin))
-        return 0;
-    if (nextSibling())
-        return nextSibling();
-    const Node* node = this;
-    while (node && !node->nextSibling() && (!stayWithin || node->parentNode() != stayWithin))
-        node = node->parentNode();
-    if (UNLIKELY(!node))
-        return 0;
-    return node->nextSibling();
-}
-
-inline Node* Node::traverseNextSibling() const
-{
-    if (nextSibling())
-        return nextSibling();
-    const Node* node = this;
-    while (node && !node->nextSibling())
-        node = node->parentNode();
-    if (UNLIKELY(!node))
-        return 0;
-    return node->nextSibling();
-}
-
-inline Node* Node::traverseNextSibling(const Node* stayWithin) const
-{
-    if (UNLIKELY(this == stayWithin))
-        return 0;
-    if (nextSibling())
-        return nextSibling();
-    const Node* node = this;
-    while (node && !node->nextSibling() && (!stayWithin || node->parentNode() != stayWithin))
-        node = node->parentNode();
-    if (UNLIKELY(!node))
-        return 0;
-    return node->nextSibling();
-}
-
 typedef Vector<RefPtr<Node>, 11> NodeVector;
 
 inline void getChildNodes(Node* node, NodeVector& nodes)

Modified: trunk/Source/WebCore/dom/Node.cpp (116436 => 116437)


--- trunk/Source/WebCore/dom/Node.cpp	2012-05-08 17:58:28 UTC (rev 116436)
+++ trunk/Source/WebCore/dom/Node.cpp	2012-05-08 18:09:51 UTC (rev 116437)
@@ -1084,6 +1084,36 @@
     rareData()->setChildNodeList(0);
 }
 
+Node* Node::traverseNextNode(const Node* stayWithin) const
+{
+    if (firstChild())
+        return firstChild();
+    if (this == stayWithin)
+        return 0;
+    if (nextSibling())
+        return nextSibling();
+    const Node *n = this;
+    while (n && !n->nextSibling() && (!stayWithin || n->parentNode() != stayWithin))
+        n = n->parentNode();
+    if (n)
+        return n->nextSibling();
+    return 0;
+}
+
+Node* Node::traverseNextSibling(const Node* stayWithin) const
+{
+    if (this == stayWithin)
+        return 0;
+    if (nextSibling())
+        return nextSibling();
+    const Node *n = this;
+    while (n && !n->nextSibling() && (!stayWithin || n->parentNode() != stayWithin))
+        n = n->parentNode();
+    if (n)
+        return n->nextSibling();
+    return 0;
+}
+
 Node* Node::traverseNextNodePostOrder() const
 {
     Node* next = nextSibling();

Modified: trunk/Source/WebCore/dom/Node.h (116436 => 116437)


--- trunk/Source/WebCore/dom/Node.h	2012-05-08 17:58:28 UTC (rev 116436)
+++ trunk/Source/WebCore/dom/Node.h	2012-05-08 18:09:51 UTC (rev 116437)
@@ -431,12 +431,10 @@
     // This uses the same order that tags appear in the source file. If the stayWithin
     // argument is non-null, the traversal will stop once the specified node is reached.
     // This can be used to restrict traversal to a particular sub-tree.
-    Node* traverseNextNode() const;
-    Node* traverseNextNode(const Node* stayWithin) const;
+    Node* traverseNextNode(const Node* stayWithin = 0) const;
 
     // Like traverseNextNode, but skips children and starts with the next sibling.
-    Node* traverseNextSibling() const;
-    Node* traverseNextSibling(const Node* stayWithin) const;
+    Node* traverseNextSibling(const Node* stayWithin = 0) const;
 
     // Does a reverse pre-order traversal to find the node that comes before the current one in document order
     Node* traversePreviousNode(const Node* stayWithin = 0) const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to