mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Remove "bad APZ pref" warnings in about:support. (bug 1214170 part 3, r=kats)
This commit is contained in:
parent
b05b8ccf46
commit
522d634f56
@ -2132,34 +2132,6 @@ gfxPlatform::GetDefaultFrameRate()
|
||||
return 60;
|
||||
}
|
||||
|
||||
static nsString
|
||||
DetectBadApzWheelInputPrefs()
|
||||
{
|
||||
static const char *sBadMultiplierPrefs[] = {
|
||||
"mousewheel.default.delta_multiplier_x",
|
||||
"mousewheel.with_alt.delta_multiplier_x",
|
||||
"mousewheel.with_control.delta_multiplier_x",
|
||||
"mousewheel.with_meta.delta_multiplier_x",
|
||||
"mousewheel.with_shift.delta_multiplier_x",
|
||||
"mousewheel.with_win.delta_multiplier_x",
|
||||
"mousewheel.with_alt.delta_multiplier_y",
|
||||
"mousewheel.with_control.delta_multiplier_y",
|
||||
"mousewheel.with_meta.delta_multiplier_y",
|
||||
"mousewheel.with_shift.delta_multiplier_y",
|
||||
"mousewheel.with_win.delta_multiplier_y",
|
||||
};
|
||||
|
||||
nsString badPref;
|
||||
for (size_t i = 0; i < MOZ_ARRAY_LENGTH(sBadMultiplierPrefs); i++) {
|
||||
if (Preferences::GetInt(sBadMultiplierPrefs[i], 100) != 100) {
|
||||
badPref.AssignASCII(sBadMultiplierPrefs[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return badPref;
|
||||
}
|
||||
|
||||
void
|
||||
gfxPlatform::GetApzSupportInfo(mozilla::widget::InfoObject& aObj)
|
||||
{
|
||||
@ -2168,12 +2140,7 @@ gfxPlatform::GetApzSupportInfo(mozilla::widget::InfoObject& aObj)
|
||||
}
|
||||
|
||||
if (SupportsApzWheelInput()) {
|
||||
nsString badPref = DetectBadApzWheelInputPrefs();
|
||||
|
||||
aObj.DefineProperty("ApzWheelInput", 1);
|
||||
if (badPref.Length()) {
|
||||
aObj.DefineProperty("ApzWheelInputWarning", badPref);
|
||||
}
|
||||
}
|
||||
|
||||
if (SupportsApzTouchInput()) {
|
||||
|
@ -206,21 +206,13 @@ var snapshotFormatters = {
|
||||
let out = [];
|
||||
for (let type of ['Wheel', 'Touch', 'Drag']) {
|
||||
let key = 'Apz' + type + 'Input';
|
||||
let warningKey = key + 'Warning';
|
||||
|
||||
if (!(key in info))
|
||||
continue;
|
||||
|
||||
let badPref = info[warningKey];
|
||||
delete info[key];
|
||||
delete info[warningKey];
|
||||
|
||||
let message;
|
||||
if (badPref)
|
||||
message = localizedMsg([type.toLowerCase() + 'Warning', badPref]);
|
||||
else
|
||||
message = localizedMsg([type.toLowerCase() + 'Enabled']);
|
||||
dump(message + ', ' + (type.toLowerCase() + 'Warning') + ', ' + badPref + '\n');
|
||||
let message = localizedMsg([type.toLowerCase() + 'Enabled']);
|
||||
out.push(message);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user