Bug 1519553 - Don't round scroll anchor adjustments to device pixels. r=dholbert

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

--HG--
extra : source : 7f29bb7519563e3aaafa2e484a356409ce05aab7
extra : histedit_source : 3f1c287cc5984bf896ed43cccd7533d39cda40c9
This commit is contained in:
Ryan Hunt 2019-02-07 20:39:49 -06:00
Родитель 123c21759e
Коммит 6bdc12be01
1 изменённых файлов: 3 добавлений и 5 удалений

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

@ -345,15 +345,13 @@ void ScrollAnchorContainer::ApplyAdjustments() {
break; break;
} }
} }
nsIntPoint physicalDevicePixels = physicalAdjustment.ToNearestPixels(
Frame()->PresContext()->AppUnitsPerDevPixel());
MOZ_ASSERT(!mApplyingAnchorAdjustment); MOZ_ASSERT(!mApplyingAnchorAdjustment);
// We should use AutoRestore here, but that doesn't work with bitfields // We should use AutoRestore here, but that doesn't work with bitfields
mApplyingAnchorAdjustment = true; mApplyingAnchorAdjustment = true;
mScrollFrame->ScrollBy( mScrollFrame->ScrollTo(
physicalDevicePixels, nsIScrollableFrame::DEVICE_PIXELS, mScrollFrame->GetScrollPosition() + physicalAdjustment,
nsIScrollableFrame::INSTANT, nullptr, nsGkAtoms::relative); nsIScrollableFrame::INSTANT, nsGkAtoms::relative);
mApplyingAnchorAdjustment = false; mApplyingAnchorAdjustment = false;
nsPresContext* pc = Frame()->PresContext(); nsPresContext* pc = Frame()->PresContext();