mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1066934 - Don't allow the snapped scrollbar thumb to extend past the scrollbar bounds. r=roc
This commit is contained in:
parent
27c0bd9537
commit
d0db5839ff
@ -690,7 +690,15 @@ nsSliderFrame::CurrentPositionChanged()
|
|||||||
|
|
||||||
// avoid putting the scroll thumb at subpixel positions which cause needless invalidations
|
// avoid putting the scroll thumb at subpixel positions which cause needless invalidations
|
||||||
nscoord appUnitsPerPixel = PresContext()->AppUnitsPerDevPixel();
|
nscoord appUnitsPerPixel = PresContext()->AppUnitsPerDevPixel();
|
||||||
newThumbRect = newThumbRect.ToNearestPixels(appUnitsPerPixel).ToAppUnits(appUnitsPerPixel);
|
nsRect snappedThumbRect = newThumbRect.ToNearestPixels(appUnitsPerPixel).ToAppUnits(appUnitsPerPixel);
|
||||||
|
if (IsHorizontal()) {
|
||||||
|
newThumbRect.x = snappedThumbRect.x;
|
||||||
|
newThumbRect.width = snappedThumbRect.width;
|
||||||
|
} else {
|
||||||
|
newThumbRect.y = snappedThumbRect.y;
|
||||||
|
newThumbRect.height = snappedThumbRect.height;
|
||||||
|
}
|
||||||
|
newThumbRect = newThumbRect.Intersect(clientRect);
|
||||||
|
|
||||||
// set the rect
|
// set the rect
|
||||||
thumbFrame->SetRect(newThumbRect);
|
thumbFrame->SetRect(newThumbRect);
|
||||||
|
Loading…
Reference in New Issue
Block a user