Bug 803556 - Schedule a paint whenever we reflow a display root frame. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 25 Oct 2012 12:04:41 +1300
changeset 111430 c0c98a83180465a13114dbd9678a3c7968a1fc42
parent 111427 50ce28b49e32a1c81349fe9bcb97d7d7f271b5b4
child 111431 bbfa842d5f5e0f3307b193dd080fadd1c7fa5d4b
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersroc
bugs803556
milestone19.0a1
Bug 803556 - Schedule a paint whenever we reflow a display root frame. r=roc
layout/forms/nsListControlFrame.cpp
layout/xul/base/src/nsMenuPopupFrame.cpp
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -350,16 +350,18 @@ NS_IMETHODIMP
 nsListControlFrame::Reflow(nsPresContext*           aPresContext, 
                            nsHTMLReflowMetrics&     aDesiredSize,
                            const nsHTMLReflowState& aReflowState, 
                            nsReflowStatus&          aStatus)
 {
   NS_PRECONDITION(aReflowState.ComputedWidth() != NS_UNCONSTRAINEDSIZE,
                   "Must have a computed width");
 
+  SchedulePaint();
+
   mHasPendingInterruptAtStartOfReflow = aPresContext->HasPendingInterrupt();
 
   // If all the content and frames are here 
   // then initialize it before reflow
   if (mIsAllContentHere && !mHasBeenInitialized) {
     if (false == mIsAllFramesHere) {
       CheckIfAllFramesHere();
     }
--- a/layout/xul/base/src/nsMenuPopupFrame.cpp
+++ b/layout/xul/base/src/nsMenuPopupFrame.cpp
@@ -380,16 +380,18 @@ nsMenuPopupFrame::IsLeaf() const
 }
 
 void
 nsMenuPopupFrame::LayoutPopup(nsBoxLayoutState& aState, nsIFrame* aParentMenu, bool aSizedToPopup)
 {
   if (!mGeneratedChildren)
     return;
 
+  SchedulePaint();
+
   bool shouldPosition = true;
   bool isOpen = IsOpen();
   if (!isOpen) {
     // if the popup is not open, only do layout while showing or if the menu
     // is sized to the popup
     shouldPosition = (mPopupState == ePopupShowing);
     if (!shouldPosition && !aSizedToPopup)
       return;