зеркало из 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;
|
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();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче