Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 199b720
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/css/ComputedStyleExtractor.cpp
Expand Up @@ -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: {
Expand Down

0 comments on commit 199b720

Please sign in to comment.