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

Issue 2879563002: Refactor code generation to allow us to diff generic expressions and not just fields (Closed)

Created:
3 years, 7 months ago by nainar
Modified:
3 years, 7 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor code generation to allow us to diff generic expressions and not just fields This patch refactors the diffing generator code to allow us to diff field getters and other expressions instead of just fields themselves in the future. It does so by creating a tree of groups to diff (DiffGroups) that store the subgroups to diff as well as the expressions to diff. For now the expressions are just the field accessors. In the future, they will contain expressions like BorderLeftWidth() - a public getter for border-left-width, and HasTransform() - which is not a field or its getter. Diff: https://gist.github.com/d14529581f729e810842254cbf7dc1f5/revisions BUG=710938 Review-Url: https://codereview.chromium.org/2879563002 Cr-Commit-Position: refs/heads/master@{#471666} Committed: https://chromium.googlesource.com/chromium/src/+/0066ff300549155904a9d1708488fc617f705404

Patch Set 1 #

Total comments: 12

Patch Set 2 : shend@'s changes #

Total comments: 10

Patch Set 3 : shend@'s suggestions #

Total comments: 6

Patch Set 4 : alancutter@'s suggestions #

Patch Set 5 : Formatting #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -27 lines) Patch
M third_party/WebKit/Source/build/scripts/make_computed_style_base.py View 1 2 3 5 chunks +40 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl View 1 2 3 4 1 chunk +4 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl View 1 2 3 1 chunk +7 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
A third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 43 (30 generated)
nainar
PTAL? https://codereview.chromium.org/2879563002/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 (left): https://codereview.chromium.org/2879563002/diff/1/third_party/WebKit/Source/build/scripts/make_computed_style_base.py#oldcode54 third_party/WebKit/Source/build/scripts/make_computed_style_base.py:54: oops. Added this in.
3 years, 7 months ago (2017-05-11 04:04:09 UTC) #4
shend
Awesome. Some comments about moving the recursion up one level to simplify the code. https://codereview.chromium.org/2879563002/diff/1/third_party/WebKit/Source/build/scripts/make_computed_style_base.py ...
3 years, 7 months ago (2017-05-11 05:00:59 UTC) #5
nainar
made the changes you asked for. PTAL? https://codereview.chromium.org/2879563002/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 (left): https://codereview.chromium.org/2879563002/diff/1/third_party/WebKit/Source/build/scripts/make_computed_style_base.py#oldcode54 third_party/WebKit/Source/build/scripts/make_computed_style_base.py:54: Removed. https://codereview.chromium.org/2879563002/diff/1/third_party/WebKit/Source/build/scripts/make_computed_style_base.py ...
3 years, 7 months ago (2017-05-11 06:00:08 UTC) #7
shend
fantastic, thanks. Just one more suggestion. https://codereview.chromium.org/2879563002/diff/20001/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/2879563002/diff/20001/third_party/WebKit/Source/build/scripts/make_computed_style_base.py#newcode156 third_party/WebKit/Source/build/scripts/make_computed_style_base.py:156: self.getter_expression = self.group_name ...
3 years, 7 months ago (2017-05-11 06:11:27 UTC) #9
nainar
Made the changes you asked for, PTAL? Thanks! https://codereview.chromium.org/2879563002/diff/20001/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/2879563002/diff/20001/third_party/WebKit/Source/build/scripts/make_computed_style_base.py#newcode156 third_party/WebKit/Source/build/scripts/make_computed_style_base.py:156: self.getter_expression ...
3 years, 7 months ago (2017-05-11 06:32:38 UTC) #11
shend
lgtm
3 years, 7 months ago (2017-05-11 07:04:49 UTC) #13
nainar
@alancutter for OWNERS, PTAL? Thanks!
3 years, 7 months ago (2017-05-11 07:05:35 UTC) #15
alancutter (OOO until 2018)
https://codereview.chromium.org/2879563002/diff/40001/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/2879563002/diff/40001/third_party/WebKit/Source/build/scripts/make_computed_style_base.py#newcode89 third_party/WebKit/Source/build/scripts/make_computed_style_base.py:89: Two newlines between class definitions. https://codereview.chromium.org/2879563002/diff/40001/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl File third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl (right): ...
3 years, 7 months ago (2017-05-12 04:04:51 UTC) #18
nainar
alancutter@, PTAL? Thanks! https://codereview.chromium.org/2879563002/diff/40001/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/2879563002/diff/40001/third_party/WebKit/Source/build/scripts/make_computed_style_base.py#newcode89 third_party/WebKit/Source/build/scripts/make_computed_style_base.py:89: Done. https://codereview.chromium.org/2879563002/diff/40001/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl File third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl (right): https://codereview.chromium.org/2879563002/diff/40001/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl#newcode90 ...
3 years, 7 months ago (2017-05-12 05:05:36 UTC) #21
alancutter (OOO until 2018)
lgtm
3 years, 7 months ago (2017-05-12 05:10:02 UTC) #22
commit-bot: I haz the power
This CL has an open dependency (Issue 2875233002 Patch 20001). Please resolve the dependency and ...
3 years, 7 months ago (2017-05-12 05:10:59 UTC) #27
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/2879563002/80001
3 years, 7 months ago (2017-05-15 04:19:53 UTC) #40
commit-bot: I haz the power
3 years, 7 months ago (2017-05-15 04:28:28 UTC) #43
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/0066ff300549155904a9d1708488...

Powered by Google App Engine
This is Rietveld 408576698