mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Allow user-select: -moz-text on user-agent stylesheets only.
It's only used in contenteditable.css, and same usage in comm-central. That sheet is loaded as a ua sheet so let's restrict it to that. No relevant external usage either. This value was introduced in bug 1181130. Differential Revision: https://phabricator.services.mozilla.com/D11584
This commit is contained in:
parent
4bc9bc11e1
commit
4c3646eff0
2 changed files with 11 additions and 1 deletions
|
@ -39,7 +39,6 @@ ${helpers.predefined_type(
|
||||||
gecko_ffi_name="mUserSelect",
|
gecko_ffi_name="mUserSelect",
|
||||||
alias="-webkit-user-select",
|
alias="-webkit-user-select",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
needs_context=False,
|
|
||||||
spec="https://drafts.csswg.org/css-ui-4/#propdef-user-select",
|
spec="https://drafts.csswg.org/css-ui-4/#propdef-user-select",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,11 @@ impl Parse for ScrollbarColor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn in_ua_sheet(context: &ParserContext) -> bool {
|
||||||
|
use crate::stylesheets::Origin;
|
||||||
|
context.stylesheet_origin == Origin::UserAgent
|
||||||
|
}
|
||||||
|
|
||||||
/// The specified value for the `user-select` property.
|
/// The specified value for the `user-select` property.
|
||||||
///
|
///
|
||||||
/// https://drafts.csswg.org/css-ui-4/#propdef-user-select
|
/// https://drafts.csswg.org/css-ui-4/#propdef-user-select
|
||||||
|
@ -167,5 +172,11 @@ pub enum UserSelect {
|
||||||
All,
|
All,
|
||||||
/// Like `text`, except that it won't get overridden by ancestors having
|
/// Like `text`, except that it won't get overridden by ancestors having
|
||||||
/// `all`.
|
/// `all`.
|
||||||
|
///
|
||||||
|
/// FIXME(emilio): This only has one use in contenteditable.css, can we find
|
||||||
|
/// a better way to do this?
|
||||||
|
///
|
||||||
|
/// See bug 1181130.
|
||||||
|
#[parse(condition = "in_ua_sheet")]
|
||||||
MozText,
|
MozText,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue