Compute nsBlockFrame.cpp's ComputeCombinedArea to split overflow areas. (Bug 542595, patch 11) r=roc a2.0=blocking2.0:beta8
authorL. David Baron <dbaron@dbaron.org>
Wed, 06 Oct 2010 21:25:45 -0700
changeset 55031 ed9ebff7469d39ba1552c4c760bfea23ba238cf0
parent 55030 96a52ac050062e3797e7c4340de8090e88d32a1c
child 55032 25b99ff44f9c6f6214c9aca4c54d3e420f67be5a
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs542595
milestone2.0b8pre
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
Compute nsBlockFrame.cpp's ComputeCombinedArea to split overflow areas. (Bug 542595, patch 11) r=roc a2.0=blocking2.0:beta8
layout/generic/nsBlockFrame.cpp
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -5917,31 +5917,31 @@ nsBlockFrame::GetSkipSides() const
   nsIFrame* nif = GetNextInFlow();
   if (nif && !IS_TRUE_OVERFLOW_CONTAINER(nif)) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
   return skip;
 }
 
 #ifdef DEBUG
-static void ComputeCombinedArea(nsLineList& aLines,
-                                nscoord aWidth, nscoord aHeight,
-                                nsRect& aResult)
+static void ComputeVisualOverflowArea(nsLineList& aLines,
+                                      nscoord aWidth, nscoord aHeight,
+                                      nsRect& aResult)
 {
   nscoord xa = 0, ya = 0, xb = aWidth, yb = aHeight;
   for (nsLineList::iterator line = aLines.begin(), line_end = aLines.end();
        line != line_end;
        ++line) {
     // Compute min and max x/y values for the reflowed frame's
     // combined areas
-    nsRect lineCombinedArea(line->GetCombinedArea());
-    nscoord x = lineCombinedArea.x;
-    nscoord y = lineCombinedArea.y;
-    nscoord xmost = x + lineCombinedArea.width;
-    nscoord ymost = y + lineCombinedArea.height;
+    nsRect visOverflow(line->GetVisualOverflowArea());
+    nscoord x = visOverflow.x;
+    nscoord y = visOverflow.y;
+    nscoord xmost = x + visOverflow.width;
+    nscoord ymost = y + visOverflow.height;
     if (x < xa) {
       xa = x;
     }
     if (xmost > xb) {
       xb = xmost;
     }
     if (y < ya) {
       ya = y;
@@ -6102,17 +6102,17 @@ nsBlockFrame::BuildDisplayList(nsDisplay
                                const nsDisplayListSet& aLists)
 {
   PRInt32 drawnLines; // Will only be used if set (gLamePaintMetrics).
   PRInt32 depth = 0;
 #ifdef DEBUG
   if (gNoisyDamageRepair) {
       depth = GetDepth();
       nsRect ca;
-      ::ComputeCombinedArea(mLines, mRect.width, mRect.height, ca);
+      ::ComputeVisualOverflowArea(mLines, mRect.width, mRect.height, ca);
       nsFrame::IndentBy(stdout, depth);
       ListTag(stdout);
       printf(": bounds=%d,%d,%d,%d dirty(absolute)=%d,%d,%d,%d ca=%d,%d,%d,%d\n",
              mRect.x, mRect.y, mRect.width, mRect.height,
              aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height,
              ca.x, ca.y, ca.width, ca.height);
   }
   PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.