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

@ -346,6 +346,10 @@ pub struct BuildDisplayList<'a> {
impl<'a> BuildDisplayList<'a> {
#[inline]
pub fn traverse(&mut self, flow: &mut dyn Flow) {
if flow.has_non_invertible_transform() {
return;
}
let parent_stacking_context_id = self.state.current_stacking_context_id;
self.state.current_stacking_context_id = flow.base().stacking_context_id;