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

Issue 2742263002: Add 'storage_only' template to make_computed_style_base.py. (Closed)

Created:
3 years, 9 months ago by shend
Modified:
3 years, 9 months ago
Reviewers:
meade_UTC10, sashab
CC:
blink-reviews, blink-reviews-style_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add 'storage_only' template to make_computed_style_base.py. As part of generating ComputedStyle, we would like to move all fields to from ComputedStyle to ComputedStyleBase. Currently there are several fields which remain in ComputedStyle because their interfaces are difficult to generate. The problem is that the current state of ComputedStyle is undesirable. For example, the fact that some fields are in ComputedStyle and some are in ComputedStyleBase can increase memory usage. Although we would like to generate the interfaces for those fields properly, this will take a long time. So trying to generate the interfaces for the remaining fields may block progress. This patch introduces the 'storage_only' field template, which only generates the storage part of the field. This allows us to move the remaining fields to ComputedStyleBase and have handwritten interfaces. This is temporary. We would like to eventually replace 'storage_only' with proper templates that generate actual interfaces. But for the time being, moving all the storage to ComputedStyleBase first is a priority. To test this, we move the storage of 'm_emptyState' to be generated in ComputedStyleBase, but keeping the handwritten interface in ComputedStyle. This property is hard to generate because it has custom logic in its setter. BUG=628043 Review-Url: https://codereview.chromium.org/2742263002 Cr-Commit-Position: refs/heads/master@{#458193} Committed: https://chromium.googlesource.com/chromium/src/+/2b588924dbe2205d5f52f4cb453d8d2dc20afb0b

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase #

Patch Set 3 : Address comments #

Patch Set 4 : Rebase #

Patch Set 5 : Add missing file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -6 lines) Patch
M third_party/WebKit/Source/build/scripts/make_computed_style_base.py View 1 2 3 2 chunks +13 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
A third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (15 generated)
shend
Hi Sasha, PTAL
3 years, 9 months ago (2017-03-13 06:38:56 UTC) #2
sashab
Specific thoughts on this patch inline. Generally, I'm wary of patches like this because they ...
3 years, 9 months ago (2017-03-13 07:57:12 UTC) #3
shend
Moved sashab to cc. Eddy, PTAL :) https://codereview.chromium.org/2742263002/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/2742263002/diff/1/third_party/WebKit/Source/build/scripts/make_computed_style_base.py#newcode30 third_party/WebKit/Source/build/scripts/make_computed_style_base.py:30: {'name': 'emptyState', ...
3 years, 9 months ago (2017-03-14 22:20:06 UTC) #5
meade_UTC10
lgtm once you address the comments on the parent CL
3 years, 9 months ago (2017-03-15 06:26:33 UTC) #6
shend
3 years, 9 months ago (2017-03-15 23:40:28 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/2742263002/80001
3 years, 9 months ago (2017-03-20 21:15:57 UTC) #19
commit-bot: I haz the power
3 years, 9 months ago (2017-03-20 21:29:10 UTC) #22
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/2b588924dbe2205d5f52f4cb453d...

Powered by Google App Engine
This is Rietveld 408576698