Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-05-31 12:17:20 +02:00
parent 04282ff04c
commit 07dbd9d637
5 changed files with 26 additions and 23 deletions

View file

@ -96,19 +96,15 @@ impl CSSStyleRuleMethods for CSSStyleRule {
// https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
fn SetSelectorText(&self, value: DOMString) {
let contents = &self.cssrule.parent_stylesheet().style_stylesheet().contents;
// It's not clear from the spec if we should use the stylesheet's namespaces.
// https://github.com/w3c/csswg-drafts/issues/1511
let namespaces = self
.cssrule
.parent_stylesheet()
.style_stylesheet()
.contents
.namespaces
.read();
let namespaces = contents.namespaces.read();
let url_data = contents.url_data.read();
let parser = SelectorParser {
stylesheet_origin: Origin::Author,
namespaces: &namespaces,
url_data: None,
url_data: &url_data,
};
let mut css_parser = CssParserInput::new(&*value);
let mut css_parser = CssParser::new(&mut css_parser);