Open Bug 1513703 Opened 6 years ago Updated 2 years ago

Audit DOM APIs that return the size of the layout or visual viewport, or coordinates relative to the origin of either

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox66 --- affected

People

(Reporter: botond, Unassigned)

References

(Blocks 1 open bug)

Details

Bug 656036 made important progress towards distinguishing the concepts of "visual viewport" and "layout viewport" (background: [1]) in the codebase, by attaching position:fixed elements to the latter. However, there is more work to be done on this front. Notably, any DOM API which returns the dimension of one of these viewports, or a coordinate relative to the origin of one of these viewports, needs to be audited regarding which viewport it uses for the computation. The Blink folks are maintaining a spreadsheet documenting their choices [1]. For each API, we should either adopt their choice, or articulate a reason why the other choice is preferable (and then bring it up with them in discussion). As a notable example, window.inner{Width,Height} currently reports the visual viewport dimensions in our implementation, though we've flip-flopped on that choice a couple of times already (bug 602580, bug 919437). Blink's choice is to have it report layout viewport dimensions. [1] https://github.com/bokand/bokand.github.io/blob/master/web_viewports_explainer.md [2] https://docs.google.com/spreadsheets/d/11DfDDa-s1hePVwBn3PZidlPJZ9ahhkJ44dyuMiOQtrc/edit#gid=0
Depends on: 1514429
(In reply to Botond Ballo [:botond] from comment #0) > As a notable example, window.inner{Width,Height} currently reports the > visual viewport dimensions in our implementation, though we've flip-flopped > on that choice a couple of times already (bug 602580, bug 919437). Blink's > choice is to have it report layout viewport dimensions. Filed bug 1514429 for this specific API.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.