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

Issue 2669973002: Support generating enums shared by multiple ComputedStyle fields. (Closed)

Created:
3 years, 10 months ago by shend
Modified:
3 years, 10 months ago
Reviewers:
sashab, Bugs Nash
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support generating enums shared by multiple ComputedStyle fields. When we generate fields in ComputedStyleBase, we generate both a new enum type and a corresponding member variable with that type. So every generated enum can only have one corresponding member. Unfortunately, there are some enums (like EOverflow) that are shared by several members. The current solution is to explicitly specify the type_name flag, which allows multiple fields to have the same enum type name. However, the script currently will break if there's two fields with the same name but different keywords. This patch prevents such name conflicts by checking that enums with the same name have the exact same keywords. This is prework for generating the overflow-x and overflow-y fields in ComputedStyle. BUG=628043 Review-Url: https://codereview.chromium.org/2669973002 Cr-Commit-Position: refs/heads/master@{#448926} Committed: https://chromium.googlesource.com/chromium/src/+/b66eb61f525f914b1b478b56e7b4792db7b4c4e5

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -0 lines) Patch
M third_party/WebKit/Source/build/scripts/make_computed_style_base.py View 1 1 chunk +8 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 14 (7 generated)
shend
Hi Bugs, PTAL
3 years, 10 months ago (2017-02-02 03:14:23 UTC) #3
Bugs Nash
lgtm
3 years, 10 months ago (2017-02-03 23:16:14 UTC) #4
shend
Hi Sasha, PTAL
3 years, 10 months ago (2017-02-06 00:36:39 UTC) #6
sashab
Great CL description. Love that this functionality is already implemented and we just need the ...
3 years, 10 months ago (2017-02-07 02:59:27 UTC) #7
shend
https://codereview.chromium.org/2669973002/diff/1/third_party/WebKit/Source/build/scripts/make_computed_style_base.py File third_party/WebKit/Source/build/scripts/make_computed_style_base.py (right): https://codereview.chromium.org/2669973002/diff/1/third_party/WebKit/Source/build/scripts/make_computed_style_base.py#newcode95 third_party/WebKit/Source/build/scripts/make_computed_style_base.py:95: ("'{}' can't have type_name '{}' ".format(property_['name'], enum_name) + On ...
3 years, 10 months ago (2017-02-07 21:44:02 UTC) #8
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/2669973002/20001
3 years, 10 months ago (2017-02-08 05:27:39 UTC) #11
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 07:03:00 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/b66eb61f525f914b1b478b56e7b4...

Powered by Google App Engine
This is Rietveld 408576698