mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Some servo build fixes.
This commit is contained in:
parent
f76acc84c6
commit
848a6203de
13 changed files with 198 additions and 188 deletions
|
@ -10,7 +10,7 @@ use crate::context::QuirksMode;
|
|||
use crate::error_reporting::ParseErrorReporter;
|
||||
use crate::media_queries::MediaList;
|
||||
use crate::shared_lock::SharedRwLock;
|
||||
use crate::stylesheets::{Origin, Stylesheet, StylesheetLoader, UrlExtraData};
|
||||
use crate::stylesheets::{AllowImportRules, Origin, Stylesheet, StylesheetLoader, UrlExtraData};
|
||||
use cssparser::{stylesheet_encoding, EncodingSupport};
|
||||
use servo_arc::Arc;
|
||||
use std::borrow::Cow;
|
||||
|
@ -78,6 +78,7 @@ impl Stylesheet {
|
|||
error_reporter,
|
||||
quirks_mode,
|
||||
0,
|
||||
AllowImportRules::Yes,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -100,6 +101,7 @@ impl Stylesheet {
|
|||
stylesheet_loader,
|
||||
error_reporter,
|
||||
0,
|
||||
AllowImportRules::Yes,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ use crate::media_queries::Device;
|
|||
use crate::properties;
|
||||
use crate::properties::{ComputedValues, LonghandId, StyleBuilder};
|
||||
use crate::rule_cache::RuleCacheConditions;
|
||||
#[cfg(feature = "servo")]
|
||||
use crate::Prefix;
|
||||
use crate::{ArcSlice, Atom};
|
||||
use euclid::default::Size2D;
|
||||
use servo_arc::Arc;
|
||||
|
@ -501,7 +499,9 @@ trivial_to_computed_value!(u32);
|
|||
trivial_to_computed_value!(usize);
|
||||
trivial_to_computed_value!(Atom);
|
||||
#[cfg(feature = "servo")]
|
||||
trivial_to_computed_value!(Prefix);
|
||||
trivial_to_computed_value!(html5ever::Namespace);
|
||||
#[cfg(feature = "servo")]
|
||||
trivial_to_computed_value!(html5ever::Prefix);
|
||||
trivial_to_computed_value!(String);
|
||||
trivial_to_computed_value!(Box<str>);
|
||||
trivial_to_computed_value!(crate::OwnedStr);
|
||||
|
|
|
@ -79,6 +79,8 @@ trivial_to_resolved_value!(computed::url::ComputedUrl);
|
|||
#[cfg(feature = "gecko")]
|
||||
trivial_to_resolved_value!(computed::url::ComputedImageUrl);
|
||||
#[cfg(feature = "servo")]
|
||||
trivial_to_resolved_value!(html5ever::Namespace);
|
||||
#[cfg(feature = "servo")]
|
||||
trivial_to_resolved_value!(html5ever::Prefix);
|
||||
trivial_to_resolved_value!(computed::LengthPercentage);
|
||||
trivial_to_resolved_value!(style_traits::values::specified::AllowedNumericType);
|
||||
|
|
|
@ -52,6 +52,16 @@ pub type Gradient = generic::Gradient<
|
|||
|
||||
type LengthPercentageItemList = crate::OwnedSlice<generic::GradientItem<Color, LengthPercentage>>;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn conic_gradients_enabled() -> bool {
|
||||
static_prefs::pref!("layout.css.conic-gradient.enabled")
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
fn conic_gradients_enabled() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
impl SpecifiedValueInfo for Gradient {
|
||||
const SUPPORTED_TYPES: u8 = CssType::GRADIENT;
|
||||
|
||||
|
@ -73,7 +83,7 @@ impl SpecifiedValueInfo for Gradient {
|
|||
"-webkit-gradient",
|
||||
]);
|
||||
|
||||
if static_prefs::pref!("layout.css.conic-gradient.enabled") {
|
||||
if conic_gradients_enabled() {
|
||||
f(&["conic-gradient", "repeating-conic-gradient"]);
|
||||
}
|
||||
}
|
||||
|
@ -240,10 +250,10 @@ impl Parse for Gradient {
|
|||
"-moz-repeating-radial-gradient" => {
|
||||
(Shape::Radial, true, GradientCompatMode::Moz)
|
||||
},
|
||||
"conic-gradient" if static_prefs::pref!("layout.css.conic-gradient.enabled") => {
|
||||
"conic-gradient" if conic_gradients_enabled() => {
|
||||
(Shape::Conic, false, GradientCompatMode::Modern)
|
||||
},
|
||||
"repeating-conic-gradient" if static_prefs::pref!("layout.css.conic-gradient.enabled") => {
|
||||
"repeating-conic-gradient" if conic_gradients_enabled() => {
|
||||
(Shape::Conic, true, GradientCompatMode::Modern)
|
||||
},
|
||||
"-webkit-gradient" => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue