Remove "bad APZ pref" warnings in about:support. (bug 1214170 part 3, r=kats)

This commit is contained in:
David Anderson 2015-12-01 13:49:01 -08:00
parent b05b8ccf46
commit 522d634f56
2 changed files with 1 additions and 42 deletions

View File

@ -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()) {

View File

@ -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);
}