Bug 1137944 - Add a pref to control plugin window hiding. r=roc

This commit is contained in:
Jim Mathies 2015-10-06 14:23:24 -05:00
Родитель 732721ad2a
Коммит d44a5df7b4
2 изменённых файлов: 4 добавлений и 0 удалений

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

@ -240,6 +240,7 @@ private:
DECL_GFX_PREF(Live, "gfx.direct2d.use1_1", Direct2DUse1_1, bool, false);
DECL_GFX_PREF(Live, "gfx.direct2d.allow1_0", Direct2DAllow1_0, bool, false);
DECL_GFX_PREF(Live, "gfx.draw-color-bars", CompositorDrawColorBars, bool, false);
DECL_GFX_PREF(Once, "gfx.e10s.hide-plugins-for-scroll", HidePluginsForScroll, bool, true);
DECL_GFX_PREF(Once, "gfx.font_rendering.directwrite.force-enabled", DirectWriteFontRenderingForceEnabled, bool, false);
DECL_GFX_PREF(Live, "gfx.gralloc.fence-with-readpixels", GrallocFenceWithReadPixels, bool, false);
DECL_GFX_PREF(Live, "gfx.layerscope.enabled", LayerScopeEnabled, bool, false);

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

@ -1997,6 +1997,9 @@ void
ScrollFrameHelper::NotifyPluginFrames(AsyncScrollEventType aEvent)
{
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
if (!gfxPrefs::HidePluginsForScroll()) {
return;
}
if (XRE_IsContentProcess()) {
if (aEvent != mAsyncScrollEvent) {
nsPresContext* presContext = mOuter->PresContext();