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

Issue 2938553002: Refactor make_computed_style_base.py Field class to link to a Group. (Closed)

Created:
3 years, 6 months ago by shend
Modified:
3 years, 6 months ago
Reviewers:
nainar
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor make_computed_style_base.py Field class to link to a Group. In make_computed_style_base.py: - A field should know what Group it's in. - A group should know what fields it has. However, there is a circular dependency here. Previously, this has been resolved by storing duplicate Group information in Field, so that we can retrieve the necessary group information from Field, but not the actual Group instance. As we store more information on Groups, more duplicate information need to be stored in Field, which makes this current solution ugly. A better approach would be to store a reference to the actual Group instance in Field. This patch makes it so that when we create a Group with a set of fields, we link the corresponding fields back to the Group. This patch doesn't change behaviour nor generated code. BUG=628043 Review-Url: https://codereview.chromium.org/2938553002 Cr-Commit-Position: refs/heads/master@{#478920} Committed: https://chromium.googlesource.com/chromium/src/+/f88c5b041d56422d91ee46d144833efa3d152f42

Patch Set 1 #

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -34 lines) Patch
M third_party/WebKit/Source/build/scripts/make_computed_style_base.py View 1 11 chunks +21 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl View 2 chunks +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (13 generated)
shend
Hi Naina, PTAL. Sorry for the bad CL description, I think reading the code would ...
3 years, 6 months ago (2017-06-13 00:16:54 UTC) #4
nainar
lgtm
3 years, 6 months ago (2017-06-13 07:11:32 UTC) #12
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/2938553002/20001
3 years, 6 months ago (2017-06-13 07:13:19 UTC) #14
commit-bot: I haz the power
3 years, 6 months ago (2017-06-13 07:17:23 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/f88c5b041d56422d91ee46d14483...

Powered by Google App Engine
This is Rietveld 408576698