diff options
author | Josh Matthews <josh@joshmatthews.net> | 2020-06-02 16:50:40 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2020-06-09 11:27:23 -0400 |
commit | 08427ccee5e9e9d94155c1030d016ffd8ab87dd6 (patch) | |
tree | 1bd7e7d8312af3df80c224d45454378edbb6c1a1 /components/layout/inline.rs | |
parent | 4094d1632327e9b95e6a93b91b91bbb38dabbfc6 (diff) | |
download | servo-08427ccee5e9e9d94155c1030d016ffd8ab87dd6.tar.gz servo-08427ccee5e9e9d94155c1030d016ffd8ab87dd6.zip |
layout: Don't built stacking contexts or display lists for empty blocks.
Diffstat (limited to 'components/layout/inline.rs')
-rw-r--r-- | components/layout/inline.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/layout/inline.rs b/components/layout/inline.rs index dfdb20e309b..ee9980c4f1a 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -1871,6 +1871,11 @@ impl Flow for InlineFlow { let previous_cb_clipping_and_scrolling = state.containing_block_clipping_and_scrolling; for fragment in self.fragments.fragments.iter_mut() { + // If a particular fragment would establish a stacking context but has a transform + // applied that causes it to take up no space, we can skip it entirely. + if fragment.has_non_invertible_transform() { + continue; + } state.containing_block_clipping_and_scrolling = previous_cb_clipping_and_scrolling; let abspos_containing_block = fragment.style.get_box().position != Position::Static; |