From 843df5b5294c864f5efd7d1242a152cf7433886d Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 13 Feb 2020 11:47:47 +0100 Subject: [PATCH 1/3] Add support for a stacking context pass to layout_2020 This adds an intermediary data structure that allows the display list builder to move through the fragment tree in stacking context painting order. Spatial nodes are built during this phase and all display list items are added to the end of the display list. --- components/layout_2020/display_list/mod.rs | 82 +-------- .../display_list/stacking_context.rs | 167 ++++++++++++++++++ components/layout_2020/flow/root.rs | 9 +- 3 files changed, 180 insertions(+), 78 deletions(-) create mode 100644 components/layout_2020/display_list/stacking_context.rs diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index 2e1af55c9db..040c9aed806 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -9,12 +9,9 @@ use crate::replaced::IntrinsicSizes; use embedder_traits::Cursor; use euclid::{Point2D, SideOffsets2D, Size2D}; use gfx::text::glyph::GlyphStore; -use gfx_traits::{combine_id_with_fragment_type, FragmentType}; use mitochondria::OnceCell; use net_traits::image_cache::UsePlaceholder; use std::sync::Arc; -use style::computed_values::overflow_x::T as ComputedOverflow; -use style::computed_values::position::T as ComputedPosition; use style::dom::OpaqueNode; use style::properties::ComputedValues; @@ -24,6 +21,7 @@ use webrender_api::{self as wr, units}; mod background; mod gradient; +mod stacking_context; #[derive(Clone, Copy)] pub struct WebRenderImageInfo { @@ -83,15 +81,7 @@ impl Fragment { ) { match self { Fragment::Box(b) => BuilderForBoxFragment::new(b, containing_block).build(builder), - Fragment::Anonymous(a) => { - let rect = a - .rect - .to_physical(a.mode, containing_block) - .translate(containing_block.origin.to_vector()); - for child in &a.children { - child.build_display_list(builder, &rect) - } - }, + Fragment::Anonymous(_) => {}, Fragment::Text(t) => { builder.is_contentful = true; let rect = t @@ -246,71 +236,9 @@ impl<'a> BuilderForBoxFragment<'a> { } fn build(&mut self, builder: &mut DisplayListBuilder) { - builder.clipping_and_scrolling_scope(|builder| { - self.adjust_spatial_id_for_positioning(builder); - self.build_hit_test(builder); - self.build_background(builder); - self.build_border(builder); - - // We want to build the scroll frame after the background and border, because - // they shouldn't scroll with the rest of the box content. - self.build_scroll_frame_if_necessary(builder); - - let content_rect = self - .fragment - .content_rect - .to_physical(self.fragment.style.writing_mode, self.containing_block) - .translate(self.containing_block.origin.to_vector()); - for child in &self.fragment.children { - child.build_display_list(builder, &content_rect) - } - }); - } - - fn adjust_spatial_id_for_positioning(&self, builder: &mut DisplayListBuilder) { - if self.fragment.style.get_box().position != ComputedPosition::Fixed { - return; - } - - // TODO(mrobinson): Eventually this should use the spatial id of the reference - // frame that is the parent of this one once we have full support for stacking - // contexts and transforms. - builder.current_space_and_clip.spatial_id = - wr::SpatialId::root_reference_frame(builder.wr.pipeline_id); - } - - fn build_scroll_frame_if_necessary(&self, builder: &mut DisplayListBuilder) { - let overflow_x = self.fragment.style.get_box().overflow_x; - let overflow_y = self.fragment.style.get_box().overflow_y; - let original_scroll_and_clip_info = builder.current_space_and_clip; - if overflow_x != ComputedOverflow::Visible || overflow_y != ComputedOverflow::Visible { - // TODO(mrobinson): We should use the correct fragment type, once we generate - // fragments from ::before and ::after generated content selectors. - let id = combine_id_with_fragment_type( - self.fragment.tag.id() as usize, - FragmentType::FragmentBody, - ) as u64; - let external_id = wr::ExternalScrollId(id, builder.wr.pipeline_id); - - let sensitivity = if ComputedOverflow::Hidden == overflow_x && - ComputedOverflow::Hidden == overflow_y - { - wr::ScrollSensitivity::Script - } else { - wr::ScrollSensitivity::ScriptAndInputEvents - }; - - builder.current_space_and_clip = builder.wr.define_scroll_frame( - &original_scroll_and_clip_info, - Some(external_id), - self.fragment.scrollable_overflow().to_webrender(), - *self.padding_rect(), - vec![], // complex_clips - None, // image_mask - sensitivity, - wr::units::LayoutVector2D::zero(), - ); - } + self.build_hit_test(builder); + self.build_background(builder); + self.build_border(builder); } fn build_hit_test(&self, builder: &mut DisplayListBuilder) { diff --git a/components/layout_2020/display_list/stacking_context.rs b/components/layout_2020/display_list/stacking_context.rs new file mode 100644 index 00000000000..ee73d4afa1c --- /dev/null +++ b/components/layout_2020/display_list/stacking_context.rs @@ -0,0 +1,167 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use crate::display_list::DisplayListBuilder; +use crate::fragments::{AnonymousFragment, BoxFragment, Fragment}; +use crate::geom::{PhysicalRect, ToWebRender}; +use gfx_traits::{combine_id_with_fragment_type, FragmentType}; +use std::default::Default; +use style::computed_values::overflow_x::T as ComputedOverflow; +use style::computed_values::position::T as ComputedPosition; +use style::values::computed::Length; +use webrender_api::units::LayoutVector2D; +use webrender_api::{ExternalScrollId, ScrollSensitivity, SpaceAndClipInfo, SpatialId}; + +pub(crate) struct StackingContextFragment<'a> { + space_and_clip: SpaceAndClipInfo, + containing_block: PhysicalRect, + fragment: &'a Fragment, +} + +#[derive(Default)] +pub(crate) struct StackingContext<'a> { + fragments: Vec>, +} + +impl Fragment { + pub(crate) fn build_stacking_context_tree<'a>( + &'a self, + builder: &mut DisplayListBuilder, + containing_block: &PhysicalRect, + stacking_context: &mut StackingContext<'a>, + ) { + match self { + Fragment::Box(fragment) => fragment.build_stacking_context_tree( + self, + builder, + containing_block, + stacking_context, + ), + Fragment::Anonymous(fragment) => { + fragment.build_stacking_context_tree(builder, containing_block, stacking_context) + }, + Fragment::Text(_) | Fragment::Image(_) => { + stacking_context.fragments.push(StackingContextFragment { + space_and_clip: builder.current_space_and_clip, + containing_block: *containing_block, + fragment: self, + }); + }, + } + } +} + +impl BoxFragment { + fn build_stacking_context_tree<'a>( + &'a self, + fragment: &'a Fragment, + builder: &mut DisplayListBuilder, + containing_block: &PhysicalRect, + stacking_context: &mut StackingContext<'a>, + ) { + builder.clipping_and_scrolling_scope(|builder| { + self.adjust_spatial_id_for_positioning(builder); + + stacking_context.fragments.push(StackingContextFragment { + space_and_clip: builder.current_space_and_clip, + containing_block: *containing_block, + fragment, + }); + + // We want to build the scroll frame after the background and border, because + // they shouldn't scroll with the rest of the box content. + self.build_scroll_frame_if_necessary(builder, containing_block); + + let new_containing_block = self + .content_rect + .to_physical(self.style.writing_mode, containing_block) + .translate(containing_block.origin.to_vector()); + for child in &self.children { + child.build_stacking_context_tree(builder, &new_containing_block, stacking_context); + } + }); + } + + fn adjust_spatial_id_for_positioning(&self, builder: &mut DisplayListBuilder) { + if self.style.get_box().position != ComputedPosition::Fixed { + return; + } + + // TODO(mrobinson): Eventually this should use the spatial id of the reference + // frame that is the parent of this one once we have full support for stacking + // contexts and transforms. + builder.current_space_and_clip.spatial_id = + SpatialId::root_reference_frame(builder.wr.pipeline_id); + } + + fn build_scroll_frame_if_necessary( + &self, + builder: &mut DisplayListBuilder, + containing_block: &PhysicalRect, + ) { + let overflow_x = self.style.get_box().overflow_x; + let overflow_y = self.style.get_box().overflow_y; + let original_scroll_and_clip_info = builder.current_space_and_clip; + if overflow_x != ComputedOverflow::Visible || overflow_y != ComputedOverflow::Visible { + // TODO(mrobinson): We should use the correct fragment type, once we generate + // fragments from ::before and ::after generated content selectors. + let id = + combine_id_with_fragment_type(self.tag.id() as usize, FragmentType::FragmentBody) + as u64; + let external_id = ExternalScrollId(id, builder.wr.pipeline_id); + + let sensitivity = if ComputedOverflow::Hidden == overflow_x && + ComputedOverflow::Hidden == overflow_y + { + ScrollSensitivity::Script + } else { + ScrollSensitivity::ScriptAndInputEvents + }; + + let padding_rect = self + .padding_rect() + .to_physical(self.style.writing_mode, containing_block) + .translate(containing_block.origin.to_vector()) + .to_webrender(); + builder.current_space_and_clip = builder.wr.define_scroll_frame( + &original_scroll_and_clip_info, + Some(external_id), + self.scrollable_overflow().to_webrender(), + padding_rect, + vec![], // complex_clips + None, // image_mask + sensitivity, + LayoutVector2D::zero(), + ); + } + } +} + +impl AnonymousFragment { + fn build_stacking_context_tree<'a>( + &'a self, + builder: &mut DisplayListBuilder, + containing_block: &PhysicalRect, + stacking_context: &mut StackingContext<'a>, + ) { + let new_containing_block = self + .rect + .to_physical(self.mode, containing_block) + .translate(containing_block.origin.to_vector()); + for child in &self.children { + child.build_stacking_context_tree(builder, &new_containing_block, stacking_context); + } + } +} + +impl<'a> StackingContext<'a> { + pub(crate) fn build_display_list(&'a self, builder: &'a mut DisplayListBuilder) { + for child in &self.fragments { + builder.current_space_and_clip = child.space_and_clip; + child + .fragment + .build_display_list(builder, &child.containing_block); + } + } +} diff --git a/components/layout_2020/flow/root.rs b/components/layout_2020/flow/root.rs index 454177c789e..0cfccf481f5 100644 --- a/components/layout_2020/flow/root.rs +++ b/components/layout_2020/flow/root.rs @@ -181,9 +181,16 @@ impl BoxTreeRoot { impl FragmentTreeRoot { pub fn build_display_list(&self, builder: &mut crate::display_list::DisplayListBuilder) { + let mut stacking_context = Default::default(); for fragment in &self.children { - fragment.build_display_list(builder, &self.initial_containing_block) + fragment.build_stacking_context_tree( + builder, + &self.initial_containing_block, + &mut stacking_context, + ); } + + stacking_context.build_display_list(builder); } pub fn print(&self) { From 318cc16799d806f368c30a4c29cce637b5c9fd5b Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 13 Feb 2020 17:24:22 +0100 Subject: [PATCH 2/3] Unskip z-order WPT tests on layout_2020 --- tests/wpt/include-layout-2020.ini | 4 ++++ .../css/CSS2/zindex/stack-floats-001.xht.ini | 2 ++ .../css/CSS2/zindex/stack-floats-002.xht.ini | 2 ++ .../css/CSS2/zindex/stack-floats-003.xht.ini | 2 ++ .../css/CSS2/zindex/stack-floats-004.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-015.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-016.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-017.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-018.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zindex/z-index-019.xht.ini | 2 ++ .../css/CSS2/zindex/z-index-abspos-001.xht.ini | 2 ++ .../css/CSS2/zindex/z-index-abspos-002.xht.ini | 2 ++ .../css/CSS2/zindex/z-index-abspos-003.xht.ini | 2 ++ .../css/CSS2/zindex/z-index-abspos-004.xht.ini | 2 ++ .../css/CSS2/zindex/z-index-abspos-005.xht.ini | 2 ++ .../css/CSS2/zindex/z-index-abspos-007.xht.ini | 2 ++ .../css/CSS2/zindex/z-index-dynamic-001.xht.ini | 2 ++ .../metadata-layout-2020/css/CSS2/zorder/z-index-020.xht.ini | 2 ++ 28 files changed, 58 insertions(+) create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-002.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-003.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-004.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-015.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-016.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-017.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-018.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-019.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-002.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-003.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-004.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-005.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-007.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-dynamic-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zorder/z-index-020.xht.ini diff --git a/tests/wpt/include-layout-2020.ini b/tests/wpt/include-layout-2020.ini index eb6b04d3080..3e64f798792 100644 --- a/tests/wpt/include-layout-2020.ini +++ b/tests/wpt/include-layout-2020.ini @@ -13,6 +13,10 @@ skip: true skip: false [box-display] skip: false + [zindex] + skip: false + [zorder] + skip: false [css-backgrounds] skip: false [cssom-view] diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-001.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-001.xht.ini new file mode 100644 index 00000000000..51b3c04a7f4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-001.xht.ini @@ -0,0 +1,2 @@ +[stack-floats-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-002.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-002.xht.ini new file mode 100644 index 00000000000..413e005eeda --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-002.xht.ini @@ -0,0 +1,2 @@ +[stack-floats-002.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-003.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-003.xht.ini new file mode 100644 index 00000000000..1eb716de2a9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-003.xht.ini @@ -0,0 +1,2 @@ +[stack-floats-003.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-004.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-004.xht.ini new file mode 100644 index 00000000000..0e8029cf3cb --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/stack-floats-004.xht.ini @@ -0,0 +1,2 @@ +[stack-floats-004.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini new file mode 100644 index 00000000000..be45426fd17 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini @@ -0,0 +1,2 @@ +[z-index-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini new file mode 100644 index 00000000000..c070fd97625 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini @@ -0,0 +1,2 @@ +[z-index-002.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini new file mode 100644 index 00000000000..e5d8191c167 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini @@ -0,0 +1,2 @@ +[z-index-003.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini new file mode 100644 index 00000000000..ecc9686181b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini @@ -0,0 +1,2 @@ +[z-index-007.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini new file mode 100644 index 00000000000..31bdee6f0aa --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini @@ -0,0 +1,2 @@ +[z-index-008.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini new file mode 100644 index 00000000000..9f81df5a055 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini @@ -0,0 +1,2 @@ +[z-index-009.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini new file mode 100644 index 00000000000..96a53382b48 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini @@ -0,0 +1,2 @@ +[z-index-010.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini new file mode 100644 index 00000000000..b3bfadfe8d8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini @@ -0,0 +1,2 @@ +[z-index-011.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini new file mode 100644 index 00000000000..3dfc42df0f4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini @@ -0,0 +1,2 @@ +[z-index-012.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini new file mode 100644 index 00000000000..ec47f89df87 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini @@ -0,0 +1,2 @@ +[z-index-014.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-015.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-015.xht.ini new file mode 100644 index 00000000000..526b65fe1f6 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-015.xht.ini @@ -0,0 +1,2 @@ +[z-index-015.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-016.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-016.xht.ini new file mode 100644 index 00000000000..f0711265db9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-016.xht.ini @@ -0,0 +1,2 @@ +[z-index-016.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-017.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-017.xht.ini new file mode 100644 index 00000000000..c95651a4c30 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-017.xht.ini @@ -0,0 +1,2 @@ +[z-index-017.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-018.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-018.xht.ini new file mode 100644 index 00000000000..96ee3b9a4bc --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-018.xht.ini @@ -0,0 +1,2 @@ +[z-index-018.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-019.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-019.xht.ini new file mode 100644 index 00000000000..74c4c6da678 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-019.xht.ini @@ -0,0 +1,2 @@ +[z-index-019.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-001.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-001.xht.ini new file mode 100644 index 00000000000..b04bdf766b2 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-001.xht.ini @@ -0,0 +1,2 @@ +[z-index-abspos-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-002.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-002.xht.ini new file mode 100644 index 00000000000..bb6273f48e0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-002.xht.ini @@ -0,0 +1,2 @@ +[z-index-abspos-002.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-003.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-003.xht.ini new file mode 100644 index 00000000000..815ea4bba35 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-003.xht.ini @@ -0,0 +1,2 @@ +[z-index-abspos-003.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-004.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-004.xht.ini new file mode 100644 index 00000000000..d5769066030 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-004.xht.ini @@ -0,0 +1,2 @@ +[z-index-abspos-004.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-005.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-005.xht.ini new file mode 100644 index 00000000000..7c066ff8ff6 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-005.xht.ini @@ -0,0 +1,2 @@ +[z-index-abspos-005.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-007.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-007.xht.ini new file mode 100644 index 00000000000..855e9980a3d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-abspos-007.xht.ini @@ -0,0 +1,2 @@ +[z-index-abspos-007.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-dynamic-001.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-dynamic-001.xht.ini new file mode 100644 index 00000000000..28cc8b1f425 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-dynamic-001.xht.ini @@ -0,0 +1,2 @@ +[z-index-dynamic-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zorder/z-index-020.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zorder/z-index-020.xht.ini new file mode 100644 index 00000000000..e896f829816 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/zorder/z-index-020.xht.ini @@ -0,0 +1,2 @@ +[z-index-020.xht] + expected: FAIL From 4a2787b974833fe4957fa8994700d30916bf3c6e Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 13 Feb 2020 17:22:22 +0100 Subject: [PATCH 3/3] Add initial stacking context paint order support to layout_2020 This adds very rudimentary support for paint order in stacking context. In particular z-index is now handled properly, apart from issues with hoisted fragments. --- components/layout_2020/display_list/mod.rs | 2 +- .../display_list/stacking_context.rs | 252 ++++++++++++++++-- components/layout_2020/flow/root.rs | 4 +- .../properties/longhands/position.mako.rs | 1 - .../css/CSS2/zindex/z-index-001.xht.ini | 2 - .../css/CSS2/zindex/z-index-002.xht.ini | 2 - .../css/CSS2/zindex/z-index-003.xht.ini | 2 - .../css/CSS2/zindex/z-index-007.xht.ini | 2 - .../css/CSS2/zindex/z-index-008.xht.ini | 2 - .../css/CSS2/zindex/z-index-009.xht.ini | 2 - .../css/CSS2/zindex/z-index-010.xht.ini | 2 - .../css/CSS2/zindex/z-index-011.xht.ini | 2 - .../css/CSS2/zindex/z-index-012.xht.ini | 2 - .../css/CSS2/zindex/z-index-014.xht.ini | 2 - .../CSS2/zindex/z-index-dynamic-001.xht.ini | 2 - ...css3-background-origin-border-box.html.ini | 2 - .../position-sticky-stacking-context.html.ini | 2 + .../css/opacity_stacking_context_a.html.ini | 2 + ...osition_relative_painting_order_a.html.ini | 2 - ...ition_relative_stacking_context_a.html.ini | 2 - .../css/transform_stacking_context_a.html.ini | 2 + 21 files changed, 235 insertions(+), 58 deletions(-) delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-dynamic-001.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/css-backgrounds/css3-background-origin-border-box.html.ini create mode 100644 tests/wpt/mozilla/meta-layout-2020/css/css-position-3/position-sticky-stacking-context.html.ini create mode 100644 tests/wpt/mozilla/meta-layout-2020/css/opacity_stacking_context_a.html.ini delete mode 100644 tests/wpt/mozilla/meta-layout-2020/css/position_relative_painting_order_a.html.ini delete mode 100644 tests/wpt/mozilla/meta-layout-2020/css/position_relative_stacking_context_a.html.ini create mode 100644 tests/wpt/mozilla/meta-layout-2020/css/transform_stacking_context_a.html.ini diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index 040c9aed806..eecedd79348 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -21,7 +21,7 @@ use webrender_api::{self as wr, units}; mod background; mod gradient; -mod stacking_context; +pub mod stacking_context; #[derive(Clone, Copy)] pub struct WebRenderImageInfo { diff --git a/components/layout_2020/display_list/stacking_context.rs b/components/layout_2020/display_list/stacking_context.rs index ee73d4afa1c..7715a2f198d 100644 --- a/components/layout_2020/display_list/stacking_context.rs +++ b/components/layout_2020/display_list/stacking_context.rs @@ -6,9 +6,13 @@ use crate::display_list::DisplayListBuilder; use crate::fragments::{AnonymousFragment, BoxFragment, Fragment}; use crate::geom::{PhysicalRect, ToWebRender}; use gfx_traits::{combine_id_with_fragment_type, FragmentType}; -use std::default::Default; +use std::cmp::Ordering; +use std::mem; +use style::computed_values::float::T as ComputedFloat; +use style::computed_values::mix_blend_mode::T as ComputedMixBlendMode; use style::computed_values::overflow_x::T as ComputedOverflow; use style::computed_values::position::T as ComputedPosition; +use style::computed_values::transform_style::T as ComputedTransformStyle; use style::values::computed::Length; use webrender_api::units::LayoutVector2D; use webrender_api::{ExternalScrollId, ScrollSensitivity, SpaceAndClipInfo, SpatialId}; @@ -19,9 +23,96 @@ pub(crate) struct StackingContextFragment<'a> { fragment: &'a Fragment, } -#[derive(Default)] +#[derive(Clone, Copy, Eq, PartialEq)] +pub(crate) enum StackingContextType { + Real, + PseudoPositioned, + PseudoFloat, +} + pub(crate) struct StackingContext<'a> { + /// The type of this StackingContext. Used for collecting and sorting. + context_type: StackingContextType, + + /// The `z-index` for this stacking context. + pub z_index: i32, + + /// Fragments that make up the content of this stacking context. fragments: Vec>, + + /// All non-float stacking context and pseudo stacking context children + /// of this stacking context. + stacking_contexts: Vec>, + + /// All float pseudo stacking context children of this stacking context. + float_stacking_contexts: Vec>, +} + +impl<'a> StackingContext<'a> { + pub(crate) fn new(context_type: StackingContextType, z_index: i32) -> Self { + Self { + context_type, + z_index, + fragments: vec![], + stacking_contexts: vec![], + float_stacking_contexts: vec![], + } + } + + pub(crate) fn sort_stacking_contexts(&mut self) { + self.stacking_contexts.sort_by(|a, b| { + if a.z_index != 0 || b.z_index != 0 { + return a.z_index.cmp(&b.z_index); + } + + match (a.context_type, b.context_type) { + (StackingContextType::PseudoFloat, StackingContextType::PseudoFloat) => { + Ordering::Equal + }, + (StackingContextType::PseudoFloat, _) => Ordering::Less, + (_, StackingContextType::PseudoFloat) => Ordering::Greater, + (_, _) => Ordering::Equal, + } + }); + } + + pub(crate) fn build_display_list(&'a self, builder: &'a mut DisplayListBuilder) { + // Properly order display items that make up a stacking context. "Steps" here + // refer to the steps in CSS 2.1 Appendix E. + // + // TODO(mrobinson): The fragment content of the stacking context needs to be + // organized or sorted into the different sections according to the appropriate + // paint order. + + // Step 3: Positioned descendants with negative z-indices. + let mut child_stacking_contexts = self.stacking_contexts.iter().peekable(); + while child_stacking_contexts + .peek() + .map_or(false, |child| child.z_index < 0) + { + let child_context = child_stacking_contexts.next().unwrap(); + child_context.build_display_list(builder); + } + + // Step 4: Block backgrounds and borders. + for child in &self.fragments { + builder.current_space_and_clip = child.space_and_clip; + child + .fragment + .build_display_list(builder, &child.containing_block); + } + + // Step 5: Floats. + for child_context in &self.float_stacking_contexts { + child_context.build_display_list(builder); + } + + // Step 7, 8 & 9: Inlines that generate stacking contexts and positioned + // descendants with nonnegative, numeric z-indices. + for child_context in child_stacking_contexts { + child_context.build_display_list(builder); + } + } } impl Fragment { @@ -53,6 +144,80 @@ impl Fragment { } impl BoxFragment { + fn get_stacking_context_type(&self) -> Option { + if self.establishes_stacking_context() { + return Some(StackingContextType::Real); + } + + if self.style.get_box().position != ComputedPosition::Static { + return Some(StackingContextType::PseudoPositioned); + } + + if self.style.get_box().float != ComputedFloat::None { + return Some(StackingContextType::PseudoFloat); + } + + None + } + + /// Returns true if this fragment establishes a new stacking context and false otherwise. + fn establishes_stacking_context(&self) -> bool { + if self.style.get_effects().opacity != 1.0 { + return true; + } + + if self.style.get_effects().mix_blend_mode != ComputedMixBlendMode::Normal { + return true; + } + + if self.has_filter_transform_or_perspective() { + return true; + } + + if self.style.get_box().transform_style == ComputedTransformStyle::Preserve3d || + self.style.overrides_transform_style() + { + return true; + } + + // Fixed position and sticky position always create stacking contexts. + // TODO(mrobinson): We need to handle sticky positioning here when we support it. + if self.style.get_box().position == ComputedPosition::Fixed { + return true; + } + + // Statically positioned fragments don't establish stacking contexts if the previous + // conditions are not fulfilled. Furthermore, z-index doesn't apply to statically + // positioned fragments. + if self.style.get_box().position == ComputedPosition::Static { + return false; + } + + // For absolutely and relatively positioned fragments we only establish a stacking + // context if there is a z-index set. + // See https://www.w3.org/TR/CSS2/visuren.html#z-index + !self.style.get_position().z_index.is_auto() + } + + // Get the effective z-index of this fragment. Z-indices only apply to positioned element + // per CSS 2 9.9.1 (http://www.w3.org/TR/CSS2/visuren.html#z-index), so this value may differ + // from the value specified in the style. + fn effective_z_index(&self) -> i32 { + match self.style.get_box().position { + ComputedPosition::Static => {}, + _ => return self.style.get_position().z_index.integer_or(0), + } + + 0 + } + + /// Returns true if this fragment has a filter, transform, or perspective property set. + fn has_filter_transform_or_perspective(&self) -> bool { + // TODO(mrobinson): We need to handle perspective here. + !self.style.get_box().transform.0.is_empty() || + !self.style.get_effects().filter.0.is_empty() + } + fn build_stacking_context_tree<'a>( &'a self, fragment: &'a Fragment, @@ -63,26 +228,70 @@ impl BoxFragment { builder.clipping_and_scrolling_scope(|builder| { self.adjust_spatial_id_for_positioning(builder); - stacking_context.fragments.push(StackingContextFragment { - space_and_clip: builder.current_space_and_clip, - containing_block: *containing_block, + let context_type = match self.get_stacking_context_type() { + Some(context_type) => context_type, + None => { + self.build_stacking_context_tree_for_children( + fragment, + builder, + containing_block, + stacking_context, + ); + return; + }, + }; + + let mut child_stacking_context = + StackingContext::new(context_type, self.effective_z_index()); + self.build_stacking_context_tree_for_children( fragment, - }); + builder, + containing_block, + &mut child_stacking_context, + ); - // We want to build the scroll frame after the background and border, because - // they shouldn't scroll with the rest of the box content. - self.build_scroll_frame_if_necessary(builder, containing_block); - - let new_containing_block = self - .content_rect - .to_physical(self.style.writing_mode, containing_block) - .translate(containing_block.origin.to_vector()); - for child in &self.children { - child.build_stacking_context_tree(builder, &new_containing_block, stacking_context); + if context_type == StackingContextType::Real { + child_stacking_context.sort_stacking_contexts(); + stacking_context + .stacking_contexts + .push(child_stacking_context); + } else { + let mut children = + mem::replace(&mut child_stacking_context.stacking_contexts, Vec::new()); + stacking_context + .stacking_contexts + .push(child_stacking_context); + stacking_context.stacking_contexts.append(&mut children); } }); } + fn build_stacking_context_tree_for_children<'a>( + &'a self, + fragment: &'a Fragment, + builder: &mut DisplayListBuilder, + containing_block: &PhysicalRect, + stacking_context: &mut StackingContext<'a>, + ) { + stacking_context.fragments.push(StackingContextFragment { + space_and_clip: builder.current_space_and_clip, + containing_block: *containing_block, + fragment, + }); + + // We want to build the scroll frame after the background and border, because + // they shouldn't scroll with the rest of the box content. + self.build_scroll_frame_if_necessary(builder, containing_block); + + let new_containing_block = self + .content_rect + .to_physical(self.style.writing_mode, containing_block) + .translate(containing_block.origin.to_vector()); + for child in &self.children { + child.build_stacking_context_tree(builder, &new_containing_block, stacking_context); + } + } + fn adjust_spatial_id_for_positioning(&self, builder: &mut DisplayListBuilder) { if self.style.get_box().position != ComputedPosition::Fixed { return; @@ -154,14 +363,3 @@ impl AnonymousFragment { } } } - -impl<'a> StackingContext<'a> { - pub(crate) fn build_display_list(&'a self, builder: &'a mut DisplayListBuilder) { - for child in &self.fragments { - builder.current_space_and_clip = child.space_and_clip; - child - .fragment - .build_display_list(builder, &child.containing_block); - } - } -} diff --git a/components/layout_2020/flow/root.rs b/components/layout_2020/flow/root.rs index 0cfccf481f5..25cb7fb03ac 100644 --- a/components/layout_2020/flow/root.rs +++ b/components/layout_2020/flow/root.rs @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::context::LayoutContext; +use crate::display_list::stacking_context::{StackingContext, StackingContextType}; use crate::dom_traversal::{Contents, NodeExt}; use crate::flow::construct::ContainsFloats; use crate::flow::float::FloatBox; @@ -181,7 +182,7 @@ impl BoxTreeRoot { impl FragmentTreeRoot { pub fn build_display_list(&self, builder: &mut crate::display_list::DisplayListBuilder) { - let mut stacking_context = Default::default(); + let mut stacking_context = StackingContext::new(StackingContextType::Real, 0); for fragment in &self.children { fragment.build_stacking_context_tree( builder, @@ -190,6 +191,7 @@ impl FragmentTreeRoot { ); } + stacking_context.sort_stacking_contexts(); stacking_context.build_display_list(builder); } diff --git a/components/style/properties/longhands/position.mako.rs b/components/style/properties/longhands/position.mako.rs index 5e3cbf1324c..6b7ef1b8f4e 100644 --- a/components/style/properties/longhands/position.mako.rs +++ b/components/style/properties/longhands/position.mako.rs @@ -60,7 +60,6 @@ ${helpers.predefined_type( "ZIndex", "computed::ZIndex::auto()", engines="gecko servo-2013 servo-2020", - servo_2020_pref="layout.2020.unimplemented", spec="https://www.w3.org/TR/CSS2/visuren.html#z-index", flags="CREATES_STACKING_CONTEXT", animation_value_type="ComputedValue", diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini deleted file mode 100644 index be45426fd17..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-001.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-001.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini deleted file mode 100644 index c070fd97625..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-002.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-002.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini deleted file mode 100644 index e5d8191c167..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-003.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-003.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini deleted file mode 100644 index ecc9686181b..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-007.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-007.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini deleted file mode 100644 index 31bdee6f0aa..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-008.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-008.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini deleted file mode 100644 index 9f81df5a055..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-009.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-009.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini deleted file mode 100644 index 96a53382b48..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-010.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-010.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini deleted file mode 100644 index b3bfadfe8d8..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-011.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-011.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini deleted file mode 100644 index 3dfc42df0f4..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-012.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-012.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini deleted file mode 100644 index ec47f89df87..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-014.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-014.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-dynamic-001.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-dynamic-001.xht.ini deleted file mode 100644 index 28cc8b1f425..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/zindex/z-index-dynamic-001.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[z-index-dynamic-001.xht] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-backgrounds/css3-background-origin-border-box.html.ini b/tests/wpt/metadata-layout-2020/css/css-backgrounds/css3-background-origin-border-box.html.ini deleted file mode 100644 index e64df69484c..00000000000 --- a/tests/wpt/metadata-layout-2020/css/css-backgrounds/css3-background-origin-border-box.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[css3-background-origin-border-box.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/css/css-position-3/position-sticky-stacking-context.html.ini b/tests/wpt/mozilla/meta-layout-2020/css/css-position-3/position-sticky-stacking-context.html.ini new file mode 100644 index 00000000000..d714d2658ac --- /dev/null +++ b/tests/wpt/mozilla/meta-layout-2020/css/css-position-3/position-sticky-stacking-context.html.ini @@ -0,0 +1,2 @@ +[position-sticky-stacking-context.html] + expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/css/opacity_stacking_context_a.html.ini b/tests/wpt/mozilla/meta-layout-2020/css/opacity_stacking_context_a.html.ini new file mode 100644 index 00000000000..1036a88a3e8 --- /dev/null +++ b/tests/wpt/mozilla/meta-layout-2020/css/opacity_stacking_context_a.html.ini @@ -0,0 +1,2 @@ +[opacity_stacking_context_a.html] + expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/css/position_relative_painting_order_a.html.ini b/tests/wpt/mozilla/meta-layout-2020/css/position_relative_painting_order_a.html.ini deleted file mode 100644 index b7340919238..00000000000 --- a/tests/wpt/mozilla/meta-layout-2020/css/position_relative_painting_order_a.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[position_relative_painting_order_a.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/css/position_relative_stacking_context_a.html.ini b/tests/wpt/mozilla/meta-layout-2020/css/position_relative_stacking_context_a.html.ini deleted file mode 100644 index ac04d35f7e8..00000000000 --- a/tests/wpt/mozilla/meta-layout-2020/css/position_relative_stacking_context_a.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[position_relative_stacking_context_a.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/css/transform_stacking_context_a.html.ini b/tests/wpt/mozilla/meta-layout-2020/css/transform_stacking_context_a.html.ini new file mode 100644 index 00000000000..18d0ddfbd1f --- /dev/null +++ b/tests/wpt/mozilla/meta-layout-2020/css/transform_stacking_context_a.html.ini @@ -0,0 +1,2 @@ +[transform_stacking_context_a.html] + expected: FAIL