Return a reference in BrowserContext::active_document()

This commit is contained in:
Anthony Ramine 2015-10-17 02:03:55 +02:00
parent 6c7f37061b
commit 1f31d5b856
3 changed files with 5 additions and 6 deletions

View file

@ -44,13 +44,12 @@ impl BrowsingContext {
}
}
pub fn active_document(&self) -> Root<Document> {
self.history[self.active_index].document.root()
pub fn active_document(&self) -> &Document {
&*self.history[self.active_index].document
}
pub fn active_window(&self) -> Root<Window> {
let doc = self.active_document();
doc.r().window()
self.active_document().window()
}
pub fn frame_element(&self) -> Option<Root<Element>> {