Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Recascade the document instead of using the dirty_on_viewport_size_change bit #18268

Merged
merged 4 commits into from Aug 29, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

style: Recascade the document instead of using the dirty_on_viewport_…

…percentage bit.
  • Loading branch information
emilio committed Aug 28, 2017
commit 6e9a96a6f869c2514ab4d44a5ea5cc24289afb84
@@ -1167,27 +1167,8 @@ impl LayoutThread {
.unwrap();
}
if had_used_viewport_units {
let mut iter = element.as_node().traverse_preorder();

let mut next = iter.next();
while let Some(node) = next {
if node.needs_dirty_on_viewport_size_changed() {
let el = node.as_element().unwrap();
if let Some(mut d) = element.mutate_data() {
if d.has_styles() {
// FIXME(emilio): This only needs to recascade,
// afaict.
d.restyle.hint.insert(RestyleHint::restyle_subtree());
}
}
if let Some(p) = el.parent_element() {
unsafe { p.note_dirty_descendant() };
}

next = iter.next_skipping_children();
} else {
next = iter.next();
}
if let Some(mut data) = element.mutate_data() {
data.restyle.hint.insert(RestyleHint::recascade_subtree());
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.