Changeset 275092 in webkit
- Timestamp:
- Mar 26, 2021 4:16:59 AM (16 months ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-ui/caret-color-021-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/CSSPropertyAnimation.cpp (modified) (5 diffs)
-
Source/WebCore/css/CSSProperties.json (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.h (modified) (4 diffs)
-
Source/WebCore/rendering/style/StyleRareInheritedData.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/style/StyleRareInheritedData.h (modified) (1 diff)
-
Source/WebCore/style/StyleBuilderCustom.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r275015 r275092 1 2021-03-25 Antoine Quint <graouts@webkit.org> 2 3 Fix interpolation of the caret-color CSS property 4 https://bugs.webkit.org/show_bug.cgi?id=223181 5 <rdar://problem/75687413> 6 7 Reviewed by Antti Koivisto. 8 9 Add 64 PASS results for the caret-color interpolation test which now is passing completely. 10 The test css/css-ui/caret-color-021.html also progresses. 11 12 * web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt: 13 * web-platform-tests/css/css-ui/caret-color-021-expected.txt: 14 1 15 2021-03-25 Antoine Quint <graouts@webkit.org> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt
r274408 r275092 24 24 PASS Web Animations: property <caret-color> from neutral to [green] at (1) should be [rgb(0, 128, 0)] 25 25 PASS Web Animations: property <caret-color> from neutral to [green] at (1.5) should be [rgb(0, 65, 0)] 26 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (-0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 27 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 28 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 29 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) " 30 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 26 PASS CSS Transitions: property <caret-color> from [initial] to [green] at (-0.3) should be [green] 27 PASS CSS Transitions: property <caret-color> from [initial] to [green] at (0) should be [green] 28 PASS CSS Transitions: property <caret-color> from [initial] to [green] at (0.3) should be [green] 29 PASS CSS Transitions: property <caret-color> from [initial] to [green] at (0.5) should be [green] 30 PASS CSS Transitions: property <caret-color> from [initial] to [green] at (0.6) should be [green] 31 31 PASS CSS Transitions: property <caret-color> from [initial] to [green] at (1) should be [green] 32 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) " 33 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (-0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 34 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 35 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 36 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) " 37 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 32 PASS CSS Transitions: property <caret-color> from [initial] to [green] at (1.5) should be [green] 33 PASS CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (-0.3) should be [green] 34 PASS CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0) should be [green] 35 PASS CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.3) should be [green] 36 PASS CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.5) should be [green] 37 PASS CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.6) should be [green] 38 38 PASS CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (1) should be [green] 39 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) " 40 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (-0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 41 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 42 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 43 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) " 44 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 39 PASS CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (1.5) should be [green] 40 PASS CSS Animations: property <caret-color> from [initial] to [green] at (-0.3) should be [initial] 41 PASS CSS Animations: property <caret-color> from [initial] to [green] at (0) should be [initial] 42 PASS CSS Animations: property <caret-color> from [initial] to [green] at (0.3) should be [initial] 43 PASS CSS Animations: property <caret-color> from [initial] to [green] at (0.5) should be [green] 44 PASS CSS Animations: property <caret-color> from [initial] to [green] at (0.6) should be [green] 45 45 PASS CSS Animations: property <caret-color> from [initial] to [green] at (1) should be [green] 46 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) " 47 FAIL Web Animations: property <caret-color> from [initial] to [green] at (-0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 48 FAIL Web Animations: property <caret-color> from [initial] to [green] at (0) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 49 FAIL Web Animations: property <caret-color> from [initial] to [green] at (0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 50 FAIL Web Animations: property <caret-color> from [initial] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) " 51 FAIL Web Animations: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 46 PASS CSS Animations: property <caret-color> from [initial] to [green] at (1.5) should be [green] 47 PASS Web Animations: property <caret-color> from [initial] to [green] at (-0.3) should be [initial] 48 PASS Web Animations: property <caret-color> from [initial] to [green] at (0) should be [initial] 49 PASS Web Animations: property <caret-color> from [initial] to [green] at (0.3) should be [initial] 50 PASS Web Animations: property <caret-color> from [initial] to [green] at (0.5) should be [green] 51 PASS Web Animations: property <caret-color> from [initial] to [green] at (0.6) should be [green] 52 52 PASS Web Animations: property <caret-color> from [initial] to [green] at (1) should be [green] 53 FAIL Web Animations: property <caret-color> from [initial] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) " 54 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (-0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 55 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 56 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 57 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) " 58 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 53 PASS Web Animations: property <caret-color> from [initial] to [green] at (1.5) should be [green] 54 PASS CSS Transitions: property <caret-color> from [auto] to [green] at (-0.3) should be [green] 55 PASS CSS Transitions: property <caret-color> from [auto] to [green] at (0) should be [green] 56 PASS CSS Transitions: property <caret-color> from [auto] to [green] at (0.3) should be [green] 57 PASS CSS Transitions: property <caret-color> from [auto] to [green] at (0.5) should be [green] 58 PASS CSS Transitions: property <caret-color> from [auto] to [green] at (0.6) should be [green] 59 59 PASS CSS Transitions: property <caret-color> from [auto] to [green] at (1) should be [green] 60 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) " 61 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (-0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 62 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 63 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 64 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) " 65 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 60 PASS CSS Transitions: property <caret-color> from [auto] to [green] at (1.5) should be [green] 61 PASS CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (-0.3) should be [green] 62 PASS CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0) should be [green] 63 PASS CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.3) should be [green] 64 PASS CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.5) should be [green] 65 PASS CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.6) should be [green] 66 66 PASS CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (1) should be [green] 67 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) " 68 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (-0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 69 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 70 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 71 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) " 72 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 67 PASS CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (1.5) should be [green] 68 PASS CSS Animations: property <caret-color> from [auto] to [green] at (-0.3) should be [auto] 69 PASS CSS Animations: property <caret-color> from [auto] to [green] at (0) should be [auto] 70 PASS CSS Animations: property <caret-color> from [auto] to [green] at (0.3) should be [auto] 71 PASS CSS Animations: property <caret-color> from [auto] to [green] at (0.5) should be [green] 72 PASS CSS Animations: property <caret-color> from [auto] to [green] at (0.6) should be [green] 73 73 PASS CSS Animations: property <caret-color> from [auto] to [green] at (1) should be [green] 74 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) " 75 FAIL Web Animations: property <caret-color> from [auto] to [green] at (-0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 76 FAIL Web Animations: property <caret-color> from [auto] to [green] at (0) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 77 FAIL Web Animations: property <caret-color> from [auto] to [green] at (0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 78 FAIL Web Animations: property <caret-color> from [auto] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) " 79 FAIL Web Animations: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 74 PASS CSS Animations: property <caret-color> from [auto] to [green] at (1.5) should be [green] 75 PASS Web Animations: property <caret-color> from [auto] to [green] at (-0.3) should be [auto] 76 PASS Web Animations: property <caret-color> from [auto] to [green] at (0) should be [auto] 77 PASS Web Animations: property <caret-color> from [auto] to [green] at (0.3) should be [auto] 78 PASS Web Animations: property <caret-color> from [auto] to [green] at (0.5) should be [green] 79 PASS Web Animations: property <caret-color> from [auto] to [green] at (0.6) should be [green] 80 80 PASS Web Animations: property <caret-color> from [auto] to [green] at (1) should be [green] 81 FAIL Web Animations: property <caret-color> from [auto] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) " 82 FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 83 FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 84 FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 85 FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 81 PASS Web Animations: property <caret-color> from [auto] to [green] at (1.5) should be [green] 82 PASS CSS Transitions: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] 83 PASS CSS Transitions: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] 84 PASS CSS Transitions: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] 85 PASS CSS Transitions: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] 86 86 PASS CSS Transitions: property <caret-color> from [currentColor] to [green] at (1) should be [rgb(0, 128, 0)] 87 87 PASS CSS Transitions: property <caret-color> from [currentColor] to [green] at (1.5) should be [rgb(0, 192, 0)] 88 FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 89 FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 90 FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 91 FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 88 PASS CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] 89 PASS CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] 90 PASS CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] 91 PASS CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] 92 92 PASS CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (1) should be [rgb(0, 128, 0)] 93 93 PASS CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (1.5) should be [rgb(0, 192, 0)] 94 FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 95 FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 96 FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 97 FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 94 PASS CSS Animations: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] 95 PASS CSS Animations: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] 96 PASS CSS Animations: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] 97 PASS CSS Animations: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] 98 98 PASS CSS Animations: property <caret-color> from [currentColor] to [green] at (1) should be [rgb(0, 128, 0)] 99 99 PASS CSS Animations: property <caret-color> from [currentColor] to [green] at (1.5) should be [rgb(0, 192, 0)] 100 FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 101 FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) " 102 FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) " 103 FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) " 100 PASS Web Animations: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] 101 PASS Web Animations: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] 102 PASS Web Animations: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] 103 PASS Web Animations: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] 104 104 PASS Web Animations: property <caret-color> from [currentColor] to [green] at (1) should be [rgb(0, 128, 0)] 105 105 PASS Web Animations: property <caret-color> from [currentColor] to [green] at (1.5) should be [rgb(0, 192, 0)] -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/caret-color-021-expected.txt
r252598 r275092 1 1 2 2 3 FAIL Default caret-color is not interpolable assert_equals: expected "rgb(0, 255, 0)" but got "rgba(0, 255, 0, 0.804)" 3 PASS Default caret-color is not interpolable 4 4 -
trunk/Source/WebCore/ChangeLog
r275091 r275092 1 2021-03-25 Antoine Quint <graouts@webkit.org> 2 3 Fix interpolation of the caret-color CSS property 4 https://bugs.webkit.org/show_bug.cgi?id=223181 5 <rdar://problem/75687413> 6 7 Reviewed by Antti Koivisto. 8 9 Add support for the "auto" value for the "caret-color" CSS property. That value 10 is its initial value. We support it with a new boolean flag on StyleRareInheritedData 11 which we reset to false when setCaretColor() or setVisitedLinkCaretColor() is called. 12 13 Then, we can blend this property with the new CaretColorPropertyWrapper wrapper which is 14 required to correctly get and set the "auto" bit. 15 16 * animation/CSSPropertyAnimation.cpp: 17 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): 18 * css/CSSProperties.json: We can remove the initial value key since this property is entirely 19 custom. 20 * rendering/style/RenderStyle.h: 21 (WebCore::RenderStyle::setCaretColor): 22 (WebCore::RenderStyle::setHasAutoCaretColor): 23 (WebCore::RenderStyle::setVisitedLinkCaretColor): 24 (WebCore::RenderStyle::setHasVisitedLinkAutoCaretColor): 25 (WebCore::RenderStyle::hasAutoCaretColor const): 26 (WebCore::RenderStyle::hasVisitedLinkAutoCaretColor const): 27 * rendering/style/StyleRareInheritedData.cpp: 28 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 29 (WebCore::StyleRareInheritedData::operator== const): 30 * rendering/style/StyleRareInheritedData.h: 31 * style/StyleBuilderCustom.h: 32 (WebCore::Style::BuilderCustom::applyInitialCaretColor): 33 (WebCore::Style::BuilderCustom::applyInheritCaretColor): 34 (WebCore::Style::BuilderCustom::applyValueCaretColor): 35 1 36 2021-03-26 Jean-Yves Avenard <jya@apple.com> 2 37 -
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
r275015 r275092 1235 1235 1236 1236 enum MaybeInvalidColorTag { MaybeInvalidColor }; 1237 class PropertyWrapperVisitedAffectedColor final: public AnimationPropertyWrapperBase {1237 class PropertyWrapperVisitedAffectedColor : public AnimationPropertyWrapperBase { 1238 1238 WTF_MAKE_FAST_ALLOCATED; 1239 1239 public: … … 1251 1251 } 1252 1252 1253 pr ivate:1254 bool equals(const RenderStyle* a, const RenderStyle* b) const final1253 protected: 1254 bool equals(const RenderStyle* a, const RenderStyle* b) const override 1255 1255 { 1256 1256 return m_wrapper->equals(a, b) && m_visitedWrapper->equals(a, b); 1257 1257 } 1258 1258 1259 void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final1259 void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const override 1260 1260 { 1261 1261 m_wrapper->blend(client, destination, from, to, progress); … … 1263 1263 } 1264 1264 1265 std::unique_ptr<AnimationPropertyWrapperBase> m_wrapper; 1266 std::unique_ptr<AnimationPropertyWrapperBase> m_visitedWrapper; 1267 1268 private: 1265 1269 #if !LOG_DISABLED 1266 1270 void logBlend(const RenderStyle* from, const RenderStyle* to, const RenderStyle* result, double progress) const final … … 1270 1274 } 1271 1275 #endif 1272 1273 std::unique_ptr<AnimationPropertyWrapperBase> m_wrapper; 1274 std::unique_ptr<AnimationPropertyWrapperBase> m_visitedWrapper; 1276 }; 1277 1278 static bool canInterpolateCaretColor(const RenderStyle* from, const RenderStyle* to, bool visited) 1279 { 1280 if (visited) 1281 return !from->hasVisitedLinkAutoCaretColor() && !to->hasVisitedLinkAutoCaretColor(); 1282 return !from->hasAutoCaretColor() && !to->hasAutoCaretColor(); 1283 } 1284 1285 class CaretColorPropertyWrapper final : public PropertyWrapperVisitedAffectedColor { 1286 WTF_MAKE_FAST_ALLOCATED; 1287 public: 1288 CaretColorPropertyWrapper() 1289 : PropertyWrapperVisitedAffectedColor(CSSPropertyCaretColor, MaybeInvalidColor, &RenderStyle::caretColor, &RenderStyle::setCaretColor, &RenderStyle::visitedLinkCaretColor, &RenderStyle::setVisitedLinkCaretColor) 1290 { 1291 } 1292 1293 private: 1294 bool equals(const RenderStyle* a, const RenderStyle* b) const final 1295 { 1296 return a->hasAutoCaretColor() == b->hasAutoCaretColor() 1297 && a->hasVisitedLinkAutoCaretColor() == b->hasVisitedLinkAutoCaretColor() 1298 && PropertyWrapperVisitedAffectedColor::equals(a, b); 1299 } 1300 1301 bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const final 1302 { 1303 return canInterpolateCaretColor(from, to, false) || canInterpolateCaretColor(from, to, true); 1304 } 1305 1306 void blend(const CSSPropertyBlendingClient* client, RenderStyle* destination, const RenderStyle* from, const RenderStyle* to, double progress) const final 1307 { 1308 if (canInterpolateCaretColor(from, to, false)) 1309 m_wrapper->blend(client, destination, from, to, progress); 1310 else { 1311 auto* blendingRenderStyle = progress < 0.5 ? from : to; 1312 if (blendingRenderStyle->hasAutoCaretColor()) 1313 destination->setHasAutoCaretColor(); 1314 else 1315 destination->setCaretColor(blendingRenderStyle->caretColor()); 1316 } 1317 1318 if (canInterpolateCaretColor(from, to, true)) 1319 m_visitedWrapper->blend(client, destination, from, to, progress); 1320 else { 1321 auto* blendingRenderStyle = progress < 0.5 ? from : to; 1322 if (blendingRenderStyle->hasVisitedLinkAutoCaretColor()) 1323 destination->setHasVisitedLinkAutoCaretColor(); 1324 else 1325 destination->setVisitedLinkCaretColor(blendingRenderStyle->visitedLinkCaretColor()); 1326 } 1327 } 1275 1328 }; 1276 1329 … … 2025 2078 new LengthPropertyWrapper(CSSPropertyPaddingBottom, &RenderStyle::paddingBottom, &RenderStyle::setPaddingBottom, { LengthPropertyWrapper::Flags::NegativeLengthsAreInvalid }), 2026 2079 2027 new PropertyWrapperVisitedAffectedColor(CSSPropertyCaretColor, &RenderStyle::caretColor, &RenderStyle::setCaretColor, &RenderStyle::visitedLinkCaretColor, &RenderStyle::setVisitedLinkCaretColor),2080 new CaretColorPropertyWrapper, 2028 2081 2029 2082 new PropertyWrapperVisitedAffectedColor(CSSPropertyColor, &RenderStyle::color, &RenderStyle::setColor, &RenderStyle::visitedLinkColor, &RenderStyle::setVisitedLinkColor), -
trunk/Source/WebCore/css/CSSProperties.json
r274793 r275092 189 189 "inherited": true, 190 190 "codegen-properties": { 191 " initial": "currentColor",192 " visited-link-color-support": true191 "visited-link-color-support": true, 192 "custom": "All" 193 193 }, 194 194 "specification": { -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r274793 r275092 1112 1112 void setTextStrokeWidth(float w) { SET_VAR(m_rareInheritedData, textStrokeWidth, w); } 1113 1113 void setTextFillColor(const Color& c) { SET_VAR(m_rareInheritedData, textFillColor, c); } 1114 void setCaretColor(const Color& c) { SET_VAR(m_rareInheritedData, caretColor, c); } 1114 void setCaretColor(const Color& c) { SET_VAR(m_rareInheritedData, caretColor, c); SET_VAR(m_rareInheritedData, hasAutoCaretColor, false); } 1115 void setHasAutoCaretColor() { SET_VAR(m_rareInheritedData, hasAutoCaretColor, true); SET_VAR(m_rareInheritedData, caretColor, currentColor()); } 1115 1116 void setOpacity(float f) { float v = clampTo<float>(f, 0.f, 1.f); SET_VAR(m_rareNonInheritedData, opacity, v); } 1116 1117 void setAppearance(ControlPart a) { SET_VAR(m_rareNonInheritedData, appearance, a); } … … 1808 1809 void setVisitedLinkTextFillColor(const Color& v) { SET_VAR(m_rareInheritedData, visitedLinkTextFillColor, v); } 1809 1810 void setVisitedLinkTextStrokeColor(const Color& v) { SET_VAR(m_rareInheritedData, visitedLinkTextStrokeColor, v); } 1810 void setVisitedLinkCaretColor(const Color& v) { SET_VAR(m_rareInheritedData, visitedLinkCaretColor, v); } 1811 void setVisitedLinkCaretColor(const Color& v) { SET_VAR(m_rareInheritedData, visitedLinkCaretColor, v); SET_VAR(m_rareInheritedData, hasVisitedLinkAutoCaretColor, false); } 1812 void setHasVisitedLinkAutoCaretColor() { SET_VAR(m_rareInheritedData, hasVisitedLinkAutoCaretColor, true); SET_VAR(m_rareInheritedData, visitedLinkCaretColor, currentColor()); } 1811 1813 1812 1814 void inheritUnicodeBidiFrom(const RenderStyle* parent) { m_nonInheritedFlags.unicodeBidi = parent->m_nonInheritedFlags.unicodeBidi; } … … 1831 1833 const Color& textStrokeColor() const { return m_rareInheritedData->textStrokeColor; } 1832 1834 const Color& caretColor() const { return m_rareInheritedData->caretColor; } 1835 bool hasAutoCaretColor() const { return m_rareInheritedData->hasAutoCaretColor; } 1833 1836 const Color& visitedLinkColor() const; 1834 1837 const Color& visitedLinkBackgroundColor() const { return m_rareNonInheritedData->visitedLinkBackgroundColor; } … … 1845 1848 const Color& visitedLinkTextStrokeColor() const { return m_rareInheritedData->visitedLinkTextStrokeColor; } 1846 1849 const Color& visitedLinkCaretColor() const { return m_rareInheritedData->visitedLinkCaretColor; } 1850 bool hasVisitedLinkAutoCaretColor() const { return m_rareInheritedData->hasVisitedLinkAutoCaretColor; } 1847 1851 1848 1852 const Color& stopColor() const { return svgStyle().stopColor(); } -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r267940 r275092 136 136 , hasSetStrokeColor(false) 137 137 , mathStyle(static_cast<unsigned>(RenderStyle::initialMathStyle())) 138 , hasAutoCaretColor(true) 139 , hasVisitedLinkAutoCaretColor(true) 138 140 , effectiveTouchActions(RenderStyle::initialTouchActions()) 139 141 , strokeWidth(RenderStyle::initialStrokeWidth()) … … 232 234 , hasSetStrokeColor(o.hasSetStrokeColor) 233 235 , mathStyle(o.mathStyle) 236 , hasAutoCaretColor(o.hasAutoCaretColor) 237 , hasVisitedLinkAutoCaretColor(o.hasVisitedLinkAutoCaretColor) 234 238 , effectiveTouchActions(o.effectiveTouchActions) 235 239 , eventListenerRegionTypes(o.eventListenerRegionTypes) … … 355 359 && hasSetStrokeColor == o.hasSetStrokeColor 356 360 && mathStyle == o.mathStyle 361 && hasAutoCaretColor == o.hasAutoCaretColor 362 && hasVisitedLinkAutoCaretColor == o.hasVisitedLinkAutoCaretColor 357 363 && effectiveTouchActions == o.effectiveTouchActions 358 364 && eventListenerRegionTypes == o.eventListenerRegionTypes -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r274050 r275092 161 161 unsigned mathStyle : 1; 162 162 163 unsigned hasAutoCaretColor : 1; 164 unsigned hasVisitedLinkAutoCaretColor : 1; 165 163 166 OptionSet<TouchAction> effectiveTouchActions; 164 167 OptionSet<EventListenerRegionType> eventListenerRegionTypes; -
trunk/Source/WebCore/style/StyleBuilderCustom.h
r274957 r275092 78 78 DECLARE_PROPERTY_CUSTOM_HANDLERS(BorderImageWidth); 79 79 DECLARE_PROPERTY_CUSTOM_HANDLERS(BoxShadow); 80 DECLARE_PROPERTY_CUSTOM_HANDLERS(CaretColor); 80 81 DECLARE_PROPERTY_CUSTOM_HANDLERS(Clip); 81 82 DECLARE_PROPERTY_CUSTOM_HANDLERS(Contain); … … 794 795 builderState.style().setOutlineStyleIsAuto(primitiveValue); 795 796 builderState.style().setOutlineStyle(primitiveValue); 797 } 798 799 inline void BuilderCustom::applyInitialCaretColor(BuilderState& builderState) 800 { 801 if (builderState.applyPropertyToRegularStyle()) 802 builderState.style().setHasAutoCaretColor(); 803 if (builderState.applyPropertyToVisitedLinkStyle()) 804 builderState.style().setHasVisitedLinkAutoCaretColor(); 805 } 806 807 inline void BuilderCustom::applyInheritCaretColor(BuilderState& builderState) 808 { 809 Color color = builderState.parentStyle().caretColor(); 810 if (builderState.applyPropertyToRegularStyle()) { 811 if (builderState.parentStyle().hasAutoCaretColor()) 812 builderState.style().setHasAutoCaretColor(); 813 else 814 builderState.style().setCaretColor(color); 815 } 816 if (builderState.applyPropertyToVisitedLinkStyle()) { 817 if (builderState.parentStyle().hasVisitedLinkAutoCaretColor()) 818 builderState.style().setHasVisitedLinkAutoCaretColor(); 819 else 820 builderState.style().setVisitedLinkCaretColor(color); 821 } 822 } 823 824 inline void BuilderCustom::applyValueCaretColor(BuilderState& builderState, CSSValue& value) 825 { 826 auto& primitiveValue = downcast<CSSPrimitiveValue>(value); 827 if (builderState.applyPropertyToRegularStyle()) { 828 if (primitiveValue.valueID() == CSSValueAuto) 829 builderState.style().setHasAutoCaretColor(); 830 else 831 builderState.style().setCaretColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); 832 } 833 if (builderState.applyPropertyToVisitedLinkStyle()) { 834 if (primitiveValue.valueID() == CSSValueAuto) 835 builderState.style().setHasVisitedLinkAutoCaretColor(); 836 else 837 builderState.style().setVisitedLinkCaretColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); 838 } 796 839 } 797 840
Note: See TracChangeset
for help on using the changeset viewer.