Title: [172033] trunk
- Revision
- 172033
- Author
- commit-qu...@webkit.org
- Date
- 2014-08-05 09:46:20 -0700 (Tue, 05 Aug 2014)
Log Message
Fixing calc() parameter parsing in cubic-bezier functions
https://bugs.webkit.org/show_bug.cgi?id=135605
Patch by Renata Hodovan <rhodovan.u-sze...@partner.samsung.com> on 2014-08-05
Reviewed by Andreas Kling.
Source/WebCore:
Before this patch, calc values in cubic-bezier functions weren't being read correctly
since they were handled as simple floats.
This is a backport of my fix in Blink: https://codereview.chromium.org/369313002/
Test: css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
LayoutTests:
* css3/calc/cubic-bezier-with-multiple-calcs-crash.html-expected.txt: Added.
* css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (172032 => 172033)
--- trunk/LayoutTests/ChangeLog 2014-08-05 16:42:09 UTC (rev 172032)
+++ trunk/LayoutTests/ChangeLog 2014-08-05 16:46:20 UTC (rev 172033)
@@ -1,3 +1,13 @@
+2014-08-05 Renata Hodovan <rhodovan.u-sze...@partner.samsung.com>
+
+ Fixing calc() parameter parsing in cubic-bezier functions
+ https://bugs.webkit.org/show_bug.cgi?id=135605
+
+ Reviewed by Andreas Kling.
+
+ * css3/calc/cubic-bezier-with-multiple-calcs-crash.html-expected.txt: Added.
+ * css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html: Added.
+
2014-08-05 Chris Fleizach <cfleiz...@apple.com>
AX: Select text activity should return replaced text instead of previously selected text
Added: trunk/LayoutTests/css3/calc/cubic-bezier-with-multiple-calcs-crash.html-expected.txt (0 => 172033)
--- trunk/LayoutTests/css3/calc/cubic-bezier-with-multiple-calcs-crash.html-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/calc/cubic-bezier-with-multiple-calcs-crash.html-expected.txt 2014-08-05 16:46:20 UTC (rev 172033)
@@ -0,0 +1,3 @@
+This tests that calc() values in cubic-bezier functions are read correctly.
+
+PASS
Added: trunk/LayoutTests/css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html (0 => 172033)
--- trunk/LayoutTests/css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html (rev 0)
+++ trunk/LayoutTests/css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html 2014-08-05 16:46:20 UTC (rev 172033)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<style>
+* {
+ transition-timing-function: cubic-bezier(0, 0, calc(0.5), calc(1.0));
+}
+</style>
+</head>
+<body>
+ <p>This tests that calc() values in cubic-bezier functions are read correctly.</p>
+ <p id="result"></p>
+</body>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var body = document.getElementsByTagName("body")[0];
+ if (window.getComputedStyle(body)["transitionTimingFunction"] == "cubic-bezier(0, 0, 0.5, 1)")
+ document.getElementById("result").innerText = "PASS";
+ else
+ document.getElementById("result").innerText = "FAIL";
+</script>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (172032 => 172033)
--- trunk/Source/WebCore/ChangeLog 2014-08-05 16:42:09 UTC (rev 172032)
+++ trunk/Source/WebCore/ChangeLog 2014-08-05 16:46:20 UTC (rev 172033)
@@ -1,3 +1,20 @@
+2014-08-05 Renata Hodovan <rhodovan.u-sze...@partner.samsung.com>
+
+ Fixing calc() parameter parsing in cubic-bezier functions
+ https://bugs.webkit.org/show_bug.cgi?id=135605
+
+ Reviewed by Andreas Kling.
+
+ Before this patch, calc values in cubic-bezier functions weren't being read correctly
+ since they were handled as simple floats.
+
+ This is a backport of my fix in Blink: https://codereview.chromium.org/369313002/
+
+ Test: css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
+
2014-08-05 Jer Noble <jer.no...@apple.com>
[MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
Modified: trunk/Source/WebCore/css/CSSParser.cpp (172032 => 172033)
--- trunk/Source/WebCore/css/CSSParser.cpp 2014-08-05 16:42:09 UTC (rev 172032)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2014-08-05 16:46:20 UTC (rev 172033)
@@ -4545,7 +4545,7 @@
CSSParserValue* v = args->current();
if (!validUnit(v, FNumber))
return false;
- result = v->fValue;
+ result = parsedDouble(v, ReleaseParsedCalcValue);
v = args->next();
if (!v)
// The last number in the function has no comma after it, so we're done.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes