mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Add a preference for offset-path:ray().
Differential Revision: https://phabricator.services.mozilla.com/D53110
This commit is contained in:
parent
f8ceb5cb84
commit
5582de5d7e
1 changed files with 13 additions and 0 deletions
|
@ -16,11 +16,24 @@ use style_traits::{ParseError, StyleParseErrorKind};
|
||||||
/// The specified value of `offset-path`.
|
/// The specified value of `offset-path`.
|
||||||
pub type OffsetPath = GenericOffsetPath<Angle>;
|
pub type OffsetPath = GenericOffsetPath<Angle>;
|
||||||
|
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
|
fn is_ray_enabled() -> bool {
|
||||||
|
static_prefs::pref!("layout.css.motion-path-ray.enabled")
|
||||||
|
}
|
||||||
|
#[cfg(feature = "servo")]
|
||||||
|
fn is_ray_enabled() -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
impl Parse for RayFunction<Angle> {
|
impl Parse for RayFunction<Angle> {
|
||||||
fn parse<'i, 't>(
|
fn parse<'i, 't>(
|
||||||
context: &ParserContext,
|
context: &ParserContext,
|
||||||
input: &mut Parser<'i, 't>,
|
input: &mut Parser<'i, 't>,
|
||||||
) -> Result<Self, ParseError<'i>> {
|
) -> Result<Self, ParseError<'i>> {
|
||||||
|
if !is_ray_enabled() {
|
||||||
|
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
||||||
|
}
|
||||||
|
|
||||||
let mut angle = None;
|
let mut angle = None;
|
||||||
let mut size = None;
|
let mut size = None;
|
||||||
let mut contain = false;
|
let mut contain = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue