Closed Bug 1473816 Opened 3 years ago Closed 2 years ago
Switch between landscape and portrait mode not working properly when video in full screen in Windows 10
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Build ID: 20180621125625 Firefox for Android Steps to reproduce: On a Windows 10 tablet: 1. Enter landscape mode 2. Open a video (only tried YouTube) in full screen 3. Switch to landscape mode without exciting full screen, e.g. by rotating 4. Exit full screen mode Actual results: Firefox keeps dimensions of landscape mode Expected results: Firefox changes dimensions according to landscape mode
Seems not to be a basic problem with Windows 10 since it works in Edge.
Same problem when switching the other way around, i.e. portrait to landscape.
Hi, i managed to reproduce this issue using the Firefox 61.0.1 as well as with the latest version of Nightly 63.0a1 (2018-07-10) on a Surface Touch pad Pro windows 10. Can you also clarify why is Firefox for Android mentioned?
(In reply to Rares Doghi from comment #3) > Hi, i managed to reproduce this issue using the Firefox 61.0.1 as well as > with the latest version of Nightly 63.0a1 (2018-07-10) on a Surface Touch > pad Pro windows 10. Can you also clarify why is Firefox for Android > mentioned? Thanks for checking. Android is only mentioned because I send the report from an Android device. I guess I missed to change it if it was set by default. I am not sure why "also". Is there something else I should clarify.
I'm not able to reproduce this. On my Windows Surface device, running Windows 10 and the latest Firefox Nightly. Device is in tablet mode (keyboard unplugged). I went to youtube, played a video in fullscreen and rotated the tablet back and forth between landscape and portrait, and the rotation produced the expected results, with the content resizing as needed to fit the new screen dimensions. Am I missing something? Can you provide a screenshot or video of the problematic behaviour?
Oh, never mind, I see what you mean. The problem manifests after you exit full screen mode in an orientation different than when you entered full screen mode.
xidorn, you're familiar with fullscreen behaviour - do you know how gecko handles the WM_DISPLAYCHANGE message while we're in fullscreen? I wonder if it's not getting handled properly.
This symptom makes me suspect the reason is probably the OldWindowSize mechanism which was introduced to let the content process resize the viewport eagerly before the parent finishes resizing. It memorize the window size pre-fullscreen, and use that to resize, so it may be related. But this should only affect content, not the window, unless something feed this size back to the parent... It's not clear whether that's the case... I can probably try to investigate later tomorrow. Regarding WM_DISPLAYCHANGE, I'm not sure. I would suspect that windows just issue a resize to us and we change the size in response to it. Keep ni? for further investigation.  https://searchfox.org/mozilla-central/rev/a80651653faa78fa4dfbd238d099c2aad1cec304/dom/base/nsDOMWindowUtils.cpp#3328-3349
Moving to DOM for now. It might be related to Widget code, but if it's OldWindowSize mechanism, it's probably common among all platforms.
Component: Panning and Zooming → DOM
I can reproduce this issue with changing the screen orientation manually in system settings with a desktop monitor on Windows. And this doesn't seem to be related to the OldWindowSize mechanism, because even if I disable that, it still shows the same problem. And when I'm testing this in a Linux VM and resize the VM window, this doesn't happen. So moving this to Windows widget.
Component: DOM → Widget: Win32
And this isn't even a Fullscreen API issue, actually. It affects fullscreen mode as well.
Attachment #9012786 - Attachment description: Bug 1473816 - Clamp the original bounds with screen bounds when exiting fullscreen. r=mstange → Bug 1473816 - When exiting fullscreen, move window inside and clamp it with screen bounds. r=mstange
Comment on attachment 9012786 [details] Bug 1473816 - When exiting fullscreen, move window inside and clamp it with screen bounds. r=mstange Markus Stange [:mstange] has approved the revision.
Attachment #9012786 - Flags: review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/64fa36b13e1a When exiting fullscreen, move window inside and clamp it with screen bounds. r=mstange
Xidorn, do you think this patch should be backported to 63 beta? Thanks
I don't think so.
Backout by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/97db91af91fd Backed out changeset 64fa36b13e1a
This is backed out in inbound and beta in favor of fixing bug 1502062.
It seems the bot doesn't post the link of push to beta: https://hg.mozilla.org/releases/mozilla-beta/rev/e406bf1c8cd4
Status: REOPENED → RESOLVED
Closed: 3 years ago → 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1502062
You need to log in before you can comment on or make changes to this bug.