Title: [87084] branches/chromium/742
Revision
87084
Author
[email protected]
Date
2011-05-23 11:41:52 -0700 (Mon, 23 May 2011)

Log Message

Merge 87083
BUG=83598
Review URL: http://codereview.chromium.org/6966014

Modified Paths

Added Paths

Diff

Copied: branches/chromium/742/LayoutTests/fast/css/parse-color-int-or-percent-crash-expected.txt (from rev 87083, trunk/LayoutTests/fast/css/parse-color-int-or-percent-crash-expected.txt) (0 => 87084)


--- branches/chromium/742/LayoutTests/fast/css/parse-color-int-or-percent-crash-expected.txt	                        (rev 0)
+++ branches/chromium/742/LayoutTests/fast/css/parse-color-int-or-percent-crash-expected.txt	2011-05-23 18:41:52 UTC (rev 87084)
@@ -0,0 +1 @@
+PASS

Copied: branches/chromium/742/LayoutTests/fast/css/parse-color-int-or-percent-crash.html (from rev 87083, trunk/LayoutTests/fast/css/parse-color-int-or-percent-crash.html) (0 => 87084)


--- branches/chromium/742/LayoutTests/fast/css/parse-color-int-or-percent-crash.html	                        (rev 0)
+++ branches/chromium/742/LayoutTests/fast/css/parse-color-int-or-percent-crash.html	2011-05-23 18:41:52 UTC (rev 87084)
@@ -0,0 +1,21 @@
+<html>
+    <body>
+        <script>    
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            var stopElement = document.createElementNS("http://www.w3.org/2000/svg", "stop");
+            stopElement.style.stopColor = "blue";
+
+            var colorString = "rgb(00000000000000000000";
+            var e;
+            try {
+                stopElement.style.getPropertyCSSValue("stop-color").setRGBColor(colorString);
+            } catch (err) {
+                e = err;
+            }
+            
+            document.body.innerHTML = (e && e.SVG_INVALID_VALUE_ERR == 1) ? "PASS" : "FAIL";
+        </script>
+    </body>
+</html>

Modified: branches/chromium/742/Source/WebCore/css/CSSParser.cpp (87083 => 87084)


--- branches/chromium/742/Source/WebCore/css/CSSParser.cpp	2011-05-23 18:27:13 UTC (rev 87083)
+++ branches/chromium/742/Source/WebCore/css/CSSParser.cpp	2011-05-23 18:41:52 UTC (rev 87084)
@@ -4159,6 +4159,9 @@
         localValue = newValue;
     }
 
+    if (current == end)
+        return false;
+
     if (expect == CSSPrimitiveValue::CSS_NUMBER && (*current == '.' || *current == '%'))
         return false;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to