⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 242355 in webkit


Ignore:
Timestamp:
Mar 4, 2019, 8:44:51 AM (7 years ago)
Author:
jer.noble@apple.com
Message:

[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]):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r242341 r242355  
     12019-03-04  Jer Noble  <jer.noble@apple.com>
     2
     3        [iOS] Fullscreen "stay in page" option breaks video playback
     4        https://bugs.webkit.org/show_bug.cgi?id=195277
     5        <rdar://problem/48537317>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Add a LOG entry when playback is rejected due to media playback suspension.
     10
     11        * html/MediaElementSession.cpp:
     12        (WebCore::MediaElementSession::playbackPermitted const):
     13
    1142019-03-04  Tim Horton  <timothy_horton@apple.com>
    215
  • trunk/Source/WebCore/html/MediaElementSession.cpp

    r242113 r242355  
    274274    auto& document = m_element.document();
    275275    auto* page = document.page();
    276     if (!page || page->mediaPlaybackIsSuspended())
     276    if (!page || page->mediaPlaybackIsSuspended()) {
     277        ALWAYS_LOG(LOGIDENTIFIER, "Returning FALSE because media playback is suspended");
    277278        return MediaPlaybackDenialReason::PageConsentRequired;
     279    }
    278280
    279281    if (document.isMediaDocument() && !document.ownerElement())
  • trunk/Source/WebKit/ChangeLog

    r242354 r242355  
     12019-03-04  Jer Noble  <jer.noble@apple.com>
     2
     3        [iOS] Fullscreen "stay in page" option breaks video playback
     4        https://bugs.webkit.org/show_bug.cgi?id=195277
     5        <rdar://problem/48537317>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Make sure we resume media playback when the user chooses "stay in page" from the deceptive
     10        website warning dialog.
     11
     12        * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
     13        (-[WKFullScreenViewController _showPhishingAlert]):
     14
    1152019-03-04  Michael Catanzaro  <mcatanzaro@igalia.com>
    216
  • trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm

    r239640 r242355  
    571571
    572572    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) {
    573         if (auto* page = [self._webView _page])
     573        if (auto* page = [self._webView _page]) {
    574574            page->resumeActiveDOMObjectsAndAnimations();
     575            page->resumeAllMediaPlayback();
     576        }
    575577        _secheuristic.reset();
    576578    }];
Note: See TracChangeset for help on using the changeset viewer.