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:
Emilio Cobos Álvarez 2016-08-11 12:32:28 -07:00
parent 173ec260e6
commit 63d9f2f56e
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 1 additions and 3 deletions

View file

@ -236,6 +236,7 @@ pub trait TElement : PartialEq + Sized + Copy + Clone + ElementExt + Presentatio
unsafe { node.set_dirty(true); }
// XXX(emilio): For now, dirty implies dirty descendants if found.
} else if hint.contains(RESTYLE_DESCENDANTS) {
unsafe { node.set_dirty_descendants(true); }
let mut current = node.first_child();
while let Some(node) = current {
unsafe { node.set_dirty(true); }

View file

@ -1,3 +0,0 @@
[flexbox_columns.htm]
type: reftest
expected: FAIL