Bug 1622395 - Use AutoApplyAsyncTestAttributes instead of manually doing a half-job. r=botond

The code in GetVisibleRect() uses the test scroll offset, but not the test zoom.
Using AutoApplyAsyncTestAttributes automatically uses both.

Differential Revision: https://phabricator.services.mozilla.com/D66956

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2020-03-17 09:53:48 +00:00
Родитель dca484f1e2
Коммит 8e681739f9
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -4319,9 +4319,9 @@ Matrix4x4 AsyncPanZoomController::GetTransformToLastDispatchedPaint() const {
CSSRect AsyncPanZoomController::GetVisibleRect(
const RecursiveMutexAutoLock& aProofOfLock) const {
AutoApplyAsyncTestAttributes testAttributeApplier(this, aProofOfLock);
CSSPoint currentScrollOffset =
GetEffectiveScrollOffset(AsyncPanZoomController::eForCompositing) +
mTestAsyncScrollOffset;
GetEffectiveScrollOffset(AsyncPanZoomController::eForCompositing);
CSSRect visible = CSSRect(currentScrollOffset,
Metrics().CalculateCompositedSizeInCssPixels());
return visible;