зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1762088 - Implement parsing / serialization for container{,-type,-name} CSS properties. r=firefox-style-system-reviewers,layout-reviewers,boris
Two noteworthy details that may seem random otherwise: * Moving values around in nsStyleDisplay is needed so that the struct remains under the size limit that we have to avoid jumping allocator buckets. * All the test expectation churn is because tests depend on `container-type: size` parsing to run, and now they run. Tests for the relevant bits I implemented are passing, with the only exception of some `container-name-computed.html` failures which are https://github.com/w3c/csswg-drafts/issues/7181. Safari agrees with us there. Other notes when looking at the spec and seeing how it matches the implementation: * `container` syntax doesn't match spec, but matches tests and sanity: https://github.com/w3c/csswg-drafts/issues/7180 * `container-type` syntax doesn't _quite_ match spec, but matches tests and I think it's a spec bug since the definition for the missing keyword is gone: https://github.com/w3c/csswg-drafts/issues/7179 Differential Revision: https://phabricator.services.mozilla.com/D142419
This commit is contained in:
Родитель
c805a1509a
Коммит
b9e7c7653c
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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" },
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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::StyleTransform mTransform;
|
||||
mozilla::StyleRotate mRotate;
|
||||
mozilla::StyleTranslate mTranslate;
|
||||
mozilla::StyleScale mScale;
|
||||
|
||||
mozilla::StyleBackfaceVisibility mBackfaceVisibility;
|
||||
mozilla::StyleTransformStyle mTransformStyle;
|
||||
StyleGeometryBox mTransformBox;
|
||||
mozilla::StyleGeometryBox mTransformBox;
|
||||
|
||||
mozilla::StyleTransform mTransform;
|
||||
mozilla::StyleRotate mRotate;
|
||||
|
||||
mozilla::StyleTranslate mTranslate;
|
||||
mozilla::StyleScale mScale;
|
||||
|
||||
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: <image>.
|
||||
float mShapeImageThreshold = 0.0f;
|
||||
|
||||
// The margin around a shape-outside: <image>.
|
||||
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: <image>.
|
||||
float mShapeImageThreshold = 0.0f;
|
||||
|
||||
// The margin around a shape-outside: <image>.
|
||||
mozilla::NonNegativeLengthPercentage mShapeMargin;
|
||||
|
||||
mozilla::StyleShapeOutside mShapeOutside;
|
||||
|
||||
bool HasAppearance() const {
|
||||
return EffectiveAppearance() != mozilla::StyleAppearance::None;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -463,6 +463,7 @@ class Longhand(Property):
|
|||
"ColumnCount",
|
||||
"Contain",
|
||||
"ContentVisibility",
|
||||
"ContainerType",
|
||||
"Display",
|
||||
"FillRule",
|
||||
"Float",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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<Longhands, ParseError<'i>> {
|
||||
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<W>(&self, dest: &mut CssWriter<W>) -> 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>
|
||||
|
||||
<%helpers:shorthand
|
||||
engines="gecko"
|
||||
name="page-break-before"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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<CustomIdent>);
|
||||
|
||||
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<Self, ParseError<'i>> {
|
||||
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<NonNegativeLength>;
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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<Path>,
|
||||
/// Whether there are overlapping bits we need to take care of when
|
||||
/// serializing.
|
||||
#[darling(default)]
|
||||
pub overlapping_bits: bool,
|
||||
}
|
||||
|
||||
impl CssBitflagAttrs {
|
||||
|
|
|
@ -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`.
|
||||
|
|
|
@ -148,6 +148,8 @@ include = [
|
|||
"LineBreak",
|
||||
"WordBreak",
|
||||
"Contain",
|
||||
"ContainerType",
|
||||
"ContainerName",
|
||||
"ContentVisibility",
|
||||
"Origin",
|
||||
"RestyleHint",
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
prefs: [layout.css.container-queries.enabled:true]
|
|
@ -1,2 +1,3 @@
|
|||
[animation-container-size.html]
|
||||
expected: ERROR
|
||||
[Animation affects container query evaluation]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[animation-container-type-dynamic.html]
|
||||
expected: ERROR
|
||||
[Animated container creating new container]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[animation-nested-animation.html]
|
||||
expected: ERROR
|
||||
[Animated container can create inner animation]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[animation-nested-transition.html]
|
||||
expected: ERROR
|
||||
[Animated container size triggers transition]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[backdrop-invalidation.html]
|
||||
expected: ERROR
|
||||
[Pseudo-element ::backdrop responds to container size changes]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[canvas-as-container-001.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[canvas-as-container-002.html]
|
||||
expected: FAIL
|
|
@ -1,2 +1,3 @@
|
|||
[canvas-as-container-005.html]
|
||||
expected: ERROR
|
||||
[Focusable after container size change]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[canvas-as-container-006.html]
|
||||
expected: ERROR
|
||||
[Focusable after container size change]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[chrome-legacy-skip-recalc.html]
|
||||
expected: FAIL
|
|
@ -1,2 +1,3 @@
|
|||
[conditional-container-status.html]
|
||||
expected: ERROR
|
||||
[Conditionally applying container-type:initial]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[container-computed.html]
|
||||
expected: ERROR
|
|
@ -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
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[container-inheritance.html]
|
||||
expected: ERROR
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[container-longhand-animation-type.html]
|
||||
expected: ERROR
|
||||
[Reference variable is applied]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[container-name-parsing.html]
|
||||
expected: ERROR
|
|
@ -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
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[container-parsing.html]
|
||||
expected: ERROR
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[container-type-computed.html]
|
||||
expected: ERROR
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[container-type-invalidation.html]
|
||||
expected: ERROR
|
||||
[Changing the container type invalidates relevant descendants]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[container-type-layout-invalidation.html]
|
||||
expected: ERROR
|
||||
[Changing container-type invalidates layout]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[container-type-parsing.html]
|
||||
expected: ERROR
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
[container-units-basic.html]
|
||||
expected: ERROR
|
||||
[Container relative units]
|
||||
expected: FAIL
|
||||
|
||||
[Container relative units in math functions]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[container-units-small-viewport-fallback.html]
|
||||
expected: ERROR
|
||||
[Use small viewport size as fallback]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[counters-flex-circular.html]
|
||||
expected: ERROR
|
||||
[The container query should match the layed out width]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[get-animations.html]
|
||||
expected: ERROR
|
||||
[Calling getAnimations updates layout of parent frame if needed]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[iframe-invalidation.html]
|
||||
expected: ERROR
|
||||
[@container-dependent elements respond to iframe size changes]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[ineligible-containment.html]
|
||||
expected: ERROR
|
||||
[Changing containment eligibility invalidates style]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[inline-size-and-min-width.html]
|
||||
expected: ERROR
|
||||
[min-width of inline-size container affects container size]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[inline-size-containment-vertical-rl.html]
|
||||
expected: ERROR
|
||||
[inline-size containment only]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[inline-size-containment.html]
|
||||
expected: ERROR
|
||||
[inline-size containment only]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[layout-dependent-focus.html]
|
||||
expected: ERROR
|
||||
[Verify that onblur is called on hidden input]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[never-match-container.html]
|
||||
expected: ERROR
|
|
@ -1,2 +1,3 @@
|
|||
[orthogonal-wm-container-query.html]
|
||||
expected: ERROR
|
||||
[Orthogonal width]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[size-container-no-principal-box.html]
|
||||
expected: ERROR
|
||||
[Check that container queries is supported]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[style-change-in-container.html]
|
||||
expected: ERROR
|
||||
[Basic test for container query evaluation stability]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[svg-foreignobject-no-size-container.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[svg-g-no-size-container.html]
|
||||
expected: FAIL
|
|
@ -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
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[table-inside-container-changing-display.html]
|
||||
expected: FAIL
|
|
@ -1,2 +1,3 @@
|
|||
[top-layer-dialog-container.html]
|
||||
expected: ERROR
|
||||
[#dialog sized by viewport]
|
||||
expected: FAIL
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[top-layer-nested-dialog.html]
|
||||
expected: ERROR
|
||||
[@container queries start matching]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[transition-scrollbars.html]
|
||||
expected: ERROR
|
||||
[Scrollbars do not cause a transition of background-color]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[transition-style-change-event.html]
|
||||
expected: ERROR
|
||||
[Container Queries - Style Change Event for transitions]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
[unsupported-axis.html]
|
||||
expected: ERROR
|
||||
[(width > 0px)]
|
||||
expected: FAIL
|
||||
|
||||
[(inline-size > 0px)]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
[viewport-units-dynamic.html]
|
||||
expected: ERROR
|
||||
[CSS Container Queries Test: @container-dependent elements respond to viewport unit changes]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
[viewport-units.html]
|
||||
expected: ERROR
|
||||
[Match width with vw]
|
||||
expected: FAIL
|
||||
|
||||
[Match width with vh]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[whitespace-update-after-removal.html]
|
||||
expected: FAIL
|
|
@ -23,7 +23,7 @@ test_valid_value('container', 'size');
|
|||
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');
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ test_valid_value('container-type', 'style');
|
|||
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');
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче