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

Issue 2900253002: Split has_custom_compare_and_copy in ComputedStyleExtraFields.json5. (Closed)

Created:
3 years, 6 months ago by shend
Modified:
3 years, 6 months ago
Reviewers:
nainar, rune
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

Split has_custom_compare_and_copy in ComputedStyleExtraFields.json5. There are some fields in ComputedStyleBase that do not appear in CopyNonInheritedFromCached and NonInheritedEqual. The way we prevented these fields from being generated in these functions is through a parameter called has_custom_compare_and_copy in ComputedStyleExtraFields .json5. When it is true, we do not generate code for these fields inside those functions. However, some fields, such as HasViewportUnits, do not appear in NonInheritedEqual but appear in CopyNonInheritedFromCached, or vice versa. Setting has_custom_compare_and_copy to true would've removed generated code for both functions, which is not ideal. This patch splits has_custom_compare_and_copy into custom_copy and custom_compare. This allows a field to have no generated compare or copy, or have neither. This patch also sets the fields HasViewportUnits and HasRemUnits to have generated copy but not compare, allowing us to remove the corresponding handwritten code in ComputedStyle. Diff of generated files: https://gist.github.com/darrnshn/2dcf377d46be349720616e66f4bec1a4/revisions BUG=628043 Review-Url: https://codereview.chromium.org/2900253002 Cr-Commit-Position: refs/heads/master@{#475289} Committed: https://chromium.googlesource.com/chromium/src/+/9453f30a545c2125da8fc2aac5aa9b329c6fe438

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -36 lines) Patch
M third_party/WebKit/Source/build/scripts/make_computed_style_base.py View 1 5 chunks +10 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5 View 1 8 chunks +35 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 36 (29 generated)
shend
Hi Naina, PTAL
3 years, 6 months ago (2017-05-24 01:52:53 UTC) #6
nainar
lgtm
3 years, 6 months ago (2017-05-24 06:10:56 UTC) #7
shend
Hi Eddy, PTAL
3 years, 6 months ago (2017-05-24 06:17:14 UTC) #9
rune
lgtm
3 years, 6 months ago (2017-05-24 06:29:19 UTC) #11
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/2900253002/20001
3 years, 6 months ago (2017-05-29 00:15:42 UTC) #25
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/2900253002/40001
3 years, 6 months ago (2017-05-29 05:03:04 UTC) #33
commit-bot: I haz the power
3 years, 6 months ago (2017-05-29 05:07:14 UTC) #36
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/9453f30a545c2125da8fc2aac5aa...

Powered by Google App Engine
This is Rietveld 408576698