mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1492958 - Allow user-select: -moz-text on user-agent stylesheets only. r=mats
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
e7cb518669
commit
cbc11eb6a3
@ -48,6 +48,10 @@ let whitelist = [
|
||||
{sourceName: /(?:res|gre-resources)\/forms\.css$/i,
|
||||
errorMessage: /Error in parsing value for \u2018-moz-appearance\u2019/iu,
|
||||
isFromDevTools: false},
|
||||
// -moz-user-select: -moz-text is only enabled to user-agent stylesheets.
|
||||
{sourceName: /contenteditable.css$/i,
|
||||
errorMessage: /Error in parsing value for \u2018-moz-user-select\u2019/iu,
|
||||
isFromDevTools: false},
|
||||
// These variables are declared somewhere else, and error when we load the
|
||||
// files directly. They're all marked intermittent because their appearance
|
||||
// in the error console seems to not be consistent.
|
||||
|
@ -110,6 +110,9 @@ const NON_CONTENT_ACCESSIBLE_VALUES = {
|
||||
"-moz-mac-vibrant-titlebar-dark",
|
||||
"-moz-mac-vibrant-titlebar-light",
|
||||
],
|
||||
"-moz-user-select": [
|
||||
"-moz-text",
|
||||
],
|
||||
};
|
||||
|
||||
if (!SpecialPowers.getBoolPref("layout.css.xul-box-display-values.content.enabled")) {
|
||||
|
@ -39,7 +39,6 @@ ${helpers.predefined_type(
|
||||
gecko_ffi_name="mUserSelect",
|
||||
alias="-webkit-user-select",
|
||||
animation_value_type="discrete",
|
||||
needs_context=False,
|
||||
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.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-ui-4/#propdef-user-select
|
||||
@ -167,5 +172,11 @@ pub enum UserSelect {
|
||||
All,
|
||||
/// Like `text`, except that it won't get overridden by ancestors having
|
||||
/// `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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user