Skip to content
Permalink
Browse files
Fix computed value for transform property
https://bugs.webkit.org/show_bug.cgi?id=249421

Reviewed by Antoine Quint.

Fix computed value for `transform` property. SkewY was incorrectly reported as
SkewX due to a bad copy/paste.

* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/transform-expected.txt:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::computedTransform):

Canonical link: https://commits.webkit.org/257964@main
  • Loading branch information
cdumez committed Dec 16, 2022
1 parent 5ba9bec commit 199b72026c4dcae67f905c8cad2388c57b3c9c0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -7,7 +7,7 @@ PASS Can set 'transform' to var() references: var(--A)
PASS Can set 'transform' to the 'none' keyword: none
PASS Can set 'transform' to a transform: translate(50%, 50%)
PASS Can set 'transform' to a transform: perspective(10em)
FAIL Can set 'transform' to a transform: translate3d(0px, 1px, 2px) translate(0px, 1px) rotate3d(1, 2, 3, 45deg) rotate(45deg) scale3d(1, 2, 3) scale(1, 2) skew(1deg, 1deg) skewX(1deg) skewY(45deg) perspective(1px) matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) matrix(1, 2, 3, 4, 5, 6) assert_equals: expected "CSSSkewY" but got "CSSSkewX"
PASS Can set 'transform' to a transform: translate3d(0px, 1px, 2px) translate(0px, 1px) rotate3d(1, 2, 3, 45deg) rotate(45deg) scale3d(1, 2, 3) scale(1, 2) skew(1deg, 1deg) skewX(1deg) skewY(45deg) perspective(1px) matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) matrix(1, 2, 3, 4, 5, 6)
PASS Setting 'transform' to a length: 0px throws TypeError
PASS Setting 'transform' to a length: -3.14em throws TypeError
PASS Setting 'transform' to a length: 3.14cm throws TypeError
@@ -854,7 +854,7 @@ static Ref<CSSValue> computedTransform(RenderElement* renderer, const RenderStyl
functionValue->append(cssValuePool.createValue(downcast<SkewTransformOperation>(*operation).angleX(), CSSUnitType::CSS_DEG));
break;
case TransformOperation::Type::SkewY:
functionValue = CSSFunctionValue::create(CSSValueSkewX);
functionValue = CSSFunctionValue::create(CSSValueSkewY);
functionValue->append(cssValuePool.createValue(downcast<SkewTransformOperation>(*operation).angleY(), CSSUnitType::CSS_DEG));
break;
case TransformOperation::Type::Skew: {

0 comments on commit 199b720

Please sign in to comment.