Follow-up simplifications to DisplayPortMargins
Categories
(Core :: Panning and Zooming, task)
Tracking
()
| 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::mLayoutOffsetis 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).
| Assignee | ||
Comment 1•5 years ago
|
||
(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
mLayoutOffsetis difficult becauseWithNoAdjustment()doesn't have a value to provide formVisualOffsetthat will have the intended effect of keeping the adjustment zero (unless we make it aMaybeor 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).
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Comment 4•5 years ago
|
||
WithAdjustment() is now a misnomer now that the other methods can sometimes
apply an adjustment as well.
Depends on D93428
Comment 6•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/93021c9bf18c
https://hg.mozilla.org/mozilla-central/rev/f0a8a5a5f78b
Description
•