mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Simple privatizations
This commit is contained in:
parent
5b72087944
commit
acd98a73a4
36 changed files with 59 additions and 22 deletions
|
@ -17,6 +17,7 @@ pub enum BlobType {
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct Blob {
|
||||
reflector_: Reflector,
|
||||
type_: BlobType
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -17,6 +17,7 @@ use canvas::canvas_render_task::{CanvasMsg, CanvasRenderTask, ClearRect, Close,
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct CanvasRenderingContext2D {
|
||||
reflector_: Reflector,
|
||||
global: GlobalField,
|
||||
|
|
|
@ -11,8 +11,9 @@ use servo_util::str::DOMString;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct Console {
|
||||
pub reflector_: Reflector
|
||||
reflector_: Reflector
|
||||
}
|
||||
|
||||
impl Console {
|
||||
|
|
|
@ -19,6 +19,7 @@ use std::cell::Cell;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct CustomEvent {
|
||||
event: Event,
|
||||
detail: Cell<JSVal>,
|
||||
|
|
|
@ -37,6 +37,7 @@ use url::Url;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct DedicatedWorkerGlobalScope {
|
||||
workerglobalscope: WorkerGlobalScope,
|
||||
receiver: Receiver<ScriptMsg>,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -24,6 +24,7 @@ use servo_util::str::DOMString;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct DOMImplementation {
|
||||
document: JS<Document>,
|
||||
reflector_: Reflector,
|
||||
|
|
|
@ -16,6 +16,7 @@ use servo_util::str::DOMString;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct DOMParser {
|
||||
window: JS<Window>, //XXXjdm Document instead?
|
||||
reflector_: Reflector
|
||||
|
|
|
@ -12,6 +12,7 @@ use servo_util::geometry::Au;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct DOMRect {
|
||||
reflector_: Reflector,
|
||||
top: f32,
|
||||
|
|
|
@ -12,6 +12,7 @@ use dom::window::Window;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct DOMRectList {
|
||||
reflector_: Reflector,
|
||||
rects: Vec<JS<DOMRect>>,
|
||||
|
|
|
@ -17,6 +17,7 @@ use string_cache::Atom;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct DOMTokenList {
|
||||
reflector_: Reflector,
|
||||
element: JS<Element>,
|
||||
|
|
|
@ -27,6 +27,7 @@ pub enum FormDatum {
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct FormData {
|
||||
data: RefCell<HashMap<DOMString, Vec<FormDatum>>>,
|
||||
reflector_: Reflector,
|
||||
|
|
|
@ -31,6 +31,7 @@ pub enum CollectionTypeId {
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct HTMLCollection {
|
||||
collection: CollectionTypeId,
|
||||
reflector_: Reflector,
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -20,6 +20,7 @@ use js::jsval::JSVal;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct MessageEvent {
|
||||
event: Event,
|
||||
data: JSVal,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -13,6 +13,7 @@ use dom::window::Window;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct NamedNodeMap {
|
||||
reflector_: Reflector,
|
||||
owner: JS<Element>,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -19,6 +19,7 @@ pub enum NodeListType {
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct NodeList {
|
||||
list_type: NodeListType,
|
||||
reflector_: Reflector,
|
||||
|
|
|
@ -15,6 +15,7 @@ pub type DOMHighResTimeStamp = f64;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct Performance {
|
||||
reflector_: Reflector,
|
||||
timing: JS<PerformanceTiming>,
|
||||
|
|
|
@ -11,6 +11,7 @@ use dom::window::Window;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct PerformanceTiming {
|
||||
reflector_: Reflector,
|
||||
navigationStart: u64,
|
||||
|
|
|
@ -15,6 +15,7 @@ use servo_util::str::DOMString;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct ProgressEvent {
|
||||
event: Event,
|
||||
length_computable: bool,
|
||||
|
|
|
@ -13,6 +13,7 @@ use dom::document::Document;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct Range {
|
||||
reflector_: Reflector
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ use dom::window::Window;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct Screen {
|
||||
reflector_: Reflector,
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ use js::jsval::{JSVal, NullValue};
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct TestBinding {
|
||||
reflector: Reflector,
|
||||
global: GlobalField,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -22,6 +22,7 @@ use std::ascii::OwnedStrAsciiExt;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct URLSearchParams {
|
||||
data: RefCell<HashMap<DOMString, Vec<DOMString>>>,
|
||||
reflector_: Reflector,
|
||||
|
|
|
@ -10,6 +10,7 @@ use dom::window::Window;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct ValidityState {
|
||||
reflector_: Reflector,
|
||||
state: u8,
|
||||
|
|
|
@ -33,6 +33,7 @@ untraceable!(TrustedWorkerAddress)
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct Worker {
|
||||
eventtarget: EventTarget,
|
||||
refcount: Cell<uint>,
|
||||
|
|
|
@ -16,6 +16,7 @@ use url::Url;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct WorkerLocation {
|
||||
reflector_: Reflector,
|
||||
url: Url,
|
||||
|
|
|
@ -13,6 +13,7 @@ use servo_util::str::DOMString;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct WorkerNavigator {
|
||||
reflector_: Reflector,
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ enum SyncOrAsync<'a> {
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct XMLHttpRequest {
|
||||
eventtarget: XMLHttpRequestEventTarget,
|
||||
ready_state: Cell<XMLHttpRequestState>,
|
||||
|
|
|
@ -13,6 +13,7 @@ use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
|
|||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
#[privatize]
|
||||
pub struct XMLHttpRequestUpload {
|
||||
eventtarget: XMLHttpRequestEventTarget
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue