mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 11:37:43 -10:00
Bug 1164340. Fix up some scrollbar related comments in AsyncCompositionManager. r=botond
This commit is contained in:
1 parent
d6b8f8b755
commit
134362212a
1 file changed
+4
-3
@@ -730,9 +730,7 @@ ApplyAsyncTransformToScrollbarForContent(Layer* aScrollbar,
|
||||
// fraction of the whole srollable rect that is in view.
|
||||
const float yScale = 1.f / asyncZoomY;
|
||||
|
||||
// Note: |metrics.GetZoom()| doesn't yet include the async zoom, so
|
||||
// |metrics.CalculateCompositedSizeInCssPixels()| would not give a correct
|
||||
// result.
|
||||
// Note: |metrics.GetZoom()| doesn't yet include the async zoom.
|
||||
const CSSToParentLayerScale effectiveZoom(metrics.GetZoom().yScale * asyncZoomY);
|
||||
|
||||
// Here we convert the scrollbar thumb ratio into a true unitless ratio by
|
||||
@@ -740,6 +738,9 @@ ApplyAsyncTransformToScrollbarForContent(Layer* aScrollbar,
|
||||
// to the scrollframe's space.
|
||||
const float ratio = aScrollbar->GetScrollbarThumbRatio() /
|
||||
(metrics.GetPresShellResolution() * asyncZoomY);
|
||||
// The scroll thumb needs to be translated in opposite direction of the
|
||||
// async scroll. This is because scrolling down, which translates the layer
|
||||
// content up, should result in moving the scroll thumb down.
|
||||
ParentLayerCoord yTranslation = -asyncScrollY * ratio;
|
||||
|
||||
// The scroll thumb additionally needs to be translated to compensate for
|
||||
|
||||
Reference in new issue
Block a user