-
shend authored
StyleSurroundData is a class that contains the values of the offset, margin, padding and border properties. This patch generates this class as a nested class inside ComputedStyle. We add an extra key in CSSProperties.json5 called 'field_group' that specifies the name of the group that the field is in. Fields with the same field_group are grouped together into a nested class. A few caveats: - Causes perf regression because it doesn't exploit sharing of groups. The fix is in a dependent patch (to avoid bloating this CL). We will land the fix right after this patch is landed. https://codereview.chromium.org/2826633002 - We generate 'border' as 'storage_only', because it is a shorthand and not a CSS property. - Subgroups are currently generated as nested classes of ComputedStyle, but this makes the code difficult to read. This may change in the future (such as putting subgroups in a ::detail namespace). - We don't ASSERT_SIZE on subgroups yet. Diff of generated files: https://gist.github.com/darrnshn/876c8171fd134b373f28ca23e821d28f/revisions BUG=628043 Review-Url: https://codereview.chromium.org/2786883002 Cr-Commit-Position: refs/heads/master@{#467239}
2692eeb5