Log Message
URLParser: Parsing empty URLs with a base URL should return the base URL https://bugs.webkit.org/show_bug.cgi?id=161777
Reviewed by Tim Horton. Source/WebCore: Covered by an API test and progress towards passing all web platform tests when using URLParser. * platform/URLParser.cpp: (WebCore::URLParser::parse): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (205678 => 205679)
--- trunk/Source/WebCore/ChangeLog 2016-09-09 00:43:50 UTC (rev 205678)
+++ trunk/Source/WebCore/ChangeLog 2016-09-09 00:46:17 UTC (rev 205679)
@@ -1,5 +1,17 @@
2016-09-08 Alex Christensen <achristen...@webkit.org>
+ URLParser: Parsing empty URLs with a base URL should return the base URL
+ https://bugs.webkit.org/show_bug.cgi?id=161777
+
+ Reviewed by Tim Horton.
+
+ Covered by an API test and progress towards passing all web platform tests when using URLParser.
+
+ * platform/URLParser.cpp:
+ (WebCore::URLParser::parse):
+
+2016-09-08 Alex Christensen <achristen...@webkit.org>
+
URLParser failures should preserve the original input string
https://bugs.webkit.org/show_bug.cgi?id=161769
Modified: trunk/Source/WebCore/platform/URLParser.cpp (205678 => 205679)
--- trunk/Source/WebCore/platform/URLParser.cpp 2016-09-09 00:43:50 UTC (rev 205678)
+++ trunk/Source/WebCore/platform/URLParser.cpp 2016-09-09 00:46:17 UTC (rev 205679)
@@ -852,6 +852,8 @@
switch (state) {
case State::SchemeStart:
LOG_FINAL_STATE("SchemeStart");
+ if (!m_buffer.length() && !base.isNull())
+ return base;
return failure(input);
case State::Scheme:
LOG_FINAL_STATE("Scheme");
Modified: trunk/Tools/ChangeLog (205678 => 205679)
--- trunk/Tools/ChangeLog 2016-09-09 00:43:50 UTC (rev 205678)
+++ trunk/Tools/ChangeLog 2016-09-09 00:46:17 UTC (rev 205679)
@@ -1,5 +1,15 @@
2016-09-08 Alex Christensen <achristen...@webkit.org>
+ URLParser: Parsing empty URLs with a base URL should return the base URL
+ https://bugs.webkit.org/show_bug.cgi?id=161777
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+ (TestWebKitAPI::TEST_F):
+
+2016-09-08 Alex Christensen <achristen...@webkit.org>
+
URLParser failures should preserve the original input string
https://bugs.webkit.org/show_bug.cgi?id=161769
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (205678 => 205679)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-09-09 00:43:50 UTC (rev 205678)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-09-09 00:46:17 UTC (rev 205679)
@@ -254,6 +254,8 @@
checkRelativeURL("http://foo.com/\\@", "http://example.org/foo/bar", {"http", "", "", "foo.com", 0, "//@", "", "", "http://foo.com//@"});
checkRelativeURL("\\@", "http://example.org/foo/bar", {"http", "", "", "example.org", 0, "/@", "", "", "http://example.org/@"});
checkRelativeURL("/path3", "http://u...@example.org/path1/path2", {"http", "user", "", "example.org", 0, "/path3", "", "", "http://u...@example.org/path3"});
+ checkRelativeURL("", "http://example.org/foo/bar", {"http", "", "", "example.org", 0, "/foo/bar", "", "", "http://example.org/foo/bar"});
+ checkRelativeURL(" \a \t\n", "http://example.org/foo/bar", {"http", "", "", "example.org", 0, "/foo/bar", "", "", "http://example.org/foo/bar"});
}
static void checkURLDifferences(const String& urlString, const ExpectedParts& partsNew, const ExpectedParts& partsOld)
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes