зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1659264 - Remove all references to the preference 'layout.css.moz-touch-enabled.enabled'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D91401
This commit is contained in:
Родитель
309f9b7e7b
Коммит
9d2d6fb472
|
@ -426,11 +426,6 @@ void nsMediaFeatures::InitSystemMetrics() {
|
|||
(nsStaticAtom*)nsGkAtoms::_moz_windows_classic);
|
||||
}
|
||||
|
||||
rv = LookAndFeel::GetInt(LookAndFeel::IntID::TouchEnabled, &metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement((nsStaticAtom*)nsGkAtoms::_moz_touch_enabled);
|
||||
}
|
||||
|
||||
rv = LookAndFeel::GetInt(LookAndFeel::IntID::SwipeAnimationEnabled,
|
||||
&metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
|
|
|
@ -74,10 +74,6 @@ var suppressed_toggles = [
|
|||
];
|
||||
|
||||
var toggles_enabled_in_content = [];
|
||||
if (SpecialPowers.getBoolPref("layout.css.moz-touch-enabled.enabled")) {
|
||||
suppressed_toggles.push("-moz-touch-enabled");
|
||||
toggles_enabled_in_content.push("-moz-touch-enabled");
|
||||
}
|
||||
|
||||
// Possible values for '-moz-os-version'
|
||||
var windows_versions = ["windows-win7", "windows-win8", "windows-win10"];
|
||||
|
|
|
@ -62,10 +62,6 @@ const TOGGLES = [
|
|||
"-moz-swipe-animation-enabled",
|
||||
];
|
||||
|
||||
if (SpecialPowers.getBoolPref("layout.css.moz-touch-enabled.enabled")) {
|
||||
TOGGLES.push("-moz-touch-enabled");
|
||||
}
|
||||
|
||||
for (let i = 0; i < TOGGLES.length; ++i) {
|
||||
testToggle(TOGGLES[i])
|
||||
}
|
||||
|
|
|
@ -768,7 +768,6 @@ function run() {
|
|||
expression_should_not_be_parseable("-moz-windows-compositor: -1");
|
||||
expression_should_not_be_parseable("-moz-windows-classic: -1");
|
||||
expression_should_not_be_parseable("-moz-windows-glass: -1");
|
||||
expression_should_not_be_parseable("-moz-touch-enabled: -1");
|
||||
expression_should_not_be_parseable("-moz-swipe-animation-enabled: -1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-available: -1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-hide-titlebar-by-default: -1");
|
||||
|
@ -791,7 +790,6 @@ function run() {
|
|||
expression_should_not_be_parseable("-moz-windows-compositor: true");
|
||||
expression_should_not_be_parseable("-moz-windows-classic: true");
|
||||
expression_should_not_be_parseable("-moz-windows-glass: true");
|
||||
expression_should_not_be_parseable("-moz-touch-enabled: true");
|
||||
expression_should_not_be_parseable("-moz-swipe-animation-enabled: true");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-available: true");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-hide-titlebar-by-default: true");
|
||||
|
@ -807,15 +805,6 @@ function run() {
|
|||
expression_should_not_be_parseable("-moz-os-version: windows-win10");
|
||||
expression_should_not_be_parseable("-moz-os-version: ");
|
||||
|
||||
{
|
||||
let should_be_parseable_if_enabled = SpecialPowers.getBoolPref('layout.css.moz-touch-enabled.enabled')
|
||||
? expression_should_be_parseable
|
||||
: expression_should_not_be_parseable;
|
||||
should_be_parseable_if_enabled("-moz-touch-enabled");
|
||||
should_be_parseable_if_enabled("-moz-touch-enabled: 0");
|
||||
should_be_parseable_if_enabled("-moz-touch-enabled: 1");
|
||||
}
|
||||
|
||||
{
|
||||
let should_be_parseable_if_enabled = SpecialPowers.getBoolPref('layout.css.prefers-contrast.enabled')
|
||||
? expression_should_be_parseable
|
||||
|
|
|
@ -6043,13 +6043,6 @@
|
|||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Expose the media query -moz-touch-enabled to web content.
|
||||
- name: layout.css.moz-touch-enabled.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Pref to control whether the ::marker property restrictions defined in [1]
|
||||
# apply.
|
||||
#
|
||||
|
|
|
@ -559,19 +559,6 @@ fn eval_system_metric(
|
|||
query_value.map_or(supports_metric, |v| v == supports_metric)
|
||||
}
|
||||
|
||||
fn eval_moz_touch_enabled(
|
||||
device: &Device,
|
||||
query_value: Option<bool>,
|
||||
_: Option<RangeOrOperator>,
|
||||
) -> bool {
|
||||
eval_system_metric(
|
||||
device,
|
||||
query_value,
|
||||
atom!("-moz-touch-enabled"),
|
||||
/* accessible_from_content = */ true,
|
||||
)
|
||||
}
|
||||
|
||||
fn eval_moz_os_version(
|
||||
device: &Device,
|
||||
query_value: Option<Atom>,
|
||||
|
@ -613,7 +600,7 @@ macro_rules! system_metric_feature {
|
|||
/// to support new types in these entries and (2) ensuring that either
|
||||
/// nsPresContext::MediaFeatureValuesChanged is called when the value that
|
||||
/// would be returned by the evaluator function could change.
|
||||
pub static MEDIA_FEATURES: [MediaFeatureDescription; 56] = [
|
||||
pub static MEDIA_FEATURES: [MediaFeatureDescription; 55] = [
|
||||
feature!(
|
||||
atom!("width"),
|
||||
AllowsRanges::Yes,
|
||||
|
@ -840,13 +827,4 @@ pub static MEDIA_FEATURES: [MediaFeatureDescription; 56] = [
|
|||
system_metric_feature!(atom!("-moz-gtk-csd-close-button")),
|
||||
system_metric_feature!(atom!("-moz-gtk-csd-reversed-placement")),
|
||||
system_metric_feature!(atom!("-moz-system-dark-theme")),
|
||||
// This is the only system-metric media feature that's accessible to
|
||||
// content as of today.
|
||||
// FIXME(emilio): Restrict (or remove?) when bug 1035774 lands.
|
||||
feature!(
|
||||
atom!("-moz-touch-enabled"),
|
||||
AllowsRanges::No,
|
||||
Evaluator::BoolInteger(eval_moz_touch_enabled),
|
||||
ParsingRequirements::empty(),
|
||||
),
|
||||
];
|
||||
|
|
|
@ -221,9 +221,6 @@ fn consume_operation_or_colon(input: &mut Parser) -> Result<Option<Operator>, ()
|
|||
fn disabled_by_pref(feature: &Atom, context: &ParserContext) -> bool {
|
||||
#[cfg(feature = "gecko")]
|
||||
{
|
||||
if *feature == atom!("-moz-touch-enabled") {
|
||||
return !static_prefs::pref!("layout.css.moz-touch-enabled.enabled");
|
||||
}
|
||||
if *feature == atom!("forced-colors") {
|
||||
return !static_prefs::pref!("layout.css.forced-colors.enabled");
|
||||
}
|
||||
|
|
|
@ -2242,7 +2242,6 @@ STATIC_ATOMS = [
|
|||
Atom("_moz_windows_classic", "-moz-windows-classic"),
|
||||
Atom("_moz_windows_glass", "-moz-windows-glass"),
|
||||
Atom("_moz_os_version", "-moz-os-version"),
|
||||
Atom("_moz_touch_enabled", "-moz-touch-enabled"),
|
||||
Atom("_moz_menubar_drag", "-moz-menubar-drag"),
|
||||
Atom("_moz_device_pixel_ratio", "-moz-device-pixel-ratio"),
|
||||
Atom("_moz_device_orientation", "-moz-device-orientation"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче