Automate generation of computedProperties
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Oct 2019 04:22:07 +0000 (04:22 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Oct 2019 04:22:07 +0000 (04:22 +0000)
commit76545707ba829f0e633a6e31dabb08354cd4aed9
tree3d5b2d9430640e15fa25187463c6a6a9098634ca
parentc923f26fdb950738059f9daa73dec31835fb8877
Automate generation of computedProperties
https://bugs.webkit.org/show_bug.cgi?id=198680
<rdar://problem/51507834>

Reviewed by Simon Fraser.

Source/WebCore:

A property should be listed as part of a `CSSStyleDeclaration` if:
 - it will not be skipped (`skip-builder`) when generating/building properties
 - it's not `internal-only`
 - it has more than one non-`skip-builder`/non-`internal-only` property in `longhands`
    - if all the `longhands` are `skip-builder`/`internal-only` then the property doesn't
      really "have" any longhand properties
    - if there's only one property in `longhands`, then it's more of an alias than a longhand

* css/makeprop.pl:
(sortWithPrefixedPropertiesLast): Added.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::cssText const):
(WebCore::CSSComputedStyleDeclaration::length const):
(WebCore::CSSComputedStyleDeclaration::item const):
(WebCore::ComputedStyleExtractor::copyPropertiesInSet):
(WebCore::ComputedStyleExtractor::copyProperties):

* css/StyleProperties.h:
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::StyleProperties::copyPropertiesInSet):
(WebCore::MutableStyleProperties::create):

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/wpe/fast/css/getComputedStyle/computed-style-expected.txt:

* fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/mac-sierra/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* platform/wpe/fast/css/getComputedStyle/computed-style-font-family-expected.txt:

* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/wpe/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:

* svg/css/getComputedStyle-basic-expected.txt:
* platform/gtk/svg/css/getComputedStyle-basic-expected.txt:
* platform/ios/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt:
* platform/wpe/svg/css/getComputedStyle-basic-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/gtk/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/gtk/fast/css/getComputedStyle/computed-style-font-family-expected.txt
LayoutTests/platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/gtk/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-font-family-expected.txt
LayoutTests/platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/ios/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-font-family-expected.txt
LayoutTests/platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-font-family-expected.txt
LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/mac/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/wpe/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/wpe/fast/css/getComputedStyle/computed-style-font-family-expected.txt
LayoutTests/platform/wpe/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/wpe/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/svg/css/getComputedStyle-basic-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/StyleProperties.cpp
Source/WebCore/css/StyleProperties.h
Source/WebCore/css/makeprop.pl