Bug 1157936 - Put the correct ratio on the scrollbar layer. r=tn
authorMarkus Stange <mstange@themasta.com>
Mon, 27 Apr 2015 14:59:17 -0400
changeset 241242 762d5d1fcc072aa3e6e40be277cce04f30feefff
parent 241241 e44777d69e7a949a3fbaaae37e3c7986c9847e49
child 241270 92cfbfb1a4648e5decf3b8cb9429e9e2f66bb149
push id59065
push usermstange@themasta.com
push dateMon, 27 Apr 2015 19:12:34 +0000
treeherdermozilla-inbound@762d5d1fcc07 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1157936
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1157936 - Put the correct ratio on the scrollbar layer. r=tn
layout/xul/nsSliderFrame.cpp
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -328,17 +328,16 @@ nsSliderFrame::BuildDisplayListForChildr
     // attach scrolling information to it.
     // We do this here and not in the thumb's nsBoxFrame::BuildDisplayList so
     // that the event region that gets created for the thumb is included in
     // the nsDisplayOwnLayer contents.
 
     uint32_t flags = 0;
     mozilla::layers::FrameMetrics::ViewID scrollTargetId =
       mozilla::layers::FrameMetrics::NULL_SCROLL_ID;
-    float scrollbarThumbRatio = 0.0f;
     aBuilder->GetScrollbarInfo(&scrollTargetId, &flags);
     bool thumbGetsLayer = (scrollTargetId != layers::FrameMetrics::NULL_SCROLL_ID);
     nsLayoutUtils::SetScrollbarThumbLayerization(thumb, thumbGetsLayer);
 
     if (thumbGetsLayer) {
       nsDisplayListCollection tempLists;
       nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, tempLists);
 
@@ -350,17 +349,17 @@ nsSliderFrame::BuildDisplayListForChildr
       masterList.AppendToTop(tempLists.Floats());
       masterList.AppendToTop(tempLists.Content());
       masterList.AppendToTop(tempLists.PositionedDescendants());
       masterList.AppendToTop(tempLists.Outlines());
 
       // Wrap the list to make it its own layer.
       aLists.Content()->AppendNewToTop(new (aBuilder)
         nsDisplayOwnLayer(aBuilder, this, &masterList, flags, scrollTargetId,
-                          scrollbarThumbRatio));
+                          GetThumbRatio()));
 
       return;
     }
   }
   
   nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
 }