Closed Bug 1687886 Opened 2 years ago Closed 2 years ago

don't request a repaint if it's the first time for an apzc getting metrics (regression from bug 1667475)

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox84 --- wontfix
firefox85 --- wontfix
firefox86 --- wontfix
firefox87 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/2c06b16a0c15ae340a0532e319cbf89ef9d21b68/gfx/layers/apz/src/AsyncPanZoomController.cpp#4741

That RequestContentRepaint call gets executed every time isDefault is true, ie whenever the azpc gets metrics for the first time. RequestContentRepaint causes a full display port to be set on the content. That is undesirable in a few cases:
-we set zero margin display ports (via SetZeroMarginDisplayPortOnAsyncScrollableAncestors) and we don't want to expand them to full display ports
-we use nsLayoutUtils::GetRootMetadata to set metrics (which creates an azpc) but not set a display port sometimes (ie if the root scroll frame is not scrollable but there is fixed content)

This bug is to fix the regression caused by bug 1667475. Two other bugs also regressed this (bug 1662013 and bug 1627012), and we need to fix all of them to fix the problem. Other bugs will be filed to fix those.

https://searchfox.org/mozilla-central/rev/2c06b16a0c15ae340a0532e319cbf89ef9d21b68/gfx/layers/apz/src/AsyncPanZoomController.cpp#4741

That RequestContentRepaint call gets executed every time isDefault is true, ie whenever the azpc gets metrics for the first time. RequestContentRepaint causes a full display port to be set on the content. That is undesirable in a few cases:
-we set zero margin display ports (via SetZeroMarginDisplayPortOnAsyncScrollableAncestors) and we don't want to expand them to full display ports
-we use nsLayoutUtils::GetRootMetadata to set metrics (which creates an azpc) but not set a display port sometimes (ie if the root scroll frame is not scrollable but there is fixed content)

This bug is to fix the regression caused by bug 1667475. Two other bugs also regressed this (bug 1662013 and bug 1627012), and we need to fix all of them to fix the problem. Other bugs will be filed to fix those.

See https://phabricator.services.mozilla.com/D91479#inline-517695 for the rationale for the original change.

The reason that this came up is in bug 1675547 we want to set a zero margin display port on any scroll frame that could async scroll to fix a fission hit testing problem. The current proposed solution for that bug sets a content side property so that we get the additional benefit of not aligning the displayport which expands it. That allows us to avoid this problem for this specific scroll frames. But fixing the regression is a good idea, there are other scroll frames affected as outlined above.

Depends on D102528

Regressed by: 1667475
Has Regression Range: --- → yes
Severity: -- → S3
Priority: -- → P3
Depends on: 1689291
Blocks: 1689492
Attachment #9198331 - Attachment description: Bug 1687886. Don't request a repaint and set a display port if it's the first time for an azpc getting metrics always. r?botond → Bug 1687886. Don't request a repaint and set a display port if it's the first time for an azpc getting metrics always. r=botond
Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8385e034c93e
Don't request a repaint and set a display port if it's the first time for an azpc getting metrics always. r=botond
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.