Bad interaction between fullscreen and viewport scaling (viewport initial scale or desktop viewport).
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(4 files, 1 obsolete file)
On Firefox for android, going fullscreen on a page that has a desktop viewport can cause issues with percentages etc if the desktop page has overflow. See the attached test-case, which doesn't show the bottom green stripe because the page is sized incorrectly.
Assignee | ||
Comment 1•4 years ago
|
||
This is the cause for at least some of the issues in https://github.com/mozilla-mobile/fenix/issues/8252
Hiro, are you familiar with how we deal with fullscreen on android? And if not, do you know who would? I can probably take a look though I'm a bit swamped with other stuff atm so if we could prioritize this it'd be great.
Assignee | ||
Comment 2•4 years ago
|
||
Poking a bit, it seems we don't do anything particularly special other than AdjustViewportSizeForFixedPosition
. That expands to the layout viewport if needed. Except that is too big in this case... ni?ing to not lose track of this.
Assignee | ||
Comment 3•4 years ago
|
||
So chrome seems to ignore the meta viewport stuff and resolution in fullscreen, if I'm testing this right... This might allow us to undo bug 1659761, I believe...
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
This is just drive-by and shouldn't change behavior but I wrote it while
I was looking at the code so if you think it's fine I think we could
just land it.
Depends on D107362
Assignee | ||
Comment 7•4 years ago
|
||
Again, just drive-by cleanup.
Depends on D107363
Assignee | ||
Comment 8•4 years ago
|
||
This seems to match Chrome, and makes our fullscreen implementation more
consistent between desktop and mobile.
Do you know how to best test this? This repros in RDM, but all
fullscreen tests seem disabled on Android...
Depends on D107364
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)
This is the cause for at least some of the issues in https://github.com/mozilla-mobile/fenix/issues/8252
Hiro, are you familiar with how we deal with fullscreen on android? And if not, do you know who would? I can probably take a look though I'm a bit swamped with other stuff atm so if we could prioritize this it'd be great.
I am not familiar with the stuff, but I could recall. GeckoView has onFullScreen function which is a notification when entering fullscreen and leaving from fullscreen. And each browser reacts to the notification, for example Fenix hides/shows their toolbars.
Anyways, if chrome ignores meta viewport, doing the same thing sounds quite reasonable to me.
Comment 13•4 years ago
|
||
bugherder |
Comment 14•4 years ago
|
||
For references, note that I've also confirmed that Chrome doesn't applying viewport size changes by meta viewport. What I checked is the returns value of document.documentElement.getBoundingClientRect(), the width is 980px on non fullscreen state, 393px on fullscreen state on my pixel 3.
Also note that the explainer about viewport by David Bokan mentions;
The fixed viewport is sized to the minimum scale size. This means that a position: fixed element that has width: 100%; height: 100% will exactly fill the viewport when the page is fully zoomed out.
So if Chrome didn't ignore the viewport stuff on fullscreen state (I'd expect Chrome implements fullscreen stuff by applying position:fixed), the fullscreen-ed element width should be 980px. So I am mostly sure Chrome ignores viewport stuff on fullscreen stuff.
Comment 15•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 16•4 years ago
|
||
bugherder |
Comment 17•4 years ago
|
||
I think this change deserves being added in the release note.
Release Note Request (optional, but appreciated)
[Why is this notable]: This fixed the issue where video playing in fullscreen and picture-in-picture would not display correctly. Espeically in the picture-in-picture mode, the video would be cropped seriously that is almost not able to be watched.
[Affects Firefox for Android]: Yes, this only affects Firefox Android.
[Suggested wording]:
[Links (documentation, blog post, etc)]:
Comment 18•4 years ago
|
||
Added to the Fx88 beta relnotes.
Updated•4 years ago
|
Description
•