Diff
Modified: trunk/LayoutTests/ChangeLog (197506 => 197507)
--- trunk/LayoutTests/ChangeLog 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/ChangeLog 2016-03-03 17:25:26 UTC (rev 197507)
@@ -1,3 +1,26 @@
+2016-03-03 Chris Dumez <[email protected]>
+
+ Drop [TreatNullAs=EmptyString] from URL interface attributes
+ https://bugs.webkit.org/show_bug.cgi?id=154951
+
+ Reviewed by Darin Adler.
+
+ Update existing tests now that URL interface attributes no longer treat
+ null as the empty string.
+
+ * fast/dom/DOMURL/set-href-attribute-hash-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-hash.html:
+ * fast/dom/DOMURL/set-href-attribute-host-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-host.html:
+ * fast/dom/DOMURL/set-href-attribute-hostname-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-hostname.html:
+ * fast/dom/DOMURL/set-href-attribute-pathname-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-pathname.html:
+ * fast/dom/DOMURL/set-href-attribute-protocol-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-protocol.html:
+ * fast/dom/DOMURL/set-href-attribute-search-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-search.html:
+
2016-03-03 Javier Fernandez <[email protected]>
[CSS Box Alignment] New CSS Value 'normal' for Content Alignment
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash-expected.txt (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash-expected.txt 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash-expected.txt 2016-03-03 17:25:26 UTC (rev 197507)
@@ -13,7 +13,7 @@
PASS a.href = "" threw exception TypeError: Type error.
PASS a.href is 'https://www.my\"d(){}|~om?ain#com/path/testurl.html#middle'
Set hash to null
-PASS a.href is 'https://www.mydomain.com/path/testurl.html#'
+PASS a.href is 'https://www.mydomain.com/path/testurl.html#null'
Set hash to empty string
PASS a.href is 'https://www.mydomain.com/path/testurl.html#'
Add hash to mailto: protocol
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash.html (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash.html 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash.html 2016-03-03 17:25:26 UTC (rev 197507)
@@ -34,13 +34,10 @@
a.hash = "#hash#value";
shouldBe("a.href", "'https://www.my\\\"d(){}|~om?ain#com/path/testurl.html#middle'");
-// IE8 converts null to "null", which is not the right thing to do.
-// Firefox 3.5.2 removes the '#' at the end, and it should per
-// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
debug("Set hash to null");
a.href = ""
a.hash = null;
-shouldBe("a.href", "'https://www.mydomain.com/path/testurl.html#'");
+shouldBe("a.href", "'https://www.mydomain.com/path/testurl.html#null'");
// Firefox 3.5.2 removes the '#' at the end, and it should per
// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt 2016-03-03 17:25:26 UTC (rev 197507)
@@ -18,7 +18,7 @@
Colon without port number
PASS a.href is 'https://www.otherdomain.com:0/path/'
Set host to null
-PASS a.href is 'https://www.mydomain.com:8080/path/'
+PASS a.href is 'https://null/path/'
Set host to empty string
PASS a.href is 'https://www.mydomain.com:8080/path/'
Set host to URL with file: protocol
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html 2016-03-03 17:25:26 UTC (rev 197507)
@@ -54,13 +54,10 @@
a.host = "www.otherdomain.com:";
shouldBe("a.href", "'https://www.otherdomain.com:0/path/'");
-// IE8 converts null to "null", which is not the right thing to do.
-// Firefox 3.5.2 allows setting the host to null, which it shouldn't per
-// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
debug("Set host to null");
a.href = ""
a.host = null;
-shouldBe("a.href", "'https://www.mydomain.com:8080/path/'");
+shouldBe("a.href", "'https://null/path/'");
// Both IE8 and Firefox 3.5.2 allow setting the host to empty string, which they shouldn't, per
// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname-expected.txt (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname-expected.txt 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname-expected.txt 2016-03-03 17:25:26 UTC (rev 197507)
@@ -10,7 +10,7 @@
Set hostname to URL with foo: protocol
PASS a.href is 'foo://www.otherdomain.com/path/'
Set hostname to null
-PASS a.href is 'https://www.mydomain.com:8080/path/'
+PASS a.href is 'https://null:8080/path/'
Set hostname to empty string
PASS a.href is 'https://www.mydomain.com:8080/path/'
Set hostname to URL with 2 colons
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname.html (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname.html 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname.html 2016-03-03 17:25:26 UTC (rev 197507)
@@ -32,13 +32,10 @@
a.hostname = "www.otherdomain.com";
shouldBe("a.href", "'foo://www.otherdomain.com/path/'");
-// IE8 converts null to "null", which is not the right thing to do.
-// Firefox 3.5.2 allows setting the hostname to null, which is wrong per
-// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
debug("Set hostname to null");
a.href = ""
a.hostname = null;
-shouldBe("a.href", "'https://www.mydomain.com:8080/path/'");
+shouldBe("a.href", "'https://null:8080/path/'");
// Both IE8 and Firefox 3.5.2 allow setting the host to empty string, against the spec at
// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname-expected.txt (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname-expected.txt 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname-expected.txt 2016-03-03 17:25:26 UTC (rev 197507)
@@ -12,7 +12,7 @@
Set a pathname containing .. in it
PASS a.href is 'https://www.mydomain.com/path?key=value'
Set pathname to null
-PASS a.href is 'https://www.mydomain.com/?key=value'
+PASS a.href is 'https://www.mydomain.com/null?key=value'
Set pathname to empty string
PASS a.href is 'https://www.mydomain.com/?key=value'
Set pathname that includes illegal characters to URL that contains illegal characters.
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname.html (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname.html 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname.html 2016-03-03 17:25:26 UTC (rev 197507)
@@ -41,11 +41,10 @@
a.pathname = "/it/../path";
shouldBe("a.href", "'https://www.mydomain.com/path?key=value'");
-// IE8 converts null to "null", which is not the right thing to do.
debug("Set pathname to null");
a.href = ""
a.pathname = null;
-shouldBe("a.href", "'https://www.mydomain.com/?key=value'");
+shouldBe("a.href", "'https://www.mydomain.com/null?key=value'");
debug("Set pathname to empty string");
a.href = ""
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt 2016-03-03 17:25:26 UTC (rev 197507)
@@ -14,7 +14,7 @@
Set a protocol that starts with ':'
PASS a.href is 'https://www.mydomain.com/path/'
Set protocol to null
-PASS a.href is 'https://www.mydomain.com/path/'
+PASS a.href is 'null://www.mydomain.com/path/'
Set protocol to empty string
PASS a.href is 'https://www.mydomain.com/path/'
Set protocol to http on malformed URL
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html 2016-03-03 17:25:26 UTC (rev 197507)
@@ -53,11 +53,10 @@
debug("Exception: " + e.description);
}
-// IE8 converts null to "null", which is not the right thing to do.
debug("Set protocol to null");
a.href = ""
a.protocol = null;
-shouldBe("a.href", "'https://www.mydomain.com/path/'");
+shouldBe("a.href", "'null://www.mydomain.com/path/'");
// IE8 throws "Invalid argument" exception.
try {
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search-expected.txt (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search-expected.txt 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search-expected.txt 2016-03-03 17:25:26 UTC (rev 197507)
@@ -14,7 +14,7 @@
Set search to a malformed URL
PASS a.href is 'bad:/|/url?value=key'
Set search to null
-PASS a.href is 'https://www.mydomain.com/path/'
+PASS a.href is 'https://www.mydomain.com/path/?null'
Set search to empty string
PASS a.href is 'https://www.mydomain.com/path/?'
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search.html (197506 => 197507)
--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search.html 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search.html 2016-03-03 17:25:26 UTC (rev 197507)
@@ -42,11 +42,10 @@
a.search = "?value=key";
shouldBe("a.href", "'bad:/|/url?value=key'");
-// IE8 converts null to "null", which is not the right thing to do.
debug("Set search to null");
a.href = ""
a.search = null;
-shouldBe("a.href", "'https://www.mydomain.com/path/'");
+shouldBe("a.href", "'https://www.mydomain.com/path/?null'");
// Firefox 3.5.2 Removes the '?', and it shouldn't, per
// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
Modified: trunk/Source/WebCore/ChangeLog (197506 => 197507)
--- trunk/Source/WebCore/ChangeLog 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/Source/WebCore/ChangeLog 2016-03-03 17:25:26 UTC (rev 197507)
@@ -1,3 +1,21 @@
+2016-03-03 Chris Dumez <[email protected]>
+
+ Drop [TreatNullAs=EmptyString] from URL interface attributes
+ https://bugs.webkit.org/show_bug.cgi?id=154951
+
+ Reviewed by Darin Adler.
+
+ Drop [TreatNullAs=EmptyString] from URL interface attributes to match
+ the specification:
+ - https://url.spec.whatwg.org/#api
+
+ Firefox and Chrome both already follow the specification and convert
+ null to the "null" string.
+
+ No new tests, already covered by existing tests.
+
+ * html/URLUtils.idl:
+
2016-03-03 Miguel Gomez <[email protected]>
[TextureMapper] Use RGBA format for textures attached to framebuffers
Modified: trunk/Source/WebCore/html/URLUtils.idl (197506 => 197507)
--- trunk/Source/WebCore/html/URLUtils.idl 2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/Source/WebCore/html/URLUtils.idl 2016-03-03 17:25:26 UTC (rev 197507)
@@ -32,16 +32,13 @@
readonly attribute DOMString origin;
- // FIXME: These should not have [TreatNullAs=EmptyString].
- [TreatNullAs=EmptyString] attribute DOMString protocol;
- [TreatNullAs=EmptyString] attribute DOMString username;
- [TreatNullAs=EmptyString] attribute DOMString password;
- [TreatNullAs=EmptyString] attribute DOMString host;
- [TreatNullAs=EmptyString] attribute DOMString hostname;
- [TreatNullAs=EmptyString] attribute DOMString port;
- [TreatNullAs=EmptyString] attribute DOMString pathname;
- [TreatNullAs=EmptyString] attribute DOMString hash;
-
- // FIXME: This should not have [TreatNullAs=NullString].
- [TreatNullAs=LegacyNullString] attribute DOMString search;
+ attribute DOMString protocol;
+ attribute DOMString username;
+ attribute DOMString password;
+ attribute DOMString host;
+ attribute DOMString hostname;
+ attribute DOMString port;
+ attribute DOMString pathname;
+ attribute DOMString hash;
+ attribute DOMString search;
};