mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Merge pull request #3051 from metajack/fix-nodeflags-for-layout
Fix the NodeFlags methods that are called by layout.
This commit is contained in:
commit
cc0b419c20
1 changed files with 7 additions and 3 deletions
|
@ -782,13 +782,13 @@ pub trait RawLayoutNodeHelpers {
|
||||||
|
|
||||||
impl RawLayoutNodeHelpers for Node {
|
impl RawLayoutNodeHelpers for Node {
|
||||||
unsafe fn get_hover_state_for_layout(&self) -> bool {
|
unsafe fn get_hover_state_for_layout(&self) -> bool {
|
||||||
self.flags.deref().borrow().contains(InHoverState)
|
(*self.unsafe_get_flags()).contains(InHoverState)
|
||||||
}
|
}
|
||||||
unsafe fn get_disabled_state_for_layout(&self) -> bool {
|
unsafe fn get_disabled_state_for_layout(&self) -> bool {
|
||||||
self.flags.deref().borrow().contains(InDisabledState)
|
(*self.unsafe_get_flags()).contains(InDisabledState)
|
||||||
}
|
}
|
||||||
unsafe fn get_enabled_state_for_layout(&self) -> bool {
|
unsafe fn get_enabled_state_for_layout(&self) -> bool {
|
||||||
self.flags.deref().borrow().contains(InEnabledState)
|
(*self.unsafe_get_flags()).contains(InEnabledState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1414,6 +1414,10 @@ impl Node {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub unsafe fn unsafe_get_flags(&self) -> *const NodeFlags {
|
||||||
|
mem::transmute(&self.flags)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> NodeMethods for JSRef<'a, Node> {
|
impl<'a> NodeMethods for JSRef<'a, Node> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue