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

Issue 1094213002: Refactored compound selector parsing methods. (Closed)

Created:
5 years, 8 months ago by rune
Modified:
5 years, 8 months ago
Reviewers:
Timothy Loh
CC:
blink-reviews, blink-reviews-css, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Refactored compound selector parsing methods. Methods for adding simple selectors to compound selectors had names like rewriteSpecifiers. This CL tries to make more sense to it and adds documentation for the not-so-straightforward ways of adding simple selectors. Renamed tagIsForNamespaceRule to tagIsImplicit as that is what it means. The type selector is necessary as a placeholder for use during selector matching, but not necessary to add to the serialization. What complicates this code a lot, is the fact that we can have one or more implicit ShadowPseudo combinators within the same compound selector, as seen by the parser, which means it's really multiple compound selectors. Handling these implicit combinators as true combinators in the parser could simplify this code. See added TODO. R=timloh@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194107

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebased #

Patch Set 3 : Addresses review issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -74 lines) Patch
M Source/core/css/CSSSelector.h View 5 chunks +6 lines, -6 lines 0 comments Download
M Source/core/css/CSSSelector.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/parser/CSSParserValues.h View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/css/parser/CSSParserValues.cpp View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/core/css/parser/CSSSelectorParser.h View 1 chunk +4 lines, -5 lines 0 comments Download
M Source/core/css/parser/CSSSelectorParser.cpp View 1 2 4 chunks +74 lines, -54 lines 0 comments Download
M Source/core/css/parser/CSSSelectorParserTest.cpp View 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
rune
Don't know how better this got, but the added documentation should help a bit.
5 years, 8 months ago (2015-04-20 23:36:03 UTC) #1
Timothy Loh
lgtm https://codereview.chromium.org/1094213002/diff/1/Source/core/css/parser/CSSSelectorParser.cpp File Source/core/css/parser/CSSSelectorParser.cpp (right): https://codereview.chromium.org/1094213002/diff/1/Source/core/css/parser/CSSSelectorParser.cpp#newcode611 Source/core/css/parser/CSSSelectorParser.cpp:611: // in the selector parser by pushing a ...
5 years, 8 months ago (2015-04-21 01:25:10 UTC) #2
rune
https://codereview.chromium.org/1094213002/diff/1/Source/core/css/parser/CSSSelectorParser.cpp File Source/core/css/parser/CSSSelectorParser.cpp (right): https://codereview.chromium.org/1094213002/diff/1/Source/core/css/parser/CSSSelectorParser.cpp#newcode611 Source/core/css/parser/CSSSelectorParser.cpp:611: // in the selector parser by pushing a token ...
5 years, 8 months ago (2015-04-21 09:00:08 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1094213002/40001
5 years, 8 months ago (2015-04-21 09:00:35 UTC) #6
commit-bot: I haz the power
5 years, 8 months ago (2015-04-21 11:05:31 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=194107

Powered by Google App Engine
This is Rietveld 408576698