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

Issue 2788953003: Remove ClassElementList and reuse collectElementsByClassName in SelectorQuery. (Closed)

Created:
3 years, 8 months ago by esprehn
Modified:
3 years, 8 months ago
Reviewers:
dglazkov
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove ClassElementList and reuse collectElementsByClassName in SelectorQuery. We can add a check to collectElementsByClassName to match a full selector once we find an element with a matching class name and remove the AllElements mode of the ClassElementList. This does mean we do one extra branch per element in the cases of selectors like '.a' for each element that does actually have this class name, but that seems fine given the cost of allocating wrappers and everything else that's going to happen after returning the matches. After removing the AllElements mode we can inline the loop for ClassElementList into the caller and remove this iterator abstraction entirely. BUG=703900 Review-Url: https://codereview.chromium.org/2788953003 Cr-Commit-Position: refs/heads/master@{#461316} Committed: https://chromium.googlesource.com/chromium/src/+/00b1fe65b09e25713e2ebb7c0e940be33cdfb7c7

Patch Set 1 #

Patch Set 2 : Woops missed a return. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -58 lines) Patch
M third_party/WebKit/Source/core/dom/SelectorQuery.cpp View 1 6 chunks +27 lines, -58 lines 0 comments Download

Messages

Total messages: 17 (14 generated)
dglazkov
lgtm
3 years, 8 months ago (2017-04-01 00:06:06 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2788953003/20001
3 years, 8 months ago (2017-04-01 04:45:33 UTC) #14
commit-bot: I haz the power
3 years, 8 months ago (2017-04-01 05:36:47 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/00b1fe65b09e25713e2ebb7c0e94...

Powered by Google App Engine
This is Rietveld 408576698