mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Make some DOM members private.
I have not reviewed if this is the complete set of members that can be made private.
This commit is contained in:
parent
9f915e9e42
commit
bba9e58df1
19 changed files with 61 additions and 61 deletions
|
@ -58,7 +58,7 @@ impl AttrValue {
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct Attr {
|
pub struct Attr {
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub local_name: DOMString,
|
pub local_name: DOMString,
|
||||||
value: Traceable<RefCell<AttrValue>>,
|
value: Traceable<RefCell<AttrValue>>,
|
||||||
pub name: DOMString,
|
pub name: DOMString,
|
||||||
|
@ -66,7 +66,7 @@ pub struct Attr {
|
||||||
pub prefix: Option<DOMString>,
|
pub prefix: Option<DOMString>,
|
||||||
|
|
||||||
/// the element that owns this attribute.
|
/// the element that owns this attribute.
|
||||||
pub owner: Cell<JS<Element>>,
|
owner: Cell<JS<Element>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Reflectable for Attr {
|
impl Reflectable for Attr {
|
||||||
|
|
|
@ -11,9 +11,9 @@ use dom::window::Window;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct AttrList {
|
pub struct AttrList {
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub window: JS<Window>,
|
window: JS<Window>,
|
||||||
pub owner: JS<Element>,
|
owner: JS<Element>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AttrList {
|
impl AttrList {
|
||||||
|
|
|
@ -108,8 +108,8 @@ pub fn WrapCallThisObject<T: Reflectable>(cx: *mut JSContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct CallSetup {
|
pub struct CallSetup {
|
||||||
pub cx: *mut JSContext,
|
cx: *mut JSContext,
|
||||||
pub handling: ExceptionHandling
|
handling: ExceptionHandling
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CallSetup {
|
impl CallSetup {
|
||||||
|
|
|
@ -17,9 +17,9 @@ pub enum BlobType {
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct Blob {
|
pub struct Blob {
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub window: JS<Window>,
|
window: JS<Window>,
|
||||||
pub type_: BlobType
|
type_: BlobType
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Blob {
|
impl Blob {
|
||||||
|
@ -58,4 +58,4 @@ impl FileDerived for Blob {
|
||||||
_ => false
|
_ => false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,12 +10,12 @@ use servo_util::geometry::Au;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct ClientRect {
|
pub struct ClientRect {
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub top: f32,
|
top: f32,
|
||||||
pub bottom: f32,
|
bottom: f32,
|
||||||
pub left: f32,
|
left: f32,
|
||||||
pub right: f32,
|
right: f32,
|
||||||
pub window: JS<Window>,
|
window: JS<Window>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ClientRect {
|
impl ClientRect {
|
||||||
|
|
|
@ -10,9 +10,9 @@ use dom::window::Window;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct ClientRectList {
|
pub struct ClientRectList {
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub rects: Vec<JS<ClientRect>>,
|
rects: Vec<JS<ClientRect>>,
|
||||||
pub window: JS<Window>,
|
window: JS<Window>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ClientRectList {
|
impl ClientRectList {
|
||||||
|
|
|
@ -61,15 +61,15 @@ pub enum IsHTMLDocument {
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct Document {
|
pub struct Document {
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub window: JS<Window>,
|
pub window: JS<Window>,
|
||||||
idmap: Traceable<RefCell<HashMap<DOMString, Vec<JS<Element>>>>>,
|
idmap: Traceable<RefCell<HashMap<DOMString, Vec<JS<Element>>>>>,
|
||||||
pub implementation: Cell<Option<JS<DOMImplementation>>>,
|
implementation: Cell<Option<JS<DOMImplementation>>>,
|
||||||
pub content_type: DOMString,
|
content_type: DOMString,
|
||||||
pub encoding_name: Traceable<RefCell<DOMString>>,
|
pub encoding_name: Traceable<RefCell<DOMString>>,
|
||||||
pub is_html_document: bool,
|
pub is_html_document: bool,
|
||||||
pub url: Untraceable<Url>,
|
url: Untraceable<Url>,
|
||||||
pub quirks_mode: Untraceable<Cell<QuirksMode>>,
|
quirks_mode: Untraceable<Cell<QuirksMode>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DocumentDerived for EventTarget {
|
impl DocumentDerived for EventTarget {
|
||||||
|
|
|
@ -21,8 +21,8 @@ use servo_util::str::DOMString;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct DOMImplementation {
|
pub struct DOMImplementation {
|
||||||
pub owner: JS<Window>,
|
owner: JS<Window>,
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DOMImplementation {
|
impl DOMImplementation {
|
||||||
|
|
|
@ -48,7 +48,7 @@ pub enum EventTypeId {
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct Event {
|
pub struct Event {
|
||||||
pub type_id: EventTypeId,
|
pub type_id: EventTypeId,
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub current_target: Cell<Option<JS<EventTarget>>>,
|
pub current_target: Cell<Option<JS<EventTarget>>>,
|
||||||
pub target: Cell<Option<JS<EventTarget>>>,
|
pub target: Cell<Option<JS<EventTarget>>>,
|
||||||
type_: Traceable<RefCell<DOMString>>,
|
type_: Traceable<RefCell<DOMString>>,
|
||||||
|
@ -61,7 +61,7 @@ pub struct Event {
|
||||||
pub trusted: Traceable<Cell<bool>>,
|
pub trusted: Traceable<Cell<bool>>,
|
||||||
pub dispatching: Traceable<Cell<bool>>,
|
pub dispatching: Traceable<Cell<bool>>,
|
||||||
pub initialized: Traceable<Cell<bool>>,
|
pub initialized: Traceable<Cell<bool>>,
|
||||||
pub timestamp: u64,
|
timestamp: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Event {
|
impl Event {
|
||||||
|
|
|
@ -60,7 +60,7 @@ pub struct EventListenerEntry {
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct EventTarget {
|
pub struct EventTarget {
|
||||||
pub type_id: EventTargetTypeId,
|
pub type_id: EventTargetTypeId,
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
handlers: Traceable<RefCell<HashMap<DOMString, Vec<EventListenerEntry>>>>,
|
handlers: Traceable<RefCell<HashMap<DOMString, Vec<EventListenerEntry>>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,10 @@ pub enum FormDatum {
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct FormData {
|
pub struct FormData {
|
||||||
pub data: Traceable<RefCell<HashMap<DOMString, Vec<FormDatum>>>>,
|
data: Traceable<RefCell<HashMap<DOMString, Vec<FormDatum>>>>,
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub window: JS<Window>,
|
window: JS<Window>,
|
||||||
pub form: Option<JS<HTMLFormElement>>
|
form: Option<JS<HTMLFormElement>>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FormData {
|
impl FormData {
|
||||||
|
|
|
@ -32,9 +32,9 @@ pub enum CollectionTypeId {
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct HTMLCollection {
|
pub struct HTMLCollection {
|
||||||
pub collection: CollectionTypeId,
|
collection: CollectionTypeId,
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub window: JS<Window>,
|
window: JS<Window>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl HTMLCollection {
|
impl HTMLCollection {
|
||||||
|
|
|
@ -16,8 +16,8 @@ use serialize::{Encoder, Encodable};
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct Location {
|
pub struct Location {
|
||||||
pub reflector_: Reflector, //XXXjdm cycle: window->Location->window
|
reflector_: Reflector, //XXXjdm cycle: window->Location->window
|
||||||
pub page: Rc<Page>,
|
page: Rc<Page>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Location {
|
impl Location {
|
||||||
|
|
|
@ -16,9 +16,9 @@ pub enum NodeListType {
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct NodeList {
|
pub struct NodeList {
|
||||||
pub list_type: NodeListType,
|
list_type: NodeListType,
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub window: JS<Window>
|
window: JS<Window>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NodeList {
|
impl NodeList {
|
||||||
|
|
|
@ -13,8 +13,8 @@ pub type DOMHighResTimeStamp = f64;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct Performance {
|
pub struct Performance {
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub timing: JS<PerformanceTiming>,
|
timing: JS<PerformanceTiming>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Performance {
|
impl Performance {
|
||||||
|
|
|
@ -9,9 +9,9 @@ use dom::window::Window;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct PerformanceTiming {
|
pub struct PerformanceTiming {
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub navigationStart: u64,
|
navigationStart: u64,
|
||||||
pub navigationStartPrecise: f64,
|
navigationStartPrecise: f64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PerformanceTiming {
|
impl PerformanceTiming {
|
||||||
|
|
|
@ -18,8 +18,8 @@ use std::cell::Cell;
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct UIEvent {
|
pub struct UIEvent {
|
||||||
pub event: Event,
|
pub event: Event,
|
||||||
pub view: Cell<Option<JS<Window>>>,
|
view: Cell<Option<JS<Window>>>,
|
||||||
pub detail: Traceable<Cell<i32>>
|
detail: Traceable<Cell<i32>>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UIEventDerived for Event {
|
impl UIEventDerived for Event {
|
||||||
|
|
|
@ -10,9 +10,9 @@ use std::cell::Cell;
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct ValidityState {
|
pub struct ValidityState {
|
||||||
pub reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
pub window: Cell<JS<Window>>,
|
window: Cell<JS<Window>>,
|
||||||
pub state: u8,
|
state: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ValidityState {
|
impl ValidityState {
|
||||||
|
|
|
@ -48,9 +48,9 @@ pub struct TimerId(i32);
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct TimerHandle {
|
pub struct TimerHandle {
|
||||||
pub handle: TimerId,
|
handle: TimerId,
|
||||||
pub data: TimerData,
|
pub data: TimerData,
|
||||||
pub cancel_chan: Untraceable<Option<Sender<()>>>,
|
cancel_chan: Untraceable<Option<Sender<()>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Hash for TimerId {
|
impl Hash for TimerId {
|
||||||
|
@ -68,18 +68,18 @@ impl TimerHandle {
|
||||||
|
|
||||||
#[deriving(Encodable)]
|
#[deriving(Encodable)]
|
||||||
pub struct Window {
|
pub struct Window {
|
||||||
pub eventtarget: EventTarget,
|
eventtarget: EventTarget,
|
||||||
pub script_chan: ScriptChan,
|
pub script_chan: ScriptChan,
|
||||||
pub console: Cell<Option<JS<Console>>>,
|
console: Cell<Option<JS<Console>>>,
|
||||||
pub location: Cell<Option<JS<Location>>>,
|
location: Cell<Option<JS<Location>>>,
|
||||||
pub navigator: Cell<Option<JS<Navigator>>>,
|
navigator: Cell<Option<JS<Navigator>>>,
|
||||||
pub image_cache_task: ImageCacheTask,
|
pub image_cache_task: ImageCacheTask,
|
||||||
pub active_timers: Traceable<RefCell<HashMap<TimerId, TimerHandle>>>,
|
pub active_timers: Traceable<RefCell<HashMap<TimerId, TimerHandle>>>,
|
||||||
pub next_timer_handle: Traceable<Cell<i32>>,
|
next_timer_handle: Traceable<Cell<i32>>,
|
||||||
pub compositor: Untraceable<Box<ScriptListener>>,
|
compositor: Untraceable<Box<ScriptListener>>,
|
||||||
pub browser_context: Traceable<RefCell<Option<BrowserContext>>>,
|
pub browser_context: Traceable<RefCell<Option<BrowserContext>>>,
|
||||||
pub page: Rc<Page>,
|
pub page: Rc<Page>,
|
||||||
pub performance: Cell<Option<JS<Performance>>>,
|
performance: Cell<Option<JS<Performance>>>,
|
||||||
pub navigationStart: u64,
|
pub navigationStart: u64,
|
||||||
pub navigationStartPrecise: f64,
|
pub navigationStartPrecise: f64,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue