WebKit Bugzilla
Attachment 343250 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 for landing
bug-186856-20180621110901.patch (text/plain), 5.50 KB, created by
Jer Noble
on 2018-06-21 11:09:01 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-06-21 11:09:01 PDT
Size:
5.50 KB
patch
obsolete
>Subversion Revision: 233032 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 48338bbd6f9dc4226407d1d46e0169f8e19befc7..84f48c43dbaebbb4a3798d358c2b9ebdb67921d2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-06-20 Jer Noble <jer.noble@apple.com> >+ >+ [Fullscreen] Suspend page (and pause video) while phishing warning is presented >+ https://bugs.webkit.org/show_bug.cgi?id=186856 >+ <rdar://problem/41212444> >+ >+ Reviewed by Tim Horton. >+ >+ Pause the media element when the page is suspended, and unpause when the page resumes. >+ >+ * 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 d195ab86bbd25ce5d6738696abfe9dacd8f3db9a..1ca42424dd420005199d858040b14af0e3e45f0e 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 warning is presented >+ https://bugs.webkit.org/show_bug.cgi?id=186856 >+ <rdar://problem/41212444> >+ >+ Reviewed by Tim Horton. >+ >+ * 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 c46dd001c9e679c703194f817c21530c79860723..5c0b97ceddf2e50a00d99ce7c75f11ad4f3723fd 100644 >--- a/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >+++ b/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm >@@ -447,11 +447,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