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

Issue 315473002: Stop having HTMLNameCollection override HTMLCollection::virtualItemAfter() (Closed)

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

Description

Stop having HTMLNameCollection override HTMLCollection::virtualItemAfter() Stop having HTMLNameCollection override HTMLCollection::virtualItemAfter(). It is not really needed as the same DOM tree traversal code. Instead, we simply create 2 subclasses called DocumentNameCollection and WindowNameCollection that define an elementMatches() method that is called from HTMLCollection, similarly to other HTMLCollection subclasses. This avoids having a virtual function call, brings support for efficient backward traversal of these collections and leverages optimizations in HTMLCollection. This CL is inspired from WebKit r149652 from rniwa@webkit.org: http://trac.webkit.org/changeset/149652 R=esprehn@chromium.org, adamk@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175476

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -77 lines) Patch
M Source/core/core.gypi View 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 3 chunks +4 lines, -3 lines 0 comments Download
A Source/core/html/DocumentNameCollection.h View 1 chunk +30 lines, -0 lines 1 comment Download
A Source/core/html/DocumentNameCollection.cpp View 1 chunk +33 lines, -0 lines 0 comments Download
M Source/core/html/HTMLCollection.cpp View 1 2 chunks +6 lines, -0 lines 0 comments Download
M Source/core/html/HTMLNameCollection.h View 1 chunk +3 lines, -13 lines 0 comments Download
M Source/core/html/HTMLNameCollection.cpp View 2 chunks +2 lines, -61 lines 0 comments Download
A Source/core/html/WindowNameCollection.h View 1 chunk +30 lines, -0 lines 0 comments Download
A Source/core/html/WindowNameCollection.cpp View 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Inactive
6 years, 6 months ago (2014-06-03 02:55:03 UTC) #1
adamk
lgtm Seems fine to me https://codereview.chromium.org/315473002/diff/20001/Source/core/html/DocumentNameCollection.h File Source/core/html/DocumentNameCollection.h (right): https://codereview.chromium.org/315473002/diff/20001/Source/core/html/DocumentNameCollection.h#newcode16 Source/core/html/DocumentNameCollection.h:16: ASSERT_UNUSED(type, type == DocumentNamedItems); ...
6 years, 6 months ago (2014-06-03 20:20:55 UTC) #2
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 6 months ago (2014-06-03 21:12:42 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/315473002/20001
6 years, 6 months ago (2014-06-03 21:13:14 UTC) #4
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: blink_presubmit on tryserver.blink ...
6 years, 6 months ago (2014-06-03 22:42:58 UTC) #5
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 6 months ago (2014-06-04 12:23:33 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/315473002/20001
6 years, 6 months ago (2014-06-04 12:24:35 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-06-04 12:59:49 UTC) #8
Message was sent while issue was closed.
Change committed as 175476

Powered by Google App Engine
This is Rietveld 408576698