Bug 887171 - browser-fullZoom.js puts MOUSE_SCROLL_ZOOM into the global scope, should be private instead. r=mak

This commit is contained in:
Dão Gottwald 2013-06-26 18:07:14 +02:00
Родитель 34b2d64777
Коммит f4df7e7e1b
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -6,10 +6,6 @@
#endif
*/
// One of the possible values for the mousewheel.* preferences.
// From nsEventStateManager.cpp.
const MOUSE_SCROLL_ZOOM = 3;
/**
* Controls the "full zoom" setting and its site-specific preferences.
*/
@ -23,6 +19,10 @@ var FullZoom = {
// browser.zoom.updateBackgroundTabs preference cache
updateBackgroundTabs: undefined,
// One of the possible values for the mousewheel.* preferences.
// From nsEventStateManager.h.
ACTION_ZOOM: 3,
// Incremented each time the zoom is changed so that operations that change
// the zoom asynchronously don't clobber more recent zoom changes. See
// _getState below.
@ -116,7 +116,7 @@ var FullZoom = {
// Don't do anything if this isn't a "zoom" scroll event.
var isZoomEvent = false;
try {
isZoomEvent = (gPrefService.getIntPref(pref) == MOUSE_SCROLL_ZOOM);
isZoomEvent = (gPrefService.getIntPref(pref) == this.ACTION_ZOOM);
} catch (e) {}
if (!isZoomEvent)
return;