Title: [184456] releases/WebKitGTK/webkit-2.4
- Revision
- 184456
- Author
- [email protected]
- Date
- 2015-05-18 03:35:23 -0700 (Mon, 18 May 2015)
Log Message
Merge r175363 - ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'.
https://bugs.webkit.org/show_bug.cgi?id=138054.
Patch by Said Abou-Hallawa <[email protected]> on 2014-10-29
Reviewed by Zalan Bujtas.
Source/WebCore:
A Length of type 'Calculated' can be generated from blending two lengths of
different types. Setting the wordSpacing of the render style should be handled
correctly when the type of the new value is 'Calculated'.
Tests: css3/calculated-word-spacing.html.
Add a case for setting the render style wordSpacing to a <length> of type 'Calculated'.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setWordSpacing):
LayoutTests:
Ensure the render style's wordSpacing can be set correctly when the type of
the new value is 'Calculated'. The 'Calculated' Length value can result from
blending two Length values of different types. And these two Length values
are defined in two consecutive css animation key frames.
* css3/calculated-word-spacing-expected.txt: Added.
* css3/calculated-word-spacing.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog (184455 => 184456)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog 2015-05-18 10:32:14 UTC (rev 184455)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/ChangeLog 2015-05-18 10:35:23 UTC (rev 184456)
@@ -1,3 +1,18 @@
+2014-10-29 Said Abou-Hallawa <[email protected]>
+
+ ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'.
+ https://bugs.webkit.org/show_bug.cgi?id=138054.
+
+ Reviewed by Zalan Bujtas.
+
+ Ensure the render style's wordSpacing can be set correctly when the type of
+ the new value is 'Calculated'. The 'Calculated' Length value can result from
+ blending two Length values of different types. And these two Length values
+ are defined in two consecutive css animation key frames.
+
+ * css3/calculated-word-spacing-expected.txt: Added.
+ * css3/calculated-word-spacing.html: Added.
+
2014-10-24 Said Abou-Hallawa <[email protected]>
Clamp wordSpacing percentage value.
Added: releases/WebKitGTK/webkit-2.4/LayoutTests/css3/calculated-word-spacing-expected.txt (0 => 184456)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/css3/calculated-word-spacing-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/css3/calculated-word-spacing-expected.txt 2015-05-18 10:35:23 UTC (rev 184456)
@@ -0,0 +1 @@
+PASS if no assert or crash in debug.
Added: releases/WebKitGTK/webkit-2.4/LayoutTests/css3/calculated-word-spacing.html (0 => 184456)
--- releases/WebKitGTK/webkit-2.4/LayoutTests/css3/calculated-word-spacing.html (rev 0)
+++ releases/WebKitGTK/webkit-2.4/LayoutTests/css3/calculated-word-spacing.html 2015-05-18 10:35:23 UTC (rev 184456)
@@ -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: 100px
+ }
+ 40% {
+ word-spacing: 200%
+ }
+ 60% {
+ word-spacing: 20em
+ }
+ 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>
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog (184455 => 184456)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog 2015-05-18 10:32:14 UTC (rev 184455)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog 2015-05-18 10:35:23 UTC (rev 184456)
@@ -1,3 +1,20 @@
+2014-10-29 Said Abou-Hallawa <[email protected]>
+
+ ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'.
+ https://bugs.webkit.org/show_bug.cgi?id=138054.
+
+ Reviewed by Zalan Bujtas.
+
+ A Length of type 'Calculated' can be generated from blending two lengths of
+ different types. Setting the wordSpacing of the render style should be handled
+ correctly when the type of the new value is 'Calculated'.
+
+ Tests: css3/calculated-word-spacing.html.
+
+ Add a case for setting the render style wordSpacing to a <length> of type 'Calculated'.
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::setWordSpacing):
+
2014-10-24 Said Abou-Hallawa <[email protected]>
Clamp wordSpacing percentage value.
Modified: releases/WebKitGTK/webkit-2.4/Source/WebCore/rendering/style/RenderStyle.cpp (184455 => 184456)
--- releases/WebKitGTK/webkit-2.4/Source/WebCore/rendering/style/RenderStyle.cpp 2015-05-18 10:32:14 UTC (rev 184455)
+++ releases/WebKitGTK/webkit-2.4/Source/WebCore/rendering/style/RenderStyle.cpp 2015-05-18 10:35:23 UTC (rev 184456)
@@ -1475,6 +1475,9 @@
case Fixed:
fontWordSpacing = v.getFloatValue();
break;
+ case Calculated:
+ fontWordSpacing = v.nonNanCalculatedValue(maxValueForCssLength);
+ break;
default:
ASSERT_NOT_REACHED();
fontWordSpacing = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes