Changeset 282315 in webkit
- Timestamp:
- Sep 11, 2021, 6:41:08 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r282305 r282315 1 2021-09-11 Simon Fraser <[email protected]> 2 3 css/css-transforms/translate-getComputedStyle.html fails 4 https://bugs.webkit.org/show_bug.cgi?id=230178 5 6 Reviewed by Antti Koivisto. 7 8 The interpolation test appears to regress, but do so because we now correctly output calc() 9 in computed style (we just serialize the calc incorrectly). 10 11 * web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt: 12 * web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt: 13 * web-platform-tests/css/css-transforms/transforms-support-calc-expected.txt: 14 * web-platform-tests/css/css-transforms/translate-getComputedStyle-expected.txt: 15 * web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt: 16 1 17 2021-09-10 Chris Dumez <[email protected]> 2 18 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt
r276551 r282315 1 1 2 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (-1) should be [-100% calc(200px + 100%) 300px] assert_equals: expected " 0px 200px 300px " but got "- 100px"3 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0) should be [calc(50px + 0%) calc(200px + 50%) 300px] assert_equals: expected " 50px 200px 300px " but got "- 50px"4 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0.25) should be [calc(62.5px + 25%) calc(200px + 37.5%) 300px] assert_equals: expected " 62.5px 200px 300px " but got "- 37.5px"5 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0.75) should be [calc(87.5px + 75%) calc(200px + 12.5%) 300px] assert_equals: expected " 87.5px 200px 300px " but got "- 12.5px"6 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (1) should be [calc(100px + 100%) calc(200px + 0%) 300px] assert_equals: expected " 100px 200px 300px " but got "0px"7 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (2) should be [calc(150px + 200%) calc(200px - 50%) 300px] assert_equals: expected " 150px 200px 300px " but got "50px"8 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (-1) should be [100% calc(600px - 50%) 500px] assert_equals: expected " 0px 600px 500px " but got "- 200px 200px- 100px "9 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0) should be [calc(100px + 50%) calc(300px + 0%) 300px] assert_equals: expected " 100px 300px 300px " but got "0px 100px"10 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0.25) should be [calc(125px + 37.5%) calc(225px + 12.5%) 250px] assert_equals: expected " 125px 225px 250px " but got "50px 75px25px "11 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0.75) should be [calc(175px + 12.5%) calc(75px + 37.5%) 150px] assert_equals: expected " 175px 75px 150px " but got "150px 25px75px "2 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (-1) should be [-100% calc(200px + 100%) 300px] assert_equals: expected "- 100 % calc ( 100 % + 200px ) 300px " but got "calc ( - 100 % - 100px ) 100 % " 3 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0) should be [calc(50px + 0%) calc(200px + 50%) 300px] assert_equals: expected "calc ( 0 % + 50px ) calc ( 50 % + 200px ) 300px " but got "calc ( 0 % - 50px ) 50 % " 4 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0.25) should be [calc(62.5px + 25%) calc(200px + 37.5%) 300px] assert_equals: expected "calc ( 25 % + 62.5px ) calc ( 37.5 % + 200px ) 300px " but got "calc ( 25 % - 37.5px ) 37.5 % " 5 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (0.75) should be [calc(87.5px + 75%) calc(200px + 12.5%) 300px] assert_equals: expected "calc ( 75 % + 87.5px ) calc ( 12.5 % + 200px ) 300px " but got "calc ( 75 % - 12.5px ) 12.5 % " 6 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (1) should be [calc(100px + 100%) calc(200px + 0%) 300px] assert_equals: expected "calc ( 100 % + 100px ) calc ( 0 % + 200px ) 300px " but got "100 % " 7 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [-50px 50%] to add [100%] at (2) should be [calc(150px + 200%) calc(200px - 50%) 300px] assert_equals: expected "calc ( 200 % + 150px ) calc ( - 50 % + 200px ) 300px " but got "calc ( 200 % + 50px ) - 50 % " 8 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (-1) should be [100% calc(600px - 50%) 500px] assert_equals: expected "100 % calc ( - 50 % + 600px ) 500px " but got "calc ( 100 % - 200px ) calc ( - 50 % + 200px ) - 100px " 9 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0) should be [calc(100px + 50%) calc(300px + 0%) 300px] assert_equals: expected "calc ( 50 % + 100px ) calc ( 0 % + 300px ) 300px " but got "50 % calc ( 0 % + 100px ) " 10 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0.25) should be [calc(125px + 37.5%) calc(225px + 12.5%) 250px] assert_equals: expected "calc ( 37.5 % + 125px ) calc ( 12.5 % + 225px ) 250px " but got "calc ( 37.5 % + 50px ) calc ( 12.5 % + 75px ) 25px " 11 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (0.75) should be [calc(175px + 12.5%) calc(75px + 37.5%) 150px] assert_equals: expected "calc ( 12.5 % + 175px ) calc ( 37.5 % + 75px ) 150px " but got "calc ( 12.5 % + 150px ) calc ( 37.5 % + 25px ) 75px " 12 12 PASS Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (1) should be [calc(200px + 0%) 50% 100px] 13 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (2) should be [calc(300px - 50%) calc(-300px + 100%) -100px] assert_equals: expected " 300px - 300px - 100px " but got "400px - 100px200px "14 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (-1) should be [calc(-300px + 100%) -50% -400px] assert_equals: expected " - 300px 0px - 400px " but got "- 200px 200px- 100px "13 FAIL Compositing: property <translate> underlying [100px 200px 300px] from add [50% 100px] to replace [200px 50% 100px] at (2) should be [calc(300px - 50%) calc(-300px + 100%) -100px] assert_equals: expected "calc ( - 50 % + 300px ) calc ( 100 % - 300px ) - 100px " but got "calc ( - 50 % + 400px ) calc ( 100 % - 100px ) 200px " 14 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (-1) should be [calc(-300px + 100%) -50% -400px] assert_equals: expected "calc ( 100 % - 300px ) - 50 % - 400px " but got "calc ( 100 % - 200px ) calc ( - 50 % + 200px ) - 100px " 15 15 PASS Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0) should be [50% calc(100px + 0%)] 16 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0.25) should be [calc(75px + 37.5%) calc(125px + 12.5%) 100px] assert_equals: expected " 75px 125px 100px " but got "50px 75px25px "17 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0.75) should be [calc(225px + 12.5%) calc(175px + 37.5%) 300px] assert_equals: expected " 225px 175px 300px " but got "150px 25px75px "18 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (1) should be [calc(300px + 0%) calc(200px + 50%) 400px] assert_equals: expected " 300px 200px 400px " but got "200px 0px100px "19 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (2) should be [calc(600px - 50%) calc(300px + 100%) 800px] assert_equals: expected " 600px 300px 800px " but got "400px - 100px200px "16 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0.25) should be [calc(75px + 37.5%) calc(125px + 12.5%) 100px] assert_equals: expected "calc ( 37.5 % + 75px ) calc ( 12.5 % + 125px ) 100px " but got "calc ( 37.5 % + 50px ) calc ( 12.5 % + 75px ) 25px " 17 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (0.75) should be [calc(225px + 12.5%) calc(175px + 37.5%) 300px] assert_equals: expected "calc ( 12.5 % + 225px ) calc ( 37.5 % + 175px ) 300px " but got "calc ( 12.5 % + 150px ) calc ( 37.5 % + 25px ) 75px " 18 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (1) should be [calc(300px + 0%) calc(200px + 50%) 400px] assert_equals: expected "calc ( 0 % + 300px ) calc ( 50 % + 200px ) 400px " but got "calc ( 0 % + 200px ) 50 % 100px " 19 FAIL Compositing: property <translate> underlying [100px 200px 300px] from replace [50% 100px] to add [200px 50% 100px] at (2) should be [calc(600px - 50%) calc(300px + 100%) 800px] assert_equals: expected "calc ( - 50 % + 600px ) calc ( 100 % + 300px ) 800px " but got "calc ( - 50 % + 400px ) calc ( 100 % - 100px ) 200px " 20 20 PASS Compositing: property <translate> underlying [none] from replace [none] to add [100px] at (-1) should be [-100px] 21 21 PASS Compositing: property <translate> underlying [none] from replace [none] to add [100px] at (0) should be [none] -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt
r274353 r282315 145 145 PASS Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px] 146 146 PASS CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px] 147 PASS CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [480px 400px 320px] 147 FAIL CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [480px 400px 320px] assert_equals: expected "480px 400px 320px " but got "calc ( 0 % + 480px ) calc ( 0 % + 400px ) 320px " 148 148 PASS CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px] 149 149 PASS CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px] … … 151 151 PASS CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px] 152 152 PASS CSS Transitions with transition: all: property <translate> from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px] 153 PASS CSS Transitions with transition: all: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [480px 400px 320px] 153 FAIL CSS Transitions with transition: all: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [480px 400px 320px] assert_equals: expected "480px 400px 320px " but got "calc ( 0 % + 480px ) calc ( 0 % + 400px ) 320px " 154 154 PASS CSS Transitions with transition: all: property <translate> from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px] 155 155 PASS CSS Transitions with transition: all: property <translate> from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px] … … 157 157 PASS CSS Transitions with transition: all: property <translate> from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px] 158 158 PASS CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px] 159 PASS CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [480px 400px 320px] 159 FAIL CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [480px 400px 320px] assert_equals: expected "480px 400px 320px " but got "calc ( 0 % + 480px ) calc ( 0 % + 400px ) 320px " 160 160 PASS CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px] 161 161 PASS CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px] … … 163 163 PASS CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px] 164 164 PASS Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px] 165 PASS Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [480px 400px 320px] 165 FAIL Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [480px 400px 320px] assert_equals: expected "480px 400px 320px " but got "calc ( 0 % + 480px ) calc ( 0 % + 400px ) 320px " 166 166 PASS Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px] 167 167 PASS Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px] -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transforms-support-calc-expected.txt
r282287 r282315 1 1 2 FAIL translate supports calc assert_equals: expected "calc(20% + 30px) calc(100% - 200px)" but got "30px -200px" 2 PASS translate supports calc 3 3 PASS rotate supports calc 4 4 PASS scale supports calc -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/translate-getComputedStyle-expected.txt
r282287 r282315 1 1 2 FAIL computed style for translate assert_equals: expected "30% 40% 50px" but got "0px 0px 50px" 2 PASS computed style for translate 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt
r276643 r282315 218 218 PASS translate with one unspecified value 219 219 PASS translate with all three values specified 220 FAIL translate with combination of percentages and lengths assert_equals: The value should be calc(0% + 200px) calc(25% - 50.5px) 200px at 500ms expected "calc(0% + 200px) calc(25% - 50.5px) 200px" but got "200px -50.5px 200px" 220 PASS translate with combination of percentages and lengths 221 221 PASS scale (type: scaleList) has testInterpolation function 222 222 PASS scale with two unspecified values -
trunk/Source/WebCore/ChangeLog
r282311 r282315 1 2021-09-11 Simon Fraser <[email protected]> 2 3 css/css-transforms/translate-getComputedStyle.html fails 4 https://bugs.webkit.org/show_bug.cgi?id=230178 5 6 Reviewed by Antti Koivisto. 7 8 https://drafts.csswg.org/css-transforms-2/#propdef-translate says that the computed value of 9 the translate property is "the keyword none or a pair of computed <length-percentage> values 10 and an absolute length" and has a note saying "Note: The resolved value of the translate 11 property is the computed value, and thus getComputedStyle() includes percentage values in 12 its results." so implement that. 13 14 Tested by imported/w3c/web-platform-tests/css/css-transforms/translate-getComputedStyle.html 15 16 * css/CSSComputedStyleDeclaration.cpp: 17 (WebCore::computedTranslate): 18 1 19 2021-09-11 Antti Koivisto <[email protected]> 2 20 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r282234 r282315 624 624 } 625 625 626 // https://drafts.csswg.org/css-transforms-2/#propdef-translate 627 // Computed value: the keyword none or a pair of computed <length-percentage> values and an absolute length 626 628 static Ref<CSSValue> computedTranslate(RenderObject* renderer, const RenderStyle& style) 627 629 { … … 630 632 return CSSValuePool::singleton().createIdentifierValue(CSSValueNone); 631 633 632 FloatRect pixelSnappedRect;633 if (is<RenderBox>(*renderer))634 pixelSnappedRect = snapRectToDevicePixels(downcast<RenderBox>(*renderer).borderBoxRect(), renderer->document().deviceScaleFactor());635 636 TransformationMatrix transform;637 translate->apply(transform, pixelSnappedRect.size());638 639 634 auto list = CSSValueList::createSpaceSeparated(); 640 if (transform.isAffine()) { 641 list->append(zoomAdjustedPixelValue(transform.e(), style)); 642 if (transform.f()) 643 list->append(zoomAdjustedPixelValue(transform.f(), style)); 644 } else { 645 list->append(zoomAdjustedPixelValue(transform.m41(), style)); 646 list->append(zoomAdjustedPixelValue(transform.m42(), style)); 647 list->append(zoomAdjustedPixelValue(transform.m43(), style)); 648 } 635 list->append(zoomAdjustedPixelValueForLength(translate->x(), style)); 636 637 if (!translate->y().isZero() || !translate->z().isZero()) 638 list->append(zoomAdjustedPixelValueForLength(translate->y(), style)); 639 640 if (!translate->z().isZero()) 641 list->append(zoomAdjustedPixelValueForLength(translate->z(), style)); 649 642 650 643 return list;
Note:
See TracChangeset
for help on using the changeset viewer.