Changeset 228312 in webkit


Ignore:
Timestamp:
Feb 8, 2018 11:31:16 PM (6 years ago)
Author:
graouts@webkit.org
Message:

[Web Animations] Always expose "composite" in output of getKeyframes()
https://bugs.webkit.org/show_bug.cgi?id=182600

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update expected results to account for a number of progressions.

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:

Source/WebCore:

The Web Animations spec has changed and whereas the output of getKeyframes() would not feature the "composite" property
for "null" values, it now lists "composite" in all cases.

To support this, we needed to fix an issue in the code generator such that a "null" default value for an optional enum
type was supported.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::getKeyframes):

  • animation/KeyframeEffect.h:
  • animation/KeyframeEffect.idl:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDefaultValue):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::convertDictionaryToJS):

  • bindings/scripts/test/TestObj.idl:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r228255 r228312  
     12018-02-08  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Always expose "composite" in output of getKeyframes()
     4        https://bugs.webkit.org/show_bug.cgi?id=182600
     5
     6        Reviewed by Dean Jackson.
     7
     8        Update expected results to account for a number of progressions.
     9
     10        * web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
     11        * web-platform-tests/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
     12        * web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:
     13
    1142018-02-07  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt

    r227598 r228312  
    88PASS Element.animate() accepts empty keyframe lists (input: null)
    99PASS Element.animate() accepts empty keyframe lists (input: undefined)
    10 FAIL Element.animate() accepts a one property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    11 FAIL Element.animate() accepts a one shorthand property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    12 FAIL Element.animate() accepts a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    13 FAIL Element.animate() accepts a two property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    14 FAIL Element.animate() accepts a two property property-indexed keyframes specification with different numbers of values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    15 FAIL Element.animate() accepts a property-indexed keyframes specification with an invalid value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    16 FAIL Element.animate() accepts a one property two value property-indexed keyframes specification that needs to stringify its values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset,opacity" but got "computedOffset,easing,offset,opacity"
    17 FAIL Element.animate() accepts a property-indexed keyframes specification with a CSS variable reference assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    18 FAIL Element.animate() accepts a property-indexed keyframes specification with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    19 FAIL Element.animate() accepts a one property one value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    20 FAIL Element.animate() accepts a one property one non-array value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    21 FAIL Element.animate() accepts a one property two value property-indexed keyframes specification where the first value is invalid assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset" but got "computedOffset,easing,offset"
    22 FAIL Element.animate() accepts a one property two value property-indexed keyframes specification where the second value is invalid assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    23 FAIL Element.animate() accepts a property-indexed keyframe with a single offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    24 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    25 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets that is too short assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    26 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets that is too long assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    27 FAIL Element.animate() accepts a property-indexed keyframe with an empty array of offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    28 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with an embedded null value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    29 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with a trailing null value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    30 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with leading and trailing null values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    31 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with adjacent null values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    32 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with all null values (and too many at that) assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    33 FAIL Element.animate() accepts a property-indexed keyframe with a single null offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    34 FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    35 FAIL Element.animate() accepts a property-indexed keyframe without any specified easing assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    36 FAIL Element.animate() accepts a property-indexed keyframe with a single easing assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    37 FAIL Element.animate() accepts a property-indexed keyframe with an array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    38 FAIL Element.animate() accepts a property-indexed keyframe with an array of easings that is too short assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    39 FAIL Element.animate() accepts a property-indexed keyframe with a single-element array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    40 FAIL Element.animate() accepts a property-indexed keyframe with an empty array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    41 FAIL Element.animate() accepts a property-indexed keyframe with an array of easings that is too long assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
     10PASS Element.animate() accepts a one property two value property-indexed keyframes specification
     11FAIL Element.animate() accepts a one shorthand property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     12FAIL Element.animate() accepts a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     13PASS Element.animate() accepts a two property two value property-indexed keyframes specification
     14PASS Element.animate() accepts a two property property-indexed keyframes specification with different numbers of values
     15PASS Element.animate() accepts a property-indexed keyframes specification with an invalid value
     16PASS Element.animate() accepts a one property two value property-indexed keyframes specification that needs to stringify its values
     17FAIL Element.animate() accepts a property-indexed keyframes specification with a CSS variable reference assert_equals: value for 'left' on ComputedKeyframe #0 expected "var(--dist)" but got "auto"
     18FAIL Element.animate() accepts a property-indexed keyframes specification with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     19PASS Element.animate() accepts a one property one value property-indexed keyframes specification
     20PASS Element.animate() accepts a one property one non-array value property-indexed keyframes specification
     21PASS Element.animate() accepts a one property two value property-indexed keyframes specification where the first value is invalid
     22PASS Element.animate() accepts a one property two value property-indexed keyframes specification where the second value is invalid
     23PASS Element.animate() accepts a property-indexed keyframe with a single offset
     24FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.25 but got 0.45000000000000007
     25FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets that is too short assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.25 but got 0.5
     26PASS Element.animate() accepts a property-indexed keyframe with an array of offsets that is too long
     27PASS Element.animate() accepts a property-indexed keyframe with an empty array of offsets
     28PASS Element.animate() accepts a property-indexed keyframe with an array of offsets with an embedded null value
     29FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with a trailing null value assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.25 but got 0.5
     30FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with leading and trailing null values assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.25 but got 0.5
     31PASS Element.animate() accepts a property-indexed keyframe with an array of offsets with adjacent null values
     32PASS Element.animate() accepts a property-indexed keyframe with an array of offsets with all null values (and too many at that)
     33PASS Element.animate() accepts a property-indexed keyframe with a single null offset
     34FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.2 but got 0.4
     35PASS Element.animate() accepts a property-indexed keyframe without any specified easing
     36PASS Element.animate() accepts a property-indexed keyframe with a single easing
     37PASS Element.animate() accepts a property-indexed keyframe with an array of easings
     38FAIL Element.animate() accepts a property-indexed keyframe with an array of easings that is too short assert_equals: value for 'easing' on ComputedKeyframe #2 expected "ease-in" but got "ease-out"
     39PASS Element.animate() accepts a property-indexed keyframe with a single-element array of easings
     40PASS Element.animate() accepts a property-indexed keyframe with an empty array of easings
     41PASS Element.animate() accepts a property-indexed keyframe with an array of easings that is too long
    4242PASS Element.animate() accepts a property-indexed keyframe with a single composite operation
    4343PASS Element.animate() accepts a property-indexed keyframe with a composite array
     
    4545PASS Element.animate() accepts a property-indexed keyframe with a composite array that is too long
    4646PASS Element.animate() accepts a property-indexed keyframe with a single-element composite array
    47 FAIL Element.animate() accepts a one property one keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    48 FAIL Element.animate() accepts a one property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    49 FAIL Element.animate() accepts a two property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    50 FAIL Element.animate() accepts a one shorthand property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    51 FAIL Element.animate() accepts a two property (a shorthand and one of its component longhands) two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    52 FAIL Element.animate() accepts a two property keyframe sequence where one property is missing from the first keyframe assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    53 FAIL Element.animate() accepts a two property keyframe sequence where one property is missing from the last keyframe assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    54 FAIL Element.animate() accepts a one property two keyframe sequence that needs to stringify its values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset,opacity" but got "computedOffset,easing,offset,opacity"
    55 FAIL Element.animate() accepts a keyframe sequence with a CSS variable reference assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    56 FAIL Element.animate() accepts a keyframe sequence with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     47PASS Element.animate() accepts a one property one keyframe sequence
     48PASS Element.animate() accepts a one property two keyframe sequence
     49PASS Element.animate() accepts a two property two keyframe sequence
     50FAIL Element.animate() accepts a one shorthand property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     51FAIL Element.animate() accepts a two property (a shorthand and one of its component longhands) two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     52PASS Element.animate() accepts a two property keyframe sequence where one property is missing from the first keyframe
     53PASS Element.animate() accepts a two property keyframe sequence where one property is missing from the last keyframe
     54PASS Element.animate() accepts a one property two keyframe sequence that needs to stringify its values
     55FAIL Element.animate() accepts a keyframe sequence with a CSS variable reference assert_equals: value for 'left' on ComputedKeyframe #0 expected "var(--dist)" but got "auto"
     56FAIL Element.animate() accepts a keyframe sequence with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    5757FAIL Element.animate() accepts a keyframe sequence with duplicate values for a given interior offset Type error
    5858FAIL Element.animate() accepts a keyframe sequence with duplicate values for offsets 0 and 1 Type error
    5959FAIL Element.animate() accepts a two property four keyframe sequence Type error
    60 FAIL Element.animate() accepts a single keyframe sequence with omitted offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    61 FAIL Element.animate() accepts a single keyframe sequence with null offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    62 FAIL Element.animate() accepts a single keyframe sequence with string offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    63 FAIL Element.animate() accepts a one property keyframe sequence with some omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    64 FAIL Element.animate() accepts a one property keyframe sequence with some null offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    65 FAIL Element.animate() accepts a two property keyframe sequence with some omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    66 FAIL Element.animate() accepts a one property keyframe sequence with all omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
     60PASS Element.animate() accepts a single keyframe sequence with omitted offset
     61PASS Element.animate() accepts a single keyframe sequence with null offset
     62PASS Element.animate() accepts a single keyframe sequence with string offset
     63PASS Element.animate() accepts a one property keyframe sequence with some omitted offsets
     64PASS Element.animate() accepts a one property keyframe sequence with some null offsets
     65PASS Element.animate() accepts a two property keyframe sequence with some omitted offsets
     66PASS Element.animate() accepts a one property keyframe sequence with all omitted offsets
    6767FAIL Element.animate() accepts a keyframe sequence with different easing values, but the same easing value for a given offset Type error
    6868FAIL Element.animate() accepts a keyframe sequence with different composite values, but the same composite value for a given offset Type error
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/composite-expected.txt

    r227598 r228312  
    22PASS Default value
    33PASS Change composite value
    4 FAIL Unspecified keyframe composite value when setting effect composite assert_equals: unspecified keyframe composite value should be null even if effect composite is set expected (object) null but got (undefined) undefined
     4PASS Unspecified keyframe composite value when setting effect composite
    55PASS Specified keyframe composite value when setting effect composite
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt

    r227598 r228312  
    11
    22PASS Keyframes can be replaced with an empty keyframe
    3 FAIL Keyframes can be replaced with a one property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    4 FAIL Keyframes can be replaced with a one shorthand property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    5 FAIL Keyframes can be replaced with a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    6 FAIL Keyframes can be replaced with a two property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    7 FAIL Keyframes can be replaced with a two property property-indexed keyframes specification with different numbers of values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    8 FAIL Keyframes can be replaced with a property-indexed keyframes specification with an invalid value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    9 FAIL Keyframes can be replaced with a one property two value property-indexed keyframes specification that needs to stringify its values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset,opacity" but got "computedOffset,easing,offset,opacity"
    10 FAIL Keyframes can be replaced with a property-indexed keyframes specification with a CSS variable reference assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    11 FAIL Keyframes can be replaced with a property-indexed keyframes specification with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    12 FAIL Keyframes can be replaced with a one property one value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    13 FAIL Keyframes can be replaced with a one property one non-array value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    14 FAIL Keyframes can be replaced with a one property two value property-indexed keyframes specification where the first value is invalid assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset" but got "computedOffset,easing,offset"
    15 FAIL Keyframes can be replaced with a one property two value property-indexed keyframes specification where the second value is invalid assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    16 FAIL Keyframes can be replaced with a property-indexed keyframe with a single offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    17 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    18 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets that is too short assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    19 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets that is too long assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    20 FAIL Keyframes can be replaced with a property-indexed keyframe with an empty array of offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    21 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets with an embedded null value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    22 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets with a trailing null value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    23 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets with leading and trailing null values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    24 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets with adjacent null values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    25 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets with all null values (and too many at that) assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    26 FAIL Keyframes can be replaced with a property-indexed keyframe with a single null offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    27 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    28 FAIL Keyframes can be replaced with a property-indexed keyframe without any specified easing assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    29 FAIL Keyframes can be replaced with a property-indexed keyframe with a single easing assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    30 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    31 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of easings that is too short assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    32 FAIL Keyframes can be replaced with a property-indexed keyframe with a single-element array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    33 FAIL Keyframes can be replaced with a property-indexed keyframe with an empty array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    34 FAIL Keyframes can be replaced with a property-indexed keyframe with an array of easings that is too long assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
     3PASS Keyframes can be replaced with a one property two value property-indexed keyframes specification
     4FAIL Keyframes can be replaced with a one shorthand property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     5FAIL Keyframes can be replaced with a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     6PASS Keyframes can be replaced with a two property two value property-indexed keyframes specification
     7PASS Keyframes can be replaced with a two property property-indexed keyframes specification with different numbers of values
     8PASS Keyframes can be replaced with a property-indexed keyframes specification with an invalid value
     9PASS Keyframes can be replaced with a one property two value property-indexed keyframes specification that needs to stringify its values
     10FAIL Keyframes can be replaced with a property-indexed keyframes specification with a CSS variable reference assert_equals: value for 'left' on ComputedKeyframe #0 expected "var(--dist)" but got "auto"
     11FAIL Keyframes can be replaced with a property-indexed keyframes specification with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     12PASS Keyframes can be replaced with a one property one value property-indexed keyframes specification
     13PASS Keyframes can be replaced with a one property one non-array value property-indexed keyframes specification
     14PASS Keyframes can be replaced with a one property two value property-indexed keyframes specification where the first value is invalid
     15PASS Keyframes can be replaced with a one property two value property-indexed keyframes specification where the second value is invalid
     16PASS Keyframes can be replaced with a property-indexed keyframe with a single offset
     17FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.25 but got 0.45000000000000007
     18FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets that is too short assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.25 but got 0.5
     19PASS Keyframes can be replaced with a property-indexed keyframe with an array of offsets that is too long
     20PASS Keyframes can be replaced with a property-indexed keyframe with an empty array of offsets
     21PASS Keyframes can be replaced with a property-indexed keyframe with an array of offsets with an embedded null value
     22FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets with a trailing null value assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.25 but got 0.5
     23FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets with leading and trailing null values assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.25 but got 0.5
     24PASS Keyframes can be replaced with a property-indexed keyframe with an array of offsets with adjacent null values
     25PASS Keyframes can be replaced with a property-indexed keyframe with an array of offsets with all null values (and too many at that)
     26PASS Keyframes can be replaced with a property-indexed keyframe with a single null offset
     27FAIL Keyframes can be replaced with a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array assert_equals: value for 'computedOffset' on ComputedKeyframe #1 expected 0.2 but got 0.4
     28PASS Keyframes can be replaced with a property-indexed keyframe without any specified easing
     29PASS Keyframes can be replaced with a property-indexed keyframe with a single easing
     30PASS Keyframes can be replaced with a property-indexed keyframe with an array of easings
     31FAIL Keyframes can be replaced with a property-indexed keyframe with an array of easings that is too short assert_equals: value for 'easing' on ComputedKeyframe #2 expected "ease-in" but got "ease-out"
     32PASS Keyframes can be replaced with a property-indexed keyframe with a single-element array of easings
     33PASS Keyframes can be replaced with a property-indexed keyframe with an empty array of easings
     34PASS Keyframes can be replaced with a property-indexed keyframe with an array of easings that is too long
    3535PASS Keyframes can be replaced with a property-indexed keyframe with a single composite operation
    3636PASS Keyframes can be replaced with a property-indexed keyframe with a composite array
     
    3838PASS Keyframes can be replaced with a property-indexed keyframe with a composite array that is too long
    3939PASS Keyframes can be replaced with a property-indexed keyframe with a single-element composite array
    40 FAIL Keyframes can be replaced with a one property one keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    41 FAIL Keyframes can be replaced with a one property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    42 FAIL Keyframes can be replaced with a two property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    43 FAIL Keyframes can be replaced with a one shorthand property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    44 FAIL Keyframes can be replaced with a two property (a shorthand and one of its component longhands) two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    45 FAIL Keyframes can be replaced with a two property keyframe sequence where one property is missing from the first keyframe assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    46 FAIL Keyframes can be replaced with a two property keyframe sequence where one property is missing from the last keyframe assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    47 FAIL Keyframes can be replaced with a one property two keyframe sequence that needs to stringify its values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset,opacity" but got "computedOffset,easing,offset,opacity"
    48 FAIL Keyframes can be replaced with a keyframe sequence with a CSS variable reference assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    49 FAIL Keyframes can be replaced with a keyframe sequence with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     40PASS Keyframes can be replaced with a one property one keyframe sequence
     41PASS Keyframes can be replaced with a one property two keyframe sequence
     42PASS Keyframes can be replaced with a two property two keyframe sequence
     43FAIL Keyframes can be replaced with a one shorthand property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     44FAIL Keyframes can be replaced with a two property (a shorthand and one of its component longhands) two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
     45PASS Keyframes can be replaced with a two property keyframe sequence where one property is missing from the first keyframe
     46PASS Keyframes can be replaced with a two property keyframe sequence where one property is missing from the last keyframe
     47PASS Keyframes can be replaced with a one property two keyframe sequence that needs to stringify its values
     48FAIL Keyframes can be replaced with a keyframe sequence with a CSS variable reference assert_equals: value for 'left' on ComputedKeyframe #0 expected "var(--dist)" but got "auto"
     49FAIL Keyframes can be replaced with a keyframe sequence with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "composite,computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
    5050FAIL Keyframes can be replaced with a keyframe sequence with duplicate values for a given interior offset Type error
    5151FAIL Keyframes can be replaced with a keyframe sequence with duplicate values for offsets 0 and 1 Type error
    5252FAIL Keyframes can be replaced with a two property four keyframe sequence Type error
    53 FAIL Keyframes can be replaced with a single keyframe sequence with omitted offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    54 FAIL Keyframes can be replaced with a single keyframe sequence with null offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    55 FAIL Keyframes can be replaced with a single keyframe sequence with string offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    56 FAIL Keyframes can be replaced with a one property keyframe sequence with some omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    57 FAIL Keyframes can be replaced with a one property keyframe sequence with some null offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
    58 FAIL Keyframes can be replaced with a two property keyframe sequence with some omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
    59 FAIL Keyframes can be replaced with a one property keyframe sequence with all omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
     53PASS Keyframes can be replaced with a single keyframe sequence with omitted offset
     54PASS Keyframes can be replaced with a single keyframe sequence with null offset
     55PASS Keyframes can be replaced with a single keyframe sequence with string offset
     56PASS Keyframes can be replaced with a one property keyframe sequence with some omitted offsets
     57PASS Keyframes can be replaced with a one property keyframe sequence with some null offsets
     58PASS Keyframes can be replaced with a two property keyframe sequence with some omitted offsets
     59PASS Keyframes can be replaced with a one property keyframe sequence with all omitted offsets
    6060FAIL Keyframes can be replaced with a keyframe sequence with different easing values, but the same easing value for a given offset Type error
    6161FAIL Keyframes can be replaced with a keyframe sequence with different composite values, but the same composite value for a given offset Type error
  • trunk/Source/WebCore/ChangeLog

    r228310 r228312  
     12018-02-08  Antoine Quint  <graouts@apple.com>
     2
     3        [Web Animations] Always expose "composite" in output of getKeyframes()
     4        https://bugs.webkit.org/show_bug.cgi?id=182600
     5
     6        Reviewed by Dean Jackson.
     7
     8        The Web Animations spec has changed and whereas the output of getKeyframes() would not feature the "composite" property
     9        for "null" values, it now lists "composite" in all cases.
     10
     11        To support this, we needed to fix an issue in the code generator such that a "null" default value for an optional enum
     12        type was supported.
     13
     14        * animation/KeyframeEffect.cpp:
     15        (WebCore::KeyframeEffect::getKeyframes):
     16        * animation/KeyframeEffect.h:
     17        * animation/KeyframeEffect.idl:
     18        * bindings/scripts/CodeGeneratorJS.pm:
     19        (GenerateDefaultValue):
     20        * bindings/scripts/test/JS/JSTestObj.cpp:
     21        (WebCore::convertDictionary<TestObj::Dictionary>):
     22        (WebCore::convertDictionaryToJS):
     23        * bindings/scripts/test/TestObj.idl:
     24
    1252018-02-08  Youenn Fablet  <youenn@apple.com>
    226
  • trunk/Source/WebCore/animation/KeyframeEffect.cpp

    r227622 r228312  
    452452        //
    453453        // dictionary BaseComputedKeyframe {
    454         //      double?            offset = null;
    455         //      double             computedOffset;
    456         //      DOMString          easing = "linear";
    457         //      CompositeOperation composite;
     454        //      double?             offset = null;
     455        //      double              computedOffset;
     456        //      DOMString           easing = "linear";
     457        //      CompositeOperation? composite = null;
    458458        // };
    459459
    460         // 2. Set offset, computedOffset, easing members of output keyframe to the respective values keyframe offset, computed keyframe offset,
    461         // and keyframe-specific timing function of keyframe.
    462 
    463         // 3. If keyframe has a keyframe-specific composite operation, set composite to that value.
     460        // 2. Set offset, computedOffset, easing, composite members of output keyframe to the respective values keyframe offset, computed keyframe
     461        // offset, keyframe-specific timing function and keyframe-specific composite operation of keyframe.
    464462        BaseComputedKeyframe computedKeyframe;
    465463        computedKeyframe.offset = m_offsets[i];
    466464        computedKeyframe.computedOffset = keyframe.key();
    467465        computedKeyframe.easing = m_timingFunctions[i]->cssText();
     466        computedKeyframe.composite = m_compositeOperations[i];
    468467
    469468        auto outputKeyframe = convertDictionaryToJS(state, *jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject()), computedKeyframe);
    470 
    471         // If we have a non-null CompositeOperation for this keyframes, set the JS property for it.
    472         if (auto compositeOperation = m_compositeOperations[i]) {
    473             PropertyDescriptor propertyDescriptor(convertEnumerationToJS(state, compositeOperation.value()), 0);
    474             JSObject::defineOwnProperty(outputKeyframe, &state, AtomicString("composite").impl(), propertyDescriptor, false);
    475         }
    476469
    477470        auto& style = *keyframe.style();
    478471        auto computedStyleExtractor = ComputedStyleExtractor(m_target.get());
    479472
    480         // 4. For each animation property-value pair specified on keyframe, declaration, perform the following steps:
     473        // 3. For each animation property-value pair specified on keyframe, declaration, perform the following steps:
    481474        for (auto cssPropertyId : keyframe.properties()) {
    482475            // 1. Let property name be the result of applying the animation property name to IDL attribute name algorithm to the property name of declaration.
     
    491484        }
    492485
    493         // 5. Append output keyframe to result.
     486        // 4. Append output keyframe to result.
    494487        result.append(JSC::Strong<JSC::JSObject> { state.vm(), outputKeyframe });
    495488    }
  • trunk/Source/WebCore/animation/KeyframeEffect.h

    r227622 r228312  
    7474        double computedOffset;
    7575        String easing { "linear" };
     76        std::optional<CompositeOperation> composite;
    7677    };
    7778
  • trunk/Source/WebCore/animation/KeyframeEffect.idl

    r227428 r228312  
    4949     double computedOffset;
    5050     DOMString easing = "linear";
     51     CompositeOperation? composite = null;
    5152};
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r228260 r228312  
    21892189        # FIXME: Would be nice to report an error if the value does not have quote marks around it.
    21902190        # FIXME: Would be nice to report an error if the value is not one of the enumeration values.
     2191        if ($defaultValue eq "null") {
     2192            die if !$type->isNullable;
     2193            return "std::nullopt";
     2194        }
    21912195        my $className = GetEnumerationClassName($type, $typeScope);
    21922196        my $enumerationValueName = GetEnumerationValueName(substr($defaultValue, 1, -1));
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r228260 r228312  
    638638    } else
    639639        result.largeIntegerWithDefault = 0;
     640    JSValue nullableEnumValue;
     641    if (isNullOrUndefined)
     642        nullableEnumValue = jsUndefined();
     643    else {
     644        nullableEnumValue = object->get(&state, Identifier::fromString(&state, "nullableEnum"));
     645        RETURN_IF_EXCEPTION(throwScope, { });
     646    }
     647    if (!nullableEnumValue.isUndefined()) {
     648        result.nullableEnum = convert<IDLNullable<IDLEnumeration<TestObj::EnumType>>>(state, nullableEnumValue);
     649        RETURN_IF_EXCEPTION(throwScope, { });
     650    } else
     651        result.nullableEnum = std::nullopt;
    640652    JSValue nullableIntegerWithDefaultValue;
    641653    if (isNullOrUndefined)
     
    10001012    auto largeIntegerWithDefaultValue = toJS<IDLLongLong>(dictionary.largeIntegerWithDefault);
    10011013    result->putDirect(vm, JSC::Identifier::fromString(&vm, "largeIntegerWithDefault"), largeIntegerWithDefaultValue);
     1014    auto nullableEnumValue = toJS<IDLNullable<IDLEnumeration<TestObj::EnumType>>>(state, dictionary.nullableEnum);
     1015    result->putDirect(vm, JSC::Identifier::fromString(&vm, "nullableEnum"), nullableEnumValue);
    10021016    auto nullableIntegerWithDefaultValue = toJS<IDLNullable<IDLLong>>(dictionary.nullableIntegerWithDefault);
    10031017    result->putDirect(vm, JSC::Identifier::fromString(&vm, "nullableIntegerWithDefault"), nullableIntegerWithDefaultValue);
  • trunk/Source/WebCore/bindings/scripts/test/TestObj.idl

    r228189 r228312  
    491491    long? nullableIntegerWithDefault = null;
    492492    Node? nullableNode = null;
     493    TestEnumType? nullableEnum = null;
    493494    any anyValue;
    494495    any anyValueWithNullDefault = null;
Note: See TracChangeset for help on using the changeset viewer.