WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
132506
HTMLMediaElement should exitFullscreen when view is removed from the window.
https://bugs.webkit.org/show_bug.cgi?id=132506
Summary
HTMLMediaElement should exitFullscreen when view is removed from the window.
Jeremy Jones
Reported
2014-05-02 17:52:48 PDT
HTMLMediaElement should exitFullscreen when view is removed from the window.
Attachments
Patch
(6.55 KB, patch)
2014-05-02 18:19 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Patch
(6.45 KB, patch)
2014-05-02 20:33 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Patch
(7.18 KB, patch)
2014-05-05 18:12 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Patch
(6.97 KB, patch)
2014-05-05 19:01 PDT
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
Patch for landing.
(10.19 KB, patch)
2014-05-07 13:42 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Jeremy Jones
Comment 1
2014-05-02 18:19:02 PDT
Created
attachment 230728
[details]
Patch
mitz
Comment 2
2014-05-02 18:27:52 PDT
Comment on
attachment 230728
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=230728&action=review
> Source/WebCore/page/Page.cpp:887 > +#if PLATFORM(IOS) > + else { > + for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) > + frame->dismissModalFullscreen(); > + } > +#endif
There shouldn’t be (and there currently isn’t) any platform-specific code in Page.cpp.
Jeremy Jones
Comment 3
2014-05-02 20:33:09 PDT
Created
attachment 230735
[details]
Patch
Jeremy Jones
Comment 4
2014-05-02 22:11:49 PDT
(In reply to
comment #2
)
> (From update of
attachment 230728
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=230728&action=review
> > > Source/WebCore/page/Page.cpp:887 > > +#if PLATFORM(IOS) > > + else { > > + for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) > > + frame->dismissModalFullscreen(); > > + } > > +#endif > > There shouldn’t be (and there currently isn’t) any platform-specific code in Page.cpp.
Removed #if PLATFORM(IOS) where possible.
Simon Fraser (smfr)
Comment 5
2014-05-03 13:43:07 PDT
Comment on
attachment 230735
[details]
Patch Why doesn't this all happen via an exitFullscreen() code path? Bad to pollute Document with yet more fullscreen gunk.
Jeremy Jones
Comment 6
2014-05-05 18:12:27 PDT
Created
attachment 230876
[details]
Patch
Jeremy Jones
Comment 7
2014-05-05 18:58:26 PDT
(In reply to
comment #5
)
> (From update of
attachment 230735
[details]
) > Why doesn't this all happen via an exitFullscreen() code path? Bad to pollute Document with yet more fullscreen gunk.
Per our conversation. This is now much simpler. WebView and WebPageProxy request exit-fullscreen from WebVideoFullscreenController and WebVideoFullscreenManagerProxy respectively.
Jeremy Jones
Comment 8
2014-05-05 19:01:34 PDT
Created
attachment 230880
[details]
Patch
Eric Carlson
Comment 9
2014-05-06 07:59:05 PDT
Comment on
attachment 230880
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=230880&action=review
This looks good to me but I am not a WK2 reviewer so someone else will need to r+.
> Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm:203 > WebThreadRun(^{ > if (m_mediaElement->isFullscreen())
Nit: this can be done in a follow-up patch, but you should NULL-check m_mediaElement here as well.
Tim Horton
Comment 10
2014-05-07 12:17:05 PDT
Comment on
attachment 230880
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=230880&action=review
WK2 part is fine with me, the rest has ericc's review.
> Source/WebKit2/UIProcess/WebPageProxy.cpp:1103 > #endif > > +#if PLATFORM(IOS) > + if ((mayHaveChanged & ViewState::IsInWindow) && !(m_viewState & ViewState::IsInWindow)) { > + // When leaving the current page, close the video fullscreen. > + if (m_videoFullscreenManager) > + m_videoFullscreenManager->requestExitFullscreen(); > + } > +#endif > + > updateBackingStoreDiscardableState();
Merge these and put the #ifs inside the conditional, maybe?
Eric Carlson
Comment 11
2014-05-07 13:42:48 PDT
Created
attachment 231017
[details]
Patch for landing.
WebKit Commit Bot
Comment 12
2014-05-07 14:19:35 PDT
Comment on
attachment 231017
[details]
Patch for landing. Clearing flags on attachment: 231017 Committed
r168439
: <
http://trac.webkit.org/changeset/168439
>
Jon Lee
Comment 13
2014-05-08 21:53:02 PDT
<
rdar://problem/16777354
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug