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

Issue 1910263003: Generate CSSPropertyEquality instead of using hand-updated file.

Created:
4 years, 8 months ago by ikilpatrick
Modified:
4 years, 7 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-css, blink-reviews-platform-graphics_chromium.org, blink-reviews-style_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, Eric Willigers, f(malita), jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[WIP] Generate CSSPropertyEquality instead of using hand-updated file. This patch generates CSSPropertyEquality::propertiesEqual based off CSSProperties.in. It uses existing flags on CSSProperties.in to decide if the equality check can be auto generated, (i.e. 'svg'). If not it produces a header stub on CSSPropertyEqualityCustom.h which can be implemented by hand in CSSPropertyEqualityCustom.cpp BUG=

Patch Set 1 #

Patch Set 2 : . #

Total comments: 10

Patch Set 3 : checkpoint. #

Patch Set 4 : tests! #

Patch Set 5 : tests2! #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+821 lines, -370 lines) Patch
A third_party/WebKit/LayoutTests/fast/css/property-equality.html View 1 2 3 4 1 chunk +98 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/css_properties.py View 1 2 2 chunks +4 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/build/scripts/make_css_property_equality.py View 1 chunk +56 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/build/scripts/templates/CSSPropertyEquality.cpp.tmpl View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/build/scripts/templates/CSSPropertyEqualityCustom.h.tmpl View 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 chunks +18 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/core_generated.gyp View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core_generated.gypi View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.in View 1 2 4 chunks +28 lines, -28 lines 1 comment Download
D third_party/WebKit/Source/core/css/CSSPropertyEquality.cpp View 1 2 1 chunk +0 lines, -341 lines 0 comments Download
A third_party/WebKit/Source/core/css/CSSPropertyEqualityCustom.cpp View 1 2 3 1 chunk +477 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 2 chunks +15 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/style/DataEquivalency.h View 1 2 1 chunk +5 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/testing/Internals.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.cpp View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.idl View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontDescription.h View 1 2 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
ikilpatrick
Alan, could you take an initial look at this? This isn't ready to submit, but ...
4 years, 7 months ago (2016-04-27 00:32:17 UTC) #3
alancutter (OOO until 2018)
Sorry for the late review. This looks reasonable to me! https://codereview.chromium.org/1910263003/diff/20001/third_party/WebKit/Source/core/css/CSSPropertyEqualityCustom.cpp File third_party/WebKit/Source/core/css/CSSPropertyEqualityCustom.cpp (right): https://codereview.chromium.org/1910263003/diff/20001/third_party/WebKit/Source/core/css/CSSPropertyEqualityCustom.cpp#newcode93 ...
4 years, 7 months ago (2016-05-02 02:55:40 UTC) #4
ikilpatrick
Sorry for the delay here Alan, CSS F2F + other things came up. :) +timloh ...
4 years, 7 months ago (2016-05-24 00:16:16 UTC) #6
Timothy Loh
Can we start by doing what's just enough for the properties currently supported for transitions? ...
4 years, 7 months ago (2016-05-24 04:38:20 UTC) #7
Timothy Loh
4 years, 7 months ago (2016-05-24 05:38:35 UTC) #8
Patch notes needs some more context as to why we're doing this.

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/build/scripts/css_properties.py (right):

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/build/scripts/css_properties.py:19: 'animation':
False,
I'm not really a fan of having these as arguments in the .in file as they don't
seem to add anything over what's already in the property name.

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/build/scripts/make_css_property_equality.py
(right):

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/build/scripts/make_css_property_equality.py:29:
upper_camel = property['upper_camel_name']
probably any of the stuff copied from other files should just move up into
css_properties.py

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/css/CSSProperties.in (right):

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/css/CSSProperties.in:79: // custom_all is
equivalent to setting the other three flags
worth mentioning here?

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/css/CSSPropertyEqualityCustom.cpp (right):

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/css/CSSPropertyEqualityCustom.cpp:23: switch
(property) {
Maybe it's nicer to pass a getter as the template argument instead of a
property?

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/style/ComputedStyle.h (right):

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/style/ComputedStyle.h:135: friend class
CSSPropertyEqualityCustom; // Used by CSS animations. We can't allow them to
animate based off visited colors.
do we need to friend both of these?

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/style/DataEquivalency.h (right):

https://codereview.chromium.org/1910263003/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/style/DataEquivalency.h:53: bool
dataEquivalent(const T a, const T b)
const T&?

Powered by Google App Engine
This is Rietveld 408576698