зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
123c21759e
Коммит
6bdc12be01
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче