mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #9852 - bholley:stylo_uplifts_3, r=bholley
Stylo uplifts 3 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9852) <!-- Reviewable:end -->
This commit is contained in:
commit
49e9594fb9
11 changed files with 214 additions and 162 deletions
|
@ -19,7 +19,7 @@ pub trait SelectorImplExt : SelectorImpl + Sized {
|
|||
|
||||
fn get_user_or_user_agent_stylesheets() -> &'static [Stylesheet<Self>];
|
||||
|
||||
fn get_quirks_mode_stylesheet() -> &'static Stylesheet<Self>;
|
||||
fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet<Self>>;
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, HeapSizeOf, Hash)]
|
||||
|
@ -135,7 +135,7 @@ impl SelectorImplExt for ServoSelectorImpl {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn get_quirks_mode_stylesheet() -> &'static Stylesheet<Self> {
|
||||
&*QUIRKS_MODE_STYLESHEET
|
||||
fn get_quirks_mode_stylesheet() -> Option<&'static Stylesheet<Self>> {
|
||||
Some(&*QUIRKS_MODE_STYLESHEET)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,7 +146,9 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
|
|||
}
|
||||
|
||||
if self.quirks_mode {
|
||||
self.add_stylesheet(&Impl::get_quirks_mode_stylesheet());
|
||||
if let Some(s) = Impl::get_quirks_mode_stylesheet() {
|
||||
self.add_stylesheet(s);
|
||||
}
|
||||
}
|
||||
|
||||
for ref stylesheet in doc_stylesheets.iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue