Title: [116705] trunk/Source/WebCore
Revision
116705
Author
[email protected]
Date
2012-05-10 17:02:04 -0700 (Thu, 10 May 2012)

Log Message

Unreviewed, rolling out r116677.
http://trac.webkit.org/changeset/116677
https://bugs.webkit.org/show_bug.cgi?id=86159

This patch causes linker error to some mac bots (Requested by
jianli_ on #webkit).

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

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (116704 => 116705)


--- trunk/Source/WebCore/ChangeLog	2012-05-10 23:53:24 UTC (rev 116704)
+++ trunk/Source/WebCore/ChangeLog	2012-05-11 00:02:04 UTC (rev 116705)
@@ -1,3 +1,20 @@
+2012-05-10  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r116677.
+        http://trac.webkit.org/changeset/116677
+        https://bugs.webkit.org/show_bug.cgi?id=86159
+
+        This patch causes linker error to some mac bots (Requested by
+        jianli_ on #webkit).
+
+        * WebCore.exp.in:
+        * dom/ContainerNode.h:
+        * dom/Node.cpp:
+        (WebCore::Node::traverseNextNode):
+        (WebCore::Node::traverseNextSibling):
+        * dom/Node.h:
+        (Node):
+
 2012-05-10  Abhishek Arya  <[email protected]>
 
         Crash in FontCache::releaseFontData due to infinite float size.

Modified: trunk/Source/WebCore/WebCore.exp.in (116704 => 116705)


--- trunk/Source/WebCore/WebCore.exp.in	2012-05-10 23:53:24 UTC (rev 116704)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-05-11 00:02:04 UTC (rev 116705)
@@ -2099,7 +2099,7 @@
 __ZN7WebCore8Document36setFullScreenRendererBackgroundColorENS_5ColorE
 __ZN7WebCore8Document22setAnimatingFullScreenEb
 __ZNK7WebCore8Document9domWindowEv
-__ZNK7WebCore4Node27traverseNextAncestorSiblingEv
+__ZNK7WebCore4Node16traverseNextNodeEPKS0_
 #endif
 
 __ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE

Modified: trunk/Source/WebCore/dom/ContainerNode.h (116704 => 116705)


--- trunk/Source/WebCore/dom/ContainerNode.h	2012-05-10 23:53:24 UTC (rev 116704)
+++ trunk/Source/WebCore/dom/ContainerNode.h	2012-05-11 00:02:04 UTC (rev 116705)
@@ -229,36 +229,6 @@
     return highest;
 }
 
-inline Node* Node::traverseNextSibling() const
-{
-    if (nextSibling())
-        return nextSibling();
-    return traverseNextAncestorSibling();
-}
-
-inline Node* Node::traverseNextNode() const
-{
-    if (firstChild())
-        return firstChild();
-    return traverseNextSibling();
-}
-
-inline Node* Node::traverseNextSibling(const Node* stayWithin) const
-{
-    if (this == stayWithin)
-        return 0;
-    if (nextSibling())
-        return nextSibling();
-    return traverseNextAncestorSibling(stayWithin);
-}
-
-inline Node* Node::traverseNextNode(const Node* stayWithin) const
-{
-    if (firstChild())
-        return firstChild();
-    return traverseNextSibling(stayWithin);
-}
-
 typedef Vector<RefPtr<Node>, 11> NodeVector;
 
 inline void getChildNodes(Node* node, NodeVector& nodes)

Modified: trunk/Source/WebCore/dom/Node.cpp (116704 => 116705)


--- trunk/Source/WebCore/dom/Node.cpp	2012-05-10 23:53:24 UTC (rev 116704)
+++ trunk/Source/WebCore/dom/Node.cpp	2012-05-11 00:02:04 UTC (rev 116705)
@@ -1088,26 +1088,33 @@
     rareData()->setChildNodeList(0);
 }
 
-Node* Node::traverseNextAncestorSibling() const
+Node* Node::traverseNextNode(const Node* stayWithin) const
 {
-    ASSERT(!nextSibling());
-    for (const Node* node = parentNode(); node; node = node->parentNode()) {
-        if (node->nextSibling())
-            return node->nextSibling();
-    }
+    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::traverseNextAncestorSibling(const Node* stayWithin) const
+Node* Node::traverseNextSibling(const Node* stayWithin) const
 {
-    ASSERT(!nextSibling());
-    ASSERT(this != stayWithin);
-    for (const Node* node = parentNode(); node; node = node->parentNode()) {
-        if (node == stayWithin)
-            return 0;
-        if (node->nextSibling())
-            return node->nextSibling();
-    }
+    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;
 }
 

Modified: trunk/Source/WebCore/dom/Node.h (116704 => 116705)


--- trunk/Source/WebCore/dom/Node.h	2012-05-10 23:53:24 UTC (rev 116704)
+++ trunk/Source/WebCore/dom/Node.h	2012-05-11 00:02:04 UTC (rev 116705)
@@ -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;
@@ -769,9 +767,6 @@
 
     Element* ancestorElement() const;
 
-    Node* traverseNextAncestorSibling() const;
-    Node* traverseNextAncestorSibling(const Node* stayWithin) const;
-
     // Use Node::parentNode as the consistent way of querying a parent node.
     // This method is made private to ensure a compiler error on call sites that
     // don't follow this rule.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to