diff options
author | bors-servo <infra@servo.org> | 2023-05-25 19:20:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 19:20:50 +0200 |
commit | 867326c46a4af0b85be9ba6c67cb18e8832480a5 (patch) | |
tree | 5ba77b27e901dbb837bdb6876813b847d56142cd /components/script/dom | |
parent | 5af3d16cb312cba9a8423af1995c9b24fe6aa05b (diff) | |
parent | 05d697323d27390eaf5537ea074cd0fe25801837 (diff) | |
download | servo-867326c46a4af0b85be9ba6c67cb18e8832480a5.tar.gz servo-867326c46a4af0b85be9ba6c67cb18e8832480a5.zip |
Auto merge of #29772 - Loirooriol:sync, r=mrobinson
Backport several style changes from Gecko (2)
<!-- Please describe your changes on the following line: -->
This continues #29748.
---
<!-- 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: -->
- [X] 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')
-rw-r--r-- | components/script/dom/element.rs | 6 | ||||
-rw-r--r-- | components/script/dom/htmlmetaelement.rs | 16 |
2 files changed, 9 insertions, 13 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index d8b80df754a..1ceec50281d 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -733,9 +733,9 @@ impl<'dom> LayoutElementHelpers<'dom> for LayoutDom<'dom, Element> { hints.push(from_declaration( shared_lock, PropertyDeclaration::FontFamily(font_family::SpecifiedValue::Values( - computed::font::FontFamilyList::new(Box::new([ - computed::font::SingleFontFamily::from_atom(font_family), - ])), + computed::font::FontFamilyList { + list: Box::new([computed::font::SingleFontFamily::from_atom(font_family)]), + }, )), )); } diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs index f91e4339f1d..168c29cdb0b 100644 --- a/components/script/dom/htmlmetaelement.rs +++ b/components/script/dom/htmlmetaelement.rs @@ -21,7 +21,6 @@ use crate::dom::node::{ use crate::dom::virtualmethods::VirtualMethods; use dom_struct::dom_struct; use html5ever::{LocalName, Prefix}; -use parking_lot::RwLock; use servo_arc::Arc; use servo_config::pref; use std::sync::atomic::AtomicBool; @@ -112,15 +111,12 @@ impl HTMLMetaElement { let shared_lock = document.style_shared_lock(); let rule = CssRule::Viewport(Arc::new(shared_lock.wrap(translated_rule))); let sheet = Arc::new(Stylesheet { - contents: StylesheetContents { - rules: CssRules::new(vec![rule], shared_lock), - origin: Origin::Author, - namespaces: Default::default(), - quirks_mode: document.quirks_mode(), - url_data: RwLock::new(window_from_node(self).get_url()), - source_map_url: RwLock::new(None), - source_url: RwLock::new(None), - }, + contents: StylesheetContents::from_shared_data( + CssRules::new(vec![rule], shared_lock), + Origin::Author, + window_from_node(self).get_url(), + document.quirks_mode(), + ), media: Arc::new(shared_lock.wrap(MediaList::empty())), shared_lock: shared_lock.clone(), disabled: AtomicBool::new(false), |