aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/element.rs
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis@debethencourt.com>2013-09-19 19:01:58 -0400
committerLuis de Bethencourt <luis@debethencourt.com>2013-09-19 19:39:38 -0400
commitcfd726f7d6f9ddae310fa247f38f4e407799ba9f (patch)
tree2a55c78ed356cb9a505d3490e56c89c274d439a2 /src/components/script/dom/element.rs
parent2dbd065d91b19924ada276249ae9997bf4496e31 (diff)
downloadservo-cfd726f7d6f9ddae310fa247f38f4e407799ba9f.tar.gz
servo-cfd726f7d6f9ddae310fa247f38f4e407799ba9f.zip
Rename the node field of the DOM node hierarchy
Renamed the Node elements Fixes #924
Diffstat (limited to 'src/components/script/dom/element.rs')
-rw-r--r--src/components/script/dom/element.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/components/script/dom/element.rs b/src/components/script/dom/element.rs
index 9897f63b61b..32b5e8e9207 100644
--- a/src/components/script/dom/element.rs
+++ b/src/components/script/dom/element.rs
@@ -22,7 +22,7 @@ use std::str::eq_slice;
use std::ascii::StrAsciiExt;
pub struct Element {
- element: Node<ScriptView>,
+ node: Node<ScriptView>,
tag_name: ~str, // TODO: This should be an atom, not a ~str.
attrs: ~[Attr],
style_attribute: Option<Stylesheet>,
@@ -30,7 +30,7 @@ pub struct Element {
impl CacheableWrapper for Element {
fn get_wrappercache(&mut self) -> &mut WrapperCache {
- self.element.get_wrappercache()
+ self.node.get_wrappercache()
}
fn wrap_object_shared(@mut self, _cx: *JSContext, _scope: *JSObject) -> *JSObject {
@@ -40,7 +40,7 @@ impl CacheableWrapper for Element {
impl BindingObject for Element {
fn GetParentObject(&self, cx: *JSContext) -> Option<@mut CacheableWrapper> {
- self.element.GetParentObject(cx)
+ self.node.GetParentObject(cx)
}
}
@@ -121,7 +121,7 @@ pub enum ElementTypeId {
impl<'self> Element {
pub fn new(type_id: ElementTypeId, tag_name: ~str) -> Element {
Element {
- element: Node::new(ElementNodeTypeId(type_id)),
+ node: Node::new(ElementNodeTypeId(type_id)),
tag_name: tag_name,
attrs: ~[],
style_attribute: None,
@@ -180,14 +180,14 @@ impl<'self> Element {
_ => ()
}
- match self.element.owner_doc {
+ match self.node.owner_doc {
Some(owner) => do owner.with_base |owner| { owner.content_changed() },
None => {}
}
}
fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {
- let doc = self.element.owner_doc.unwrap();
+ let doc = self.node.owner_doc.unwrap();
let win = doc.with_base(|doc| doc.window.unwrap());
let cx = win.page.js_info.get_ref().js_compartment.cx.ptr;
let cache = win.get_wrappercache();
@@ -276,7 +276,7 @@ impl Element {
}
pub fn GetClientRects(&self, abstract_self: AbstractNode<ScriptView>) -> @mut ClientRectList {
- let (rects, cx, scope) = match self.element.owner_doc {
+ let (rects, cx, scope) = match self.node.owner_doc {
Some(doc) => {
match doc.with_base(|doc| doc.window) {
Some(win) => {
@@ -318,7 +318,7 @@ impl Element {
}
pub fn GetBoundingClientRect(&self, abstract_self: AbstractNode<ScriptView>) -> @mut ClientRect {
- match self.element.owner_doc {
+ match self.node.owner_doc {
Some(doc) => {
match doc.with_base(|doc| doc.window) {
Some(win) => {