Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
convertingToLengthRequiresNonNullStyle needs to consider calc values
https://bugs.webkit.org/show_bug.cgi?id=241452 Reviewed by Antti Koivisto. * LayoutTests/fast/css/matrix-translate-calc-units.html: Added. * Source/WebCore/css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const): (WebCore::CSSPrimitiveValue::convertToLength const): * Source/WebCore/css/TransformFunctions.cpp: * Source/WebCore/css/calc/CSSCalcExpressionNode.h: * Source/WebCore/css/calc/CSSCalcInvertNode.h: * Source/WebCore/css/calc/CSSCalcNegateNode.h: * Source/WebCore/css/calc/CSSCalcOperationNode.cpp: (WebCore::CSSCalcOperationNode::convertingToLengthRequiresNonNullStyle const): * Source/WebCore/css/calc/CSSCalcOperationNode.h: * Source/WebCore/css/calc/CSSCalcPrimitiveValueNode.cpp: (WebCore::CSSCalcPrimitiveValueNode::convertingToLengthRequiresNonNullStyle const): * Source/WebCore/css/calc/CSSCalcPrimitiveValueNode.h: * Source/WebCore/css/calc/CSSCalcValue.cpp: (WebCore::CSSCalcValue::convertingToLengthRequiresNonNullStyle const): * Source/WebCore/css/calc/CSSCalcValue.h: Canonical link: https://commits.webkit.org/251431@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
dd346ad
commit b5884ef80c5fde05d167160b20d738958a30b01b
Showing
13 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Verify invalid DOMMatrix strings throw, and more importantly don't crash | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS new DOMMatrix('translate(min(0em))') threw exception SyntaxError: The string did not match the expected pattern.. | ||
PASS new DOMMatrix('translateX(max(0ex))') threw exception SyntaxError: The string did not match the expected pattern.. | ||
PASS new DOMMatrix('translateY(calc(0ch))') threw exception SyntaxError: The string did not match the expected pattern.. | ||
PASS new DOMMatrix('translateZ(calc(11ic))') threw exception SyntaxError: The string did not match the expected pattern.. | ||
PASS new DOMMatrix('translateZ(calc(123lh))') threw exception SyntaxError: The string did not match the expected pattern.. | ||
PASS new DOMMatrix('translate(max(123px))') did not throw exception. | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script src="../../resources/js-test-pre.js"></script> | ||
<script> | ||
description("Verify invalid DOMMatrix strings throw, and more importantly don't crash"); | ||
shouldThrow("new DOMMatrix('translate(min(0em))')"); | ||
shouldThrow("new DOMMatrix('translateX(max(0ex))')"); | ||
shouldThrow("new DOMMatrix('translateY(calc(0ch))')"); | ||
shouldThrow("new DOMMatrix('translateZ(calc(11ic))')"); | ||
shouldThrow("new DOMMatrix('translateZ(calc(123lh))')"); | ||
shouldNotThrow("new DOMMatrix('translate(max(123px))')"); | ||
</script> | ||
<script src="../../resources/js-test-post.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters