WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
181064
Add initial DOM support for Media Capabilities
https://bugs.webkit.org/show_bug.cgi?id=181064
Summary
Add initial DOM support for Media Capabilities
Jer Noble
Reported
2017-12-20 16:25:51 PST
Add initial DOM support for Media Capabilities
Attachments
Patch
(95.15 KB, patch)
2017-12-20 16:32 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-elcapitan
(2.26 MB, application/zip)
2017-12-20 17:31 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
(2.55 MB, application/zip)
2017-12-20 17:49 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews114 for mac-elcapitan
(2.90 MB, application/zip)
2017-12-20 18:05 PST
,
EWS Watchlist
no flags
Details
Patch
(97.24 KB, patch)
2017-12-20 21:13 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(103.41 KB, patch)
2017-12-20 22:18 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(103.77 KB, patch)
2017-12-20 22:46 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-elcapitan
(2.15 MB, application/zip)
2017-12-20 23:53 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(2.54 MB, application/zip)
2017-12-21 00:06 PST
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews112 for mac-elcapitan
(3.00 MB, application/zip)
2017-12-21 00:16 PST
,
EWS Watchlist
no flags
Details
Patch
(108.36 KB, patch)
2017-12-21 08:31 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Show Obsolete
(10)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2017-12-20 16:32:39 PST
Created
attachment 329964
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2017-12-20 16:34:10 PST
<
rdar://problem/36167620
>
EWS Watchlist
Comment 3
2017-12-20 16:36:44 PST
Attachment 329964
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:31: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:32: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 2 in 48 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 4
2017-12-20 17:31:54 PST
Comment hidden (obsolete)
Comment on
attachment 329964
[details]
Patch
Attachment 329964
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/5782205
New failing tests: fast/dom/navigator-detached-no-crash.html
EWS Watchlist
Comment 5
2017-12-20 17:31:55 PST
Comment hidden (obsolete)
Created
attachment 329974
[details]
Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 6
2017-12-20 17:49:37 PST
Comment hidden (obsolete)
Comment on
attachment 329964
[details]
Patch
Attachment 329964
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/5782337
New failing tests: fast/dom/navigator-detached-no-crash.html
EWS Watchlist
Comment 7
2017-12-20 17:49:38 PST
Comment hidden (obsolete)
Created
attachment 329981
[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 8
2017-12-20 18:05:38 PST
Comment hidden (obsolete)
Comment on
attachment 329964
[details]
Patch
Attachment 329964
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/5782355
New failing tests: fast/dom/navigator-detached-no-crash.html
EWS Watchlist
Comment 9
2017-12-20 18:05:44 PST
Comment hidden (obsolete)
Created
attachment 329983
[details]
Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Eric Carlson
Comment 10
2017-12-20 20:47:35 PST
Comment on
attachment 329964
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329964&action=review
> Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp:66 > + // value describing a single media codec. Otherwise, it eMUST contain no parameters.
Nit: "eMUST"
> Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp:97 > + // 1. If configurationâs contentType is not a valid video MIME type, return false and abort these steps.
Nit: might as well cite the spec here as you did in isValidVideoConfiguration
> Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp:136 > + > + m_taskQueue.enqueueTask([configuration = WTFMove(configuration), promise = WTFMove(promise)] () mutable {
// 4. Let p be a new promise. // 5. In parallel, run the create a MediaCapabilitiesInfo algorithm with configuration and resolve p with its result. // 6. Return p.
> Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp:144 > +{ > + if (!isValidMediaConfiguration(configuration)) {
Citation and steps as in decodingInfo?
> Source/WebKit/UIProcess/API/C/WKPreferences.cpp:1942 > + > +void WKPreferencesSetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef, bool enabled) > +{ > + toImpl(preferencesRef)->setMediaCapabilitiesEnabled(enabled); > +} > + > +bool WKPreferencesGetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef) > +{ > + return toImpl(preferencesRef)->mediaCapabilitiesEnabled(); > +} > +
Do we really need to add this to the C API?
> Source/WebKit/UIProcess/API/C/WKPreferencesRef.h:308 > +WK_EXPORT bool WKPreferencesGetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef); > +WK_EXPORT void WKPreferencesSetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef, bool enabled);
Ditto.
> Source/WebKitLegacy/mac/WebView/WebPreferences.mm:684 > + @NO, WebKitMediaCapabilitiesEnabledPreferenceKey,
Do we really need to add this to WK1? If this is just for testing, you can add a function to InternalSettings to set the runtime flag (eg. InternalSettings::setScreenCaptureEnabled).
Jer Noble
Comment 11
2017-12-20 21:13:25 PST
Created
attachment 330003
[details]
Patch
EWS Watchlist
Comment 12
2017-12-20 21:16:20 PST
Attachment 330003
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:31: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:32: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 2 in 50 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jer Noble
Comment 13
2017-12-20 21:41:03 PST
(In reply to Eric Carlson from
comment #10
)
> Comment on
attachment 329964
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=329964&action=review
> > > Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp:66 > > + // value describing a single media codec. Otherwise, it eMUST contain no parameters. > > Nit: "eMUST"
Fixed;
> > Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp:97 > > + // 1. If configurationâs contentType is not a valid video MIME type, return false and abort these steps. > > Nit: might as well cite the spec here as you did in isValidVideoConfiguration
Ok.
> > Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp:136 > > + > > + m_taskQueue.enqueueTask([configuration = WTFMove(configuration), promise = WTFMove(promise)] () mutable { > > // 4. Let p be a new promise. > // 5. In parallel, run the create a MediaCapabilitiesInfo algorithm with > configuration and resolve p with its result. > // 6. Return p.
Ok.
> > Source/WebCore/Modules/mediacapabilities/MediaCapabilities.cpp:144 > > +{ > > + if (!isValidMediaConfiguration(configuration)) { > > Citation and steps as in decodingInfo?
Added.
> > Source/WebKit/UIProcess/API/C/WKPreferences.cpp:1942 > > + > > +void WKPreferencesSetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef, bool enabled) > > +{ > > + toImpl(preferencesRef)->setMediaCapabilitiesEnabled(enabled); > > +} > > + > > +bool WKPreferencesGetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef) > > +{ > > + return toImpl(preferencesRef)->mediaCapabilitiesEnabled(); > > +} > > + > > Do we really need to add this to the C API?
Yep. Because, amazingly, WebKitTestRunner still uses the C preferences API. :(
> > Source/WebKit/UIProcess/API/C/WKPreferencesRef.h:308 > > +WK_EXPORT bool WKPreferencesGetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef); > > +WK_EXPORT void WKPreferencesSetMediaCapabilitiesEnabled(WKPreferencesRef preferencesRef, bool enabled); > > Ditto. > > > Source/WebKitLegacy/mac/WebView/WebPreferences.mm:684 > > + @NO, WebKitMediaCapabilitiesEnabledPreferenceKey, > > Do we really need to add this to WK1? If this is just for testing, you can > add a function to InternalSettings to set the runtime flag (eg. > InternalSettings::setScreenCaptureEnabled).
I guess we could, but that's not how any of the other preferences work. Adding it only to InternalSettings would mean we'd have to enable it for individual tests in the test itself. This API will eventually be enabled by default (on Cocoa ports, at least), so adding "internal" enable doesn't seem correct here.
Jer Noble
Comment 14
2017-12-20 22:18:48 PST
Created
attachment 330008
[details]
Patch
EWS Watchlist
Comment 15
2017-12-20 22:20:47 PST
Attachment 330008
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:31: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:32: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 2 in 50 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jer Noble
Comment 16
2017-12-20 22:46:55 PST
Created
attachment 330011
[details]
Patch
EWS Watchlist
Comment 17
2017-12-20 22:48:58 PST
Attachment 330011
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:31: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:32: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 2 in 50 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 18
2017-12-20 23:53:47 PST
Comment hidden (obsolete)
Comment on
attachment 330011
[details]
Patch
Attachment 330011
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/5786178
New failing tests: fast/dom/navigator-detached-no-crash.html
EWS Watchlist
Comment 19
2017-12-20 23:53:48 PST
Comment hidden (obsolete)
Created
attachment 330013
[details]
Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 20
2017-12-21 00:06:19 PST
Comment hidden (obsolete)
Comment on
attachment 330011
[details]
Patch
Attachment 330011
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/5786200
New failing tests: fast/dom/navigator-detached-no-crash.html
EWS Watchlist
Comment 21
2017-12-21 00:06:20 PST
Comment hidden (obsolete)
Created
attachment 330014
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
EWS Watchlist
Comment 22
2017-12-21 00:16:29 PST
Comment hidden (obsolete)
Comment on
attachment 330011
[details]
Patch
Attachment 330011
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/5786191
New failing tests: fast/dom/navigator-detached-no-crash.html
EWS Watchlist
Comment 23
2017-12-21 00:16:31 PST
Comment hidden (obsolete)
Created
attachment 330016
[details]
Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Jer Noble
Comment 24
2017-12-21 08:31:50 PST
Created
attachment 330031
[details]
Patch
EWS Watchlist
Comment 25
2017-12-21 08:34:29 PST
Attachment 330031
[details]
did not pass style-queue: ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:31: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediacapabilities/ScreenColorGamut.h:32: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 2 in 55 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 26
2017-12-21 10:28:27 PST
Comment on
attachment 330031
[details]
Patch Clearing flags on attachment: 330031 Committed
r226228
: <
https://trac.webkit.org/changeset/226228
>
WebKit Commit Bot
Comment 27
2017-12-21 10:28:29 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug