Log Message
Make URLs with non-special schemes and a query or fragment but no slash after the host more compatible https://bugs.webkit.org/show_bug.cgi?id=167317 Source/WebCore:
<rdar://problem/29526875> Reviewed by Sam Weinig. This is currently being added to the URL spec in https://github.com/whatwg/url/issues/212 Covered by new API tests. * platform/URLParser.cpp: (WebCore::URLParser::parse): Only add a slash if there wasn't one if the URL has a special scheme. This new behavior matches the old behavior of URL::parse. Tools: Reviewed by Sam Weinig. * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (211057 => 211058)
--- trunk/Source/WebCore/ChangeLog 2017-01-23 21:27:26 UTC (rev 211057)
+++ trunk/Source/WebCore/ChangeLog 2017-01-23 21:30:32 UTC (rev 211058)
@@ -1,3 +1,19 @@
+2017-01-23 Alex Christensen <[email protected]>
+
+ Make URLs with non-special schemes and a query or fragment but no slash after the host more compatible
+ https://bugs.webkit.org/show_bug.cgi?id=167317
+ <rdar://problem/29526875>
+
+ Reviewed by Sam Weinig.
+
+ This is currently being added to the URL spec in https://github.com/whatwg/url/issues/212
+ Covered by new API tests.
+
+ * platform/URLParser.cpp:
+ (WebCore::URLParser::parse):
+ Only add a slash if there wasn't one if the URL has a special scheme.
+ This new behavior matches the old behavior of URL::parse.
+
2017-01-23 Joseph Pecoraro <[email protected]>
Convert langAttributeAwareFormControlUIEnabled to a Setting
Modified: trunk/Source/WebCore/platform/URLParser.cpp (211057 => 211058)
--- trunk/Source/WebCore/platform/URLParser.cpp 2017-01-23 21:27:26 UTC (rev 211057)
+++ trunk/Source/WebCore/platform/URLParser.cpp 2017-01-23 21:30:32 UTC (rev 211058)
@@ -1462,8 +1462,10 @@
return;
}
if (UNLIKELY(!isSlash)) {
- syntaxViolation(c);
- appendToASCIIBuffer('/');
+ if (m_urlIsSpecial) {
+ syntaxViolation(c);
+ appendToASCIIBuffer('/');
+ }
m_url.m_pathAfterLastSlash = currentPosition(c);
}
}
Modified: trunk/Tools/ChangeLog (211057 => 211058)
--- trunk/Tools/ChangeLog 2017-01-23 21:27:26 UTC (rev 211057)
+++ trunk/Tools/ChangeLog 2017-01-23 21:30:32 UTC (rev 211058)
@@ -1,3 +1,13 @@
+2017-01-23 Alex Christensen <[email protected]>
+
+ Make URLs with non-special schemes and a query or fragment but no slash after the host more compatible
+ https://bugs.webkit.org/show_bug.cgi?id=167317
+
+ Reviewed by Sam Weinig.
+
+ * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+ (TestWebKitAPI::TEST_F):
+
2017-01-23 Jonathan Bedard <[email protected]>
svn-create-patch should emit properties when files are moved or copied
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (211057 => 211058)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2017-01-23 21:27:26 UTC (rev 211057)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2017-01-23 21:30:32 UTC (rev 211058)
@@ -630,6 +630,10 @@
checkRelativeURL("", "applewebdata://Host", {"applewebdata", "", "", "Host", 0, "", "", "", "applewebdata://Host"});
checkRelativeURL("?query", "applewebdata://Host", {"applewebdata", "", "", "Host", 0, "", "query", "", "applewebdata://Host?query"});
checkRelativeURL("#fragment", "applewebdata://Host", {"applewebdata", "", "", "Host", 0, "", "", "fragment", "applewebdata://Host#fragment"});
+ checkRelativeURL("notspecial://something?", "file:////var//containers//stuff/", {"notspecial", "", "", "something", 0, "", "", "", "notspecial://something?"}, TestTabs::No);
+ checkRelativeURL("notspecial://something#", "file:////var//containers//stuff/", {"notspecial", "", "", "something", 0, "", "", "", "notspecial://something#"}, TestTabs::No);
+ checkRelativeURL("http://something?", "file:////var//containers//stuff/", {"http", "", "", "something", 0, "/", "", "", "http://something/?"}, TestTabs::No);
+ checkRelativeURL("http://something#", "file:////var//containers//stuff/", {"http", "", "", "something", 0, "/", "", "", "http://something/#"}, 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
