Closed Bug 1478690 Opened 6 years ago Closed 4 years ago

Displayport should be positioned relative to the visual viewport offset

Categories

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

62 Branch
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1664101

People

(Reporter: tanushree, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

Following the changes in bug 1423011 (Allow APZ to aync-scroll the layout viewport), the displayport is positioned relative to the layout viewport offset for the root content document's root scroll frame (RCD-RSF). However, the displayport should be positioned relative to the visual viewport offset. The changes in bug 1423011 apply an adjustment to the displayport margins in APZ to temporarily fix this. Using the visual viewport offset stored in the presshell, the displayport can be positioned relative to the visual viewport for the RCD-RSF by the main thread. Therefore, the adjustment to the displayport margins in APZ will not be required for the RCD-RSF.
Assignee: nobody → tpodder
Mentor: botond
Priority: -- → P3
Whiteboard: [gfx-noted]
The attached patch has the changes to layout and APZ which are required to position the displayport according to the visual viewport offset for the RCD-RSF. The patch also contains commented logging statements used to debug the problem. After applying the changes in the patch, the displayport is still getting positioned according to the layout viewport offset. In particular, it was observed that whenever the offset for the |expandedScrollableRect| is less than 0 in https://searchfox.org/mozilla-central/source/layout/base/nsLayoutUtils.cpp#962, the displayport offset is computed correctly in layout but the final displayport offset observed in the minimap is (0,0). To resolve this issue, we will have to investigate further into what causes the displayport to get positioned incorrectly after GetDisplayPortFromMarginsData is called in layout.
Assignee: tanushree.podder.103 → nobody
I was "mentoring" this while Tanushree was working on it, but I don't think it's a good mentored bug for a casual contributor.
Mentor: botond

Based on my investigation in bug 1664101, I suspect that at least one of the reasons why the patch in this bug caused regressions, is that it did not update all codepaths where we performed the "adjustment" described in comment 0. (Though it's hard to be sure without having a search-indexed version of the code as it stood in 2018.)

In any case, bug 1664101 will effectively accomplish the original goal of this bug, so I'm going to close this as a dupe.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: