Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r175197 - Clamp wordSpacing percentage value.
https://bugs.webkit.org/show_bug.cgi?id=129350. Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2014-10-24 Reviewed by Zalan Bujtas. Source/WebCore: When the CSS wordSpacing property is percentage, its value has to be within the pre-defined min/max values for the CSS length type. This is done the same way the wordSpacing of type <length> is handled. Tests: css3/infinite-word-spacing.html. Move the definitions of minValueForCssLength and maxValueForCssLength from the .cpp file to the .h file. * css/CSSPrimitiveValue.cpp: * css/CSSPrimitiveValue.h: Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when its type is percentage. * css/DeprecatedStyleBuilder.cpp: (WebCore::ApplyPropertyWordSpacing::applyValue): LayoutTests: Make sure that setting the CSS style wordSpacing property to very huge percentage value and blending this value with other values for animating key frames does not assert or crash. The expectation is to have this huge value to be clamped to the pre-defined min/max values for the CSS length type. So when blending the clamped value with other wordSpacing values, the result can't be NaN. This should be very similar to the case when it is set to a huge <length> value. * css3/infinite-word-spacing-expected.txt: Added. * css3/infinite-word-spacing.html: Added. Canonical link: https://commits.webkit.org/154760.172@webkitgtk/2.6 git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@175925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
c8ff663
commit 3b1e460
Showing
7 changed files
with
84 additions
and
7 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
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 @@ | ||
PASS if no assert or crash in debug. |
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,36 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
h1 { | ||
-webkit-animation-name: spacing; | ||
-webkit-animation-duration: 1s; | ||
} | ||
@-webkit-keyframes spacing { | ||
0% { | ||
word-spacing: normal | ||
} | ||
20% { | ||
word-spacing: 11111111111111111111111111111111111111111111111111% | ||
} | ||
40% { | ||
word-spacing: 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111% | ||
} | ||
60% { | ||
word-spacing: 200% | ||
} | ||
80% { | ||
word-spacing: 300% | ||
} | ||
100% { } | ||
} | ||
</style> | ||
</head> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
</script> | ||
<body> | ||
<h1>PASS if no assert or crash in debug.</h1> | ||
</body> | ||
</html> |
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