mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1253052. Only schedule paint when apz aware event listener is added if event regions/apz are enabled. r=kats
Bug 1210057 added this, we should only do it if apz/event regions are enabled.
This commit is contained in:
parent
159d69538f
commit
cd3746d910
@ -49,6 +49,7 @@
|
||||
#include "nsSandboxFlags.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsDisplayList.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -457,7 +458,7 @@ EventListenerManager::ProcessApzAwareEventListenerAdd()
|
||||
}
|
||||
}
|
||||
|
||||
if (doc) {
|
||||
if (doc && nsDisplayListBuilder::LayerEventRegionsEnabled()) {
|
||||
nsIPresShell* ps = doc->GetShell();
|
||||
if (ps) {
|
||||
nsIFrame* f = ps->GetRootFrame();
|
||||
|
@ -1420,14 +1420,25 @@ bool
|
||||
nsDisplayListBuilder::IsBuildingLayerEventRegions()
|
||||
{
|
||||
if (mMode == PAINTING) {
|
||||
// Note: this is the only place that gets to query LayoutEventRegionsEnabled
|
||||
// 'directly' - other code should call this function.
|
||||
// Note: this function and LayerEventRegionsEnabled are the only places
|
||||
// that get to query LayoutEventRegionsEnabled 'directly' - other code
|
||||
// should call this function.
|
||||
return gfxPrefs::LayoutEventRegionsEnabledDoNotUseDirectly() ||
|
||||
mAsyncPanZoomEnabled;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsDisplayListBuilder::LayerEventRegionsEnabled()
|
||||
{
|
||||
// Note: this function and IsBuildingLayerEventRegions are the only places
|
||||
// that get to query LayoutEventRegionsEnabled 'directly' - other code
|
||||
// should call this function.
|
||||
return gfxPrefs::LayoutEventRegionsEnabledDoNotUseDirectly() ||
|
||||
gfxPlatform::AsyncPanZoomEnabled();
|
||||
}
|
||||
|
||||
void nsDisplayListSet::MoveTo(const nsDisplayListSet& aDestination) const
|
||||
{
|
||||
aDestination.BorderBackground()->AppendToTop(BorderBackground());
|
||||
|
@ -435,6 +435,7 @@ public:
|
||||
mLayerEventRegions = aItem;
|
||||
}
|
||||
bool IsBuildingLayerEventRegions();
|
||||
static bool LayerEventRegionsEnabled();
|
||||
bool IsInsidePointerEventsNoneDoc()
|
||||
{
|
||||
return CurrentPresShellState()->mInsidePointerEventsNoneDoc;
|
||||
|
Loading…
Reference in New Issue
Block a user