Title: [156037] trunk
Revision
156037
Author
o...@webkit.org
Date
2013-09-18 06:48:19 -0700 (Wed, 18 Sep 2013)

Log Message

ASSERT_NOT_REACHED is touched in WebCore::CSSPrimitiveValue::computeLengthDouble
https://bugs.webkit.org/show_bug.cgi?id=120469

Source/WebCore:

Tests: fast/css/outline-offset-parsing-assert.html
       fast/css/outline-offset-parsing.html

Reviewed by Dirk Schulze.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Fixed a typo after r66615, outline-offset can't be percentage.

LayoutTests:

Reviewed by Dirk Schulze.

* fast/css/outline-offset-parsing-assert-expected.txt: Added.
* fast/css/outline-offset-parsing-assert.html: Added.
* fast/css/outline-offset-parsing-expected.txt: Added.
* fast/css/outline-offset-parsing.html: Added.
* fast/css/script-tests/outline-offset-parsing.js: Added.
(test):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (156036 => 156037)


--- trunk/LayoutTests/ChangeLog	2013-09-18 12:39:23 UTC (rev 156036)
+++ trunk/LayoutTests/ChangeLog	2013-09-18 13:48:19 UTC (rev 156037)
@@ -1,3 +1,17 @@
+2013-09-18  Csaba Osztrogonác  <o...@webkit.org>
+
+        ASSERT_NOT_REACHED is touched in WebCore::CSSPrimitiveValue::computeLengthDouble
+        https://bugs.webkit.org/show_bug.cgi?id=120469
+
+        Reviewed by Dirk Schulze.
+
+        * fast/css/outline-offset-parsing-assert-expected.txt: Added.
+        * fast/css/outline-offset-parsing-assert.html: Added.
+        * fast/css/outline-offset-parsing-expected.txt: Added.
+        * fast/css/outline-offset-parsing.html: Added.
+        * fast/css/script-tests/outline-offset-parsing.js: Added.
+        (test):
+
 2013-09-18  Gurpreet Kaur  <k.gurpr...@samsung.com>
 
         [MathML] Implement the subscriptshift and superscriptshift attributes

Added: trunk/LayoutTests/fast/css/outline-offset-parsing-assert-expected.txt (0 => 156037)


--- trunk/LayoutTests/fast/css/outline-offset-parsing-assert-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/outline-offset-parsing-assert-expected.txt	2013-09-18 13:48:19 UTC (rev 156037)
@@ -0,0 +1 @@
+Test passes if it does not assert in debug mode.

Added: trunk/LayoutTests/fast/css/outline-offset-parsing-assert.html (0 => 156037)


--- trunk/LayoutTests/fast/css/outline-offset-parsing-assert.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/outline-offset-parsing-assert.html	2013-09-18 13:48:19 UTC (rev 156037)
@@ -0,0 +1,8 @@
+<html>
+Test passes if it does not assert in debug mode.
+<a style="outline-offset: 1%"></a>
+<script>
+   if (window.testRunner)
+       testRunner.dumpAsText();
+</script>
+</html>

Added: trunk/LayoutTests/fast/css/outline-offset-parsing-expected.txt (0 => 156037)


--- trunk/LayoutTests/fast/css/outline-offset-parsing-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/outline-offset-parsing-expected.txt	2013-09-18 13:48:19 UTC (rev 156037)
@@ -0,0 +1,12 @@
+This tests checks parsing of the 'outline-offset' property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("outline-offset: 1px", "outline-offset") is "1px"
+PASS test("outline-offset: 1mm", "outline-offset") is "1mm"
+PASS test("outline-offset: 1%", "outline-offset") is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/css/outline-offset-parsing.html (0 => 156037)


--- trunk/LayoutTests/fast/css/outline-offset-parsing.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/outline-offset-parsing.html	2013-09-18 13:48:19 UTC (rev 156037)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/css/script-tests/outline-offset-parsing.js (0 => 156037)


--- trunk/LayoutTests/fast/css/script-tests/outline-offset-parsing.js	                        (rev 0)
+++ trunk/LayoutTests/fast/css/script-tests/outline-offset-parsing.js	2013-09-18 13:48:19 UTC (rev 156037)
@@ -0,0 +1,16 @@
+description("This tests checks parsing of the 'outline-offset' property.");
+
+function test(declaration, property)
+{
+    var div = document.createElement("div");
+    div.setAttribute("style", declaration);
+    document.body.appendChild(div);
+
+    var result = div.style.getPropertyValue(property);
+    document.body.removeChild(div);
+    return result;
+}
+
+shouldBe('test("outline-offset: 1px", "outline-offset")', '"1px"');
+shouldBe('test("outline-offset: 1mm", "outline-offset")', '"1mm"');
+shouldBe('test("outline-offset: 1%", "outline-offset")', 'null');

Modified: trunk/Source/WebCore/ChangeLog (156036 => 156037)


--- trunk/Source/WebCore/ChangeLog	2013-09-18 12:39:23 UTC (rev 156036)
+++ trunk/Source/WebCore/ChangeLog	2013-09-18 13:48:19 UTC (rev 156037)
@@ -1,3 +1,16 @@
+2013-09-18  Csaba Osztrogonác  <o...@webkit.org>
+
+        ASSERT_NOT_REACHED is touched in WebCore::CSSPrimitiveValue::computeLengthDouble
+        https://bugs.webkit.org/show_bug.cgi?id=120469
+
+        Tests: fast/css/outline-offset-parsing-assert.html
+               fast/css/outline-offset-parsing.html
+
+        Reviewed by Dirk Schulze.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue): Fixed a typo after r66615, outline-offset can't be percentage.
+
 2013-09-18  Gurpreet Kaur  <k.gurpr...@samsung.com>
 
         [MathML] Implement the subscriptshift and superscriptshift attributes

Modified: trunk/Source/WebCore/css/CSSParser.cpp (156036 => 156037)


--- trunk/Source/WebCore/css/CSSParser.cpp	2013-09-18 12:39:23 UTC (rev 156036)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2013-09-18 13:48:19 UTC (rev 156037)
@@ -2477,7 +2477,7 @@
     case CSSPropertyWebkitBorderRadius:
         return parseBorderRadius(propId, important);
     case CSSPropertyOutlineOffset:
-        validPrimitive = validUnit(value, FLength | FPercent);
+        validPrimitive = validUnit(value, FLength);
         break;
     case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
     case CSSPropertyBoxShadow:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to