mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Bug 1322945 - Only assert against _restyling_ roots with later siblings. r=heycam
The problem is with restyles, so we should leave the door open on initial styling if that ends up making sense. MozReview-Commit-ID: 5GOFBEUZhDe
This commit is contained in:
parent
92d380c399
commit
851568f59e
1 changed files with 3 additions and 3 deletions
|
@ -157,11 +157,11 @@ pub trait DomTraversalContext<N: TNode> {
|
|||
// we need a special case for the root.
|
||||
//
|
||||
// Expanding snapshots here may create a LATER_SIBLINGS restyle hint, which
|
||||
// we will drop on the floor. This is fine, because we don't traverse roots
|
||||
// with siblings.
|
||||
debug_assert!(root.next_sibling_element().is_none());
|
||||
// we will drop on the floor. To prevent missed restyles, we assert against
|
||||
// restyling a root with later siblings.
|
||||
if let Some(mut data) = root.mutate_data() {
|
||||
if let Some(r) = data.as_restyle_mut() {
|
||||
debug_assert!(root.next_sibling_element().is_none());
|
||||
let _later_siblings = r.expand_snapshot(root, stylist);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue