Bug 794709. Don't bother trying to compute an intelligent dirty rect when building display lists for nsSimplePageSequence and nsPageContentFrame children; it's nontrivial due to the transforms they introduce, and it doesn't matter anyway. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 04 Oct 2012 23:02:17 +1300
changeset 115534 ee9f796b8416072d1387a625ff07dd613c80b907
parent 115533 a055a290f2662d4b1e48a65c763b79e02af5353b
child 115535 a5c50066ecbb2f9f91c8a53a3d0ee198a3045f1e
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersmattwoodrow
bugs794709
milestone18.0a1
Bug 794709. Don't bother trying to compute an intelligent dirty rect when building display lists for nsSimplePageSequence and nsPageContentFrame children; it's nontrivial due to the transforms they introduce, and it doesn't matter anyway. r=mattwoodrow
layout/generic/nsPageFrame.cpp
layout/generic/nsSimplePageSequence.cpp
--- a/layout/generic/nsPageFrame.cpp
+++ b/layout/generic/nsPageFrame.cpp
@@ -482,17 +482,18 @@ nsPageFrame::BuildDisplayList(nsDisplayL
 
   if (PresContext()->IsScreen()) {
     rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   nsDisplayList content;
   nsIFrame *child = mFrames.FirstChild();
-  rv = child->BuildDisplayListForStackingContext(aBuilder, aDirtyRect - child->GetOffsetTo(this), &content);
+  rv = child->BuildDisplayListForStackingContext(aBuilder,
+      child->GetVisualOverflowRectRelativeToSelf(), &content);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // We may need to paint out-of-flow frames whose placeholders are
   // on other pages. Add those pages to our display list. Note that
   // out-of-flow frames can't be placed after their placeholders so
   // we don't have to process earlier pages. The display lists for
   // these extra pages are pruned so that only display items for the
   // page we currently care about (which we would have reached by
--- a/layout/generic/nsSimplePageSequence.cpp
+++ b/layout/generic/nsSimplePageSequence.cpp
@@ -816,22 +816,24 @@ nsSimplePageSequenceFrame::BuildDisplayL
                                             const nsDisplayListSet& aLists)
 {
   nsresult rv = DisplayBorderBackgroundOutline(aBuilder, aLists);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsDisplayList content;
   nsIFrame* child = GetFirstPrincipalChild();
   while (child) {
-    rv = child->BuildDisplayListForStackingContext(aBuilder, aDirtyRect - child->GetOffsetTo(this), &content);
+    rv = child->BuildDisplayListForStackingContext(aBuilder,
+        child->GetVisualOverflowRectRelativeToSelf(), &content);
     NS_ENSURE_SUCCESS(rv, rv);
     child = child->GetNextSibling();
   }
 
-  rv = content.AppendNewToTop(new (aBuilder) nsDisplayTransform(aBuilder, this, &content, ::ComputePageSequenceTransform));
+  rv = content.AppendNewToTop(new (aBuilder)
+      nsDisplayTransform(aBuilder, this, &content, ::ComputePageSequenceTransform));
   NS_ENSURE_SUCCESS(rv, rv);
 
   aLists.Content()->AppendToTop(&content);
   return NS_OK;
 }
 
 nsIAtom*
 nsSimplePageSequenceFrame::GetType() const