Title: [206736] trunk
- Revision
- 206736
- Author
- [email protected]
- Date
- 2016-10-03 10:44:29 -0700 (Mon, 03 Oct 2016)
Log Message
ASSERTION FAILED: result in WebCore::CSSParser::parseURI
https://bugs.webkit.org/show_bug.cgi?id=141638
<rdar://problem/27709952>
Reviewed by Andreas Kling.
Source/WebCore:
CSSParser::parseURIInternal() failed to parse unquoted URLs with Unicode escape sequences
greater than 0xFF, even when the destination character type was multi-byte. Fixed by
checking the size of DestCharacterType instead of SrcCharacterType.
Updated fast/css/url-with-multi-byte-unicode-escape.html to test for an unquoted URL.
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseURIInternal): For code points greater than 0xFF, only returned
false if sizeof(DestCharacterType) == 1.
LayoutTests:
* fast/css/url-with-multi-byte-unicode-escape-expected.txt: Added a test for an unquoted URL.
* fast/css/url-with-multi-byte-unicode-escape.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (206735 => 206736)
--- trunk/LayoutTests/ChangeLog 2016-10-03 17:28:04 UTC (rev 206735)
+++ trunk/LayoutTests/ChangeLog 2016-10-03 17:44:29 UTC (rev 206736)
@@ -1,3 +1,14 @@
+2016-10-03 Andy Estes <[email protected]>
+
+ ASSERTION FAILED: result in WebCore::CSSParser::parseURI
+ https://bugs.webkit.org/show_bug.cgi?id=141638
+ <rdar://problem/27709952>
+
+ Reviewed by Andreas Kling.
+
+ * fast/css/url-with-multi-byte-unicode-escape-expected.txt: Added a test for an unquoted URL.
+ * fast/css/url-with-multi-byte-unicode-escape.html:
+
2016-10-03 Chris Dumez <[email protected]>
td.scope should only return known values
Modified: trunk/LayoutTests/fast/css/url-with-multi-byte-unicode-escape-expected.txt (206735 => 206736)
--- trunk/LayoutTests/fast/css/url-with-multi-byte-unicode-escape-expected.txt 2016-10-03 17:28:04 UTC (rev 206735)
+++ trunk/LayoutTests/fast/css/url-with-multi-byte-unicode-escape-expected.txt 2016-10-03 17:44:29 UTC (rev 206736)
@@ -5,6 +5,7 @@
PASS document.styleSheets[0].cssRules.length is 2
PASS document.styleSheets[0].cssRules[0].style.getPropertyValue("background-image") is "url(data:%C4%80)"
+PASS document.styleSheets[0].cssRules[0].style.getPropertyValue("border-image-source") is "url(data:%C4%80)"
PASS document.styleSheets[0].cssRules[1].style.getPropertyValue("background-color") is "green"
PASS window.getComputedStyle(document.getElementById("test")).getPropertyValue("background-color") is "rgb(0, 128, 0)"
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/css/url-with-multi-byte-unicode-escape.html (206735 => 206736)
--- trunk/LayoutTests/fast/css/url-with-multi-byte-unicode-escape.html 2016-10-03 17:28:04 UTC (rev 206735)
+++ trunk/LayoutTests/fast/css/url-with-multi-byte-unicode-escape.html 2016-10-03 17:44:29 UTC (rev 206736)
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
-<style>#test { background-image: url("data:\100")} #test { background-color: green !important }</style>
+<style>#test { background-image: url("data:\100"); border-image: url(data:\100); } #test { background-color: green !important; }</style>
<script src=""
<script>
if (window.testRunner)
@@ -14,6 +14,7 @@
description('Test parsing a CSS URI containing a multi-byte Unicode escape sequence.');
shouldBe('document.styleSheets[0].cssRules.length', '2');
shouldBeEqualToString('document.styleSheets[0].cssRules[0].style.getPropertyValue("background-image")', 'url(data:%C4%80)');
+ shouldBeEqualToString('document.styleSheets[0].cssRules[0].style.getPropertyValue("border-image-source")', 'url(data:%C4%80)');
shouldBeEqualToString('document.styleSheets[0].cssRules[1].style.getPropertyValue("background-color")', 'green');
shouldBeEqualToString('window.getComputedStyle(document.getElementById("test")).getPropertyValue("background-color")', 'rgb(0, 128, 0)');
</script>
Modified: trunk/Source/WebCore/ChangeLog (206735 => 206736)
--- trunk/Source/WebCore/ChangeLog 2016-10-03 17:28:04 UTC (rev 206735)
+++ trunk/Source/WebCore/ChangeLog 2016-10-03 17:44:29 UTC (rev 206736)
@@ -1,3 +1,21 @@
+2016-10-03 Andy Estes <[email protected]>
+
+ ASSERTION FAILED: result in WebCore::CSSParser::parseURI
+ https://bugs.webkit.org/show_bug.cgi?id=141638
+ <rdar://problem/27709952>
+
+ Reviewed by Andreas Kling.
+
+ CSSParser::parseURIInternal() failed to parse unquoted URLs with Unicode escape sequences
+ greater than 0xFF, even when the destination character type was multi-byte. Fixed by
+ checking the size of DestCharacterType instead of SrcCharacterType.
+
+ Updated fast/css/url-with-multi-byte-unicode-escape.html to test for an unquoted URL.
+
+ * css/parser/CSSParser.cpp:
+ (WebCore::CSSParser::parseURIInternal): For code points greater than 0xFF, only returned
+ false if sizeof(DestCharacterType) == 1.
+
2016-10-03 Alex Christensen <[email protected]>
URLParser: empty relative URLs should not copy fragment from the base URL
Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (206735 => 206736)
--- trunk/Source/WebCore/css/parser/CSSParser.cpp 2016-10-03 17:28:04 UTC (rev 206735)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp 2016-10-03 17:44:29 UTC (rev 206736)
@@ -11736,7 +11736,7 @@
*dest++ = *src++;
else {
unsigned unicode = parseEscape<SrcCharacterType>(src);
- if (unicode > 0xff && sizeof(SrcCharacterType) == 1)
+ if (unicode > 0xff && sizeof(DestCharacterType) == 1)
return false;
UnicodeToChars(dest, unicode);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes