|
|
DescriptionMade a generator for .h files for implementations of CSSPropertyAPI.h
Renamed make_css_property_descriptor.py to make_css_property_api.py and
modified it so that it also generates API .h files. Added the template
file CSSPropertyAPI.h.tmpl.
To generate the .h file for a property, add the api_class flag to the
property in CSSProperties.in.
BUG=668012
Committed: https://crrev.com/de5be95f7da7d464a16f1a1fa930bd4340063f94
Cr-Commit-Position: refs/heads/master@{#439053}
Patch Set 1 #
Total comments: 12
Patch Set 2 : renamed files and fixed comments #
Total comments: 1
Patch Set 3 : Removed TODO. #Patch Set 4 : Rebase #
Total comments: 1
Patch Set 5 : Changed build file #Patch Set 6 : Removed generated .h files from BUILD #
Messages
Total messages: 34 (20 generated)
aazzam@google.com changed reviewers: + sashab@chromium.org
I changed the generator so that it also generates .h files, please take a look sasha :)
Great work so far! Real improvement in comments & naming which I'm glad to see. Patch is also really well constructed, nice job Anna https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/build/scripts/make_css_property_api.py (right): https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/make_css_property_api.py:37: continue Small thing - in your CL description, avoid 'we', use recipe-style language instead 'To do X, do Y...' https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/make_css_property_api.py:38: classname = get_classname(property) Also this file - because it generates both, maybe: make_css_property_apis.py make_css_property_descriptors.py make_css_property_apis_and_descriptors.py Whatever makes more sense to you :) I think the first one is probably OK https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/make_css_property_api.py:40: self._outputs.update({classname + '.h': self.generate_property_api_h_builder(classname)}) You don't need .update - you can just set [key] = [value] :) https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/make_css_property_api.py:62: # which generates a new function pointer given the classname and property ids. Great comment, except one nit: 'function pointer' is not really the right word in Python since pointers don't exist lol ;) I'd say function object instead. Can probably shorten it a bit too - see if you can do that without losing meaning :) https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl (right): https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl:2: // Use of this source code is governed by a BSD-style license that can be CSSPropertyAPI.h.tmpl is probably a bit misleading since we already have a CSSPropertyAPI.h we might want to generate later ;) Maybe CSSPropertyAPIFiles.h.tmpl? Or CSSPropertyAPI.each.h.tmpl? We don't really have a style for this, maybe ask around for some ideas or come up with your own :) https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl:26: #endif // {{api_classname}}_h Oh my god this template is so awesome... *dies* I think this is actually *the* simplest template file we have lol https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWillChange.cpp (right): https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWillChange.cpp:9: #include "core/css/parser/CSSPropertyParser.h" Oh nice! By generating the file you found a bug. Haha :D
Description was changed from ========== Made a generator for .h files for implementations of CSSPropertyAPI.h Renamed make_css_property_descriptor.py to make_css_property_api.py and modified it so that it also generates API .h files. Added the template file CSSPropertyAPI.h.tmpl. When we want to generate the .h file for a property, we add the api_class flag to the property in CSSProperties.in. BUG=668012 ========== to ========== Made a generator for .h files for implementations of CSSPropertyAPI.h Renamed make_css_property_descriptor.py to make_css_property_api.py and modified it so that it also generates API .h files. Added the template file CSSPropertyAPI.h.tmpl. To generate the .h file for a property, add the api_class flag to the property in CSSProperties.in. BUG=668012 ==========
PTAL :) https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/build/scripts/make_css_property_api.py (right): https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/make_css_property_api.py:37: continue On 2016/12/15 at 02:48:42, sashab wrote: > Small thing - in your CL description, avoid 'we', use recipe-style language instead 'To do X, do Y...' done :) https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/make_css_property_api.py:38: classname = get_classname(property) On 2016/12/15 at 02:48:43, sashab wrote: > Also this file - because it generates both, maybe: > > make_css_property_apis.py > make_css_property_descriptors.py > make_css_property_apis_and_descriptors.py > > Whatever makes more sense to you :) I think the first one is probably OK I've gone with make_css_property_apis.py, sounds OK and is not too long :) https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/make_css_property_api.py:40: self._outputs.update({classname + '.h': self.generate_property_api_h_builder(classname)}) On 2016/12/15 at 02:48:43, sashab wrote: > You don't need .update - you can just set [key] = [value] :) done :) https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/make_css_property_api.py:62: # which generates a new function pointer given the classname and property ids. On 2016/12/15 at 02:48:42, sashab wrote: > Great comment, except one nit: 'function pointer' is not really the right word in Python since pointers don't exist lol ;) I'd say function object instead. > > Can probably shorten it a bit too - see if you can do that without losing meaning :) re-worded it, does this sound better? https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl (right): https://codereview.chromium.org/2578773002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl:2: // Use of this source code is governed by a BSD-style license that can be On 2016/12/15 at 02:48:43, sashab wrote: > CSSPropertyAPI.h.tmpl is probably a bit misleading since we already have a CSSPropertyAPI.h we might want to generate later ;) > > Maybe CSSPropertyAPIFiles.h.tmpl? Or CSSPropertyAPI.each.h.tmpl? We don't really have a style for this, maybe ask around for some ideas or come up with your own :) CSSPropertyAPIFiles.h.tmpl sounds good :)
sashab@chromium.org changed reviewers: + alancutter@chromium.org
Looks good so far, let's get alan to take a look and I'll do another review after :)
lgtm https://codereview.chromium.org/2578773002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPIFiles.h.tmpl (right): https://codereview.chromium.org/2578773002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPIFiles.h.tmpl:13: // TODO(aazzam): Generate API .h files Remove TODO.
Removed the TODO
The CQ bit was checked by aazzam@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from alancutter@chromium.org Link to the patchset: https://codereview.chromium.org/2578773002/#ps40001 (title: "Removed TODO.")
The CQ bit was unchecked by commit-bot@chromium.org
This CL has an open dependency (Issue 2564283003 Patch 120001). Please resolve the dependency and try again. If you are sure that there is no real dependency, please use one of the options listed in https://goo.gl/9Es4OR to land the CL.
Rebased, PTAL :)
Love it!! LGTM https://codereview.chromium.org/2578773002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_css_property_apis.py (right): https://codereview.chromium.org/2578773002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_css_property_apis.py:60: # This returned function generates a .h file for the specified property. \o/!
The CQ bit was checked by aazzam@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from alancutter@chromium.org Link to the patchset: https://codereview.chromium.org/2578773002/#ps60001 (title: "Rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by aazzam@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by aazzam@google.com to run a CQ dry run
The CQ bit was unchecked by aazzam@google.com
The CQ bit was checked by aazzam@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from sashab@chromium.org, alancutter@chromium.org Link to the patchset: https://codereview.chromium.org/2578773002/#ps100001 (title: "Removed generated .h files from BUILD")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 100001, "attempt_start_ts": 1481859082904690, "parent_rev": "55193785ad5c2b79504e1194132f8319900e1cb3", "commit_rev": "1e46b78ad70b159a6ff4356d796daa1d1112f184"}
Message was sent while issue was closed.
Description was changed from ========== Made a generator for .h files for implementations of CSSPropertyAPI.h Renamed make_css_property_descriptor.py to make_css_property_api.py and modified it so that it also generates API .h files. Added the template file CSSPropertyAPI.h.tmpl. To generate the .h file for a property, add the api_class flag to the property in CSSProperties.in. BUG=668012 ========== to ========== Made a generator for .h files for implementations of CSSPropertyAPI.h Renamed make_css_property_descriptor.py to make_css_property_api.py and modified it so that it also generates API .h files. Added the template file CSSPropertyAPI.h.tmpl. To generate the .h file for a property, add the api_class flag to the property in CSSProperties.in. BUG=668012 Review-Url: https://codereview.chromium.org/2578773002 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Made a generator for .h files for implementations of CSSPropertyAPI.h Renamed make_css_property_descriptor.py to make_css_property_api.py and modified it so that it also generates API .h files. Added the template file CSSPropertyAPI.h.tmpl. To generate the .h file for a property, add the api_class flag to the property in CSSProperties.in. BUG=668012 Review-Url: https://codereview.chromium.org/2578773002 ========== to ========== Made a generator for .h files for implementations of CSSPropertyAPI.h Renamed make_css_property_descriptor.py to make_css_property_api.py and modified it so that it also generates API .h files. Added the template file CSSPropertyAPI.h.tmpl. To generate the .h file for a property, add the api_class flag to the property in CSSProperties.in. BUG=668012 Committed: https://crrev.com/de5be95f7da7d464a16f1a1fa930bd4340063f94 Cr-Commit-Position: refs/heads/master@{#439053} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/de5be95f7da7d464a16f1a1fa930bd4340063f94 Cr-Commit-Position: refs/heads/master@{#439053} |