Closed Bug 1669861 Opened 4 years ago Closed 4 years ago

Follow-up simplifications to DisplayPortMargins

Categories

(Core :: Panning and Zooming, task)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: botond, Assigned: botond)

References

Details

Attachments

(2 files, 1 obsolete file)

As a follow-up to bug 1664101, I'd like to make the follow-up changes laid out in the commit message of this patch:

  • Storing DisplayPortMargins::mLayoutOffset is probably unnecessary, we should be able to just query the scroll frame's layout offset when applying the margins.
  • Some callers of DisplayPortMargins::WithNoAdjustment() may be incorrect, in that they pass in margins that are relative to the visual viewport but do not make a corresponding adjustment. This is a pre-existing issue that this patch just makes clearer.

The two are sort of related in that if we don't address the second one, removing mLayoutOffset is difficult because WithNoAdjustment() doesn't have a value to provide for mVisualOffset that will have the intended effect of keeping the adjustment zero (unless we make it a Maybe or something).

(In reply to Botond Ballo [:botond] from comment #0)

The two are sort of related in that if we don't address the second one, removing mLayoutOffset is difficult because WithNoAdjustment() doesn't have a value to provide for mVisualOffset that will have the intended effect of keeping the adjustment zero (unless we make it a Maybe or something).

Actually, it's better to make these two changes independently, so that in case one of them causes a regression, we know which change to attribute it to. So I'll start with the first change, using a Maybe (which I'll end up keeping for the second change anyways).

Attachment #9180801 - Attachment is obsolete: true
Attachment #9181418 - Attachment description: [WIP] Bug 1669861 - Fall back to the main thread's visual offset → Bug 1669861 - Use the visual scroll offset consistently for DisplayPortMargins computations. r=kats

WithAdjustment() is now a misnomer now that the other methods can sometimes
apply an adjustment as well.

Depends on D93428

Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/93021c9bf18c
Use the visual scroll offset consistently for DisplayPortMargins computations. r=kats
https://hg.mozilla.org/integration/autoland/rev/f0a8a5a5f78b
Rename DisplayPortMargins::WithAdjustment() to FromAPZ(). r=kats
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Regressions: 1682910
Regressions: 1682919
Regressions: 1684776
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: