Bug 782660. Resizing a text control frame with borders should invalidate the borders as needed. r=roc
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 29 Aug 2012 01:14:46 -0400
changeset 105771 747584155b62aaf0c2a9919104c730df29fe63d1
parent 105770 e6517dae3b952faed11a8c5e4f7e9f23d98a0278
child 105772 9e3f2ec9e8f7c98b6c324ad5d2440bff23aeac47
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersroc
bugs782660
milestone18.0a1
Bug 782660. Resizing a text control frame with borders should invalidate the borders as needed. r=roc
layout/forms/nsTextControlFrame.cpp
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -538,16 +538,20 @@ nsTextControlFrame::Reflow(nsPresContext
   // overflow handling
   aDesiredSize.SetOverflowAreasToDesiredBounds();
   // perform reflow on all kids
   nsIFrame* kid = mFrames.FirstChild();
   while (kid) {
     ReflowTextControlChild(kid, aPresContext, aReflowState, aStatus, aDesiredSize);
     kid = kid->GetNextSibling();
   }
+
+  // If we're resizing, we might need to invalidate our border areas and such
+  CheckInvalidateSizeChange(aDesiredSize);
+
   // take into account css properties that affect overflow handling
   FinishAndStoreOverflow(&aDesiredSize);
 
   aStatus = NS_FRAME_COMPLETE;
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
   return NS_OK;
 }