Changeset 282137 in webkit


Ignore:
Timestamp:
Sep 8, 2021 4:01:18 AM (11 months ago)
Author:
Jean-Yves Avenard
Message:

Safari TP 131 audio canPlayType() reports false negatives
https://bugs.webkit.org/show_bug.cgi?id=229799
rdar://problem/82776747

Reviewed by Youenn Fablet.

Source/WebCore:

webaudio now supports the same webm content as the video and audio element,
making this workaround no longer necessary.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canPlayType const): Remove work around

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::webMParserEnabled const): Remove now unused method.

Source/WebKit:

  • Shared/WebPreferencesDefaultValues.cpp:
  • Shared/WebPreferencesDefaultValues.h: Remove no longer used method.

Source/WebKitLegacy/mac:

  • WebView/WebPreferencesDefaultValues.h:
  • WebView/WebPreferencesDefaultValues.mm: Remove no longer used method.

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Remove preference.
Location:
trunk/Source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r282130 r282137  
     12021-09-08  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Safari TP 131 audio canPlayType() reports false negatives
     4        https://bugs.webkit.org/show_bug.cgi?id=229799
     5        rdar://problem/82776747
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * Scripts/Preferences/WebPreferencesExperimental.yaml: Remove preference.
     10
    1112021-09-07  Sihui Liu  <sihui_liu@apple.com>
    212
  • trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml

    r282130 r282137  
    13671367      default: WebKit::defaultWebMParserEnabled()
    13681368
    1369 WebMWebAudioEnabled:
    1370   type: bool
    1371   webcoreBinding: RuntimeEnabledFeatures
    1372   humanReadableName: "WebM Web Audio"
    1373   humanReadableDescription: "Enable WebM Web Audio"
    1374   condition: ENABLE(MEDIA_SOURCE)
    1375   defaultValue:
    1376     WebKitLegacy:
    1377       default: WebKit::defaultWebMWebAudioEnabled()
    1378     WebKit:
    1379       default: WebKit::defaultWebMWebAudioEnabled()
    1380 
    13811369# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
    13821370WebRTCH264LowLatencyEncoderEnabled:
  • trunk/Source/WebCore/ChangeLog

    r282136 r282137  
     12021-09-08  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Safari TP 131 audio canPlayType() reports false negatives
     4        https://bugs.webkit.org/show_bug.cgi?id=229799
     5        rdar://problem/82776747
     6
     7        Reviewed by Youenn Fablet.
     8
     9        webaudio now supports the same webm content as the video and audio element,
     10        making this workaround no longer necessary.
     11
     12        * html/HTMLMediaElement.cpp:
     13        (WebCore::HTMLMediaElement::canPlayType const): Remove work around
     14        * page/RuntimeEnabledFeatures.h:
     15        (WebCore::RuntimeEnabledFeatures::webMParserEnabled const): Remove now unused method.
     16
    1172021-09-08  Kimmo Kinnunen  <kkinnunen@apple.com>
    218
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r282059 r282137  
    10621062}
    10631063
    1064 static inline bool webMWebAudioEnabled()
    1065 {
    1066 #if ENABLE(MEDIA_SOURCE)
    1067     return RuntimeEnabledFeatures::sharedFeatures().webMWebAudioEnabled();
    1068 #else
    1069     return false;
    1070 #endif
    1071 }
    1072 
    10731064String HTMLMediaElement::canPlayType(const String& mimeType) const
    10741065{
     
    10791070    MediaPlayer::SupportsType support = MediaPlayer::supportsType(parameters);
    10801071    String canPlay;
    1081 
    1082 #if PLATFORM(COCOA)
    1083     // Temporarily work around bug 226922. For now claim that the opus and vorbis codecs aren't supported
    1084     // so that sites relying on this test to determine if webaudio use of opus or vorbis won't error.
    1085     auto codecs = contentType.codecs();
    1086     if (support == MediaPlayer::SupportsType::IsSupported && ((codecs.contains("opus") || codecs.contains("vorbis")) && !webMWebAudioEnabled()))
    1087         support = MediaPlayer::SupportsType::IsNotSupported;
    1088 #endif
    10891072
    10901073    // 4.8.10.3
  • trunk/Source/WebCore/page/RuntimeEnabledFeatures.h

    r280930 r282137  
    236236    void setWebMParserEnabled(bool isEnabled) { m_webMParserEnabled = isEnabled; }
    237237    bool webMParserEnabled() const { return m_webMParserEnabled; }
    238     void setWebMWebAudioEnabled(bool isEnabled) { m_webMWebAudioEnabled = isEnabled; }
    239     bool webMWebAudioEnabled() const { return m_webMWebAudioEnabled; }
    240238#endif
    241239
     
    378376#if ENABLE(MEDIA_SOURCE)
    379377    bool m_webMParserEnabled { false };
    380     bool m_webMWebAudioEnabled { false };
    381378#endif
    382379
  • trunk/Source/WebKit/ChangeLog

    r282130 r282137  
     12021-09-08  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Safari TP 131 audio canPlayType() reports false negatives
     4        https://bugs.webkit.org/show_bug.cgi?id=229799
     5        rdar://problem/82776747
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * Shared/WebPreferencesDefaultValues.cpp:
     10        * Shared/WebPreferencesDefaultValues.h: Remove no longer used method.
     11
    1122021-09-07  Sihui Liu  <sihui_liu@apple.com>
    213
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp

    r281201 r282137  
    315315}
    316316
    317 bool defaultWebMWebAudioEnabled()
    318 {
    319     return isFeatureFlagEnabled("webm_webaudio", false);
    320 }
    321 
    322317#endif // ENABLE(MEDIA_SOURCE)
    323318
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h

    r280957 r282137  
    104104#if ENABLE(MEDIA_SOURCE)
    105105bool defaultWebMParserEnabled();
    106 bool defaultWebMWebAudioEnabled();
    107106#endif
    108107
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r282130 r282137  
     12021-09-08  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Safari TP 131 audio canPlayType() reports false negatives
     4        https://bugs.webkit.org/show_bug.cgi?id=229799
     5        rdar://problem/82776747
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * WebView/WebPreferencesDefaultValues.h:
     10        * WebView/WebPreferencesDefaultValues.mm: Remove no longer used method.
     11
    1122021-09-07  Sihui Liu  <sihui_liu@apple.com>
    213
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h

    r280957 r282137  
    8484#if ENABLE(MEDIA_SOURCE)
    8585bool defaultWebMParserEnabled();
    86 bool defaultWebMWebAudioEnabled();
    8786#endif
    8887
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm

    r280961 r282137  
    283283}
    284284
    285 bool defaultWebMWebAudioEnabled()
    286 {
    287     return isFeatureFlagEnabled("webm_webaudio", false);
    288 }
    289 
    290285#endif // ENABLE(MEDIA_SOURCE)
    291286
Note: See TracChangeset for help on using the changeset viewer.