Changeset 274055 in webkit
- Timestamp:
- Mar 7, 2021 12:16:46 PM (17 months ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/animations/resources/animation-test-helpers.js (modified) (2 diffs)
-
LayoutTests/animations/stacking-context-unchanged-while-running.html (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/z-index-interpolation-expected.txt (modified) (3 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/properties-value-auto-001-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/CSSPropertyAnimation.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r274054 r274055 1 2021-03-07 Antoine Quint <graouts@webkit.org> 2 3 Correctly handle "auto" values when blending z-index 4 https://bugs.webkit.org/show_bug.cgi?id=222870 5 6 Reviewed by Dean Jackson. 7 8 Fix the test animations/stacking-context-unchanged-while-running.html which made the 9 wrong assumption about blending of z-index with auto values. We now make this test 10 expect an "auto" value and update the helper to know how to deal with "auto" values 11 for "z-index". 12 13 * animations/resources/animation-test-helpers.js: 14 (getPropertyValue): 15 (comparePropertyValue): 16 * animations/stacking-context-unchanged-while-running.html: 17 1 18 2021-03-07 Rob Buis <rbuis@igalia.com> 2 19 -
trunk/LayoutTests/animations/resources/animation-test-helpers.js
r267188 r274055 448 448 } else { 449 449 var computedStyle = window.getComputedStyle(element).getPropertyCSSValue(property); 450 if (property == "z-index" && computedStyle.cssText == "auto") 451 return "auto"; 450 452 computedValue = computedStyle.getFloatValue(CSSPrimitiveValue.CSS_NUMBER); 451 453 } … … 457 459 { 458 460 var result = true; 461 462 if (computedValue == expectedValue) 463 return true; 459 464 460 465 if (!property.indexOf("webkitTransform") || !property.indexOf("transform")) { -
trunk/LayoutTests/animations/stacking-context-unchanged-while-running.html
r236541 r274055 47 47 const expectedValues = [ 48 48 // [animation-name, time, element-id, property, expected-value, tolerance] 49 ["move", 0.5, "animating", "z-index", 0, 0],49 ["move", 0.5, "animating", "z-index", "auto", 0], 50 50 ]; 51 51 -
trunk/LayoutTests/imported/w3c/ChangeLog
r274038 r274055 1 2021-03-07 Antoine Quint <graouts@webkit.org> 2 3 Correctly handle "auto" values when blending z-index 4 https://bugs.webkit.org/show_bug.cgi?id=222870 5 6 Reviewed by Dean Jackson. 7 8 Add an extra 72 PASS results. We now pass all the z-index interpolation tests. 9 10 Another test has new failures, but this is expected, this test behaves the same way 11 across Firefox and Chrome as well. 12 13 * web-platform-tests/css/css-transitions/animations/z-index-interpolation-expected.txt: 14 * web-platform-tests/css/css-transitions/properties-value-auto-001-expected.txt: 15 1 16 2021-03-06 Antoine Quint <graouts@webkit.org> 2 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/z-index-interpolation-expected.txt
r272904 r274055 24 24 PASS Web Animations: property <z-index> from neutral to [5] at (1) should be [5] 25 25 PASS Web Animations: property <z-index> from neutral to [5] at (1.5) should be [9] 26 FAIL CSS Transitions: property <z-index> from [initial] to [5] at (-0.3) should be [5] assert_equals: expected "5 " but got "- 1 " 27 FAIL CSS Transitions: property <z-index> from [initial] to [5] at (0) should be [5] assert_equals: expected "5 " but got "0 " 28 FAIL CSS Transitions: property <z-index> from [initial] to [5] at (0.3) should be [5] assert_equals: expected "5 " but got "2 " 29 FAIL CSS Transitions: property <z-index> from [initial] to [5] at (0.5) should be [5] assert_equals: expected "5 " but got "3 " 30 FAIL CSS Transitions: property <z-index> from [initial] to [5] at (0.6) should be [5] assert_equals: expected "5 " but got "3 " 26 PASS CSS Transitions: property <z-index> from [initial] to [5] at (-0.3) should be [5] 27 PASS CSS Transitions: property <z-index> from [initial] to [5] at (0) should be [5] 28 PASS CSS Transitions: property <z-index> from [initial] to [5] at (0.3) should be [5] 29 PASS CSS Transitions: property <z-index> from [initial] to [5] at (0.5) should be [5] 30 PASS CSS Transitions: property <z-index> from [initial] to [5] at (0.6) should be [5] 31 31 PASS CSS Transitions: property <z-index> from [initial] to [5] at (1) should be [5] 32 FAIL CSS Transitions: property <z-index> from [initial] to [5] at (1.5) should be [5] assert_equals: expected "5 " but got "8 " 33 FAIL CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (-0.3) should be [5] assert_equals: expected "5 " but got "- 1 " 34 FAIL CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (0) should be [5] assert_equals: expected "5 " but got "0 " 35 FAIL CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (0.3) should be [5] assert_equals: expected "5 " but got "2 " 36 FAIL CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (0.5) should be [5] assert_equals: expected "5 " but got "3 " 37 FAIL CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (0.6) should be [5] assert_equals: expected "5 " but got "3 " 32 PASS CSS Transitions: property <z-index> from [initial] to [5] at (1.5) should be [5] 33 PASS CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (-0.3) should be [5] 34 PASS CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (0) should be [5] 35 PASS CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (0.3) should be [5] 36 PASS CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (0.5) should be [5] 37 PASS CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (0.6) should be [5] 38 38 PASS CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (1) should be [5] 39 FAIL CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (1.5) should be [5] assert_equals: expected "5 " but got "8 " 40 FAIL CSS Animations: property <z-index> from [initial] to [5] at (-0.3) should be [initial] assert_equals: expected "auto " but got "- 1 " 41 FAIL CSS Animations: property <z-index> from [initial] to [5] at (0) should be [initial] assert_equals: expected "auto " but got "0 " 42 FAIL CSS Animations: property <z-index> from [initial] to [5] at (0.3) should be [initial] assert_equals: expected "auto " but got "2 " 43 FAIL CSS Animations: property <z-index> from [initial] to [5] at (0.5) should be [5] assert_equals: expected "5 " but got "3 " 44 FAIL CSS Animations: property <z-index> from [initial] to [5] at (0.6) should be [5] assert_equals: expected "5 " but got "3 " 39 PASS CSS Transitions with transition: all: property <z-index> from [initial] to [5] at (1.5) should be [5] 40 PASS CSS Animations: property <z-index> from [initial] to [5] at (-0.3) should be [initial] 41 PASS CSS Animations: property <z-index> from [initial] to [5] at (0) should be [initial] 42 PASS CSS Animations: property <z-index> from [initial] to [5] at (0.3) should be [initial] 43 PASS CSS Animations: property <z-index> from [initial] to [5] at (0.5) should be [5] 44 PASS CSS Animations: property <z-index> from [initial] to [5] at (0.6) should be [5] 45 45 PASS CSS Animations: property <z-index> from [initial] to [5] at (1) should be [5] 46 FAIL CSS Animations: property <z-index> from [initial] to [5] at (1.5) should be [5] assert_equals: expected "5 " but got "8 " 47 FAIL Web Animations: property <z-index> from [initial] to [5] at (-0.3) should be [initial] assert_equals: expected "auto " but got "- 1 " 48 FAIL Web Animations: property <z-index> from [initial] to [5] at (0) should be [initial] assert_equals: expected "auto " but got "0 " 49 FAIL Web Animations: property <z-index> from [initial] to [5] at (0.3) should be [initial] assert_equals: expected "auto " but got "2 " 50 FAIL Web Animations: property <z-index> from [initial] to [5] at (0.5) should be [5] assert_equals: expected "5 " but got "3 " 51 FAIL Web Animations: property <z-index> from [initial] to [5] at (0.6) should be [5] assert_equals: expected "5 " but got "3 " 46 PASS CSS Animations: property <z-index> from [initial] to [5] at (1.5) should be [5] 47 PASS Web Animations: property <z-index> from [initial] to [5] at (-0.3) should be [initial] 48 PASS Web Animations: property <z-index> from [initial] to [5] at (0) should be [initial] 49 PASS Web Animations: property <z-index> from [initial] to [5] at (0.3) should be [initial] 50 PASS Web Animations: property <z-index> from [initial] to [5] at (0.5) should be [5] 51 PASS Web Animations: property <z-index> from [initial] to [5] at (0.6) should be [5] 52 52 PASS Web Animations: property <z-index> from [initial] to [5] at (1) should be [5] 53 FAIL Web Animations: property <z-index> from [initial] to [5] at (1.5) should be [5] assert_equals: expected "5 " but got "8 " 53 PASS Web Animations: property <z-index> from [initial] to [5] at (1.5) should be [5] 54 54 PASS CSS Transitions: property <z-index> from [inherit] to [5] at (-0.3) should be [18] 55 55 PASS CSS Transitions: property <z-index> from [inherit] to [5] at (0) should be [15] … … 76 76 PASS Web Animations: property <z-index> from [inherit] to [5] at (1) should be [5] 77 77 PASS Web Animations: property <z-index> from [inherit] to [5] at (1.5) should be [0] 78 FAIL CSS Transitions: property <z-index> from [unset] to [5] at (-0.3) should be [5] assert_equals: expected "5 " but got "- 1 " 79 FAIL CSS Transitions: property <z-index> from [unset] to [5] at (0) should be [5] assert_equals: expected "5 " but got "0 " 80 FAIL CSS Transitions: property <z-index> from [unset] to [5] at (0.3) should be [5] assert_equals: expected "5 " but got "2 " 81 FAIL CSS Transitions: property <z-index> from [unset] to [5] at (0.5) should be [5] assert_equals: expected "5 " but got "3 " 82 FAIL CSS Transitions: property <z-index> from [unset] to [5] at (0.6) should be [5] assert_equals: expected "5 " but got "3 " 78 PASS CSS Transitions: property <z-index> from [unset] to [5] at (-0.3) should be [5] 79 PASS CSS Transitions: property <z-index> from [unset] to [5] at (0) should be [5] 80 PASS CSS Transitions: property <z-index> from [unset] to [5] at (0.3) should be [5] 81 PASS CSS Transitions: property <z-index> from [unset] to [5] at (0.5) should be [5] 82 PASS CSS Transitions: property <z-index> from [unset] to [5] at (0.6) should be [5] 83 83 PASS CSS Transitions: property <z-index> from [unset] to [5] at (1) should be [5] 84 FAIL CSS Transitions: property <z-index> from [unset] to [5] at (1.5) should be [5] assert_equals: expected "5 " but got "8 " 85 FAIL CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (-0.3) should be [5] assert_equals: expected "5 " but got "- 1 " 86 FAIL CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (0) should be [5] assert_equals: expected "5 " but got "0 " 87 FAIL CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (0.3) should be [5] assert_equals: expected "5 " but got "2 " 88 FAIL CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (0.5) should be [5] assert_equals: expected "5 " but got "3 " 89 FAIL CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (0.6) should be [5] assert_equals: expected "5 " but got "3 " 84 PASS CSS Transitions: property <z-index> from [unset] to [5] at (1.5) should be [5] 85 PASS CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (-0.3) should be [5] 86 PASS CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (0) should be [5] 87 PASS CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (0.3) should be [5] 88 PASS CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (0.5) should be [5] 89 PASS CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (0.6) should be [5] 90 90 PASS CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (1) should be [5] 91 FAIL CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (1.5) should be [5] assert_equals: expected "5 " but got "8 " 92 FAIL CSS Animations: property <z-index> from [unset] to [5] at (-0.3) should be [unset] assert_equals: expected "auto " but got "- 1 " 93 FAIL CSS Animations: property <z-index> from [unset] to [5] at (0) should be [unset] assert_equals: expected "auto " but got "0 " 94 FAIL CSS Animations: property <z-index> from [unset] to [5] at (0.3) should be [unset] assert_equals: expected "auto " but got "2 " 95 FAIL CSS Animations: property <z-index> from [unset] to [5] at (0.5) should be [5] assert_equals: expected "5 " but got "3 " 96 FAIL CSS Animations: property <z-index> from [unset] to [5] at (0.6) should be [5] assert_equals: expected "5 " but got "3 " 91 PASS CSS Transitions with transition: all: property <z-index> from [unset] to [5] at (1.5) should be [5] 92 PASS CSS Animations: property <z-index> from [unset] to [5] at (-0.3) should be [unset] 93 PASS CSS Animations: property <z-index> from [unset] to [5] at (0) should be [unset] 94 PASS CSS Animations: property <z-index> from [unset] to [5] at (0.3) should be [unset] 95 PASS CSS Animations: property <z-index> from [unset] to [5] at (0.5) should be [5] 96 PASS CSS Animations: property <z-index> from [unset] to [5] at (0.6) should be [5] 97 97 PASS CSS Animations: property <z-index> from [unset] to [5] at (1) should be [5] 98 FAIL CSS Animations: property <z-index> from [unset] to [5] at (1.5) should be [5] assert_equals: expected "5 " but got "8 " 99 FAIL Web Animations: property <z-index> from [unset] to [5] at (-0.3) should be [unset] assert_equals: expected "auto " but got "- 1 " 100 FAIL Web Animations: property <z-index> from [unset] to [5] at (0) should be [unset] assert_equals: expected "auto " but got "0 " 101 FAIL Web Animations: property <z-index> from [unset] to [5] at (0.3) should be [unset] assert_equals: expected "auto " but got "2 " 102 FAIL Web Animations: property <z-index> from [unset] to [5] at (0.5) should be [5] assert_equals: expected "5 " but got "3 " 103 FAIL Web Animations: property <z-index> from [unset] to [5] at (0.6) should be [5] assert_equals: expected "5 " but got "3 " 98 PASS CSS Animations: property <z-index> from [unset] to [5] at (1.5) should be [5] 99 PASS Web Animations: property <z-index> from [unset] to [5] at (-0.3) should be [unset] 100 PASS Web Animations: property <z-index> from [unset] to [5] at (0) should be [unset] 101 PASS Web Animations: property <z-index> from [unset] to [5] at (0.3) should be [unset] 102 PASS Web Animations: property <z-index> from [unset] to [5] at (0.5) should be [5] 103 PASS Web Animations: property <z-index> from [unset] to [5] at (0.6) should be [5] 104 104 PASS Web Animations: property <z-index> from [unset] to [5] at (1) should be [5] 105 FAIL Web Animations: property <z-index> from [unset] to [5] at (1.5) should be [5] assert_equals: expected "5 " but got "8 " 105 PASS Web Animations: property <z-index> from [unset] to [5] at (1.5) should be [5] 106 106 PASS CSS Transitions: property <z-index> from [-5] to [5] at (-0.3) should be [-8] 107 107 PASS CSS Transitions: property <z-index> from [-5] to [5] at (0) should be [-5] … … 180 180 PASS Web Animations: property <z-index> from [-2] to [-4] at (1) should be [-4] 181 181 PASS Web Animations: property <z-index> from [-2] to [-4] at (1.5) should be [-5] 182 FAIL CSS Transitions: property <z-index> from [auto] to [10] at (-0.3) should be [10] assert_equals: expected "10 " but got "- 3 " 183 FAIL CSS Transitions: property <z-index> from [auto] to [10] at (0) should be [10] assert_equals: expected "10 " but got "0 " 184 FAIL CSS Transitions: property <z-index> from [auto] to [10] at (0.3) should be [10] assert_equals: expected "10 " but got "3 " 185 FAIL CSS Transitions: property <z-index> from [auto] to [10] at (0.5) should be [10] assert_equals: expected "10 " but got "5 " 186 FAIL CSS Transitions: property <z-index> from [auto] to [10] at (0.6) should be [10] assert_equals: expected "10 " but got "6 " 182 PASS CSS Transitions: property <z-index> from [auto] to [10] at (-0.3) should be [10] 183 PASS CSS Transitions: property <z-index> from [auto] to [10] at (0) should be [10] 184 PASS CSS Transitions: property <z-index> from [auto] to [10] at (0.3) should be [10] 185 PASS CSS Transitions: property <z-index> from [auto] to [10] at (0.5) should be [10] 186 PASS CSS Transitions: property <z-index> from [auto] to [10] at (0.6) should be [10] 187 187 PASS CSS Transitions: property <z-index> from [auto] to [10] at (1) should be [10] 188 FAIL CSS Transitions: property <z-index> from [auto] to [10] at (1.5) should be [10] assert_equals: expected "10 " but got "15 " 189 FAIL CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (-0.3) should be [10] assert_equals: expected "10 " but got "- 3 " 190 FAIL CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (0) should be [10] assert_equals: expected "10 " but got "0 " 191 FAIL CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (0.3) should be [10] assert_equals: expected "10 " but got "3 " 192 FAIL CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (0.5) should be [10] assert_equals: expected "10 " but got "5 " 193 FAIL CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (0.6) should be [10] assert_equals: expected "10 " but got "6 " 188 PASS CSS Transitions: property <z-index> from [auto] to [10] at (1.5) should be [10] 189 PASS CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (-0.3) should be [10] 190 PASS CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (0) should be [10] 191 PASS CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (0.3) should be [10] 192 PASS CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (0.5) should be [10] 193 PASS CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (0.6) should be [10] 194 194 PASS CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (1) should be [10] 195 FAIL CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (1.5) should be [10] assert_equals: expected "10 " but got "15 " 196 FAIL CSS Animations: property <z-index> from [auto] to [10] at (-0.3) should be [auto] assert_equals: expected "auto " but got "- 3 " 197 FAIL CSS Animations: property <z-index> from [auto] to [10] at (0) should be [auto] assert_equals: expected "auto " but got "0 " 198 FAIL CSS Animations: property <z-index> from [auto] to [10] at (0.3) should be [auto] assert_equals: expected "auto " but got "3 " 199 FAIL CSS Animations: property <z-index> from [auto] to [10] at (0.5) should be [10] assert_equals: expected "10 " but got "5 " 200 FAIL CSS Animations: property <z-index> from [auto] to [10] at (0.6) should be [10] assert_equals: expected "10 " but got "6 " 195 PASS CSS Transitions with transition: all: property <z-index> from [auto] to [10] at (1.5) should be [10] 196 PASS CSS Animations: property <z-index> from [auto] to [10] at (-0.3) should be [auto] 197 PASS CSS Animations: property <z-index> from [auto] to [10] at (0) should be [auto] 198 PASS CSS Animations: property <z-index> from [auto] to [10] at (0.3) should be [auto] 199 PASS CSS Animations: property <z-index> from [auto] to [10] at (0.5) should be [10] 200 PASS CSS Animations: property <z-index> from [auto] to [10] at (0.6) should be [10] 201 201 PASS CSS Animations: property <z-index> from [auto] to [10] at (1) should be [10] 202 FAIL CSS Animations: property <z-index> from [auto] to [10] at (1.5) should be [10] assert_equals: expected "10 " but got "15 " 203 FAIL Web Animations: property <z-index> from [auto] to [10] at (-0.3) should be [auto] assert_equals: expected "auto " but got "- 3 " 204 FAIL Web Animations: property <z-index> from [auto] to [10] at (0) should be [auto] assert_equals: expected "auto " but got "0 " 205 FAIL Web Animations: property <z-index> from [auto] to [10] at (0.3) should be [auto] assert_equals: expected "auto " but got "3 " 206 FAIL Web Animations: property <z-index> from [auto] to [10] at (0.5) should be [10] assert_equals: expected "10 " but got "5 " 207 FAIL Web Animations: property <z-index> from [auto] to [10] at (0.6) should be [10] assert_equals: expected "10 " but got "6 " 202 PASS CSS Animations: property <z-index> from [auto] to [10] at (1.5) should be [10] 203 PASS Web Animations: property <z-index> from [auto] to [10] at (-0.3) should be [auto] 204 PASS Web Animations: property <z-index> from [auto] to [10] at (0) should be [auto] 205 PASS Web Animations: property <z-index> from [auto] to [10] at (0.3) should be [auto] 206 PASS Web Animations: property <z-index> from [auto] to [10] at (0.5) should be [10] 207 PASS Web Animations: property <z-index> from [auto] to [10] at (0.6) should be [10] 208 208 PASS Web Animations: property <z-index> from [auto] to [10] at (1) should be [10] 209 FAIL Web Animations: property <z-index> from [auto] to [10] at (1.5) should be [10] assert_equals: expected "10 " but got "15 " 209 PASS Web Animations: property <z-index> from [auto] to [10] at (1.5) should be [10] 210 210 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/properties-value-auto-001-expected.txt
r273635 r274055 48 48 FAIL bottom auto(from) / values assert_not_equals: must not be target value after start got disallowed value "13.333333015441895px" 49 49 FAIL bottom auto(from) / events assert_equals: Expected TransitionEnd events triggered on .transition expected "bottom:2s" but got "" 50 PASS z-index auto(to) / values 51 PASS z-index auto(to) / events 52 PASS z-index auto(from) / values 53 PASS z-index auto(from) / events 50 FAIL z-index auto(to) / values assert_not_equals: must not be target value after start got disallowed value "auto" 51 FAIL z-index auto(to) / events assert_equals: Expected TransitionEnd events triggered on .transition expected "z-index:2s" but got "" 52 FAIL z-index auto(from) / values assert_not_equals: must not be target value after start got disallowed value "10" 53 FAIL z-index auto(from) / events assert_equals: Expected TransitionEnd events triggered on .transition expected "z-index:2s" but got "" 54 54 Text sample 55 55 -
trunk/Source/WebCore/ChangeLog
r274054 r274055 1 2021-03-07 Antoine Quint <graouts@webkit.org> 2 3 Correctly handle "auto" values when blending z-index 4 https://bugs.webkit.org/show_bug.cgi?id=222870 5 6 Reviewed by Dean Jackson. 7 8 Create a dedicated wrapper for z-index such that we can handle "auto" values 9 instead of just blending an int. 10 11 * animation/CSSPropertyAnimation.cpp: 12 (WebCore::ZIndexPropertyWrapper::ZIndexPropertyWrapper): 13 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): 14 1 15 2021-03-07 Rob Buis <rbuis@igalia.com> 2 16 -
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
r274050 r274055 1699 1699 }; 1700 1700 1701 class ZIndexPropertyWrapper : public PropertyWrapper<int> { 1702 WTF_MAKE_FAST_ALLOCATED; 1703 public: 1704 ZIndexPropertyWrapper() 1705 : PropertyWrapper<int>(CSSPropertyZIndex, &RenderStyle::specifiedZIndex, &RenderStyle::setSpecifiedZIndex) 1706 { 1707 } 1708 1709 bool canInterpolate(const RenderStyle* from, const RenderStyle* to) const override 1710 { 1711 return !from->hasAutoSpecifiedZIndex() && !to->hasAutoSpecifiedZIndex(); 1712 } 1713 1714 void blend(const CSSPropertyBlendingClient* anim, RenderStyle* dst, const RenderStyle* from, const RenderStyle* to, double progress) const override 1715 { 1716 PropertyWrapper::blend(anim, dst, from, to, progress); 1717 if (canInterpolate(from, to)) 1718 return; 1719 1720 ASSERT(!progress || progress == 1.0); 1721 if (!progress) { 1722 if (from->hasAutoSpecifiedZIndex()) 1723 dst->setHasAutoSpecifiedZIndex(); 1724 } else { 1725 if (to->hasAutoSpecifiedZIndex()) 1726 dst->setHasAutoSpecifiedZIndex(); 1727 } 1728 } 1729 }; 1730 1701 1731 class CSSPropertyAnimationWrapperMap { 1702 1732 WTF_MAKE_FAST_ALLOCATED; … … 1816 1846 new PropertyWrapper<float>(CSSPropertyWebkitBorderHorizontalSpacing, &RenderStyle::horizontalBorderSpacing, &RenderStyle::setHorizontalBorderSpacing), 1817 1847 new PropertyWrapper<float>(CSSPropertyWebkitBorderVerticalSpacing, &RenderStyle::verticalBorderSpacing, &RenderStyle::setVerticalBorderSpacing), 1818 new PropertyWrapper<int>(CSSPropertyZIndex, &RenderStyle::specifiedZIndex, &RenderStyle::setSpecifiedZIndex),1848 new ZIndexPropertyWrapper, 1819 1849 new PropertyWrapper<unsigned short>(CSSPropertyOrphans, &RenderStyle::orphans, &RenderStyle::setOrphans), 1820 1850 new PropertyWrapper<unsigned short>(CSSPropertyWidows, &RenderStyle::widows, &RenderStyle::setWidows),
Note: See TracChangeset
for help on using the changeset viewer.