diff options
author | bors-servo <infra@servo.org> | 2023-06-12 12:11:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 12:11:30 +0200 |
commit | 9260683b5fbc7fa9fe2cc75bbfccbcd9d0e245fd (patch) | |
tree | 7f2372c5064ae230bea51aa5a54d06fd0eaff796 /components/script/dom/cssstylerule.rs | |
parent | 1d69e7b2347ff6aa40a9f3dc4e20f0edf14cf80b (diff) | |
parent | aefaa3f16cd3d8e2df7399f0d10022cd2cebd5a0 (diff) | |
download | servo-9260683b5fbc7fa9fe2cc75bbfccbcd9d0e245fd.tar.gz servo-9260683b5fbc7fa9fe2cc75bbfccbcd9d0e245fd.zip |
Auto merge of #29848 - Loirooriol:sync, r=mrobinson
Backport several style changes from Gecko (4)
<!-- Please describe your changes on the following line: -->
This continues https://github.com/servo/servo/pull/29816.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom/cssstylerule.rs')
-rw-r--r-- | components/script/dom/cssstylerule.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/components/script/dom/cssstylerule.rs b/components/script/dom/cssstylerule.rs index a84c5c598b7..f81f30ab258 100644 --- a/components/script/dom/cssstylerule.rs +++ b/components/script/dom/cssstylerule.rs @@ -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); |