Closed Bug 1687926 Opened 3 years ago Closed 3 years ago

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

Categories

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

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox-esr78 --- wontfix
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#5034

That RequestContentRepaint call gets executed every time isDefault is true (and ignoreVisualUpdate is false), 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 1627012. Two other bugs also regressed this (bug 1662013 and bug 1667475), and we need to fix all of them to fix the problem. Bug 1687886 is filed for the regression from bug 1667475. Another bugs will be filed for the remaining one.

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

That RequestContentRepaint call gets executed every time isDefault is true (and ignoreVisualUpdate is false), 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 1627012. Two other bugs also regressed this (bug 1662013 and bug 1667475), and we need to fix all of them to fix the problem. Bug 1687886 is filed for the regression from bug 1667475. Another bugs will be filed for the remaining one.

https://hg.mozilla.org/integration/autoland/rev/47328d6c1b40 made us request a repaint any time we have default metrics because we might get a new visual scroll offset, but if our visual scroll offset doesn't change we shouldn't need to do anything.

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 D102529

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

Attachment

General

Created:
Updated:
Size: