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

Issue 2567473002: Made a generator for CSSPropertyDescriptor.cpp (Closed)

Created:
4 years ago by aazzam
Modified:
4 years ago
CC:
alancutter (OOO until 2018), darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, gozzard, rwlbuis, sashab
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Made a generator for CSSPropertyDescriptor.cpp Added a python file make_css_property_api.py and template file CSSPropertyDescriptor.cpp.tmpl to generate CSSPropertyDescriptor.cpp. This means that when we add new functions to our API, we only need to modify the template. Also, when we add new CSS properties, they only need to be added to the CSSProperties.in file. BUG=668012 Committed: https://crrev.com/6f1e7b703e16eaf40a18ba63fb8abdcc1b1d1e9f Cr-Commit-Position: refs/heads/master@{#438384}

Patch Set 1 #

Total comments: 21

Patch Set 2 : Fixed style and renamed file #

Patch Set 3 : removed accidental comment #

Total comments: 19

Patch Set 4 : Fixed comments #

Patch Set 5 : rebasing #

Patch Set 6 : changed method of grouping #

Patch Set 7 : fixed bug #

Total comments: 11

Patch Set 8 : renamed padding to webkitpadding #

Patch Set 9 : fixed some formatting #

Total comments: 6

Patch Set 10 : fixed some formatting #

Total comments: 2

Patch Set 11 : changed comments #

Patch Set 12 : format #

Total comments: 17

Patch Set 13 : fixed some formatting #

Total comments: 2

Patch Set 14 : format #

Total comments: 1

Patch Set 15 : moved comment outside of loop #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -129 lines) Patch
M third_party/WebKit/Source/build/scripts/css_properties.py View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +59 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +18 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.in View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +16 lines, -4 lines 0 comments Download
D third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPadding.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -26 lines 0 comments Download
D third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPadding.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -20 lines 0 comments Download
A + third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitPadding.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
A + third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitPadding.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.cpp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -50 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 46 (19 generated)
aazzam
Made a new CL with just the generator for CSSPropertyDescriptor.cpp without the .h files :)
4 years ago (2016-12-08 23:39:39 UTC) #2
sashab
Nice work Anna! Looking good :) https://codereview.chromium.org/2567473002/diff/1/third_party/WebKit/Source/build/scripts/css_properties.py File third_party/WebKit/Source/build/scripts/css_properties.py (right): https://codereview.chromium.org/2567473002/diff/1/third_party/WebKit/Source/build/scripts/css_properties.py#newcode31 third_party/WebKit/Source/build/scripts/css_properties.py:31: 'custom_value': False, Typo ...
4 years ago (2016-12-08 23:56:35 UTC) #3
aazzam
PTAL! :) https://codereview.chromium.org/2567473002/diff/1/third_party/WebKit/Source/build/scripts/css_properties.py File third_party/WebKit/Source/build/scripts/css_properties.py (right): https://codereview.chromium.org/2567473002/diff/1/third_party/WebKit/Source/build/scripts/css_properties.py#newcode31 third_party/WebKit/Source/build/scripts/css_properties.py:31: 'custom_value': False, On 2016/12/08 at 23:56:35, sashab ...
4 years ago (2016-12-09 00:44:39 UTC) #5
sashab
This is so nice now!! well done anna :) Lg*m only because this is another ...
4 years ago (2016-12-09 00:58:25 UTC) #6
aazzam
Hi Alan, please take a look at this generator CL :)
4 years ago (2016-12-09 01:01:38 UTC) #8
alancutter (OOO until 2018)
https://codereview.chromium.org/2567473002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode38 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:38: self._api_classnames = sorted(list(set(self._api_classnames))) No need for list(). https://codereview.chromium.org/2567473002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode49 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:49: ...
4 years ago (2016-12-12 00:00:07 UTC) #9
aazzam
PTAL :) https://codereview.chromium.org/2567473002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/40001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode38 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:38: self._api_classnames = sorted(list(set(self._api_classnames))) On 2016/12/12 at 00:00:04, ...
4 years ago (2016-12-12 04:05:41 UTC) #10
aazzam
PTAL alan :)
4 years ago (2016-12-13 02:44:59 UTC) #11
alancutter (OOO until 2018)
https://codereview.chromium.org/2567473002/diff/120001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/120001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode24 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:24: if property['api_class'] is not None: The indent level is ...
4 years ago (2016-12-13 03:29:54 UTC) #12
aazzam
PTAL :) https://codereview.chromium.org/2567473002/diff/120001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/120001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode24 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:24: if property['api_class'] is not None: On 2016/12/13 ...
4 years ago (2016-12-13 05:01:09 UTC) #13
alancutter (OOO until 2018)
lgtm after comments addressed. https://codereview.chromium.org/2567473002/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode27 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:27: properties_for_class[classname].append('CSSProperty' + property['upper_camel_name']) Use property['property_id'] ...
4 years ago (2016-12-13 05:55:34 UTC) #14
aazzam
https://codereview.chromium.org/2567473002/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode27 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:27: properties_for_class[classname].append('CSSProperty' + property['upper_camel_name']) On 2016/12/13 at 05:55:34, alancutter wrote: ...
4 years ago (2016-12-13 21:47:52 UTC) #15
aazzam
please take a look Gozz!
4 years ago (2016-12-13 22:27:16 UTC) #17
alancutter (OOO until 2018)
https://codereview.chromium.org/2567473002/diff/180001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl (right): https://codereview.chromium.org/2567473002/diff/180001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl#newcode24 third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl:24: // CSSPropertyAPI, also add them to the struct initaliser ...
4 years ago (2016-12-13 22:35:22 UTC) #19
gozzard
lgtm
4 years ago (2016-12-13 22:48:52 UTC) #20
aazzam
https://codereview.chromium.org/2567473002/diff/180001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl (right): https://codereview.chromium.org/2567473002/diff/180001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl#newcode24 third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl:24: // CSSPropertyAPI, also add them to the struct initaliser ...
4 years ago (2016-12-13 22:48:57 UTC) #21
aazzam
please take a look sasha! :)
4 years ago (2016-12-13 23:03:36 UTC) #23
sashab
Well done Anna, this is looking awesome! https://codereview.chromium.org/2567473002/diff/220001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/220001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode11 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:11: from collections ...
4 years ago (2016-12-13 23:10:38 UTC) #25
aazzam
PTAL :) https://codereview.chromium.org/2567473002/diff/220001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/220001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode11 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:11: from collections import namedtuple, defaultdict On 2016/12/13 ...
4 years ago (2016-12-13 23:27:53 UTC) #27
sashab
Yay this is so awesome! Nice work anna. LGTM https://codereview.chromium.org/2567473002/diff/240001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/240001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode46 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:46: ...
4 years ago (2016-12-13 23:32:32 UTC) #29
aazzam
https://codereview.chromium.org/2567473002/diff/240001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py File third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py (right): https://codereview.chromium.org/2567473002/diff/240001/third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py#newcode46 third_party/WebKit/Source/build/scripts/make_css_property_descriptor.py:46: self._api_classes.append(ApiClass(index=i + 1, classname=classname, property_ids=properties_for_class[classname])) On 2016/12/13 at 23:32:32, ...
4 years ago (2016-12-13 23:36:06 UTC) #33
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/2567473002/260001
4 years ago (2016-12-13 23:36:28 UTC) #34
alancutter (OOO until 2018)
https://codereview.chromium.org/2567473002/diff/260001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl (right): https://codereview.chromium.org/2567473002/diff/260001/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl#newcode23 third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl:23: // are added to CSSPropertyAPI, also add them to ...
4 years ago (2016-12-13 23:46:11 UTC) #36
aazzam
4 years ago (2016-12-13 23:52:16 UTC) #38
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/2567473002/280001
4 years ago (2016-12-13 23:53:04 UTC) #41
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years ago (2016-12-14 01:42:13 UTC) #44
commit-bot: I haz the power
4 years ago (2016-12-14 01:47:02 UTC) #46
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/6f1e7b703e16eaf40a18ba63fb8abdcc1b1d1e9f
Cr-Commit-Position: refs/heads/master@{#438384}

Powered by Google App Engine
This is Rietveld 408576698