aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-03-30 16:45:02 +0200
committerMs2ger <Ms2ger@gmail.com>2016-03-30 16:45:13 +0200
commit231208a5226efa82e26ef9a941ed5d2cc62e5474 (patch)
tree2ea0f48428e772e029d7b27737fe222b2fd062b3 /components/script/dom/document.rs
parent821afa071e0bb4aa3c48f35b44ab8984a1ec92bc (diff)
downloadservo-231208a5226efa82e26ef9a941ed5d2cc62e5474.tar.gz
servo-231208a5226efa82e26ef9a941ed5d2cc62e5474.zip
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.
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs6
1 files changed, 0 insertions, 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()))
}