diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-07-20 15:41:16 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-07-20 15:41:16 +0200 |
commit | 7491728a9c2110eccc72ed7cf9cb8aaa893e9b25 (patch) | |
tree | 734831af01e4aeb61e67d34c9b688c2436b27b92 | |
parent | a432b14e689275ada48c4303609e4e8d4d5abef3 (diff) | |
download | servo-7491728a9c2110eccc72ed7cf9cb8aaa893e9b25.tar.gz servo-7491728a9c2110eccc72ed7cf9cb8aaa893e9b25.zip |
Rename BrowserContext to BrowsingContext.
-rw-r--r-- | components/script/dom/browsercontext.rs | 10 | ||||
-rw-r--r-- | components/script/dom/window.rs | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/browsercontext.rs b/components/script/dom/browsercontext.rs index 9dc5590cdcb..595153f1fc3 100644 --- a/components/script/dom/browsercontext.rs +++ b/components/script/dom/browsercontext.rs @@ -30,16 +30,16 @@ use std::default::Default; #[derive(JSTraceable)] #[privatize] #[allow(raw_pointer_derive)] -pub struct BrowserContext { +pub struct BrowsingContext { history: Vec<SessionHistoryEntry>, active_index: usize, window_proxy: Heap<*mut JSObject>, frame_element: Option<JS<Element>>, } -impl BrowserContext { - pub fn new(document: &Document, frame_element: Option<&Element>) -> BrowserContext { - BrowserContext { +impl BrowsingContext { + pub fn new(document: &Document, frame_element: Option<&Element>) -> BrowsingContext { + BrowsingContext { history: vec!(SessionHistoryEntry::new(document)), active_index: 0, window_proxy: Heap::default(), @@ -90,7 +90,7 @@ impl BrowserContext { #[derive(JSTraceable)] pub struct SessionHistoryEntry { document: JS<Document>, - children: Vec<BrowserContext> + children: Vec<BrowsingContext> } impl SessionHistoryEntry { diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 9eca84edac4..97deb04df19 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -17,7 +17,7 @@ use dom::bindings::js::{JS, Root, MutNullableHeap}; use dom::bindings::js::RootedReference; use dom::bindings::num::Finite; use dom::bindings::utils::{GlobalStaticData, Reflectable, WindowProxyHandler}; -use dom::browsercontext::BrowserContext; +use dom::browsercontext::BrowsingContext; use dom::console::Console; use dom::crypto::Crypto; use dom::document::{Document, DocumentHelpers}; @@ -108,7 +108,7 @@ pub struct Window { image_cache_task: ImageCacheTask, image_cache_chan: ImageCacheChan, compositor: DOMRefCell<ScriptListener>, - browser_context: DOMRefCell<Option<BrowserContext>>, + browser_context: DOMRefCell<Option<BrowsingContext>>, page: Rc<Page>, performance: MutNullableHeap<JS<Performance>>, navigation_start: u64, @@ -250,7 +250,7 @@ impl Window { self.compositor.borrow_mut() } - pub fn browser_context<'a>(&'a self) -> Ref<'a, Option<BrowserContext>> { + pub fn browser_context<'a>(&'a self) -> Ref<'a, Option<BrowsingContext>> { self.browser_context.borrow() } @@ -778,7 +778,7 @@ impl<'a> WindowHelpers for &'a Window { fn init_browser_context(self, doc: &Document, frame_element: Option<&Element>) { let mut browser_context = self.browser_context.borrow_mut(); - *browser_context = Some(BrowserContext::new(doc, frame_element)); + *browser_context = Some(BrowsingContext::new(doc, frame_element)); (*browser_context).as_mut().unwrap().create_window_proxy(); } |