Bug 1868868 - The value of thumb position changed by reflow should be consistent to nsSliderFrame::CurrentPositionChanged, r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D195815
This commit is contained in:
Cathie Chen 2023-12-12 12:11:13 +00:00
Родитель 03bd9de29c
Коммит 1445599ff3
4 изменённых файлов: 8 добавлений и 9 удалений

Просмотреть файл

@ -29,7 +29,7 @@ fuzzy-if(Android,0-31,0-29) fuzzy-if(gtkWidget,0-18,0-49) fuzzy-if(cocoaWidget,0
# clipped away.
fuzzy-if(Android,0-54,0-22) fuzzy-if(!Android,0-128,0-137) pref(apz.allow_zooming,true) == root-scrollbar-zoomed-in.html root-scrollbar-zoomed-in-ref.html
fuzzy-if(Android,0-54,0-22) fuzzy-if(!Android,0-128,0-137) pref(apz.allow_zooming,true) pref(apz.allow_zooming_out,true) == root-scrollbar-zoomed-out.html root-scrollbar-zoomed-out-ref.html
fuzzy-if(Android,0-54,0-27) fuzzy-if(!Android,0-128,0-137) pref(apz.allow_zooming,true) == root-scrollbar-zoomed-in-async-scroll.html root-scrollbar-zoomed-in-ref.html
fuzzy-if(Android,0-54,0-31) fuzzy-if(!Android,0-128,0-137) pref(apz.allow_zooming,true) == root-scrollbar-zoomed-in-async-scroll.html root-scrollbar-zoomed-in-ref.html
fuzzy-if(Android,0-54,0-25) fuzzy-if(!Android,0-128,0-137) pref(apz.allow_zooming,true) pref(apz.allow_zooming_out,true) == root-scrollbar-zoomed-out-async-scroll.html root-scrollbar-zoomed-out-ref.html
fuzzy-if(Android,0-51,0-50) fuzzy-if(!Android,0-128,0-137) pref(apz.allow_zooming,true) == subframe-scrollbar-zoomed-in-async-scroll.html subframe-scrollbar-zoomed-in-async-scroll-ref.html
fuzzy-if(Android,0-28,0-23) fuzzy-if(!Android,0-107,0-34) pref(apz.allow_zooming,true) pref(apz.allow_zooming_out,true) == subframe-scrollbar-zoomed-out-async-scroll.html subframe-scrollbar-zoomed-out-async-scroll-ref.html

Просмотреть файл

@ -614,6 +614,13 @@ void nsSliderFrame::Reflow(nsPresContext* aPresContext,
thumbPos.y = NSToCoordRound(pos * mRatio);
}
// Same to `snappedThumbLocation` in `nsSliderFrame::CurrentPositionChanged`,
// to avoid putting the scroll thumb at subpixel positions which cause
// needless invalidations
nscoord appUnitsPerPixel = PresContext()->AppUnitsPerDevPixel();
thumbPos =
ToAppUnits(thumbPos.ToNearestPixels(appUnitsPerPixel), appUnitsPerPixel);
const LogicalPoint logicalPos(wm, thumbPos, availSize);
// TODO: It seems like a lot of this stuff should really belong in the thumb's
// reflow code rather than here, but since we rely on the frame tree structure

Просмотреть файл

@ -1,4 +0,0 @@
[content-visibility-075.html]
fuzzy:
# Tiny pixels differ around the scrollbar thumb.
if (os == "mac"): maxDifference=0-19;totalPixels=0-26

Просмотреть файл

@ -1,4 +0,0 @@
[content-visibility-076.html]
fuzzy:
# Tiny pixels differ around the scrollbar thumb.
if (os == "mac"): maxDifference=0-19;totalPixels=0-26