mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
make Node.type_id field private
This commit is contained in:
parent
64a9075535
commit
375e475f99
3 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue