Bug 457864 - ScrollTo doesn't know NS_SCROLL_PROPERTY_ALWAYS_BLIT, so remove it. r+sr=roc (relanding)
authorMarkus Stange <mstange@themasta.com>
Sat, 01 Nov 2008 15:08:54 +0100
changeset 21173 6ea413efbe9afd0540cfea729152563fe6113287
parent 21172 89b91ae29a3db4b4af210438e097501a1e947847
child 21174 5b609dfce6c9e55b7d23e671efc5750c80cd8097
push id3377
push usermstange@themasta.com
push dateSat, 01 Nov 2008 14:10:12 +0000
treeherdermozilla-central@6ea413efbe9a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs457864
milestone1.9.1b2pre
Bug 457864 - ScrollTo doesn't know NS_SCROLL_PROPERTY_ALWAYS_BLIT, so remove it. r+sr=roc (relanding)
layout/xul/base/src/nsListBoxBodyFrame.cpp
layout/xul/base/src/nsMenuPopupFrame.cpp
layout/xul/base/src/nsScrollBoxObject.cpp
--- a/layout/xul/base/src/nsListBoxBodyFrame.cpp
+++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp
@@ -1005,17 +1005,17 @@ nsListBoxBodyFrame::VerticalScroll(PRInt
   nsIScrollableFrame* scrollFrame
     = nsLayoutUtils::GetScrollableFrameFor(this);
   if (!scrollFrame) {
     return;
   }
 
   nsPoint scrollPosition = scrollFrame->GetScrollPosition();
  
-  scrollFrame->ScrollTo(nsPoint(scrollPosition.x, aPosition), NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+  scrollFrame->ScrollTo(nsPoint(scrollPosition.x, aPosition));
 
   mYPosition = aPosition;
 }
 
 ////////// frame and box retrieval
 
 nsIFrame*
 nsListBoxBodyFrame::GetFirstFrame()
--- a/layout/xul/base/src/nsMenuPopupFrame.cpp
+++ b/layout/xul/base/src/nsMenuPopupFrame.cpp
@@ -1372,21 +1372,21 @@ void nsMenuPopupFrame::EnsureMenuItemIsV
       nscoord scrollX, scrollY;
 
       nsRect viewRect = scrollableView->View()->GetBounds();
       nsRect itemRect = aMenuItem->GetRect();
       scrollableView->GetScrollPosition(scrollX, scrollY);
   
       // scroll down
       if ( itemRect.y + itemRect.height > scrollY + viewRect.height )
-        scrollableView->ScrollTo(scrollX, itemRect.y + itemRect.height - viewRect.height, NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+        scrollableView->ScrollTo(scrollX, itemRect.y + itemRect.height - viewRect.height, 0);
       
       // scroll up
       else if ( itemRect.y < scrollY )
-        scrollableView->ScrollTo(scrollX, itemRect.y, NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+        scrollableView->ScrollTo(scrollX, itemRect.y, 0);
     }
   }
 }
 
 NS_IMETHODIMP nsMenuPopupFrame::SetCurrentMenuItem(nsMenuFrame* aMenuItem)
 {
   if (mCurrentMenu == aMenuItem)
     return NS_OK;
--- a/layout/xul/base/src/nsScrollBoxObject.cpp
+++ b/layout/xul/base/src/nsScrollBoxObject.cpp
@@ -86,18 +86,17 @@ nsScrollBoxObject::~nsScrollBoxObject()
 /* void scrollTo (in long x, in long y); */
 NS_IMETHODIMP nsScrollBoxObject::ScrollTo(PRInt32 x, PRInt32 y)
 {
   nsIScrollableView* scrollableView = GetScrollableView();
   if (!scrollableView)
     return NS_ERROR_FAILURE;
 
   return scrollableView->ScrollTo(nsPresContext::CSSPixelsToAppUnits(x),
-                                  nsPresContext::CSSPixelsToAppUnits(y),
-                                  NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+                                  nsPresContext::CSSPixelsToAppUnits(y), 0);
 }
 
 /* void scrollBy (in long dx, in long dy); */
 NS_IMETHODIMP nsScrollBoxObject::ScrollBy(PRInt32 dx, PRInt32 dy)
 {
   PRInt32 x, y;
   nsresult rv = GetPosition(&x, &y);
   if (NS_FAILED(rv))
@@ -223,32 +222,31 @@ NS_IMETHODIMP nsScrollBoxObject::ScrollB
    }
 
    if (horiz)
        // In the left-to-right case we scroll so that the left edge of the
        // selected child is scrolled to the left edge of the scrollbox.
        // In the right-to-left case we scroll so that the right edge of the
        // selected child is scrolled to the right edge of the scrollbox.
        return scrollableView->ScrollTo((isLTR) ? rect.x :
-                                       rect.x + rect.width - frameWidth, 
-                                       cp.y, NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+                                       rect.x + rect.width - frameWidth, cp.y, 0);
    else
-       return scrollableView->ScrollTo(cp.x, rect.y, NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+       return scrollableView->ScrollTo(cp.x, rect.y, 0);
 }
 
 /* void scrollToLine (in long line); */
 NS_IMETHODIMP nsScrollBoxObject::ScrollToLine(PRInt32 line)
 {
   nsIScrollableView* scrollableView = GetScrollableView();
   if (!scrollableView)
     return NS_ERROR_FAILURE;
   
   nscoord height = 0;
   scrollableView->GetLineHeight(&height);
-  scrollableView->ScrollTo(0,height*line, NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+  scrollableView->ScrollTo(0, height * line, 0);
 
   return NS_OK;
 }
 
 /* void scrollToElement (in nsIDOMElement child); */
 NS_IMETHODIMP nsScrollBoxObject::ScrollToElement(nsIDOMElement *child)
 {
     NS_ENSURE_ARG_POINTER(child);
@@ -298,17 +296,17 @@ NS_IMETHODIMP nsScrollBoxObject::ScrollT
     // we only scroll in the direction of the scrollbox orientation
     // always scroll to left or top edge of child element
     if (scrolledBox->IsHorizontal()) {
         newx = rect.x - crect.x;
     } else {
         newy = rect.y - crect.y;
     }
     // scroll away
-    return scrollableView->ScrollTo(newx, newy, NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+    return scrollableView->ScrollTo(newx, newy, 0);
 }
 
 /* void scrollToIndex (in long index); */
 NS_IMETHODIMP nsScrollBoxObject::ScrollToIndex(PRInt32 index)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
@@ -409,17 +407,17 @@ NS_IMETHODIMP nsScrollBoxObject::EnsureE
         if ((rect.y - crect.y) + rect.height > cp.y + crect.height) {
             newy = cp.y + (((rect.y - crect.y) + rect.height)-(cp.y + crect.height));
         } else if (rect.y - crect.y < cp.y) {
             newy = rect.y - crect.y;
         }
     }
     
     // scroll away
-    return scrollableView->ScrollTo(newx, newy, NS_SCROLL_PROPERTY_ALWAYS_BLIT);
+    return scrollableView->ScrollTo(newx, newy, 0);
 }
 
 /* void ensureIndexIsVisible (in long index); */
 NS_IMETHODIMP nsScrollBoxObject::EnsureIndexIsVisible(PRInt32 index)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }