diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-07-06 11:04:45 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-07-06 11:04:45 -0600 |
commit | 1e1604784675bf378cf0feea48bd22a668285f84 (patch) | |
tree | ad5fc1d196e1426a139e959adf2eeabfde6e1add /components/script/dom/node.rs | |
parent | 0f8095b950dd144497919cfea65a1f154ed3ae9a (diff) | |
parent | a269f7f7b5f8fc18a3295f3394f6cbb3280c804c (diff) | |
download | servo-1e1604784675bf378cf0feea48bd22a668285f84.tar.gz servo-1e1604784675bf378cf0feea48bd22a668285f84.zip |
Auto merge of #6559 - kball:IS1824-implement-Node.baseURI, r=Ms2ger
Implement Node.baseURI
Addresses Issue #1824. Implements Node.baseURI based on https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976#c32
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6559)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 2d009dd4159..c5d435d5156 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -987,7 +987,7 @@ impl<'a> NodeHelpers for &'a Node { fn summarize(self) -> NodeInfo { NodeInfo { uniqueId: self.get_unique_id(), - baseURI: self.GetBaseURI().unwrap_or("".to_owned()), + baseURI: self.BaseURI(), parent: self.GetParentNode().map(|node| node.r().get_unique_id()).unwrap_or("".to_owned()), nodeType: self.NodeType(), namespaceURI: "".to_owned(), //FIXME @@ -1950,9 +1950,8 @@ impl<'a> NodeMethods for &'a Node { } // https://dom.spec.whatwg.org/#dom-node-baseuri - fn GetBaseURI(self) -> Option<DOMString> { - // FIXME (#1824) implement. - None + fn BaseURI(self) -> DOMString { + self.owner_doc().URL() } // https://dom.spec.whatwg.org/#dom-node-ownerdocument |