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

Issue 2786763002: Simplify the id fast path for non-right most selectors in querySelector. (Closed)

Created:
3 years, 8 months ago by esprehn
Modified:
3 years, 8 months ago
Reviewers:
meade_UTC10, dglazkov, rune
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

Simplify the id fast path for non-right most selectors in querySelector. The id path inside SelectorQuery::findTraverseRootsAndExecute is not actually reachable for the right most selector since we handle that separately inside the top level ::execute() call. We also only ever take the fast path when rootNode.isConnected() (as checked by canUseFastPath) so we can use that too. By using these two truths inside this code we can simplify what it was doing and delete a bunch of the code. BUG=703900 Review-Url: https://codereview.chromium.org/2786763002 Cr-Commit-Position: refs/heads/master@{#460572} Committed: https://chromium.googlesource.com/chromium/src/+/d3b15e0c4bb54971c3d689537a2b08c91a89238b

Patch Set 1 #

Total comments: 3

Patch Set 2 : value() asserts for tag, can't use a local. #

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

Messages

Total messages: 15 (10 generated)
esprehn
https://codereview.chromium.org/2786763002/diff/1/third_party/WebKit/Source/core/dom/SelectorQuery.cpp File third_party/WebKit/Source/core/dom/SelectorQuery.cpp (left): https://codereview.chromium.org/2786763002/diff/1/third_party/WebKit/Source/core/dom/SelectorQuery.cpp#oldcode247 third_party/WebKit/Source/core/dom/SelectorQuery.cpp:247: if (selector->match() == CSSSelector::Id && rootNode.isInTreeScope() && We only ...
3 years, 8 months ago (2017-03-29 19:59:43 UTC) #3
esprehn
3 years, 8 months ago (2017-03-29 21:41:08 UTC) #8
dglazkov
lgtm
3 years, 8 months ago (2017-03-29 22:23:35 UTC) #9
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/2786763002/20001
3 years, 8 months ago (2017-03-29 22:35:05 UTC) #12
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 23:23:36 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/d3b15e0c4bb54971c3d689537a2b...

Powered by Google App Engine
This is Rietveld 408576698