layout: Don't built stacking contexts or display lists for empty blocks.

This commit is contained in:
Josh Matthews 2020-06-02 16:50:40 -04:00
parent 4094d16323
commit 08427ccee5
6 changed files with 50 additions and 1 deletions

View file

@ -217,6 +217,12 @@ impl StackingContext {
parent_clipping_and_scrolling: ClippingAndScrolling,
established_reference_frame: Option<ClipScrollNodeIndex>,
) -> StackingContext {
if let Some(ref t) = transform {
// These are used as scale values by webrender, and it can't handle
// divisors of 0 when scaling.
assert_ne!(t.m11, 0.);
assert_ne!(t.m22, 0.);
}
StackingContext {
id,
context_type,