Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: Source/core/dom/ElementTraversal.h

Issue 416933002: Regression(r178540): Traversal<*Element>::lastWithin() is incorrect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build error Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ElementTraversal.h
diff --git a/Source/core/dom/ElementTraversal.h b/Source/core/dom/ElementTraversal.h
index e0165aec982dea919c66ad86739af7b5791100ef..9bca3c28ee8433da886bc0c4759e5230a720fa34 100644
--- a/Source/core/dom/ElementTraversal.h
+++ b/Source/core/dom/ElementTraversal.h
@@ -220,9 +220,9 @@ template <class ElementType>
template <class NodeType>
inline ElementType* Traversal<ElementType>::lastWithinTemplate(NodeType& current)
{
- Node* node = current.lastChild();
+ Node* node = NodeTraversal::lastWithin(current);
while (node && !isElementOfType<const ElementType>(*node))
- node = NodeTraversal::previous(node, &current);
+ node = NodeTraversal::previous(*node, &current);
return toElement<ElementType>(node);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698