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

Issue 2366243002: Remove all ordering requirements in CSSValueKeywords.in (WIP) (Closed)

Created:
4 years, 2 months ago by sashab
Modified:
4 years ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove all ordering requirements in CSSValueKeywords.in Remove ordering requirement dependencies for all enums in CSSValueKeywords.in by removing the 'minus' operations that converted them and using explicit switch statements instead. This not only makes the code much clearer and easier to understand, but is future-proof and compatible with the upcoming change that makes all ComputedStyleConstants enums enum classes (and hence no numerical operations are possible). Conversion operations were found using these search queries: https://cs.chromium.org/search/?q=(%5B%5C%2B%5C-%5D%5Cs%2BCSSValue%5BA-Za-z0-9%5D%2B)%7C(CSSValue%5BA-Za-z0-9%5D%2B%5Cs%2B%5B%5C%2B%5C-%5D)&sq=package:chromium&type=cs https://cs.chromium.org/search/?q=(((%3C%3D?)%7C(%3E%3D?))%5Cs%2BCSSValue%5BA-Za-z0-9%5D%2B)%7C(CSSValue%5BA-Za-z0-9%5D%2B%5Cs%2B((%3C%3D?)%7C(%3E%3D?)))&sq=package:chromium&type=cs Also added some conversion functions independent of CSSPrimitiveValue, which is part of a longer-term goal to generate them and remove CSSPrimitiveValue from the equation. Also, since ComputedStyleConstants will eventually be generated, the verbosity of this patch is not a problem. :) BUG=665272

Patch Set 1 #

Patch Set 2 : Fixed other areas and added converter functions #

Patch Set 3 : Fixed small compile errors #

Patch Set 4 : Fixed extra areas pointed out by regex #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase and removed more places #

Patch Set 7 : Some mor efixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+939 lines, -215 lines) Patch
M third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h View 1 2 3 4 5 7 chunks +470 lines, -139 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSValueKeywords.in View 1 2 3 4 5 6 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/FontSize.h View 1 2 3 4 5 6 1 chunk +22 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/StyleColor.cpp View 1 2 3 4 5 2 chunks +106 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp View 1 2 3 4 5 13 chunks +137 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 4 5 6 9 chunks +170 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp View 1 2 3 4 5 1 chunk +11 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingStyle.cpp View 1 2 3 4 5 1 chunk +18 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyleConstants.h View 1 2 3 4 5 5 chunks +1 line, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/ThemeTypes.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 40 (28 generated)
sashab
:D
4 years, 2 months ago (2016-09-26 04:26:20 UTC) #4
sashab
alancutter@ for initial review, esprehn@ for OWNERs.
4 years, 2 months ago (2016-09-26 04:30:08 UTC) #6
esprehn
lgtm
4 years, 2 months ago (2016-09-28 03:54:44 UTC) #9
alancutter (OOO until 2018)
I'm in favour for this change (as it's on the path to generating ComputedStyleConstants) but ...
4 years, 2 months ago (2016-09-28 04:03:50 UTC) #10
sashab
Hey alan -- see new CL description and patch. Since elliott's already lgtmd the overall ...
4 years, 2 months ago (2016-09-29 00:06:58 UTC) #14
alancutter (OOO until 2018)
lgtm with "all" removed from the title since it doesn't mention ComputedStyleConstants.h.
4 years, 2 months ago (2016-09-29 03:02:17 UTC) #17
alancutter (OOO until 2018)
On 2016/09/29 at 03:02:17, alancutter wrote: > lgtm with "all" removed from the title since ...
4 years, 2 months ago (2016-09-29 05:40:53 UTC) #20
Timothy Loh
On 2016/09/29 05:40:53, alancutter wrote: > On 2016/09/29 at 03:02:17, alancutter wrote: > > lgtm ...
4 years, 2 months ago (2016-09-29 05:49:25 UTC) #21
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/2366243002/80001
4 years, 2 months ago (2016-10-05 00:31:46 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/211007) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 2 months ago (2016-10-05 00:45:51 UTC) #34
alancutter (OOO until 2018)
Looks like we still need to deal with inequality checks on CSSValueIDs. https://cs.chromium.org/search/?q=(((%3C%3D?)%7C(%3E%3D?))%5Cs%2BCSSValue%5BA-Za-z0-9%5D%2B)%7C(CSSValue%5BA-Za-z0-9%5D%2B%5Cs%2B((%3C%3D?)%7C(%3E%3D?)))&sq=package:chromium&type=cs timloh's suggestion ...
4 years, 2 months ago (2016-10-10 00:51:20 UTC) #35
sashab
4 years, 1 month ago (2016-11-15 02:38:49 UTC) #39
I did reorder the file randomly, and it caused more errors. I think I'm going to
break this patch up and land it in stages, this will also help make it clearer
where this error is occurring.

Powered by Google App Engine
This is Rietveld 408576698