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
parent 42844195eb
commit 1137203dba
2 changed files with 4 additions and 0 deletions

View File

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

View File

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