Bug 1169881 - Recompute image visibility when display port margins change. r=tn, a=jocheng
authorSeth Fowler <mark.seth.fowler@gmail.com>
Fri, 29 May 2015 23:50:53 -0700
changeset 238570 5b3f1796ddf64171475ab4c0e06604d19fa1fe8b
parent 238569 a4a5092bd193125cf81bdc38a4e7be37979a13b1
child 238571 2cd0112f2e3c9944bdc152d6ed71949afadf7960
push id672
push userryanvm@gmail.com
push dateTue, 02 Jun 2015 17:36:08 +0000
treeherdermozilla-b2g37_v2_2@5b3f1796ddf6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn, jocheng
bugs1169881
milestone37.0
Bug 1169881 - Recompute image visibility when display port margins change. r=tn, a=jocheng
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1035,16 +1035,20 @@ nsLayoutUtils::SetDisplayPortMargins(nsI
 
   if (aRepaintMode == RepaintMode::Repaint) {
     nsIFrame* rootFrame = aPresShell->FrameManager()->GetRootFrame();
     if (rootFrame) {
       rootFrame->SchedulePaint();
     }
   }
 
+  // Display port margins changing means that the set of visible images may
+  // have drastically changed. Schedule an update.
+  aPresShell->ScheduleImageVisibilityUpdate();
+
   return true;
 }
 
 void
 nsLayoutUtils::SetDisplayPortBase(nsIContent* aContent, const nsRect& aBase)
 {
   aContent->SetProperty(nsGkAtoms::DisplayPortBase, new nsRect(aBase),
                         nsINode::DeleteProperty<nsRect>);