Bug 801488. Part 2: Don't Redraw; DLBI will handle everything. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 25 Oct 2012 00:34:55 +1300
changeset 111502 205c1c846d7071cb802a46c27a57c83250d6f35c
parent 111501 1ebc3b1b8feb8eb7c3e24a7772b66a462c6b9fa9
child 111503 e4367fd2043ff9233a9b951cf2ba4f34440d8847
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersmattwoodrow
bugs801488
milestone19.0a1
Bug 801488. Part 2: Don't Redraw; DLBI will handle everything. r=mattwoodrow
layout/xul/base/src/nsStackLayout.cpp
--- a/layout/xul/base/src/nsStackLayout.cpp
+++ b/layout/xul/base/src/nsStackLayout.cpp
@@ -335,42 +335,31 @@ nsStackLayout::Layout(nsIFrame* aBox, ns
 
           // Now place the child.
           child->SetBounds(aState, childRect);
 
           // Flow the child.
           child->Layout(aState);
 
           // Get the child's new rect.
-          nsRect childRectNoMargin;
-          childRectNoMargin = childRect = child->GetRect();
+          childRect = child->GetRect();
           childRect.Inflate(margin);
 
           if (child->GetStyleXUL()->mStretchStack) {
             // Did the child push back on us and get bigger?
             if (offset.LeftRight() + childRect.width > clientRect.width) {
               clientRect.width = childRect.width + offset.LeftRight();
               grow = true;
             }
 
             if (offset.TopBottom() + childRect.height > clientRect.height) {
               clientRect.height = childRect.height + offset.TopBottom();
               grow = true;
             }
           }
-
-          if (!childRectNoMargin.IsEqualInterior(oldRect))
-          {
-            // redraw the new and old positions if the 
-            // child moved or resized.
-            // if the new and old rect intersect meaning we just moved a little
-            // then just redraw the union. If they don't intersect (meaning
-            // we moved a good distance) redraw both separately.
-            aBox->Redraw(aState);
-          }
        }
 
        child = child->GetNextBox();
      }
    } while (grow);
    
    // if some HTML inside us got bigger we need to force ourselves to
    // get bigger