Update Stylo to 2023-07-23 (#31437)

* Update Stylo to 2023-07-23

* to_shmem should be local when working with Stylo

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

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

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

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

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

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

* Update test expectations
This commit is contained in:
Oriol Brufau 2024-02-29 11:23:53 +01:00 committed by GitHub
parent 6eb96290fa
commit 31cfaf290d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 171 additions and 1208 deletions

View file

@ -8,7 +8,7 @@ use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::Locked;
use style::stylesheets::{
AllowImportRules, CssRules, CssRulesHelpers, KeyframesRule, RulesMutateError,
AllowImportRules, CssRuleTypes, CssRules, CssRulesHelpers, KeyframesRule, RulesMutateError,
StylesheetLoader as StyleStylesheetLoader,
};
@ -92,7 +92,12 @@ impl CSSRuleList {
/// Should only be called for CssRules-backed rules. Use append_lazy_rule
/// for keyframes-backed rules.
pub fn insert_rule(&self, rule: &str, idx: u32, nested: bool) -> Fallible<u32> {
pub fn insert_rule(
&self,
rule: &str,
idx: u32,
containing_rule_types: CssRuleTypes,
) -> Fallible<u32> {
let css_rules = if let RulesSource::Rules(ref rules) = self.rules {
rules
} else {
@ -117,7 +122,7 @@ impl CSSRuleList {
rule,
&parent_stylesheet.contents,
index,
nested,
containing_rule_types,
loader.as_ref().map(|l| l as &dyn StyleStylesheetLoader),
AllowImportRules::Yes,
)?;