aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/node.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-09-06 16:46:07 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-09-06 16:46:07 -0400
commit572d33fa14834f4894574490279eef8a1bfafc2c (patch)
treef2c6f1231c27efbcb328e29d13ea88a8931c409f /src/components/script/dom/node.rs
parent7cf0da6b8a2794d4c1146fec9cceec0106e7fe2e (diff)
parent375e475f99e8767fd2cc7c5f67e3a8e7f15760a8 (diff)
downloadservo-572d33fa14834f4894574490279eef8a1bfafc2c.tar.gz
servo-572d33fa14834f4894574490279eef8a1bfafc2c.zip
Merge pull request #3210 from seanmonstar/private-node-type-id
make Node.type_id field private, access through type_id()
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r--src/components/script/dom/node.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index bf629122605..96ee5f62ba2 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -73,7 +73,7 @@ pub struct Node {
pub eventtarget: EventTarget,
/// The type of node that this is.
- pub type_id: NodeTypeId,
+ type_id: NodeTypeId,
/// The parent of this node.
parent_node: Cell<Option<JS<Node>>>,
@@ -762,6 +762,7 @@ pub trait RawLayoutNodeHelpers {
unsafe fn get_hover_state_for_layout(&self) -> bool;
unsafe fn get_disabled_state_for_layout(&self) -> bool;
unsafe fn get_enabled_state_for_layout(&self) -> bool;
+ fn type_id_for_layout(&self) -> NodeTypeId;
}
impl RawLayoutNodeHelpers for Node {
@@ -774,6 +775,10 @@ impl RawLayoutNodeHelpers for Node {
unsafe fn get_enabled_state_for_layout(&self) -> bool {
(*self.unsafe_get_flags()).contains(InEnabledState)
}
+
+ fn type_id_for_layout(&self) -> NodeTypeId {
+ self.type_id
+ }
}