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;
}
}
nsIntPoint physicalDevicePixels = physicalAdjustment.ToNearestPixels(
Frame()->PresContext()->AppUnitsPerDevPixel());
MOZ_ASSERT(!mApplyingAnchorAdjustment);
// We should use AutoRestore here, but that doesn't work with bitfields
mApplyingAnchorAdjustment = true;
mScrollFrame->ScrollBy(
physicalDevicePixels, nsIScrollableFrame::DEVICE_PIXELS,
nsIScrollableFrame::INSTANT, nullptr, nsGkAtoms::relative);
mScrollFrame->ScrollTo(
mScrollFrame->GetScrollPosition() + physicalAdjustment,
nsIScrollableFrame::INSTANT, nsGkAtoms::relative);
mApplyingAnchorAdjustment = false;
nsPresContext* pc = Frame()->PresContext();