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::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).
Assignee | ||
Comment 1•4 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
mLayoutOffset
is difficult becauseWithNoAdjustment()
doesn't have a value to provide formVisualOffset
that will have the intended effect of keeping the adjustment zero (unless we make it aMaybe
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).
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
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
Comment 6•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/93021c9bf18c
https://hg.mozilla.org/mozilla-central/rev/f0a8a5a5f78b
Description
•