Closed Bug 1473816 Opened 6 years ago Closed 5 years ago

Switch between landscape and portrait mode not working properly when video in full screen in Windows 10

Categories

(Core :: Widget: Win32, defect)

Unspecified
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1502062
mozilla64
Tracking Status
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- wontfix

People

(Reporter: xracoonx, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 obsolete file)

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?
Status: UNCONFIRMED → NEW
Component: Untriaged → Panning and Zooming
Ever confirmed: true
Flags: needinfo?(xracoonx)
Product: Firefox → Core
Version: 61 Branch → Trunk
(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.
Flags: needinfo?(xracoonx)
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.
Flags: needinfo?(xidorn+moz)
This symptom makes me suspect the reason is probably the OldWindowSize mechanism[1] 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.


[1] 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.
Blocks: 1480928
Flags: needinfo?(xidorn+moz)
Assignee: nobody → xidorn+moz
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 xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/64fa36b13e1a
When exiting fullscreen, move window inside and clamp it with screen bounds. r=mstange
https://hg.mozilla.org/mozilla-central/rev/64fa36b13e1a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Xidorn, do you think this patch should be backported to 63 beta? Thanks
Flags: needinfo?(xidorn+moz)
I don't think so.
Flags: needinfo?(xidorn+moz)
Depends on: 1502062
This is backed out in inbound and beta in favor of fixing bug 1502062.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: xidorn+moz → nobody
It seems the bot doesn't post the link of push to beta:
https://hg.mozilla.org/releases/mozilla-beta/rev/e406bf1c8cd4
No longer blocks: 1480928
Status: REOPENED → RESOLVED
Closed: 6 years ago5 years ago
Resolution: --- → DUPLICATE
Attachment #9012786 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: