Title: [175926] releases/WebKitGTK/webkit-2.6
- Revision
- 175926
- Author
- [email protected]
- Date
- 2014-11-11 07:52:08 -0800 (Tue, 11 Nov 2014)
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.6/LayoutTests/ChangeLog (175925 => 175926)
--- releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog 2014-11-11 15:50:48 UTC (rev 175925)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/ChangeLog 2014-11-11 15:52:08 UTC (rev 175926)
@@ -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.6/LayoutTests/css3/calculated-word-spacing-expected.txt (0 => 175926)
--- releases/WebKitGTK/webkit-2.6/LayoutTests/css3/calculated-word-spacing-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/css3/calculated-word-spacing-expected.txt 2014-11-11 15:52:08 UTC (rev 175926)
@@ -0,0 +1 @@
+PASS if no assert or crash in debug.
Added: releases/WebKitGTK/webkit-2.6/LayoutTests/css3/calculated-word-spacing.html (0 => 175926)
--- releases/WebKitGTK/webkit-2.6/LayoutTests/css3/calculated-word-spacing.html (rev 0)
+++ releases/WebKitGTK/webkit-2.6/LayoutTests/css3/calculated-word-spacing.html 2014-11-11 15:52:08 UTC (rev 175926)
@@ -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.6/Source/WebCore/ChangeLog (175925 => 175926)
--- releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog 2014-11-11 15:50:48 UTC (rev 175925)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog 2014-11-11 15:52:08 UTC (rev 175926)
@@ -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.6/Source/WebCore/rendering/style/RenderStyle.cpp (175925 => 175926)
--- releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/style/RenderStyle.cpp 2014-11-11 15:50:48 UTC (rev 175925)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/style/RenderStyle.cpp 2014-11-11 15:52:08 UTC (rev 175926)
@@ -1379,6 +1379,9 @@
case Fixed:
fontWordSpacing = value.value();
break;
+ case Calculated:
+ fontWordSpacing = value.nonNanCalculatedValue(maxValueForCssLength);
+ break;
default:
ASSERT_NOT_REACHED();
fontWordSpacing = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes