Bug 1464641 - Make sure we mark the out of flow frame as modified when we modify the placeholder. r?miko draft
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 29 May 2018 10:10:59 +1200
changeset 800677 30ba9d18a6ad8d45116b154a1272c00f8414b466
parent 800386 6b9076ac236cb0f9f301bc601eac03f9ec4205df
push id111444
push usermwoodrow@mozilla.com
push dateMon, 28 May 2018 22:11:26 +0000
reviewersmiko
bugs1464641
milestone62.0a1
Bug 1464641 - Make sure we mark the out of flow frame as modified when we modify the placeholder. r?miko MozReview-Commit-ID: L44fXMOpURM
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -996,16 +996,20 @@ nsIFrame::MarkNeedsDisplayItemRebuild()
   if (!nsLayoutUtils::AreRetainedDisplayListsEnabled() ||
       IsFrameModified() ||
       HasAnyStateBits(NS_FRAME_IN_POPUP)) {
     // Skip frames that are already marked modified.
     return;
   }
 
   if (Type() == LayoutFrameType::Placeholder) {
+    nsIFrame* oof = static_cast<nsPlaceholderFrame*>(this)->GetOutOfFlowFrame();
+    if (oof) {
+      oof->MarkNeedsDisplayItemRebuild();
+    }
     // Do not mark placeholder frames modified.
     return;
   }
 
   nsIFrame* displayRoot = nsLayoutUtils::GetDisplayRootFrame(this);
   MOZ_ASSERT(displayRoot);
 
   RetainedDisplayListBuilder* retainedBuilder =