Changeset 116437 in webkit
- Timestamp:
- May 8, 2012 11:09:51 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116435 r116437 1 2012-05-08 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r116402. 4 http://trac.webkit.org/changeset/116402 5 https://bugs.webkit.org/show_bug.cgi?id=85898 6 7 Caused a 3% regression on Chromium's bloat-http test on Linux 8 (Requested by ojan_gardening on #webkit). 9 10 * WebCore.exp.in: 11 * bindings/v8/RetainedDOMInfo.cpp: 12 * dom/ContainerNode.h: 13 * dom/Node.cpp: 14 (WebCore::Node::traverseNextNode): 15 (WebCore): 16 (WebCore::Node::traverseNextSibling): 17 * dom/Node.h: 18 (Node): 19 1 20 2012-05-08 Hironori Bono <hbono@chromium.org> 2 21 -
trunk/Source/WebCore/WebCore.exp.in
r116402 r116437 2097 2097 __ZN7WebCore8Document22setAnimatingFullScreenEb 2098 2098 __ZNK7WebCore8Document9domWindowEv 2099 __ZNK7WebCore4Node16traverseNextNodeEPKS0_ 2099 2100 #endif 2100 2101 -
trunk/Source/WebCore/bindings/v8/RetainedDOMInfo.cpp
r116402 r116437 32 32 #include "RetainedDOMInfo.h" 33 33 34 #include " ContainerNode.h"34 #include "Node.h" 35 35 36 36 namespace WebCore { -
trunk/Source/WebCore/dom/ContainerNode.h
r116402 r116437 229 229 } 230 230 231 inline Node* Node::traverseNextNode() const232 {233 if (firstChild())234 return firstChild();235 if (nextSibling())236 return nextSibling();237 const Node* node = this;238 while (node && !node->nextSibling())239 node = node->parentNode();240 if (UNLIKELY(!node))241 return 0;242 return node->nextSibling();243 }244 245 inline Node* Node::traverseNextNode(const Node* stayWithin) const246 {247 if (firstChild())248 return firstChild();249 if (UNLIKELY(this == stayWithin))250 return 0;251 if (nextSibling())252 return nextSibling();253 const Node* node = this;254 while (node && !node->nextSibling() && (!stayWithin || node->parentNode() != stayWithin))255 node = node->parentNode();256 if (UNLIKELY(!node))257 return 0;258 return node->nextSibling();259 }260 261 inline Node* Node::traverseNextSibling() const262 {263 if (nextSibling())264 return nextSibling();265 const Node* node = this;266 while (node && !node->nextSibling())267 node = node->parentNode();268 if (UNLIKELY(!node))269 return 0;270 return node->nextSibling();271 }272 273 inline Node* Node::traverseNextSibling(const Node* stayWithin) const274 {275 if (UNLIKELY(this == stayWithin))276 return 0;277 if (nextSibling())278 return nextSibling();279 const Node* node = this;280 while (node && !node->nextSibling() && (!stayWithin || node->parentNode() != stayWithin))281 node = node->parentNode();282 if (UNLIKELY(!node))283 return 0;284 return node->nextSibling();285 }286 287 231 typedef Vector<RefPtr<Node>, 11> NodeVector; 288 232 -
trunk/Source/WebCore/dom/Node.cpp
r116402 r116437 1085 1085 } 1086 1086 1087 Node* Node::traverseNextNode(const Node* stayWithin) const 1088 { 1089 if (firstChild()) 1090 return firstChild(); 1091 if (this == stayWithin) 1092 return 0; 1093 if (nextSibling()) 1094 return nextSibling(); 1095 const Node *n = this; 1096 while (n && !n->nextSibling() && (!stayWithin || n->parentNode() != stayWithin)) 1097 n = n->parentNode(); 1098 if (n) 1099 return n->nextSibling(); 1100 return 0; 1101 } 1102 1103 Node* Node::traverseNextSibling(const Node* stayWithin) const 1104 { 1105 if (this == stayWithin) 1106 return 0; 1107 if (nextSibling()) 1108 return nextSibling(); 1109 const Node *n = this; 1110 while (n && !n->nextSibling() && (!stayWithin || n->parentNode() != stayWithin)) 1111 n = n->parentNode(); 1112 if (n) 1113 return n->nextSibling(); 1114 return 0; 1115 } 1116 1087 1117 Node* Node::traverseNextNodePostOrder() const 1088 1118 { -
trunk/Source/WebCore/dom/Node.h
r116419 r116437 432 432 // argument is non-null, the traversal will stop once the specified node is reached. 433 433 // This can be used to restrict traversal to a particular sub-tree. 434 Node* traverseNextNode() const; 435 Node* traverseNextNode(const Node* stayWithin) const; 434 Node* traverseNextNode(const Node* stayWithin = 0) const; 436 435 437 436 // Like traverseNextNode, but skips children and starts with the next sibling. 438 Node* traverseNextSibling() const; 439 Node* traverseNextSibling(const Node* stayWithin) const; 437 Node* traverseNextSibling(const Node* stayWithin = 0) const; 440 438 441 439 // Does a reverse pre-order traversal to find the node that comes before the current one in document order
Note: See TracChangeset
for help on using the changeset viewer.