diff options
author | bors-servo <release+servo@mozilla.com> | 2014-04-04 20:01:47 -0400 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-04-04 20:01:47 -0400 |
commit | ef5567b585168746152a96994193676f354c3509 (patch) | |
tree | 7a54936d1d5ed6a27d16a2c38c43d0473c363f9b | |
parent | 83aabe327d3b713581a4183b7f23cea0c39a94c9 (diff) | |
parent | a344d465e8d68f1e06dbdd309cc6dd5de2040801 (diff) | |
download | servo-ef5567b585168746152a96994193676f354c3509.tar.gz servo-ef5567b585168746152a96994193676f354c3509.zip |
auto merge of #1994 : hyunjunekim/servo/try, r=jdm
#1991
-rw-r--r-- | src/components/script/dom/bindings/codegen/Bindings.conf | 1 | ||||
-rw-r--r-- | src/components/script/dom/document.rs | 5 | ||||
-rw-r--r-- | src/components/script/dom/webidls/Document.webidl | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/components/script/dom/bindings/codegen/Bindings.conf b/src/components/script/dom/bindings/codegen/Bindings.conf index 3e6d8dbe88f..2ba358e4753 100644 --- a/src/components/script/dom/bindings/codegen/Bindings.conf +++ b/src/components/script/dom/bindings/codegen/Bindings.conf @@ -43,6 +43,7 @@ DOMInterfaces = { 'images', 'importNode', 'links', + 'location', 'plugins', 'scripts', 'title', diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs index b123b169d67..16a96c0bb95 100644 --- a/src/components/script/dom/document.rs +++ b/src/components/script/dom/document.rs @@ -33,6 +33,7 @@ use dom::text::Text; use dom::processinginstruction::ProcessingInstruction; use dom::uievent::UIEvent; use dom::window::Window; +use dom::location::Location; use html::hubbub_html_parser::build_element_from_tag; use hubbub::hubbub::{QuirksMode, NoQuirks, LimitedQuirks, FullQuirks}; use layout_interface::{DocumentDamageLevel, ContentChangedDocumentDamage}; @@ -563,6 +564,10 @@ impl Document { HTMLCollection::create(&self.window, &NodeCast::from(abstract_self), filter) } + pub fn Location(&mut self, abstract_self: &JS<Document>) -> JS<Location> { + self.window.get_mut().Location(&abstract_self.get().window) + } + pub fn createNodeList(&self, callback: |node: &JS<Node>| -> bool) -> JS<NodeList> { let mut nodes: ~[JS<Node>] = ~[]; match self.GetDocumentElement() { diff --git a/src/components/script/dom/webidls/Document.webidl b/src/components/script/dom/webidls/Document.webidl index a1090998801..81a54021ee7 100644 --- a/src/components/script/dom/webidls/Document.webidl +++ b/src/components/script/dom/webidls/Document.webidl @@ -17,6 +17,7 @@ interface Document : Node { readonly attribute DOMString compatMode; readonly attribute DOMString characterSet; readonly attribute DOMString contentType; + readonly attribute Location location; readonly attribute DocumentType? doctype; readonly attribute Element? documentElement; |