Simple privatizations

This commit is contained in:
Tim Taubert 2014-10-12 19:06:56 +02:00
parent 5b72087944
commit acd98a73a4
36 changed files with 59 additions and 22 deletions

View file

@ -17,6 +17,7 @@ pub enum BlobType {
#[jstraceable]
#[must_root]
#[privatize]
pub struct Blob {
reflector_: Reflector,
type_: BlobType

View file

@ -15,6 +15,7 @@ use std::ptr;
#[allow(raw_pointer_deriving)]
#[jstraceable]
#[privatize]
pub struct BrowserContext {
history: Vec<SessionHistoryEntry>,
active_index: uint,
@ -66,6 +67,7 @@ impl BrowserContext {
#[jstraceable]
#[must_root]
#[privatize]
pub struct SessionHistoryEntry {
document: JS<Document>,
children: Vec<BrowserContext>

View file

@ -17,6 +17,7 @@ use canvas::canvas_render_task::{CanvasMsg, CanvasRenderTask, ClearRect, Close,
#[jstraceable]
#[must_root]
#[privatize]
pub struct CanvasRenderingContext2D {
reflector_: Reflector,
global: GlobalField,

View file

@ -11,8 +11,9 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
#[privatize]
pub struct Console {
pub reflector_: Reflector
reflector_: Reflector
}
impl Console {

View file

@ -19,6 +19,7 @@ use std::cell::Cell;
#[jstraceable]
#[must_root]
#[privatize]
pub struct CustomEvent {
event: Event,
detail: Cell<JSVal>,

View file

@ -37,6 +37,7 @@ use url::Url;
#[jstraceable]
#[must_root]
#[privatize]
pub struct DedicatedWorkerGlobalScope {
workerglobalscope: WorkerGlobalScope,
receiver: Receiver<ScriptMsg>,

View file

@ -20,8 +20,9 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
#[privatize]
pub struct DocumentFragment {
pub node: Node,
node: Node,
}
impl DocumentFragmentDerived for EventTarget {

View file

@ -62,9 +62,10 @@ impl DOMErrorName {
#[jstraceable]
#[must_root]
#[privatize]
pub struct DOMException {
pub code: DOMErrorName,
pub reflector_: Reflector
code: DOMErrorName,
reflector_: Reflector
}
impl DOMException {

View file

@ -24,6 +24,7 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
#[privatize]
pub struct DOMImplementation {
document: JS<Document>,
reflector_: Reflector,

View file

@ -16,6 +16,7 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
#[privatize]
pub struct DOMParser {
window: JS<Window>, //XXXjdm Document instead?
reflector_: Reflector

View file

@ -12,6 +12,7 @@ use servo_util::geometry::Au;
#[jstraceable]
#[must_root]
#[privatize]
pub struct DOMRect {
reflector_: Reflector,
top: f32,

View file

@ -12,6 +12,7 @@ use dom::window::Window;
#[jstraceable]
#[must_root]
#[privatize]
pub struct DOMRectList {
reflector_: Reflector,
rects: Vec<JS<DOMRect>>,

View file

@ -17,6 +17,7 @@ use string_cache::Atom;
#[jstraceable]
#[must_root]
#[privatize]
pub struct DOMTokenList {
reflector_: Reflector,
element: JS<Element>,

View file

@ -27,6 +27,7 @@ pub enum FormDatum {
#[jstraceable]
#[must_root]
#[privatize]
pub struct FormData {
data: RefCell<HashMap<DOMString, Vec<FormDatum>>>,
reflector_: Reflector,

View file

@ -31,6 +31,7 @@ pub enum CollectionTypeId {
#[jstraceable]
#[must_root]
#[privatize]
pub struct HTMLCollection {
collection: CollectionTypeId,
reflector_: Reflector,

View file

@ -17,6 +17,7 @@ use std::rc::Rc;
#[jstraceable]
#[must_root]
#[privatize]
pub struct Location {
reflector_: Reflector, //XXXjdm cycle: window->Location->window
page: Rc<Page>,

View file

@ -20,6 +20,7 @@ use js::jsval::JSVal;
#[jstraceable]
#[must_root]
#[privatize]
pub struct MessageEvent {
event: Event,
data: JSVal,

View file

@ -21,18 +21,19 @@ use std::default::Default;
#[jstraceable]
#[must_root]
#[privatize]
pub struct MouseEvent {
pub mouseevent: UIEvent,
pub screen_x: Cell<i32>,
pub screen_y: Cell<i32>,
pub client_x: Cell<i32>,
pub client_y: Cell<i32>,
pub ctrl_key: Cell<bool>,
pub shift_key: Cell<bool>,
pub alt_key: Cell<bool>,
pub meta_key: Cell<bool>,
pub button: Cell<i16>,
pub related_target: MutNullableJS<EventTarget>
mouseevent: UIEvent,
screen_x: Cell<i32>,
screen_y: Cell<i32>,
client_x: Cell<i32>,
client_y: Cell<i32>,
ctrl_key: Cell<bool>,
shift_key: Cell<bool>,
alt_key: Cell<bool>,
meta_key: Cell<bool>,
button: Cell<i16>,
related_target: MutNullableJS<EventTarget>
}
impl MouseEventDerived for Event {

View file

@ -13,6 +13,7 @@ use dom::window::Window;
#[jstraceable]
#[must_root]
#[privatize]
pub struct NamedNodeMap {
reflector_: Reflector,
owner: JS<Element>,

View file

@ -13,8 +13,9 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
#[privatize]
pub struct Navigator {
pub reflector_: Reflector //XXXjdm cycle: window->navigator->window
reflector_: Reflector //XXXjdm cycle: window->navigator->window
}
impl Navigator {

View file

@ -10,8 +10,9 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
#[jstraceable]
#[must_root]
#[privatize]
pub struct NodeIterator {
pub reflector_: Reflector
reflector_: Reflector
}
impl NodeIterator {

View file

@ -19,6 +19,7 @@ pub enum NodeListType {
#[jstraceable]
#[must_root]
#[privatize]
pub struct NodeList {
list_type: NodeListType,
reflector_: Reflector,

View file

@ -15,6 +15,7 @@ pub type DOMHighResTimeStamp = f64;
#[jstraceable]
#[must_root]
#[privatize]
pub struct Performance {
reflector_: Reflector,
timing: JS<PerformanceTiming>,

View file

@ -11,6 +11,7 @@ use dom::window::Window;
#[jstraceable]
#[must_root]
#[privatize]
pub struct PerformanceTiming {
reflector_: Reflector,
navigationStart: u64,

View file

@ -15,6 +15,7 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
#[privatize]
pub struct ProgressEvent {
event: Event,
length_computable: bool,

View file

@ -13,6 +13,7 @@ use dom::document::Document;
#[jstraceable]
#[must_root]
#[privatize]
pub struct Range {
reflector_: Reflector
}

View file

@ -11,6 +11,7 @@ use dom::window::Window;
#[jstraceable]
#[must_root]
#[privatize]
pub struct Screen {
reflector_: Reflector,
}

View file

@ -20,6 +20,7 @@ use js::jsval::{JSVal, NullValue};
#[jstraceable]
#[must_root]
#[privatize]
pub struct TestBinding {
reflector: Reflector,
global: GlobalField,

View file

@ -23,12 +23,13 @@ use std::cell::Cell;
// http://dom.spec.whatwg.org/#interface-treewalker
#[jstraceable]
#[must_root]
#[privatize]
pub struct TreeWalker {
pub reflector_: Reflector,
pub root_node: JS<Node>,
pub current_node: Cell<JS<Node>>,
pub what_to_show: u32,
pub filter: Filter
reflector_: Reflector,
root_node: JS<Node>,
current_node: Cell<JS<Node>>,
what_to_show: u32,
filter: Filter
}
impl TreeWalker {

View file

@ -22,6 +22,7 @@ use std::ascii::OwnedStrAsciiExt;
#[jstraceable]
#[must_root]
#[privatize]
pub struct URLSearchParams {
data: RefCell<HashMap<DOMString, Vec<DOMString>>>,
reflector_: Reflector,

View file

@ -10,6 +10,7 @@ use dom::window::Window;
#[jstraceable]
#[must_root]
#[privatize]
pub struct ValidityState {
reflector_: Reflector,
state: u8,

View file

@ -33,6 +33,7 @@ untraceable!(TrustedWorkerAddress)
#[jstraceable]
#[must_root]
#[privatize]
pub struct Worker {
eventtarget: EventTarget,
refcount: Cell<uint>,

View file

@ -16,6 +16,7 @@ use url::Url;
#[jstraceable]
#[must_root]
#[privatize]
pub struct WorkerLocation {
reflector_: Reflector,
url: Url,

View file

@ -13,6 +13,7 @@ use servo_util::str::DOMString;
#[jstraceable]
#[must_root]
#[privatize]
pub struct WorkerNavigator {
reflector_: Reflector,
}

View file

@ -104,6 +104,7 @@ enum SyncOrAsync<'a> {
#[jstraceable]
#[must_root]
#[privatize]
pub struct XMLHttpRequest {
eventtarget: XMLHttpRequestEventTarget,
ready_state: Cell<XMLHttpRequestState>,

View file

@ -13,6 +13,7 @@ use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
#[jstraceable]
#[must_root]
#[privatize]
pub struct XMLHttpRequestUpload {
eventtarget: XMLHttpRequestEventTarget
}