Upgrade Stylo to 2024-04-16 (#32128)

* Upgrade Stylo to 2024-04-16

* Fixup for https://phabricator.services.mozilla.com/D205051

* Fixup for https://phabricator.services.mozilla.com/D203153

* Fixup for https://phabricator.services.mozilla.com/D202460

* Fixup for https://phabricator.services.mozilla.com/D205718

* Fixup for https://phabricator.services.mozilla.com/D206428

* Update test expectations
This commit is contained in:
Oriol Brufau 2024-04-25 16:48:07 +02:00 committed by GitHub
parent 1440406e91
commit 401e49010f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 65 additions and 175 deletions

View file

@ -5,7 +5,7 @@
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{Locked, SharedRwLock};
use style::stylesheets::{CssRuleTypes, CssRules as StyleCssRules};
use style::stylesheets::{CssRuleType, CssRuleTypes, CssRules as StyleCssRules};
use crate::dom::bindings::codegen::Bindings::CSSGroupingRuleBinding::CSSGroupingRuleMethods;
use crate::dom::bindings::error::{ErrorResult, Fallible};
@ -70,8 +70,16 @@ impl CSSGroupingRuleMethods for CSSGroupingRule {
// TODO: this should accumulate the rule types of all ancestors.
let rule_type = self.cssrule.as_specific().ty();
let containing_rule_types = CssRuleTypes::from(rule_type);
self.rulelist()
.insert_rule(&rule, index, containing_rule_types)
let parse_relative_rule_type = match rule_type {
CssRuleType::Style | CssRuleType::Scope => Some(rule_type),
_ => None,
};
self.rulelist().insert_rule(
&rule,
index,
containing_rule_types,
parse_relative_rule_type,
)
}
// https://drafts.csswg.org/cssom/#dom-cssgroupingrule-deleterule