Chromium Code Reviews
Help | Chromium Project | Sign in
(12)

Issue 2786493003: Inline SelectorQuery::executeForTraverseRoots into findTraverseRootsAndExecute. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 weeks, 1 day ago by esprehn
Modified:
4 weeks, 1 day 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

Inline SelectorQuery::executeForTraverseRoots into findTraverseRootsAndExecute. This function is just a glorified if statement over the enum value we pass into it. Inline the two loops into the call sites. We can also remove the check against SelectorQueryTrait::shouldOnlyMatchFirstElement inside the loops since the outer check ensures it's always false. This lets us remove the MatchTraverseRootState enum. It does make the findTraverseRootsAndExecute function bigger, but it removes a bunch of checks in the process. Future patches will simplify further and hopefully shrink the function. BUG=703900 Review-Url: https://codereview.chromium.org/2786493003 Cr-Commit-Position: refs/heads/master@{#460448} Committed: https://chromium.googlesource.com/chromium/src/+/7283eda4c582d4aa64838377970466ae6a4d2f2e

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -56 lines) Patch
M third_party/WebKit/Source/core/dom/SelectorQuery.h View 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/dom/SelectorQuery.cpp View 2 chunks +14 lines, -45 lines 1 comment Download
Commit queue not available (can’t edit this change).

Messages

Total messages: 21 (17 generated)
esprehn
https://codereview.chromium.org/2786493003/diff/1/third_party/WebKit/Source/core/dom/SelectorQuery.cpp File third_party/WebKit/Source/core/dom/SelectorQuery.cpp (right): https://codereview.chromium.org/2786493003/diff/1/third_party/WebKit/Source/core/dom/SelectorQuery.cpp#newcode291 third_party/WebKit/Source/core/dom/SelectorQuery.cpp:291: break; This was just executing the code below if ...
4 weeks, 1 day ago (2017-03-29 05:00:43 UTC) #15
rune
That looked over-engineered. lgtm
4 weeks, 1 day ago (2017-03-29 09:38:46 UTC) #16
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/2786493003/1
4 weeks, 1 day ago (2017-03-29 17:45:37 UTC) #18
commit-bot: I haz the power
4 weeks, 1 day ago (2017-03-29 17:51:37 UTC) #21
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/7283eda4c582d4aa648383779704...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld cc6ac46