Bug 1328053 - Correct thumb position when shift-click scrolling draft
authorKearwood Gilbert <kgilbert@mozilla.com>
Wed, 25 Jan 2017 14:45:23 -0800
changeset 466382 2b362db3d3b4db561c7e4f4a0889f1eb976c9e05
parent 457090 0d823cf54df53e0cea75a74adebace956bd333d8
child 543421 a80c8f2ad0ec919f27e0bff7ba34d22a64f776b8
push id42895
push userbmo:kgilbert@mozilla.com
push dateWed, 25 Jan 2017 22:53:01 +0000
bugs1328053, 957445
milestone53.0a1
Bug 1328053 - Correct thumb position when shift-click scrolling During the refactoring of nsSliderFrame::SetCurrentPositionInternal in Bug 957445, one of the two calls to nsSliderFrame::UpdateAttribute was missed. This resulted in the position, identified with nsGkAtoms::curpos, not being updated immediately after the call to nsSliderFrame::SetCurrentThumbPosition MozReview-Commit-ID: 6gedouG4OFX
layout/xul/nsSliderFrame.cpp
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -881,16 +881,17 @@ nsSliderFrame::SetCurrentPositionInterna
     nsIScrollbarMediator* mediator = scrollbarFrame->GetScrollbarMediator();
     if (mediator) {
       nscoord oldPos = nsPresContext::CSSPixelsToAppUnits(GetCurrentPosition(scrollbar));
       nscoord newPos = nsPresContext::CSSPixelsToAppUnits(aNewPos);
       mediator->ThumbMoved(scrollbarFrame, oldPos, newPos);
       if (!weakFrame.IsAlive()) {
         return;
       }
+      UpdateAttribute(scrollbar, aNewPos, /* aNotify */false, aIsSmooth);
       CurrentPositionChanged();
       mUserChanged = false;
       return;
     }
   }
 
   UpdateAttribute(scrollbar, aNewPos, true, aIsSmooth);
   if (!weakFrame.IsAlive()) {