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

Issue 2669243009: Added CSSPropertyAPIMethods.json5 which defines all API methods. (Closed)

Created:
3 years, 10 months ago by aazzam
Modified:
3 years, 7 months ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added CSSPropertyAPIMethods.json5 which defines all API methods. Adds CSSPropertyAPIMethods.json5, which defines all methods in CSSPropertyAPI.h. Methods are defined by name and function definition. This is so that when methods are added to the API, their definitions only need to be added in this file, rather than several places in the code. This patch: - Adds the CSSPropertyAPIMethods.json5 file. - Changes make_css_property_apis.py so that it can take two files as input (CSSProperties.json5 and CSSPropertyAPIMethods.json5). - Modifies the CSSPropertyAPIFiles.h.tmpl template to take this as input, so that it doesn't need to be modified whenever methods are added to the API. - Modifies CSSPropertyDescriptor.cpp.tmpl to take this as input. BUG=668012

Patch Set 1 #

Patch Set 2 : added all files #

Patch Set 3 : Made dependent on CL to make _properties public #

Patch Set 4 : Added comment #

Total comments: 9

Patch Set 5 : changed storing of api_methods #

Patch Set 6 : changed storing of api methods #

Total comments: 6

Patch Set 7 : renames and formatting #

Total comments: 9

Patch Set 8 : changed the params of the methods json file #

Patch Set 9 : removed accidental comma #

Total comments: 4

Patch Set 10 : added comments, renamed variables #

Total comments: 1

Patch Set 11 : added comment #

Patch Set 12 : rebase #

Patch Set 13 : rebase #

Patch Set 14 : testing changing template for scripts #

Patch Set 15 : changed to inherit from make_style_builder #

Total comments: 4

Patch Set 16 : changed to make_style_builder #

Patch Set 17 : moved code around #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -36 lines) Patch
M third_party/WebKit/Source/build/scripts/make_css_property_apis.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +37 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/scripts.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPIFiles.h.tmpl View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 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 13 14 15 16 1 chunk +11 lines, -8 lines 0 comments Download
A third_party/WebKit/Source/core/css/properties/CSSPropertyAPIMethods.json5 View 1 2 3 4 5 6 7 8 9 1 chunk +39 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyDescriptor.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 48 (35 generated)
aazzam
ptal sasha! :)
3 years, 10 months ago (2017-02-08 03:02:34 UTC) #4
sashab
https://codereview.chromium.org/2669243009/diff/60001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py File third_party/WebKit/Source/build/scripts/make_css_property_apis.py (right): https://codereview.chromium.org/2669243009/diff/60001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py#newcode32 third_party/WebKit/Source/build/scripts/make_css_property_apis.py:32: self.css_properties = CSSProperties([json5_file_paths.pop(0)]) CSSProperties -> StyleBuilderWriter https://codereview.chromium.org/2669243009/diff/60001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py#newcode33 third_party/WebKit/Source/build/scripts/make_css_property_apis.py:33: self.css_property_api_methods ...
3 years, 10 months ago (2017-02-08 04:00:03 UTC) #9
aazzam
ptal sasha :)
3 years, 10 months ago (2017-02-09 04:20:29 UTC) #10
sashab
https://codereview.chromium.org/2669243009/diff/100001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py File third_party/WebKit/Source/build/scripts/make_css_property_apis.py (right): https://codereview.chromium.org/2669243009/diff/100001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py#newcode48 third_party/WebKit/Source/build/scripts/make_css_property_apis.py:48: # Stores an ORDERED list of all API method ...
3 years, 10 months ago (2017-02-09 04:36:28 UTC) #11
aazzam
fixed changes, ptal sasha :)
3 years, 10 months ago (2017-02-09 04:44:37 UTC) #12
sashab
3 years, 10 months ago (2017-02-09 04:47:09 UTC) #14
sashab
https://codereview.chromium.org/2669243009/diff/120001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py File third_party/WebKit/Source/build/scripts/make_css_property_apis.py (right): https://codereview.chromium.org/2669243009/diff/120001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py#newcode33 third_party/WebKit/Source/build/scripts/make_css_property_apis.py:33: self.css_property_api_methods = Json5File.load_from_files([json5_file_paths[1]], {}, {}) #TODO(azzaam): Move the logic ...
3 years, 10 months ago (2017-02-09 04:57:51 UTC) #15
aazzam
ptal sasha :) https://codereview.chromium.org/2669243009/diff/120001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py File third_party/WebKit/Source/build/scripts/make_css_property_apis.py (right): https://codereview.chromium.org/2669243009/diff/120001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py#newcode33 third_party/WebKit/Source/build/scripts/make_css_property_apis.py:33: self.css_property_api_methods = Json5File.load_from_files([json5_file_paths[1]], {}, {}) On ...
3 years, 10 months ago (2017-02-09 23:10:12 UTC) #16
sashab
https://codereview.chromium.org/2669243009/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py File third_party/WebKit/Source/build/scripts/make_css_property_apis.py (right): https://codereview.chromium.org/2669243009/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py#newcode30 third_party/WebKit/Source/build/scripts/make_css_property_apis.py:30: #TODO(aazzam): Move the logic for loading CSSPropertyAPIMethods.json5 into a ...
3 years, 10 months ago (2017-02-10 00:58:34 UTC) #17
sashab
lgtm https://codereview.chromium.org/2669243009/diff/180001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py File third_party/WebKit/Source/build/scripts/make_css_property_apis.py (right): https://codereview.chromium.org/2669243009/diff/180001/third_party/WebKit/Source/build/scripts/make_css_property_apis.py#newcode62 third_party/WebKit/Source/build/scripts/make_css_property_apis.py:62: self.methods_for_classes[classname] += property['api_methods'] Add comment above here: # ...
3 years, 10 months ago (2017-02-10 01:12:43 UTC) #18
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/2669243009/200001
3 years, 10 months ago (2017-02-10 01:14:57 UTC) #21
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/279784)
3 years, 10 months ago (2017-02-10 01:33:24 UTC) #23
sashab
3 years, 10 months ago (2017-02-10 05:47:17 UTC) #40
https://codereview.chromium.org/2669243009/diff/280001/third_party/WebKit/Sou...
File third_party/WebKit/Source/build/scripts/scripts.gni (right):

https://codereview.chromium.org/2669243009/diff/280001/third_party/WebKit/Sou...
third_party/WebKit/Source/build/scripts/scripts.gni:29:
make_css_property_api_files = [
Not needed :)

https://codereview.chromium.org/2669243009/diff/280001/third_party/WebKit/Sou...
third_party/WebKit/Source/build/scripts/scripts.gni:145: if
(defined(invoker.in_files)) {
Might not need this if we do += below :)

https://codereview.chromium.org/2669243009/diff/280001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/BUILD.gn (right):

https://codereview.chromium.org/2669243009/diff/280001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/BUILD.gn:480:
css_properties("make_core_generated_css_property_apis") {
Move back up to where it was before in BUILD.gn

https://codereview.chromium.org/2669243009/diff/280001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/BUILD.gn:486: in_files = [
in_files += instead?

Powered by Google App Engine
This is Rietveld 408576698