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

Issue 1574323003: Split compound selector after consume finished. (Closed)

Created:
4 years, 11 months ago by rune
Modified:
4 years, 11 months ago
Reviewers:
Timothy Loh, kochi
CC:
chromium-reviews, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@upload-base
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split compound selector after consume finished. CSSSelectorParser::consumeCompoundSelector() will split a compound into two compounds when it contains a simple selector which needs a synthetic ShadowPseudo combinator. This split was done as simple selectors were added. That code was complicated and and yielded some strange serializations like what was reported in https://crbug.com/478563. This CL adds simple selectors to the compound in the selector text order, and splits the compound into two compounds and re-order them after the whole compound has been consumed. This makes the code simpler and makes it simpler to check selector validity (before the split). This fixes issue 478563 and prepares for validity checking. A side effect is that unnecessary universal selectors are left out of the serialization (issue 478969). ::content is no longer kept leftmost in the compound, which is the reason why contentPseudoCrossing is set when the combinators which are affectedByPseudoContent instead of when the actual ::content selector is seen. R=timloh@chromium.org BUG=478563, 489481, 478969 Committed: https://crrev.com/a6ba29080ae9af6a64aea3c775701742a1885155 Cr-Commit-Position: refs/heads/master@{#369723}

Patch Set 1 #

Patch Set 2 : Removed obsolete serialization hack and fixed unit tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -181 lines) Patch
M third_party/WebKit/LayoutTests/fast/css/css-selector-text.html View 1 chunk +11 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/css-selector-text-expected.txt View 1 chunk +11 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/css-set-selector-text.html View 1 chunk +11 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/css-set-selector-text-expected.txt View 1 chunk +11 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/cue-serialize.html View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/cue-serialize-expected.txt View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/shadow/content-pseudo-element-css-text.html View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/shadow/content-pseudo-element-css-text-expected.txt View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSSelector.cpp View 1 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.cpp View 3 chunks +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleSetTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserSelector.h View 3 chunks +2 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserSelector.cpp View 3 chunks +8 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParser.h View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp View 4 chunks +35 lines, -90 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp View 1 1 chunk +4 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 23 (11 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1574323003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1574323003/1
4 years, 11 months ago (2016-01-12 18:32:42 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/164791)
4 years, 11 months ago (2016-01-12 19:25:58 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1574323003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1574323003/20001
4 years, 11 months ago (2016-01-12 21:08:05 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-12 23:30:41 UTC) #9
rune
ptal
4 years, 11 months ago (2016-01-14 09:42:30 UTC) #10
Timothy Loh
On 2016/01/14 09:42:30, rune wrote: > ptal lgtm
4 years, 11 months ago (2016-01-15 03:29:38 UTC) #11
kochi
Rune, could you go ahead and land this CL? I am rebasing my CL on ...
4 years, 11 months ago (2016-01-15 07:54:24 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1574323003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1574323003/20001
4 years, 11 months ago (2016-01-15 08:42:33 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/165771)
4 years, 11 months ago (2016-01-15 08:55:13 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1574323003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1574323003/20001
4 years, 11 months ago (2016-01-15 09:38:34 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 11 months ago (2016-01-15 10:40:16 UTC) #21
commit-bot: I haz the power
4 years, 11 months ago (2016-01-15 10:41:55 UTC) #23
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/a6ba29080ae9af6a64aea3c775701742a1885155
Cr-Commit-Position: refs/heads/master@{#369723}

Powered by Google App Engine
This is Rietveld 408576698