New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature

Blocked on:
issue 684966
issue 665272
issue 686585
issue 689330
issue 710938


Show other hotlists

Hotlists containing this issue:
style-dev-current


Sign in to add a comment

Clean up and/or generate ComputedStyle

Project Member Reported by sashab@chromium.org, Jul 13 2016

Issue description

The ComputedStyle object provides an interface between style and the rest of the Blink engine. Right now it is a confusing mess of logic and data, with methods organized in an way that made sense 10 years ago when properties were few and WebKit supported multiple browsers but is no longer useful for developers. The current design makes it hard to reason about improvements to ComputedStyle and makes it easy to make mistakes since code and logic duplication is high. This is frustrating for developers and slows down innovation to our engine.

Cleaning up ComputedStyle involves a few ideas:
 1. Renaming methods and fields to conform to Blink's style guidelines
 2. Moving towards a property-centric design, with getters/setters sorted and organised by property
 3. Moving as much property logic out of ComputedStyle as possible, leaving just a highly-optimized container
 4. Finding a way to make ComputedStyle generic and generating field storage at compile or runtime
 5. Thinking of ways to optimize ComputedStyle for memory and inherited changes, e.g.:
    (a) Packing fields better
    (b) Data-driven field layout in memory (less pointer hops for more frequently accessed data, even a live cache)
    (c) Re-thinking style sharing to share pieces of ComputedStyle
    (d) Rather than storing the whole style, storing only diffs from a parent/ancestor element
    (e) Storing pointers to expressions as well as resolved values
    (f) Storing pointers to where a property was inherited from
    (g) Store the layout-dependent properties (for example) separately to the other properties
    (h) etc.

As a parallel goal, we should also aim to make ComputedStyle const after style resolution.

Other than 5, these should be mostly mechanical changes that make it easier to analyze and reason about ComputedStyle and pave the way to more complex optimizations and improvements.

Design doc: https://docs.google.com/document/d/1LcH2GAI_0_c4MtBUjYqcokQASXne-DFDy4fZ3Apy25I/edit#
 
Showing comments 249 - 348 of 348 Older
Project Member

Comment 249 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/67dc05043dfa234b336708114248949e601be0e3

commit 67dc05043dfa234b336708114248949e601be0e3
Author: shend <shend@chromium.org>
Date: Tue May 30 06:11:44 2017

Remove unused overflow-wrap getters/setters.

This patch removes unused getters/setters for overflow-wrap in
ComputedStyle.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2912883002
Cr-Commit-Position: refs/heads/master@{#475437}

[modify] https://crrev.com/67dc05043dfa234b336708114248949e601be0e3/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 250 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cc3ce27bea5c64c7f049adf2b6c378a5b0009242

commit cc3ce27bea5c64c7f049adf2b6c378a5b0009242
Author: shend <shend@chromium.org>
Date: Tue May 30 06:33:49 2017

Remove unused speak getters/setters in ComputedStyle.

This patch removes unused getters/setters for speak in
ComputedStyle.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2915493003
Cr-Commit-Position: refs/heads/master@{#475443}

[modify] https://crrev.com/cc3ce27bea5c64c7f049adf2b6c378a5b0009242/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 251 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e6fa9ad53a68ce6204ade3cb16b0d8cf7090858a

commit e6fa9ad53a68ce6204ade3cb16b0d8cf7090858a
Author: shend <shend@chromium.org>
Date: Tue May 30 07:05:37 2017

Make StyleRareNonInheritedData::draggable_regions a bit field.

This patch changes the enum field draggable_regions in
StyleRareNonInheritedData a bit field so that it can be generated as
a keyword field.

The field is stored as an unsigned so that it can pack efficiently
on Windows.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2912673002
Cr-Commit-Position: refs/heads/master@{#475448}

[modify] https://crrev.com/e6fa9ad53a68ce6204ade3cb16b0d8cf7090858a/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/e6fa9ad53a68ce6204ade3cb16b0d8cf7090858a/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp
[modify] https://crrev.com/e6fa9ad53a68ce6204ade3cb16b0d8cf7090858a/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h

Project Member

Comment 252 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06c4e174ed940045202174b231ff02225088395d

commit 06c4e174ed940045202174b231ff02225088395d
Author: shend <shend@chromium.org>
Date: Tue May 30 07:15:55 2017

Remove unused word-break getters/setters.

This patch removes unused getters/setters for word-break in
ComputedStyle.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2910113003
Cr-Commit-Position: refs/heads/master@{#475450}

[modify] https://crrev.com/06c4e174ed940045202174b231ff02225088395d/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 253 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fe4dab40075a213e695cd2a3a503356c2e6e8333

commit fe4dab40075a213e695cd2a3a503356c2e6e8333
Author: nainar <nainar@chromium.org>
Date: Tue May 30 08:14:45 2017

Generate getters/setters for text-stroke-width.

Currently, the text-stroke-width property is a 'storage_only' field, so
it has no generated public getters/setters. This patch changes it to an
'primitive' field so that its getters/setters can be generated as well.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2907343002
Cr-Commit-Position: refs/heads/master@{#475461}

[modify] https://crrev.com/fe4dab40075a213e695cd2a3a503356c2e6e8333/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/fe4dab40075a213e695cd2a3a503356c2e6e8333/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 254 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4026e4cc7c9a518e6153065cb0b19d8f1b288c0

commit a4026e4cc7c9a518e6153065cb0b19d8f1b288c0
Author: shend <shend@chromium.org>
Date: Tue May 30 08:23:11 2017

Remove unused text-security getters/setters.

This patch removes unused getters/setters for text-security in
ComputedStyle.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2913713002
Cr-Commit-Position: refs/heads/master@{#475464}

[modify] https://crrev.com/a4026e4cc7c9a518e6153065cb0b19d8f1b288c0/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 255 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dbe5728de7fe5209b8590934f52af68c619a1cd1

commit dbe5728de7fe5209b8590934f52af68c619a1cd1
Author: nainar <nainar@chromium.org>
Date: Tue May 30 08:36:17 2017

Generate getters/setters for TapHighlightColor.

Currently, the TapHighlightColor property is a 'storage_only' field, so
it has no generated public getters/setters. This patch changes it to an
'external' field so that its getters/setters can be generated as well.

Diff: https://gist.github.com/nainar/7b476927a266bee61d682c2dc0527ed2/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2915533002
Cr-Commit-Position: refs/heads/master@{#475466}

[modify] https://crrev.com/dbe5728de7fe5209b8590934f52af68c619a1cd1/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/dbe5728de7fe5209b8590934f52af68c619a1cd1/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/dbe5728de7fe5209b8590934f52af68c619a1cd1/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 256 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36d3ee32727627fb3bde2990eb43de8c85879183

commit 36d3ee32727627fb3bde2990eb43de8c85879183
Author: shend <shend@chromium.org>
Date: Tue May 30 10:42:46 2017

Move PageSizeAuto to ComputedStyleConstants.h.

StyleRareNonInheritedData.h has an enum called PageSizeAuto. When we
generate StyleRareNonInheritedData.h, this enum can no longer be defined
in that file. This patch moves PageSizeAuto to ComputedStyleConstants.h
so that we can continue to ues it after we've generated
StyleRareNonInheritedData.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2907073002
Cr-Commit-Position: refs/heads/master@{#475488}

[modify] https://crrev.com/36d3ee32727627fb3bde2990eb43de8c85879183/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
[modify] https://crrev.com/36d3ee32727627fb3bde2990eb43de8c85879183/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h

Project Member

Comment 258 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f003932c6720ec1b62d30928d25ebc6bd9c73de9

commit f003932c6720ec1b62d30928d25ebc6bd9c73de9
Author: nainar <nainar@chromium.org>
Date: Tue May 30 11:29:29 2017

Generate enum/getters/setters/mappings for text-align-last.

Currently, the text-align-last property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the ETextAlignLast enum and use the generated
CSSValueID <-> ETextAlignLast mappings.

Diff: https://gist.github.com/7ebcc52951f3abdb9e1fd8f23bdb3e71/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2915543002
Cr-Commit-Position: refs/heads/master@{#475493}

[modify] https://crrev.com/f003932c6720ec1b62d30928d25ebc6bd9c73de9/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/f003932c6720ec1b62d30928d25ebc6bd9c73de9/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/f003932c6720ec1b62d30928d25ebc6bd9c73de9/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
[modify] https://crrev.com/f003932c6720ec1b62d30928d25ebc6bd9c73de9/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
[modify] https://crrev.com/f003932c6720ec1b62d30928d25ebc6bd9c73de9/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/f003932c6720ec1b62d30928d25ebc6bd9c73de9/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 259 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f0b43318558028fe42bc12bf1d1096849d205455

commit f0b43318558028fe42bc12bf1d1096849d205455
Author: nainar <nainar@chromium.org>
Date: Tue May 30 11:30:26 2017

Generate getters/setters for TextSizeAdjust.

Currently, the TextSizeAdjust property is a 'storage_only' field, so
it has no generated public getters/setters. This patch changes it to an
'external' field so that its getters/setters can be generated as well.

Diff: https://gist.github.com/nainar/649eeb3c1dc02dc231fb5f9a75da44ac/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2909233002
Cr-Commit-Position: refs/heads/master@{#475494}

[modify] https://crrev.com/f0b43318558028fe42bc12bf1d1096849d205455/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/f0b43318558028fe42bc12bf1d1096849d205455/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 260 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4345e38cd114d781b630039d2cc0f18c7514f626

commit 4345e38cd114d781b630039d2cc0f18c7514f626
Author: shend <shend@chromium.org>
Date: Wed May 31 04:05:33 2017

Explicitly generate ComputedStyleBase subgroup copy constructors.

We currently use the default copy constructor for subgroups under
ComputedStyleBase like StyleSurroundData. We've been able to do so
because all fields had default copying behaviour. Now we want to
generate StyleRareNonInheritedData, which has std::unique_ptr fields
that cannot be copied by default. This means we have to explicitly
generate user-defined copy constructors for these subgroups.

This is in preparation for supporting custom copying behaviour for
fields.

Diff of generated files:
https://gist.github.com/darrnshn/1c51e498c11b2798fbc962390a009060/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2911373002
Cr-Commit-Position: refs/heads/master@{#475788}

[modify] https://crrev.com/4345e38cd114d781b630039d2cc0f18c7514f626/third_party/WebKit/Source/build/scripts/templates/fields/group.tmpl

Project Member

Comment 263 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4e4c61cfefb77952159dae7efab12914e9f4e56f

commit 4e4c61cfefb77952159dae7efab12914e9f4e56f
Author: shend <shend@chromium.org>
Date: Wed May 31 05:50:44 2017

Generate enum/getters/setters/mappings for ruby-position.

Currently, the ruby-position property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the ERubyPosition enum and use the generated
CSSValueID <-> ERubyPosition mappings.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2915683002
Cr-Commit-Position: refs/heads/master@{#475817}

[modify] https://crrev.com/4e4c61cfefb77952159dae7efab12914e9f4e56f/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/4e4c61cfefb77952159dae7efab12914e9f4e56f/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/4e4c61cfefb77952159dae7efab12914e9f4e56f/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/4e4c61cfefb77952159dae7efab12914e9f4e56f/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 264 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/51bbe33ffd7411539815a5f7e554b39b5e26eefd

commit 51bbe33ffd7411539815a5f7e554b39b5e26eefd
Author: shend <shend@chromium.org>
Date: Wed May 31 06:39:20 2017

Generate enum/getters/setters/mappings for line-break.

Currently, the line-break property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the ELineBreak enum and use the generated
CSSValueID <-> ELineBreak mappings.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2911383002
Cr-Commit-Position: refs/heads/master@{#475830}

[modify] https://crrev.com/51bbe33ffd7411539815a5f7e554b39b5e26eefd/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/51bbe33ffd7411539815a5f7e554b39b5e26eefd/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/51bbe33ffd7411539815a5f7e554b39b5e26eefd/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/51bbe33ffd7411539815a5f7e554b39b5e26eefd/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 265 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/adccf92c92a9fa6094191e3938b3bd42948751fd

commit adccf92c92a9fa6094191e3938b3bd42948751fd
Author: shend <shend@chromium.org>
Date: Wed May 31 10:22:42 2017

Generate enum/getters/setters/mappings for user-select.

Currently, the user-select property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the EUserSelect enum and use the generated
CSSValueID <-> EUserSelect mappings.

Diff of generated files:
https://gist.github.com/darrnshn/55f9abda5310dd37a0b60386f23e0e4a/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2911963004
Cr-Commit-Position: refs/heads/master@{#475867}

[modify] https://crrev.com/adccf92c92a9fa6094191e3938b3bd42948751fd/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/adccf92c92a9fa6094191e3938b3bd42948751fd/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/adccf92c92a9fa6094191e3938b3bd42948751fd/third_party/WebKit/Source/core/css/CSSValueIDMappings.h
[modify] https://crrev.com/adccf92c92a9fa6094191e3938b3bd42948751fd/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/adccf92c92a9fa6094191e3938b3bd42948751fd/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 266 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/960ae7f16addc69a2369cda1d8462f0b1850a77e

commit 960ae7f16addc69a2369cda1d8462f0b1850a77e
Author: nainar <nainar@chromium.org>
Date: Wed May 31 11:29:50 2017

Generate enum/getters/setters/mappings for text-combine-upright.

Currently, the text-combine-upright/{webkit,epub}-combine property is a
'storage_only' field, so it has no generated public getters/setters.
This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the ETextCombine enum and
use the generated CSSValueID <-> ETextCombine mappings.

Diff: https://gist.github.com/nainar/c2f36a25584d2f298ab9090fe308c6e5/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2916523002
Cr-Commit-Position: refs/heads/master@{#475877}

[modify] https://crrev.com/960ae7f16addc69a2369cda1d8462f0b1850a77e/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/960ae7f16addc69a2369cda1d8462f0b1850a77e/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/960ae7f16addc69a2369cda1d8462f0b1850a77e/third_party/WebKit/Source/core/css/CSSValueIDMappings.h
[modify] https://crrev.com/960ae7f16addc69a2369cda1d8462f0b1850a77e/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
[modify] https://crrev.com/960ae7f16addc69a2369cda1d8462f0b1850a77e/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/960ae7f16addc69a2369cda1d8462f0b1850a77e/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 267 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f3833029711d581ebebedaeaf3412b2463c857ea

commit f3833029711d581ebebedaeaf3412b2463c857ea
Author: nainar <nainar@chromium.org>
Date: Wed May 31 11:52:01 2017

Generate enum/getters/setters/mappings for text-orientation.

Currently, the text-orientation property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the ETextOrientation enum and use the generated
CSSValueID <-> ETextOrientation mappings.

Diff: https://gist.github.com/nainar/257662e77043a84cf3def269576e534a/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2913723002
Cr-Commit-Position: refs/heads/master@{#475880}

[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/css/CSSValueIDMappings.h
[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/f3833029711d581ebebedaeaf3412b2463c857ea/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 268 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09c379de358b916213f0591a5214b60e76dfb224

commit 09c379de358b916213f0591a5214b60e76dfb224
Author: shend <shend@chromium.org>
Date: Wed May 31 12:13:24 2017

Make CounterDirectiveMap a class and implement a Clone() method.

CounterDirectiveMap is currently a typedef of a HashMap, which means
it can't be extended with the Clone method that is required by
StyleRareNonInheritedData when it becomes generated. This patch
makes it into a class and adds a Clone method so that it can be
copied by a generated StyleRareNonInheritedData.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2907063002
Cr-Commit-Position: refs/heads/master@{#475884}

[modify] https://crrev.com/09c379de358b916213f0591a5214b60e76dfb224/third_party/WebKit/Source/core/style/CounterDirectives.cpp
[modify] https://crrev.com/09c379de358b916213f0591a5214b60e76dfb224/third_party/WebKit/Source/core/style/CounterDirectives.h
[modify] https://crrev.com/09c379de358b916213f0591a5214b60e76dfb224/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp

Project Member

Comment 269 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0

commit 9a4d00a687e0cf0ea029a68b2dd44f5814d539d0
Author: nainar <nainar@chromium.org>
Date: Wed May 31 13:34:07 2017

Replace call sites to BorderValue functions to save the BorderValue construction cost

Currently we construct BorderValues via functions
ComputedStyle::Border{Left,Right,Start,End} only to access two methods
at most (Style and Width) or perform comparison. This patch splits out
the accessors for Style and Width and adds comparison functions to
ComputedStyle to save this construction cost.

We haven't removed the callsites in Layout land that return a
BorderValue and are saving it for a future patch to reduce complexity.

BUG= 628043 , 721287

Review-Url: https://codereview.chromium.org/2906253003
Cr-Commit-Position: refs/heads/master@{#475896}

[modify] https://crrev.com/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h
[modify] https://crrev.com/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0/third_party/WebKit/Source/core/layout/LayoutTable.cpp
[modify] https://crrev.com/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
[modify] https://crrev.com/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
[modify] https://crrev.com/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
[modify] https://crrev.com/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/9a4d00a687e0cf0ea029a68b2dd44f5814d539d0/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 270 by bugdroid1@chromium.org, Jun 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4e5b1d42138414abcef8816f6af08fbebdbccd2

commit b4e5b1d42138414abcef8816f6af08fbebdbccd2
Author: shend <shend@chromium.org>
Date: Thu Jun 01 01:50:50 2017

Generate enum/getters/setters/mappings for user-modify.

Currently, the user-modify property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the EUserModify enum and use the generated
CSSValueID <-> EUserModify mappings.

Diff of generated files:
https://gist.github.com/21e3b6343b06a190a48ab3e22c9e10bc/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2912923003
Cr-Commit-Position: refs/heads/master@{#476141}

[modify] https://crrev.com/b4e5b1d42138414abcef8816f6af08fbebdbccd2/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/b4e5b1d42138414abcef8816f6af08fbebdbccd2/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/b4e5b1d42138414abcef8816f6af08fbebdbccd2/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/b4e5b1d42138414abcef8816f6af08fbebdbccd2/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 271 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88112f9e6ce26835980ae32867c5cdbbe36840a5

commit 88112f9e6ce26835980ae32867c5cdbbe36840a5
Author: shend <shend@chromium.org>
Date: Fri Jun 02 04:10:57 2017

Move StyleMultiColData::RuleWidth to ComputedStyle.

When we generate StyleMultiColData, we would no longer have the
RuleWidth method because it is handwritten on StyleMultiColData.
This patch moves RuleWidth to be inline in ComputedStyle so that we
can generate StyleMultiColData.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2916843002
Cr-Commit-Position: refs/heads/master@{#476560}

[modify] https://crrev.com/88112f9e6ce26835980ae32867c5cdbbe36840a5/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/88112f9e6ce26835980ae32867c5cdbbe36840a5/third_party/WebKit/Source/core/style/StyleMultiColData.h

Project Member

Comment 273 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/399dd8b1e55cfa495e75fcf03b3e65ef3188c82b

commit 399dd8b1e55cfa495e75fcf03b3e65ef3188c82b
Author: shend <shend@chromium.org>
Date: Fri Jun 02 05:15:49 2017

Add missing data members in StyleRareNonInheritedData copy constructor.

Two data members are missing from the StyleRareNonInheritedData copy
constructor. This can be problematic because StyleRareNonInheritedData
is stored with copy-on-write semantics: when two ComputedStyles share
the same StyleRareNonInheritedData, modifying one of them will create
a copy without copying those two data members.

This patch adds callback_selectors and paint_images into the copy
constructor.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2893243002
Cr-Commit-Position: refs/heads/master@{#476577}

[modify] https://crrev.com/399dd8b1e55cfa495e75fcf03b3e65ef3188c82b/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp

Project Member

Comment 274 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e887928f5fc67b86d3d2bf951c3022caaa2314e

commit 9e887928f5fc67b86d3d2bf951c3022caaa2314e
Author: shend <shend@chromium.org>
Date: Fri Jun 02 05:29:00 2017

Make PaintImages a class and implement a Clone() method.

Currently we use Vector<Persistent<StyleImage>> to represent a list
of paint images. When we generate StyleRareNonInheritedData, we need
this type to have a Clone method because it is stored inside a
std::unique_ptr. This patch makes this type its own class so that
it can be extended with a Clone method.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2911343002
Cr-Commit-Position: refs/heads/master@{#476580}

[modify] https://crrev.com/9e887928f5fc67b86d3d2bf951c3022caaa2314e/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/9e887928f5fc67b86d3d2bf951c3022caaa2314e/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[add] https://crrev.com/9e887928f5fc67b86d3d2bf951c3022caaa2314e/third_party/WebKit/Source/core/style/PaintImages.h
[modify] https://crrev.com/9e887928f5fc67b86d3d2bf951c3022caaa2314e/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp
[modify] https://crrev.com/9e887928f5fc67b86d3d2bf951c3022caaa2314e/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h

Project Member

Comment 275 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/359a15605f7907df8909b75dfac49dfd5d98f6ae

commit 359a15605f7907df8909b75dfac49dfd5d98f6ae
Author: shend <shend@chromium.org>
Date: Fri Jun 02 05:44:08 2017

Generate enum/getters/setters/mappings for image-rendering.

Currently, the image-rendering property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the ImageRendering enum and use the generated
CSSValueID <-> ImageRendering mappings.

We also rename ImageRendering::kOptimizeContrast to
kWebkitOptimizeContrast to match the keywords.

Diff of generated files:
https://gist.github.com/51d00263e744ea52b3b8cc419f54314f/revisions

BUG= 628043 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2922483004
Cr-Commit-Position: refs/heads/master@{#476585}

[modify] https://crrev.com/359a15605f7907df8909b75dfac49dfd5d98f6ae/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/359a15605f7907df8909b75dfac49dfd5d98f6ae/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/359a15605f7907df8909b75dfac49dfd5d98f6ae/third_party/WebKit/Source/core/layout/ImageQualityController.cpp
[modify] https://crrev.com/359a15605f7907df8909b75dfac49dfd5d98f6ae/third_party/WebKit/Source/core/paint/HTMLCanvasPainter.cpp
[modify] https://crrev.com/359a15605f7907df8909b75dfac49dfd5d98f6ae/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/359a15605f7907df8909b75dfac49dfd5d98f6ae/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 276 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e7c31a19402ec496651ee9c6b0177234fda7d600

commit e7c31a19402ec496651ee9c6b0177234fda7d600
Author: shend <shend@chromium.org>
Date: Fri Jun 02 08:37:13 2017

Move fixed point constants from ComputedStyleConstants to BorderValue.

This patch moves these constants because they are no longer used by
ComputedStyle nor ComputedStyleBase, but only by BorderValue.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2913233003
Cr-Commit-Position: refs/heads/master@{#476602}

[modify] https://crrev.com/e7c31a19402ec496651ee9c6b0177234fda7d600/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
[modify] https://crrev.com/e7c31a19402ec496651ee9c6b0177234fda7d600/third_party/WebKit/Source/core/style/BorderValue.h
[modify] https://crrev.com/e7c31a19402ec496651ee9c6b0177234fda7d600/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 277 by bugdroid1@chromium.org, Jun 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f7b7f0ee69149ccc0bf5a903d6086b114626dda8

commit f7b7f0ee69149ccc0bf5a903d6086b114626dda8
Author: shend <shend@chromium.org>
Date: Mon Jun 05 22:18:58 2017

Rename RareInheritedData::variables and RareNonInheritedData::variables.

When we generate fields in ComputedStyleBase, the name of the fields
must be distinct. Sometimes, existing handwritten data members share
the same name because they are stored on different groups. This may not
be true when they become generated. Hence, we have to rename these
members with a distinct name.

This patch renames:
- StyleRareInheritedData::variables_ -> inherited_variables_
- StyleRareNonInheritedData::variables_ -> non_inherited_variables_

There are no changes in behaviour.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2920133003
Cr-Commit-Position: refs/heads/master@{#477098}

[modify] https://crrev.com/f7b7f0ee69149ccc0bf5a903d6086b114626dda8/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/f7b7f0ee69149ccc0bf5a903d6086b114626dda8/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/f7b7f0ee69149ccc0bf5a903d6086b114626dda8/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp
[modify] https://crrev.com/f7b7f0ee69149ccc0bf5a903d6086b114626dda8/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h

Project Member

Comment 278 by bugdroid1@chromium.org, Jun 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/525a0e6f0d79296a4da4f109f7a704ebbcf7f20a

commit 525a0e6f0d79296a4da4f109f7a704ebbcf7f20a
Author: shend <shend@chromium.org>
Date: Mon Jun 05 22:50:32 2017

Make ComputedStyleBase internal pointer setters move-only.

This patch removes the const ref overload for setters on pointer types.
This means that the internal setter can only be used with an rvalue ref.

This has two consequences:
- We can generate code that works for RefPtrs and std::unique_ptrs
  (since std::unique_ptrs are not copyable, the const ref overload is
   meaningless [*]).
- RefPtrs are passed to internal setters using std::move, which avoids
  ref churn.

[*] Whilst we could make the const ref overload copy the unique_ptr, we
feel that this implicit copying behaviour is bad.

Diff of generated files:
https://gist.github.com/darrnshn/d809ec84cd6418bb1f65ca6dae986630/revisions

This patch does not change behaviour, only the internal API for
ComputedStyleBase.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2923493003
Cr-Commit-Position: refs/heads/master@{#477111}

[modify] https://crrev.com/525a0e6f0d79296a4da4f109f7a704ebbcf7f20a/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl
[modify] https://crrev.com/525a0e6f0d79296a4da4f109f7a704ebbcf7f20a/third_party/WebKit/Source/core/style/ComputedStyle.cpp

Project Member

Comment 279 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ba2889de7991c1f5162cd12dd6cc6e4de3bc3ac0

commit ba2889de7991c1f5162cd12dd6cc6e4de3bc3ac0
Author: shend <shend@chromium.org>
Date: Tue Jun 06 05:48:54 2017

Make ComputedStyleBase use DataCopy when copying pointer fields.

ComputedStyleBase has a constructor that copies every field using the
default copy behaviour. However, when we generate RareNonInheritedData,
some of the pointer fields require special copying behaviour (e.g.
those stored in a std::unique_ptr). To inject custom copying behaviour,
we copy pointer fields with a new function called MemberCopy. MemberCopy
is a function that takes a variable of some type and returns a copy of
it. It can be overloaded to have custom copying behaviour for some type.
Since ComputedStyleBase currently has no special copying behaviour,
we simply overload MemberCopy with RefPtr and Persistent to use the
default copying behaviour.

When we generate RareNonInheritedData, we will need to introduce
overloads for std::unique_ptr and DataPersistent.

This patch does not introduce changes in behaviour.

Diff of generated files:
https://gist.github.com/7a2b410da029e4ed71af5509c511cba2/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2921543002
Cr-Commit-Position: refs/heads/master@{#477206}

[modify] https://crrev.com/ba2889de7991c1f5162cd12dd6cc6e4de3bc3ac0/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
[modify] https://crrev.com/ba2889de7991c1f5162cd12dd6cc6e4de3bc3ac0/third_party/WebKit/Source/build/scripts/templates/fields/group.tmpl
[modify] https://crrev.com/ba2889de7991c1f5162cd12dd6cc6e4de3bc3ac0/third_party/WebKit/Source/core/style/BUILD.gn
[add] https://crrev.com/ba2889de7991c1f5162cd12dd6cc6e4de3bc3ac0/third_party/WebKit/Source/core/style/MemberCopy.h

Project Member

Comment 280 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/61e48d3a97f36c56ad4c9b0d694d4ae52f458a87

commit 61e48d3a97f36c56ad4c9b0d694d4ae52f458a87
Author: Darren Shen <shend@chromium.org>
Date: Tue Jun 06 06:15:42 2017

Rename DataRefs in RareNonInheritedData.

The generator will generate DataRefs with the _data_ suffix in the name.
This patch renames the handwritten DataRefs in RareNonInheritedData to
conform to this style.

Bug:  628043 
Change-Id: I66e0991eb6767fc3da9895c4372ec921b9efb9e5
Reviewed-on: https://chromium-review.googlesource.com/525274
Commit-Queue: Naina Raisinghani <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Naina Raisinghani <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477209}
[modify] https://crrev.com/61e48d3a97f36c56ad4c9b0d694d4ae52f458a87/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/61e48d3a97f36c56ad4c9b0d694d4ae52f458a87/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/61e48d3a97f36c56ad4c9b0d694d4ae52f458a87/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp
[modify] https://crrev.com/61e48d3a97f36c56ad4c9b0d694d4ae52f458a87/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h

Project Member

Comment 281 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d68f294b5c23f5b973d9391007c872751cfe49b3

commit d68f294b5c23f5b973d9391007c872751cfe49b3
Author: Darren Shen <shend@chromium.org>
Date: Tue Jun 06 07:56:56 2017

Rename StyleWillChangeData members.

When we generate fields in ComputedStyleBase, the name of the fields
must be distinct. Sometimes, existing handwritten data members share
the same name because they are stored on different groups. This may not
be true when they become generated. Hence, we have to rename these
members with a distinct name.

This patch adds the "will_change" prefix to the names of all the
StyleWillChange data members.

There are no changes in behaviour.

Bug= 628043 

Change-Id: I5f7d484a2afedb4aa64e33dd1ea2665a2dc44611
Reviewed-on: https://chromium-review.googlesource.com/525252
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Eddy Mead <meade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477230}
[modify] https://crrev.com/d68f294b5c23f5b973d9391007c872751cfe49b3/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/d68f294b5c23f5b973d9391007c872751cfe49b3/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/d68f294b5c23f5b973d9391007c872751cfe49b3/third_party/WebKit/Source/core/style/StyleWillChangeData.cpp
[modify] https://crrev.com/d68f294b5c23f5b973d9391007c872751cfe49b3/third_party/WebKit/Source/core/style/StyleWillChangeData.h

Project Member

Comment 283 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c5ccd757d6645405106fffc4c79f9697a7ec4da3

commit c5ccd757d6645405106fffc4c79f9697a7ec4da3
Author: Darren Shen <shend@chromium.org>
Date: Tue Jun 06 22:26:14 2017

Generate methods for SubtreeWillChangeContents in ComputedStyleBase.

This patch generates getters/setters for SubtreeWillChangeContents.

Diff of generated files:
https://gist.github.com/46ddf3dfedfbbc8a990e1c3acff6507d/revisions

Bug:  628043 
Change-Id: I411be4511953bb15e9b626439179a8ea8ca1684a
Reviewed-on: https://chromium-review.googlesource.com/525214
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Naina Raisinghani <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477437}
[modify] https://crrev.com/c5ccd757d6645405106fffc4c79f9697a7ec4da3/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/c5ccd757d6645405106fffc4c79f9697a7ec4da3/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 284 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/97bec63d0193db10f8e31fdad38ea8886d73e00f

commit 97bec63d0193db10f8e31fdad38ea8886d73e00f
Author: Darren Shen <shend@chromium.org>
Date: Tue Jun 06 23:45:40 2017

Generate enum/getters/setters/mappings for text-underline-position.

Currently, the text-underline-position property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the TextUnderlinePosition enum and use the generated
CSSValueID <-> TextUnderlinePosition mappings.

Diff of generated files:
https://gist.github.com/660ef70abac1536136fccb33ecf0905a/revisions

Bug:  628043 
Change-Id: Ida488dc25572ad5ede5c5f97a7f44a375de4f29b
Reviewed-on: https://chromium-review.googlesource.com/525272
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Rune Lillesveen <rune@opera.com>
Reviewed-by: Naina Raisinghani <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477466}
[modify] https://crrev.com/97bec63d0193db10f8e31fdad38ea8886d73e00f/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/97bec63d0193db10f8e31fdad38ea8886d73e00f/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/97bec63d0193db10f8e31fdad38ea8886d73e00f/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/97bec63d0193db10f8e31fdad38ea8886d73e00f/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 285 by bugdroid1@chromium.org, Jun 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/93dba2909d46c4ec7dbb94fe666480a7486b7f39

commit 93dba2909d46c4ec7dbb94fe666480a7486b7f39
Author: shend <shend@chromium.org>
Date: Wed Jun 07 08:21:04 2017

Remove template parameter on ComputedStyleBase.

In a previous patch, we made ComputedStyleBase a template class. This
allowed ComputedStyle to pass itself as a template parameter so that
ComputedStyleBase can access methods on ComputedStyle.

However, this meant that all the ComputedStyleBase code were in a
single header file. Whenever it calls a non-inlined function declared
without CORE_EXPORT, it would cause a linker error. This is because
ComputedStyleBase functions were being inlined in different translation
units that did not have the necessary symbols.

Whilst we could make an explicit instantiation of ComputedStyleBase
with ComputedStyle, it is much easier to go back to the original .h/cpp
split. To make this work, we forward declare ComputedStyle in
ComputedStyleBase.h. Whenever we call methods on ComputedStyle, we do
that in ComputedStyleBase.cpp. We also have to make diffing functions
static functions that took two ComputedStyles instead of an "other"
ComputedStyleBase.

This patch does not change behaviour.

Diff of generated files:
https://gist.github.com/darrnshn/18645fc5c36cc74e00f2724be2079f0a/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2919343002
Cr-Commit-Position: refs/heads/master@{#477580}

[modify] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[add] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
[modify] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
[modify] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
[modify] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/build/scripts/templates/fields/group.tmpl
[modify] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
[modify] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/93dba2909d46c4ec7dbb94fe666480a7486b7f39/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 286 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6fdc5809ac78b966c6dc873e936efaa365f873f5

commit 6fdc5809ac78b966c6dc873e936efaa365f873f5
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 08 04:02:47 2017

Move NamedGridLinesMap and OrderedNamedGridLines to their own files.

StyleGridData.h contains two typedefs: NamedGridLinesMap and
OrderedNamedGridLines. When we generate StyleGridData, StyleGridData.h
will be deleted, so those two typedefs can't stay in that file. This
patch moves the typedefs to their own files so that they still work
after we delete StyleGridData.h.

Bug:  628043 
Change-Id: I7590b267ae532d23cf808117a096ff52a377c655
Reviewed-on: https://chromium-review.googlesource.com/527733
Reviewed-by: Bugs Nash <bugsnash@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477879}
[modify] https://crrev.com/6fdc5809ac78b966c6dc873e936efaa365f873f5/third_party/WebKit/Source/core/style/BUILD.gn
[add] https://crrev.com/6fdc5809ac78b966c6dc873e936efaa365f873f5/third_party/WebKit/Source/core/style/NamedGridLinesMap.h
[add] https://crrev.com/6fdc5809ac78b966c6dc873e936efaa365f873f5/third_party/WebKit/Source/core/style/OrderedNamedGridLines.h
[modify] https://crrev.com/6fdc5809ac78b966c6dc873e936efaa365f873f5/third_party/WebKit/Source/core/style/StyleGridData.h

Project Member

Comment 287 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/59f59f22c954b04d3282a566c4c64eac2cf49ee8

commit 59f59f22c954b04d3282a566c4c64eac2cf49ee8
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 08 06:16:06 2017

Add public operator== to TransformOperations.

Currently, the equality operator on the following classes are private:
- TranslateTransformOperation
- RotateTransformOperation
- ScaleTransformOperation

So two Translate/Rotate/ScaleTransformOperations cannot be directly
compared. We need to first static_cast them both into TransformOperation
and use the public equality operator on TransformOperation. The equality
operator on TransformOperation is a pure virtual function that just
calls the private equality operators on Translate/Rotate/
ScaleTransformOperations anyway.

To make comparing two Translate/Rotate/ScaleTransformOperations easier,
this patch adds public equality operators to each of those files.
Each of these equality operators only compare with the same type and
simply call the private equality operators.

This allows two Translate/Rotate/ScaleTransformOperations of the same
type to be compared without needing static_cast to a TransformOperation.

Alternatively we could make the private equality operators public, but
I assume there was some reason that they were private. If there's no
particular reason then just making them public is probably better.

This patch also makes a change in StyleTransformData to show that it
works.

Bug:  628043 
Change-Id: Ie74931a04f829e5f74348feeca17a75e68046f99
Reviewed-on: https://chromium-review.googlesource.com/527836
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477911}
[modify] https://crrev.com/59f59f22c954b04d3282a566c4c64eac2cf49ee8/third_party/WebKit/Source/core/style/StyleTransformData.cpp
[modify] https://crrev.com/59f59f22c954b04d3282a566c4c64eac2cf49ee8/third_party/WebKit/Source/platform/transforms/RotateTransformOperation.h
[modify] https://crrev.com/59f59f22c954b04d3282a566c4c64eac2cf49ee8/third_party/WebKit/Source/platform/transforms/ScaleTransformOperation.h
[modify] https://crrev.com/59f59f22c954b04d3282a566c4c64eac2cf49ee8/third_party/WebKit/Source/platform/transforms/TranslateTransformOperation.h

Project Member

Comment 288 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/80fa201c33eb5854193f652ea64adc68620ce70d

commit 80fa201c33eb5854193f652ea64adc68620ce70d
Author: shend <shend@chromium.org>
Date: Thu Jun 08 07:54:57 2017

Remove unused include in CSSSelectorWatch.

StyleRareNonInheritedData.h will no longer exist once we generate it.
This removes an unused include of StyleRareNonInheritedData.h.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2926243002
Cr-Commit-Position: refs/heads/master@{#477921}

[modify] https://crrev.com/80fa201c33eb5854193f652ea64adc68620ce70d/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp

Project Member

Comment 289 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/020c1992c67d99bd0a6d994ce6d14d450a639ed7

commit 020c1992c67d99bd0a6d994ce6d14d450a639ed7
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 08 08:20:59 2017

Move Has3DTransform to ComputedStyle.

When we generate StyleTransformData, we would no longer have the
Has3DTransform method because it is handwritten on StyleTransform.
This patch moves Has3DTransform to be inline in ComputedStyle so that we
can generate StyleTransformData.

Bug:  628043 
Change-Id: Ie636886293ca39ff0f643066879ca1dfa90f22d8
Reviewed-on: https://chromium-review.googlesource.com/526814
Reviewed-by: Eddy Mead <meade@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477924}
[modify] https://crrev.com/020c1992c67d99bd0a6d994ce6d14d450a639ed7/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/020c1992c67d99bd0a6d994ce6d14d450a639ed7/third_party/WebKit/Source/core/style/StyleTransformData.cpp
[modify] https://crrev.com/020c1992c67d99bd0a6d994ce6d14d450a639ed7/third_party/WebKit/Source/core/style/StyleTransformData.h

Project Member

Comment 290 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7e6d5f46eea93a97d69d6d5194c163353c528a99

commit 7e6d5f46eea93a97d69d6d5194c163353c528a99
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 08 10:49:41 2017

Generate getters/setters/mappings for text-justify.

Currently, the text-justify property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.

TextJustify is in platform/text, so we can't generate the enum itself.
However, we can also generate the CSSValueID <-> TextJustify mappings.

Diff of generated files:
https://gist.github.com/darrnshn/3defc5f6001a21f272ab77a06a4520f7/revisions

Bug:  628043 
Change-Id: I158f503cf747957434bc6a0580ec5922480d154e
Reviewed-on: https://chromium-review.googlesource.com/527842
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477938}
[modify] https://crrev.com/7e6d5f46eea93a97d69d6d5194c163353c528a99/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/7e6d5f46eea93a97d69d6d5194c163353c528a99/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/7e6d5f46eea93a97d69d6d5194c163353c528a99/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 291 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cc04b79cdd8f1ab0f4d96ce6985ed2b290572cc7

commit cc04b79cdd8f1ab0f4d96ce6985ed2b290572cc7
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 09 03:33:36 2017

Pack enums in StyleGridItemData as bit fields.

This patch changes StyleGridItemData::auto_repeat_columns_type_ and
auto_repeat_rows_type_ into bit fields. It also moves the declaration of
grid_auto_flow_ to be with the other bit fields so that they can be
packed together.

This reduces the size of StyleGridItemData by 8 bytes.

Bug:  628043 
Change-Id: Ic1fad688f72c15278c240ebdb0eacac2d42c9e66
Reviewed-on: https://chromium-review.googlesource.com/527738
Reviewed-by: Eddy Mead <meade@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478184}
[modify] https://crrev.com/cc04b79cdd8f1ab0f4d96ce6985ed2b290572cc7/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/cc04b79cdd8f1ab0f4d96ce6985ed2b290572cc7/third_party/WebKit/Source/core/style/StyleGridData.cpp
[modify] https://crrev.com/cc04b79cdd8f1ab0f4d96ce6985ed2b290572cc7/third_party/WebKit/Source/core/style/StyleGridData.h

Project Member

Comment 292 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3adbcbaa43c1d5069da92d154a7382943c5a2881

commit 3adbcbaa43c1d5069da92d154a7382943c5a2881
Author: shend <shend@chromium.org>
Date: Tue Jun 13 03:19:34 2017

Change DataPersistent constructor to allow one line initialisation.

Currently, DataPersistent objects must be initialised twice: once via
the constructor that sets it to nullptr and once more via the Init()
method that sets it to a nonnull value.

This patch changes the default constructor to do Init() instead and
adds an extra constructor that sets it to nullptr. This way, we can
initialise DataPersistent objects in one line (useful for constructor
initializer lists).

BUG= 628043 

Review-Url: https://codereview.chromium.org/2935893002
Cr-Commit-Position: refs/heads/master@{#478883}

[modify] https://crrev.com/3adbcbaa43c1d5069da92d154a7382943c5a2881/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/3adbcbaa43c1d5069da92d154a7382943c5a2881/third_party/WebKit/Source/core/style/DataPersistent.h

Project Member

Comment 293 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/26be5c373bf2361010a3c06929d342a530043634

commit 26be5c373bf2361010a3c06929d342a530043634
Author: shend <shend@chromium.org>
Date: Tue Jun 13 05:27:33 2017

Remove explicit template parameters when calling DataEquivalent.

Because of  crbug.com/729447 , specifying explicit template parameters
in a call to a function that is overloaded on a garbage collected type
causes a [blink-gc] error. As part of generating RareNonInheritedData,
we need to add overloads for DataRef in DataEquivalent, so we need to
remove code where DataEquivalent is called with explicit template
parameters.

This patch replaces explicit template parameters with static_casts
instead. This workaround will allow us to continue with generating
RareNonInheritedData.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2922163002
Cr-Commit-Position: refs/heads/master@{#478908}

[modify] https://crrev.com/26be5c373bf2361010a3c06929d342a530043634/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Project Member

Comment 294 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f88c5b041d56422d91ee46d144833efa3d152f42

commit f88c5b041d56422d91ee46d144833efa3d152f42
Author: shend <shend@chromium.org>
Date: Tue Jun 13 07:17:10 2017

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}

[modify] https://crrev.com/f88c5b041d56422d91ee46d144833efa3d152f42/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/f88c5b041d56422d91ee46d144833efa3d152f42/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl
[modify] https://crrev.com/f88c5b041d56422d91ee46d144833efa3d152f42/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
[modify] https://crrev.com/f88c5b041d56422d91ee46d144833efa3d152f42/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl

Project Member

Comment 295 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b8a5e4f08664ade94cc12c72cec6e208e03fad2d

commit b8a5e4f08664ade94cc12c72cec6e208e03fad2d
Author: shend <shend@chromium.org>
Date: Tue Jun 13 08:22:46 2017

Make RareNonInheritedData use MemberCopy and DataEquivalent.

When we generate RareNonInheritedData, the generated code will use
MemberCopy and DataEquivalent on all pointer fields. This patch first
changes the handwritten RareNonInheritedData to use these functions
in preparation for generating RareNonInheritedData.

Note that we have temporary overloads for DataRef. These will no longer
be needed once all subgroups of RareNonInheritedData are generated.

BUG= 628043 

Review-Url: https://codereview.chromium.org/2926053002
Cr-Commit-Position: refs/heads/master@{#478934}

[modify] https://crrev.com/b8a5e4f08664ade94cc12c72cec6e208e03fad2d/third_party/WebKit/Source/core/style/DataEquivalency.h
[modify] https://crrev.com/b8a5e4f08664ade94cc12c72cec6e208e03fad2d/third_party/WebKit/Source/core/style/MemberCopy.h
[modify] https://crrev.com/b8a5e4f08664ade94cc12c72cec6e208e03fad2d/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp

Project Member

Comment 296 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3d43d6284ad6298b1487e5648cf43e46c44ba3a9

commit 3d43d6284ad6298b1487e5648cf43e46c44ba3a9
Author: shend <shend@chromium.org>
Date: Tue Jun 13 21:00:43 2017

Generate StyleRareNonInheritedData in ComputedStyleBase.

This patch generates the fields stored directly on
StyleRareNonInheritedData. This group is special in that it has nested
subgroups such as StyleWillChangeData and StyleTransformData.

Important changes to note:

- name_utilities.py: split_name is changed to consider "3D" as one word
  instead of two. This is so that the name for transform-style-3D is
  formatted correctly.

- CSSProperties.json5: Added new pointer types std::unique_ptr and
  DataPersistent. Added DataRef temporarily as a valid pointer type so
  that the fields for nested groups like StyleWillChangeData can be
  generated, without generating the nested group itself. This is to
  keep the CL small. DataRef will be removed as a valid pointer type
  once all the subgroups are generated.

- DataPersistent.h: Added move assignment so that the internal move
  setter for DataPersistent fields can be generated.

- group.tmpl: Comparisons are not generated for a few fields. See
  https://www.diffchecker.com/u0H0SvNe for which fields are not
  compared. This change makes groups ignore these fields when
  generating operator==.

This patch does not change behaviour.

Diff of generated files:
https://gist.github.com/781ba773a43594145ee79cfa270614d6/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2923333002
Cr-Commit-Position: refs/heads/master@{#479146}

[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/build/scripts/name_utilities.py
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/build/scripts/templates/fields/group.tmpl
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/3d43d6284ad6298b1487e5648cf43e46c44ba3a9/third_party/WebKit/Source/core/style/DataPersistent.h
[delete] https://crrev.com/0195aa151800b8f38cb736aa350047f491b5d4ff/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp
[delete] https://crrev.com/0195aa151800b8f38cb736aa350047f491b5d4ff/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h

Project Member

Comment 297 by bugdroid1@chromium.org, Jun 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/356875c293ba3f33b0c5fd1b203bf91c2078a004

commit 356875c293ba3f33b0c5fd1b203bf91c2078a004
Author: Darren Shen <shend@chromium.org>
Date: Wed Jun 14 07:48:02 2017

Handle expression joining with Jinja joiner in ComputedStyle templates.

When generating ComputedStyle, we often have to generate patterns like:

   foo &&
   bar &&
   baz

So far, we've been doing this using the print_if macro, which allows us
to print the && only if we are not at the last iteration:

   {% for item in list %}
       {{item}}{{print_if(not loop.last, " &&")}}
   {% endfor %}

However, when there's multiple loops involved, this breaks down, e.g.:

   {% for item in list_a %}
       {{item}}{{print_if(not loop.last, " &&")}}
   {% endfor %}
   {% for item in list_b %}
       {{item}}{{print_if(not loop.last, " &&")}}
   {% endfor %}

This could print something like:

   foo &&
   bar
   baz

Currently, we solve this by always ending with && and closing off the
last && with the identity value:

   foo &&
   bar &&
   baz &&
   true

However, this is ugly, and does not work when there's no identity value,
e.g. the commas in C++ constructor initializer lists.

Fortunately, Jinja has a builtin solution: joiner. A joiner is an object
that will print a value everytime it's invoked, except the first time.
By creating a joiner before the loops, we can invoke it every time we
need to print a new line. Note that this means the joiner string is now
a prefix, not a suffix:

   foo
   && bar
   && baz

This patch changes ComputedStyle related templates to use joiners. For
recursive macros, we have to pass the state of the joiner on as an
extra optional argument.

This patch does not change behaviour.

Diff of generated files:
https://gist.github.com/darrnshn/480933b282092bb35ea9f0469f82ceff/revisions

Bug:  628043 
Change-Id: I7134ba4cf7e444ed96035bc38983a0057454f37d
Reviewed-on: https://chromium-review.googlesource.com/535296
Reviewed-by: Naina Raisinghani <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479319}
[modify] https://crrev.com/356875c293ba3f33b0c5fd1b203bf91c2078a004/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl
[modify] https://crrev.com/356875c293ba3f33b0c5fd1b203bf91c2078a004/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
[modify] https://crrev.com/356875c293ba3f33b0c5fd1b203bf91c2078a004/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
[modify] https://crrev.com/356875c293ba3f33b0c5fd1b203bf91c2078a004/third_party/WebKit/Source/build/scripts/templates/fields/group.tmpl

Project Member

Comment 298 by bugdroid1@chromium.org, Jun 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/27bb7f3635c1e38ede195f0c2c6ceac231ee6632

commit 27bb7f3635c1e38ede195f0c2c6ceac231ee6632
Author: Darren Shen <shend@chromium.org>
Date: Wed Jun 14 08:24:47 2017

Allow nested subgroups in ComputedStyleBase and generate WillChangeData.

This patch allows the 'field_group' parameter in CSSProperties.json5 and
ComputedStyleExtraFields.json5 to specify nested groups:

   field_group: "foo->bar"

This will add a DataRef on StyleFooData that points to StyleBarData.
'->' was chosen as the separator. '.' was considered too subtle and '/'
was considered ambiguous with 'or'.

To show that this is working, this patch generates StyleWillChangeData,
which is a nested subgroup under StyleRareNonInheritedData.

Note that supporting diffing of nested groups is done in a subsequent
patch.

Example demo CL:
https://chromium-review.googlesource.com/c/535196/

Diff of generated files:
https://gist.github.com/96a9cbe4f8d5baed540a12a1cfebafb5/revisions

Bug:  628043 
Change-Id: Ie623fb36c86068b84e464c40826ca42f6ea87690
Reviewed-on: https://chromium-review.googlesource.com/535193
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Naina Raisinghani <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479327}
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/build/scripts/templates/fields/group.tmpl
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/27bb7f3635c1e38ede195f0c2c6ceac231ee6632/third_party/WebKit/Source/core/style/ComputedStyle.h
[delete] https://crrev.com/110abc75b89d7c3b499454df9c70cbfaff3a316a/third_party/WebKit/Source/core/style/StyleWillChangeData.cpp
[delete] https://crrev.com/110abc75b89d7c3b499454df9c70cbfaff3a316a/third_party/WebKit/Source/core/style/StyleWillChangeData.h

Project Member

Comment 299 by bugdroid1@chromium.org, Jun 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50d98ef2e59718c2e28410dbec001702aa215449

commit 50d98ef2e59718c2e28410dbec001702aa215449
Author: Darren Shen <shend@chromium.org>
Date: Wed Jun 14 11:26:41 2017

Support nested groups in diff functions in ComputedStyle.

This patch changes how diff functions are generated so that they work
even when there are nested groups.

This patch does not change existing generated code.

Bug:  628043 
Change-Id: Ice96c072d135cf44ed4a9faf2339f5b6f70ff2ed
Reviewed-on: https://chromium-review.googlesource.com/535376
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Naina Raisinghani <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479349}
[modify] https://crrev.com/50d98ef2e59718c2e28410dbec001702aa215449/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/50d98ef2e59718c2e28410dbec001702aa215449/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl

Project Member

Comment 300 by bugdroid1@chromium.org, Jun 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0923b5913aa087a0ffd8695a49aae2931e0e5c56

commit 0923b5913aa087a0ffd8695a49aae2931e0e5c56
Author: nainar <nainar@chromium.org>
Date: Wed Jun 14 11:43:41 2017

Generate enum/getters/setters/mappings for isolation.

Currently, the isolation property is a 'storage_only' field, so it has
no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EIsolation enum and
use the generated CSSValueID <-> EIsolation mappings.

Diff: https://gist.github.com/3920a62cb3b9844256b997d6a4e06672/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2941623004
Cr-Commit-Position: refs/heads/master@{#479352}

[modify] https://crrev.com/0923b5913aa087a0ffd8695a49aae2931e0e5c56/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/0923b5913aa087a0ffd8695a49aae2931e0e5c56/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/0923b5913aa087a0ffd8695a49aae2931e0e5c56/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/0923b5913aa087a0ffd8695a49aae2931e0e5c56/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 301 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/423cc7273a44b929beeb58bd22da768229297c96

commit 423cc7273a44b929beeb58bd22da768229297c96
Author: Naina Raisinghani <nainar@chromium.org>
Date: Thu Jun 15 03:01:39 2017

Generate enum/getters/setters/mappings for object-fit and generate getters/setters for object-position.

Currently, the object-fit property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EObjectFit enum and
use the generated CSSValueID <-> EObjectFit mappings.

Currently, the object-position property is a 'storage_only' field, so
it has no generated public getters/setters. This patch changes it to an
'external' field so that its getters/setters can be generated as well.

Diff: https://gist.github.com/nainar/4f424629173252c98fe47d6b8b5b86af/revisions

BUG= 628043 

Change-Id: Ibf632aac9ea8d54d2c3f3cf2245dd0b7f2675c03
Reviewed-on: https://chromium-review.googlesource.com/536295
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: Naina Raisinghani <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479589}
[modify] https://crrev.com/423cc7273a44b929beeb58bd22da768229297c96/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/423cc7273a44b929beeb58bd22da768229297c96/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/423cc7273a44b929beeb58bd22da768229297c96/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/423cc7273a44b929beeb58bd22da768229297c96/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 302 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38d06b44e7f1cb70363415fa193ab279b91e564c

commit 38d06b44e7f1cb70363415fa193ab279b91e564c
Author: Naina Raisinghani <nainar@chromium.org>
Date: Thu Jun 15 04:48:31 2017

Generate enum/getters/setters/mappings for margin-*-collapse.

Currently, the margin-*-collapse property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EMarginCollapse enum and
use the generated CSSValueID <-> EMarginCollapse mappings.

Diff: https://gist.github.com/nainar/885b33371967b71d827c7ae7dab14ea0/revisions

BUG= 628043 

Change-Id: I4d9f96a1fbe47d0bc1e1deeeea2c25b5a2217094
Reviewed-on: https://chromium-review.googlesource.com/535379
Commit-Queue: nainar <nainar@chromium.org>
Reviewed-by: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#479607}
[modify] https://crrev.com/38d06b44e7f1cb70363415fa193ab279b91e564c/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/38d06b44e7f1cb70363415fa193ab279b91e564c/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/38d06b44e7f1cb70363415fa193ab279b91e564c/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/38d06b44e7f1cb70363415fa193ab279b91e564c/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 303 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/75219aa3cd4094db50896b96d3f83892412d2fd2

commit 75219aa3cd4094db50896b96d3f83892412d2fd2
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 15 05:18:19 2017

Generate DeprecatedFlexBoxData.

This patch generates all DeprecatedFlexBoxData fields as storage_only.

Diff of generated files:
https://gist.github.com/956f78371ca06e83de179a23e64c8293/revisions

Bug:  628043 
Change-Id: Ia22d92dc9c990960efdcfd8ae4b8bb1b79feff80
Reviewed-on: https://chromium-review.googlesource.com/535213
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479611}
[modify] https://crrev.com/75219aa3cd4094db50896b96d3f83892412d2fd2/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/75219aa3cd4094db50896b96d3f83892412d2fd2/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/75219aa3cd4094db50896b96d3f83892412d2fd2/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/75219aa3cd4094db50896b96d3f83892412d2fd2/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/75219aa3cd4094db50896b96d3f83892412d2fd2/third_party/WebKit/Source/core/style/ComputedStyle.h
[delete] https://crrev.com/06b859c5dac92e22ea6db5c59643ce574d58ea3c/third_party/WebKit/Source/core/style/StyleDeprecatedFlexibleBoxData.cpp
[delete] https://crrev.com/06b859c5dac92e22ea6db5c59643ce574d58ea3c/third_party/WebKit/Source/core/style/StyleDeprecatedFlexibleBoxData.h

Project Member

Comment 304 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9239a14ce2e6a4f2b26cb85807d0194c816e009

commit e9239a14ce2e6a4f2b26cb85807d0194c816e009
Author: Naina Raisinghani <nainar@chromium.org>
Date: Thu Jun 15 06:39:09 2017

Generate getters/setters for shape-margin.

Currently, the shape-margin property is a 'storage_only' field, so
it has no generated public getters/setters. This patch changes it to an
'external' field so that its getters/setters can be generated as well.

Diff: https://gist.github.com/nainar/d696bdebcf5347bd1a96d77f5a253f6f/revisions

BUG= 628043 

Change-Id: I1d85de05b8c03f8353c162d5df436f58ef594124
Reviewed-on: https://chromium-review.googlesource.com/536216
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479625}
[modify] https://crrev.com/e9239a14ce2e6a4f2b26cb85807d0194c816e009/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/e9239a14ce2e6a4f2b26cb85807d0194c816e009/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 305 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e53cffd276ef2726cfe0df78615bc79177bd063d

commit e53cffd276ef2726cfe0df78615bc79177bd063d
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 15 10:06:02 2017

Generate FlexBoxData.

This patch generates all FlexBoxData fields as storage_only.

Diff of generated files:
https://gist.github.com/8ad3b03a2696bd4766f95abbf967a1c8/revisions

Bug:  628043 
Change-Id: Ie3b865e9359bb46ace74b0de797dfd75c81a0f9e
Reviewed-on: https://chromium-review.googlesource.com/535254
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479658}
[modify] https://crrev.com/e53cffd276ef2726cfe0df78615bc79177bd063d/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/e53cffd276ef2726cfe0df78615bc79177bd063d/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/e53cffd276ef2726cfe0df78615bc79177bd063d/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/e53cffd276ef2726cfe0df78615bc79177bd063d/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/e53cffd276ef2726cfe0df78615bc79177bd063d/third_party/WebKit/Source/core/style/ComputedStyle.h
[delete] https://crrev.com/cc4e237ab9cb5020459e544187ba2a556a628fd0/third_party/WebKit/Source/core/style/StyleFlexibleBoxData.cpp
[delete] https://crrev.com/cc4e237ab9cb5020459e544187ba2a556a628fd0/third_party/WebKit/Source/core/style/StyleFlexibleBoxData.h

Project Member

Comment 306 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/494e8730794eb377f15e8f023fb124e055eb0762

commit 494e8730794eb377f15e8f023fb124e055eb0762
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 15 12:06:44 2017

Generate MultiColData.

This patch generates all MultiColData fields as storage_only.

Diff of generated files:
https://gist.github.com/48720d874591f7d95dc83c5b4458c040/revisions

Bug:  628043 
Change-Id: I265f6fcc1355a86afc3dd62f473130d462fb83d3
Reviewed-on: https://chromium-review.googlesource.com/535215
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479672}
[modify] https://crrev.com/494e8730794eb377f15e8f023fb124e055eb0762/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/494e8730794eb377f15e8f023fb124e055eb0762/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/494e8730794eb377f15e8f023fb124e055eb0762/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/494e8730794eb377f15e8f023fb124e055eb0762/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/494e8730794eb377f15e8f023fb124e055eb0762/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/494e8730794eb377f15e8f023fb124e055eb0762/third_party/WebKit/Source/core/style/ComputedStyle.h
[delete] https://crrev.com/dc3a1ab1e79d4d5dced497aaabd8aab9cbabcd67/third_party/WebKit/Source/core/style/StyleMultiColData.cpp
[delete] https://crrev.com/dc3a1ab1e79d4d5dced497aaabd8aab9cbabcd67/third_party/WebKit/Source/core/style/StyleMultiColData.h

Project Member

Comment 307 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/571b8d3fcad47720903171102cfdf3a20f068848

commit 571b8d3fcad47720903171102cfdf3a20f068848
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 15 12:15:22 2017

Generate TransformData.

This patch generates all TransformData fields as storage_only.

Diff of generated files:
https://gist.github.com/22c8a49ad024df52ce24281dad373521/revisions

Bug:  628043 
Change-Id: I3b45a2e353a7e31011dcec6fac9c90fd5b298fd2
Reviewed-on: https://chromium-review.googlesource.com/535334
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479675}
[modify] https://crrev.com/571b8d3fcad47720903171102cfdf3a20f068848/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/571b8d3fcad47720903171102cfdf3a20f068848/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/571b8d3fcad47720903171102cfdf3a20f068848/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/571b8d3fcad47720903171102cfdf3a20f068848/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/571b8d3fcad47720903171102cfdf3a20f068848/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/571b8d3fcad47720903171102cfdf3a20f068848/third_party/WebKit/Source/core/style/ComputedStyle.h
[delete] https://crrev.com/14c3371a8f2bb2ea82fd8c4fa5c36851b59325dc/third_party/WebKit/Source/core/style/StyleTransformData.cpp
[delete] https://crrev.com/14c3371a8f2bb2ea82fd8c4fa5c36851b59325dc/third_party/WebKit/Source/core/style/StyleTransformData.h

Project Member

Comment 308 by bugdroid1@chromium.org, Jun 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b69a85f33fa9bf1e5ce2a0d9df7c88fcd4b38bb5

commit b69a85f33fa9bf1e5ce2a0d9df7c88fcd4b38bb5
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 15 22:24:40 2017

Generate GridItemData.

This patch generates all GridItemData fields as storage_only.

Diff of generated files:
https://gist.github.com/5cb077833e916d7c9cbc7b828f2870d9/revisions

Bug:  628043 
Change-Id: I9ad401c3961f6e762c7ba6969cbe99390264d471
Reviewed-on: https://chromium-review.googlesource.com/535239
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479867}
[modify] https://crrev.com/b69a85f33fa9bf1e5ce2a0d9df7c88fcd4b38bb5/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/b69a85f33fa9bf1e5ce2a0d9df7c88fcd4b38bb5/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/b69a85f33fa9bf1e5ce2a0d9df7c88fcd4b38bb5/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/b69a85f33fa9bf1e5ce2a0d9df7c88fcd4b38bb5/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/b69a85f33fa9bf1e5ce2a0d9df7c88fcd4b38bb5/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/b69a85f33fa9bf1e5ce2a0d9df7c88fcd4b38bb5/third_party/WebKit/Source/core/style/ComputedStyle.h
[delete] https://crrev.com/a5bf048e717e80507172beb199d2cc0907ecc472/third_party/WebKit/Source/core/style/StyleGridItemData.cpp
[delete] https://crrev.com/a5bf048e717e80507172beb199d2cc0907ecc472/third_party/WebKit/Source/core/style/StyleGridItemData.h

Project Member

Comment 309 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4895082bc9c7bdf8edad60db81ccaf763e1bf03

commit a4895082bc9c7bdf8edad60db81ccaf763e1bf03
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 16 03:06:20 2017

Generate ScrollSnapData.

This patch generates all ScrollSnapData fields as storage_only. It also
moves ScrollSnap related classes to their own file.

Diff: https://gist.github.com/4a73c6ab214a2f1762692b27a6ab6d84/revisions

Bug:  628043 
Change-Id: I1f146083b3218e8a7a9f90958c5a8cd5c365d330
Reviewed-on: https://chromium-review.googlesource.com/537753
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479935}
[modify] https://crrev.com/a4895082bc9c7bdf8edad60db81ccaf763e1bf03/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/a4895082bc9c7bdf8edad60db81ccaf763e1bf03/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/a4895082bc9c7bdf8edad60db81ccaf763e1bf03/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/a4895082bc9c7bdf8edad60db81ccaf763e1bf03/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h
[modify] https://crrev.com/a4895082bc9c7bdf8edad60db81ccaf763e1bf03/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/a4895082bc9c7bdf8edad60db81ccaf763e1bf03/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/a4895082bc9c7bdf8edad60db81ccaf763e1bf03/third_party/WebKit/Source/core/style/ComputedStyle.h
[add] https://crrev.com/a4895082bc9c7bdf8edad60db81ccaf763e1bf03/third_party/WebKit/Source/core/style/ScrollSnap.h
[delete] https://crrev.com/b5f6e75bb57e1b0d2f3df63975000195327959d9/third_party/WebKit/Source/core/style/StyleScrollSnapData.cpp
[delete] https://crrev.com/b5f6e75bb57e1b0d2f3df63975000195327959d9/third_party/WebKit/Source/core/style/StyleScrollSnapData.h

Project Member

Comment 310 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/59cc03b75a3bf464f615d5f230f47bbb0251892e

commit 59cc03b75a3bf464f615d5f230f47bbb0251892e
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 16 04:14:30 2017

Generate accessors for WillChange{Contents, Position, Properties}.

This patch changes the following storage_only fields to have a different
field template:
- WillChangeContents -> primitive
- WillChangePosition -> primitive
- WillChangeProperties -> external

This generates accessors for these three fields.

Diff of generated files:
https://gist.github.com/3dace3c035b90f4b096055ecbe1be3e3/revisions

Bug:  628043 
Change-Id: I4e503183ca10196103ff51d539aeed7711e48354
Reviewed-on: https://chromium-review.googlesource.com/536617
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479945}
[modify] https://crrev.com/59cc03b75a3bf464f615d5f230f47bbb0251892e/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/59cc03b75a3bf464f615d5f230f47bbb0251892e/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 311 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25a2fbbcff72016d5c50e8723e56d565d43f3071

commit 25a2fbbcff72016d5c50e8723e56d565d43f3071
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 16 04:40:34 2017

Generate GridData.

This patch generates all GridData fields as storage_only.

Since this is the last subgroup of RareNonInheritedData, we can also
remove DataRef overloads on DataEquivalent and MemberCopy, which were
temporarily introduced to generate the DataRef data members on
RareNonInheritedData.

Diff: https://gist.github.com/891fde9a2ad406482752b3e9c9177b0c/revisions

Bug:  628043 
Change-Id: Ibb9926df07653427fb2881fa7ce012a29c03ee95
Reviewed-on: https://chromium-review.googlesource.com/538372
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479948}
[modify] https://crrev.com/25a2fbbcff72016d5c50e8723e56d565d43f3071/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/25a2fbbcff72016d5c50e8723e56d565d43f3071/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/25a2fbbcff72016d5c50e8723e56d565d43f3071/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/25a2fbbcff72016d5c50e8723e56d565d43f3071/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/25a2fbbcff72016d5c50e8723e56d565d43f3071/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/25a2fbbcff72016d5c50e8723e56d565d43f3071/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/25a2fbbcff72016d5c50e8723e56d565d43f3071/third_party/WebKit/Source/core/style/DataEquivalency.h
[modify] https://crrev.com/25a2fbbcff72016d5c50e8723e56d565d43f3071/third_party/WebKit/Source/core/style/MemberCopy.h
[delete] https://crrev.com/7928288383ccd59cd7037ad0a341645b2dc2475c/third_party/WebKit/Source/core/style/StyleGridData.cpp
[delete] https://crrev.com/7928288383ccd59cd7037ad0a341645b2dc2475c/third_party/WebKit/Source/core/style/StyleGridData.h

Project Member

Comment 312 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/73351842a2c5ac44f922996874465039c1a8bc2b

commit 73351842a2c5ac44f922996874465039c1a8bc2b
Author: Naina Raisinghani <nainar@chromium.org>
Date: Fri Jun 16 05:50:13 2017

Generate accessors for BoxFlex{,Group}.

This patch changes the following storage_only fields to primitives:
BoxFlex{,Group}.

Diff: https://gist.github.com/nainar/ceadf28b8a152809e102df5e0de42c9a/revisions

Bug:  628043 
Change-Id: Ia81bb5ec22a57a2f3a9dcb35021b5a5112b0bb6b
Reviewed-on: https://chromium-review.googlesource.com/536583
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479960}
[modify] https://crrev.com/73351842a2c5ac44f922996874465039c1a8bc2b/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/73351842a2c5ac44f922996874465039c1a8bc2b/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 313 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/799caf960951cd65edca1e44c59d16f9769cd2bb

commit 799caf960951cd65edca1e44c59d16f9769cd2bb
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 16 07:06:40 2017

Generate enum/getters/setters/mappings for user-drag

Currently, the user-drag property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EUserDrag enum and
use the generated CSSValueID <-> EUserDrag mappings.

Diff: https://gist.github.com/62b80577a855251fb6f37dcf096c29fb/revisions

Bug:  628043 
Change-Id: I439066be43a5515ba117e1cee52c1f0f178d5b13
Reviewed-on: https://chromium-review.googlesource.com/536218
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479977}
[modify] https://crrev.com/799caf960951cd65edca1e44c59d16f9769cd2bb/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/799caf960951cd65edca1e44c59d16f9769cd2bb/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/799caf960951cd65edca1e44c59d16f9769cd2bb/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/799caf960951cd65edca1e44c59d16f9769cd2bb/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 314 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14

commit 5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14
Author: Naina Raisinghani <nainar@chromium.org>
Date: Fri Jun 16 07:49:48 2017

Generate enum/getters/setters for transform-style.

Currently, the transform-style (named TransformStyle3D internally)
property is a 'storage_only' field, so it has no generated public
getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the ETransformStyle3D enum.
Although there are generated CSSValueID <-> ETransformStyle3D mappings,
they are not used because the handwritten code don't have them.

Diff: https://gist.github.com/nainar/56e680b491980fcb82332c616ab47c65/revisions

Bug:  628043 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I95ffd60c4edcc155b1b58a87f8f9380a22bc8b18
Reviewed-on: https://chromium-review.googlesource.com/536222
Reviewed-by: Darren Shen <shend@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479984}
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
[modify] https://crrev.com/5eb4cc9529a8a099a5f4b99fab6ad94f80bd9a14/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp

Project Member

Comment 315 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e1b10b8ab263cdf7846de378f2782985c3dd07eb

commit e1b10b8ab263cdf7846de378f2782985c3dd07eb
Author: Naina Raisinghani <nainar@chromium.org>
Date: Fri Jun 16 07:57:00 2017

Generate enum/getters/setters/mappings for PageSizeType and generate getters/setters for PageSize.

Currently, the PageSizeType property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EPageSizeType enum and
use the generated CSSValueID <-> EPageSizeType mappings.

Currently, the PageSize property is a 'storage_only' field, so
it has no generated public getters/setters. This patch changes it to an
'external' field so that its getters/setters can be generated as well.

Diff: https://gist.github.com/nainar/9f0f24e428c1371b82650892ba276982/revisions

BUG= 628043 

Change-Id: I6410b091cbe49fefe2d6147be081a9b600c49e51
Reviewed-on: https://chromium-review.googlesource.com/536214
Reviewed-by: Darren Shen <shend@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479987}
[modify] https://crrev.com/e1b10b8ab263cdf7846de378f2782985c3dd07eb/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/e1b10b8ab263cdf7846de378f2782985c3dd07eb/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
[modify] https://crrev.com/e1b10b8ab263cdf7846de378f2782985c3dd07eb/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/e1b10b8ab263cdf7846de378f2782985c3dd07eb/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/e1b10b8ab263cdf7846de378f2782985c3dd07eb/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Project Member

Comment 316 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a47de419e1bfe822c253788aaeb3c07f29854339

commit a47de419e1bfe822c253788aaeb3c07f29854339
Author: Markus Heintz <markusheintz@chromium.org>
Date: Fri Jun 16 09:16:05 2017

Revert "Generate enum/getters/setters/mappings for PageSizeType and generate getters/setters for PageSize."

This reverts commit e1b10b8ab263cdf7846de378f2782985c3dd07eb.

Reason for revert: 
seems to cause compile issues on  https://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20x86-generic%20Compile

Original change's description:
> Generate enum/getters/setters/mappings for PageSizeType and generate getters/setters for PageSize.
> 
> Currently, the PageSizeType property is a 'storage_only' field, so
> it has no generated public getters/setters.
> 
> This patch changes it to a 'keyword' field so that its getters/setters
> can be generated as well. We also generate the EPageSizeType enum and
> use the generated CSSValueID <-> EPageSizeType mappings.
> 
> Currently, the PageSize property is a 'storage_only' field, so
> it has no generated public getters/setters. This patch changes it to an
> 'external' field so that its getters/setters can be generated as well.
> 
> Diff: https://gist.github.com/nainar/9f0f24e428c1371b82650892ba276982/revisions
> 
> BUG= 628043 
> 
> Change-Id: I6410b091cbe49fefe2d6147be081a9b600c49e51
> Reviewed-on: https://chromium-review.googlesource.com/536214
> Reviewed-by: Darren Shen <shend@chromium.org>
> Reviewed-by: meade_UTC10 <meade@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Commit-Queue: nainar <nainar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#479987}

TBR=haraken@chromium.org,nainar@chromium.org,meade@chromium.org,shend@chromium.org

Change-Id: I6f6856f8b34f5b137dae2d31a2d7dfdb6c21df89
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  628043 
Reviewed-on: https://chromium-review.googlesource.com/538632
Reviewed-by: Markus Heintz <markusheintz@chromium.org>
Commit-Queue: Markus Heintz <markusheintz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479998}
[modify] https://crrev.com/a47de419e1bfe822c253788aaeb3c07f29854339/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/a47de419e1bfe822c253788aaeb3c07f29854339/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
[modify] https://crrev.com/a47de419e1bfe822c253788aaeb3c07f29854339/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/a47de419e1bfe822c253788aaeb3c07f29854339/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/a47de419e1bfe822c253788aaeb3c07f29854339/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Project Member

Comment 317 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ff467ab4028bc7439d748ebf14394a81a801742b

commit ff467ab4028bc7439d748ebf14394a81a801742b
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 16 09:42:16 2017

Generate getters/setters for animation related running flags.

This patch generates getters/setters for:
- RunningOpacityAnimationOnCompositor
- RunningTransformAnimationOnCompositor
- RunningFilterAnimationOnCompositor
- RunningBackdropFilterAnimationOnCompositor

Diff: https://gist.github.com/66c13b8c1e3834ccd34283af242f137d/revisions

Bug:  628043 
Change-Id: I78be0a724e9fe1666d681ee31297ffff510f1a89
Reviewed-on: https://chromium-review.googlesource.com/536536
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480004}
[modify] https://crrev.com/ff467ab4028bc7439d748ebf14394a81a801742b/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/ff467ab4028bc7439d748ebf14394a81a801742b/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 318 by bugdroid1@chromium.org, Jun 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c614d37c43ee55267cdf9c758f910cc54ce346b9

commit c614d37c43ee55267cdf9c758f910cc54ce346b9
Author: Darren Shen <shend@chromium.org>
Date: Sat Jun 17 09:47:08 2017

Generate enum/getters/setters/mappings for text-overflow

Currently, the text-overflow property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the ETextOverflow enum and
use the generated CSSValueID <-> ETextOverflow mappings.

Diff of generated files:
https://gist.github.com/e1fab4f5465cda4efbc79c15ec5e2bfe/revisions

Bug:  628043 
Change-Id: I43b2808181780dd4ad7c90200c1f84884b4629c3
Reviewed-on: https://chromium-review.googlesource.com/536217
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480284}
[modify] https://crrev.com/c614d37c43ee55267cdf9c758f910cc54ce346b9/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/c614d37c43ee55267cdf9c758f910cc54ce346b9/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/c614d37c43ee55267cdf9c758f910cc54ce346b9/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/c614d37c43ee55267cdf9c758f910cc54ce346b9/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 319 by bugdroid1@chromium.org, Jun 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b6c0c88d47632077dc341bbdccdbcf4c6756868

commit 1b6c0c88d47632077dc341bbdccdbcf4c6756868
Author: Naina Raisinghani <nainar@chromium.org>
Date: Sat Jun 17 10:06:00 2017

Generate {enum/getters/,}setters/mappings for {text-decoration-style,text-decoration-color}.

Currently, the text-decoration-style property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the ETextDecorationStyle enum and
use the generated CSSValueID <-> ETextDecorationStyle mappings.

Currently, the text-decoration-color property is a 'storage_only' field, so
it has no generated public getters/setters. This patch changes it to an
'external' field so that its getters/setters can be generated as well.

Diff: https://gist.github.com/nainar/49078d95b56a6df0beb6e03ecb75a0f9/revisions

BUG= 628043 

Change-Id: I7b1e280c5dfca8ebdf37256f772248bda3135be6
Reviewed-on: https://chromium-review.googlesource.com/536534
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480297}
[modify] https://crrev.com/1b6c0c88d47632077dc341bbdccdbcf4c6756868/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/1b6c0c88d47632077dc341bbdccdbcf4c6756868/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/1b6c0c88d47632077dc341bbdccdbcf4c6756868/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/1b6c0c88d47632077dc341bbdccdbcf4c6756868/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 320 by bugdroid1@chromium.org, Jun 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f67c99422c89423538b74def4c562a7df324fc1a

commit f67c99422c89423538b74def4c562a7df324fc1a
Author: Darren Shen <shend@chromium.org>
Date: Mon Jun 19 01:35:14 2017

Generate enum/getters/setters for -webkit-app-region.

Currently, the -webkit-app-region (named DraggableRegionMode internally)
property is a 'storage_only' field, so it has no generated public
getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EDraggableRegionMode enum.
Although there are generated CSSValueID <-> EDraggableRegionMode mappings,
they are not used because the handwritten code don't have them.

Diff: https://gist.github.com/306bffcc27ca5a1ae5f1b2019750cd60/revisions

Bug:  628043 
Change-Id: I5c4f4d5e007ddd45702ada4bcbc28773f9a46318
Reviewed-on: https://chromium-review.googlesource.com/536676
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480328}
[modify] https://crrev.com/f67c99422c89423538b74def4c562a7df324fc1a/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/f67c99422c89423538b74def4c562a7df324fc1a/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/f67c99422c89423538b74def4c562a7df324fc1a/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/f67c99422c89423538b74def4c562a7df324fc1a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 321 by bugdroid1@chromium.org, Jun 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b3b8908c9617ca98898ce767c67dacd5a41a8a51

commit b3b8908c9617ca98898ce767c67dacd5a41a8a51
Author: Naina Raisinghani <nainar@chromium.org>
Date: Mon Jun 19 01:48:46 2017

Generate enum/getters/setters/mappings for resize

Currently, the resize property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EResize enum and
use the generated CSSValueID <-> EResize mappings.

Diff: https://gist.github.com/nainar/de2cc565a04bae3e08b4ab5df1c981a7/revisions

BUG= 628043 

Change-Id: I939599a958396b2dc2e056afbe3d7bfe2207e4ff
Reviewed-on: https://chromium-review.googlesource.com/536573
Commit-Queue: nainar <nainar@chromium.org>
Reviewed-by: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480330}
[modify] https://crrev.com/b3b8908c9617ca98898ce767c67dacd5a41a8a51/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/b3b8908c9617ca98898ce767c67dacd5a41a8a51/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/b3b8908c9617ca98898ce767c67dacd5a41a8a51/third_party/WebKit/Source/core/css/CSSValueIDMappings.h
[modify] https://crrev.com/b3b8908c9617ca98898ce767c67dacd5a41a8a51/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/b3b8908c9617ca98898ce767c67dacd5a41a8a51/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 322 by bugdroid1@chromium.org, Jun 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cd4e730743d522affeae07a1280792359f7856b1

commit cd4e730743d522affeae07a1280792359f7856b1
Author: Naina Raisinghani <nainar@chromium.org>
Date: Mon Jun 19 04:16:45 2017

Generate enum/getters/setters/mappings for PageSizeType and generate getters/setters for PageSize.

Currently, the PageSizeType property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EPageSizeType enum and
use the generated CSSValueID <-> EPageSizeType mappings.

Currently, the PageSize property is a 'storage_only' field, so
it has no generated public getters/setters. This patch changes it to an
'external' field so that its getters/setters can be generated as well.

Diff: https://gist.github.com/nainar/56c531266c03e887ba3d94fdcb5d4dbe/revisions

BUG= 628043 

Change-Id: Ifbd64f6d98bff06be6e46ce5ae7e3a5ceeb081a3
Reviewed-on: https://chromium-review.googlesource.com/538396
Reviewed-by: Darren Shen <shend@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480343}
[modify] https://crrev.com/cd4e730743d522affeae07a1280792359f7856b1/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/cd4e730743d522affeae07a1280792359f7856b1/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
[modify] https://crrev.com/cd4e730743d522affeae07a1280792359f7856b1/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/cd4e730743d522affeae07a1280792359f7856b1/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/cd4e730743d522affeae07a1280792359f7856b1/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
[modify] https://crrev.com/cd4e730743d522affeae07a1280792359f7856b1/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Project Member

Comment 323 by bugdroid1@chromium.org, Jun 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d98c08f75e5c26f49a9e05e9d0946a2f6d29d3f0

commit d98c08f75e5c26f49a9e05e9d0946a2f6d29d3f0
Author: shend <shend@chromium.org>
Date: Tue Jun 20 22:22:02 2017

Generate enum/getters/setters/mappings for flex-direction

Currently, the flex-direction property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EFlexDirection enum and
use the generated CSSValueID <-> EFlexDirection mappings.

Diff: https://gist.github.com/297d38d32b4b097536e73f7c1bd1b3d7/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2942393002
Cr-Original-Commit-Position: refs/heads/master@{#480688}
Committed: https://chromium.googlesource.com/chromium/src/+/d6df17438f4c6ae0a69e5650f63d0cd6c8d72a00
Review-Url: https://codereview.chromium.org/2942393002
Cr-Commit-Position: refs/heads/master@{#480993}

[modify] https://crrev.com/d98c08f75e5c26f49a9e05e9d0946a2f6d29d3f0/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/d98c08f75e5c26f49a9e05e9d0946a2f6d29d3f0/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/d98c08f75e5c26f49a9e05e9d0946a2f6d29d3f0/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/d98c08f75e5c26f49a9e05e9d0946a2f6d29d3f0/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 324 by bugdroid1@chromium.org, Jun 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e7c6ec4df78665f215e1a267fc89590a8205563

commit 6e7c6ec4df78665f215e1a267fc89590a8205563
Author: shend <shend@chromium.org>
Date: Wed Jun 21 01:49:28 2017

Generate enum/getters/setters/mappings for flex-wrap

Currently, the flex-wrap property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'keyword' field so that its getters/setters
can be generated as well. We also generate the EFlexWrap enum and
use the generated CSSValueID <-> EFlexWrap mappings.

Diff: https://gist.github.com/cf118a1b16d0d7f12b32dbf644be638a/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2944193002
Cr-Commit-Position: refs/heads/master@{#481078}

[modify] https://crrev.com/6e7c6ec4df78665f215e1a267fc89590a8205563/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/6e7c6ec4df78665f215e1a267fc89590a8205563/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/6e7c6ec4df78665f215e1a267fc89590a8205563/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/6e7c6ec4df78665f215e1a267fc89590a8205563/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 325 by bugdroid1@chromium.org, Jun 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a20289ff3503b8203af4f9f8a3ce5f30953bbf01

commit a20289ff3503b8203af4f9f8a3ce5f30953bbf01
Author: shend <shend@chromium.org>
Date: Wed Jun 21 03:26:51 2017

Generate getters/setters for remaining flex-* properties.

This patch changes the following storage_only fields to be primitive
or external fields:
- flex-basis
- flex-grow
- flex-shrink

so that their getters/setters can be generated.

Diff: https://gist.github.com/cdc56f6747da1a925498c52831557fa2/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2943413003
Cr-Commit-Position: refs/heads/master@{#481102}

[modify] https://crrev.com/a20289ff3503b8203af4f9f8a3ce5f30953bbf01/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/a20289ff3503b8203af4f9f8a3ce5f30953bbf01/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 326 by bugdroid1@chromium.org, Jun 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34fa46a73b746e90588095275dd336f4614ed54b

commit 34fa46a73b746e90588095275dd336f4614ed54b
Author: Darren Shen <shend@chromium.org>
Date: Wed Jun 21 07:20:41 2017

Generate getters/setters for various flag fields in ComputedStyle.

This patch changes the following storage_only fields to be primitive
fields:
- SelfOrAncestorHasDirAutoAttribute
- HasCurrentOpacityAnimation
- HasCurrentTransformAnimation
- HasCurrentFilterAnimation
- HasCurrentBackdropFilterAnimation
- IsStackingContext
- RequiresAcceleratedCompositingForExternalReasons
- HasInlineTransform
- HasCompositorProxy
- HasAuthorBackground
- HasAuthorBorder

so that their getter/setters can be generated.

Diff: https://gist.github.com/643df772b40578c4a5b74da8a5feaa20/revisions

Bug:  628043 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I3320d353989400bcc30dea114fd8ad0b83dfbea8
Reviewed-on: https://chromium-review.googlesource.com/538521
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481132}
[modify] https://crrev.com/34fa46a73b746e90588095275dd336f4614ed54b/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/34fa46a73b746e90588095275dd336f4614ed54b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
[modify] https://crrev.com/34fa46a73b746e90588095275dd336f4614ed54b/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/34fa46a73b746e90588095275dd336f4614ed54b/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp

Project Member

Comment 327 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d19bc447bbbd4147acade9a1c9243c49ce5a51f4

commit d19bc447bbbd4147acade9a1c9243c49ce5a51f4
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 22 00:05:47 2017

Generate getters/setters for scroll-snap-align.

Currently, the scroll-snap-align property is a 'storage_only' field, so
it has no generated public getters/setters.

This patch changes it to a 'external' field so that its getters/setters
can be generated as well.

Bug:  628043 
Change-Id: I797cfd07c76742fc542dab4cceadefd81a7d42fc
Reviewed-on: https://chromium-review.googlesource.com/542216
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481363}
[modify] https://crrev.com/d19bc447bbbd4147acade9a1c9243c49ce5a51f4/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/d19bc447bbbd4147acade9a1c9243c49ce5a51f4/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 328 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7be23cd3d8fc0d05f84c76768072f32f4e51cba0

commit 7be23cd3d8fc0d05f84c76768072f32f4e51cba0
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 22 06:30:14 2017

Generate getters/setters for alignment properties.

Currently, alignment properties are stored as 'storage_only' fields,
which means they don't have generated getters/setters.

This patch changes them to 'external' fields so that their getters
and setters can be generated as well.

Diff: https://gist.github.com/df1b29ac0e0f5220e52fc3f75785a0bf/revisions

Bug:  628043 
Change-Id: Ia41027088f283e90d22d0e556a24a723c62ad9d6
Reviewed-on: https://chromium-review.googlesource.com/541241
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481462}
[modify] https://crrev.com/7be23cd3d8fc0d05f84c76768072f32f4e51cba0/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/7be23cd3d8fc0d05f84c76768072f32f4e51cba0/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 329 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f50e2dcfad8c3e03eb9445243e4b5e8fccf15b87

commit f50e2dcfad8c3e03eb9445243e4b5e8fccf15b87
Author: Naina Raisinghani <nainar@chromium.org>
Date: Thu Jun 22 06:49:11 2017

Split ColumnRule field in ComputedStyle.

Currently, column-rule related properties are being stored as a single
BorderValue called ColumnRule. However, it is possible to split
ColumnRule into its constituent fields and generate each of them
individually.

There should be no performance impact from this patch.

Diff: https://gist.github.com/3b5a55b0cedff7b4d7b9c1b196faf5a9/revisions

Bug:  628043 
Change-Id: I04fe9e7f3c9221614870f7de0b2f1c05c023ee4a
Reviewed-on: https://chromium-review.googlesource.com/544415
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481468}
[modify] https://crrev.com/f50e2dcfad8c3e03eb9445243e4b5e8fccf15b87/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/f50e2dcfad8c3e03eb9445243e4b5e8fccf15b87/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/f50e2dcfad8c3e03eb9445243e4b5e8fccf15b87/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 330 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e7c136536251cfcf2d8b56d5c28bbf4919759e2d

commit e7c136536251cfcf2d8b56d5c28bbf4919759e2d
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 22 06:58:06 2017

Revert "Split ColumnRule field in ComputedStyle."

This reverts commit f50e2dcfad8c3e03eb9445243e4b5e8fccf15b87.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Split ColumnRule field in ComputedStyle.
> 
> Currently, column-rule related properties are being stored as a single
> BorderValue called ColumnRule. However, it is possible to split
> ColumnRule into its constituent fields and generate each of them
> individually.
> 
> There should be no performance impact from this patch.
> 
> Diff: https://gist.github.com/3b5a55b0cedff7b4d7b9c1b196faf5a9/revisions
> 
> Bug:  628043 
> Change-Id: I04fe9e7f3c9221614870f7de0b2f1c05c023ee4a
> Reviewed-on: https://chromium-review.googlesource.com/544415
> Commit-Queue: Darren Shen <shend@chromium.org>
> Reviewed-by: nainar <nainar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#481468}

TBR=nainar@chromium.org,shend@chromium.org

Change-Id: I6a21392b25ada865384bb358f5bfd1205fd20488
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  628043 
Reviewed-on: https://chromium-review.googlesource.com/544442
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481469}
[modify] https://crrev.com/e7c136536251cfcf2d8b56d5c28bbf4919759e2d/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/e7c136536251cfcf2d8b56d5c28bbf4919759e2d/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/e7c136536251cfcf2d8b56d5c28bbf4919759e2d/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 331 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9379b78ca98d9dac36aaf1d27b5341942df413f3

commit 9379b78ca98d9dac36aaf1d27b5341942df413f3
Author: Vaclav Brozek <vabr@chromium.org>
Date: Thu Jun 22 07:01:43 2017

Revert "Split ColumnRule field in ComputedStyle."

This reverts commit f50e2dcfad8c3e03eb9445243e4b5e8fccf15b87.

Reason for revert: This seems to have broken https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac%20Builder/builds/210181

Original change's description:
> Split ColumnRule field in ComputedStyle.
> 
> Currently, column-rule related properties are being stored as a single
> BorderValue called ColumnRule. However, it is possible to split
> ColumnRule into its constituent fields and generate each of them
> individually.
> 
> There should be no performance impact from this patch.
> 
> Diff: https://gist.github.com/3b5a55b0cedff7b4d7b9c1b196faf5a9/revisions
> 
> Bug:  628043 
> Change-Id: I04fe9e7f3c9221614870f7de0b2f1c05c023ee4a
> Reviewed-on: https://chromium-review.googlesource.com/544415
> Commit-Queue: Darren Shen <shend@chromium.org>
> Reviewed-by: nainar <nainar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#481468}

TBR=nainar@chromium.org,shend@chromium.org

Change-Id: I73d7f15c27af4f1e6222d0ca56d50c9983a12bfc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  628043 
Reviewed-on: https://chromium-review.googlesource.com/544815
Reviewed-by: Vaclav Brozek <vabr@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481470}

Comment 332 by vabr@chromium.org, Jun 22 2017

More info about the reasons for the above revert:
Broken build:
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac%20Builder/builds/210181

Relevant log:
[456/4958] ACTION //third_party/WebKit/Source/core:make_core_generated_computed_style_base(//build/toolchain/mac:clang_x64)
FAILED: gen/blink/core/ComputedStyleBase.h gen/blink/core/ComputedStyleBase.cpp gen/blink/core/ComputedStyleBaseConstants.h 
python ../../third_party/WebKit/Source/build/scripts/make_computed_style_base.py ../../third_party/WebKit/Source/core/css/CSSProperties.json5 ../../third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5 ../../third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 --output_dir gen/blink/core --gperf gperf
Traceback (most recent call last):
  File "../../third_party/WebKit/Source/build/scripts/make_computed_style_base.py", line 545, in <module>
    json5_generator.Maker(ComputedStyleBaseWriter).main()
  File "/b/c/b/mac_layout/src/third_party/WebKit/Source/build/scripts/json5_generator.py", line 248, in main
    writer = self._writer_class(args.files)
  File "../../third_party/WebKit/Source/build/scripts/make_computed_style_base.py", line 508, in __init__
    ).name_dictionaries, self._root_group)
  File "../../third_party/WebKit/Source/build/scripts/make_computed_style_base.py", line 260, in _create_diff_groups_map
    "Please check that there's an entry for '" + name + "' in CSSProperties.json5 or ComputedStyleExtraFields.json5")
AssertionError: The field 'ColumnRule' isn't a defined field on ComputedStyle. Please check that there's an entry for 'ColumnRule' in CSSProperties.json5 or ComputedStyleExtraFields.json5
Project Member

Comment 333 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/223c981c98e3ceb907115d2601c7c6a565295899

commit 223c981c98e3ceb907115d2601c7c6a565295899
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 22 23:28:05 2017

Split ColumnRule field in ComputedStyle.

Currently, column-rule related properties are being stored as a single
BorderValue called ColumnRule. However, it is possible to split
ColumnRule into its constituent fields and generate each of them
individually.

There should be no performance impact from this patch.

Diff: https://gist.github.com/955fa418e240be79c0521d7d53e26ca7/revisions

Bug:  628043 
Change-Id: I31db806f2fc427eb996ba78ef56dce17e5bc83d5
Reviewed-on: https://chromium-review.googlesource.com/544479
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481717}
[modify] https://crrev.com/223c981c98e3ceb907115d2601c7c6a565295899/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/223c981c98e3ceb907115d2601c7c6a565295899/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
[modify] https://crrev.com/223c981c98e3ceb907115d2601c7c6a565295899/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/223c981c98e3ceb907115d2601c7c6a565295899/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/223c981c98e3ceb907115d2601c7c6a565295899/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 334 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ae7bd7622227407c94abdc105b38e7f7159bbe92

commit ae7bd7622227407c94abdc105b38e7f7159bbe92
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 23 00:58:26 2017

Prevent field_size from being specified on keyword fields.

Currently, there are a few keyword fields that also specify field_size.
This is misleading, because the size for keyword fields are
automatically calculated from the number of keywords, so field_size is
ignored.

This patch removes any references to field_size in keyword fields. It
also adds an assert in make_computed_style_base to prevent this from
happening in the future.

This patch does not change generated code.

Bug:  628043 
Change-Id: Ie9e6bb17d084d8dc96811b2ab2ab76c0c8849e0e
Reviewed-on: https://chromium-review.googlesource.com/540935
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Bugs Nash <bugsnash@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481754}
[modify] https://crrev.com/ae7bd7622227407c94abdc105b38e7f7159bbe92/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/ae7bd7622227407c94abdc105b38e7f7159bbe92/third_party/WebKit/Source/core/css/CSSProperties.json5

Project Member

Comment 335 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/451b82cdd84a6f640362ff52f207ea43f668bd11

commit 451b82cdd84a6f640362ff52f207ea43f668bd11
Author: Darren Shen <shend@chromium.org>
Date: Fri Jun 23 03:32:16 2017

Remove the need for field_size for storage_only when type_name is bool.

Currently, all boolean storage_only fields in ComputedStyle need to
specify field_size: 1. This is kind of redundant, because it will never
be any other value.

This patch removes the need to specifiy field_size for boolean
storage_only fields.

This does not change generated code.

Bug:  628043 
Change-Id: Iccba6c299847c35e3a4c2fd19d4d2f9e85e3e62d
Reviewed-on: https://chromium-review.googlesource.com/544475
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481804}
[modify] https://crrev.com/451b82cdd84a6f640362ff52f207ea43f668bd11/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/451b82cdd84a6f640362ff52f207ea43f668bd11/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5

Project Member

Comment 336 by bugdroid1@chromium.org, Jun 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e45f57004eba039e573e2596714e3f143815737

commit 8e45f57004eba039e573e2596714e3f143815737
Author: Darren Shen <shend@chromium.org>
Date: Sat Jun 24 02:53:31 2017

Remove unused type_name declarations in CSSProperties.json5.

The type_name for fields in CSSProperties.json5 are automatically
deduced to be 'E' + <name of field>. Explicitly specifying type_name
would override this. However, there are some fields where the type_name
specified is the same as the default, so they don't do anything. This
patch removes them.

This patch does not change generated code.

Bug:  628043 
Change-Id: I8641c003a83c43e350b5e1f92fcba91bced8b771
Reviewed-on: https://chromium-review.googlesource.com/544366
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482126}
[modify] https://crrev.com/8e45f57004eba039e573e2596714e3f143815737/third_party/WebKit/Source/core/css/CSSProperties.json5

Project Member

Comment 337 by bugdroid1@chromium.org, Jun 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b2543b5d009a924286be4144384890f82d8cc180

commit b2543b5d009a924286be4144384890f82d8cc180
Author: Darren Shen <shend@chromium.org>
Date: Sat Jun 24 17:19:43 2017

Add include_paths to all the required fields in style JSON files.

This patch adds any missing include_paths to all the fields in
CSSProperties.json5 and ComputedStyleExtraFields.json5.

Bug:  628043 
Change-Id: I8bbf3e4e9c8794319cc12c3cc246713e2750bec3
Reviewed-on: https://chromium-review.googlesource.com/544412
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482151}
[modify] https://crrev.com/b2543b5d009a924286be4144384890f82d8cc180/third_party/WebKit/Source/core/css/CSSProperties.json5

Project Member

Comment 338 by bugdroid1@chromium.org, Jun 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a1744a232492c4cc012fc2c6c0b11b7a0ed0b8cf

commit a1744a232492c4cc012fc2c6c0b11b7a0ed0b8cf
Author: Darren Shen <shend@chromium.org>
Date: Mon Jun 26 00:44:05 2017

Remove unused functions and macros in ComputedStyle.h

This patch removes compareEqual and SET_* macros in ComputedStyle.h.

Bug:  628043 
Change-Id: I437291d2772a842acc88e6b7f3f41d80273e5790
Reviewed-on: https://chromium-review.googlesource.com/544725
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482179}
[modify] https://crrev.com/a1744a232492c4cc012fc2c6c0b11b7a0ed0b8cf/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 339 by bugdroid1@chromium.org, Jun 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a648e1a4e315410950c444b6e118a4a3262872f

commit 2a648e1a4e315410950c444b6e118a4a3262872f
Author: Naina Raisinghani <nainar@chromium.org>
Date: Mon Jun 26 07:16:07 2017

Add ComputedStyle.md to explain generation of ComputedStyle

Bug:  628043 
Change-Id: Ib5904a40a8a4c6d04224cae70b18cfc2b50090a3
Reviewed-on: https://chromium-review.googlesource.com/546797
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482208}
[add] https://crrev.com/2a648e1a4e315410950c444b6e118a4a3262872f/third_party/WebKit/Source/core/style/ComputedStyle.md

Project Member

Comment 340 by bugdroid1@chromium.org, Jun 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/380d8aa4d0fee556f19c7176809cfca1414149cb

commit 380d8aa4d0fee556f19c7176809cfca1414149cb
Author: Darren Shen <shend@chromium.org>
Date: Tue Jun 27 05:59:34 2017

Move some extra fields to CSSProperties.json5.

This patch moves some extra fields from ComputedStyleExtraFields.json5
to CSSProperties.json5.

This does not change generated code (apart from trivial renames).

Bug:  628043 
Change-Id: I30cbc4b71d734630987441e4f29b6f37c69dad40
Reviewed-on: https://chromium-review.googlesource.com/549735
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482546}
[modify] https://crrev.com/380d8aa4d0fee556f19c7176809cfca1414149cb/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/380d8aa4d0fee556f19c7176809cfca1414149cb/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
[modify] https://crrev.com/380d8aa4d0fee556f19c7176809cfca1414149cb/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/380d8aa4d0fee556f19c7176809cfca1414149cb/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 341 by bugdroid1@chromium.org, Jun 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06083fbf5d49b0dce17d6b86cb82b79dd3305005

commit 06083fbf5d49b0dce17d6b86cb82b79dd3305005
Author: Darren Shen <shend@chromium.org>
Date: Wed Jun 28 07:29:26 2017

Change non-null pointers to refs and sprinkle DCHECKS in ComputedStyle.

This patch changes pointers that cannot be null to references. It also
adds DCHECKS to callers when they dereference a non-null pointer.

Bug:  628043 
Change-Id: Ia48bb9057ef4ab6dbeef37f9981eb7fbd0fe4e2b
Reviewed-on: https://chromium-review.googlesource.com/551116
Reviewed-by: Bugs Nash <bugsnash@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482913}
[modify] https://crrev.com/06083fbf5d49b0dce17d6b86cb82b79dd3305005/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
[modify] https://crrev.com/06083fbf5d49b0dce17d6b86cb82b79dd3305005/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
[modify] https://crrev.com/06083fbf5d49b0dce17d6b86cb82b79dd3305005/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/06083fbf5d49b0dce17d6b86cb82b79dd3305005/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
[modify] https://crrev.com/06083fbf5d49b0dce17d6b86cb82b79dd3305005/third_party/WebKit/Source/core/layout/LayoutInline.cpp
[modify] https://crrev.com/06083fbf5d49b0dce17d6b86cb82b79dd3305005/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/06083fbf5d49b0dce17d6b86cb82b79dd3305005/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/06083fbf5d49b0dce17d6b86cb82b79dd3305005/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 342 by bugdroid1@chromium.org, Jun 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df2edf98823c4d28a8f5c8a70a5ab84e214c564b

commit df2edf98823c4d28a8f5c8a70a5ab84e214c564b
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 29 01:59:33 2017

Remove DCHECK(Style()) calls and use StyleRef() instead.

This patch removes the DCHECKs added in [1], and replaces them with
StyleRef() calls which already perform the DCHECK. This makes the code
look cleaner.

[1] https://chromium-review.googlesource.com/c/551116/

Bug:  628043 
Change-Id: I125890524d09abb35e0e1b224b6e2518d88894cb
Reviewed-on: https://chromium-review.googlesource.com/553797
Reviewed-by: Rune Lillesveen <rune@opera.com>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483255}
[modify] https://crrev.com/df2edf98823c4d28a8f5c8a70a5ab84e214c564b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
[modify] https://crrev.com/df2edf98823c4d28a8f5c8a70a5ab84e214c564b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
[modify] https://crrev.com/df2edf98823c4d28a8f5c8a70a5ab84e214c564b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/df2edf98823c4d28a8f5c8a70a5ab84e214c564b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
[modify] https://crrev.com/df2edf98823c4d28a8f5c8a70a5ab84e214c564b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
[modify] https://crrev.com/df2edf98823c4d28a8f5c8a70a5ab84e214c564b/third_party/WebKit/Source/core/layout/LayoutObject.h

Project Member

Comment 343 by bugdroid1@chromium.org, Jun 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac

commit f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac
Author: Naina Raisinghani <nainar@chromium.org>
Date: Fri Jun 30 02:51:39 2017

Add pointer field_template to CSSProperties.json5

This patch adds the field template 'pointer' to CSSProperties.json5.
It also moves fields that are RefPtrs from storage_only to pointer.

This allows us to generate their public accessors and remove more
handwritten code.

Diff: https://gist.github.com/nainar/dbc92f104f6b35cc09fd29497d3fac3d/revisions

Bug:  628043 
Change-Id: Iae7424742b5b49e9a59ce5aaa99caae8621295e5
Reviewed-on: https://chromium-review.googlesource.com/554400
Commit-Queue: nainar <nainar@chromium.org>
Reviewed-by: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483605}
[modify] https://crrev.com/f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
[modify] https://crrev.com/f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
[add] https://crrev.com/f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac/third_party/WebKit/Source/build/scripts/templates/fields/pointer.tmpl
[modify] https://crrev.com/f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac/third_party/WebKit/Source/core/style/ComputedStyle.cpp
[modify] https://crrev.com/f63145fd1ebc971aa9d5cb0b8b734f0c3b6bc4ac/third_party/WebKit/Source/core/style/ComputedStyle.h

Project Member

Comment 344 by bugdroid1@chromium.org, Jul 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3cbb82af46309fd12ccbe36fd6434844ddf645a1

commit 3cbb82af46309fd12ccbe36fd6434844ddf645a1
Author: shend <shend@chromium.org>
Date: Tue Jul 04 01:19:40 2017

Add keyword_subset field template and generate text-decoration-line.

This patch adds support for generating 'keyword_subset' fields in
ComputedStyleBase. 'keyword_subset' fields can take on a subset of
keywords. For example, the text-decoration-line property can be any
combination of underline, overline, line-through or blink.

To support 'keyword_subset', we create a new class in the generator
called Enum to represent both 'keyword' and 'keyword_subset' enums.
In ComputedStyleBaseConstants.h.tmpl, we generate different code
depending on whether the enum is a set or not. Unlike 'keyword' enums,
a 'keyword_subset' enum has explicit values and supports bitwise operators.

Diff of generated files:
https://gist.github.com/darrnshn/70d7a9e1ef02aee205b5c1d42d4df3bb/revisions

BUG= 628043 

Review-Url: https://codereview.chromium.org/2914613002
Cr-Commit-Position: refs/heads/master@{#484037}

[modify] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py
[modify] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
[modify] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBaseConstants.h.tmpl
[add] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/build/scripts/templates/fields/multi_keyword.tmpl
[modify] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
[modify] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/3cbb82af46309fd12ccbe36fd6434844ddf645a1/third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Project Member

Comment 345 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fae5c575bc1dd1686af81d1558e6ee8b3d38870d

commit fae5c575bc1dd1686af81d1558e6ee8b3d38870d
Author: Darren Shen <shend@chromium.org>
Date: Thu Jul 06 02:51:45 2017

Replace DataPersistent with DataRefs in ComputedStyle.

Currently, there are two fields of type DataPersistent in ComputedStyle:
filter and backdrop-filter. DataPersistent acts as a wrapper around
Persistent that has copy-on-write semantics (cheap shallow copies).

Previously, filter was stored like:

    class StyleRareNonInheritedData {
      // ...
      DataPersistent<StyleFilterData> filter_;
    };

    class DataPersistent {
      std::unique_ptr<Persistent<StyleFilterData>> data_;
    };

After this patch, it will look like:

    class StyleRareNonInheritedData {
      // ...
      DataRef<StyleFilterOpsData> filter_ops_;
    };

    class FilterOpsData : RefCounted<FilterOpsData> {
      Persistent<StyleFilterData> filter_;
    };

As we can see, this patch essentially wraps Persistent in a ref-counted
FilterOpsData class (which is generated).

The main differences that this patch introduces is what happens
when we do a shallow vs deep copy.

Before:
  Shallow copy:
    Allocate a new Persistent<StyleFilterData>.
  Deep copy:
    Allocate and copy a new StyleFilterData.

With patch:
  Shallow copy:
    No allocations (increment ref).
  Deep copy:
    Allocate a new StyleFilterOpsData.
    Allocate and copy a new StyleFilterData.

In summary, there are two main differences:
- Before, we allocated a Persistent, but with this patch we allocate a
  StyleFilterOpsData.
- Before, a shallow copy allocated a Persistent (which requires thread
  related logic), but with this patch, this allocation is delayed to
  deep copy.

Hence, this patch essentially moves a heap allocation from shallow to
deep copy. Since shallow copies occur more often than deep, this
should not harm performance.

We are also able to remove the DataPersistent class because it is no
longer useful.

Diff of generated files:
https://gist.github.com/d8aa34402e30e764c6d331d786c6fcdd/revisions

Bug:  628043 
Change-Id: Idc745555da232e0c903d1646d50dbc0e1393024c
Reviewed-on: https://chromium-review.googlesource.com/554590
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484447}
[modify] https://crrev.com/fae5c575bc1dd1686af81d1558e6ee8b3d38870d/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/fae5c575bc1dd1686af81d1558e6ee8b3d38870d/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
[modify] https://crrev.com/fae5c575bc1dd1686af81d1558e6ee8b3d38870d/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/fae5c575bc1dd1686af81d1558e6ee8b3d38870d/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
[modify] https://crrev.com/fae5c575bc1dd1686af81d1558e6ee8b3d38870d/third_party/WebKit/Source/core/style/BUILD.gn
[modify] https://crrev.com/fae5c575bc1dd1686af81d1558e6ee8b3d38870d/third_party/WebKit/Source/core/style/ComputedStyle.h
[modify] https://crrev.com/fae5c575bc1dd1686af81d1558e6ee8b3d38870d/third_party/WebKit/Source/core/style/DataEquivalency.h
[delete] https://crrev.com/93fc3e41c9acda3fe3b2abca635f995f18889d8f/third_party/WebKit/Source/core/style/DataPersistent.h
[modify] https://crrev.com/fae5c575bc1dd1686af81d1558e6ee8b3d38870d/third_party/WebKit/Source/core/style/MemberCopy.h

Project Member

Comment 346 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eab874dad7231044ad1e07bcc2d2989515c192ed

commit eab874dad7231044ad1e07bcc2d2989515c192ed
Author: Darren Shen <shend@chromium.org>
Date: Tue Jul 18 00:05:03 2017

Simplify name joining in make_computed_style_base.py.

Currently, when we wish to combine several strings together to form
the name for a class or data member for example, we have to use
join_name, which would combine the strings correctly in a space
separated format, followed by something like class_member_name that
formats the result into the correct style.

This patch allows things like class_member_name to take a list of
names, and join_name internally.

This does not change behaviour.

Bug:  628043 
Change-Id: Iae966e45b9dc80a14bb57cf477af580fb64c85fc
Reviewed-on: https://chromium-review.googlesource.com/532676
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487296}
[modify] https://crrev.com/eab874dad7231044ad1e07bcc2d2989515c192ed/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/eab874dad7231044ad1e07bcc2d2989515c192ed/third_party/WebKit/Source/build/scripts/name_utilities.py

Project Member

Comment 347 by bugdroid1@chromium.org, Jul 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/68011185cd0c3ab4f7b4276bee89cfd5c82c6813

commit 68011185cd0c3ab4f7b4276bee89cfd5c82c6813
Author: Minh-Duc Nguyen <nmduc@google.com>
Date: Wed Jul 19 03:38:41 2017

Fix call to all_fields instead of field

The current code has a minor bug on the generator that call
the wrong attribute field in the condition. Fix to
all_fields

Bug:  628043 
Change-Id: Ib0339e0ad0a84d495acfac2a991eec48a2244c29
Reviewed-on: https://chromium-review.googlesource.com/575296
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: Darren Shen <shend@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Minh-Duc Nguyen <nmduc@google.com>
Cr-Commit-Position: refs/heads/master@{#487739}
[modify] https://crrev.com/68011185cd0c3ab4f7b4276bee89cfd5c82c6813/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl

Status: Fixed (was: Started)
Showing comments 249 - 348 of 348 Older

Sign in to add a comment