WebKit Bugzilla
Attachment 343833 Details for
Bug 186226
: Fullscreen requires active document.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186226-20180628121042.patch (text/plain), 3.44 KB, created by
Jeremy Jones
on 2018-06-28 12:11:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jeremy Jones
Created:
2018-06-28 12:11:23 PDT
Size:
3.44 KB
patch
obsolete
>Subversion Revision: 233214 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f049638b707a069c4acc01e0bc84d470d5043c0c..50c3585b0135b016920398d2e97d8d6d25bc1b58 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2018-06-28 Jeremy Jones <jeremyj@apple.com> >+ >+ Fullscreen requires active document. >+ https://bugs.webkit.org/show_bug.cgi?id=186226 >+ rdar://problem/36187413 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ User gesture is not enough to guarantee that a document is active when fullscreen is initiated >+ because JavaScript can spin wait before initiating fullscreen. >+ >+ This change requires the document to be active for both element fullscreen and video fullscreen. >+ >+ * dom/Document.cpp: >+ (WebCore::Document::requestFullScreenForElement): >+ * html/HTMLMediaElement.cpp: >+ (WebCore::HTMLMediaElement::enterFullscreen): >+ (WebCore::HTMLMediaElement::exitFullscreen): >+ (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): >+ > 2018-06-26 Eric Carlson <eric.carlson@apple.com> > > [Mac] AirPlay picker uses incorrect theme in Dark mode >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 22d495b837f8ebb82fa157e9170f80248603efc3..ec36d615b0ead52f3ff823d9c0bc7413cff6a2e8 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -6015,6 +6015,10 @@ void Document::requestFullScreenForElement(Element* element, FullScreenCheckType > // an event named fullscreenerror with its bubbles attribute set to true on the context object's > // node document: > >+ // Don't allow fullscreen if page is suspended. >+ if (activeDOMObjectsAreSuspended() || activeDOMObjectsAreStopped()) >+ break; >+ > // The context object is not in a document. > if (!element->isConnected()) > break; >diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp >index 628b0a0a1a760cf2e31deda3b70ae74307ad5861..c8e3d259e1f3281f9c245fd770de5b539e151145 100644 >--- a/Source/WebCore/html/HTMLMediaElement.cpp >+++ b/Source/WebCore/html/HTMLMediaElement.cpp >@@ -5880,6 +5880,11 @@ void HTMLMediaElement::enterFullscreen(VideoFullscreenMode mode) > if (m_videoFullscreenMode == mode) > return; > >+ if (isSuspended()) { >+ ALWAYS_LOG(LOGIDENTIFIER, " returning because context is suspended"); >+ return; >+ } >+ > m_temporarilyAllowingInlinePlaybackAfterFullscreen = false; > m_waitingToEnterFullscreen = true; > >@@ -5958,7 +5963,7 @@ void HTMLMediaElement::exitFullscreen() > } > > #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) >- if (document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped()) >+ if (isSuspended()) > document().page()->chrome().client().exitVideoFullscreenToModeWithoutAnimation(downcast<HTMLVideoElement>(*this), VideoFullscreenModeNone); > else > #endif >@@ -7270,7 +7275,7 @@ void HTMLMediaElement::updateMediaControlsAfterPresentationModeChange() > { > // Don't execute script if the controls script hasn't been injected yet, or we have > // stopped/suspended the object. >- if (!m_mediaControlsHost || document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped()) >+ if (!m_mediaControlsHost || isSuspended()) > return; > > DOMWrapperWorld& world = ensureIsolatedWorld();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186226
:
341832
|
341834
|
341835
|
341836
|
341840
|
341868
|
343833
|
343859
|
343873
|
343945
|
343956
|
343957
|
343965
|
343972
|
343985
|
343995
|
344478
|
344494
|
344500
|
344727
|
344733
|
344735
|
344737
|
344739
|
344908
|
344910
|
344916
|
344919
|
344921
|
344923
|
344925
|
345028
|
345030
|
345031
|
345111