mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1171696 - Don't resize scrollbar thumb when updating its position. r=mstange
This commit is contained in:
parent
7f080470bd
commit
05f310f6f6
@ -727,15 +727,14 @@ nsSliderFrame::CurrentPositionChanged()
|
||||
|
||||
// avoid putting the scroll thumb at subpixel positions which cause needless invalidations
|
||||
nscoord appUnitsPerPixel = PresContext()->AppUnitsPerDevPixel();
|
||||
nsRect snappedThumbRect = ToAppUnits(newThumbRect.ToNearestPixels(appUnitsPerPixel), appUnitsPerPixel);
|
||||
nsPoint snappedThumbLocation = ToAppUnits(
|
||||
newThumbRect.TopLeft().ToNearestPixels(appUnitsPerPixel),
|
||||
appUnitsPerPixel);
|
||||
if (IsHorizontal()) {
|
||||
newThumbRect.x = snappedThumbRect.x;
|
||||
newThumbRect.width = snappedThumbRect.width;
|
||||
newThumbRect.x = snappedThumbLocation.x;
|
||||
} else {
|
||||
newThumbRect.y = snappedThumbRect.y;
|
||||
newThumbRect.height = snappedThumbRect.height;
|
||||
newThumbRect.y = snappedThumbLocation.y;
|
||||
}
|
||||
newThumbRect = newThumbRect.Intersect(clientRect);
|
||||
|
||||
// set the rect
|
||||
thumbFrame->SetRect(newThumbRect);
|
||||
|
Loading…
Reference in New Issue
Block a user