Title: [242363] branches/safari-607-branch/Source
Revision
242363
Author
bshaf...@apple.com
Date
2019-03-04 09:28:39 -0800 (Mon, 04 Mar 2019)

Log Message

Cherry-pick r242355. rdar://problem/48563894

    [iOS] Fullscreen "stay in page" option breaks video playback
    https://bugs.webkit.org/show_bug.cgi?id=195277
    <rdar://problem/48537317>

    Reviewed by Eric Carlson.

    Source/WebCore:

    Add a LOG entry when playback is rejected due to media playback suspension.

    * html/MediaElementSession.cpp:
    (WebCore::MediaElementSession::playbackPermitted const):

    Source/WebKit:

    Make sure we resume media playback when the user chooses "stay in page" from the deceptive
    website warning dialog.

    * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
    (-[WKFullScreenViewController _showPhishingAlert]):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242355 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (242362 => 242363)


--- branches/safari-607-branch/Source/WebCore/ChangeLog	2019-03-04 17:25:04 UTC (rev 242362)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog	2019-03-04 17:28:39 UTC (rev 242363)
@@ -1,3 +1,44 @@
+2019-03-04  Babak Shafiei  <bshaf...@apple.com>
+
+        Cherry-pick r242355. rdar://problem/48563894
+
+    [iOS] Fullscreen "stay in page" option breaks video playback
+    https://bugs.webkit.org/show_bug.cgi?id=195277
+    <rdar://problem/48537317>
+    
+    Reviewed by Eric Carlson.
+    
+    Source/WebCore:
+    
+    Add a LOG entry when playback is rejected due to media playback suspension.
+    
+    * html/MediaElementSession.cpp:
+    (WebCore::MediaElementSession::playbackPermitted const):
+    
+    Source/WebKit:
+    
+    Make sure we resume media playback when the user chooses "stay in page" from the deceptive
+    website warning dialog.
+    
+    * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
+    (-[WKFullScreenViewController _showPhishingAlert]):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-03-04  Jer Noble  <jer.no...@apple.com>
+
+            [iOS] Fullscreen "stay in page" option breaks video playback
+            https://bugs.webkit.org/show_bug.cgi?id=195277
+            <rdar://problem/48537317>
+
+            Reviewed by Eric Carlson.
+
+            Add a LOG entry when playback is rejected due to media playback suspension.
+
+            * html/MediaElementSession.cpp:
+            (WebCore::MediaElementSession::playbackPermitted const):
+
 2019-03-01  Babak Shafiei  <bshaf...@apple.com>
 
         Cherry-pick r242248. rdar://problem/48503715

Modified: branches/safari-607-branch/Source/WebCore/html/MediaElementSession.cpp (242362 => 242363)


--- branches/safari-607-branch/Source/WebCore/html/MediaElementSession.cpp	2019-03-04 17:25:04 UTC (rev 242362)
+++ branches/safari-607-branch/Source/WebCore/html/MediaElementSession.cpp	2019-03-04 17:28:39 UTC (rev 242363)
@@ -264,8 +264,10 @@
 
     auto& document = m_element.document();
     auto* page = document.page();
-    if (!page || page->mediaPlaybackIsSuspended())
+    if (!page || page->mediaPlaybackIsSuspended()) {
+        ALWAYS_LOG(LOGIDENTIFIER, "Returning FALSE because media playback is suspended");
         return MediaPlaybackDenialReason::PageConsentRequired;
+    }
 
     if (document.isMediaDocument() && !document.ownerElement())
         return { };

Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (242362 => 242363)


--- branches/safari-607-branch/Source/WebKit/ChangeLog	2019-03-04 17:25:04 UTC (rev 242362)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog	2019-03-04 17:28:39 UTC (rev 242363)
@@ -1,3 +1,45 @@
+2019-03-04  Babak Shafiei  <bshaf...@apple.com>
+
+        Cherry-pick r242355. rdar://problem/48563894
+
+    [iOS] Fullscreen "stay in page" option breaks video playback
+    https://bugs.webkit.org/show_bug.cgi?id=195277
+    <rdar://problem/48537317>
+    
+    Reviewed by Eric Carlson.
+    
+    Source/WebCore:
+    
+    Add a LOG entry when playback is rejected due to media playback suspension.
+    
+    * html/MediaElementSession.cpp:
+    (WebCore::MediaElementSession::playbackPermitted const):
+    
+    Source/WebKit:
+    
+    Make sure we resume media playback when the user chooses "stay in page" from the deceptive
+    website warning dialog.
+    
+    * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
+    (-[WKFullScreenViewController _showPhishingAlert]):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-03-04  Jer Noble  <jer.no...@apple.com>
+
+            [iOS] Fullscreen "stay in page" option breaks video playback
+            https://bugs.webkit.org/show_bug.cgi?id=195277
+            <rdar://problem/48537317>
+
+            Reviewed by Eric Carlson.
+
+            Make sure we resume media playback when the user chooses "stay in page" from the deceptive
+            website warning dialog.
+
+            * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
+            (-[WKFullScreenViewController _showPhishingAlert]):
+
 2019-02-28  Andy Estes  <aes...@apple.com>
 
         [watchOS] Disable Parental Controls content filtering

Modified: branches/safari-607-branch/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm (242362 => 242363)


--- branches/safari-607-branch/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm	2019-03-04 17:25:04 UTC (rev 242362)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm	2019-03-04 17:28:39 UTC (rev 242363)
@@ -570,8 +570,10 @@
     }];
 
     UIAlertAction* stayAction = [UIAlertAction actionWithTitle:WEB_UI_STRING_KEY("Stay in Full Screen", "Stay in Full Screen (Element Full Screen)", "Full Screen Deceptive Website Stay Action") style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
-        if (auto* page = [self._webView _page])
+        if (auto* page = [self._webView _page]) {
             page->resumeActiveDOMObjectsAndAnimations();
+            page->resumeAllMediaPlayback();
+        }
         _secheuristic.reset();
     }];
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to