Changeset 287606 in webkit
- Timestamp:
- Jan 5, 2022 12:22:38 AM (7 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform-percent-009-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSComputedStyleDeclaration.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r287602 r287606 1 2022-01-05 Martin Robinson <mrobinson@webkit.org> 2 3 CSS `transform` property should take into account transform reference box 4 https://bugs.webkit.org/show_bug.cgi?id=234144 5 <rdar://problem/86630206> 6 7 Reviewed by Darin Adler. 8 9 * web-platform-tests/css/css-transforms/transform-percent-009-expected.txt: 10 1 11 2022-01-04 Antoine Quint <graouts@webkit.org> 2 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform-percent-009-expected.txt
r282287 r287606 1 1 2 FAIL Percentage 'translate(...)' with 'fill-box' transform-box assert_equals: expected "matrix(1, 0, 0, 1, 50, 50)" but got "matrix(1, 0, 0, 1, 0, 0)" 3 FAIL Percentage 'translate(...)' with 'view-box' transform-box assert_equals: expected "matrix(1, 0, 0, 1, 150, 75)" but got "matrix(1, 0, 0, 1, 0, 0)" 4 FAIL Percentage 'translate(...)' with 'view-box' transform-box in nested <svg> with 'viewBox' assert_equals: expected "matrix(1, 0, 0, 1, 25, 25)" but got "matrix(1, 0, 0, 1, 0, 0)" 5 FAIL Percentage 'translate(...)' with 'view-box' transform-box in nested <svg> without 'viewBox' assert_equals: expected "matrix(1, 0, 0, 1, 50, 50)" but got "matrix(1, 0, 0, 1, 0, 0)" 2 PASS Percentage 'translate(...)' with 'fill-box' transform-box 3 PASS Percentage 'translate(...)' with 'view-box' transform-box 4 PASS Percentage 'translate(...)' with 'view-box' transform-box in nested <svg> with 'viewBox' 5 PASS Percentage 'translate(...)' with 'view-box' transform-box in nested <svg> without 'viewBox' 6 6 -
trunk/Source/WebCore/ChangeLog
r287604 r287606 1 2022-01-05 Martin Robinson <mrobinson@webkit.org> 2 3 CSS `transform` property should take into account transform reference box 4 https://bugs.webkit.org/show_bug.cgi?id=234144 5 <rdar://problem/86630206> 6 7 Reviewed by Darin Adler. 8 9 No new tests. This is covered by the existing WPT test: 10 web-platform-tests/css/css-transforms/transform-percent-009.html 11 12 * css/CSSComputedStyleDeclaration.cpp: 13 (WebCore::computedTransform): Use the transform reference box when computing the 14 computed transform instead of always using the border box. This function is 15 modified to take in a RenderElement to avoid casting. All callers pass a RenderElement. 16 1 17 2022-01-04 Frédéric Wang <fwang@igalia.com> 2 18 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r287602 r287606 618 618 } 619 619 620 static Ref<CSSValue> computedTransform(Render Object* renderer, const RenderStyle& style)620 static Ref<CSSValue> computedTransform(RenderElement* renderer, const RenderStyle& style) 621 621 { 622 622 if (!rendererCanBeTransformed(renderer) || !style.hasTransform()) 623 623 return CSSValuePool::singleton().createIdentifierValue(CSSValueNone); 624 624 625 FloatRect pixelSnappedRect;626 if (is<RenderBox>(*renderer))627 pixelSnappedRect = snapRectToDevicePixels(downcast<RenderBox>(*renderer).borderBoxRect(), renderer->document().deviceScaleFactor());628 629 625 TransformationMatrix transform; 630 style.applyTransform(transform, pixelSnappedRect, { });626 style.applyTransform(transform, transformReferenceBox(style, *renderer), { }); 631 627 // Note that this does not flatten to an affine transform if ENABLE(3D_TRANSFORMS) is off, by design. 632 628
Note: See TracChangeset
for help on using the changeset viewer.