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

Issue 229213002: Make HTMLCollection / NodeList backward traversal consistent with forward one (Closed)

Created:
6 years, 8 months ago by Inactive
Modified:
6 years, 8 months ago
Reviewers:
esprehn, adamk
CC:
blink-reviews, sof, eae+blinkwatch, dglazkov+blink, adamk+blink_chromium.org, rwlbuis
Visibility:
Public.

Description

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

Patch Set 1 #

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

Messages

Total messages: 10 (0 generated)
Inactive
6 years, 8 months ago (2014-04-08 21:52:56 UTC) #1
adamk
Sorry for the slow response, but I've read over this change a few times now ...
6 years, 8 months ago (2014-04-09 22:38:16 UTC) #2
Inactive
On 2014/04/09 22:38:16, adamk wrote: > It doesn't seem like there are any callers that ...
6 years, 8 months ago (2014-04-09 22:58:35 UTC) #3
Inactive
Here are some details about the performance benefits of doing this change. Currently, traversing forward ...
6 years, 8 months ago (2014-04-09 23:08:57 UTC) #4
Inactive
https://codereview.chromium.org/229213002/diff/1/Source/core/dom/ElementTraversal.h File Source/core/dom/ElementTraversal.h (right): https://codereview.chromium.org/229213002/diff/1/Source/core/dom/ElementTraversal.h#newcode48 Source/core/dom/ElementTraversal.h:48: // First or last ElementType descendant of the node. ...
6 years, 8 months ago (2014-04-09 23:14:29 UTC) #5
Inactive
https://codereview.chromium.org/229213002/diff/1/Source/core/dom/ElementTraversal.h File Source/core/dom/ElementTraversal.h (right): https://codereview.chromium.org/229213002/diff/1/Source/core/dom/ElementTraversal.h#newcode122 Source/core/dom/ElementTraversal.h:122: Node* node = NodeTraversal::lastWithin(current); Also see that WebKit is ...
6 years, 8 months ago (2014-04-09 23:19:07 UTC) #6
adamk
lgtm Thank you for the comments, very helpful in understanding the change, and sorry if ...
6 years, 8 months ago (2014-04-09 23:23:43 UTC) #7
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-09 23:34:17 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/229213002/1
6 years, 8 months ago (2014-04-09 23:34:19 UTC) #9
commit-bot: I haz the power
6 years, 8 months ago (2014-04-09 23:43:56 UTC) #10
Message was sent while issue was closed.
Change committed as 171202

Powered by Google App Engine
This is Rietveld 408576698