mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
style: Make AuthorStylesEnabled an enum.
Chances are we need to pass it around in a bit. Also invert the boolean because I don't want to reason about double negations, even if they're simple. MozReview-Commit-ID: KhX4lDKwDoj
This commit is contained in:
parent
4cc5717116
commit
438251cbfc
3 changed files with 33 additions and 20 deletions
|
@ -41,7 +41,7 @@ use smallvec::SmallVec;
|
|||
use std::ops;
|
||||
use std::sync::Mutex;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use stylesheet_set::{DataValidity, SheetRebuildKind, DocumentStylesheetSet, StylesheetFlusher};
|
||||
use stylesheet_set::{AuthorStylesEnabled, DataValidity, SheetRebuildKind, DocumentStylesheetSet, StylesheetFlusher};
|
||||
#[cfg(feature = "gecko")]
|
||||
use stylesheets::{CounterStyleRule, FontFaceRule, FontFeatureValuesRule, PageRule};
|
||||
use stylesheets::{CssRule, Origin, OriginSet, PerOrigin, PerOriginIter};
|
||||
|
@ -592,8 +592,8 @@ impl Stylist {
|
|||
}
|
||||
|
||||
/// Sets whether author style is enabled or not.
|
||||
pub fn set_author_style_disabled(&mut self, disabled: bool) {
|
||||
self.stylesheets.set_author_style_disabled(disabled);
|
||||
pub fn set_author_styles_enabled(&mut self, enabled: AuthorStylesEnabled) {
|
||||
self.stylesheets.set_author_styles_enabled(enabled);
|
||||
}
|
||||
|
||||
/// Returns whether we've recorded any stylesheet change so far.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue