From 231208a5226efa82e26ef9a941ed5d2cc62e5474 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 30 Mar 2016 16:45:02 +0200 Subject: [PATCH] Include square brackets for IPv6 addresses in Document::domain. The specification changed out from under us. It's unfortunately impossible to write a test for this right now. --- components/script/dom/document.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index ddaebcd35bf..ad0ae92eace 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -1767,12 +1767,6 @@ impl DocumentMethods for Document { fn Domain(&self) -> DOMString { // TODO: This should use the effective script origin when it exists let origin = self.window.get_url(); - - if let Some(&Host::Ipv6(ipv6)) = origin.host() { - // Omit square brackets for IPv6 addresses. - return DOMString::from(ipv6.to_string()); - } - DOMString::from(origin.serialize_host().unwrap_or_else(|| "".to_owned())) }