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:
Ms2ger 2014-06-28 13:42:39 +02:00
parent 9f915e9e42
commit bba9e58df1
19 changed files with 61 additions and 61 deletions

View file

@ -58,7 +58,7 @@ impl AttrValue {
#[deriving(Encodable)]
pub struct Attr {
pub reflector_: Reflector,
reflector_: Reflector,
pub local_name: DOMString,
value: Traceable<RefCell<AttrValue>>,
pub name: DOMString,
@ -66,7 +66,7 @@ pub struct Attr {
pub prefix: Option<DOMString>,
/// the element that owns this attribute.
pub owner: Cell<JS<Element>>,
owner: Cell<JS<Element>>,
}
impl Reflectable for Attr {

View file

@ -11,9 +11,9 @@ use dom::window::Window;
#[deriving(Encodable)]
pub struct AttrList {
pub reflector_: Reflector,
pub window: JS<Window>,
pub owner: JS<Element>,
reflector_: Reflector,
window: JS<Window>,
owner: JS<Element>,
}
impl AttrList {

View file

@ -108,8 +108,8 @@ pub fn WrapCallThisObject<T: Reflectable>(cx: *mut JSContext,
}
pub struct CallSetup {
pub cx: *mut JSContext,
pub handling: ExceptionHandling
cx: *mut JSContext,
handling: ExceptionHandling
}
impl CallSetup {

View file

@ -17,9 +17,9 @@ pub enum BlobType {
#[deriving(Encodable)]
pub struct Blob {
pub reflector_: Reflector,
pub window: JS<Window>,
pub type_: BlobType
reflector_: Reflector,
window: JS<Window>,
type_: BlobType
}
impl Blob {

View file

@ -10,12 +10,12 @@ use servo_util::geometry::Au;
#[deriving(Encodable)]
pub struct ClientRect {
pub reflector_: Reflector,
pub top: f32,
pub bottom: f32,
pub left: f32,
pub right: f32,
pub window: JS<Window>,
reflector_: Reflector,
top: f32,
bottom: f32,
left: f32,
right: f32,
window: JS<Window>,
}
impl ClientRect {

View file

@ -10,9 +10,9 @@ use dom::window::Window;
#[deriving(Encodable)]
pub struct ClientRectList {
pub reflector_: Reflector,
pub rects: Vec<JS<ClientRect>>,
pub window: JS<Window>,
reflector_: Reflector,
rects: Vec<JS<ClientRect>>,
window: JS<Window>,
}
impl ClientRectList {

View file

@ -61,15 +61,15 @@ pub enum IsHTMLDocument {
#[deriving(Encodable)]
pub struct Document {
pub node: Node,
pub reflector_: Reflector,
reflector_: Reflector,
pub window: JS<Window>,
idmap: Traceable<RefCell<HashMap<DOMString, Vec<JS<Element>>>>>,
pub implementation: Cell<Option<JS<DOMImplementation>>>,
pub content_type: DOMString,
implementation: Cell<Option<JS<DOMImplementation>>>,
content_type: DOMString,
pub encoding_name: Traceable<RefCell<DOMString>>,
pub is_html_document: bool,
pub url: Untraceable<Url>,
pub quirks_mode: Untraceable<Cell<QuirksMode>>,
url: Untraceable<Url>,
quirks_mode: Untraceable<Cell<QuirksMode>>,
}
impl DocumentDerived for EventTarget {

View file

@ -21,8 +21,8 @@ use servo_util::str::DOMString;
#[deriving(Encodable)]
pub struct DOMImplementation {
pub owner: JS<Window>,
pub reflector_: Reflector,
owner: JS<Window>,
reflector_: Reflector,
}
impl DOMImplementation {

View file

@ -48,7 +48,7 @@ pub enum EventTypeId {
#[deriving(Encodable)]
pub struct Event {
pub type_id: EventTypeId,
pub reflector_: Reflector,
reflector_: Reflector,
pub current_target: Cell<Option<JS<EventTarget>>>,
pub target: Cell<Option<JS<EventTarget>>>,
type_: Traceable<RefCell<DOMString>>,
@ -61,7 +61,7 @@ pub struct Event {
pub trusted: Traceable<Cell<bool>>,
pub dispatching: Traceable<Cell<bool>>,
pub initialized: Traceable<Cell<bool>>,
pub timestamp: u64,
timestamp: u64,
}
impl Event {

View file

@ -60,7 +60,7 @@ pub struct EventListenerEntry {
#[deriving(Encodable)]
pub struct EventTarget {
pub type_id: EventTargetTypeId,
pub reflector_: Reflector,
reflector_: Reflector,
handlers: Traceable<RefCell<HashMap<DOMString, Vec<EventListenerEntry>>>>,
}

View file

@ -25,10 +25,10 @@ pub enum FormDatum {
#[deriving(Encodable)]
pub struct FormData {
pub data: Traceable<RefCell<HashMap<DOMString, Vec<FormDatum>>>>,
pub reflector_: Reflector,
pub window: JS<Window>,
pub form: Option<JS<HTMLFormElement>>
data: Traceable<RefCell<HashMap<DOMString, Vec<FormDatum>>>>,
reflector_: Reflector,
window: JS<Window>,
form: Option<JS<HTMLFormElement>>
}
impl FormData {

View file

@ -32,9 +32,9 @@ pub enum CollectionTypeId {
#[deriving(Encodable)]
pub struct HTMLCollection {
pub collection: CollectionTypeId,
pub reflector_: Reflector,
pub window: JS<Window>,
collection: CollectionTypeId,
reflector_: Reflector,
window: JS<Window>,
}
impl HTMLCollection {

View file

@ -16,8 +16,8 @@ use serialize::{Encoder, Encodable};
#[deriving(Encodable)]
pub struct Location {
pub reflector_: Reflector, //XXXjdm cycle: window->Location->window
pub page: Rc<Page>,
reflector_: Reflector, //XXXjdm cycle: window->Location->window
page: Rc<Page>,
}
impl Location {

View file

@ -16,9 +16,9 @@ pub enum NodeListType {
#[deriving(Encodable)]
pub struct NodeList {
pub list_type: NodeListType,
pub reflector_: Reflector,
pub window: JS<Window>
list_type: NodeListType,
reflector_: Reflector,
window: JS<Window>
}
impl NodeList {

View file

@ -13,8 +13,8 @@ pub type DOMHighResTimeStamp = f64;
#[deriving(Encodable)]
pub struct Performance {
pub reflector_: Reflector,
pub timing: JS<PerformanceTiming>,
reflector_: Reflector,
timing: JS<PerformanceTiming>,
}
impl Performance {

View file

@ -9,9 +9,9 @@ use dom::window::Window;
#[deriving(Encodable)]
pub struct PerformanceTiming {
pub reflector_: Reflector,
pub navigationStart: u64,
pub navigationStartPrecise: f64,
reflector_: Reflector,
navigationStart: u64,
navigationStartPrecise: f64,
}
impl PerformanceTiming {

View file

@ -18,8 +18,8 @@ use std::cell::Cell;
#[deriving(Encodable)]
pub struct UIEvent {
pub event: Event,
pub view: Cell<Option<JS<Window>>>,
pub detail: Traceable<Cell<i32>>
view: Cell<Option<JS<Window>>>,
detail: Traceable<Cell<i32>>
}
impl UIEventDerived for Event {

View file

@ -10,9 +10,9 @@ use std::cell::Cell;
#[deriving(Encodable)]
pub struct ValidityState {
pub reflector_: Reflector,
pub window: Cell<JS<Window>>,
pub state: u8,
reflector_: Reflector,
window: Cell<JS<Window>>,
state: u8,
}
impl ValidityState {

View file

@ -48,9 +48,9 @@ pub struct TimerId(i32);
#[deriving(Encodable)]
pub struct TimerHandle {
pub handle: TimerId,
handle: TimerId,
pub data: TimerData,
pub cancel_chan: Untraceable<Option<Sender<()>>>,
cancel_chan: Untraceable<Option<Sender<()>>>,
}
impl Hash for TimerId {
@ -68,18 +68,18 @@ impl TimerHandle {
#[deriving(Encodable)]
pub struct Window {
pub eventtarget: EventTarget,
eventtarget: EventTarget,
pub script_chan: ScriptChan,
pub console: Cell<Option<JS<Console>>>,
pub location: Cell<Option<JS<Location>>>,
pub navigator: Cell<Option<JS<Navigator>>>,
console: Cell<Option<JS<Console>>>,
location: Cell<Option<JS<Location>>>,
navigator: Cell<Option<JS<Navigator>>>,
pub image_cache_task: ImageCacheTask,
pub active_timers: Traceable<RefCell<HashMap<TimerId, TimerHandle>>>,
pub next_timer_handle: Traceable<Cell<i32>>,
pub compositor: Untraceable<Box<ScriptListener>>,
next_timer_handle: Traceable<Cell<i32>>,
compositor: Untraceable<Box<ScriptListener>>,
pub browser_context: Traceable<RefCell<Option<BrowserContext>>>,
pub page: Rc<Page>,
pub performance: Cell<Option<JS<Performance>>>,
performance: Cell<Option<JS<Performance>>>,
pub navigationStart: u64,
pub navigationStartPrecise: f64,
}