diff --git a/devtools/server/actors/animation-type-longhand.js b/devtools/server/actors/animation-type-longhand.js index de70d6cf3366e..8b7c15d4df31e 100644 --- a/devtools/server/actors/animation-type-longhand.js +++ b/devtools/server/actors/animation-type-longhand.js @@ -206,6 +206,8 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [ "border-inline-start-color", "border-inline-start-style", "border-inline-start-width", + "container-name", + "container-type", "content-visibility", "-moz-context-properties", "-moz-control-character-visibility", diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js index 8e5e484df3ac0..370074bc0432a 100644 --- a/devtools/shared/css/generated/properties-db.js +++ b/devtools/shared/css/generated/properties-db.js @@ -2994,6 +2994,8 @@ exports.CSS_PROPERTIES = { "transform-origin", "contain", "content-visibility", + "container-type", + "container-name", "appearance", "-moz-orient", "will-change", @@ -11594,6 +11596,10 @@ exports.PREFERENCES = [ "aspect-ratio", "layout.css.aspect-ratio.enabled" ], + [ + "container-type", + "layout.css.container-queries.enabled" + ], [ "content-visibility", "layout.css.content-visibility.enabled" @@ -11694,6 +11700,10 @@ exports.PREFERENCES = [ "color-scheme", "layout.css.color-scheme.enabled" ], + [ + "container-name", + "layout.css.container-queries.enabled" + ], [ "d", "layout.css.d-property.enabled" @@ -11754,6 +11764,10 @@ exports.PREFERENCES = [ "overscroll-behavior", "layout.css.overscroll-behavior.enabled" ], + [ + "container", + "layout.css.container-queries.enabled" + ], [ "offset", "layout.css.motion-path.enabled" diff --git a/layout/style/ServoBindings.toml b/layout/style/ServoBindings.toml index 91787eab3fb66..959d23306332d 100644 --- a/layout/style/ServoBindings.toml +++ b/layout/style/ServoBindings.toml @@ -494,6 +494,8 @@ cbindgen-types = [ { gecko = "StyleGenericLineHeight", servo = "crate::values::generics::text::LineHeight" }, { gecko = "StyleCaretColor", servo = "crate::values::computed::color::CaretColor" }, { gecko = "StyleContain", servo = "crate::values::computed::Contain" }, + { gecko = "StyleContainerType", servo = "crate::values::computed::ContainerType" }, + { gecko = "StyleContainerName", servo = "crate::values::computed::ContainerName" }, { gecko = "StyleRestyleHint", servo = "crate::invalidation::element::restyle_hints::RestyleHint" }, { gecko = "StyleTouchAction", servo = "crate::values::computed::TouchAction" }, { gecko = "StyleWillChange", servo = "crate::values::specified::box_::WillChange" }, diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 2c6564d4777b8..71b591d171a5c 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -2186,11 +2186,11 @@ nsStyleDisplay::nsStyleDisplay(const Document& aDocument) mAnimationPlayStateCount(1), mAnimationIterationCountCount(1), mAnimationTimelineCount(1), - mWillChange{{}, {0}}, mDisplay(StyleDisplay::Inline), mOriginalDisplay(StyleDisplay::Inline), mContain(StyleContain::NONE), mContentVisibility(StyleContentVisibility::Visible), + mContainerType(StyleContainerType::NONE), mAppearance(StyleAppearance::None), mDefaultAppearance(StyleAppearance::None), mPosition(StylePositionProperty::Static), @@ -2217,13 +2217,13 @@ nsStyleDisplay::nsStyleDisplay(const Document& aDocument) StyleScrollSnapAlignKeyword::None}, mScrollSnapType{StyleScrollSnapAxis::Both, StyleScrollSnapStrictness::None}, - mLineClamp(0), - mRotate(StyleRotate::None()), - mTranslate(StyleTranslate::None()), - mScale(StyleScale::None()), mBackfaceVisibility(StyleBackfaceVisibility::Visible), mTransformStyle(StyleTransformStyle::Flat), mTransformBox(StyleGeometryBox::BorderBox), + mRotate(StyleRotate::None()), + mTranslate(StyleTranslate::None()), + mScale(StyleScale::None()), + mWillChange{{}, {0}}, mOffsetPath(StyleOffsetPath::None()), mOffsetDistance(LengthPercentage::Zero()), mOffsetRotate{true, StyleAngle{0.0}}, @@ -2235,6 +2235,7 @@ nsStyleDisplay::nsStyleDisplay(const Document& aDocument) mPerspectiveOrigin(Position::FromPercentage(0.5f)), mVerticalAlign( StyleVerticalAlign::Keyword(StyleVerticalAlignKeyword::Baseline)), + mLineClamp(0), mShapeMargin(LengthPercentage::Zero()), mShapeOutside(StyleShapeOutside::None()) { MOZ_COUNT_CTOR(nsStyleDisplay); @@ -2259,11 +2260,11 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) mAnimationPlayStateCount(aSource.mAnimationPlayStateCount), mAnimationIterationCountCount(aSource.mAnimationIterationCountCount), mAnimationTimelineCount(aSource.mAnimationTimelineCount), - mWillChange(aSource.mWillChange), mDisplay(aSource.mDisplay), mOriginalDisplay(aSource.mOriginalDisplay), mContain(aSource.mContain), mContentVisibility(aSource.mContentVisibility), + mContainerType(aSource.mContainerType), mAppearance(aSource.mAppearance), mDefaultAppearance(aSource.mDefaultAppearance), mPosition(aSource.mPosition), @@ -2288,14 +2289,15 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) mOverflowAnchor(aSource.mOverflowAnchor), mScrollSnapAlign(aSource.mScrollSnapAlign), mScrollSnapType(aSource.mScrollSnapType), - mLineClamp(aSource.mLineClamp), + mBackfaceVisibility(aSource.mBackfaceVisibility), + mTransformStyle(aSource.mTransformStyle), + mTransformBox(aSource.mTransformBox), mTransform(aSource.mTransform), mRotate(aSource.mRotate), mTranslate(aSource.mTranslate), mScale(aSource.mScale), - mBackfaceVisibility(aSource.mBackfaceVisibility), - mTransformStyle(aSource.mTransformStyle), - mTransformBox(aSource.mTransformBox), + mContainerName(aSource.mContainerName), + mWillChange(aSource.mWillChange), mOffsetPath(aSource.mOffsetPath), mOffsetDistance(aSource.mOffsetDistance), mOffsetRotate(aSource.mOffsetRotate), @@ -2304,6 +2306,7 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource) mChildPerspective(aSource.mChildPerspective), mPerspectiveOrigin(aSource.mPerspectiveOrigin), mVerticalAlign(aSource.mVerticalAlign), + mLineClamp(aSource.mLineClamp), mShapeImageThreshold(aSource.mShapeImageThreshold), mShapeMargin(aSource.mShapeMargin), mShapeOutside(aSource.mShapeOutside) { @@ -2406,6 +2409,8 @@ nsChangeHint nsStyleDisplay::CalcDifference( // values such as 'none'.) We need to reframe since we want to use // nsTextControlFrame instead of nsNumberControlFrame if the author // specifies 'textfield'. + // TODO: Now that we have -moz-default appearance we should do this only if + // `mDefaultAppearance` is or was `number-input`. return nsChangeHint_ReconstructFrame; } @@ -2656,6 +2661,7 @@ nsChangeHint nsStyleDisplay::CalcDifference( // But we still need to return nsChangeHint_NeutralChange for these // properties, since some data did change in the style struct. + // TODO(emilio): Figure out change hints for container-type/name. if (!hint && (mTransitions != aNewData.mTransitions || mTransitionTimingFunctionCount != aNewData.mTransitionTimingFunctionCount || @@ -2675,7 +2681,9 @@ nsChangeHint nsStyleDisplay::CalcDifference( aNewData.mAnimationIterationCountCount || mAnimationTimelineCount != aNewData.mAnimationTimelineCount || mWillChange != aNewData.mWillChange || - mOverflowAnchor != aNewData.mOverflowAnchor)) { + mOverflowAnchor != aNewData.mOverflowAnchor || + mContainerName != aNewData.mContainerName || + mContainerType != aNewData.mContainerType)) { hint |= nsChangeHint_NeutralChange; } diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 4b28565f1ea34..f1f8f720286f9 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -1179,8 +1179,6 @@ struct StyleAnimation { } // namespace mozilla struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay { - typedef mozilla::StyleGeometryBox StyleGeometryBox; - explicit nsStyleDisplay(const mozilla::dom::Document&); nsStyleDisplay(const nsStyleDisplay& aOther); ~nsStyleDisplay(); @@ -1214,7 +1212,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay { uint32_t mAnimationIterationCountCount; uint32_t mAnimationTimelineCount; - mozilla::StyleWillChange mWillChange; mozilla::StyleDisplay mDisplay; mozilla::StyleDisplay mOriginalDisplay; // saved mDisplay for // position:absolute/fixed @@ -1223,6 +1220,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay { // mDisplay mozilla::StyleContain mContain; mozilla::StyleContentVisibility mContentVisibility; + mozilla::StyleContainerType mContainerType; private: mozilla::StyleAppearance mAppearance; @@ -1253,16 +1251,19 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay { mozilla::StyleOverflowAnchor mOverflowAnchor; mozilla::StyleScrollSnapAlign mScrollSnapAlign; mozilla::StyleScrollSnapType mScrollSnapType; - uint32_t mLineClamp; + + mozilla::StyleBackfaceVisibility mBackfaceVisibility; + mozilla::StyleTransformStyle mTransformStyle; + mozilla::StyleGeometryBox mTransformBox; mozilla::StyleTransform mTransform; mozilla::StyleRotate mRotate; + mozilla::StyleTranslate mTranslate; mozilla::StyleScale mScale; - mozilla::StyleBackfaceVisibility mBackfaceVisibility; - mozilla::StyleTransformStyle mTransformStyle; - StyleGeometryBox mTransformBox; + mozilla::StyleContainerName mContainerName; + mozilla::StyleWillChange mWillChange; mozilla::StyleOffsetPath mOffsetPath; mozilla::LengthPercentage mOffsetDistance; @@ -1275,6 +1276,16 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay { mozilla::StyleVerticalAlign mVerticalAlign; + uint32_t mLineClamp; + + // The threshold used for extracting a shape from shape-outside: . + float mShapeImageThreshold = 0.0f; + + // The margin around a shape-outside: . + mozilla::NonNegativeLengthPercentage mShapeMargin; + + mozilla::StyleShapeOutside mShapeOutside; + nsCSSPropertyID GetTransitionProperty(uint32_t aIndex) const { return mTransitions[aIndex % mTransitionPropertyCount].GetProperty(); } @@ -1327,14 +1338,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay { return mAnimations[aIndex % mAnimationTimelineCount].GetTimeline(); } - // The threshold used for extracting a shape from shape-outside: . - float mShapeImageThreshold = 0.0f; - - // The margin around a shape-outside: . - mozilla::NonNegativeLengthPercentage mShapeMargin; - - mozilla::StyleShapeOutside mShapeOutside; - bool HasAppearance() const { return EffectiveAppearance() != mozilla::StyleAppearance::None; } diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index a3da756ad2f95..0a5898c318c9c 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -12880,7 +12880,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.hyphenate-character.enabled")) { if (IsCSSPropertyPrefEnabled("layout.css.content-visibility.enabled")) { gCSSProperties["content-visibility"] = { - domProp: "content-visibility", + domProp: "contentVisibility", inherited: false, type: CSS_TYPE_LONGHAND, initial_values: ["visible"], @@ -12889,6 +12889,52 @@ if (IsCSSPropertyPrefEnabled("layout.css.content-visibility.enabled")) { }; } +if (IsCSSPropertyPrefEnabled("layout.css.container-queries.enabled")) { + gCSSProperties["container-type"] = { + domProp: "containerType", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: ["none"], + other_values: [ + "style", + "inline-size", + "block-size", + "size", + "style inline-size", + "block-size style", + "size style", + ], + invalid_values: [ + "none style", + "none inline-size", + "inline-size none", + "style none", + "style style", + "inline-size style inline-size", + "inline-size block-size", + "size inline-size", + "size block-size", + ], + }; + gCSSProperties["container-name"] = { + domProp: "containerName", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: ["none"], + other_values: ["foo bar", "foo", "baz bazz", "foo foo"], + invalid_values: ["foo unset", "none bar", "foo initial", "initial foo"], + }; + gCSSProperties["container"] = { + domProp: "container", + inherited: false, + type: CSS_TYPE_TRUE_SHORTHAND, + subproperties: ["container-type", "container-name"], + initial_values: ["none"], + other_values: ["size", "size / foo bar", "inline-size style / foo"], + invalid_values: ["foo / size", "foo bar / size"], + }; +} + if (false) { // TODO These properties are chrome-only, and are not exposed via CSSOM. // We may still want to find a way to test them. See bug 1206999. diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 4b39f9bd08728..8817444547de1 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -7276,6 +7276,13 @@ mirror: always rust: true +# Whether Container Queries are enabled +- name: layout.css.container-queries.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + # Whether Constructable Stylesheets are enabled in script. - name: layout.css.constructable-stylesheets.enabled type: bool diff --git a/servo/components/style/properties/data.py b/servo/components/style/properties/data.py index eb61992c44bde..5ccdc2b941995 100644 --- a/servo/components/style/properties/data.py +++ b/servo/components/style/properties/data.py @@ -463,6 +463,7 @@ def specified_is_copy(self): "ColumnCount", "Contain", "ContentVisibility", + "ContainerType", "Display", "FillRule", "Float", diff --git a/servo/components/style/properties/longhands/box.mako.rs b/servo/components/style/properties/longhands/box.mako.rs index 1eb7c209af8e3..79f68ed3796b3 100644 --- a/servo/components/style/properties/longhands/box.mako.rs +++ b/servo/components/style/properties/longhands/box.mako.rs @@ -620,6 +620,26 @@ ${helpers.predefined_type( animation_value_type="none", )} +${helpers.predefined_type( + "container-type", + "ContainerType", + "computed::ContainerType::NONE", + engines="gecko", + animation_value_type="none", + gecko_pref="layout.css.container-queries.enabled", + spec="https://drafts.csswg.org/css-contain-3/#container-type", +)} + +${helpers.predefined_type( + "container-name", + "ContainerName", + "computed::ContainerName::none()", + engines="gecko", + animation_value_type="none", + gecko_pref="layout.css.container-queries.enabled", + spec="https://drafts.csswg.org/css-contain-3/#container-name", +)} + ${helpers.predefined_type( "appearance", "Appearance", diff --git a/servo/components/style/properties/shorthands/box.mako.rs b/servo/components/style/properties/shorthands/box.mako.rs index b056b58c69c12..65325c64ab608 100644 --- a/servo/components/style/properties/shorthands/box.mako.rs +++ b/servo/components/style/properties/shorthands/box.mako.rs @@ -338,6 +338,45 @@ ${helpers.two_properties_shorthand( spec="https://wicg.github.io/overscroll-behavior/#overscroll-behavior-properties", )} +<%helpers:shorthand + engines="gecko" + name="container" + sub_properties="container-type container-name" + gecko_pref="layout.css.container-queries.enabled", + spec="https://drafts.csswg.org/css-contain-3/#container-shorthand" +> + pub fn parse_value<'i>( + context: &ParserContext, + input: &mut Parser<'i, '_>, + ) -> Result> { + use crate::parser::Parse; + use crate::values::specified::box_::{ContainerName, ContainerType}; + // See https://github.com/w3c/csswg-drafts/issues/7180 for why we don't + // match the spec. + let container_type = ContainerType::parse(context, input)?; + let container_name = if input.try_parse(|input| input.expect_delim('/')).is_ok() { + ContainerName::parse(context, input)? + } else { + ContainerName::none() + }; + Ok(expanded! { + container_type: container_type, + container_name: container_name, + }) + } + + impl<'a> ToCss for LonghandsToSerialize<'a> { + fn to_css(&self, dest: &mut CssWriter) -> fmt::Result where W: fmt::Write { + self.container_type.to_css(dest)?; + if !self.container_name.is_none() { + dest.write_str(" / ")?; + self.container_name.to_css(dest)?; + } + Ok(()) + } + } + + <%helpers:shorthand engines="gecko" name="page-break-before" diff --git a/servo/components/style/values/computed/box.rs b/servo/components/style/values/computed/box.rs index dd1e49006723e..f4d3a4f5a359c 100644 --- a/servo/components/style/values/computed/box.rs +++ b/servo/components/style/values/computed/box.rs @@ -13,9 +13,10 @@ use crate::values::specified::box_ as specified; pub use crate::values::specified::box_::{ AnimationName, AnimationTimeline, Appearance, BreakBetween, BreakWithin, - Clear as SpecifiedClear, Contain, ContentVisibility, Display, Float as SpecifiedFloat, Overflow, - OverflowAnchor, OverflowClipBox, OverscrollBehavior, ScrollSnapAlign, ScrollSnapAxis, - ScrollSnapStrictness, ScrollSnapType, ScrollbarGutter, TouchAction, TransitionProperty, WillChange, + Clear as SpecifiedClear, Contain, ContainerName, ContainerType, ContentVisibility, Display, + Float as SpecifiedFloat, Overflow, OverflowAnchor, OverflowClipBox, + OverscrollBehavior, ScrollSnapAlign, ScrollSnapAxis, ScrollSnapStrictness, + ScrollSnapType, ScrollbarGutter, TouchAction, TransitionProperty, WillChange, }; /// A computed value for the `vertical-align` property. diff --git a/servo/components/style/values/computed/mod.rs b/servo/components/style/values/computed/mod.rs index 0bbe29b359376..de4efd7433fae 100644 --- a/servo/components/style/values/computed/mod.rs +++ b/servo/components/style/values/computed/mod.rs @@ -42,7 +42,7 @@ pub use self::basic_shape::FillRule; pub use self::border::{BorderCornerRadius, BorderRadius, BorderSpacing}; pub use self::border::{BorderImageRepeat, BorderImageSideWidth}; pub use self::border::{BorderImageSlice, BorderImageWidth}; -pub use self::box_::{AnimationIterationCount, AnimationName, AnimationTimeline, Contain}; +pub use self::box_::{AnimationIterationCount, AnimationName, AnimationTimeline, Contain, ContainerName, ContainerType}; pub use self::box_::{Appearance, BreakBetween, BreakWithin, Clear, ContentVisibility, Float}; pub use self::box_::{Display, Overflow, OverflowAnchor, TransitionProperty}; pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize, ScrollbarGutter}; diff --git a/servo/components/style/values/specified/box.rs b/servo/components/style/values/specified/box.rs index bde78c31c69e6..04735ecbfa6fe 100644 --- a/servo/components/style/values/specified/box.rs +++ b/servo/components/style/values/specified/box.rs @@ -1314,6 +1314,61 @@ pub enum ContentVisibility { Visible, } +bitflags! { + #[derive(MallocSizeOf, SpecifiedValueInfo, ToComputedValue, ToCss, Parse, ToResolvedValue, ToShmem)] + #[repr(C)] + #[allow(missing_docs)] + #[css(bitflags(single="none", mixed="style,size,inline-size", overlapping_bits))] + /// https://drafts.csswg.org/css-contain-3/#container-type + /// + /// TODO: block-size is on the spec but it seems it was removed? WPTs don't + /// support it, see https://github.com/w3c/csswg-drafts/issues/7179. + pub struct ContainerType: u8 { + /// The `none` variant. + const NONE = 0; + /// The `style` variant. + const STYLE = 1 << 0; + /// The `inline-size` variant. + const INLINE_SIZE = 1 << 1; + /// The `size` variant, exclusive with `inline-size` (they sharing bits + /// guarantees this). + const SIZE = 1 << 2 | Self::INLINE_SIZE.bits; + } +} + +/// https://drafts.csswg.org/css-contain-3/#container-name +#[repr(transparent)] +#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem)] +pub struct ContainerName(#[css(iterable, if_empty = "none")] pub crate::OwnedSlice); + +impl ContainerName { + /// Return the `none` value. + pub fn none() -> Self { + Self(Default::default()) + } + + /// Returns whether this is the `none` value. + pub fn is_none(&self) -> bool { + self.0.is_empty() + } +} + +impl Parse for ContainerName { + fn parse<'i, 't>( _: &ParserContext, input: &mut Parser<'i, 't>) -> Result> { + let mut idents = vec![]; + let location = input.current_source_location(); + let first = input.expect_ident()?; + if first.eq_ignore_ascii_case("none") { + return Ok(Self::none()) + } + idents.push(CustomIdent::from_ident(location, first, &["none"])?); + while let Ok(ident) = input.try_parse(|input| input.expect_ident_cloned()) { + idents.push(CustomIdent::from_ident(location, &ident, &["none"])?); + } + Ok(ContainerName(idents.into())) + } +} + /// A specified value for the `perspective` property. pub type Perspective = GenericPerspective; diff --git a/servo/components/style/values/specified/mod.rs b/servo/components/style/values/specified/mod.rs index ac62296164220..7292088920da2 100644 --- a/servo/components/style/values/specified/mod.rs +++ b/servo/components/style/values/specified/mod.rs @@ -37,7 +37,7 @@ pub use self::border::{BorderCornerRadius, BorderImageSlice, BorderImageWidth}; pub use self::border::{BorderImageRepeat, BorderImageSideWidth}; pub use self::border::{BorderRadius, BorderSideWidth, BorderSpacing, BorderStyle}; pub use self::box_::{AnimationIterationCount, AnimationName, AnimationTimeline, Contain, Display}; -pub use self::box_::{Appearance, BreakBetween, BreakWithin}; +pub use self::box_::{Appearance, BreakBetween, BreakWithin, ContainerName, ContainerType}; pub use self::box_::{Clear, ContentVisibility, Float, Overflow, OverflowAnchor}; pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize, ScrollbarGutter}; pub use self::box_::{ScrollSnapAlign, ScrollSnapAxis, ScrollSnapStrictness, ScrollSnapType}; diff --git a/servo/components/style_derive/to_css.rs b/servo/components/style_derive/to_css.rs index d9db851018303..89659d3850ed3 100644 --- a/servo/components/style_derive/to_css.rs +++ b/servo/components/style_derive/to_css.rs @@ -25,17 +25,35 @@ fn derive_bitflags(input: &syn::DeriveInput, bitflags: &CssBitflagAttrs) -> Toke let mut has_any = false; }); + if bitflags.overlapping_bits { + body.append_all(quote! { + let mut serialized = Self::empty(); + }); + } + for (rust_name, css_name) in bitflags.mixed_flags() { let rust_ident = Ident::new(&rust_name, Span::call_site()); - body.append_all(quote! { - if self.intersects(Self::#rust_ident) { - if has_any { - dest.write_char(' ')?; - } - has_any = true; - dest.write_str(#css_name)?; + let serialize = quote! { + if has_any { + dest.write_char(' ')?; } - }); + has_any = true; + dest.write_str(#css_name)?; + }; + if bitflags.overlapping_bits { + body.append_all(quote! { + if self.contains(Self::#rust_ident) && !serialized.intersects(Self::#rust_ident) { + #serialize + serialized.insert(Self::#rust_ident); + } + }); + } else { + body.append_all(quote! { + if self.intersects(Self::#rust_ident) { + #serialize + } + }); + } } body.append_all(quote! { @@ -313,6 +331,10 @@ pub struct CssBitflagAttrs { /// Extra validation of the resulting mixed flags. #[darling(default)] pub validate_mixed: Option, + /// Whether there are overlapping bits we need to take care of when + /// serializing. + #[darling(default)] + pub overlapping_bits: bool, } impl CssBitflagAttrs { diff --git a/servo/components/style_traits/values.rs b/servo/components/style_traits/values.rs index c2de9cb71241e..90b5af3fe43e8 100644 --- a/servo/components/style_traits/values.rs +++ b/servo/components/style_traits/values.rs @@ -44,9 +44,9 @@ use std::fmt::{self, Write}; /// * `#[css(represents_keyword)]` can be used on bool fields in order to /// serialize the field name if the field is true, or nothing otherwise. It /// also collects those keywords for `SpecifiedValueInfo`. -/// * `#[css(bitflags(single="", mixed="", validate="")]` can be used to derive -/// parse / serialize / etc on bitflags. The rules for parsing bitflags are -/// the following: +/// * `#[css(bitflags(single="", mixed="", validate="", overlapping_bits)]` can +/// be used to derive parse / serialize / etc on bitflags. The rules for parsing +/// bitflags are the following: /// /// * `single` flags can only appear on their own. It's common that bitflags /// properties at least have one such value like `none` or `auto`. @@ -66,6 +66,13 @@ use std::fmt::{self, Write}; /// /// But `bar baz` will be valid, as they don't share bits, and so would /// `foo` with any other flag, or `bazz` on its own. +/// * `overlapping_bits` enables some tracking during serialization of mixed +/// flags to avoid serializing variants that can subsume other variants. +/// In the example above, you could do: +/// mixed="foo,bazz,bar,baz", overlapping_bits +/// to ensure that if bazz is serialized, bar and baz aren't, even though +/// their bits are set. Note that the serialization order is canonical, +/// and thus depends on the order you specify the flags in. /// /// * finally, one can put `#[css(derive_debug)]` on the whole type, to /// implement `Debug` by a single call to `ToCss::to_css`. diff --git a/servo/ports/geckolib/cbindgen.toml b/servo/ports/geckolib/cbindgen.toml index f6626917b3b76..d5f006d2488c6 100644 --- a/servo/ports/geckolib/cbindgen.toml +++ b/servo/ports/geckolib/cbindgen.toml @@ -148,6 +148,8 @@ include = [ "LineBreak", "WordBreak", "Contain", + "ContainerType", + "ContainerName", "ContentVisibility", "Origin", "RestyleHint", diff --git a/testing/web-platform/meta/css/css-contain/container-queries/__dir__.ini b/testing/web-platform/meta/css/css-contain/container-queries/__dir__.ini new file mode 100644 index 0000000000000..86b2af640f0b3 --- /dev/null +++ b/testing/web-platform/meta/css/css-contain/container-queries/__dir__.ini @@ -0,0 +1 @@ +prefs: [layout.css.container-queries.enabled:true] diff --git a/testing/web-platform/meta/css/css-contain/container-queries/animation-container-size.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/animation-container-size.html.ini index 752af30b054b4..6cfab2a6592a6 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/animation-container-size.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/animation-container-size.html.ini @@ -1,2 +1,3 @@ [animation-container-size.html] - expected: ERROR + [Animation affects container query evaluation] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/animation-container-type-dynamic.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/animation-container-type-dynamic.html.ini index 654f3e50001f0..61ed25e802643 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/animation-container-type-dynamic.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/animation-container-type-dynamic.html.ini @@ -1,2 +1,3 @@ [animation-container-type-dynamic.html] - expected: ERROR + [Animated container creating new container] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/animation-nested-animation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/animation-nested-animation.html.ini index 3efa56c46ed5c..d2279442de46a 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/animation-nested-animation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/animation-nested-animation.html.ini @@ -1,2 +1,3 @@ [animation-nested-animation.html] - expected: ERROR + [Animated container can create inner animation] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/animation-nested-transition.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/animation-nested-transition.html.ini index 9f4156ea923ee..99bbd212ac2e0 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/animation-nested-transition.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/animation-nested-transition.html.ini @@ -1,2 +1,3 @@ [animation-nested-transition.html] - expected: ERROR + [Animated container size triggers transition] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/aspect-ratio-feature-evaluation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/aspect-ratio-feature-evaluation.html.ini index 4d4382d75a26c..97bfa5fb7c702 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/aspect-ratio-feature-evaluation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/aspect-ratio-feature-evaluation.html.ini @@ -1,2 +1,6 @@ [aspect-ratio-feature-evaluation.html] - expected: ERROR + [@container queries with aspect-ratio and size containment] + expected: FAIL + + [@container query with aspect-ratio change after resize] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/at-container-parsing.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/at-container-parsing.html.ini index 0174391e3e375..c1da31528b586 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/at-container-parsing.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/at-container-parsing.html.ini @@ -1,2 +1,111 @@ [at-container-parsing.html] - expected: ERROR + [(width)] + expected: FAIL + + [(min-width: 0px)] + expected: FAIL + + [(max-width: 0px)] + expected: FAIL + + [(height)] + expected: FAIL + + [(min-height: 0px)] + expected: FAIL + + [(max-height: 0px)] + expected: FAIL + + [(aspect-ratio)] + expected: FAIL + + [(min-aspect-ratio: 1/2)] + expected: FAIL + + [(max-aspect-ratio: 1/2)] + expected: FAIL + + [(orientation: portrait)] + expected: FAIL + + [(inline-size)] + expected: FAIL + + [(min-inline-size: 0px)] + expected: FAIL + + [(max-inline-size: 0px)] + expected: FAIL + + [(block-size)] + expected: FAIL + + [(min-block-size: 0px)] + expected: FAIL + + [(max-block-size: 0px)] + expected: FAIL + + [(width: 100px)] + expected: FAIL + + [((width: 100px))] + expected: FAIL + + [(not (width: 100px))] + expected: FAIL + + [((width: 100px) and (height: 100px))] + expected: FAIL + + [((width: 50px) or (height: 100px))] + expected: FAIL + + [(width < 100px)] + expected: FAIL + + [(100px < width)] + expected: FAIL + + [(100px < width < 200px)] + expected: FAIL + + [foo(width)] + expected: FAIL + + [size(width)] + expected: FAIL + + [(asdf)] + expected: FAIL + + [(resolution > 100dpi)] + expected: FAIL + + [(resolution: 150dpi)] + expected: FAIL + + [(color)] + expected: FAIL + + [(min-color: 1)] + expected: FAIL + + [(color-index >= 1)] + expected: FAIL + + [size(grid)] + expected: FAIL + + [(grid)] + expected: FAIL + + [Container selector: foo] + expected: FAIL + + [Container selector: foo] + expected: FAIL + + [Container selector: foo ] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/auto-scrollbars.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/auto-scrollbars.html.ini index b3c3f5540c798..a0459baf86a13 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/auto-scrollbars.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/auto-scrollbars.html.ini @@ -1,2 +1,6 @@ [auto-scrollbars.html] - expected: ERROR + [Initial layout - expecting a scrollbar without overflowing content instead of overflowing content without a scrollbar] + expected: FAIL + + [Same result after a reflow] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/backdrop-invalidation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/backdrop-invalidation.html.ini index 8b089b438d304..7fc5de28f632b 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/backdrop-invalidation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/backdrop-invalidation.html.ini @@ -1,2 +1,3 @@ [backdrop-invalidation.html] - expected: ERROR + [Pseudo-element ::backdrop responds to container size changes] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-001.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-001.html.ini deleted file mode 100644 index 1ec473fc019da..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-001.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[canvas-as-container-001.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-002.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-002.html.ini deleted file mode 100644 index 762a29375ebbe..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-002.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[canvas-as-container-002.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-005.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-005.html.ini index fc391da53124e..69ec819abd952 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-005.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-005.html.ini @@ -1,2 +1,3 @@ [canvas-as-container-005.html] - expected: ERROR + [Focusable after container size change] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-006.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-006.html.ini index 5fc52bb634692..0aaa7995a130a 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-006.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/canvas-as-container-006.html.ini @@ -1,2 +1,3 @@ [canvas-as-container-006.html] - expected: ERROR + [Focusable after container size change] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/chrome-legacy-skip-recalc.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/chrome-legacy-skip-recalc.html.ini deleted file mode 100644 index 41721cec3c760..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/chrome-legacy-skip-recalc.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[chrome-legacy-skip-recalc.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/conditional-container-status.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/conditional-container-status.html.ini index c0ee6c64a5bf1..ed8d459baacee 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/conditional-container-status.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/conditional-container-status.html.ini @@ -1,2 +1,3 @@ [conditional-container-status.html] - expected: ERROR + [Conditionally applying container-type:initial] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-computed.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-computed.html.ini deleted file mode 100644 index 5cfd149c49029..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-computed.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[container-computed.html] - expected: ERROR diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-for-shadow-dom.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-for-shadow-dom.html.ini index 3efb9a4484de6..7ebe0e51a5708 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-for-shadow-dom.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-for-shadow-dom.html.ini @@ -1,2 +1,30 @@ [container-for-shadow-dom.html] - expected: ERROR + [Match container in outer tree] + expected: FAIL + + [Match container in same tree, not walking flat tree ancestors] + expected: FAIL + + [Match container in ::slotted selector's originating element tree] + expected: FAIL + + [Match container in outer tree for :host] + expected: FAIL + + [Match container in ::part selector's originating element tree] + expected: FAIL + + [Match container for ::before in ::slotted selector's originating element tree] + expected: FAIL + + [Match container in outer tree for :host::before] + expected: FAIL + + [Match container for ::before in ::part selector's originating element tree] + expected: FAIL + + [Match container for ::part selector's originating element tree for exportparts] + expected: FAIL + + [Match container for slot light tree child fallback] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-inheritance.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-inheritance.html.ini deleted file mode 100644 index 7895da1547356..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-inheritance.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[container-inheritance.html] - expected: ERROR diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-inner-at-rules.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-inner-at-rules.html.ini index fe9df8888c4d6..68010d992c1fb 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-inner-at-rules.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-inner-at-rules.html.ini @@ -1,2 +1,18 @@ [container-inner-at-rules.html] - expected: ERROR + [@keyframes is defined regardless of evaluation] + expected: FAIL + + [@property is defined regardless of evaluation] + expected: FAIL + + [@layer order respected regardless of evaluation] + expected: FAIL + + [@font-face is defined regardless of evaluation] + expected: FAIL + + [@media works inside @container] + expected: FAIL + + [@supports works inside @container] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-longhand-animation-type.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-longhand-animation-type.html.ini index 6fcb3d3d01770..881296739edcb 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-longhand-animation-type.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-longhand-animation-type.html.ini @@ -1,2 +1,3 @@ [container-longhand-animation-type.html] - expected: ERROR + [Reference variable is applied] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-name-computed.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-name-computed.html.ini index 4c6f92ff91f2a..f33f646178308 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-name-computed.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-name-computed.html.ini @@ -1,2 +1,10 @@ [container-name-computed.html] - expected: ERROR + bug: https://github.com/w3c/csswg-drafts/issues/7181 + [Property container-name value 'foo foo bar'] + expected: FAIL + + [Property container-name value 'foo bar foo'] + expected: FAIL + + [Property container-name value 'bar foo foo'] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-name-invalidation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-name-invalidation.html.ini index 9699d557f71b4..73183a4fdd7c7 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-name-invalidation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-name-invalidation.html.ini @@ -1,2 +1,6 @@ [container-name-invalidation.html] - expected: ERROR + [Changing a named container invalidates relevant descendants] + expected: FAIL + + [Changing container-name invalidates relevant descendants] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-name-parsing.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-name-parsing.html.ini deleted file mode 100644 index a1d910e8bc65c..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-name-parsing.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[container-name-parsing.html] - expected: ERROR diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-nested.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-nested.html.ini index 270c49299765f..af458226e9e22 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-nested.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-nested.html.ini @@ -1,2 +1,27 @@ [container-nested.html] - expected: ERROR + [Implicit] + expected: FAIL + + [Outer named, inner named] + expected: FAIL + + [Outer named, inner named (reverse)] + expected: FAIL + + [Outer named, inner implicit] + expected: FAIL + + [Inner named, outer implicit] + expected: FAIL + + [Inner named, outer implicit (reverse)] + expected: FAIL + + [Three levels] + expected: FAIL + + [Named inner invalidation] + expected: FAIL + + [Implicit outer invalidation] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-parsing.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-parsing.html.ini deleted file mode 100644 index 4a67b2a0bb4f4..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-parsing.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[container-parsing.html] - expected: ERROR diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-selection.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-selection.html.ini index 078f5f5fca038..41697cff7ad14 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-selection.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-selection.html.ini @@ -1,2 +1,48 @@ [container-selection.html] - expected: ERROR + [(width: 16px) for .size > .inline > span] + expected: FAIL + + [(height: 16px) for .inline > .size > span] + expected: FAIL + + [(width: 16px) for .inline > .size > span] + expected: FAIL + + [(height: 32px) for .size > .inline > span] + expected: FAIL + + [a (width: 32px) for .a-size > .b-size > span] + expected: FAIL + + [b (width: 16px) for .a-size > .b-size > span] + expected: FAIL + + [a (width: 16px) for .a-size > .a-size > span] + expected: FAIL + + [a (width: 32px) for .a-size > .a > span] + expected: FAIL + + [a (width: 32px) for .ab-size > .size > span] + expected: FAIL + + [b (width: 32px) for .ab-size > .size > span] + expected: FAIL + + [a (width: 8px) for .a-size > .b-size > .a-inline > span] + expected: FAIL + + [b (width: 16px) for .a-size > .b-size > .a-inline > span] + expected: FAIL + + [a (height: 32px) for .a-size > .b-size > .a-inline > span] + expected: FAIL + + [a (inline-size: 8px) for .a-size > .b-size > .a-inline > span] + expected: FAIL + + [b (inline-size: 16px) for .a-size > .b-size > .a-inline > span] + expected: FAIL + + [a (block-size: 32px) for .a-size > .b-size > .a-inline > span] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-size-invalidation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-size-invalidation.html.ini index 2110c73f00a00..66a82eea332fd 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-size-invalidation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-size-invalidation.html.ini @@ -1,2 +1,6 @@ [container-size-invalidation.html] - expected: ERROR + [Children respond to changes in container size] + expected: FAIL + + [Descendants respond to changes in container size] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-type-computed.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-type-computed.html.ini deleted file mode 100644 index 1c738ca9d2fbc..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-type-computed.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[container-type-computed.html] - expected: ERROR diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-type-containment.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-type-containment.html.ini index 78eac66a53bd6..036d6c316b375 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-type-containment.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-type-containment.html.ini @@ -1,2 +1,12 @@ [container-type-containment.html] - expected: ERROR + [container-type:inline-size turns on layout containment] + expected: FAIL + + [container-type:inline-size turns on inline-size containment] + expected: FAIL + + [container-type:size turns on full size containment] + expected: FAIL + + [container-type:inline/size turns on style containment] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-type-invalidation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-type-invalidation.html.ini index ceeef89bc5ee9..2888c8c08d688 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-type-invalidation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-type-invalidation.html.ini @@ -1,2 +1,3 @@ [container-type-invalidation.html] - expected: ERROR + [Changing the container type invalidates relevant descendants] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-type-layout-invalidation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-type-layout-invalidation.html.ini index 2ee85b9d25441..c2c5543057350 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-type-layout-invalidation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-type-layout-invalidation.html.ini @@ -1,2 +1,3 @@ [container-type-layout-invalidation.html] - expected: ERROR + [Changing container-type invalidates layout] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-type-parsing.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-type-parsing.html.ini deleted file mode 100644 index 1c739f25052a1..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-type-parsing.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[container-type-parsing.html] - expected: ERROR diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-units-animation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-units-animation.html.ini index 343a20cdded92..8e6fbc837062d 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-units-animation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-units-animation.html.ini @@ -1,2 +1,36 @@ [container-units-animation.html] - expected: ERROR + [Animation using cqw unit] + expected: FAIL + + [Animation using cqw unit responds to changing container size] + expected: FAIL + + [Animation using cqh unit] + expected: FAIL + + [Animation using cqh unit responds to changing container size] + expected: FAIL + + [Animation using cqi unit] + expected: FAIL + + [Animation using cqi unit responds to changing container size] + expected: FAIL + + [Animation using cqb unit] + expected: FAIL + + [Animation using cqb unit responds to changing container size] + expected: FAIL + + [Animation using cqmin unit] + expected: FAIL + + [Animation using cqmin unit responds to changing container size] + expected: FAIL + + [Animation using cqmax unit] + expected: FAIL + + [Animation using cqmax unit responds to changing container size] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-units-basic.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-units-basic.html.ini index be0e8789a8553..cf2e406c43038 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-units-basic.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-units-basic.html.ini @@ -1,2 +1,6 @@ [container-units-basic.html] - expected: ERROR + [Container relative units] + expected: FAIL + + [Container relative units in math functions] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-units-computational-independence.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-units-computational-independence.html.ini index 2d243ce7664c6..c515493b2535d 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-units-computational-independence.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-units-computational-independence.html.ini @@ -1,2 +1,18 @@ [container-units-computational-independence.html] - expected: ERROR + [Container relative unit cqw is not computationally independent] + expected: FAIL + + [Container relative unit cqh is not computationally independent] + expected: FAIL + + [Container relative unit cqi is not computationally independent] + expected: FAIL + + [Container relative unit cqb is not computationally independent] + expected: FAIL + + [Container relative unit cqmin is not computationally independent] + expected: FAIL + + [Container relative unit cqmax is not computationally independent] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-units-invalidation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-units-invalidation.html.ini index 7f82447127acf..9369994ee41ab 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-units-invalidation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-units-invalidation.html.ini @@ -1,2 +1,15 @@ [container-units-invalidation.html] - expected: ERROR + [cqi respond when selected container changes type (inline-size -> none)] + expected: FAIL + + [cqb respond when selected container changes type (size -> none)] + expected: FAIL + + [cqb respond when intermediate container changes type (inline-size -> size)] + expected: FAIL + + [cqi respond when selected container changes inline-size] + expected: FAIL + + [cqb respond when selected container changes block-size] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-units-selection.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-units-selection.html.ini index a0a35f1f2665d..a98da2282bda2 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-units-selection.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-units-selection.html.ini @@ -1,2 +1,6 @@ [container-units-selection.html] - expected: ERROR + [Container units select the proper container] + expected: FAIL + + [Units respond to the writing-mode of the element] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-units-small-viewport-fallback.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-units-small-viewport-fallback.html.ini index 2d628428bc95b..a4d10255ae2d9 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-units-small-viewport-fallback.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-units-small-viewport-fallback.html.ini @@ -1,2 +1,3 @@ [container-units-small-viewport-fallback.html] - expected: ERROR + [Use small viewport size as fallback] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/container-units-typed-om.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/container-units-typed-om.html.ini index dea0e2a76cd37..3e09b9d710b33 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/container-units-typed-om.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/container-units-typed-om.html.ini @@ -1,2 +1,72 @@ [container-units-typed-om.html] - expected: ERROR + [CSS.cqw function] + expected: FAIL + + [Reify value with cqw unit] + expected: FAIL + + [Set value with cqw unit (string)] + expected: FAIL + + [Set value with cqw unit (CSS.cqw)] + expected: FAIL + + [CSS.cqh function] + expected: FAIL + + [Reify value with cqh unit] + expected: FAIL + + [Set value with cqh unit (string)] + expected: FAIL + + [Set value with cqh unit (CSS.cqh)] + expected: FAIL + + [CSS.cqi function] + expected: FAIL + + [Reify value with cqi unit] + expected: FAIL + + [Set value with cqi unit (string)] + expected: FAIL + + [Set value with cqi unit (CSS.cqi)] + expected: FAIL + + [CSS.cqb function] + expected: FAIL + + [Reify value with cqb unit] + expected: FAIL + + [Set value with cqb unit (string)] + expected: FAIL + + [Set value with cqb unit (CSS.cqb)] + expected: FAIL + + [CSS.cqmin function] + expected: FAIL + + [Reify value with cqmin unit] + expected: FAIL + + [Set value with cqmin unit (string)] + expected: FAIL + + [Set value with cqmin unit (CSS.cqmin)] + expected: FAIL + + [CSS.cqmax function] + expected: FAIL + + [Reify value with cqmax unit] + expected: FAIL + + [Set value with cqmax unit (string)] + expected: FAIL + + [Set value with cqmax unit (CSS.cqmax)] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/counters-flex-circular.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/counters-flex-circular.html.ini index d306fb202beee..bf5796c235c57 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/counters-flex-circular.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/counters-flex-circular.html.ini @@ -1,2 +1,3 @@ [counters-flex-circular.html] - expected: ERROR + [The container query should match the layed out width] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/display-contents.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/display-contents.html.ini index 218ccadd27eb7..3b16182c18275 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/display-contents.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/display-contents.html.ini @@ -1,2 +1,6 @@ [display-contents.html] - expected: ERROR + [getComputedStyle when container becomes display:contents] + expected: FAIL + + [getComputedStyle when intermediate container becomes display:contents] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/display-none.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/display-none.html.ini index 30e7ac379ebf5..5c2a480abeca2 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/display-none.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/display-none.html.ini @@ -1,2 +1,39 @@ [display-none.html] - expected: ERROR + [getComputedStyle when element is display:none] + expected: FAIL + + [getComputedStyle when parent is display:none] + expected: FAIL + + [getComputedStyle when ancestor is display:none] + expected: FAIL + + [getComputedStyle when element in nested container is display:none] + expected: FAIL + + [getComputedStyle when element becomes display:none] + expected: FAIL + + [getComputedStyle when parent becomes display:none] + expected: FAIL + + [getComputedStyle when ancestor becomes display:none] + expected: FAIL + + [getComputedStyle when container becomes display:none] + expected: FAIL + + [getComputedStyle when intermediate container becomes display:none] + expected: FAIL + + [getComputedStyle when ::before is display:none] + expected: FAIL + + [getComputedStyle when originating element is display:none] + expected: FAIL + + [getComputedStyle on ::before when ancestor element is display:none] + expected: FAIL + + [getComputedStyle when in display:none with layout dirty outer element] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/font-relative-units-dynamic.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/font-relative-units-dynamic.html.ini index bac1ca5c34b89..318c812c65504 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/font-relative-units-dynamic.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/font-relative-units-dynamic.html.ini @@ -1,2 +1,12 @@ [font-relative-units-dynamic.html] - expected: ERROR + [em relative after change] + expected: FAIL + + [rem relative after change] + expected: FAIL + + [ex relative after change] + expected: FAIL + + [ch relative after change] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/font-relative-units.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/font-relative-units.html.ini index e08fa7e3a648f..3e8e01654403e 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/font-relative-units.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/font-relative-units.html.ini @@ -1,2 +1,12 @@ [font-relative-units.html] - expected: ERROR + [em relative inline-size] + expected: FAIL + + [rem relative inline-size] + expected: FAIL + + [ex relative inline-size] + expected: FAIL + + [ch relative inline-size] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/fragmented-container-001.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/fragmented-container-001.html.ini index 45e3fff97d5a6..06a25a08df23c 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/fragmented-container-001.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/fragmented-container-001.html.ini @@ -1,2 +1,3 @@ [fragmented-container-001.html] - expected: ERROR + [Children of fragmented inline-size container should match inline-size of first fragment] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/get-animations.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/get-animations.html.ini index 696dab961686c..ffb89ef66264c 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/get-animations.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/get-animations.html.ini @@ -1,2 +1,3 @@ [get-animations.html] - expected: ERROR + [Calling getAnimations updates layout of parent frame if needed] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/iframe-invalidation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/iframe-invalidation.html.ini index 402770081148a..b8f6a62afe2ff 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/iframe-invalidation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/iframe-invalidation.html.ini @@ -1,2 +1,3 @@ [iframe-invalidation.html] - expected: ERROR + [@container-dependent elements respond to iframe size changes] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/ineligible-containment.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/ineligible-containment.html.ini index fb675be1df6cf..1a6d08f1f00c3 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/ineligible-containment.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/ineligible-containment.html.ini @@ -1,2 +1,3 @@ [ineligible-containment.html] - expected: ERROR + [Changing containment eligibility invalidates style] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/inline-size-and-min-width.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/inline-size-and-min-width.html.ini index 2d5cb15bd9b66..be23d27849666 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/inline-size-and-min-width.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/inline-size-and-min-width.html.ini @@ -1,2 +1,3 @@ [inline-size-and-min-width.html] - expected: ERROR + [min-width of inline-size container affects container size] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/inline-size-containment-vertical-rl.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/inline-size-containment-vertical-rl.html.ini index 65be79b67791c..86c2ca29f21a8 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/inline-size-containment-vertical-rl.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/inline-size-containment-vertical-rl.html.ini @@ -1,2 +1,3 @@ [inline-size-containment-vertical-rl.html] - expected: ERROR + [inline-size containment only] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/inline-size-containment.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/inline-size-containment.html.ini index d5f1b19aeef88..976a458f91b6b 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/inline-size-containment.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/inline-size-containment.html.ini @@ -1,2 +1,3 @@ [inline-size-containment.html] - expected: ERROR + [inline-size containment only] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/layout-dependent-focus.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/layout-dependent-focus.html.ini index 215241c0ac3d7..06618e1c4128a 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/layout-dependent-focus.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/layout-dependent-focus.html.ini @@ -1,2 +1,3 @@ [layout-dependent-focus.html] - expected: ERROR + [Verify that onblur is called on hidden input] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/multicol-container-001.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/multicol-container-001.html.ini index 5e75ff3c6536f..f74fceae162d1 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/multicol-container-001.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/multicol-container-001.html.ini @@ -1,2 +1,3 @@ [multicol-container-001.html] - expected: ERROR + [Children of multicol inline-size container should match inline-size of the container] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/never-match-container.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/never-match-container.html.ini deleted file mode 100644 index bd76185e54562..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/never-match-container.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[never-match-container.html] - expected: ERROR diff --git a/testing/web-platform/meta/css/css-contain/container-queries/orthogonal-wm-container-query.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/orthogonal-wm-container-query.html.ini index 5f5c04ee0f883..d49b0b0b1f62a 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/orthogonal-wm-container-query.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/orthogonal-wm-container-query.html.ini @@ -1,2 +1,3 @@ [orthogonal-wm-container-query.html] - expected: ERROR + [Orthogonal width] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/percentage-padding-orthogonal.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/percentage-padding-orthogonal.html.ini index 06ce134508932..56c3b6e727b0f 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/percentage-padding-orthogonal.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/percentage-padding-orthogonal.html.ini @@ -1,2 +1,15 @@ [percentage-padding-orthogonal.html] - expected: ERROR + [#container height measured with 500px width. Both container children visible] + expected: FAIL + + [#container width 400px after padding is applied.] + expected: FAIL + + [#container width 400px after padding is applied. #second is removed from the rendering] + expected: FAIL + + [#container height measured with 499px width. Both container children visible] + expected: FAIL + + [#container width 399x after padding is applied. #second is removed from the rendering] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/pseudo-elements-001.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/pseudo-elements-001.html.ini index 8049e81a747a0..cabd72ec9cc75 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/pseudo-elements-001.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/pseudo-elements-001.html.ini @@ -1,2 +1,6 @@ [pseudo-elements-001.html] - expected: ERROR + [Pseudo-elements ::before and ::after respond to container size changes] + expected: FAIL + + [Pseudo-element ::marker responds to container size changes] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/pseudo-elements-003.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/pseudo-elements-003.html.ini index 8ae4a2f4aa0c7..9a1dce2924898 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/pseudo-elements-003.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/pseudo-elements-003.html.ini @@ -1,2 +1,24 @@ [pseudo-elements-003.html] - expected: ERROR + [Originating element container for ::before] + expected: FAIL + + [Originating element container for ::after] + expected: FAIL + + [Originating element container for ::marker] + expected: FAIL + + [Originating element container for ::first-line] + expected: FAIL + + [Originating element container for ::first-letter] + expected: FAIL + + [Originating element container for outer ::first-line] + expected: FAIL + + [Originating element container for outer ::first-letter] + expected: FAIL + + [Originating element container for ::backdrop] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/query-content-box.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/query-content-box.html.ini index 8d3aec97963f8..f21577ea55e9d 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/query-content-box.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/query-content-box.html.ini @@ -1,2 +1,12 @@ [query-content-box.html] - expected: ERROR + [Size queries with content-box sizing] + expected: FAIL + + [Size queries with border-box sizing] + expected: FAIL + + [Size queries with content-box sizing and overflow:scroll] + expected: FAIL + + [Size queries with border-box sizing and overflow:scroll] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/query-evaluation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/query-evaluation.html.ini index 45622b2e02b48..59c63da41f000 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/query-evaluation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/query-evaluation.html.ini @@ -1,2 +1,96 @@ [query-evaluation.html] - expected: ERROR + [(width)] + expected: FAIL + + [((width))] + expected: FAIL + + [((((width))))] + expected: FAIL + + [(not (height))] + expected: FAIL + + [((width) and (width))] + expected: FAIL + + [((width) and (width) and (width))] + expected: FAIL + + [((width) or (width))] + expected: FAIL + + [((width) or (width) or (width))] + expected: FAIL + + [((height) or (width) or (width))] + expected: FAIL + + [((width) or (height) or (width))] + expected: FAIL + + [((width) or (width) or (height))] + expected: FAIL + + [((unknown) or (width) or (width))] + expected: FAIL + + [((width) or (unknown) or (width))] + expected: FAIL + + [((width) or (width) or (unknown))] + expected: FAIL + + [((unknown) or (height) or (width))] + expected: FAIL + + [(not ((width) and (height)))] + expected: FAIL + + [((height) or (not ((height) and (width))))] + expected: FAIL + + [style((width: 1px))] + expected: FAIL + + [style(not (height: 2px))] + expected: FAIL + + [style((width: 1px) and (width: 1px))] + expected: FAIL + + [style((width: 1px) and (width: 1px) and (width: 1px))] + expected: FAIL + + [style((width: 1px) or (width: 1px))] + expected: FAIL + + [style((width: 1px) or (width: 1px) or (width: 1px))] + expected: FAIL + + [style((height: 2px) or (width: 1px) or (width: 1px))] + expected: FAIL + + [style((width: 1px) or (height: 2px) or (width: 1px))] + expected: FAIL + + [style((width: 1px) or (width: 1px) or (height: 2px))] + expected: FAIL + + [style((unknown) or (width: 1px) or (width: 1px))] + expected: FAIL + + [style((width: 1px) or (unknown) or (width: 1px))] + expected: FAIL + + [style((width: 1px) or (width: 1px) or (unknown))] + expected: FAIL + + [style((unknown) or (height: 2px) or (width: 1px))] + expected: FAIL + + [style(not ((width: 1px) and (height: 2px)))] + expected: FAIL + + [style((height: 2px) or (not ((height: 2px) and (width: 1px))))] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/reattach-container-with-dirty-child.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/reattach-container-with-dirty-child.html.ini index cf8a718cb421c..2543bb66f8b55 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/reattach-container-with-dirty-child.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/reattach-container-with-dirty-child.html.ini @@ -1,2 +1,6 @@ [reattach-container-with-dirty-child.html] - expected: ERROR + [Initially wider than 200px] + expected: FAIL + + [Container query changed and inner.style applied] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/sibling-layout-dependency.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/sibling-layout-dependency.html.ini index 0cb8fb94d65c8..6081977467a7c 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/sibling-layout-dependency.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/sibling-layout-dependency.html.ini @@ -1,2 +1,12 @@ [sibling-layout-dependency.html] - expected: ERROR + [Sibling style mutation] + expected: FAIL + + [Sibling style mutation, parent is affected] + expected: FAIL + + [Sibling style mutation, ancestor is affected] + expected: FAIL + + [Sibling text mutation] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/size-container-no-principal-box.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/size-container-no-principal-box.html.ini index e44c18a4a5dad..5724c5803493d 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/size-container-no-principal-box.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/size-container-no-principal-box.html.ini @@ -1,2 +1,3 @@ [size-container-no-principal-box.html] - expected: ERROR + [Check that container queries is supported] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/size-feature-evaluation.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/size-feature-evaluation.html.ini index 7e1afb0335b0b..8ada0b1eb7393 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/size-feature-evaluation.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/size-feature-evaluation.html.ini @@ -1,2 +1,84 @@ [size-feature-evaluation.html] - expected: ERROR + [(width >= 100px) (.horizontal)] + expected: FAIL + + [(min-width: 100px) (.horizontal)] + expected: FAIL + + [(max-width: 100px) (.horizontal)] + expected: FAIL + + [(height >= 200px) (.horizontal)] + expected: FAIL + + [(min-height: 200px) (.horizontal)] + expected: FAIL + + [(max-height: 200px) (.horizontal)] + expected: FAIL + + [(inline-size >= 100px) (.horizontal)] + expected: FAIL + + [(min-inline-size: 100px) (.horizontal)] + expected: FAIL + + [(max-inline-size: 100px) (.horizontal)] + expected: FAIL + + [(block-size >= 200px) (.horizontal)] + expected: FAIL + + [(min-block-size: 200px) (.horizontal)] + expected: FAIL + + [(max-block-size: 200px) (.horizontal)] + expected: FAIL + + [(orientation: portrait) (.horizontal)] + expected: FAIL + + [(aspect-ratio: 1/2) (.horizontal)] + expected: FAIL + + [(width >= 100px) (.vertical)] + expected: FAIL + + [(min-width: 100px) (.vertical)] + expected: FAIL + + [(max-width: 100px) (.vertical)] + expected: FAIL + + [(height >= 200px) (.vertical)] + expected: FAIL + + [(min-height: 200px) (.vertical)] + expected: FAIL + + [(max-height: 200px) (.vertical)] + expected: FAIL + + [(block-size >= 100px) (.vertical)] + expected: FAIL + + [(min-block-size: 100px) (.vertical)] + expected: FAIL + + [(max-block-size: 100px) (.vertical)] + expected: FAIL + + [(inline-size >= 200px) (.vertical)] + expected: FAIL + + [(min-inline-size: 200px) (.vertical)] + expected: FAIL + + [(max-inline-size: 200px) (.vertical)] + expected: FAIL + + [(orientation: portrait) (.vertical)] + expected: FAIL + + [(aspect-ratio: 1/2) (.vertical)] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/style-change-in-container.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/style-change-in-container.html.ini index 90db297fc711a..a394a8ae697bf 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/style-change-in-container.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/style-change-in-container.html.ini @@ -1,2 +1,3 @@ [style-change-in-container.html] - expected: ERROR + [Basic test for container query evaluation stability] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/svg-foreignobject-no-size-container.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/svg-foreignobject-no-size-container.html.ini deleted file mode 100644 index ecfd70444c223..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/svg-foreignobject-no-size-container.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[svg-foreignobject-no-size-container.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/svg-g-no-size-container.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/svg-g-no-size-container.html.ini deleted file mode 100644 index 4213a08a8113f..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/svg-g-no-size-container.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[svg-g-no-size-container.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/svg-root-size-container.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/svg-root-size-container.html.ini index e7885ba7658f1..f9b04ee16b716 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/svg-root-size-container.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/svg-root-size-container.html.ini @@ -1,2 +1,6 @@ [svg-root-size-container.html] - expected: ERROR + [SVG text querying SVG root size container] + expected: FAIL + + [div in foreignObject querying SVG root size container] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/table-inside-container-changing-display.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/table-inside-container-changing-display.html.ini deleted file mode 100644 index dbb9c713fa6ae..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/table-inside-container-changing-display.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[table-inside-container-changing-display.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/top-layer-dialog-container.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/top-layer-dialog-container.html.ini index ff2fa350ce401..8acade9d67c0a 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/top-layer-dialog-container.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/top-layer-dialog-container.html.ini @@ -1,2 +1,3 @@ [top-layer-dialog-container.html] - expected: ERROR + [#dialog sized by viewport] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/top-layer-dialog.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/top-layer-dialog.html.ini index 41dcc8744afad..35f0120c587ab 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/top-layer-dialog.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/top-layer-dialog.html.ini @@ -1,2 +1,9 @@ [top-layer-dialog.html] - expected: ERROR + [#container changed to 200px] + expected: FAIL + + [Modal dialog still has parent as query container while in top layer] + expected: FAIL + + [Container changes width while dialog is in top layer] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/top-layer-nested-dialog.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/top-layer-nested-dialog.html.ini index 249dfb5daee12..af9391443a7c0 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/top-layer-nested-dialog.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/top-layer-nested-dialog.html.ini @@ -1,2 +1,3 @@ [top-layer-nested-dialog.html] - expected: ERROR + [@container queries start matching] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/transition-scrollbars.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/transition-scrollbars.html.ini index 47f716641310b..4239d37f4d7b6 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/transition-scrollbars.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/transition-scrollbars.html.ini @@ -1,2 +1,3 @@ [transition-scrollbars.html] - expected: ERROR + [Scrollbars do not cause a transition of background-color] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/transition-style-change-event.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/transition-style-change-event.html.ini index ea88c4c0f8494..805e5ca57d580 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/transition-style-change-event.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/transition-style-change-event.html.ini @@ -1,2 +1,3 @@ [transition-style-change-event.html] - expected: ERROR + [Container Queries - Style Change Event for transitions] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/unsupported-axis.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/unsupported-axis.html.ini index 9fbd827569bd3..1658c29088e52 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/unsupported-axis.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/unsupported-axis.html.ini @@ -1,2 +1,6 @@ [unsupported-axis.html] - expected: ERROR + [(width > 0px)] + expected: FAIL + + [(inline-size > 0px)] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/viewport-units-dynamic.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/viewport-units-dynamic.html.ini index 519f8fc86483f..063911fb83887 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/viewport-units-dynamic.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/viewport-units-dynamic.html.ini @@ -1,2 +1,3 @@ [viewport-units-dynamic.html] - expected: ERROR + [CSS Container Queries Test: @container-dependent elements respond to viewport unit changes] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/viewport-units.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/viewport-units.html.ini index b33875ea11d43..6663b20ea6eae 100644 --- a/testing/web-platform/meta/css/css-contain/container-queries/viewport-units.html.ini +++ b/testing/web-platform/meta/css/css-contain/container-queries/viewport-units.html.ini @@ -1,2 +1,6 @@ [viewport-units.html] - expected: ERROR + [Match width with vw] + expected: FAIL + + [Match width with vh] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/container-queries/whitespace-update-after-removal.html.ini b/testing/web-platform/meta/css/css-contain/container-queries/whitespace-update-after-removal.html.ini deleted file mode 100644 index 4d3034d71f7d9..0000000000000 --- a/testing/web-platform/meta/css/css-contain/container-queries/whitespace-update-after-removal.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[whitespace-update-after-removal.html] - expected: FAIL diff --git a/testing/web-platform/tests/css/css-contain/container-queries/container-parsing.html b/testing/web-platform/tests/css/css-contain/container-queries/container-parsing.html index 0167c120b50bc..1963603f5c6b8 100644 --- a/testing/web-platform/tests/css/css-contain/container-queries/container-parsing.html +++ b/testing/web-platform/tests/css/css-contain/container-queries/container-parsing.html @@ -23,7 +23,7 @@ test_valid_value('container', 'size / block-size'); test_valid_value('container', 'inline-size / inline-size'); test_valid_value('container', 'size / size'); -test_valid_value('container', 'size style / none', 'size style'); +test_valid_value('container', 'size style / none', 'style size'); test_valid_value('container', 'size / foo'); test_valid_value('container', 'size / foo bar'); diff --git a/testing/web-platform/tests/css/css-contain/container-queries/container-type-parsing.html b/testing/web-platform/tests/css/css-contain/container-queries/container-type-parsing.html index 2b28ebf1cd3c4..cce8aa3b90630 100644 --- a/testing/web-platform/tests/css/css-contain/container-queries/container-type-parsing.html +++ b/testing/web-platform/tests/css/css-contain/container-queries/container-type-parsing.html @@ -19,7 +19,7 @@ test_valid_value('container-type', 'size'); test_valid_value('container-type', 'inline-size'); -test_valid_value('container-type', 'inline-size style'); +test_valid_value('container-type', 'inline-size style', 'style inline-size'); test_valid_value('container-type', 'style inline-size'); test_valid_value('container-type', 'style size');