Log Message
URLParser: Fix relative URLs containing only fragments https://bugs.webkit.org/show_bug.cgi?id=161882
Reviewed by Brady Eidson. Source/WebCore: Covered by new API tests. * platform/URLParser.cpp: (WebCore::URLParser::parse): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (205834 => 205835)
--- trunk/Source/WebCore/ChangeLog 2016-09-12 22:36:57 UTC (rev 205834)
+++ trunk/Source/WebCore/ChangeLog 2016-09-12 23:03:09 UTC (rev 205835)
@@ -1,5 +1,17 @@
2016-09-12 Alex Christensen <achristen...@webkit.org>
+ URLParser: Fix relative URLs containing only fragments
+ https://bugs.webkit.org/show_bug.cgi?id=161882
+
+ Reviewed by Brady Eidson.
+
+ Covered by new API tests.
+
+ * platform/URLParser.cpp:
+ (WebCore::URLParser::parse):
+
+2016-09-12 Alex Christensen <achristen...@webkit.org>
+
URLParser: Correctly handle relative URLs that are just a scheme and a colon
https://bugs.webkit.org/show_bug.cgi?id=161876
Modified: trunk/Source/WebCore/platform/URLParser.cpp (205834 => 205835)
--- trunk/Source/WebCore/platform/URLParser.cpp 2016-09-12 22:36:57 UTC (rev 205834)
+++ trunk/Source/WebCore/platform/URLParser.cpp 2016-09-12 23:03:09 UTC (rev 205835)
@@ -601,6 +601,7 @@
if (base.m_cannotBeABaseURL && *c == '#') {
copyURLPartsUntil(base, URLPart::QueryEnd);
state = State::Fragment;
+ m_buffer.append('#');
++c;
break;
}
Modified: trunk/Tools/ChangeLog (205834 => 205835)
--- trunk/Tools/ChangeLog 2016-09-12 22:36:57 UTC (rev 205834)
+++ trunk/Tools/ChangeLog 2016-09-12 23:03:09 UTC (rev 205835)
@@ -1,5 +1,15 @@
2016-09-12 Alex Christensen <achristen...@webkit.org>
+ URLParser: Fix relative URLs containing only fragments
+ https://bugs.webkit.org/show_bug.cgi?id=161882
+
+ Reviewed by Brady Eidson.
+
+ * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+ (TestWebKitAPI::TEST_F):
+
+2016-09-12 Alex Christensen <achristen...@webkit.org>
+
URLParser: Correctly handle relative URLs that are just a scheme and a colon
https://bugs.webkit.org/show_bug.cgi?id=161876
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (205834 => 205835)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-09-12 22:36:57 UTC (rev 205834)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-09-12 23:03:09 UTC (rev 205835)
@@ -275,6 +275,8 @@
checkRelativeURL("http:\\\\foo.com", "http://example.org/foo/bar", {"http", "", "", "foo.com", 0, "/", "", "", "http://foo.com/"});
checkRelativeURL("http://ExAmPlE.CoM", "http://other.com", {"http", "", "", "example.com", 0, "/", "", "", "http://example.com/"});
checkRelativeURL("http:", "http://example.org/foo/bar", {"http", "", "", "example.org", 0, "/foo/bar", "", "", "http://example.org/foo/bar"});
+ checkRelativeURL("#x", "data:,", {"data", "", "", "", 0, ",", "", "x", "data:,#x"});
+ checkRelativeURL("#x", "about:blank", {"about", "", "", "", 0, "blank", "", "x", "about:blank#x"});
// 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 webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes