mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
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 -->
This commit is contained in:
commit
1e16047846
5 changed files with 42 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue