Bug 1691355. Check in a few places for a zero margin display port and set a full one. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D104361
This commit is contained in:
Timothy Nikkel 2021-02-10 06:33:05 +00:00
Родитель f4823368cb
Коммит de41983d0d
2 изменённых файлов: 3 добавлений и 3 удалений

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

@ -619,7 +619,7 @@ static bool PrepareForSetTargetAPZCNotification(
if (!guidIsValid) {
return false;
}
if (DisplayPortUtils::HasNonMinimalDisplayPort(dpElement)) {
if (DisplayPortUtils::HasNonMinimalNonZeroDisplayPort(dpElement)) {
// If the element has a displayport but it hasn't been painted yet,
// we want the caller to wait for the paint to happen, but we don't
// need to set the displayport here since it's already been set.

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

@ -4720,7 +4720,7 @@ void ScrollFrameHelper::ScrollBy(nsIntPoint aDelta, ScrollUnit aUnit,
ScrollPositionUpdate::NewPureRelativeScroll(aOrigin, aMode, delta));
nsIContent* content = mOuter->GetContent();
if (!DisplayPortUtils::HasNonMinimalDisplayPort(content)) {
if (!DisplayPortUtils::HasNonMinimalNonZeroDisplayPort(content)) {
if (MOZ_LOG_TEST(sDisplayportLog, LogLevel::Debug)) {
mozilla::layers::ScrollableLayerGuid::ViewID viewID =
mozilla::layers::ScrollableLayerGuid::NULL_SCROLL_ID;
@ -7829,7 +7829,7 @@ void ScrollFrameHelper::ApzSmoothScrollTo(const nsPoint& aDestination,
ScrollPositionUpdate::NewSmoothScroll(aOrigin, aDestination));
nsIContent* content = mOuter->GetContent();
if (!DisplayPortUtils::HasNonMinimalDisplayPort(content)) {
if (!DisplayPortUtils::HasNonMinimalNonZeroDisplayPort(content)) {
// If this frame doesn't have a displayport then there won't be an
// APZC instance for it and so there won't be anything to process
// this smooth scroll request. We should set a displayport on this