Skip to content

Commit

Permalink
style: Fix the handling of the RESTYLE_DESCENDANTS hint.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
emilio committed Aug 17, 2016
1 parent 173ec26 commit 63d9f2f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions components/style/dom.rs
Expand Up @@ -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); }
Expand Down

This file was deleted.

0 comments on commit 63d9f2f

Please sign in to comment.