WebKit Bugzilla
Attachment 341765 Details for
Bug 185619
: Exit fullscreen when javascript alerts are presented.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185619-20180601093910.patch (text/plain), 3.85 KB, created by
Jeremy Jones
on 2018-06-01 09:39:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jeremy Jones
Created:
2018-06-01 09:39:11 PDT
Size:
3.85 KB
patch
obsolete
>Subversion Revision: 231991 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 3abbd15888ee227cd2c267ff839bc3e1edee6bea..7362b5dacff07ca8003a9b9f3567c970f8526000 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,24 @@ >+2018-05-25 Jeremy Jones <jeremyj@apple.com> >+ >+ Exit fullscreen when javascript alerts are presented. >+ https://bugs.webkit.org/show_bug.cgi?id=185619 >+ rdar://problem/35724264 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Prevent users from being trapped in fullscreen by alert cycles. >+ Prevent fullscreen from becoming unresponsive due to alerts hidden behind fullscreen. >+ >+ Fullscreen exit is initiated here in the UI process so that fullscreen UI is torn down immediately, >+ before the alert is shown. >+ >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::exitFullscreenImmediately): >+ (WebKit::WebPageProxy::runJavaScriptAlert): >+ (WebKit::WebPageProxy::runJavaScriptConfirm): >+ (WebKit::WebPageProxy::runJavaScriptPrompt): >+ * UIProcess/WebPageProxy.h: >+ > 2018-05-18 Brian Burg <bburg@apple.com> > > [Cocoa] Add missing nullability annotations to _WKAutomationSessionDelegate >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 1da04d35086bb3a448eea1bdf822cc491146a6d7..73d52699de7e6f962de01e2ba04fde43610e6400 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -4230,6 +4230,19 @@ void WebPageProxy::showPage() > m_uiClient->showPage(this); > } > >+void WebPageProxy::exitFullscreenImmediately() >+{ >+#if ENABLE(FULLSCREEN_API) >+ if (fullScreenManager()) >+ fullScreenManager()->close(); >+#endif >+ >+#if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) >+ if (videoFullscreenManager()) >+ videoFullscreenManager()->requestHideAndExitFullscreen(); >+#endif >+} >+ > void WebPageProxy::fullscreenMayReturnToInline() > { > m_uiClient->fullscreenMayReturnToInline(this); >@@ -4259,6 +4272,10 @@ void WebPageProxy::runJavaScriptAlert(uint64_t frameID, const SecurityOriginData > WebFrameProxy* frame = m_process->webFrame(frameID); > MESSAGE_CHECK(frame); > >+#if PLATFORM(IOS) >+ exitFullscreenImmediately(); >+#endif >+ > // Since runJavaScriptAlert() can spin a nested run loop we need to turn off the responsiveness timer. > m_process->responsivenessTimer().stop(); > >@@ -4274,6 +4291,10 @@ void WebPageProxy::runJavaScriptConfirm(uint64_t frameID, const SecurityOriginDa > WebFrameProxy* frame = m_process->webFrame(frameID); > MESSAGE_CHECK(frame); > >+#if PLATFORM(IOS) >+ exitFullscreenImmediately(); >+#endif >+ > // Since runJavaScriptConfirm() can spin a nested run loop we need to turn off the responsiveness timer. > m_process->responsivenessTimer().stop(); > >@@ -4290,6 +4311,9 @@ void WebPageProxy::runJavaScriptPrompt(uint64_t frameID, const SecurityOriginDat > WebFrameProxy* frame = m_process->webFrame(frameID); > MESSAGE_CHECK(frame); > >+#if PLATFORM(IOS) >+ exitFullscreenImmediately(); >+#endif > // Since runJavaScriptPrompt() can spin a nested run loop we need to turn off the responsiveness timer. > m_process->responsivenessTimer().stop(); > >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index 9c24a3f4f73c851481ac0ec9189b1a75e1e3ba48..7a8501f2c5aa60202135d7d935d032964ef16db8 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -356,6 +356,7 @@ public: > bool addsVisitedLinks() const { return m_addsVisitedLinks; } > void setAddsVisitedLinks(bool addsVisitedLinks) { m_addsVisitedLinks = addsVisitedLinks; } > >+ void exitFullscreenImmediately(); > void fullscreenMayReturnToInline(); > void didEnterFullscreen(); > void didExitFullscreen();
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 185619
:
340341
|
340367
|
341274
|
341280
| 341765