mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1164340. Fix up some scrollbar related comments in AsyncCompositionManager. r=botond
This commit is contained in:
parent
6118e68d2c
commit
c7fe5b456b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user