Auto merge of #13841 - bholley:has_changed, r=emilio

Simplify TNode a bit, removing has_changed from style

A couple of changes here:
* Remove the option to unset with the dirty bit settes.
* Add an explicit API for setting text node style.
* Hoist has_changed handling into the restyle damage setter and text node style setter.
* Make set_style take a non-Option.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13841)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-20 12:40:58 -05:00 committed by GitHub
commit 2e9aaa45dc
8 changed files with 70 additions and 81 deletions

View file

@ -1135,12 +1135,12 @@ impl LayoutThread {
while let Some(node) = next {
if node.needs_dirty_on_viewport_size_changed() {
// NB: The dirty bit is propagated down the tree.
unsafe { node.set_dirty(true); }
unsafe { node.set_dirty(); }
let mut current = node.parent_node();
while let Some(node) = current {
if node.has_dirty_descendants() { break; }
unsafe { node.set_dirty_descendants(true); }
unsafe { node.set_dirty_descendants(); }
current = node.parent_node();
}
@ -1161,7 +1161,7 @@ impl LayoutThread {
if needs_dirtying {
// NB: The dirty flag is propagated down during the restyle
// process.
node.set_dirty(true);
node.set_dirty();
}
}
if needs_reflow {