Bug 197476 - Hide MediaCapabilities.encodingInfo() when the platform does not support it.
Summary: Hide MediaCapabilities.encodingInfo() when the platform does not support it.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-01 14:04 PDT by Jer Noble
Modified: 2019-05-22 12:10 PDT (History)
4 users (show)

See Also:


Attachments
Patch (21.97 KB, patch)
2019-05-01 14:31 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.81 MB, application/zip)
2019-05-01 16:39 PDT, EWS Watchlist
no flags Details
Patch (31.38 KB, patch)
2019-05-13 16:00 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (31.38 KB, patch)
2019-05-21 09:10 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (31.34 KB, patch)
2019-05-22 11:29 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2019-05-01 14:04:52 PDT
Hide MediaCapabilities.encodingInfo() when the platform does not support it.
Comment 1 Jer Noble 2019-05-01 14:31:33 PDT
Created attachment 368712 [details]
Patch
Comment 2 EWS Watchlist 2019-05-01 14:34:08 PDT
Attachment 368712 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:77:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:82:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 2 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 EWS Watchlist 2019-05-01 16:39:10 PDT
Comment on attachment 368712 [details]
Patch

Attachment 368712 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12055054

New failing tests:
media/mediacapabilities/mediacapabilities-types.html
Comment 4 EWS Watchlist 2019-05-01 16:39:12 PDT
Created attachment 368733 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.14.4
Comment 5 Eric Carlson 2019-05-01 16:45:23 PDT
Comment on attachment 368712 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=368712&action=review

> Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:78
> +bool MediaEngineConfigurationFactory::hasDecodingConfigurationFactory()
> +{
> +    return mockEnabled() || WTF::anyOf(factories(), [] (auto& factory) { return factory.createDecodingConfiguration; });
> +}

This isn't used, should it be?
Comment 6 Jer Noble 2019-05-13 15:41:11 PDT
(In reply to Eric Carlson from comment #5)
> Comment on attachment 368712 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=368712&action=review
> 
> > Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:78
> > +bool MediaEngineConfigurationFactory::hasDecodingConfigurationFactory()
> > +{
> > +    return mockEnabled() || WTF::anyOf(factories(), [] (auto& factory) { return factory.createDecodingConfiguration; });
> > +}
> 
> This isn't used, should it be?

I guess it should be, just in case there's any port who wants to do encodingInfo() and not decodingInfo().
Comment 7 Jer Noble 2019-05-13 16:00:55 PDT
Created attachment 369798 [details]
Patch
Comment 8 EWS Watchlist 2019-05-13 16:04:02 PDT
Attachment 369798 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:77:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:82:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 2 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Eric Carlson 2019-05-14 05:41:44 PDT
Comment on attachment 369798 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369798&action=review

> LayoutTests/ChangeLog:13
> +        * platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added.
> +        * platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added.
> +        * platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.
> +        * platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added.
> +        * platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added.
> +        * platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.

Do we really need to add duplicate tests and results, couldn't you add one copy of each in media/mediacapabilities/ and skip the tests on platforms where they aren't supported (yet)?
Comment 10 Jer Noble 2019-05-14 08:52:44 PDT
(In reply to Eric Carlson from comment #9)
> Comment on attachment 369798 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=369798&action=review
> 
> > LayoutTests/ChangeLog:13
> > +        * platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added.
> > +        * platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added.
> > +        * platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.
> > +        * platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added.
> > +        * platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added.
> > +        * platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.
> 
> Do we really need to add duplicate tests and results, couldn't you add one
> copy of each in media/mediacapabilities/ and skip the tests on platforms
> where they aren't supported (yet)?

We really do; the outliers for the "types" tests are iOS and macOS ports, but the layout test results don't cascade together anywhere, so duplicate results are needed there. Same deal  with the "encodingInfo-undefined" tests; those are necessarily macOS and iOS-only tests.
Comment 11 WebKit Commit Bot 2019-05-15 13:36:57 PDT
Comment on attachment 369798 [details]
Patch

Rejecting attachment 369798 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 369798, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Logging in as commit-queue@webkit.org...
Fetching: https://bugs.webkit.org/attachment.cgi?id=369798&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=197476&ctype=xml&excludefield=attachmentdata
Processing 1 patch from 1 bug.
Processing patch 369798 from bug 197476.
Fetching: https://bugs.webkit.org/attachment.cgi?id=369798
Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Eric Carlson']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 16 diffs from patch file(s).
patching file Source/WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl
patching file Source/WebCore/WebCore.xcodeproj/project.pbxproj
Hunk #1 succeeded at 13431 (offset 2 lines).
Hunk #2 succeeded at 20618 (offset 2 lines).
patching file Source/WebCore/bindings/js/JSMediaCapabilitiesCustom.h
patching file Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Hunk #1 succeeded at 1710 (offset 1 line).
Hunk #2 succeeded at 3746 (offset 1 line).
patching file Source/WebCore/bindings/scripts/IDLAttributes.json
patching file Source/WebCore/bindings/scripts/preprocess-idls.pl
Hunk #1 FAILED at 283.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebCore/bindings/scripts/preprocess-idls.pl.rej
patching file Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp
patching file Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h
patching file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt
patching file LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html
patching file LayoutTests/platform/ios/media/mediacapabilities/mediacapabilities-types-expected.txt
patching file LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt
patching file LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html
patching file LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Eric Carlson']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: https://webkit-queues.webkit.org/results/12200461
Comment 12 Jon Lee 2019-05-20 10:34:49 PDT
rdar://problem/45180484
Comment 13 Jer Noble 2019-05-21 09:10:33 PDT
Created attachment 370319 [details]
Patch for landing
Comment 14 WebKit Commit Bot 2019-05-21 09:12:24 PDT
Comment on attachment 370319 [details]
Patch for landing

Rejecting attachment 370319 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 370319, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.

Full output: https://webkit-queues.webkit.org/results/12246946
Comment 15 Jon Lee 2019-05-21 15:16:58 PDT
Comment on attachment 370319 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=370319&action=review

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1714
> +        || $context->extendedAttributes->{CustomEnabled};

No bindings gen test?
Comment 16 Jer Noble 2019-05-22 11:29:30 PDT
Created attachment 370427 [details]
Patch for landing
Comment 17 WebKit Commit Bot 2019-05-22 12:10:11 PDT
Comment on attachment 370427 [details]
Patch for landing

Clearing flags on attachment: 370427

Committed r245636: <https://trac.webkit.org/changeset/245636>
Comment 18 WebKit Commit Bot 2019-05-22 12:10:13 PDT
All reviewed patches have been landed.  Closing bug.