mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Auto merge of #5589 - mbrubeck:dirty, r=pcwalton
This fixes a bug where styles are not recalculated immediately when an element's hover or focus state changes. I'm not sure how to write an automated test for this. r? @glennw or @pcwalton
This commit is contained in:
commit
a745dda863
1 changed files with 4 additions and 2 deletions
|
@ -623,7 +623,8 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_hover_state(self, state: bool) {
|
fn set_hover_state(self, state: bool) {
|
||||||
self.set_flag(IN_HOVER_STATE, state)
|
self.set_flag(IN_HOVER_STATE, state);
|
||||||
|
self.dirty(NodeDamage::OtherNodeDamage);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_focus_state(self) -> bool {
|
fn get_focus_state(self) -> bool {
|
||||||
|
@ -631,7 +632,8 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_focus_state(self, state: bool) {
|
fn set_focus_state(self, state: bool) {
|
||||||
self.set_flag(IN_FOCUS_STATE, state)
|
self.set_flag(IN_FOCUS_STATE, state);
|
||||||
|
self.dirty(NodeDamage::OtherNodeDamage);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_disabled_state(self) -> bool {
|
fn get_disabled_state(self) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue