Bug 1107143 - Don't build event regions unless we're painting to the window. r?tnikkel
MozReview-Commit-ID: LRN8S7buXLL
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1415,17 +1415,17 @@ nsDisplayListBuilder::GetDirtyRectForScr
return nsRect();
}
return result;
}
bool
nsDisplayListBuilder::IsBuildingLayerEventRegions()
{
- if (mMode == PAINTING) {
+ if (IsPaintingToWindow()) {
// 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;
}