aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/node.rs
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno.d@partner.samsung.com>2014-06-19 00:03:02 -0400
committerBruno de Oliveira Abinader <bruno.d@partner.samsung.com>2014-07-23 09:12:55 -0400
commit74577509015339a7e1fd37b62c614fc999dda86b (patch)
treec10b894e4f9911aa67b66a39b21b6147fdc4aaee /src/components/script/dom/node.rs
parent6bdafc8a59fbb6fcce079d2fadae65abb3dc2272 (diff)
downloadservo-74577509015339a7e1fd37b62c614fc999dda86b.tar.gz
servo-74577509015339a7e1fd37b62c614fc999dda86b.zip
Prefer direct member access than type_id()
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r--src/components/script/dom/node.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index 1a82401f765..e07190bc8f5 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -421,7 +421,7 @@ impl<'a> NodeHelpers for JSRef<'a, Node> {
/// Returns a string that describes this node.
fn debug_str(&self) -> String {
- format!("{:?}", self.type_id())
+ format!("{:?}", self.type_id)
}
fn is_in_doc(&self) -> bool {
@@ -465,12 +465,12 @@ impl<'a> NodeHelpers for JSRef<'a, Node> {
#[inline]
fn is_document(&self) -> bool {
- self.type_id() == DocumentNodeTypeId
+ self.type_id == DocumentNodeTypeId
}
#[inline]
fn is_anchor_element(&self) -> bool {
- self.type_id() == ElementNodeTypeId(HTMLAnchorElementTypeId)
+ self.type_id == ElementNodeTypeId(HTMLAnchorElementTypeId)
}
#[inline]
@@ -480,7 +480,7 @@ impl<'a> NodeHelpers for JSRef<'a, Node> {
#[inline]
fn is_text(&self) -> bool {
- self.type_id() == TextNodeTypeId
+ self.type_id == TextNodeTypeId
}
fn get_hover_state(&self) -> bool {
@@ -1600,7 +1600,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
fn ReplaceChild(&self, node: &JSRef<Node>, child: &JSRef<Node>) -> Fallible<Temporary<Node>> {
// Step 1.
- match self.type_id() {
+ match self.type_id {
DocumentNodeTypeId |
DocumentFragmentNodeTypeId |
ElementNodeTypeId(..) => (),
@@ -1631,7 +1631,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
}
// Step 6.
- match self.type_id() {
+ match self.type_id {
DocumentNodeTypeId => {
match node.type_id() {
// Step 6.1