mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
style: Fix the handling of the RESTYLE_DESCENDANTS hint.
This was the underlying cause of the restyle_hints_state.html failure. It was uncovered only when fixing the HAS_EDGE_CHILD_SELECTOR flags because this was the series of events happening. * <script> starts executing. * All the restyle hint processing takes place. * <script> ends executing, gets appended to the body (I think this is also a bug). * <body> receives children_changed notification, with an Append mutation. * <body> had the HAS_EDGE_CHILD_SELECTOR flag, so due to its bogus value, it restyled the whole tree after <body>, fixing any mishandling of restyle hints.
This commit is contained in:
parent
173ec260e6
commit
63d9f2f56e
2 changed files with 1 additions and 3 deletions
|
@ -236,6 +236,7 @@ pub trait TElement : PartialEq + Sized + Copy + Clone + ElementExt + Presentatio
|
||||||
unsafe { node.set_dirty(true); }
|
unsafe { node.set_dirty(true); }
|
||||||
// XXX(emilio): For now, dirty implies dirty descendants if found.
|
// XXX(emilio): For now, dirty implies dirty descendants if found.
|
||||||
} else if hint.contains(RESTYLE_DESCENDANTS) {
|
} else if hint.contains(RESTYLE_DESCENDANTS) {
|
||||||
|
unsafe { node.set_dirty_descendants(true); }
|
||||||
let mut current = node.first_child();
|
let mut current = node.first_child();
|
||||||
while let Some(node) = current {
|
while let Some(node) = current {
|
||||||
unsafe { node.set_dirty(true); }
|
unsafe { node.set_dirty(true); }
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[flexbox_columns.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue