Changeset 245491 in webkit


Ignore:
Timestamp:
May 17, 2019 7:12:13 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Enable legacy EME for iOS WKWebView
https://bugs.webkit.org/show_bug.cgi?id=197964
<rdar://problem/50625666>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-05-17
Reviewed by Wenson Hsieh.

Source/WebCore:

This was attempted unsuccessfully in r230169.
Verified manually that it works as desired.

  • page/RuntimeEnabledFeatures.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:

(TEST):

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r245490 r245491  
     12019-05-17  Alex Christensen  <achristensen@webkit.org>
     2
     3        Enable legacy EME for iOS WKWebView
     4        https://bugs.webkit.org/show_bug.cgi?id=197964
     5        <rdar://problem/50625666>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        This was attempted unsuccessfully in r230169.
     10        Verified manually that it works as desired.
     11
     12        * page/RuntimeEnabledFeatures.h:
     13
    1142019-05-17  Sihui Liu  <sihui_liu@apple.com>
    215
  • trunk/Source/WebCore/page/RuntimeEnabledFeatures.h

    r244818 r245491  
    508508
    509509#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
    510     bool m_legacyEncryptedMediaAPIEnabled { false };
     510    bool m_legacyEncryptedMediaAPIEnabled { true };
    511511#endif
    512512
  • trunk/Source/WebKit/ChangeLog

    r245483 r245491  
     12019-05-17  Alex Christensen  <achristensen@webkit.org>
     2
     3        Enable legacy EME for iOS WKWebView
     4        https://bugs.webkit.org/show_bug.cgi?id=197964
     5        <rdar://problem/50625666>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
     10        (-[WKWebViewConfiguration init]):
     11
    1122019-05-17  Antoine Quint  <graouts@apple.com>
    213
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm

    r245183 r245491  
    201201        _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAll;
    202202    _ignoresViewportScaleLimits = NO;
    203     _legacyEncryptedMediaAPIEnabled = NO;
    204203#else
    205204    _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeNone;
    206205    _mediaDataLoadsAutomatically = YES;
    207206    _userInterfaceDirectionPolicy = WKUserInterfaceDirectionPolicyContent;
     207#endif
    208208    _legacyEncryptedMediaAPIEnabled = YES;
    209 #endif
    210209    _mainContentUserGestureOverrideEnabled = NO;
    211210    _invisibleAutoplayNotPermitted = NO;
  • trunk/Tools/ChangeLog

    r245489 r245491  
     12019-05-17  Alex Christensen  <achristensen@webkit.org>
     2
     3        Enable legacy EME for iOS WKWebView
     4        https://bugs.webkit.org/show_bug.cgi?id=197964
     5        <rdar://problem/50625666>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:
     10        (TEST):
     11
    1122019-05-17  Aakash Jain  <aakash_jain@apple.com>
    213
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm

    r243320 r245491  
    8282    EXPECT_STREQ([configuration _groupIdentifier].UTF8String, [configuationCopy _groupIdentifier].UTF8String);
    8383}
     84
     85TEST(WebKit, DefaultConfigurationEME)
     86{
     87    auto configuration = adoptNS([WKWebViewConfiguration new]);
     88    EXPECT_TRUE([configuration _legacyEncryptedMediaAPIEnabled]);
     89    auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) configuration:configuration.get()]);
     90    [webView loadHTMLString:@"<html>hi</html>" baseURL:nil];
     91    __block bool done = false;
     92    [webView evaluateJavaScript:@"window.WebKitMediaKeys ? 'ENABLED' : 'DISABLED'" completionHandler:^(id result, NSError *){
     93        EXPECT_TRUE([result isEqualToString:@"ENABLED"]);
     94        done = true;
     95    }];
     96    TestWebKitAPI::Util::run(&done);
     97}
Note: See TracChangeset for help on using the changeset viewer.