зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1871751. Avoid AsyncPanZoomEnabled call in MaybeCreateDisplayPortInFirstScrollFrameEncountered. r=layout-reviewers,emilio
The return value of nsLayoutUtils::AsyncPanZoomEnabled only changes if we descend into a frame whose display root widget is different. But that is not possible, we do not descend into any frames that are in different widgets. Differential Revision: https://phabricator.services.mozilla.com/D197237
This commit is contained in:
Родитель
6856d0cab9
Коммит
3c39e0db98
|
@ -790,8 +790,8 @@ bool DisplayPortUtils::MaybeCreateDisplayPort(
|
||||||
// async-scrollable frame (i.e. one that WantsAsyncScroll()) has a
|
// async-scrollable frame (i.e. one that WantsAsyncScroll()) has a
|
||||||
// displayport. If that's not the case yet, and we are async-scrollable, we
|
// displayport. If that's not the case yet, and we are async-scrollable, we
|
||||||
// will get a displayport.
|
// will get a displayport.
|
||||||
|
MOZ_ASSERT(nsLayoutUtils::AsyncPanZoomEnabled(aScrollFrame));
|
||||||
if (!aBuilder->HaveScrollableDisplayPort() &&
|
if (!aBuilder->HaveScrollableDisplayPort() &&
|
||||||
nsLayoutUtils::AsyncPanZoomEnabled(aScrollFrame) &&
|
|
||||||
aScrollFrameAsScrollable->WantAsyncScroll()) {
|
aScrollFrameAsScrollable->WantAsyncScroll()) {
|
||||||
bool haveDisplayPort = HasNonMinimalNonZeroDisplayPort(content);
|
bool haveDisplayPort = HasNonMinimalNonZeroDisplayPort(content);
|
||||||
// If we don't already have a displayport, calculate and set one.
|
// If we don't already have a displayport, calculate and set one.
|
||||||
|
|
|
@ -3168,7 +3168,8 @@ void nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||||
}
|
}
|
||||||
|
|
||||||
builder->ClearHaveScrollableDisplayPort();
|
builder->ClearHaveScrollableDisplayPort();
|
||||||
if (builder->IsPaintingToWindow()) {
|
if (builder->IsPaintingToWindow() &&
|
||||||
|
nsLayoutUtils::AsyncPanZoomEnabled(aFrame)) {
|
||||||
DisplayPortUtils::MaybeCreateDisplayPortInFirstScrollFrameEncountered(
|
DisplayPortUtils::MaybeCreateDisplayPortInFirstScrollFrameEncountered(
|
||||||
aFrame, builder);
|
aFrame, builder);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче