Bug 184188 - [Extra zoom mode] Replace video with a placeholder image during fullscreen transition
Summary: [Extra zoom mode] Replace video with a placeholder image during fullscreen tr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-30 11:32 PDT by Eric Carlson
Modified: 2018-04-05 21:06 PDT (History)
5 users (show)

See Also:


Attachments
Patch (35.02 KB, patch)
2018-03-30 11:52 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (35.72 KB, patch)
2018-03-30 13:03 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (35.70 KB, patch)
2018-03-30 13:24 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (36.56 KB, patch)
2018-04-01 22:26 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (36.02 KB, patch)
2018-04-02 04:33 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (36.04 KB, patch)
2018-04-02 06:32 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (35.50 KB, patch)
2018-04-02 13:20 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2018-03-30 11:32:29 PDT
Replace video with a placeholder image during fullscreen transition
Comment 1 Eric Carlson 2018-03-30 11:32:58 PDT
<rdar://problem/38940307>
Comment 2 Eric Carlson 2018-03-30 11:52:06 PDT
Created attachment 336876 [details]
Patch
Comment 3 EWS Watchlist 2018-03-30 11:53:47 PDT
Attachment 336876 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:266:  The parameter name "type" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 26 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Eric Carlson 2018-03-30 13:03:38 PDT
Created attachment 336882 [details]
Patch
Comment 5 EWS Watchlist 2018-03-30 13:06:43 PDT
Attachment 336882 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:266:  The parameter name "type" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Eric Carlson 2018-03-30 13:24:19 PDT
Created attachment 336885 [details]
Patch
Comment 7 EWS Watchlist 2018-03-30 13:25:45 PDT
Attachment 336885 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:266:  The parameter name "type" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 youenn fablet 2018-03-31 10:58:49 PDT
Comment on attachment 336885 [details]
Patch

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

> Source/WebCore/html/HTMLMediaElement.cpp:6028
> +    if (m_player)

Is there a case where m_player is nullified before exiting full screen?

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:265
> +    enum UpdateType { UpdateSynchronously, UpdateAsynchronously };

Can it be an enum class?

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:1175
>  void MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer(PlatformLayer* videoFullscreenLayer, WTF::Function<void()>&& completionHandler)

WTF:: is no longer needed.

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:1069
>  void MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer(PlatformLayer *videoFullscreenLayer, WTF::Function<void()>&& completionHandler)

Ditto here.

> Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:77
> +    [m_videoInlineLayer setContentsGravity:kCAGravityResizeAspect];

Not sure why this is needed now, maybe a comment in changelog?

> Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:91
> +        [m_videoInlineLayer setContents:(id)image.get()];

This is ObjC so if m_videoInlinLayer is null, would this line be a no op, in which case we can remove if(m_videoInlineLayer) ?

> Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:1112
> +    if (m_waitingForPreparedToExit) {

early return?

> Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:287
> +    WebThreadRun([protectedThis = makeRefPtr(this), this] () mutable {

makeRef(*this) is usually what we use.
Is it supposed to work in WK1?

> Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm:443
> +    dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), videoElement, contextId] {

makeRef(*this) maybe and WTFMove(videoElement) to reduce count churn.
Comment 9 Eric Carlson 2018-04-01 22:26:28 PDT
Created attachment 336971 [details]
Patch
Comment 10 EWS Watchlist 2018-04-01 22:27:24 PDT
Attachment 336971 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:266:  The parameter name "type" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 WebKit Commit Bot 2018-04-01 22:57:50 PDT
Comment on attachment 336971 [details]
Patch

Rejecting attachment 336971 [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-03', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
Kit/Source/WebKit/UIProcess/WebContextMenuListenerProxy.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/WebContextMenuListenerProxy.o

** BUILD FAILED **


The following build commands failed:
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/VideoFullscreenManager.o WebProcess/cocoa/VideoFullscreenManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Full output: http://webkit-queues.webkit.org/results/7172584
Comment 12 Eric Carlson 2018-04-02 04:33:02 PDT
Created attachment 336978 [details]
Patch
Comment 13 EWS Watchlist 2018-04-02 04:34:35 PDT
Attachment 336978 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:266:  The parameter name "type" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 WebKit Commit Bot 2018-04-02 05:03:53 PDT
Comment on attachment 336978 [details]
Patch

Rejecting attachment 336978 [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', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
/Data/EWS/WebKit/Source/WebKit/Shared/WebContextMenuItemData.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/WebContextMenuItemData.o

** BUILD FAILED **


The following build commands failed:
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/VideoFullscreenManager.o WebProcess/cocoa/VideoFullscreenManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Full output: http://webkit-queues.webkit.org/results/7174886
Comment 15 Eric Carlson 2018-04-02 06:32:52 PDT
Created attachment 336980 [details]
Patch
Comment 16 EWS Watchlist 2018-04-02 06:34:56 PDT
Attachment 336980 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:266:  The parameter name "type" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 17 WebKit Commit Bot 2018-04-02 07:03:13 PDT
Comment on attachment 336980 [details]
Patch

Rejecting attachment 336980 [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', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
/Data/EWS/WebKit/Source/WebKit/Shared/WebContextMenuItemData.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/WebContextMenuItemData.o

** BUILD FAILED **


The following build commands failed:
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/VideoFullscreenManager.o WebProcess/cocoa/VideoFullscreenManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Full output: http://webkit-queues.webkit.org/results/7175981
Comment 18 Eric Carlson 2018-04-02 13:20:56 PDT
Created attachment 337021 [details]
Patch
Comment 19 EWS Watchlist 2018-04-02 13:22:53 PDT
Attachment 337021 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:266:  The parameter name "type" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 20 WebKit Commit Bot 2018-04-02 17:50:34 PDT
Comment on attachment 337021 [details]
Patch

Clearing flags on attachment: 337021

Committed r230194: <https://trac.webkit.org/changeset/230194>
Comment 21 WebKit Commit Bot 2018-04-02 17:50:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 22 mitz 2018-04-05 21:02:47 PDT
This seems to have broken the !HAVE(AVFOUNDATION_VIDEO_OUTPUT) build.
Comment 23 mitz 2018-04-05 21:06:38 PDT
(In reply to mitz from comment #22)
> This seems to have broken the !HAVE(AVFOUNDATION_VIDEO_OUTPUT) build.

Bug 184309, already fixed.