Backed out 2 changesets (bug 1763644, bug 1762474) for causing failures at test_interfaces.html. CLOSED TREE

Backed out changeset 6a588f6d08f7 (bug 1762474)
Backed out changeset ff486de30883 (bug 1763644)
This commit is contained in:
Butkovits Atila 2022-04-08 02:26:22 +03:00
Родитель 1a0219d30e
Коммит c1d171544c
82 изменённых файлов: 482 добавлений и 544 удалений

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

@ -10,5 +10,6 @@
// https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
[Exposed=Window]
interface CSSConditionRule : CSSGroupingRule {
readonly attribute UTF8String conditionText;
[SetterThrows]
attribute UTF8String conditionText;
};

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

@ -1,14 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
*/
// https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
[Exposed=Window, Pref="layout.css.cascade-layers.enabled"]
interface CSSContainerRule : CSSConditionRule {
};

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

@ -475,7 +475,6 @@ WEBIDL_FILES = [
"CSS.webidl",
"CSSAnimation.webidl",
"CSSConditionRule.webidl",
"CSSContainerRule.webidl",
"CSSCounterStyleRule.webidl",
"CSSFontFaceRule.webidl",
"CSSFontFeatureValuesRule.webidl",

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

@ -86,7 +86,6 @@ void ServoStyleRuleMap::RuleRemoved(StyleSheet& aStyleSheet,
case StyleCssRuleType::Media:
case StyleCssRuleType::Supports:
case StyleCssRuleType::LayerBlock:
case StyleCssRuleType::Container:
case StyleCssRuleType::Document: {
// See the comment in StyleSheetRemoved.
mTable.Clear();
@ -123,7 +122,6 @@ void ServoStyleRuleMap::FillTableFromRule(css::Rule& aRule) {
case StyleCssRuleType::LayerBlock:
case StyleCssRuleType::Media:
case StyleCssRuleType::Supports:
case StyleCssRuleType::Container:
case StyleCssRuleType::Document: {
auto& rule = static_cast<css::GroupRule&>(aRule);
if (ServoCSSRuleList* ruleList = rule.GetCssRules()) {

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

@ -1,77 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/CSSContainerRule.h"
#include "mozilla/css/GroupRule.h"
#include "mozilla/dom/CSSContainerRuleBinding.h"
#include "mozilla/ServoBindings.h"
using namespace mozilla::css;
namespace mozilla::dom {
CSSContainerRule::CSSContainerRule(RefPtr<RawServoContainerRule> aRawRule,
StyleSheet* aSheet, css::Rule* aParentRule,
uint32_t aLine, uint32_t aColumn)
: css::ConditionRule(Servo_ContainerRule_GetRules(aRawRule).Consume(),
aSheet, aParentRule, aLine, aColumn),
mRawRule(std::move(aRawRule)) {}
CSSContainerRule::~CSSContainerRule() = default;
NS_IMPL_ADDREF_INHERITED(CSSContainerRule, ConditionRule)
NS_IMPL_RELEASE_INHERITED(CSSContainerRule, ConditionRule)
// QueryInterface implementation for ContainerRule
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CSSContainerRule)
NS_INTERFACE_MAP_END_INHERITING(ConditionRule)
#ifdef DEBUG
/* virtual */
void CSSContainerRule::List(FILE* out, int32_t aIndent) const {
nsAutoCString str;
for (int32_t i = 0; i < aIndent; i++) {
str.AppendLiteral(" ");
}
Servo_ContainerRule_Debug(mRawRule, &str);
fprintf_stderr(out, "%s\n", str.get());
}
#endif
StyleCssRuleType CSSContainerRule::Type() const {
return StyleCssRuleType::Container;
}
void CSSContainerRule::GetConditionText(nsACString& aConditionText) {
Servo_ContainerRule_GetConditionText(mRawRule, &aConditionText);
}
/* virtual */
void CSSContainerRule::GetCssText(nsACString& aCssText) const {
Servo_ContainerRule_GetCssText(mRawRule, &aCssText);
}
void CSSContainerRule::SetRawAfterClone(RefPtr<RawServoContainerRule> aRaw) {
mRawRule = std::move(aRaw);
css::ConditionRule::SetRawAfterClone(
Servo_ContainerRule_GetRules(mRawRule).Consume());
}
/* virtual */
size_t CSSContainerRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
// TODO Implement this!
return aMallocSizeOf(this);
}
/* virtual */
JSObject* CSSContainerRule::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return CSSContainerRule_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace mozilla::dom

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

@ -1,48 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_CSSContainerRule_h
#define mozilla_dom_CSSContainerRule_h
#include "mozilla/css/GroupRule.h"
#include "mozilla/ServoBindingTypes.h"
namespace mozilla::dom {
class CSSContainerRule final : public css::ConditionRule {
public:
CSSContainerRule(RefPtr<RawServoContainerRule> aRawRule, StyleSheet* aSheet,
css::Rule* aParentRule, uint32_t aLine, uint32_t aColumn);
NS_DECL_ISUPPORTS_INHERITED
#ifdef DEBUG
void List(FILE* out = stdout, int32_t aIndent = 0) const final;
#endif
RawServoContainerRule* Raw() const { return mRawRule; }
void SetRawAfterClone(RefPtr<RawServoContainerRule>);
// WebIDL interface
StyleCssRuleType Type() const override;
// WebIDL interface
void GetCssText(nsACString& aCssText) const final;
void GetConditionText(nsACString& aConditionText) final;
size_t SizeOfIncludingThis(MallocSizeOf) const override;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
private:
virtual ~CSSContainerRule();
RefPtr<RawServoContainerRule> mRawRule;
};
} // namespace mozilla::dom
#endif // mozilla_dom_CSSContainerRule_h

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

@ -84,6 +84,14 @@ void CSSMediaRule::GetConditionText(nsACString& aConditionText) {
Media()->GetMediaText(aConditionText);
}
void CSSMediaRule::SetConditionText(const nsACString& aConditionText,
ErrorResult& aRv) {
if (IsReadOnly()) {
return;
}
Media()->SetMediaText(aConditionText);
}
/* virtual */
void CSSMediaRule::GetCssText(nsACString& aCssText) const {
Servo_MediaRule_GetCssText(mRawRule, &aCssText);

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

@ -10,7 +10,8 @@
#include "mozilla/css/GroupRule.h"
#include "mozilla/ServoBindingTypes.h"
namespace mozilla::dom {
namespace mozilla {
namespace dom {
class CSSMediaRule final : public css::ConditionRule {
public:
@ -34,6 +35,8 @@ class CSSMediaRule final : public css::ConditionRule {
// WebIDL interface
void GetCssText(nsACString& aCssText) const final;
void GetConditionText(nsACString& aConditionText) final;
void SetConditionText(const nsACString& aConditionText,
ErrorResult& aRv) final;
dom::MediaList* Media();
size_t SizeOfIncludingThis(MallocSizeOf) const override;
@ -48,6 +51,7 @@ class CSSMediaRule final : public css::ConditionRule {
RefPtr<dom::MediaList> mMediaList;
};
} // namespace mozilla::dom
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_CSSMediaRule_h

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

@ -122,6 +122,15 @@ void CSSMozDocumentRule::GetConditionText(nsACString& aConditionText) {
Servo_MozDocumentRule_GetConditionText(mRawRule, &aConditionText);
}
void CSSMozDocumentRule::SetConditionText(const nsACString& aConditionText,
ErrorResult& aRv) {
if (IsReadOnly()) {
return;
}
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
}
/* virtual */
void CSSMozDocumentRule::GetCssText(nsACString& aCssText) const {
Servo_MozDocumentRule_GetCssText(mRawRule, &aCssText);

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

@ -37,6 +37,8 @@ class CSSMozDocumentRule final : public css::ConditionRule {
StyleCssRuleType Type() const final;
void GetCssText(nsACString& aCssText) const final;
void GetConditionText(nsACString& aConditionText) final;
void SetConditionText(const nsACString& aConditionText,
ErrorResult& aRv) final;
size_t SizeOfIncludingThis(MallocSizeOf) const override;

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

@ -48,6 +48,15 @@ void CSSSupportsRule::GetConditionText(nsACString& aConditionText) {
Servo_SupportsRule_GetConditionText(mRawRule, &aConditionText);
}
void CSSSupportsRule::SetConditionText(const nsACString& aConditionText,
ErrorResult& aRv) {
if (IsReadOnly()) {
return;
}
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
}
/* virtual */
void CSSSupportsRule::GetCssText(nsACString& aCssText) const {
Servo_SupportsRule_GetCssText(mRawRule, &aCssText);

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

@ -31,6 +31,8 @@ class CSSSupportsRule : public css::ConditionRule {
StyleCssRuleType Type() const final;
void GetCssText(nsACString& aCssText) const final;
void GetConditionText(nsACString& aConditionText) final;
void SetConditionText(const nsACString& aConditionText,
ErrorResult& aRv) final;
size_t SizeOfIncludingThis(MallocSizeOf) const override;
JSObject* WrapObject(JSContext* aCx,

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

@ -95,6 +95,8 @@ class ConditionRule : public GroupRule {
public:
virtual void GetConditionText(nsACString& aConditionText) = 0;
virtual void SetConditionText(const nsACString& aConditionText,
ErrorResult& aRv) = 0;
};
} // namespace css

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

@ -104,8 +104,7 @@ void Rule::AssertParentRuleType() {
type == StyleCssRuleType::Document ||
type == StyleCssRuleType::Supports ||
type == StyleCssRuleType::Keyframes ||
type == StyleCssRuleType::LayerBlock ||
type == StyleCssRuleType::Container);
type == StyleCssRuleType::LayerBlock);
}
}
#endif

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

@ -39,7 +39,6 @@ SERVO_ARC_TYPE(NamespaceRule, RawServoNamespaceRule)
SERVO_ARC_TYPE(PageRule, RawServoPageRule)
SERVO_ARC_TYPE(SupportsRule, RawServoSupportsRule)
SERVO_ARC_TYPE(DocumentRule, RawServoMozDocumentRule)
SERVO_ARC_TYPE(ContainerRule, RawServoContainerRule)
SERVO_ARC_TYPE(FontFeatureValuesRule, RawServoFontFeatureValuesRule)
SERVO_ARC_TYPE(FontFaceRule, RawServoFontFaceRule)
SERVO_ARC_TYPE(CounterStyleRule, RawServoCounterStyleRule)

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

@ -67,7 +67,6 @@ BASIC_RULE_FUNCS(FontFeatureValues)
BASIC_RULE_FUNCS(FontFace)
BASIC_RULE_FUNCS(CounterStyle)
BASIC_RULE_FUNCS(ScrollTimeline)
GROUP_RULE_FUNCS(Container)
#undef GROUP_RULE_FUNCS
#undef BASIC_RULE_FUNCS

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

@ -15,7 +15,6 @@
#include "mozilla/dom/CSSLayerBlockRule.h"
#include "mozilla/dom/CSSLayerStatementRule.h"
#include "mozilla/dom/CSSKeyframesRule.h"
#include "mozilla/dom/CSSContainerRule.h"
#include "mozilla/dom/CSSMediaRule.h"
#include "mozilla/dom/CSSMozDocumentRule.h"
#include "mozilla/dom/CSSNamespaceRule.h"
@ -94,7 +93,6 @@ css::Rule* ServoCSSRuleList::GetRule(uint32_t aIndex) {
CASE_RULE(LayerBlock, LayerBlock)
CASE_RULE(LayerStatement, LayerStatement)
CASE_RULE(ScrollTimeline, ScrollTimeline)
CASE_RULE(Container, Container)
#undef CASE_RULE
case StyleCssRuleType::Viewport:
MOZ_ASSERT_UNREACHABLE("viewport is not implemented in Gecko");
@ -249,7 +247,6 @@ void ServoCSSRuleList::SetRawAfterClone(RefPtr<ServoCssRules> aNewRules) {
CASE_FOR(LayerBlock, LayerBlock)
CASE_FOR(LayerStatement, LayerStatement)
CASE_FOR(ScrollTimeline, ScrollTimeline)
CASE_FOR(Container, Container)
case StyleCssRuleType::Keyframe:
MOZ_ASSERT_UNREACHABLE("keyframe rule cannot be here");
break;

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

@ -56,7 +56,6 @@ template struct StyleStrong<RawServoFontFeatureValuesRule>;
template struct StyleStrong<RawServoFontFaceRule>;
template struct StyleStrong<RawServoCounterStyleRule>;
template struct StyleStrong<RawServoScrollTimelineRule>;
template struct StyleStrong<RawServoContainerRule>;
template <typename T>
inline void StyleOwnedSlice<T>::Clear() {

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

@ -30,7 +30,6 @@
#include "mozilla/dom/CSSFontFaceRule.h"
#include "mozilla/dom/CSSFontFeatureValuesRule.h"
#include "mozilla/dom/CSSImportRule.h"
#include "mozilla/dom/CSSContainerRule.h"
#include "mozilla/dom/CSSLayerBlockRule.h"
#include "mozilla/dom/CSSLayerStatementRule.h"
#include "mozilla/dom/CSSMediaRule.h"
@ -950,7 +949,6 @@ void ServoStyleSet::RuleChangedInternal(StyleSheet& aSheet, css::Rule& aRule,
CASE_FOR(LayerBlock, LayerBlock)
CASE_FOR(LayerStatement, LayerStatement)
CASE_FOR(ScrollTimeline, ScrollTimeline)
CASE_FOR(Container, Container)
// @namespace can only be inserted / removed when there are only other
// @namespace and @import rules, and can't be mutated.
case StyleCssRuleType::Namespace:

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

@ -121,7 +121,6 @@ EXPORTS.mozilla += [
EXPORTS.mozilla.dom += [
"CSS.h",
"CSSContainerRule.h",
"CSSCounterStyleRule.h",
"CSSFontFaceRule.h",
"CSSFontFeatureValuesRule.h",
@ -167,7 +166,6 @@ UNIFIED_SOURCES += [
"ComputedStyle.cpp",
"CounterStyleManager.cpp",
"CSS.cpp",
"CSSContainerRule.cpp",
"CSSCounterStyleRule.cpp",
"CSSFontFaceRule.cpp",
"CSSFontFeatureValuesRule.cpp",

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

@ -208,6 +208,7 @@ skip-if = toolkit == 'android'
[test_computed_style_no_pseudo.html]
[test_computed_style_prefs.html]
[test_condition_text.html]
[test_condition_text_assignment.html]
[test_counter_descriptor_storage.html]
[test_counter_style.html]
[test_crash_with_content_policy.html]

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

@ -0,0 +1,59 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=815021
-->
<head>
<title>Test for Bug 815021</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<style id="style">
#a { text-transform: none }
@media all {
#a { text-transform: lowercase }
}
</style>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=815021">Mozilla Bug 815021</a>
<p id="display"><span id=a></span></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 815021 **/
var sheet = document.getElementById("style").sheet;
var rule = sheet.cssRules[1];
var a = document.getElementById("a");
function stylesApplied() {
return window.getComputedStyle(a).textTransform == "lowercase";
}
is(rule.type, CSSRule.MEDIA_RULE, "initial @media rule type");
is(rule.conditionText, "all", "initial @media rule conditionText");
ok(stylesApplied(), "initial @media rule applied");
// [value to set, value to check, whether styles should be applied]
var media = [
["not all", "not all", false],
["ALL ", "all", true],
["unknown", "unknown", false],
["(min-width:1px)", "(min-width: 1px)", true],
["(bad syntax", "not all", false],
["(max-width: 1px), (color)", "(max-width: 1px), (color)", true]
];
for (var i = 0; i < media.length; i++) {
rule.conditionText = media[i][0];
is(rule.conditionText, media[i][1], "value of conditionText #" + i);
ok(rule.cssText.startsWith("@media " + media[i][1]), "value of cssText #" + i);
ok(stylesApplied() == media[i][2], "styles applied #" + i);
}
</script>
</pre>
</body>
</html>

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

@ -15,7 +15,7 @@ use crate::gecko_bindings::structs::{
RawServoKeyframesRule, RawServoLayerBlockRule, RawServoLayerStatementRule, RawServoMediaList,
RawServoMediaRule, RawServoMozDocumentRule, RawServoNamespaceRule, RawServoPageRule,
RawServoScrollTimelineRule, RawServoStyleRule, RawServoStyleSheetContents,
RawServoSupportsRule, RawServoContainerRule, ServoCssRules,
RawServoSupportsRule, ServoCssRules,
};
use crate::gecko_bindings::sugar::ownership::{HasArcFFI, HasFFI, Strong};
use crate::media_queries::MediaList;
@ -26,7 +26,7 @@ use crate::stylesheets::keyframes_rule::Keyframe;
use crate::stylesheets::{
CounterStyleRule, CssRules, DocumentRule, FontFaceRule, FontFeatureValuesRule, ImportRule,
KeyframesRule, LayerBlockRule, LayerStatementRule, MediaRule, NamespaceRule, PageRule,
ScrollTimelineRule, StyleRule, StylesheetContents, SupportsRule, ContainerRule,
ScrollTimelineRule, StyleRule, StylesheetContents, SupportsRule,
};
use servo_arc::{Arc, ArcBorrow};
use std::{mem, ptr};
@ -98,9 +98,6 @@ impl_arc_ffi!(Locked<ScrollTimelineRule> => RawServoScrollTimelineRule
impl_arc_ffi!(Locked<SupportsRule> => RawServoSupportsRule
[Servo_SupportsRule_AddRef, Servo_SupportsRule_Release]);
impl_arc_ffi!(Locked<ContainerRule> => RawServoContainerRule
[Servo_ContainerRule_AddRef, Servo_ContainerRule_Release]);
impl_arc_ffi!(Locked<DocumentRule> => RawServoMozDocumentRule
[Servo_DocumentRule_AddRef, Servo_DocumentRule_Release]);

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

@ -556,7 +556,6 @@ impl StylesheetInvalidationSet {
FontFace(..) |
Keyframes(..) |
ScrollTimeline(..) |
Container(..) |
Style(..) => {
if is_generic_change {
// TODO(emilio): We need to do this for selector / keyframe
@ -611,7 +610,7 @@ impl StylesheetInvalidationSet {
}
},
Document(..) | Namespace(..) | Import(..) | Media(..) | Supports(..) |
Container(..) | LayerStatement(..) | LayerBlock(..) => {
LayerStatement(..) | LayerBlock(..) => {
// Do nothing, relevant nested rules are visited as part of the
// iteration.
},

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

@ -1,79 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! A [`@container`][container] rule.
//!
//! [container]: https://drafts.csswg.org/css-contain-3/#container-rule
use crate::media_queries::MediaCondition;
use crate::shared_lock::{
DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard,
};
use crate::values::specified::ContainerName;
use crate::str::CssStringWriter;
use crate::stylesheets::CssRules;
use cssparser::SourceLocation;
#[cfg(feature = "gecko")]
use malloc_size_of::{MallocSizeOfOps, MallocUnconditionalShallowSizeOf};
use servo_arc::Arc;
use std::fmt::{self, Write};
use style_traits::{CssWriter, ToCss};
/// A container rule.
#[derive(Debug, ToShmem)]
pub struct ContainerRule {
/// 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.
pub source_location: SourceLocation,
}
impl ContainerRule {
/// Measure heap usage.
#[cfg(feature = "gecko")]
pub fn size_of(&self, guard: &SharedRwLockReadGuard, ops: &mut MallocSizeOfOps) -> usize {
// Measurement of other fields may be added later.
self.rules.unconditional_shallow_size_of(ops)
+ self.rules.read_with(guard).size_of(guard, ops)
}
}
impl DeepCloneWithLock for ContainerRule {
fn deep_clone_with_lock(
&self,
lock: &SharedRwLock,
guard: &SharedRwLockReadGuard,
params: &DeepCloneParams,
) -> 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(),
}
}
}
impl ToCssWithGuard for ContainerRule {
fn to_css(&self, guard: &SharedRwLockReadGuard, dest: &mut CssStringWriter) -> fmt::Result {
dest.write_str("@container ")?;
{
let mut writer = CssWriter::new(dest);
if !self.name.is_none() {
self.name.to_css(&mut writer)?;
writer.write_char(' ')?;
}
self.condition.to_css(&mut writer)?;
}
self.rules.read_with(guard).to_css_block(guard, dest)
}
}
/// TODO: Factor out the media query code to work with containers.
pub type ContainerCondition = MediaCondition;

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! A [`@layer`][layer] rule.
//! A [`@layer`][layer] urle.
//!
//! [layer]: https://drafts.csswg.org/css-cascade-5/#layering

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! An [`@media`][media] rule.
//! An [`@media`][media] urle.
//!
//! [media]: https://drafts.csswg.org/css-conditional/#at-ruledef-media
@ -18,7 +18,7 @@ use servo_arc::Arc;
use std::fmt::{self, Write};
use style_traits::{CssWriter, ToCss};
/// An [`@media`][media] rule.
/// An [`@media`][media] urle.
///
/// [media]: https://drafts.csswg.org/css-conditional/#at-ruledef-media
#[derive(Debug, ToShmem)]

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

@ -12,7 +12,6 @@ pub mod font_feature_values_rule;
pub mod import_rule;
pub mod keyframes_rule;
pub mod layer_rule;
pub mod container_rule;
mod loader;
mod media_rule;
mod namespace_rule;
@ -54,7 +53,6 @@ pub use self::import_rule::ImportRule;
pub use self::keyframes_rule::KeyframesRule;
pub use self::layer_rule::{LayerBlockRule, LayerStatementRule};
pub use self::loader::StylesheetLoader;
pub use self::container_rule::ContainerRule;
pub use self::media_rule::MediaRule;
pub use self::namespace_rule::NamespaceRule;
pub use self::origin::{Origin, OriginSet, OriginSetIterator, PerOrigin, PerOriginIter};
@ -255,7 +253,6 @@ pub enum CssRule {
Import(Arc<Locked<ImportRule>>),
Style(Arc<Locked<StyleRule>>),
Media(Arc<Locked<MediaRule>>),
Container(Arc<Locked<ContainerRule>>),
FontFace(Arc<Locked<FontFaceRule>>),
FontFeatureValues(Arc<Locked<FontFeatureValuesRule>>),
CounterStyle(Arc<Locked<CounterStyleRule>>),
@ -290,10 +287,6 @@ impl CssRule {
lock.unconditional_shallow_size_of(ops) + lock.read_with(guard).size_of(guard, ops)
},
CssRule::Container(ref lock) => {
lock.unconditional_shallow_size_of(ops) + lock.read_with(guard).size_of(guard, ops)
},
CssRule::FontFace(_) => 0,
CssRule::FontFeatureValues(_) => 0,
CssRule::CounterStyle(_) => 0,
@ -351,7 +344,6 @@ pub enum CssRuleType {
LayerBlock = 16,
LayerStatement = 17,
ScrollTimeline = 18,
Container = 19,
}
#[allow(missing_docs)]
@ -381,7 +373,6 @@ impl CssRule {
CssRule::LayerBlock(_) => CssRuleType::LayerBlock,
CssRule::LayerStatement(_) => CssRuleType::LayerStatement,
CssRule::ScrollTimeline(_) => CssRuleType::ScrollTimeline,
CssRule::Container(_) => CssRuleType::Container,
}
}
@ -469,12 +460,6 @@ impl DeepCloneWithLock for CssRule {
lock.wrap(rule.deep_clone_with_lock(lock, guard, params)),
))
},
CssRule::Container(ref arc) => {
let rule = arc.read_with(guard);
CssRule::Container(Arc::new(
lock.wrap(rule.deep_clone_with_lock(lock, guard, params)),
))
},
CssRule::Media(ref arc) => {
let rule = arc.read_with(guard);
CssRule::Media(Arc::new(
@ -560,7 +545,6 @@ impl ToCssWithGuard for CssRule {
CssRule::LayerBlock(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::LayerStatement(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::ScrollTimeline(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::Container(ref lock) => lock.read_with(guard).to_css(guard, dest),
}
}
}

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

@ -13,7 +13,6 @@ use crate::properties::parse_property_declaration_list;
use crate::selector_parser::{SelectorImpl, SelectorParser};
use crate::shared_lock::{Locked, SharedRwLock};
use crate::str::starts_with_ignore_ascii_case;
use crate::stylesheets::container_rule::{ContainerRule, ContainerCondition};
use crate::stylesheets::document_rule::DocumentCondition;
use crate::stylesheets::font_feature_values_rule::parse_family_name_list;
use crate::stylesheets::import_rule::ImportLayer;
@ -29,7 +28,6 @@ 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,
@ -164,8 +162,6 @@ pub enum AtRulePrelude {
CounterStyle(CustomIdent),
/// A @media rule prelude, with its media queries.
Media(Arc<Locked<MediaList>>),
/// A @container rule prelude.
Container(ContainerName, ContainerCondition),
/// An @supports rule, with its conditional
Supports(SupportsCondition),
/// A @viewport rule prelude.
@ -432,15 +428,6 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
"font-face" => {
AtRulePrelude::FontFace
},
"container" if static_prefs::pref!("layout.css.container-queries.enabled") => {
// 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)?;
AtRulePrelude::Container(name, condition)
},
"layer" if static_prefs::pref!("layout.css.cascade-layers.enabled") => {
let names = input.try_parse(|input| {
input.parse_comma_separated(|input| {
@ -620,16 +607,6 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b> {
},
))))
},
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(),
},
))))
},
AtRulePrelude::Layer(names) => {
let name = match names.len() {
0 | 1 => names.into_iter().next(),

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

@ -88,10 +88,6 @@ where
}
Some(doc_rule.rules.read_with(guard).0.iter())
},
CssRule::Container(ref lock) => {
let container_rule = lock.read_with(guard);
Some(container_rule.rules.read_with(guard).0.iter())
},
CssRule::Media(ref lock) => {
let media_rule = lock.read_with(guard);
if !C::process_media(guard, device, quirks_mode, media_rule) {

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

@ -359,7 +359,6 @@ impl SanitizationKind {
CssRule::Media(..) |
CssRule::Supports(..) |
CssRule::Import(..) |
CssRule::Container(..) |
// TODO(emilio): Perhaps Layer should not be always sanitized? But
// we sanitize @media and co, so this seems safer for now.
CssRule::LayerStatement(..) |

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

@ -2828,7 +2828,6 @@ impl CascadeData {
CssRule::Style(..) |
CssRule::Namespace(..) |
CssRule::FontFace(..) |
CssRule::Container(..) |
CssRule::CounterStyle(..) |
CssRule::Supports(..) |
CssRule::Keyframes(..) |

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

@ -91,7 +91,7 @@ use style::gecko_bindings::structs::{
RawServoLayerStatementRule, RawServoMediaList, RawServoMediaRule, RawServoMozDocumentRule,
RawServoNamespaceRule, RawServoPageRule, RawServoScrollTimelineRule,
RawServoSharedMemoryBuilder, RawServoStyleSet, RawServoStyleSheetContents,
RawServoSupportsRule, RawServoContainerRule, ServoCssRules,
RawServoSupportsRule, ServoCssRules,
};
use style::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasFFI};
use style::gecko_bindings::sugar::ownership::{
@ -127,7 +127,7 @@ use style::stylesheets::{
DocumentRule, FontFaceRule, FontFeatureValuesRule, ImportRule, KeyframesRule, LayerBlockRule,
LayerStatementRule, MediaRule, NamespaceRule, Origin, OriginSet, PageRule, SanitizationData,
SanitizationKind, ScrollTimelineRule, StyleRule, StylesheetContents,
StylesheetLoader as StyleStylesheetLoader, SupportsRule, UrlExtraData, ContainerRule,
StylesheetLoader as StyleStylesheetLoader, SupportsRule, UrlExtraData,
};
use style::stylist::{add_size_of_ua_cache, AuthorStylesEnabled, RuleInclusion, Stylist};
use style::thread_state;
@ -2334,14 +2334,6 @@ impl_group_rule_funcs! { (Supports, SupportsRule, RawServoSupportsRule),
changed: Servo_StyleSet_SupportsRuleChanged,
}
impl_group_rule_funcs! { (Container, ContainerRule, RawServoContainerRule),
get_rules: Servo_ContainerRule_GetRules,
getter: Servo_CssRules_GetContainerRuleAt,
debug: Servo_ContainerRule_Debug,
to_css: Servo_ContainerRule_GetCssText,
changed: Servo_StyleSet_ContainerRuleChanged,
}
impl_group_rule_funcs! { (LayerBlock, LayerBlockRule, RawServoLayerBlockRule),
get_rules: Servo_LayerBlockRule_GetRules,
getter: Servo_CssRules_GetLayerBlockRuleAt,
@ -2959,16 +2951,6 @@ pub extern "C" fn Servo_SupportsRule_GetConditionText(
})
}
#[no_mangle]
pub extern "C" fn Servo_ContainerRule_GetConditionText(
rule: &RawServoContainerRule,
result: &mut nsACString,
) {
read_locked_arc(rule, |rule: &ContainerRule| {
rule.condition.to_css(&mut CssWriter::new(result)).unwrap();
})
}
#[no_mangle]
pub extern "C" fn Servo_MozDocumentRule_GetConditionText(
rule: &RawServoMozDocumentRule,

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

@ -1,3 +1,6 @@
[aspect-ratio-feature-evaluation.html]
[@container queries with aspect-ratio and size containment]
expected: FAIL
[@container query with aspect-ratio change after resize]
expected: FAIL

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

@ -1,4 +1,34 @@
[at-container-parsing.html]
[(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
@ -17,9 +47,24 @@
[(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
@ -56,9 +101,42 @@
[(grid)]
expected: FAIL
[Container selector: foo]
expected: FAIL
[Container selector: foo]
expected: FAIL
[Container selector: foo ]
expected: FAIL
[(((width: 40px) or (width: 50px)) and (height: 100px))]
expected: FAIL
[((width: 100px) and ((height: 40px) or (height: 50px)))]
expected: FAIL
[(((width: 40x) and (height: 50px)) or (height: 100px))]
expected: FAIL
[((width: 50px) or ((width: 40px) and (height: 50px)))]
expected: FAIL
[((width: 100px) and (not (height: 100px)))]
expected: FAIL
[(width <= 100px)]
expected: FAIL
[(width = 100px)]
expected: FAIL
[(width > 100px)]
expected: FAIL
[(width >= 100px)]
expected: FAIL
[(100px <= width)]
expected: FAIL
@ -109,36 +187,3 @@
[(100px : width : 200px)]
expected: FAIL
[screen and (width: 100px)]
expected: FAIL
[screen or (width: 100px)]
expected: FAIL
[not screen and (width: 100px)]
expected: FAIL
[not screen or (width: 100px)]
expected: FAIL
[(width: 100px) and (height: 100px)]
expected: FAIL
[(width: 100px) or (height: 100px)]
expected: FAIL
[not (width: 100px)]
expected: FAIL
[foo (width: 100px)]
expected: FAIL
[Container selector: foo foo]
expected: FAIL
[Container selector: none]
expected: FAIL
[Container selector: None]
expected: FAIL

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

@ -8,5 +8,11 @@
[Serialization of nested @container rule]
expected: FAIL
[Serialization of boolean condition syntax]
expected: FAIL
[Serialization of colon condition syntax]
expected: FAIL
[Serialization of range condition syntax]
expected: FAIL

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -2,6 +2,9 @@
[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

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

@ -5,6 +5,12 @@
[@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

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

@ -1,21 +1,27 @@
[container-nested.html]
[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
[Implicit, outer failing]
expected: FAIL
[Implicit, inner failing]
expected: FAIL
[Failing outer name]
expected: FAIL
[Failing inner name]
expected: FAIL
[Three levels, middle fail]
expected: FAIL

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

@ -1,4 +1,43 @@
[container-selection.html]
[(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
@ -7,12 +46,3 @@
[a (block-size: 32px) for .a-size > .b-size > .a-inline > span]
expected: FAIL
[(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

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

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

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

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

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

@ -1,3 +1,2 @@
[deep-nested-inline-size-containers.html]
[Test that all container widths match]
expected: FAIL
expected: ERROR

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

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

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

@ -37,18 +37,3 @@
[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

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

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

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

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

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

@ -0,0 +1,12 @@
[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

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

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

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

@ -1,6 +1,30 @@
[idlharness.html]
[CSSContainerRule interface object length]
expected: FAIL
[CSSContainerRule interface: existence and properties of interface object]
expected: FAIL
[CSSContainerRule interface: existence and properties of interface prototype object]
expected: FAIL
[Stringification of sheet.cssRules[0\].cssRules[0\]]
expected: FAIL
[CSSContainerRule must be primary interface of sheet.cssRules[0\].cssRules[0\]]
expected: FAIL
[CSSContainerRule must be primary interface of sheet.cssRules[0\]]
expected: FAIL
[CSSContainerRule interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[Stringification of sheet.cssRules[0\]]
expected: FAIL
[CSSContainerRule interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[CSSContainerRule interface object name]
expected: FAIL

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

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

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

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

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

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

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

@ -0,0 +1,2 @@
[multicol-inside-container.html]
expected: FAIL

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

@ -1,6 +0,0 @@
[never-match-container.html]
[Size @container query against inline box never matches]
expected: FAIL
[Size @container query against svg element never matches]
expected: FAIL

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

@ -1,3 +1,3 @@
[orthogonal-wm-container-query.html]
[Initial non-orthogonal width]
[Orthogonal width]
expected: FAIL

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

@ -5,5 +5,11 @@
[#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,3 +1,24 @@
[pseudo-elements-003.html]
[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

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

@ -0,0 +1,12 @@
[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

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

@ -1,4 +1,37 @@
[query-evaluation.html]
[(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
@ -11,6 +44,12 @@
[((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
@ -55,39 +94,3 @@
[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) and (not ((height) or (width))))]
expected: FAIL
[((height) or ((height) and (width)))]
expected: FAIL

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

@ -1,3 +1,6 @@
[reattach-container-with-dirty-child.html]
[Initially wider than 200px]
expected: FAIL
[Container query changed and inner.style applied]
expected: FAIL

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

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

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

@ -1,6 +1,3 @@
[size-container-no-principal-box.html]
[(min-width: 0) does not match a container without a principal box (display:none)]
expected: FAIL
[(min-width: 0) does not match a container without a principal box (display:contents)]
[Check that container queries is supported]
expected: FAIL

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

@ -1,4 +1,22 @@
[size-feature-evaluation.html]
[(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
@ -17,6 +35,30 @@
[(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
@ -35,50 +77,8 @@
[(max-inline-size: 200px) (.vertical)]
expected: FAIL
[(width < 100px) (.horizontal)]
[(orientation: portrait) (.vertical)]
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)]
[(aspect-ratio: 1/2) (.vertical)]
expected: FAIL

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

@ -0,0 +1,3 @@
[style-change-in-container.html]
[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

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

@ -0,0 +1,6 @@
[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,2 +1,3 @@
[top-layer-dialog-backdrop.html]
prefs: [dom.dialog_element.enabled:true]
expected: FAIL

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

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

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

@ -5,5 +5,5 @@
[Modal dialog still has parent as query container while in top layer]
expected: FAIL
[#container initially wider than 200px]
[Container changes width while dialog is in top layer]
expected: FAIL

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

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

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

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

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

@ -1,24 +1,6 @@
[unsupported-axis.html]
[(width > 0px)]
expected: FAIL
[(inline-size > 0px)]
expected: FAIL
[(height > 0px)]
expected: FAIL
[((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

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

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

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

@ -1,23 +0,0 @@
<!doctype html>
<title>CSSConditionRule.conditionText</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-conditional-3/#cssconditionrule">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@media not all {
:root { color: lime }
}
</style>
<script>
test(function(t) {
let rule = document.styleSheets[0].cssRules[0];
assert_true(rule instanceof CSSConditionRule);
assert_equals(rule.conditionText, "not all");
rule.conditionText = 1;
assert_equals(rule.conditionText, "not all");
rule.conditionText = "all";
assert_equals(rule.conditionText, "not all");
assert_not_equals(getComputedStyle(document.documentElement).color, "rgb(0, 255, 0)");
});
</script>