Closed Bug 1518640 Opened 5 years ago Closed 5 years ago

Perform anchor selection using the visual viewport

Categories

(Core :: Layout: Scrolling and Overflow, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

The current scroll anchoring implementation will use the layout viewport for anchor selection.

This means that:

  1. An anchor node could be selected some ways above the visual viewport
  2. Content after the anchor node could change size
  3. This will cause a shift in the content viewed in the visual viewport

We should select an anchor node using the visual viewport.

Priority: -- → P3

I'm going to unblock the initial release of scroll anchoring, as I think the experience is no worse than without scroll anchoring.

It may still make it into the initial release, it just shouldn't block.

No longer blocks: scroll-anchoring-release
Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b192e4631cc
Check that a PresShell has a visual viewport offset before returning it. r=botond
https://hg.mozilla.org/integration/mozilla-inbound/rev/27bbb318ecb4
Use the visual viewport for anchor node selection. r=botond

The problem is in the 'Check that a PresShell has a visual viewport offset before returning it' patch.

From a conversation with Botond on irc, it sounds like the visual viewport size is never set on Desktop, but the visual viewport offset can be. So we're probably running into some untested code. That patch isn't necessary, so I'll just drop it for now.

Flags: needinfo?(rhunt)
Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/38398e4011d7
Use the visual viewport for anchor node selection. r=botond
Attachment #9037735 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: