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

Issue 2769783002: Centralize more querySelector logic behind QuerySelectorCache. (Closed)

Created:
3 years, 9 months ago by esprehn
Modified:
3 years, 9 months ago
Reviewers:
sashab, rune
CC:
apavlov+blink_chromium.org, blink-reviews, blink-reviews-dom_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, dglazkov+blink, eae+blinkwatch, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Centralize more querySelector logic behind QuerySelectorCache. We make the types to the functions more clear, move the empty selector check inside, and handle the NthIndexCache automatically instead of expecting the callers to do the setup. This also unifies the exception messages for matches(), closest(), querySelector(), and querySelectorAll() when an empty string is passed. BUG=703900 Review-Url: https://codereview.chromium.org/2769783002 Cr-Commit-Position: refs/heads/master@{#458942} Committed: https://chromium.googlesource.com/chromium/src/+/146a91c44120872cb59aba6078b7cb40e4e8f4f6

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -29 lines) Patch
M third_party/WebKit/LayoutTests/fast/dom/Element/matches-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/selectors/element-closest-general-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ContainerNode.cpp View 2 chunks +0 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 chunk +9 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/SelectorQuery.cpp View 4 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (9 generated)
esprehn
3 years, 9 months ago (2017-03-22 20:21:39 UTC) #5
rune
lgtm
3 years, 9 months ago (2017-03-22 22:22:16 UTC) #8
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/2769783002/1
3 years, 9 months ago (2017-03-22 23:48:42 UTC) #10
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 00:10:33 UTC) #13
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/146a91c44120872cb59aba6078b7...

Powered by Google App Engine
This is Rietveld 408576698