Changeset 38312 in webkit
- Timestamp:
- Nov 11, 2008 12:43:57 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r38310 r38312 1 2008-11-11 David Hyatt <hyatt@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=22182 4 5 Fix problems with scrollbars when the OS setting for clicks in the track jumping the thumb to that location 6 is turned on. Make sure to only jump the thumb if the click happens in the track. Also fix some math 7 errors when jumping the thumb that cause dragging after the jump to incorrectly jump the thumb again. 8 9 Reviewed by Adele 10 11 * platform/Scrollbar.cpp: 12 (WebCore::Scrollbar::mouseDown): 13 1 14 2008-11-11 Beth Dakin <bdakin@apple.com> 2 15 -
trunk/WebCore/platform/Scrollbar.cpp
r38130 r38312 365 365 int pressedPos = (orientation() == HorizontalScrollbar ? convertFromContainingWindow(evt.pos()).x() : convertFromContainingWindow(evt.pos()).y()); 366 366 367 if ( theme()->shouldCenterOnThumb(this, evt)) {367 if ((pressedPart() == BackTrackPart || pressedPart() == ForwardTrackPart) && theme()->shouldCenterOnThumb(this, evt)) { 368 368 setHoveredPart(ThumbPart); 369 369 setPressedPart(ThumbPart); 370 370 int thumbLen = theme()->thumbLength(this); 371 int desiredPos = pressedPos - thumbLen / 2;372 // Set the pressed position to the topof the thumb so that when we do the move, the delta371 int desiredPos = pressedPos; 372 // Set the pressed position to the middle of the thumb so that when we do the move, the delta 373 373 // will be from the current pixel position of the thumb to the new desired position for the thumb. 374 m_pressedPos = theme()->trackPosition(this) + theme()->thumbPosition(this) ;374 m_pressedPos = theme()->trackPosition(this) + theme()->thumbPosition(this) + thumbLen / 2; 375 375 moveThumb(desiredPos); 376 376 return true;
Note: See TracChangeset
for help on using the changeset viewer.