Title: [279681] trunk
Revision
279681
Author
achristen...@apple.com
Date
2021-07-07 15:47:43 -0700 (Wed, 07 Jul 2021)

Log Message

DOMURL's href setter should use empty URL as base URL
https://bugs.webkit.org/show_bug.cgi?id=227772

Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

* web-platform-tests/url/historical.any-expected.txt:
* web-platform-tests/url/historical.any.worker-expected.txt:

Source/WebCore:

This matches Chrome and Firefox.

* html/DOMURL.cpp:
(WebCore::DOMURL::setHref):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (279680 => 279681)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-07-07 22:45:11 UTC (rev 279680)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-07-07 22:47:43 UTC (rev 279681)
@@ -1,5 +1,15 @@
 2021-07-07  Alex Christensen  <achristen...@webkit.org>
 
+        DOMURL's href setter should use empty URL as base URL
+        https://bugs.webkit.org/show_bug.cgi?id=227772
+
+        Reviewed by Yusuke Suzuki.
+
+        * web-platform-tests/url/historical.any-expected.txt:
+        * web-platform-tests/url/historical.any.worker-expected.txt:
+
+2021-07-07  Alex Christensen  <achristen...@webkit.org>
+
         URL host setter should pass host to URLParser instead of trying to encode it itself
         https://bugs.webkit.org/show_bug.cgi?id=227749
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.any-expected.txt (279680 => 279681)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.any-expected.txt	2021-07-07 22:45:11 UTC (rev 279680)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.any-expected.txt	2021-07-07 22:47:43 UTC (rev 279681)
@@ -1,9 +1,7 @@
 
 PASS searchParams on location object
 PASS <a> and <area>.searchParams should be undefined
-FAIL Setting URL's href attribute and base URLs assert_throws_js: function "function () {
-    url.href = ""
-  }" did not throw
+PASS Setting URL's href attribute and base URLs
 PASS URL.domainToASCII should be undefined
 PASS URL.domainToUnicode should be undefined
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.any.worker-expected.txt (279680 => 279681)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.any.worker-expected.txt	2021-07-07 22:45:11 UTC (rev 279680)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/historical.any.worker-expected.txt	2021-07-07 22:47:43 UTC (rev 279681)
@@ -1,8 +1,6 @@
 
 PASS searchParams on location object
-FAIL Setting URL's href attribute and base URLs assert_throws_js: function "function () {
-    url.href = ""
-  }" did not throw
+PASS Setting URL's href attribute and base URLs
 PASS URL.domainToASCII should be undefined
 PASS URL.domainToUnicode should be undefined
 

Modified: trunk/Source/WebCore/ChangeLog (279680 => 279681)


--- trunk/Source/WebCore/ChangeLog	2021-07-07 22:45:11 UTC (rev 279680)
+++ trunk/Source/WebCore/ChangeLog	2021-07-07 22:47:43 UTC (rev 279681)
@@ -1,3 +1,15 @@
+2021-07-07  Alex Christensen  <achristen...@webkit.org>
+
+        DOMURL's href setter should use empty URL as base URL
+        https://bugs.webkit.org/show_bug.cgi?id=227772
+
+        Reviewed by Yusuke Suzuki.
+
+        This matches Chrome and Firefox.
+
+        * html/DOMURL.cpp:
+        (WebCore::DOMURL::setHref):
+
 2021-07-07  Alan Bujtas  <za...@apple.com>
 
         [LFC][IFC] Unexpected content wrap when the containing block width is fixed

Modified: trunk/Source/WebCore/html/DOMURL.cpp (279680 => 279681)


--- trunk/Source/WebCore/html/DOMURL.cpp	2021-07-07 22:45:11 UTC (rev 279680)
+++ trunk/Source/WebCore/html/DOMURL.cpp	2021-07-07 22:47:43 UTC (rev 279681)
@@ -75,7 +75,7 @@
 
 ExceptionOr<void> DOMURL::setHref(const String& url)
 {
-    URL completeURL { m_baseURL, url };
+    URL completeURL { URL { }, url };
     if (!completeURL.isValid())
         return Exception { TypeError };
     m_url = WTFMove(completeURL);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to