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
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 08 Jul 2016 00:25:18 -0500
changeset 304185 b8274835178599b7dfd55860f84406afb40bd673
parent 304184 a92d0eec5c91eb50116758bf14d05fde28bf788a
child 304186 45682df2d2d45e5a8385fd842579e661a4b60bc5
child 304201 2373b4f2f321e24560ae06f39bdd5cd71f5c34a5
push id30414
push usercbook@mozilla.com
push dateFri, 08 Jul 2016 09:59:01 +0000
treeherdermozilla-central@45682df2d2d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1285409
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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 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);
 }