WebKit Bugzilla
Attachment 343164 Details for
Bug 186856
: [Fullscreen] Suspend page (and pause video) while phishing warining is presented
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186856-20180620105901.patch (text/plain), 5.41 KB, created by
Jer Noble
on 2018-06-20 10:59:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-06-20 10:59:01 PDT
Size:
5.41 KB
patch
obsolete
>Subversion Revision: 232990 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 83e34d3799ddf03dfd131d121decf64cc64ec393..50e347f6d434e775fcec6095551273fd2c93dc6f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-06-20 Jer Noble <jer.noble@apple.com> >+ >+ [Fullscreen] Suspend page (and pause video) while phishing warining is presented >+ https://bugs.webkit.org/show_bug.cgi?id=186856 >+ <rdar://problem/41212444> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * html/HTMLMediaElement.cpp: >+ (WebCore::HTMLMediaElement::HTMLMediaElement): >+ (WebCore::HTMLMediaElement::suspend): >+ (WebCore::HTMLMediaElement::resume): >+ * html/HTMLMediaElement.h: >+ > 2018-06-19 Jer Noble <jer.noble@apple.com> > > [Fullscreen] Page sometimes ends up with an incorrect zoom level after entering fullscreen >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 70efc6466c9c1cbc1f16dd02e13ec4a8eea9cc98..b366c599d1192bcb7cb5d308aa1d2ef9e0c09829 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-20 Jer Noble <jer.noble@apple.com> >+ >+ [Fullscreen] Suspend page (and pause video) while phishing warining is presented >+ https://bugs.webkit.org/show_bug.cgi?id=186856 >+ <rdar://problem/41212444> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/ios/fullscreen/WKFullScreenViewController.mm: >+ (-[WKFullScreenViewController _showPhishingAlert]): >+ > 2018-06-19 Jer Noble <jer.noble@apple.com> > > [Fullscreen] Exit fullscreen when opening a new tab >diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp >index f6b5e361dd9a82416b1be257883f6370cd4c93e4..44a0d18af166fabfe24f55262be068dbbd3dd070 100644 >--- a/Source/WebCore/html/HTMLMediaElement.cpp >+++ b/Source/WebCore/html/HTMLMediaElement.cpp >@@ -490,6 +490,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum > , m_haveSetUpCaptionContainer(false) > #endif > , m_isScrubbingRemotely(false) >+ , m_shouldUnpauseInternalOnResume(false) > #if ENABLE(VIDEO_TRACK) > , m_tracksAreReady(true) > , m_haveVisibleTextTrack(false) >@@ -5596,8 +5597,13 @@ void HTMLMediaElement::suspend(ReasonForSuspension why) > setShouldBufferData(false); > m_mediaSession->addBehaviorRestriction(MediaElementSession::RequirePageConsentToResumeMedia); > break; >- case JavaScriptDebuggerPaused: > case PageWillBeSuspended: >+ if (!m_pausedInternal) { >+ m_shouldUnpauseInternalOnResume = true; >+ setPausedInternal(true); >+ } >+ break; >+ case JavaScriptDebuggerPaused: > case WillDeferLoading: > // Do nothing, we don't pause media playback in these cases. > break; >@@ -5612,6 +5618,11 @@ void HTMLMediaElement::resume() > > m_asyncEventQueue.resume(); > >+ if (m_shouldUnpauseInternalOnResume) { >+ m_shouldUnpauseInternalOnResume = false; >+ setPausedInternal(false); >+ } >+ > setShouldBufferData(true); > > if (!m_mediaSession->pageAllowsPlaybackAfterResuming()) >diff --git a/Source/WebCore/html/HTMLMediaElement.h b/Source/WebCore/html/HTMLMediaElement.h >index 3ee881a6b4e294fdecd0e9eb21eb34c1327a7c0e..5660df92697336487030fff125ac1da000147167 100644 >--- a/Source/WebCore/html/HTMLMediaElement.h >+++ b/Source/WebCore/html/HTMLMediaElement.h >@@ -1083,6 +1083,7 @@ private: > > bool m_isScrubbingRemotely : 1; > bool m_waitingToEnterFullscreen : 1; >+ bool m_shouldUnpauseInternalOnResume : 1; > > #if ENABLE(VIDEO_TRACK) > bool m_tracksAreReady : 1; >diff --git a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >index e325696b6b3bdfc70d48512908685c7f9db105b5..3f281f51c390d0dfa6675ad8a9497a2c38b56673 100644 >--- a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >+++ b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >@@ -449,11 +449,18 @@ - (void)_showPhishingAlert > NSString *alertMessage = [NSString stringWithFormat:WEB_UI_STRING("The website â%@â may try to trick you into doing something dangerous, like installing software or disclosing personal or financial information, like passwords, phone numbers, or credit cards.", "Fullscreen Deceptive Website Warning Sheet Content Text") , (NSString *)self.location]; > UIAlertController* alert = [UIAlertController alertControllerWithTitle:alertTitle message:alertMessage preferredStyle:UIAlertControllerStyleAlert]; > >+ if (auto* page = [self._webView _page]) >+ page->suspendActiveDOMObjectsAndAnimations(); >+ > UIAlertAction* exitAction = [UIAlertAction actionWithTitle:WEB_UI_STRING("Exit Fullscreen", "Fullscreen Deceptive Website Exit Action") style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { > [self _cancelAction:action]; >+ if (auto* page = [self._webView _page]) >+ page->resumeActiveDOMObjectsAndAnimations(); > }]; > > UIAlertAction* stayAction = [UIAlertAction actionWithTitle:WEB_UI_STRING("Stay in Fullscreen", "Fullscreen Deceptive Website Stay Action") style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { >+ if (auto* page = [self._webView _page]) >+ page->resumeActiveDOMObjectsAndAnimations(); > _secheuristic.reset(); > }]; >
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 186856
:
343164
|
343249
|
343250
|
357608