haikuwebkit/LayoutTests/transitions
Sam Weinig e32526d787 Reduce compile time and binary size cost of enabling proper CSSStyleDeclaration property access behavior
https://bugs.webkit.org/show_bug.cgi?id=222518
<rdar://problem/75136887>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/css/cssom/cssstyledeclaration-properties-expected.txt:
Update test result now that it is passing.

Source/WebCore:

Re-implement proper (not using named-getters) support for the CSSStyleDeclaration bindings
using a new DelegateToSharedSyntheticAttribute extended atttribute which allows IDL attributes
to share a custom getter / setter implementation and delegate their implementation to it. When
using this functionality, the synthetic attribute's implementation is passed the original property
name so it can implement functionality based on it.

We use this for CSSStyleDeclaration by breaking the huge list of generated properties into
four groups, each with their own synthetic attribute. The groups are based on the different
transformation rules in the spec.

* bindings/js/JSDOMAttribute.h:
(WebCore::IDLAttribute::setPassingPropertyName):
(WebCore::IDLAttribute::getPassingPropertyName):
Add overloads of get/set that pass the property name to the provided function. These can't
be simple overloads of get/set as MSVC does not allow overloading with only a non-type
template parameters differentiating.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateInterface):
Eagerly generate the any synthetic attributes before the rest of code generation,
matching the behavior of other synthetic constructions like map/set/stringifiers.

(GetAttributeGetterName):
(GetAttributeSetterName):
Add special cases to getter/setter name generation to forward to the generated
name of the synthetic attribute when delegating.

(GenerateImplementation):
Extract attribute function forward declaration genation into a new GenerateAttributeGetterAndSetterDeclaration
subroutine and use it for generation of both normal and synthetic attributes. Also adds
synthetic attributes to the list of attributes to generate function implementations for.

(GenerateAttributeGetterAndSetterDeclaration):
Extracted from GenerateImplementation. Adds extra condition to bail if DelegateToSharedSyntheticAttribute
is specified.

(GenerateAttributeGetterBodyDefinition):
Add support for the new CallWith=PropertyName extended attribute by adding a PropertyName
argument to the signature of getter body if it is present. Removes now unnecessary support
for the CSSProperty extended attribute.

(GenerateAttributeGetterTrampolineDefinition):
Switch function name from get to getPassingPropertyName if CallWith=PropertyName is specified.

(GenerateAttributeGetterDefinition):
Adds extra condition to bail if DelegateToSharedSyntheticAttribute is specified.

(GenerateAttributeSetterBodyDefinition):
Add support for the new CallWith=PropertyName extended attribute by adding a PropertyName
argument to the signature of getter body if it is present. Removes now unnecessary support
for the CSSProperty extended attribute.

(GenerateAttributeSetterTrampolineDefinition):
Switch function name from get to getPassingPropertyName if CallWith=PropertyName is specified.

(GenerateAttributeSetterDefinition):
Adds extra condition to bail if DelegateToSharedSyntheticAttribute is specified.

(GenerateCallWith):
Add support for the PropertyName value to CallWith.

(MakeSharedSyntheticAttribute):
Helper to generate the synthetic attribute from the base attribute with DelegateToSharedSyntheticAttribute
specefied. Maintains all existing extended attributes of the base attribute except
DelegateToSharedSyntheticAttribute is replaced with IsSharedSyntheticAttribute to avoid
infinite recursion.

(AddSharedSyntheticAttributesIfNeeded):
Helper to find all delegating attributes and generate / store the synthetic attributes.

(GetSharedSyntheticAttribute):
Helper to get the corresponding synthetic attribute given an attribute with
DelegateToSharedSyntheticAttribute specified on it.

* bindings/scripts/IDLAttributes.json:
Removes CSSProperty. Adds DelegateToSharedSyntheticAttribute. Adds PropertyName value to
CallWith and SetterCallWith.

* css/CSSStyleDeclaration.cpp:
(WebCore::lookupCSSPropertyFromIDLAttribute):
(WebCore::CSSStyleDeclaration::propertyValueForCamelCasedIDLAttribute):
(WebCore::CSSStyleDeclaration::setPropertyValueForCamelCasedIDLAttribute):
(WebCore::CSSStyleDeclaration::propertyValueForWebKitCasedIDLAttribute):
(WebCore::CSSStyleDeclaration::setPropertyValueForWebKitCasedIDLAttribute):
(WebCore::CSSStyleDeclaration::propertyValueForDashedIDLAttribute):
(WebCore::CSSStyleDeclaration::setPropertyValueForDashedIDLAttribute):
(WebCore::CSSStyleDeclaration::propertyValueForEpubCasedIDLAttribute):
(WebCore::CSSStyleDeclaration::setPropertyValueForEpubCasedIDLAttribute):
(WebCore::CSSStyleDeclaration::namedItem): Deleted.
(WebCore::CSSStyleDeclaration::setNamedItem): Deleted.
(WebCore::CSSStyleDeclaration::supportedPropertyNames const): Deleted.
* css/CSSStyleDeclaration.h:
Replace named-getter based implementation with helpers based on the definitions
in the CSSOM spec (plus one special set for 'epub' specializations we currently
maintain).

* css/CSSStyleDeclaration.idl:
Remove !ENABLE_ATTRIBUTE_BASED_PROPERTIES_FOR_CSS_STYLE_DECLARATION sections now that
we can fully support ENABLE_ATTRIBUTE_BASED_PROPERTIES_FOR_CSS_STYLE_DECLARATION.

* css/makeprop.pl:
Remove !ENABLE_ATTRIBUTE_BASED_PROPERTIES_FOR_CSS_STYLE_DECLARATION sections now that
we can fully support ENABLE_ATTRIBUTE_BASED_PROPERTIES_FOR_CSS_STYLE_DECLARATION.
Replaces CSSProperty extended attributes with DelegateToSharedSyntheticAttribute and
CallWith=PropertyName, which together allow us to implement all the attributes with just
8 implementation functions.

* bindings/scripts/test/BindingTestGlobalConstructors.idl:
* bindings/scripts/test/JS/JSTestCSSProperty.cpp: Removed.
* bindings/scripts/test/JS/JSTestCSSProperty.h: Removed.
* bindings/scripts/test/JS/JSTestDelegateToSharedSyntheticAttribute.cpp: Added.
* bindings/scripts/test/JS/JSTestDelegateToSharedSyntheticAttribute.h: Added.
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/SupplementalDependencies.dep:
* bindings/scripts/test/TestCSSProperty.idl: Removed.
* bindings/scripts/test/TestDelegateToSharedSyntheticAttribute.idl: Added.
Replace CSSProperty tests with DelegateToSharedSyntheticAttribute tests and update results
all around for new generation.

Source/WTF:

* wtf/PlatformEnable.h:
Remove ENABLE_ATTRIBUTE_BASED_PROPERTIES_FOR_CSS_STYLE_DECLARATION, as it is now the default and on everwhere.

LayoutTests:

* fast/css/style-enumerate-properties-expected.txt:
* fast/css/style-enumerate-properties.html:
* fast/dom/domListEnumeration-expected.txt:
* fast/dom/domListEnumeration.html:
Remove existing tests for iteration order, which is not standardized, and not consistent among
browsers. Adds a new one that checks invariants of the 4 groupings of properties which we currently
expect to hold, at least in our implementation.

* fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor-expected.txt:
* fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html:
Update now that the properties are proper attributes on the prototype.

* js/dom/put-override-should-not-use-ic.html:
Switch to using a DOMStringList as the object that overrides put, since CSSStyleDeclaration no longer does.

* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:
Remove Object.keys() aspect of the test, which is no longer meaningful since the
properties should no longer exist in the result set.


Canonical link: https://commits.webkit.org/236379@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-11 17:06:47 +00:00
..
3d
resources calc() values resulting from blending mixed type lengths should be simplified 2021-04-09 15:58:15 +00:00
background-position-transitions-expected.txt calc() simplification for a multiplication should apply the multiplication to each value of an addition 2021-04-10 06:43:50 +00:00
background-position-transitions.html calc() simplification for a multiplication should apply the multiplication to each value of an addition 2021-04-10 06:43:50 +00:00
background-transitions-expected.txt
background-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
bad-transition-shorthand-crash-expected.txt
bad-transition-shorthand-crash.html
blendmode-transitions-expected.txt
blendmode-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
border-radius-transition-expected.txt
border-radius-transition.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
cancel-transition-expected.txt
cancel-transition.html
change-values-during-transition-expected.txt
change-values-during-transition.html
clip-path-path-transitions-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
clip-path-path-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
clip-path-transitions-expected.txt
clip-path-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
clip-transition-expected.txt
clip-transition.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
color-transition-all-expected.txt
color-transition-all.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
color-transition-premultiplied-expected.txt
color-transition-premultiplied.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
color-transition-rounding-expected.txt
color-transition-rounding.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
created-while-suspended-expected.txt
created-while-suspended.html
cross-fade-background-image-expected.txt
cross-fade-background-image.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
cross-fade-border-image.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
crossfade-transition-expected.txt
crossfade-transition.html
cubic-bezier-overflow-color-expected.txt
cubic-bezier-overflow-color.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
cubic-bezier-overflow-length-expected.txt
cubic-bezier-overflow-length.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
cubic-bezier-overflow-shadow-expected.txt
cubic-bezier-overflow-shadow.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
cubic-bezier-overflow-svg-length-expected.txt
cubic-bezier-overflow-svg-length.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
cubic-bezier-overflow-transform-expected.txt
cubic-bezier-overflow-transform.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
default-timing-function.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
delay-expected.txt
delay.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
equivalent-background-image-no-transition-expected.txt
equivalent-background-image-no-transition.html
extra-transition-expected.txt
extra-transition.html
flex-transitions-expected.txt
flex-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
font-family-during-transition-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
font-family-during-transition.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
frames-timing-function-expected.txt
frames-timing-function.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
hang-with-bad-transition-list-expected.txt Fixed https://bugs.webkit.org/show_bug.cgi?id=23088. 2009-01-16 18:27:18 +00:00
hang-with-bad-transition-list.html
inherit-expected.txt
inherit-other-props-expected.txt
inherit-other-props.html
inherit.html
interrupt-transform-transition-expected.txt
interrupt-transform-transition.html
interrupt-zero-duration-expected.txt 2008-10-10 Chris Marrin <cmarrin@apple.com> 2008-10-10 18:43:47 +00:00
interrupt-zero-duration.html
interrupted-accelerated-transition-expected.txt
interrupted-accelerated-transition.html
interrupted-all-transition-expected.txt
interrupted-all-transition.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
interrupted-transition-hardware-expected.html
interrupted-transition-hardware.html
lengthsize-transition-to-from-auto-expected.txt Improve background-size interpolation 2021-03-10 21:30:59 +00:00
lengthsize-transition-to-from-auto.html
longhand-vs-shorthand-initial-expected.txt
longhand-vs-shorthand-initial.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
mask-transitions-expected.txt
mask-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
matched-transform-functions-expected.txt
matched-transform-functions.html
min-max-width-height-transitions-expected.txt
min-max-width-height-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
mismatched-shadow-styles-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
mismatched-shadow-styles.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
mismatched-shadow-transitions-expected.txt
mismatched-shadow-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
mixed-type-expected.txt
mixed-type.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
move-after-transition.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
multiple-background-size-transitions-expected.txt
multiple-background-size-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
multiple-background-transitions-expected.txt
multiple-background-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
multiple-mask-transitions-expected.txt
multiple-mask-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
multiple-shadow-transitions-expected.txt
multiple-shadow-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
multiple-text-shadow-transition-expected.txt
multiple-text-shadow-transition.html
negative-delay-expected.txt
negative-delay.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
opacity-transition-zindex-expected.txt
opacity-transition-zindex.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
override-transition-crash-expected.txt
override-transition-crash.html
remove-transition-style-expected.txt
remove-transition-style.html
repeated-firing-background-color-expected.txt
repeated-firing-background-color.html
retargetted-transition-expected.txt
retargetted-transition.html
rounded-rect-becomes-non-renderable-while-transitioning-expected.txt
rounded-rect-becomes-non-renderable-while-transitioning.html
shadow-expected.txt
shadow.html
shape-outside-transitions-expected.txt
shape-outside-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
shorthand-border-transitions-expected.txt
shorthand-border-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
shorthand-transitions-expected.txt
shorthand-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
start-transform-transition-expected.txt
start-transform-transition.html
started-while-suspended-expected.txt
started-while-suspended.html
steps-timing-function-expected.txt
steps-timing-function.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
suspend-transform-transition-expected.png
suspend-transform-transition-expected.txt
suspend-transform-transition.html
svg-layout-transition-expected.txt
svg-layout-transition.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
svg-text-shadow-transition.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
svg-transitions-expected.txt
svg-transitions.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
text-indent-transition-expected.txt
text-indent-transition.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transform-op-list-match-expected.txt
transform-op-list-match.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transform-op-list-no-match-expected.txt
transform-op-list-no-match.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-display-property-2-expected.html
transition-display-property-2.html
transition-display-property-expected.html
transition-display-property.html
transition-duration-cleared-in-transitionend-crash-expected.txt
transition-duration-cleared-in-transitionend-crash.html
transition-end-event-all-properties-expected.txt
transition-end-event-all-properties.html
transition-end-event-attributes-expected.txt
transition-end-event-attributes.html
transition-end-event-container-expected.txt
transition-end-event-container.html
transition-end-event-create-expected.txt
transition-end-event-create.html
transition-end-event-destroy-iframe-expected.txt
transition-end-event-destroy-iframe.html
transition-end-event-destroy-renderer-expected.txt
transition-end-event-destroy-renderer.html
transition-end-event-helpers.js
transition-end-event-left-expected.txt
transition-end-event-left.html
transition-end-event-multiple-01-expected.txt
transition-end-event-multiple-01.html
transition-end-event-multiple-02-expected.txt
transition-end-event-multiple-02.html
transition-end-event-multiple-03-expected.txt
transition-end-event-multiple-03.html
transition-end-event-multiple-04-expected.txt
transition-end-event-multiple-04.html
transition-end-event-nested-expected.txt
transition-end-event-nested.html
transition-end-event-prefixed-01-expected.txt
transition-end-event-prefixed-01.html
transition-end-event-prefixed-02-expected.txt
transition-end-event-prefixed-02.html
transition-end-event-prefixed-03-expected.txt
transition-end-event-prefixed-03.html
transition-end-event-rendering-expected.txt
transition-end-event-rendering.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-end-event-set-none-expected.txt
transition-end-event-set-none.html
transition-end-event-transform-expected.txt
transition-end-event-transform.html
transition-end-event-unprefixed-01-expected.txt
transition-end-event-unprefixed-01.html
transition-end-event-unprefixed-02-expected.txt
transition-end-event-unprefixed-02.html
transition-end-event-unprefixed-03-expected.txt
transition-end-event-unprefixed-03.html
transition-end-event-unprefixed-04-expected.txt
transition-end-event-unprefixed-04.html
transition-end-event-window-expected.txt
transition-end-event-window.html
transition-hit-test-expected.txt
transition-hit-test-transform-expected.txt
transition-hit-test-transform.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-hit-test.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-in-delay-phase-expected.txt
transition-in-delay-phase.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-on-element-with-content-expected.txt
transition-on-element-with-content.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-property-for-element-with-transition-duration-inherit-expected.txt transition-property is not computed correctly when transition-duration is set to "inherit" 2020-04-08 16:31:18 +00:00
transition-property-for-element-with-transition-duration-inherit.html transition-property is not computed correctly when transition-duration is set to "inherit" 2020-04-08 16:31:18 +00:00
transition-shorthand-delay-expected.txt
transition-shorthand-delay.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-timing-function-expected.txt
transition-timing-function.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-to-from-auto-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
transition-to-from-auto.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-to-from-undefined-expected.txt Improve blending of Length and other Length-related types 2021-03-06 16:28:25 +00:00
transition-to-from-undefined.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
transition-transform-translate-calculated-length-crash-expected.txt
transition-transform-translate-calculated-length-crash.html
transition-unknown-property-ignore-expected.txt
transition-unknown-property-ignore.html
transition-with-calc-spin-expected.txt
transition-with-calc-spin.html
transitions-parsing-expected.txt Reduce compile time and binary size cost of enabling proper CSSStyleDeclaration property access behavior 2021-04-11 17:06:47 +00:00
transitions-parsing.html Reduce compile time and binary size cost of enabling proper CSSStyleDeclaration property access behavior 2021-04-11 17:06:47 +00:00
visited-link-color-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
visited-link-color.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
zero-duration-in-list-expected.txt
zero-duration-in-list.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
zero-duration-with-non-zero-delay-end-expected.txt
zero-duration-with-non-zero-delay-end.html
zero-duration-with-non-zero-delay-start-expected.txt
zero-duration-with-non-zero-delay-start.html Remove the legacy animation code 2020-09-17 12:39:28 +00:00
zero-duration-without-units-expected.txt
zero-duration-without-units.html