Log Message
Merge r213546 - [URLParser] Fix file URLs that are just file:// and a Windows drive letter https://bugs.webkit.org/show_bug.cgi?id=169242
Patch by Alex Christensen <[email protected]> on 2017-03-07 Reviewed by Tim Horton. LayoutTests/imported/w3c: * web-platform-tests/url/a-element-expected.txt: * web-platform-tests/url/a-element-xhtml-expected.txt: * web-platform-tests/url/url-constructor-expected.txt: Source/WebCore: This is specified in https://url.spec.whatwg.org/#file-host-state and tested by a newly-passing web platform test. I added the check for the windows drive quirk in the FileHost state of the parser but I forgot it when FileHost is the terminal state. * platform/URLParser.cpp: (WebCore::URLParser::parse): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F):
Modified Paths
- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/ChangeLog
- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt
- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt
- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt
- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog
- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/URLParser.cpp
- releases/WebKitGTK/webkit-2.16/Tools/ChangeLog
- releases/WebKitGTK/webkit-2.16/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp
Diff
Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/ChangeLog (213828 => 213829)
--- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/ChangeLog 2017-03-13 11:39:12 UTC (rev 213828)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/ChangeLog 2017-03-13 11:40:37 UTC (rev 213829)
@@ -1,3 +1,14 @@
+2017-03-07 Alex Christensen <[email protected]>
+
+ [URLParser] Fix file URLs that are just file:// and a Windows drive letter
+ https://bugs.webkit.org/show_bug.cgi?id=169242
+
+ Reviewed by Tim Horton.
+
+ * web-platform-tests/url/a-element-expected.txt:
+ * web-platform-tests/url/a-element-xhtml-expected.txt:
+ * web-platform-tests/url/url-constructor-expected.txt:
+
2017-03-07 Chris Dumez <[email protected]>
Align initEvent / initCustomEvent / initMessageEvent with the latest specification
Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt (213828 => 213829)
--- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt 2017-03-13 11:39:12 UTC (rev 213828)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt 2017-03-13 11:40:37 UTC (rev 213829)
@@ -386,7 +386,7 @@
PASS Parsing: <..> against <file:///C:/>
PASS Parsing: <..> against <file:///>
PASS Parsing: </> against <file:///C:/a/b>
-FAIL Parsing: <//d:> against <file:///C:/a/b> assert_equals: href expected "file:///d:" but got "file://d/"
+PASS Parsing: <//d:> against <file:///C:/a/b>
PASS Parsing: <//d:/..> against <file:///C:/a/b>
PASS Parsing: <..> against <file:///ab:/>
PASS Parsing: <..> against <file:///1:/>
Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt (213828 => 213829)
--- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt 2017-03-13 11:39:12 UTC (rev 213828)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt 2017-03-13 11:40:37 UTC (rev 213829)
@@ -386,7 +386,7 @@
PASS Parsing: <..> against <file:///C:/>
PASS Parsing: <..> against <file:///>
PASS Parsing: </> against <file:///C:/a/b>
-FAIL Parsing: <//d:> against <file:///C:/a/b> assert_equals: href expected "file:///d:" but got "file://d/"
+PASS Parsing: <//d:> against <file:///C:/a/b>
PASS Parsing: <//d:/..> against <file:///C:/a/b>
PASS Parsing: <..> against <file:///ab:/>
PASS Parsing: <..> against <file:///1:/>
Modified: releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt (213828 => 213829)
--- releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt 2017-03-13 11:39:12 UTC (rev 213828)
+++ releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt 2017-03-13 11:40:37 UTC (rev 213829)
@@ -394,7 +394,7 @@
PASS Parsing: <..> against <file:///C:/>
PASS Parsing: <..> against <file:///>
PASS Parsing: </> against <file:///C:/a/b>
-FAIL Parsing: <//d:> against <file:///C:/a/b> assert_equals: href expected "file:///d:" but got "file://d/"
+PASS Parsing: <//d:> against <file:///C:/a/b>
PASS Parsing: <//d:/..> against <file:///C:/a/b>
PASS Parsing: <..> against <file:///ab:/>
PASS Parsing: <..> against <file:///1:/>
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (213828 => 213829)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-03-13 11:39:12 UTC (rev 213828)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-03-13 11:40:37 UTC (rev 213829)
@@ -1,3 +1,17 @@
+2017-03-07 Alex Christensen <[email protected]>
+
+ [URLParser] Fix file URLs that are just file:// and a Windows drive letter
+ https://bugs.webkit.org/show_bug.cgi?id=169242
+
+ Reviewed by Tim Horton.
+
+ This is specified in https://url.spec.whatwg.org/#file-host-state and tested by a newly-passing
+ web platform test. I added the check for the windows drive quirk in the FileHost state of the
+ parser but I forgot it when FileHost is the terminal state.
+
+ * platform/URLParser.cpp:
+ (WebCore::URLParser::parse):
+
2017-03-07 Zalan Bujtas <[email protected]>
Simple line layout: Do not use invalid m_lastNonWhitespaceFragment while removing trailing whitespace.
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/URLParser.cpp (213828 => 213829)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/URLParser.cpp 2017-03-13 11:39:12 UTC (rev 213828)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/URLParser.cpp 2017-03-13 11:40:37 UTC (rev 213829)
@@ -1957,6 +1957,18 @@
break;
case State::FileHost:
LOG_FINAL_STATE("FileHost");
+ if (takesTwoAdvancesUntilEnd(CodePointIterator<CharacterType>(authorityOrHostBegin, c))
+ && isWindowsDriveLetter(authorityOrHostBegin)) {
+ syntaxViolation(authorityOrHostBegin);
+ appendToASCIIBuffer('/');
+ appendWindowsDriveLetter(authorityOrHostBegin);
+ m_url.m_pathAfterLastSlash = currentPosition(c);
+ m_url.m_pathEnd = m_url.m_pathAfterLastSlash;
+ m_url.m_queryEnd = m_url.m_pathAfterLastSlash;
+ m_url.m_fragmentEnd = m_url.m_pathAfterLastSlash;
+ break;
+ }
+
if (authorityOrHostBegin == c) {
syntaxViolation(c);
appendToASCIIBuffer('/');
Modified: releases/WebKitGTK/webkit-2.16/Tools/ChangeLog (213828 => 213829)
--- releases/WebKitGTK/webkit-2.16/Tools/ChangeLog 2017-03-13 11:39:12 UTC (rev 213828)
+++ releases/WebKitGTK/webkit-2.16/Tools/ChangeLog 2017-03-13 11:40:37 UTC (rev 213829)
@@ -1,3 +1,13 @@
+2017-03-07 Alex Christensen <[email protected]>
+
+ [URLParser] Fix file URLs that are just file:// and a Windows drive letter
+ https://bugs.webkit.org/show_bug.cgi?id=169242
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+ (TestWebKitAPI::TEST_F):
+
2017-03-06 Carlos Alberto Lopez Perez <[email protected]>
[GTK] Mark WTF_Lock.ContendedLongSection and WTF_WordLock.ContendedLongSection as slow.
Modified: releases/WebKitGTK/webkit-2.16/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (213828 => 213829)
--- releases/WebKitGTK/webkit-2.16/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2017-03-13 11:39:12 UTC (rev 213828)
+++ releases/WebKitGTK/webkit-2.16/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2017-03-13 11:40:37 UTC (rev 213829)
@@ -584,6 +584,9 @@
checkRelativeURL("/abc", "file:///C:/a/b", {"file", "", "", "", 0, "/C:/abc", "", "", "file:///C:/abc"});
checkRelativeURL("/abc", "file:///C:", {"file", "", "", "", 0, "/C:/abc", "", "", "file:///C:/abc"});
checkRelativeURL("/abc", "file:///", {"file", "", "", "", 0, "/abc", "", "", "file:///abc"});
+ checkRelativeURL("//d:", "file:///C:/a/b", {"file", "", "", "", 0, "/d:", "", "", "file:///d:"}, TestTabs::No);
+ checkRelativeURL("//d|", "file:///C:/a/b", {"file", "", "", "", 0, "/d:", "", "", "file:///d:"}, TestTabs::No);
+ checkRelativeURL("//A|", "file:///C:/a/b", {"file", "", "", "", 0, "/A:", "", "", "file:///A:"}, TestTabs::No);
// The checking of slashes in SpecialAuthoritySlashes needed to get this to pass contradicts what is in the spec,
// but it is included in the web platform tests.
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
