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

Issue 2288633002: Recognise variable names when parsing CSS property names (Closed)

Created:
4 years, 3 months ago by Timothy Loh
Modified:
4 years, 3 months ago
Reviewers:
haraken, ikilpatrick, rune
CC:
chromium-reviews, blink-reviews-style_chromium.org, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Recognise variable names when parsing CSS property names This patch moves the CSSVariableResolver::isValidVariableName call that usually exists alongside calling cssPropertyId into the cssPropertyId call (and similarly for unresolvedCSSPropertyId). Pretty much every place which parses property names should be handling custom properties, so it's easier to just return CSSPropertyVariable instead of needing to manually check for a valid custom property name. Committed: https://crrev.com/07846616d126fafc699b3c8e8edad379c16dfeda Cr-Commit-Position: refs/heads/master@{#415230}

Patch Set 1 #

Total comments: 3

Patch Set 2 : tweak comment #

Total comments: 2

Patch Set 3 : fix long var names #

Messages

Total messages: 25 (10 generated)
Timothy Loh
https://codereview.chromium.org/2288633002/diff/1/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/2288633002/diff/1/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode168 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:168: if (length >= 2 && propertyName[0] == '-' && ...
4 years, 3 months ago (2016-08-29 04:01:38 UTC) #2
rune
lgtm https://codereview.chromium.org/2288633002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp File third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp (right): https://codereview.chromium.org/2288633002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp#newcode769 third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp:769: // TODO(timloh): Shouldn't this only be for StyleRule::Style? ...
4 years, 3 months ago (2016-08-29 07:48:42 UTC) #4
Timothy Loh
https://codereview.chromium.org/2288633002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp File third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp (right): https://codereview.chromium.org/2288633002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp#newcode769 third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp:769: // TODO(timloh): Shouldn't this only be for StyleRule::Style? On ...
4 years, 3 months ago (2016-08-29 08:15:50 UTC) #5
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/2288633002/20001
4 years, 3 months ago (2016-08-29 08:16:17 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/248080)
4 years, 3 months ago (2016-08-29 08:22:14 UTC) #10
haraken
owner LGTM
4 years, 3 months ago (2016-08-29 08:22:47 UTC) #11
ikilpatrick
lgtm
4 years, 3 months ago (2016-08-29 16:29:19 UTC) #12
ikilpatrick
lgtm https://codereview.chromium.org/2288633002/diff/20001/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp File third_party/WebKit/Source/core/css/DOMWindowCSS.cpp (right): https://codereview.chromium.org/2288633002/diff/20001/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp#newcode48 third_party/WebKit/Source/core/css/DOMWindowCSS.cpp:48: return CSSParser::parseValueForCustomProperty(dummyStyle, "--valid", value, false, 0); I assume ...
4 years, 3 months ago (2016-08-29 16:30:59 UTC) #13
ikilpatrick
lgtm
4 years, 3 months ago (2016-08-29 16:31:03 UTC) #14
Timothy Loh
https://codereview.chromium.org/2288633002/diff/20001/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp File third_party/WebKit/Source/core/css/DOMWindowCSS.cpp (right): https://codereview.chromium.org/2288633002/diff/20001/third_party/WebKit/Source/core/css/DOMWindowCSS.cpp#newcode48 third_party/WebKit/Source/core/css/DOMWindowCSS.cpp:48: return CSSParser::parseValueForCustomProperty(dummyStyle, "--valid", value, false, 0); On 2016/08/29 16:30:59, ...
4 years, 3 months ago (2016-08-30 03:57:18 UTC) #15
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/2288633002/40001
4 years, 3 months ago (2016-08-30 04:00:53 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/287129)
4 years, 3 months ago (2016-08-30 06:20:04 UTC) #20
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/2288633002/40001
4 years, 3 months ago (2016-08-30 06:25:30 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-08-30 07:26:48 UTC) #23
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 07:28:38 UTC) #25
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/07846616d126fafc699b3c8e8edad379c16dfeda
Cr-Commit-Position: refs/heads/master@{#415230}

Powered by Google App Engine
This is Rietveld 408576698