Backed out changeset 99ab9844b58a (bug 1769612) for causing web-platform failures on container-size-invalidation-after-load.html.

This commit is contained in:
Marian-Vasile Laza 2022-05-20 05:20:30 +03:00
Родитель dfc5ffc7fa
Коммит 63d03ac9e2
53 изменённых файлов: 271 добавлений и 662 удалений

Просмотреть файл

@ -42,7 +42,13 @@ pub struct CascadePriority {
layer_order: LayerOrder,
}
const_assert_eq!(std::mem::size_of::<CascadePriority>(), std::mem::size_of::<u32>());
#[allow(dead_code)]
fn size_assert() {
#[allow(unsafe_code)]
unsafe {
std::mem::transmute::<u32, CascadePriority>(0u32)
};
}
impl PartialOrd for CascadePriority {
#[inline]

Просмотреть файл

@ -935,9 +935,6 @@ pub trait TElement:
/// Returns element's namespace.
fn namespace(&self)
-> &<SelectorImpl as selectors::parser::SelectorImpl>::BorrowedNamespaceUrl;
/// Returns the size of the primary box of the element.
fn primary_box_size(&self) -> euclid::default::Size2D<app_units::Au>;
}
/// TNode and TElement aren't Send because we want to be careful and explicit

Просмотреть файл

@ -6,7 +6,7 @@
use crate::gecko_bindings::bindings;
use crate::gecko_bindings::structs;
use crate::queries::feature::{AllowsRanges, Evaluator, FeatureFlags, QueryFeatureDescription};
use crate::queries::feature::{AllowsRanges, Evaluator, ParsingRequirements, QueryFeatureDescription};
use crate::queries::values::Orientation;
use crate::media_queries::{Device, MediaType};
use crate::values::computed::{Context, CSSPixelLength, Ratio, Resolution};
@ -548,7 +548,7 @@ macro_rules! lnf_int_feature {
$feature_name,
AllowsRanges::No,
Evaluator::BoolInteger(__eval),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
)
}};
($feature_name:expr, $int_id:ident) => {{
@ -576,7 +576,7 @@ macro_rules! bool_pref_feature {
$feature_name,
AllowsRanges::No,
Evaluator::BoolInteger(__eval),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
)
}};
}
@ -591,49 +591,49 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 60] = [
atom!("width"),
AllowsRanges::Yes,
Evaluator::Length(eval_width),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("height"),
AllowsRanges::Yes,
Evaluator::Length(eval_height),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("aspect-ratio"),
AllowsRanges::Yes,
Evaluator::NumberRatio(eval_aspect_ratio),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("orientation"),
AllowsRanges::No,
keyword_evaluator!(eval_orientation, Orientation),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("device-width"),
AllowsRanges::Yes,
Evaluator::Length(eval_device_width),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("device-height"),
AllowsRanges::Yes,
Evaluator::Length(eval_device_height),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("device-aspect-ratio"),
AllowsRanges::Yes,
Evaluator::NumberRatio(eval_device_aspect_ratio),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("-moz-device-orientation"),
AllowsRanges::No,
keyword_evaluator!(eval_device_orientation, Orientation),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
// Webkit extensions that we support for de-facto web compatibility.
// -webkit-{min|max}-device-pixel-ratio (controlled with its own pref):
@ -641,68 +641,68 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 60] = [
atom!("device-pixel-ratio"),
AllowsRanges::Yes,
Evaluator::Float(eval_device_pixel_ratio),
FeatureFlags::WEBKIT_PREFIX,
ParsingRequirements::WEBKIT_PREFIX,
),
// -webkit-transform-3d.
feature!(
atom!("transform-3d"),
AllowsRanges::No,
Evaluator::BoolInteger(eval_transform_3d),
FeatureFlags::WEBKIT_PREFIX,
ParsingRequirements::WEBKIT_PREFIX,
),
feature!(
atom!("-moz-device-pixel-ratio"),
AllowsRanges::Yes,
Evaluator::Float(eval_device_pixel_ratio),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("resolution"),
AllowsRanges::Yes,
Evaluator::Resolution(eval_resolution),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("display-mode"),
AllowsRanges::No,
keyword_evaluator!(eval_display_mode, DisplayMode),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("grid"),
AllowsRanges::No,
Evaluator::BoolInteger(eval_grid),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("scan"),
AllowsRanges::No,
keyword_evaluator!(eval_scan, Scan),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("color"),
AllowsRanges::Yes,
Evaluator::Integer(eval_color),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("color-index"),
AllowsRanges::Yes,
Evaluator::Integer(eval_color_index),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("monochrome"),
AllowsRanges::Yes,
Evaluator::Integer(eval_monochrome),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("prefers-reduced-motion"),
AllowsRanges::No,
keyword_evaluator!(eval_prefers_reduced_motion, PrefersReducedMotion),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("prefers-contrast"),
@ -713,49 +713,49 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 60] = [
// layout.css.prefers-contrast.enabled preference. See
// disabed_by_pref in media_feature_expression.rs for how that
// is done.
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("forced-colors"),
AllowsRanges::No,
keyword_evaluator!(eval_forced_colors, ForcedColors),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("overflow-block"),
AllowsRanges::No,
keyword_evaluator!(eval_overflow_block, OverflowBlock),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("overflow-inline"),
AllowsRanges::No,
keyword_evaluator!(eval_overflow_inline, OverflowInline),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("update"),
AllowsRanges::No,
keyword_evaluator!(eval_update, Update),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("prefers-color-scheme"),
AllowsRanges::No,
keyword_evaluator!(eval_prefers_color_scheme, PrefersColorScheme),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("dynamic-range"),
AllowsRanges::No,
keyword_evaluator!(eval_dynamic_range, DynamicRange),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("video-dynamic-range"),
AllowsRanges::No,
keyword_evaluator!(eval_video_dynamic_range, DynamicRange),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
// Evaluates to the preferred color scheme for content. Only useful in
// chrome context, where the chrome color-scheme and the content
@ -764,31 +764,31 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 60] = [
atom!("-moz-content-prefers-color-scheme"),
AllowsRanges::No,
keyword_evaluator!(eval_content_prefers_color_scheme, PrefersColorScheme),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
),
feature!(
atom!("pointer"),
AllowsRanges::No,
keyword_evaluator!(eval_pointer, Pointer),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("any-pointer"),
AllowsRanges::No,
keyword_evaluator!(eval_any_pointer, Pointer),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("hover"),
AllowsRanges::No,
keyword_evaluator!(eval_hover, Hover),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
feature!(
atom!("any-hover"),
AllowsRanges::No,
keyword_evaluator!(eval_any_hover, Hover),
FeatureFlags::empty(),
ParsingRequirements::empty(),
),
// Internal -moz-is-glyph media feature: applies only inside SVG glyphs.
// Internal because it is really only useful in the user agent anyway
@ -797,43 +797,43 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 60] = [
atom!("-moz-is-glyph"),
AllowsRanges::No,
Evaluator::BoolInteger(eval_moz_is_glyph),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
),
feature!(
atom!("-moz-is-resource-document"),
AllowsRanges::No,
Evaluator::BoolInteger(eval_moz_is_resource_document),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
),
feature!(
atom!("-moz-platform"),
AllowsRanges::No,
keyword_evaluator!(eval_moz_platform, Platform),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
),
feature!(
atom!("-moz-print-preview"),
AllowsRanges::No,
Evaluator::BoolInteger(eval_moz_print_preview),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
),
feature!(
atom!("-moz-non-native-content-theme"),
AllowsRanges::No,
Evaluator::BoolInteger(eval_moz_non_native_content_theme),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
),
feature!(
atom!("-moz-windows-non-native-menus"),
AllowsRanges::No,
Evaluator::BoolInteger(eval_moz_windows_non_native_menus),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
),
feature!(
atom!("-moz-overlay-scrollbars"),
AllowsRanges::No,
Evaluator::BoolInteger(eval_moz_overlay_scrollbars),
FeatureFlags::CHROME_AND_UA_ONLY,
ParsingRequirements::CHROME_AND_UA_ONLY,
),
lnf_int_feature!(
atom!("-moz-scrollbar-start-backward"),

Просмотреть файл

@ -70,8 +70,6 @@ use crate::values::specified::length::FontBaseSize;
use crate::values::{AtomIdent, AtomString};
use crate::CaseSensitivityExt;
use crate::LocalName;
use app_units::Au;
use euclid::default::Size2D;
use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
use fxhash::FxHashMap;
use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator};
@ -328,11 +326,6 @@ impl<'ln> GeckoNode<'ln> {
self.flags() & (NODE_IS_IN_SHADOW_TREE as u32) != 0
}
#[inline]
fn is_connected(&self) -> bool {
self.get_bool_flag(nsINode_BooleanFlag::IsConnected)
}
/// WARNING: This logic is duplicated in Gecko's FlattenedTreeParentIsParent.
/// Make sure to mirror any modifications in both places.
#[inline]
@ -1172,21 +1165,6 @@ impl<'le> TElement for GeckoElement<'le> {
}
}
#[inline]
fn primary_box_size(&self) -> Size2D<Au> {
if !self.as_node().is_connected() {
return Size2D::zero();
}
unsafe {
let frame = self.0._base._base._base.__bindgen_anon_1.mPrimaryFrame.as_ref();
if frame.is_null() {
return Size2D::zero();
}
Size2D::new(Au((**frame).mRect.width), Au((**frame).mRect.height))
}
}
/// Return the list of slotted nodes of this node.
#[inline]
fn slotted_nodes(&self) -> &[Self::ConcreteNode] {

Просмотреть файл

@ -64,6 +64,7 @@ pub use servo_arc;
#[cfg(feature = "servo")]
#[macro_use]
extern crate servo_atoms;
#[cfg(target_pointer_width = "64")]
#[macro_use]
extern crate static_assertions;
#[macro_use]

Просмотреть файл

@ -168,11 +168,6 @@ impl WritingMode {
flags
}
/// Returns the `horizontal-tb` value.
pub fn horizontal_tb() -> Self {
Self::from_bits_truncate(0)
}
#[inline]
pub fn is_vertical(&self) -> bool {
self.intersects(WritingMode::VERTICAL)

Просмотреть файл

@ -298,7 +298,6 @@ where
in_media_query: false,
for_smil_animation: false,
for_non_inherited_property: None,
container_info: None,
font_metrics_provider,
quirks_mode,
rule_cache_conditions: RefCell::new(rule_cache_conditions),

Просмотреть файл

@ -7,7 +7,7 @@
//! https://drafts.csswg.org/mediaqueries-4/#typedef-media-condition
//! https://drafts.csswg.org/css-contain-3/#typedef-container-condition
use super::{QueryFeatureExpression, FeatureType, FeatureFlags};
use super::{QueryFeatureExpression, FeatureType};
use crate::parser::ParserContext;
use crate::values::computed;
use cssparser::{Parser, Token};
@ -85,35 +85,6 @@ impl QueryCondition {
Self::parse_internal(context, input, feature_type, AllowOr::Yes)
}
fn visit<F>(&self, visitor: &mut F)
where
F: FnMut(&Self),
{
visitor(self);
match *self {
Self::Feature(..) => {},
Self::Not(ref cond) => cond.visit(visitor),
Self::Operation(ref conds, _op) => {
for cond in conds.iter() {
cond.visit(visitor);
}
},
Self::InParens(ref cond) => cond.visit(visitor),
}
}
/// Returns the union of all flags in the expression. This is useful for
/// container queries.
pub fn cumulative_flags(&self) -> FeatureFlags {
let mut result = FeatureFlags::empty();
self.visit(&mut |condition| {
if let Self::Feature(ref f) = condition {
result.insert(f.feature_flags())
}
});
result
}
/// Parse a single condition, disallowing `or` expressions.
///
/// To be used from the legacy query syntax.

Просмотреть файл

@ -101,42 +101,13 @@ macro_rules! keyword_evaluator {
}
bitflags! {
/// Different flags or toggles that change how a expression is parsed or
/// evaluated.
#[derive(ToShmem)]
pub struct FeatureFlags : u8 {
/// Different requirements or toggles that change how a expression is
/// parsed.
pub struct ParsingRequirements: u8 {
/// The feature should only be parsed in chrome and ua sheets.
const CHROME_AND_UA_ONLY = 1 << 0;
/// The feature requires a -webkit- prefix.
const WEBKIT_PREFIX = 1 << 1;
/// The feature requires the inline-axis containment.
const CONTAINER_REQUIRES_INLINE_AXIS = 1 << 2;
/// The feature requires the block-axis containment.
const CONTAINER_REQUIRES_BLOCK_AXIS = 1 << 3;
/// The feature requires containment in the physical width axis.
const CONTAINER_REQUIRES_WIDTH_AXIS = 1 << 4;
/// The feature requires containment in the physical height axis.
const CONTAINER_REQUIRES_HEIGHT_AXIS = 1 << 5;
}
}
impl FeatureFlags {
/// Returns parsing requirement flags.
pub fn parsing_requirements(self) -> Self {
self.intersection(Self::CHROME_AND_UA_ONLY | Self::WEBKIT_PREFIX)
}
/// Returns all the container axis flags.
pub fn all_container_axes() -> Self {
Self::CONTAINER_REQUIRES_INLINE_AXIS |
Self::CONTAINER_REQUIRES_BLOCK_AXIS |
Self::CONTAINER_REQUIRES_WIDTH_AXIS |
Self::CONTAINER_REQUIRES_HEIGHT_AXIS
}
/// Returns our subset of container axis flags.
pub fn container_axes(self) -> Self {
self.intersection(Self::all_container_axes())
}
}
@ -157,8 +128,9 @@ pub struct QueryFeatureDescription {
/// The evaluator, which we also use to determine which kind of value to
/// parse.
pub evaluator: Evaluator,
/// Different feature-specific flags.
pub flags: FeatureFlags,
/// Different requirements that need to hold for the feature to be
/// successfully parsed.
pub requirements: ParsingRequirements,
}
impl QueryFeatureDescription {
@ -171,12 +143,12 @@ impl QueryFeatureDescription {
/// A simple helper to construct a `QueryFeatureDescription`.
macro_rules! feature {
($name:expr, $allows_ranges:expr, $evaluator:expr, $flags:expr,) => {
($name:expr, $allows_ranges:expr, $evaluator:expr, $reqs:expr,) => {
$crate::queries::feature::QueryFeatureDescription {
name: $name,
allows_ranges: $allows_ranges,
evaluator: $evaluator,
flags: $flags,
requirements: $reqs,
}
};
}
@ -186,7 +158,7 @@ impl fmt::Debug for QueryFeatureDescription {
f.debug_struct("QueryFeatureDescription")
.field("name", &self.name)
.field("allows_ranges", &self.allows_ranges)
.field("flags", &self.flags)
.field("requirements", &self.requirements)
.finish()
}
}

Просмотреть файл

@ -6,7 +6,7 @@
//! `(width >= 400px)`.
use super::feature::{Evaluator, QueryFeatureDescription};
use super::feature::{KeywordDiscriminant, FeatureFlags};
use super::feature::{KeywordDiscriminant, ParsingRequirements};
use crate::parser::{Parse, ParserContext};
use crate::str::{starts_with_ignore_ascii_case, string_as_ascii_lowercase};
use crate::values::computed::{self, Ratio, ToComputedValue};
@ -337,7 +337,10 @@ impl QueryFeatureExpression {
W: fmt::Write,
{
let feature = self.feature();
if feature.flags.contains(FeatureFlags::WEBKIT_PREFIX) {
if feature
.requirements
.contains(ParsingRequirements::WEBKIT_PREFIX)
{
dest.write_str("-webkit-")?;
}
@ -358,11 +361,6 @@ impl QueryFeatureExpression {
&self.feature_type.features()[self.feature_index]
}
/// Returns the feature flags for our feature.
pub fn feature_flags(&self) -> FeatureFlags {
self.feature().flags
}
/// Parse a feature expression of the form:
///
/// ```
@ -384,18 +382,18 @@ impl QueryFeatureExpression {
input: &mut Parser<'i, 't>,
feature_type: FeatureType,
) -> Result<(usize, Option<LegacyRange>), ParseError<'i>> {
let mut flags = FeatureFlags::empty();
let mut requirements = ParsingRequirements::empty();
let location = input.current_source_location();
let ident = input.expect_ident()?;
if context.in_ua_or_chrome_sheet() {
flags.insert(FeatureFlags::CHROME_AND_UA_ONLY);
requirements.insert(ParsingRequirements::CHROME_AND_UA_ONLY);
}
let mut feature_name = &**ident;
if starts_with_ignore_ascii_case(feature_name, "-webkit-") {
feature_name = &feature_name[8..];
flags.insert(FeatureFlags::WEBKIT_PREFIX);
requirements.insert(ParsingRequirements::WEBKIT_PREFIX);
}
let range = if starts_with_ignore_ascii_case(feature_name, "min-") {
@ -419,7 +417,7 @@ impl QueryFeatureExpression {
};
if disabled_by_pref(&feature.name, context) ||
!flags.contains(feature.flags.parsing_requirements()) ||
!requirements.contains(feature.requirements) ||
(range.is_some() && !feature.allows_ranges())
{
return Err(location.new_custom_error(

Просмотреть файл

@ -15,5 +15,4 @@ pub mod feature_expression;
pub mod values;
pub use self::condition::QueryCondition;
pub use self::feature::FeatureFlags;
pub use self::feature_expression::{QueryFeatureExpression, FeatureType};

Просмотреть файл

@ -225,7 +225,6 @@ where
&mut self.context,
cascade_level,
cascade_data,
&self.stylist,
);
}
@ -244,7 +243,6 @@ where
&mut self.context,
cascade_level,
cascade_data,
&self.stylist,
);
}

Просмотреть файл

@ -10,7 +10,7 @@ use crate::context::QuirksMode;
use crate::dom::TElement;
use crate::rule_tree::CascadeLevel;
use crate::selector_parser::SelectorImpl;
use crate::stylist::{Stylist, CascadeData, Rule, ContainerConditionId};
use crate::stylist::{CascadeData, Rule};
use crate::AllocErr;
use crate::{Atom, LocalName, Namespace, ShrinkIfNeeded, WeakAtom};
use precomputed_hash::PrecomputedHash;
@ -188,10 +188,9 @@ impl SelectorMap<Rule> {
element: E,
rule_hash_target: E,
matching_rules_list: &mut ApplicableDeclarationList,
matching_context: &mut MatchingContext<E::Impl>,
context: &mut MatchingContext<E::Impl>,
cascade_level: CascadeLevel,
cascade_data: &CascadeData,
stylist: &Stylist,
) where
E: TElement,
{
@ -199,17 +198,16 @@ impl SelectorMap<Rule> {
return;
}
let quirks_mode = matching_context.quirks_mode();
let quirks_mode = context.quirks_mode();
if rule_hash_target.is_root() {
SelectorMap::get_matching_rules(
element,
&self.root,
matching_rules_list,
matching_context,
context,
cascade_level,
cascade_data,
stylist,
);
}
@ -219,10 +217,9 @@ impl SelectorMap<Rule> {
element,
rules,
matching_rules_list,
matching_context,
context,
cascade_level,
cascade_data,
stylist,
)
}
}
@ -233,10 +230,9 @@ impl SelectorMap<Rule> {
element,
rules,
matching_rules_list,
matching_context,
context,
cascade_level,
cascade_data,
stylist,
)
}
});
@ -248,10 +244,9 @@ impl SelectorMap<Rule> {
element,
rules,
matching_rules_list,
matching_context,
context,
cascade_level,
cascade_data,
stylist,
)
}
});
@ -262,10 +257,9 @@ impl SelectorMap<Rule> {
element,
rules,
matching_rules_list,
matching_context,
context,
cascade_level,
cascade_data,
stylist,
)
}
@ -274,10 +268,9 @@ impl SelectorMap<Rule> {
element,
rules,
matching_rules_list,
matching_context,
context,
cascade_level,
cascade_data,
stylist,
)
}
@ -285,10 +278,9 @@ impl SelectorMap<Rule> {
element,
&self.other,
matching_rules_list,
matching_context,
context,
cascade_level,
cascade_data,
stylist,
);
}
@ -297,32 +289,23 @@ impl SelectorMap<Rule> {
element: E,
rules: &[Rule],
matching_rules: &mut ApplicableDeclarationList,
matching_context: &mut MatchingContext<E::Impl>,
context: &mut MatchingContext<E::Impl>,
cascade_level: CascadeLevel,
cascade_data: &CascadeData,
stylist: &Stylist,
) where
E: TElement,
{
for rule in rules {
if !matches_selector(
if matches_selector(
&rule.selector,
0,
Some(&rule.hashes),
&element,
matching_context,
context,
) {
continue;
matching_rules
.push(rule.to_applicable_declaration_block(cascade_level, cascade_data));
}
if rule.container_condition_id != ContainerConditionId::none() {
if !cascade_data.container_condition_matches(rule.container_condition_id, stylist, element) {
continue;
}
}
matching_rules
.push(rule.to_applicable_declaration_block(cascade_level, cascade_data));
}
}
}

Просмотреть файл

@ -7,34 +7,32 @@
//! [container]: https://drafts.csswg.org/css-contain-3/#container-rule
use crate::logical_geometry::{WritingMode, LogicalSize};
use crate::dom::TElement;
use crate::media_queries::Device;
use crate::parser::ParserContext;
use crate::queries::{QueryCondition, FeatureType};
use crate::queries::feature::{AllowsRanges, Evaluator, FeatureFlags, QueryFeatureDescription};
use crate::queries::values::Orientation;
use crate::str::CssStringWriter;
use crate::queries::QueryCondition;
use crate::shared_lock::{
DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard,
};
use crate::values::specified::ContainerName;
use crate::values::computed::{Context, CSSPixelLength, Ratio};
use crate::properties::ComputedValues;
use crate::str::CssStringWriter;
use crate::stylesheets::CssRules;
use crate::queries::feature::{AllowsRanges, Evaluator, ParsingRequirements, QueryFeatureDescription};
use crate::queries::values::Orientation;
use app_units::Au;
use cssparser::{SourceLocation, Parser};
use cssparser::SourceLocation;
use euclid::default::Size2D;
#[cfg(feature = "gecko")]
use malloc_size_of::{MallocSizeOfOps, MallocUnconditionalShallowSizeOf};
use servo_arc::Arc;
use std::fmt::{self, Write};
use style_traits::{CssWriter, ToCss, ParseError};
use style_traits::{CssWriter, ToCss};
/// A container rule.
#[derive(Debug, ToShmem)]
pub struct ContainerRule {
/// The container query and name.
pub condition: Arc<ContainerCondition>,
/// The container name.
pub name: ContainerName,
/// The container query.
pub condition: ContainerCondition,
/// The nested rules inside the block.
pub rules: Arc<Locked<CssRules>>,
/// The source position where this rule was found.
@ -42,11 +40,6 @@ pub struct ContainerRule {
}
impl ContainerRule {
/// Returns the query condition.
pub fn query_condition(&self) -> &QueryCondition {
&self.condition.condition
}
/// Measure heap usage.
#[cfg(feature = "gecko")]
pub fn size_of(&self, guard: &SharedRwLockReadGuard, ops: &mut MallocSizeOfOps) -> usize {
@ -65,6 +58,7 @@ impl DeepCloneWithLock for ContainerRule {
) -> Self {
let rules = self.rules.read_with(guard);
Self {
name: self.name.clone(),
condition: self.condition.clone(),
rules: Arc::new(lock.wrap(rules.deep_clone_with_lock(lock, guard, params))),
source_location: self.source_location.clone(),
@ -77,163 +71,51 @@ impl ToCssWithGuard for ContainerRule {
dest.write_str("@container ")?;
{
let mut writer = CssWriter::new(dest);
if !self.condition.name.is_none() {
self.condition.name.to_css(&mut writer)?;
if !self.name.is_none() {
self.name.to_css(&mut writer)?;
writer.write_char(' ')?;
}
self.condition.condition.to_css(&mut writer)?;
self.condition.to_css(&mut writer)?;
}
self.rules.read_with(guard).to_css_block(guard, dest)
}
}
/// A container condition and filter, combined.
#[derive(Debug, ToShmem)]
pub struct ContainerCondition {
name: ContainerName,
condition: QueryCondition,
flags: FeatureFlags,
}
/// TODO: Factor out the media query code to work with containers.
pub type ContainerCondition = QueryCondition;
impl ContainerCondition {
/// Parse a container condition.
pub fn parse<'a>(
context: &ParserContext,
input: &mut Parser<'a, '_>,
) -> Result<Self, ParseError<'a>> {
use crate::parser::Parse;
// FIXME: This is a bit ambiguous:
// https://github.com/w3c/csswg-drafts/issues/7203
let name = input.try_parse(|input| {
ContainerName::parse(context, input)
}).ok().unwrap_or_else(ContainerName::none);
let condition = QueryCondition::parse(context, input, FeatureType::Container)?;
let flags = condition.cumulative_flags();
Ok(Self { name, condition, flags })
}
fn valid_container_info<E>(&self, potential_container: E) -> Option<(ContainerInfo, Arc<ComputedValues>)>
where
E: TElement,
{
use crate::values::computed::ContainerType;
fn container_type_axes(ty_: ContainerType, wm: WritingMode) -> FeatureFlags {
if ty_.intersects(ContainerType::SIZE) {
return FeatureFlags::all_container_axes()
}
if ty_.intersects(ContainerType::INLINE_SIZE) {
let physical_axis = if wm.is_vertical() {
FeatureFlags::CONTAINER_REQUIRES_HEIGHT_AXIS
} else {
FeatureFlags::CONTAINER_REQUIRES_WIDTH_AXIS
};
return FeatureFlags::CONTAINER_REQUIRES_INLINE_AXIS | physical_axis
}
FeatureFlags::empty()
}
let data = match potential_container.borrow_data() {
Some(data) => data,
None => return None,
};
let style = data.styles.primary();
let wm = style.writing_mode;
let box_style = style.get_box();
// Filter by container-type.
let container_type = box_style.clone_container_type();
let available_axes = container_type_axes(container_type, wm);
if !available_axes.contains(self.flags.container_axes()) {
return None;
}
// Filter by container-name.
let container_name = box_style.clone_container_name();
for filter_name in self.name.0.iter() {
if !container_name.0.contains(filter_name) {
return None;
}
}
let size = potential_container.primary_box_size();
let style = style.clone();
Some((ContainerInfo { size, wm }, style))
}
fn find_container<E>(&self, mut e: E) -> Option<(ContainerInfo, Arc<ComputedValues>)>
where
E: TElement,
{
while let Some(element) = e.traversal_parent() {
if let Some(info) = self.valid_container_info(element) {
return Some(info);
}
e = element;
}
None
}
/// Tries to match a container query condition for a given element.
pub(crate) fn matches<E>(&self, device: &Device, element: E) -> bool
where
E: TElement,
{
let info = self.find_container(element);
Context::for_container_query_evaluation(device, info, |context| {
self.condition.matches(context)
})
}
}
/// Information needed to evaluate an individual container query.
#[derive(Copy, Clone)]
pub struct ContainerInfo {
size: Size2D<Au>,
wm: WritingMode,
}
fn get_container(context: &Context) -> ContainerInfo {
if let Some(ref info) = context.container_info {
return info.clone()
}
ContainerInfo {
size: context.device().au_viewport_size(),
wm: WritingMode::horizontal_tb(),
}
fn get_container(_context: &Context) -> (Size2D<Au>, WritingMode) {
unimplemented!("TODO: implement container matching");
}
fn eval_width(context: &Context) -> CSSPixelLength {
let info = get_container(context);
CSSPixelLength::new(info.size.width.to_f32_px())
let (size, _wm) = get_container(context);
CSSPixelLength::new(size.width.to_f32_px())
}
fn eval_height(context: &Context) -> CSSPixelLength {
let info = get_container(context);
CSSPixelLength::new(info.size.height.to_f32_px())
let (size, _wm) = get_container(context);
CSSPixelLength::new(size.height.to_f32_px())
}
fn eval_inline_size(context: &Context) -> CSSPixelLength {
let info = get_container(context);
CSSPixelLength::new(LogicalSize::from_physical(info.wm, info.size).inline.to_f32_px())
let (size, wm) = get_container(context);
CSSPixelLength::new(LogicalSize::from_physical(wm, size).inline.to_f32_px())
}
fn eval_block_size(context: &Context) -> CSSPixelLength {
let info = get_container(context);
CSSPixelLength::new(LogicalSize::from_physical(info.wm, info.size).block.to_f32_px())
let (size, wm) = get_container(context);
CSSPixelLength::new(LogicalSize::from_physical(wm, size).block.to_f32_px())
}
fn eval_aspect_ratio(context: &Context) -> Ratio {
let info = get_container(context);
Ratio::new(info.size.width.0 as f32, info.size.height.0 as f32)
let (size, _wm) = get_container(context);
Ratio::new(size.width.0 as f32, size.height.0 as f32)
}
fn eval_orientation(context: &Context, value: Option<Orientation>) -> bool {
let info = get_container(context);
Orientation::eval(info.size, value)
let (size, _wm) = get_container(context);
Orientation::eval(size, value)
}
/// https://drafts.csswg.org/css-contain-3/#container-features
@ -244,38 +126,36 @@ pub static CONTAINER_FEATURES: [QueryFeatureDescription; 6] = [
atom!("width"),
AllowsRanges::Yes,
Evaluator::Length(eval_width),
FeatureFlags::CONTAINER_REQUIRES_WIDTH_AXIS,
ParsingRequirements::empty(),
),
feature!(
atom!("height"),
AllowsRanges::Yes,
Evaluator::Length(eval_height),
FeatureFlags::CONTAINER_REQUIRES_HEIGHT_AXIS,
ParsingRequirements::empty(),
),
feature!(
atom!("inline-size"),
AllowsRanges::Yes,
Evaluator::Length(eval_inline_size),
FeatureFlags::CONTAINER_REQUIRES_INLINE_AXIS,
ParsingRequirements::empty(),
),
feature!(
atom!("block-size"),
AllowsRanges::Yes,
Evaluator::Length(eval_block_size),
FeatureFlags::CONTAINER_REQUIRES_BLOCK_AXIS,
ParsingRequirements::empty(),
),
feature!(
atom!("aspect-ratio"),
AllowsRanges::Yes,
Evaluator::NumberRatio(eval_aspect_ratio),
// XXX from_bits_truncate is const, but the pipe operator isn't, so this
// works around it.
FeatureFlags::from_bits_truncate(FeatureFlags::CONTAINER_REQUIRES_BLOCK_AXIS.bits() | FeatureFlags::CONTAINER_REQUIRES_INLINE_AXIS.bits()),
ParsingRequirements::empty(),
),
feature!(
atom!("orientation"),
AllowsRanges::No,
keyword_evaluator!(eval_orientation, Orientation),
FeatureFlags::from_bits_truncate(FeatureFlags::CONTAINER_REQUIRES_BLOCK_AXIS.bits() | FeatureFlags::CONTAINER_REQUIRES_INLINE_AXIS.bits()),
ParsingRequirements::empty(),
),
];

Просмотреть файл

@ -10,6 +10,7 @@ use crate::font_face::parse_font_face_block;
use crate::media_queries::MediaList;
use crate::parser::{Parse, ParserContext};
use crate::properties::parse_property_declaration_list;
use crate::queries::FeatureType;
use crate::selector_parser::{SelectorImpl, SelectorParser};
use crate::shared_lock::{Locked, SharedRwLock};
use crate::str::starts_with_ignore_ascii_case;
@ -29,6 +30,7 @@ use crate::stylesheets::{
};
use crate::values::computed::font::FamilyName;
use crate::values::{CssUrl, CustomIdent, KeyframesName, TimelineName};
use crate::values::specified::ContainerName;
use crate::{Namespace, Prefix};
use cssparser::{
AtRuleParser, BasicParseError, BasicParseErrorKind, CowRcStr, Parser, ParserState,
@ -190,7 +192,7 @@ pub enum AtRulePrelude {
/// A @media rule prelude, with its media queries.
Media(Arc<Locked<MediaList>>),
/// A @container rule prelude.
Container(Arc<ContainerCondition>),
Container(ContainerName, ContainerCondition),
/// An @supports rule, with its conditional
Supports(SupportsCondition),
/// A @viewport rule prelude.
@ -473,8 +475,13 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
AtRulePrelude::FontFace
},
"container" if static_prefs::pref!("layout.css.container-queries.enabled") => {
let condition = Arc::new(ContainerCondition::parse(self.context, input)?);
AtRulePrelude::Container(condition)
// FIXME: This is a bit ambiguous:
// https://github.com/w3c/csswg-drafts/issues/7203
let name = input.try_parse(|input| {
ContainerName::parse(self.context, input)
}).ok().unwrap_or_else(ContainerName::none);
let condition = ContainerCondition::parse(self.context, input, FeatureType::Container)?;
AtRulePrelude::Container(name, condition)
},
"layer" if static_prefs::pref!("layout.css.cascade-layers.enabled") => {
let names = input.try_parse(|input| {
@ -655,9 +662,10 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
},
))))
},
AtRulePrelude::Container(condition) => {
AtRulePrelude::Container(name, condition) => {
Ok(CssRule::Container(Arc::new(self.shared_lock.wrap(
ContainerRule {
name,
condition,
rules: self.parse_nested_rules(input, CssRuleType::Container),
source_location: start.source_location(),

Просмотреть файл

@ -683,8 +683,7 @@ impl MaybeNew for ViewportConstraints {
font_metrics_provider: &provider,
cached_system_font: None,
in_media_query: false,
quirks_mode,
container_info: None,
quirks_mode: quirks_mode,
for_smil_animation: false,
for_non_inherited_property: None,
rule_cache_conditions: RefCell::new(&mut conditions),

Просмотреть файл

@ -29,7 +29,6 @@ use crate::selector_parser::{PerPseudoElementMap, PseudoElement, SelectorImpl, S
use crate::shared_lock::{Locked, SharedRwLockReadGuard, StylesheetGuards};
use crate::stylesheet_set::{DataValidity, DocumentStylesheetSet, SheetRebuildKind};
use crate::stylesheet_set::{DocumentStylesheetFlusher, SheetCollectionFlusher};
use crate::stylesheets::container_rule::ContainerCondition;
use crate::stylesheets::keyframes_rule::KeyframesAnimation;
use crate::stylesheets::layer_rule::{LayerName, LayerOrder};
use crate::stylesheets::viewport_rule::{self, MaybeNew, ViewportRule};
@ -2134,17 +2133,15 @@ impl ContainerConditionId {
#[derive(Clone, Debug, MallocSizeOf)]
struct ContainerConditionReference {
struct ContainerCondition {
parent: ContainerConditionId,
#[ignore_malloc_size_of = "Arc"]
condition: Option<Arc<ContainerCondition>>,
// TODO: condition: Option<Arc<ContainerCondition>> (or so).
}
impl ContainerConditionReference {
impl ContainerCondition {
const fn none() -> Self {
Self {
parent: ContainerConditionId::none(),
condition: None,
}
}
}
@ -2221,7 +2218,7 @@ pub struct CascadeData {
layers: SmallVec<[CascadeLayer; 1]>,
/// The list of container conditions, indexed by their id.
container_conditions: SmallVec<[ContainerConditionReference; 1]>,
container_conditions: SmallVec<[ContainerCondition; 1]>,
/// Effective media query results cached from the last rebuild.
effective_media_query_results: EffectiveMediaQueryResults,
@ -2265,7 +2262,7 @@ impl CascadeData {
animations: Default::default(),
layer_id: Default::default(),
layers: smallvec::smallvec![CascadeLayer::root()],
container_conditions: smallvec::smallvec![ContainerConditionReference::none()],
container_conditions: smallvec::smallvec![ContainerCondition::none()],
extra_data: ExtraStyleData::default(),
effective_media_query_results: EffectiveMediaQueryResults::new(),
rules_source_order: 0,
@ -2380,23 +2377,6 @@ impl CascadeData {
self.layers[id.0 as usize].order
}
pub(crate) fn container_condition_matches<E>(&self, mut id: ContainerConditionId, stylist: &Stylist, element: E) -> bool
where
E: TElement,
{
loop {
let condition_ref = &self.container_conditions[id.0 as usize];
let condition = match condition_ref.condition {
None => return true,
Some(ref c) => c,
};
if !condition.matches(stylist.device(), element) {
return false;
}
id = condition_ref.parent;
}
}
fn did_finish_rebuild(&mut self) {
self.shrink_maps_if_needed();
self.compute_layer_order();
@ -2809,11 +2789,10 @@ impl CascadeData {
}
},
CssRule::Container(ref lock) => {
let container_rule = lock.read_with(guard);
let _container_rule = lock.read_with(guard);
let id = ContainerConditionId(self.container_conditions.len() as u16);
self.container_conditions.push(ContainerConditionReference {
self.container_conditions.push(ContainerCondition {
parent: containing_rule_state.container_condition_id,
condition: Some(container_rule.condition.clone()),
});
containing_rule_state.container_condition_id = id;
},
@ -2998,7 +2977,7 @@ impl CascadeData {
self.layers.clear();
self.layers.push(CascadeLayer::root());
self.container_conditions.clear();
self.container_conditions.push(ContainerConditionReference::none());
self.container_conditions.push(ContainerCondition::none());
self.extra_data.clear();
self.rules_source_order = 0;
self.num_selectors = 0;

Просмотреть файл

@ -15,7 +15,6 @@ use super::generics::{self, GreaterThanOrEqualToOne, NonNegative, ZeroToOne};
use super::specified;
use super::{CSSFloat, CSSInteger};
use crate::context::QuirksMode;
use crate::stylesheets::container_rule::ContainerInfo;
use crate::font_metrics::{get_metrics_provider_for_product, FontMetricsProvider};
use crate::media_queries::Device;
#[cfg(feature = "gecko")]
@ -173,9 +172,6 @@ pub struct Context<'a> {
/// values, which SMIL allows.
pub for_smil_animation: bool,
/// Returns the container information to evaluate a given container query.
pub container_info: Option<ContainerInfo>,
/// The property we are computing a value for, if it is a non-inherited
/// property. None if we are computed a value for an inherited property
/// or not computing for a property at all (e.g. in a media query
@ -206,42 +202,6 @@ impl<'a> Context<'a> {
in_media_query: true,
quirks_mode,
for_smil_animation: false,
container_info: None,
for_non_inherited_property: None,
rule_cache_conditions: RefCell::new(&mut conditions),
};
f(&context)
}
/// Creates a suitable context for container query evaluation for the style
/// specified.
pub fn for_container_query_evaluation<F, R>(
device: &Device,
container_info_and_style: Option<(ContainerInfo, Arc<ComputedValues>)>,
f: F,
) -> R
where
F: FnOnce(&Context) -> R,
{
let mut conditions = RuleCacheConditions::default();
let provider = get_metrics_provider_for_product();
let (container_info, style) = match container_info_and_style {
Some((ci, s)) => (Some(ci), Some(s)),
None => (None, None),
};
let style = style.as_ref().map(|s| &**s);
let quirks_mode = device.quirks_mode();
let context = Context {
builder: StyleBuilder::for_inheritance(device, style, None),
font_metrics_provider: &provider,
cached_system_font: None,
in_media_query: true,
quirks_mode,
for_smil_animation: false,
container_info,
for_non_inherited_property: None,
rule_cache_conditions: RefCell::new(&mut conditions),
};
@ -305,8 +265,8 @@ impl<'a, 'cx, 'cx_a: 'cx, S: ToComputedValue + 'a> ComputedVecIter<'a, 'cx, 'cx_
/// Construct an iterator from a slice of specified values and a context
pub fn new(cx: &'cx Context<'cx_a>, values: &'a [S]) -> Self {
ComputedVecIter {
cx,
values,
cx: cx,
values: values,
}
}
}

Просмотреть файл

@ -2959,7 +2959,7 @@ pub extern "C" fn Servo_ContainerRule_GetConditionText(
result: &mut nsACString,
) {
read_locked_arc(rule, |rule: &ContainerRule| {
rule.query_condition().to_css(&mut CssWriter::new(result)).unwrap();
rule.condition.to_css(&mut CssWriter::new(result)).unwrap();
})
}
@ -5848,7 +5848,6 @@ fn create_context_for_animation<'a>(
quirks_mode: per_doc_data.stylist.quirks_mode(),
for_smil_animation,
for_non_inherited_property: None,
container_info: None,
rule_cache_conditions: RefCell::new(rule_cache_conditions),
}
}

Просмотреть файл

@ -1,2 +0,0 @@
[canvas-as-container-003.html]
expected: FAIL

Просмотреть файл

@ -1,2 +0,0 @@
[canvas-as-container-004.html]
expected: FAIL

Просмотреть файл

@ -1,3 +1,3 @@
[canvas-as-container-005.html]
[Focusable after container size change]
[Initially display:none, not focusable]
expected: FAIL

Просмотреть файл

@ -1,3 +1,3 @@
[canvas-as-container-006.html]
[Focusable after container size change]
[Initially display:none, not focusable]
expected: FAIL

Просмотреть файл

@ -1,2 +0,0 @@
[change-display-in-container.html]
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[conditional-container-status.html]
[Conditionally applying container-type:initial]
expected: FAIL

Просмотреть файл

@ -1,30 +1,3 @@
[container-for-shadow-dom.html]
[Match container for ::part selector's originating element tree for exportparts]
expected: FAIL
[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 slot light tree child fallback]
expected: FAIL

Просмотреть файл

@ -5,23 +5,17 @@
[Implicit outer invalidation]
expected: FAIL
[Implicit]
[Implicit, outer failing]
expected: FAIL
[Outer named, inner named]
[Implicit, inner failing]
expected: FAIL
[Outer named, inner named (reverse)]
[Failing outer name]
expected: FAIL
[Outer named, inner implicit]
[Failing inner name]
expected: FAIL
[Inner named, outer implicit]
expected: FAIL
[Inner named, outer implicit (reverse)]
expected: FAIL
[Three levels]
[Three levels, middle fail]
expected: FAIL

Просмотреть файл

@ -1,54 +1,9 @@
[container-selection.html]
[(height: 16px) for .size > .inline > span]
expected: FAIL
[c (width) for .a-size > .b-size > span]
expected: FAIL
[c (width) for .ab-size > .size > span]
expected: FAIL
[(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 +0,0 @@
[counters-in-container-dynamic.html]
expected: FAIL

Просмотреть файл

@ -1,2 +0,0 @@
[counters-in-container.html]
expected: FAIL

Просмотреть файл

@ -4,3 +4,6 @@
[getComputedStyle when intermediate container becomes display:contents]
expected: FAIL
[getComputedStyle when container is display:contents]
expected: FAIL

Просмотреть файл

@ -37,3 +37,18 @@
[getComputedStyle when in display:none with layout dirty outer element]
expected: FAIL
[getComputedStyle when container is display:none]
expected: FAIL
[getComputedStyle when inner container is display:none]
expected: FAIL
[getComputedStyle when intermediate ancestor is display:none]
expected: FAIL
[getComputedStyle when outer container is display:none]
expected: FAIL
[getComputedStyle on ::before when container is display:none]
expected: FAIL

Просмотреть файл

@ -1,2 +0,0 @@
[fieldset-legend-change.html]
expected: FAIL

Просмотреть файл

@ -1,12 +1,12 @@
[font-relative-units-dynamic.html]
[em relative before change]
expected: FAIL
[rem relative before change]
expected: FAIL
[ex relative before change]
expected: FAIL
[ch relative before change]
expected: FAIL
[em relative after change]
expected: FAIL
[rem relative after change]
expected: FAIL

Просмотреть файл

@ -1,12 +0,0 @@
[font-relative-units.html]
[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,3 +0,0 @@
[fragmented-container-001.html]
[Children of fragmented inline-size container should match inline-size of first fragment]
expected: FAIL

Просмотреть файл

@ -1,3 +1,6 @@
[ineligible-containment.html]
[Changing containment eligibility invalidates style]
expected: FAIL
[Container ineligible for containment]
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[inline-size-and-min-width.html]
[min-width of inline-size container affects container size]
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[multicol-container-001.html]
[Children of multicol inline-size container should match inline-size of the container]
expected: FAIL

Просмотреть файл

@ -1,9 +1,3 @@
[pseudo-elements-003.html]
[Originating element container for ::backdrop]
expected: FAIL
[Originating element container for outer ::first-line]
expected: FAIL
[Originating element container for outer ::first-letter]
expected: FAIL

Просмотреть файл

@ -1,12 +0,0 @@
[query-content-box.html]
[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

Просмотреть файл

@ -56,38 +56,38 @@
[style((height: 2px) or (not ((height: 2px) and (width: 1px))))]
expected: FAIL
[(height)]
expected: FAIL
[((height))]
expected: FAIL
[((((height))))]
expected: FAIL
[(not (width))]
expected: FAIL
[((height) and (height))]
expected: FAIL
[((height) and (width) and (width))]
expected: FAIL
[((width) and (height) and (width))]
expected: FAIL
[((width) and (width) and (height))]
expected: FAIL
[((height) or (height))]
expected: FAIL
[(not ((width) and (width)))]
expected: FAIL
[(width)]
[((width) and (not ((height) or (width))))]
expected: FAIL
[((width))]
expected: FAIL
[((((width))))]
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))]
[((height) or ((height) and (width)))]
expected: FAIL

Просмотреть файл

@ -1,2 +0,0 @@
[resize-while-content-visibility-hidden.html]
expected: FAIL

Просмотреть файл

@ -2,101 +2,83 @@
[(width < 100px) (.horizontal)]
expected: FAIL
[(min-width: 101px) (.horizontal)]
expected: FAIL
[(max-width: 99px) (.horizontal)]
expected: FAIL
[(height < 200px) (.horizontal)]
expected: FAIL
[(min-height: 201px) (.horizontal)]
expected: FAIL
[(max-height: 199px) (.horizontal)]
expected: FAIL
[(orientation: landscape) (.horizontal)]
expected: FAIL
[(aspect-ratio: 2/1) (.horizontal)]
expected: FAIL
[(width < 100px) (.vertical)]
expected: FAIL
[(min-width: 101px) (.vertical)]
expected: FAIL
[(max-width: 99px) (.vertical)]
expected: FAIL
[(height < 200px) (.vertical)]
expected: FAIL
[(min-height: 201px) (.vertical)]
expected: FAIL
[(max-height: 199px) (.vertical)]
expected: FAIL
[(orientation: landscape) (.vertical)]
expected: FAIL
[(aspect-ratio: 2/1) (.vertical)]
expected: FAIL
[(inline-size < 100px) (.horizontal)]
expected: FAIL
[(min-inline-size: 101px) (.horizontal)]
expected: FAIL
[(max-inline-size: 99px) (.horizontal)]
expected: FAIL
[(block-size < 200px) (.horizontal)]
expected: FAIL
[(min-block-size: 201px) (.horizontal)]
expected: FAIL
[(max-block-size: 199px) (.horizontal)]
expected: FAIL
[(block-size < 100px) (.vertical)]
expected: FAIL
[(min-block-size: 101px) (.vertical)]
expected: FAIL
[(max-block-size: 99px) (.vertical)]
expected: FAIL
[(inline-size < 200px) (.vertical)]
expected: FAIL
[(min-inline-size: 201px) (.vertical)]
expected: FAIL
[(max-inline-size: 199px) (.vertical)]
expected: FAIL
[(width >= 100px) (.horizontal)]
expected: FAIL
[(min-width: 100px) (.horizontal)]
expected: FAIL
[(height >= 200px) (.horizontal)]
expected: FAIL
[(min-height: 200px) (.horizontal)]
expected: FAIL
[(inline-size >= 100px) (.horizontal)]
expected: FAIL
[(min-inline-size: 100px) (.horizontal)]
expected: FAIL
[(block-size >= 200px) (.horizontal)]
expected: FAIL
[(min-block-size: 200px) (.horizontal)]
expected: FAIL
[(width >= 100px) (.vertical)]
expected: FAIL
[(min-width: 100px) (.vertical)]
expected: FAIL
[(height >= 200px) (.vertical)]
expected: FAIL
[(min-height: 200px) (.vertical)]
expected: FAIL
[(block-size >= 100px) (.vertical)]
expected: FAIL
[(min-block-size: 100px) (.vertical)]
expected: FAIL
[(inline-size >= 200px) (.vertical)]
expected: FAIL
[(min-inline-size: 200px) (.vertical)]
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[style-change-in-container.html]
[Basic test for container query evaluation stability]
expected: FAIL

Просмотреть файл

@ -0,0 +1,2 @@
[svg-foreignobject-no-size-container.html]
expected: FAIL

Просмотреть файл

@ -0,0 +1,2 @@
[svg-g-no-size-container.html]
expected: FAIL

Просмотреть файл

@ -1,6 +0,0 @@
[svg-root-size-container.html]
[SVG text querying SVG root size container]
expected: FAIL
[div in foreignObject querying SVG root size container]
expected: FAIL

Просмотреть файл

@ -1,3 +1,3 @@
[top-layer-dialog-container.html]
[#dialog sized by viewport]
[#dialog initially sized by #containing-block]
expected: FAIL

Просмотреть файл

@ -1,3 +1,6 @@
[top-layer-nested-dialog.html]
[@container queries start matching]
[Dialogs initially not matching for container queries]
expected: FAIL
[Dialogs still not matching after showModal]
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[transition-style-change-event.html]
[Container Queries - Style Change Event for transitions]
expected: FAIL

Просмотреть файл

@ -1,6 +1,27 @@
[unsupported-axis.html]
[(width > 0px)]
[(height > 0px)]
expected: FAIL
[(inline-size > 0px)]
[((height > 0px) or (width > 0px))]
expected: FAIL
[((width > 0px) or (height > 0px))]
expected: FAIL
[((orientation: landscape) or (width > 0px))]
expected: FAIL
[((width > 0px) or (orientation: landscape))]
expected: FAIL
[((height > 0px) or (orientation: landscape))]
expected: FAIL
[((height > 0px) or (orientation: landscape)), with contain:size]
expected: FAIL
[(block-size > 0px)]
expected: FAIL
[(block-size > 0px), with writing-mode:vertical-rl]
expected: FAIL

Просмотреть файл

@ -0,0 +1,2 @@
[whitespace-update-after-removal.html]
expected: FAIL