Title: [153948] trunk
- Revision
- 153948
- Author
- [email protected]
- Date
- 2013-08-12 10:23:42 -0700 (Mon, 12 Aug 2013)
Log Message
Shadows don't support viewport units
https://bugs.webkit.org/show_bug.cgi?id=119649
Reviewed by Darin Adler.
Source/WebCore:
We don't yet support viewport units in shadows, so
fail parsing if we see one. The bug to fix this
completely is: https://webkit.org/b/119650
Test: fast/css/shadow-viewport-units.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseShadow): Fail if we get one of
vh, vw, vmin, vmax.
LayoutTests:
Test that exercises a viewport unit in text-shadow to make sure we don't parse it.
* fast/css/shadow-viewport-units-expected.txt: Added.
* fast/css/shadow-viewport-units.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (153947 => 153948)
--- trunk/LayoutTests/ChangeLog 2013-08-12 17:16:19 UTC (rev 153947)
+++ trunk/LayoutTests/ChangeLog 2013-08-12 17:23:42 UTC (rev 153948)
@@ -1,3 +1,15 @@
+2013-08-12 Dean Jackson <[email protected]>
+
+ Shadows don't support viewport units
+ https://bugs.webkit.org/show_bug.cgi?id=119649
+
+ Reviewed by Darin Adler.
+
+ Test that exercises a viewport unit in text-shadow to make sure we don't parse it.
+
+ * fast/css/shadow-viewport-units-expected.txt: Added.
+ * fast/css/shadow-viewport-units.html: Added.
+
2013-08-12 Allan Sandfeld Jensen <[email protected]>
[Qt] Add Support for canvas blend modes
Added: trunk/LayoutTests/fast/css/shadow-viewport-units-expected.txt (0 => 153948)
--- trunk/LayoutTests/fast/css/shadow-viewport-units-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/shadow-viewport-units-expected.txt 2013-08-12 17:23:42 UTC (rev 153948)
@@ -0,0 +1 @@
+PASS: No shadow style
Added: trunk/LayoutTests/fast/css/shadow-viewport-units.html (0 => 153948)
--- trunk/LayoutTests/fast/css/shadow-viewport-units.html (rev 0)
+++ trunk/LayoutTests/fast/css/shadow-viewport-units.html 2013-08-12 17:23:42 UTC (rev 153948)
@@ -0,0 +1,18 @@
+<style>
+#a { text-shadow: 0px 0px 0vh black; } /* Should be invalid - we don't yet support viewport units in shadow */
+</style>
+<div id="a"></div>
+<script>
+window.addEventListener("load", function () {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ var a = document.getElementById("a");
+ var output = document.createElement("p");
+ document.body.appendChild(output);
+ if (window.getComputedStyle(a).textShadow == "none")
+ output.innerText = "PASS: No shadow style";
+ else
+ output.innerText = "FAIL: Shadow style: " + window.getComputedStyle(a).textShadow;
+}, false);
+</script>
Modified: trunk/Source/WebCore/ChangeLog (153947 => 153948)
--- trunk/Source/WebCore/ChangeLog 2013-08-12 17:16:19 UTC (rev 153947)
+++ trunk/Source/WebCore/ChangeLog 2013-08-12 17:23:42 UTC (rev 153948)
@@ -1,3 +1,20 @@
+2013-08-12 Dean Jackson <[email protected]>
+
+ Shadows don't support viewport units
+ https://bugs.webkit.org/show_bug.cgi?id=119649
+
+ Reviewed by Darin Adler.
+
+ We don't yet support viewport units in shadows, so
+ fail parsing if we see one. The bug to fix this
+ completely is: https://webkit.org/b/119650
+
+ Test: fast/css/shadow-viewport-units.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseShadow): Fail if we get one of
+ vh, vw, vmin, vmax.
+
2013-08-12 [email protected] <[email protected]>
[Curl] Cookie is not set when url string is unicode.
Modified: trunk/Source/WebCore/css/CSSParser.cpp (153947 => 153948)
--- trunk/Source/WebCore/css/CSSParser.cpp 2013-08-12 17:16:19 UTC (rev 153947)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2013-08-12 17:23:42 UTC (rev 153948)
@@ -6541,6 +6541,13 @@
if (!context.allowLength())
return 0;
+ // We don't support viewport units for shadow values.
+ if (val->unit == CSSPrimitiveValue::CSS_VW
+ || val->unit == CSSPrimitiveValue::CSS_VH
+ || val->unit == CSSPrimitiveValue::CSS_VMIN
+ || val->unit == CSSPrimitiveValue::CSS_VMAX)
+ return 0;
+
// Blur radius must be non-negative.
if (context.allowBlur && !validUnit(val, FLength | FNonNeg, CSSStrictMode))
return 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes