|
Make HTMLCollection / NodeList backward traversal consistent with forward one
This makes the code clearer and more consistent. There is no reason to handle
backward traversal differently from forward traversal.
This CL also updates to make ElementTraversal::lastWithin() actually return
the last descendant of Element type, and not the last child Element. This is
not equivalent. ElementTraversal::lastChild() should be used instead to get
the last child Element. This results in the removal of
LiveNodeListBase::lastDescendant() method.
R=esprehn@chromium.org, adamk@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171202
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+125 lines, -80 lines) |
Patch |
|
M |
Source/core/dom/ChildNodeList.h
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/ChildNodeList.cpp
|
View
|
|
2 chunks |
+11 lines, -5 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Element.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/ElementTraversal.h
|
View
|
|
1 chunk |
+4 lines, -1 line |
2 comments
|
Download
|
|
M |
Source/core/dom/LiveNodeList.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/dom/LiveNodeList.cpp
|
View
|
|
2 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/LiveNodeListBase.h
|
View
|
|
4 chunks |
+36 lines, -46 lines |
1 comment
|
Download
|
|
M |
Source/core/dom/NodeTraversal.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/NodeTraversal.cpp
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/ParentNode.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/html/CollectionIndexCache.h
|
View
|
|
2 chunks |
+5 lines, -12 lines |
2 comments
|
Download
|
|
M |
Source/core/html/HTMLCollection.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLCollection.cpp
|
View
|
|
5 chunks |
+40 lines, -5 lines |
1 comment
|
Download
|
Total messages: 10 (0 generated)
|