Backed out changeset 85a9eb44b240 (bug 366791) due to bug 449221.
authorL. David Baron <dbaron@dbaron.org>
Wed, 06 Aug 2008 13:56:42 -0700
changeset 16444 6521fc6e954ccb234a2ba92c096f5ff937901856
parent 16371 85a9eb44b2400c1fc25bbe91e9b9723da8f2a6a0
child 16445 5ed2c3ebf4f597a6222fac550d0f108a88b113da
push id1041
push userdbaron@mozilla.com
push dateWed, 06 Aug 2008 20:57:08 +0000
treeherdermozilla-central@5ed2c3ebf4f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs366791, 449221
milestone1.9.1a2pre
backs out85a9eb44b2400c1fc25bbe91e9b9723da8f2a6a0
Backed out changeset 85a9eb44b240 (bug 366791) due to bug 449221.
layout/xul/base/src/nsScrollbarFrame.cpp
layout/xul/base/src/nsScrollbarFrame.h
--- a/layout/xul/base/src/nsScrollbarFrame.cpp
+++ b/layout/xul/base/src/nsScrollbarFrame.cpp
@@ -61,16 +61,33 @@ NS_NewScrollbarFrame (nsIPresShell* aPre
 
 //
 // QueryInterface
 //
 NS_INTERFACE_MAP_BEGIN(nsScrollbarFrame)
   NS_INTERFACE_MAP_ENTRY(nsIScrollbarFrame)
 NS_INTERFACE_MAP_END_INHERITING(nsBoxFrame)
 
+
+NS_IMETHODIMP
+nsScrollbarFrame::Init(nsIContent* aContent,
+                       nsIFrame*   aParent,
+                       nsIFrame*   aPrevInFlow)
+{
+  nsresult  rv = nsBoxFrame::Init(aContent, aParent, aPrevInFlow);
+
+  // We want to be a reflow root since we use reflows to move the
+  // slider.  Any reflow inside the scrollbar frame will be a reflow to
+  // move the slider and will thus not change anything outside of the
+  // scrollbar or change the size of the scrollbar frame.
+  mState |= NS_FRAME_REFLOW_ROOT;
+
+  return rv;
+}
+
 NS_IMETHODIMP
 nsScrollbarFrame::Reflow(nsPresContext*          aPresContext,
                          nsHTMLReflowMetrics&     aDesiredSize,
                          const nsHTMLReflowState& aReflowState,
                          nsReflowStatus&          aStatus)
 {
   nsresult rv = nsBoxFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
   NS_ENSURE_SUCCESS(rv, rv);
--- a/layout/xul/base/src/nsScrollbarFrame.h
+++ b/layout/xul/base/src/nsScrollbarFrame.h
@@ -83,16 +83,20 @@ public:
   NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
                         nsGUIEvent *    aEvent,
                         nsEventStatus*  aEventStatus);
 
   NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
                            nsGUIEvent *    aEvent,
                            nsEventStatus*  aEventStatus);
 
+  NS_IMETHOD Init(nsIContent*      aContent,
+                  nsIFrame*        aParent,
+                  nsIFrame*        aPrevInFlow);
+
   NS_IMETHOD Reflow(nsPresContext*          aPresContext,
                     nsHTMLReflowMetrics&     aDesiredSize,
                     const nsHTMLReflowState& aReflowState,
                     nsReflowStatus&          aStatus);
 
   virtual PRBool IsContainingBlock() const;
 
   virtual nsIAtom* GetType() const;