Closed
Bug 726943
Opened 13 years ago
Closed 12 years ago
Fullscreen button in HTML video makes the browser go fullscreen but not the video
Categories
(Core :: Audio/Video, defect)
Tracking
()
VERIFIED
FIXED
mozilla14
People
(Reporter: reuben, Assigned: asqueella)
References
Details
(Keywords: regression, testcase, Whiteboard: [qa!])
Attachments
(5 files)
108 bytes,
text/html
|
Details | |
302.23 KB,
video/webm
|
Details | |
1.91 KB,
text/plain
|
Details | |
4.05 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
3.37 KB,
patch
|
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
OS X 10.7.3. STR: 1. Open a video (https://www.youtube.com/watch?v=iRZ2Sh5-XuM) 2. Press fullscreen button Actual results: Browser goes fullscreen, video is still contained. If you press the fullscreen button again after that it works. Expected results: Video goes fullscreen, browser doesn't.
Reporter | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•13 years ago
|
||
Actually, this still happens here.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment 3•13 years ago
|
||
The issue is reproducible on: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120311 Firefox/13.0a1
Comment 4•13 years ago
|
||
WFM on Win7x64 and OSX10.7 20120312...
Comment 5•13 years ago
|
||
Paul, do you have hardware acceleration enabled on your 10.6 machine? I don't on my 10.7 machine...
Comment 6•13 years ago
|
||
I can reproduce this both with hardware acceleration ON/OFF also on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120312 Firefox/13.0a1. Chris, be sure not to forget to enable html5 before.
Reporter | ||
Comment 7•13 years ago
|
||
Reduced testcase.
Reporter | ||
Updated•13 years ago
|
Summary: YouTube HTML5 player fullscreen button makes the browser go fullscreen but not the video → Fullscreen button in HTML video makes the browser go fullscreen but not the video
Comment 8•13 years ago
|
||
(In reply to Reuben Morais [:reuben] from comment #7) > Created attachment 605333 [details] > Reduced testcase. > > Reduced testcase. Can you upload a screen shot showing this testcase failing please, it works fine for me.
Reporter | ||
Comment 9•13 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #8) > Can you upload a screen shot showing this testcase failing please, it works > fine for me. Not sure how a screenshot would demonstrate it so here's a screen recording instead.
Comment 10•13 years ago
|
||
Looks like your system is entering browser fullscreen mode rather than HTML fullscreen mode. Does this bug still occur when you run Firefox in safe mode? (I'm wondering if addons are at fault). If running in safe mode doesn't fix this, could you try to find a regression range in nightly builds please?
Reporter | ||
Comment 11•13 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #10) > Looks like your system is entering browser fullscreen mode rather than HTML > fullscreen mode. Does this bug still occur when you run Firefox in safe > mode? (I'm wondering if addons are at fault). > Yes. > > If running in safe mode doesn't fix this, could you try to find a regression > range in nightly builds please? > Will do, as soon as I have some time.
Reporter | ||
Comment 12•12 years ago
|
||
Feb 07 2012 - works Feb 08 2012 - fails (doesn't trigger browser fullscreen either) https://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2012-02-07&enddate=2012-02-08 Bug 512529 looks suspicious.
Comment 13•12 years ago
|
||
You could try building locally with 02babc3139502171e5740 backed out, that's the only changeset from bug 512529 that should affect behaviour on MacOSX.
Assignee | ||
Updated•12 years ago
|
tracking-firefox13:
--- → ?
Keywords: regression,
testcase
Reporter | ||
Comment 14•12 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #13) > You could try building locally with 02babc3139502171e5740 backed out, that's > the only changeset from bug 512529 that should affect behaviour on MacOSX. I assume you meant 1b0294c7b952, which fixes the problem indeed. (And it looks so nice with the new Lion fullscreen).
Comment 15•12 years ago
|
||
Yes, I meant 1b0294c7b952. Philipp Hartwig, it looks like your changes from bug 512529 are breaking MacOSX fullscreen, can you take a look at this? Or can we back out 1b0294c7b952 safely?
Blocks: 512529
Comment 16•12 years ago
|
||
It was Neil that requested that change in bug 512529 comment 22. If MacOSX doesn't suffer from bug 512529, then the new code can be ifndef XP_MACOSX, but it smells like there is some other bug at the root cause that is not understood.
Comment 17•12 years ago
|
||
I wonder whether windowDidResize might be dispatching a non-fullscreen SizeMode http://hg.mozilla.org/mozilla-central/annotate/996b89200406/widget/cocoa/nsCocoaWindow.mm#l1913 before http://hg.mozilla.org/mozilla-central/annotate/996b89200406/widget/cocoa/nsCocoaWindow.mm#l1187
Comment 18•12 years ago
|
||
Are we blaming 1b0294c7b952? I actually needed that to make Lion full screen work (and had essentially that as part of my patch before bug 512529 landed: https://bugzilla.mozilla.org/attachment.cgi?id=594868&action=diff#a/xpfe/appshell/src/nsWebShellWindow.cpp_sec1) The test case here works for me (and I also ran this same sort of test _a lot_)... am I missing something?
Comment 19•12 years ago
|
||
1b0294c7b952 will break things whenever the nsSizeMode_Fullscreen flag is not set correctly by the full screen code. For this reason full screen on OS X was broken between the landing of 1b0294c7b952 and 5f033ecdf2aa and it is therefore not a surprise that you observe a regression when looking at 1b0294c7b952 alone. (To be honest it looks like neither Neil nor I did think of OS X, very sorry about that. Luckily Paul's 5f033ecdf2aa landed only two days later.) 2012-02-10 is the first nightly to contain both changes.
Looking at your attachment 606046 [details] the behavior looks similar to a behavior I've observed myself under Linux. It's a wild guess but could you try if setting "full-screen-api.exit-on-deactivate" to "false" in about:config makes a difference? This option only exists since Firefox 13.
Reporter | ||
Comment 20•12 years ago
|
||
(In reply to Philipp Hartwig from comment #19) > It's a wild guess but could you try if setting "full-screen-api.exit-on-deactivate" > to "false" in about:config makes a difference? This option only exists since > Firefox 13. It doesn't (at least not for this bug).
Reporter | ||
Comment 21•12 years ago
|
||
By the way, backing out 1b0294c7b952 (https://tbpl.mozilla.org/?tree=Try&rev=0585136e6bbd) fixes the problem on Lion, and I can't see any side effects on Linux.
Comment 22•12 years ago
|
||
(In reply to Philipp Hartwig from comment #19) > It's a wild guess but could you > try if setting "full-screen-api.exit-on-deactivate" to "false" in > about:config makes a difference? This option only exists since Firefox 13. Just FYI, exit-on-deactivate is ignored with Lion fullscreen because of the way it moves the window to a standalone desktop. (In reply to Reuben Morais [:reuben] from comment #21) > By the way, backing out 1b0294c7b952 > (https://tbpl.mozilla.org/?tree=Try&rev=0585136e6bbd) fixes the problem on > Lion, and I can't see any side effects on Linux. 3 things... 1. I still don't see the problem with latest nightly & a new profile. Reuben, is there anything in your profile that might be causing this to be a local issue? Has anybody else actually seen it recently? Or do I have the unique machine where it works? 2. Without that changeset, if you exit fullscreen via the menubar button on Lion, we don't fire the fullscreen event. With your try build, open the error console from the window with the test case and run the following code. You won't see the message when exiting full screen via the menubar button. top.opener.addEventListener("fullscreen", function(){ top.opener.Services.console.logStringMessage("FS toggle"); }, false); (it's worse when using domfullscreen because none of the toolbars get unhidden) 3. That was actually the problem on Linux too, so there should be (virtually the same) issues (I don't have a machine handy right now to test though).
Assignee | ||
Comment 23•12 years ago
|
||
I can also reproduce this (clean profile), and it just occurred to me that the browser window must be *maximized* for the bug to happen. Reuben, do you see that too? If the browser window is not maximized, the video correctly goes full-screen the first time you try (although it first plays the animation of the browser window going full screen -- do you see that?).
Reporter | ||
Comment 24•12 years ago
|
||
(In reply to Nickolay_Ponomarev from comment #23) > I can also reproduce this (clean profile), and it just occurred to me that > the browser window must be *maximized* for the bug to happen. Reuben, do you > see that too? > Yes.
Assignee | ||
Comment 25•12 years ago
|
||
Going fullscreen (both via Lion API and our older code) happens in two steps: 1) The window is resized, causing windowDidResize to be called. 2) Full screen is activated. The issue here is that after the first step the sizemode (as determined by GetWindowSizeMode <http://hg.mozilla.org/mozilla-central/annotate/20a01901480f/widget/cocoa/nsCocoaWindow.mm#l1427>) is nsSizeMode_Normal, which is a change from nsSizeMode_Maximized in the case discussed here. So a NS_SIZEMODE event is fired, in response to which https://hg.mozilla.org/mozilla-central/rev/1b0294c7b952 from bug 512529 cancels the fullscreen mode. Cancelling widget-level fullscreen also cancels the DOM fullscreen (see nsGlobalWindow::SetFullScreenInternal). The widget-level fullscreen is re-entered at a later stage, leading to the observed effect. I think the most reasonable fix is to prevent windowDidResize from firing a sizemode event if we know we're transitioning to fullscreen. (A simpler one would be to just set mFullScreen earlier on, but that will send a fullscreen notification before windowDidEnterFullScreen).
Assignee | ||
Comment 26•12 years ago
|
||
Here's a simple patch adding the flag. I tested it manually on 10.7 (going to/from fullscreen using Cmd+Shift+F, the Lion's full-screen controls, and the <video> fullscreen button, with iniial sizemode=maximized/normal, with/without fullscreenbutton="true" in browser.xul), but I won't get to writing a test for it or pushing it to try, hoping someone else will take over.
Comment 27•12 years ago
|
||
Comment on attachment 609056 [details] [diff] [review] don't fire extraneous NS_SIZEMODE events from windowDidResize Review of attachment 609056 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for figuring this out! Apart from my comment about the variable name and the nit, I think this is pretty reasonable. ::: widget/cocoa/nsCocoaWindow.h @@ +367,5 @@ > bool mSheetNeedsShow; // if this is a sheet, are we waiting to be shown? > // this is used for sibling sheet contention only > bool mFullScreen; > + bool mInFullScreenTransition; // true from the request to enter/exit fullscreen > + // (MakeFullScreen() call) to EnteredFullScreen() I'm wondering if it might make sense to make this a bit more general and obvious - something like mSuppressSizeModeEvents ::: widget/cocoa/nsCocoaWindow.mm @@ +1475,5 @@ > { > nsSizeMode newMode = GetWindowSizeMode(mWindow, mFullScreen); > + if (mInFullScreenTransition || // avoid firing sizemode from windowDidResize, > + // which fires before windowDidEnterFullScreen > + mSizeMode == newMode) Nit: I would just add the comment on it's own line(s) above the if - this looks messy.
Attachment #609056 -
Flags: review?(mstange)
Updated•12 years ago
|
Assignee | ||
Comment 29•12 years ago
|
||
Paul, thanks for your comments! As I said, I'd appreciate it if someone took over from here.
Assignee | ||
Comment 30•12 years ago
|
||
(In reply to Nickolay_Ponomarev from comment #23) > If the browser window is not maximized, the video correctly goes full-screen > the first time you try (although it first plays the animation of the browser > window going full screen -- do you see that?). BTW, I filed bug 739012 on that issue.
Comment 31•12 years ago
|
||
(In reply to Nickolay_Ponomarev from comment #29) > Paul, thanks for your comments! As I said, I'd appreciate it if someone took > over from here. I can take over from here. Thanks again for getting it to this point!
Updated•12 years ago
|
Attachment #609056 -
Flags: review?(mstange) → review+
Comment 32•12 years ago
|
||
Markus, r+ as is or should we do what I was thinking comment 27? (s/mInFullScreenTranstion/mSuppressSizeModeEvents/)
Comment 33•12 years ago
|
||
I prefer mInFullScreenTransition. As long as there are no other sources of size mode event suppression, I don't think we should name it that way, because then it looks like there could be multiple sources of suppression active at the same time. But if that were the case, EnteredFullScreen couldn't just set mSuppressSizeModeEvents = false unconditionally, and the reader of that line would wonder about handling that case.
Comment 34•12 years ago
|
||
(In reply to Markus Stange from comment #33) > I prefer mInFullScreenTransition. Fair enough.
Updated•12 years ago
|
Comment 35•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/79e4805da723
Assignee: nobody → asqueella
Target Milestone: --- → mozilla14
Comment 36•12 years ago
|
||
> https://hg.mozilla.org/integration/mozilla-inbound/rev/79e4805da723
This changeset included a comment change and I also made sure mInFullScreenTransition was initialized to false.
Comment 38•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/79e4805da723
Status: REOPENED → RESOLVED
Closed: 13 years ago → 12 years ago
Resolution: --- → FIXED
Comment 39•12 years ago
|
||
Still an issue on Aurora: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120402 Firefox/13.0a2
Comment 40•12 years ago
|
||
Please nominate for beta approval and we'll get this in.
Comment 41•12 years ago
|
||
This patch and affected code are only on 14, so I don't think this needed to track 13. (In reply to Paul Silaghi [QA] from comment #39) > Still an issue on Aurora: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; > rv:13.0) Gecko/20120402 Firefox/13.0a2 Paul, can you expand on your steps to reproduce with 13?
Assignee | ||
Comment 42•12 years ago
|
||
Paul: this was a regression from bug 512529 which landed on 13, which is why I asked for tracking that release. But you're right that the patch can't be landed on 13 as is, since the code being patched changed in 14 to support Lion full-screen: windowDidFailTo{Enter/ Exit}FullScreen must be removed from the patch and it should be tested on 13 if you decide to backport it.
Comment 43•12 years ago
|
||
(In reply to Paul O'Shannessy [:zpao] from comment #41) > Paul, can you expand on your steps to reproduce with 13? STR: 1. Enable html5 (www.youtube.com/html5) 2. Open a video (https://www.youtube.com/watch?v=iRZ2Sh5-XuM) 3. Press fullscreen button Actual results: Browser goes fullscreen, video is still contained. If you press the fullscreen button again after that it works. Expected results: Video goes fullscreen, browser doesn't. Tested on FF 13b2: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0
Comment 44•12 years ago
|
||
(In reply to Nickolay_Ponomarev from comment #42) > But you're right that the patch can't be landed on 13 as is, since the code > being patched changed in 14 to support Lion full-screen: > windowDidFailTo{Enter/ Exit}FullScreen must be removed from the patch and it > should be tested on 13 if you decide to backport it. Do you know when you expect to have a fix prepared for Firefox 13? We're going to build with our third of six betas today, so we'd like to get a feel for where we stand with this bug.
Assignee | ||
Comment 45•12 years ago
|
||
> Do you know when you expect to have a fix prepared for Firefox 13?
Just in case this question was directed at me: I'm not planning to work on this.
Comment 46•12 years ago
|
||
I've encountered a similar issue regarding ogg videos: http://videos.mozilla.org/firefox4beta/Firefox_4_beta.theora.ogv If I press the full screen button on the video, the browser enters in full screen and not the video. Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0 beta 3
Comment 47•12 years ago
|
||
The same thing is happening on html5 videos on: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0 beta 3 and also on MacOS X 10.6.8
Comment 48•12 years ago
|
||
Nickolay, I left you as the author of the patch because it's still really your code. I carried over Markus's review as well. The only difference from what landed on m-c is minor - just moves the resetting of mInFullScreenTransition to MakeFullScreen. [Approval Request Comment] Regression caused by (bug #): bug 512529 User impact if declined: DOM fullscreen won't work for maximized windows on OS X Testing completed (on m-c, etc.): on m-c Risk to taking this patch (and alternatives if risky): low String changes made by this patch: none
Attachment #622792 -
Flags: approval-mozilla-beta?
Comment 49•12 years ago
|
||
Comment on attachment 622792 [details] [diff] [review] patch for beta low risk, fixed regression - approved for beta.
Attachment #622792 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 50•12 years ago
|
||
Please land today or tomorrow by the afternoon PT to make it into our next beta build. Thanks!
Comment 51•12 years ago
|
||
Landed on beta: https://hg.mozilla.org/releases/mozilla-beta/rev/0cb005e477fc
status-firefox13:
--- → fixed
Comment 52•12 years ago
|
||
HTML5 video fullscreen is working fine now on Mac. Verified fixed on FF 13b4: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0
You need to log in
before you can comment on or make changes to this bug.
Description
•