Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in

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

11 months, 3 weeks ago by esprehn
11 months, 3 weeks ago
meade_UTC10, dglazkov, rune
blink-reviews,, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:


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: Cr-Commit-Position: refs/heads/master@{#460448} Committed:

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


Total messages: 21 (17 generated)
esprehn File third_party/WebKit/Source/core/dom/SelectorQuery.cpp (right): third_party/WebKit/Source/core/dom/SelectorQuery.cpp:291: break; This was just executing the code below if ...
11 months, 3 weeks ago (2017-03-29 05:00:43 UTC) #15
That looked over-engineered. lgtm
11 months, 3 weeks ago (2017-03-29 09:38:46 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at
11 months, 3 weeks ago (2017-03-29 17:45:37 UTC) #18
commit-bot: I haz the power
11 months, 3 weeks ago (2017-03-29 17:51:37 UTC) #21
Message was sent while issue was closed.
Committed patchset #1 (id:1) as

Powered by Google App Engine
This is Rietveld 408576698