Bug 1285409. Store out of flow data for frames we are going to descent into anyways (despite no intersection with the dirty rect) so we have the correct clip for them. r=mattwoodrow, a=gchang
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 08 Jul 2016 00:25:18 -0500
changeset 339944 87f0c9babed36b1384431e1a8c4cdca749e4b536
parent 339943 6bc76a1b5dbb1b7ee5b68aeb5d759633221e55e0
child 339945 6c4ced3ac243a3e36549904fbe5f889a7a7deaab
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, gchang
bugs1285409
milestone49.0a2
Bug 1285409. Store out of flow data for frames we are going to descent into anyways (despite no intersection with the dirty rect) so we have the correct clip for them. r=mattwoodrow, a=gchang If the frame already has the NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO bit we are going to descend into it anyways, so we may as well store the oof data so we can have the correct clip. Sometimes we add the bit after this test though, so it doesn't allow us to have the proper clip in all cases.
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -874,18 +874,20 @@ void nsDisplayListBuilder::MarkOutOfFlow
    /**
     * Add a fuzz factor to the overflow rectangle so that elements only just
     * out of view are pulled into the display list, so they can be
     * prerendered if necessary.
     */
     overflowRect.Inflate(nsPresContext::CSSPixelsToAppUnits(32));
   }
 
-  if (!dirty.IntersectRect(dirty, overflowRect))
+  if (!dirty.IntersectRect(dirty, overflowRect) &&
+      !(aFrame->GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO)) {
     return;
+  }
 
   const DisplayItemClip* oldClip = mClipState.GetClipForContainingBlockDescendants();
   const DisplayItemScrollClip* sc = mClipState.GetCurrentInnermostScrollClip();
   OutOfFlowDisplayData* data = new OutOfFlowDisplayData(oldClip, sc, dirty);
   aFrame->Properties().Set(nsDisplayListBuilder::OutOfFlowDisplayDataProperty(), data);
 
   MarkFrameForDisplay(aFrame, aDirtyFrame);
 }