Bug 1107143 - Don't build event regions unless we're painting to the window. r?tnikkel draft
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 07 Mar 2016 17:08:31 -0500
changeset 337476 ca252a8159e92f2b5bf82c5e9bb40e60a96e3f32
parent 337411 be593a64d7c6a826260514fe758ef32a6ee580f7
child 515682 8e299eebb68f079c4fb183c025915567f2ef8ac6
push id12378
push userkgupta@mozilla.com
push dateMon, 07 Mar 2016 22:08:54 +0000
reviewerstnikkel
bugs1107143
milestone48.0a1
Bug 1107143 - Don't build event regions unless we're painting to the window. r?tnikkel MozReview-Commit-ID: LRN8S7buXLL
layout/base/nsDisplayList.cpp
--- 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;
 }