mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Rename BrowserContext to BrowsingContext.
This commit is contained in:
parent
a432b14e68
commit
7491728a9c
2 changed files with 9 additions and 9 deletions
|
@ -30,16 +30,16 @@ use std::default::Default;
|
||||||
#[derive(JSTraceable)]
|
#[derive(JSTraceable)]
|
||||||
#[privatize]
|
#[privatize]
|
||||||
#[allow(raw_pointer_derive)]
|
#[allow(raw_pointer_derive)]
|
||||||
pub struct BrowserContext {
|
pub struct BrowsingContext {
|
||||||
history: Vec<SessionHistoryEntry>,
|
history: Vec<SessionHistoryEntry>,
|
||||||
active_index: usize,
|
active_index: usize,
|
||||||
window_proxy: Heap<*mut JSObject>,
|
window_proxy: Heap<*mut JSObject>,
|
||||||
frame_element: Option<JS<Element>>,
|
frame_element: Option<JS<Element>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BrowserContext {
|
impl BrowsingContext {
|
||||||
pub fn new(document: &Document, frame_element: Option<&Element>) -> BrowserContext {
|
pub fn new(document: &Document, frame_element: Option<&Element>) -> BrowsingContext {
|
||||||
BrowserContext {
|
BrowsingContext {
|
||||||
history: vec!(SessionHistoryEntry::new(document)),
|
history: vec!(SessionHistoryEntry::new(document)),
|
||||||
active_index: 0,
|
active_index: 0,
|
||||||
window_proxy: Heap::default(),
|
window_proxy: Heap::default(),
|
||||||
|
@ -90,7 +90,7 @@ impl BrowserContext {
|
||||||
#[derive(JSTraceable)]
|
#[derive(JSTraceable)]
|
||||||
pub struct SessionHistoryEntry {
|
pub struct SessionHistoryEntry {
|
||||||
document: JS<Document>,
|
document: JS<Document>,
|
||||||
children: Vec<BrowserContext>
|
children: Vec<BrowsingContext>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SessionHistoryEntry {
|
impl SessionHistoryEntry {
|
||||||
|
|
|
@ -17,7 +17,7 @@ use dom::bindings::js::{JS, Root, MutNullableHeap};
|
||||||
use dom::bindings::js::RootedReference;
|
use dom::bindings::js::RootedReference;
|
||||||
use dom::bindings::num::Finite;
|
use dom::bindings::num::Finite;
|
||||||
use dom::bindings::utils::{GlobalStaticData, Reflectable, WindowProxyHandler};
|
use dom::bindings::utils::{GlobalStaticData, Reflectable, WindowProxyHandler};
|
||||||
use dom::browsercontext::BrowserContext;
|
use dom::browsercontext::BrowsingContext;
|
||||||
use dom::console::Console;
|
use dom::console::Console;
|
||||||
use dom::crypto::Crypto;
|
use dom::crypto::Crypto;
|
||||||
use dom::document::{Document, DocumentHelpers};
|
use dom::document::{Document, DocumentHelpers};
|
||||||
|
@ -108,7 +108,7 @@ pub struct Window {
|
||||||
image_cache_task: ImageCacheTask,
|
image_cache_task: ImageCacheTask,
|
||||||
image_cache_chan: ImageCacheChan,
|
image_cache_chan: ImageCacheChan,
|
||||||
compositor: DOMRefCell<ScriptListener>,
|
compositor: DOMRefCell<ScriptListener>,
|
||||||
browser_context: DOMRefCell<Option<BrowserContext>>,
|
browser_context: DOMRefCell<Option<BrowsingContext>>,
|
||||||
page: Rc<Page>,
|
page: Rc<Page>,
|
||||||
performance: MutNullableHeap<JS<Performance>>,
|
performance: MutNullableHeap<JS<Performance>>,
|
||||||
navigation_start: u64,
|
navigation_start: u64,
|
||||||
|
@ -250,7 +250,7 @@ impl Window {
|
||||||
self.compositor.borrow_mut()
|
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()
|
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>) {
|
fn init_browser_context(self, doc: &Document, frame_element: Option<&Element>) {
|
||||||
let mut browser_context = self.browser_context.borrow_mut();
|
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();
|
(*browser_context).as_mut().unwrap().create_window_proxy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue