Bug 143131 - Synchronize fullscreen animation between processes.
Summary: Synchronize fullscreen animation between processes.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Jeremy Jones
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-27 04:54 PDT by Jeremy Jones
Modified: 2015-04-07 10:20 PDT (History)
5 users (show)

See Also:


Attachments
Patch (13.40 KB, patch)
2015-03-27 05:19 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff
Patch (19.53 KB, patch)
2015-03-27 12:12 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff
Patch (19.49 KB, patch)
2015-03-27 14:59 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff
Patch (24.14 KB, patch)
2015-04-02 18:47 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 Jeremy Jones 2015-03-27 04:54:23 PDT
Synchronize fullscreen animation between processes.
Comment 1 Jeremy Jones 2015-03-27 05:19:54 PDT
Created attachment 249562 [details]
Patch
Comment 2 Jeremy Jones 2015-03-27 05:20:43 PDT
rdar://problem/19948096
Comment 3 Simon Fraser (smfr) 2015-03-27 08:46:03 PDT
Comment on attachment 249562 [details]
Patch

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

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:623
> +        id<CAAction> action = nil; // [self actionForKey:@"bounds"];

Please don't commit commented-out code. Reference a bug in a comment if you need to.

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:624
> +        if (action && action != [NSNull null]) {

Should this use -isEqual:?

> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:38
> +#import <BackBoardServices/BKSAnimationFence.h>
> +#import <BackBoardServices/BKSAnimationFence_Private.h>

This will break the public iOS build.

> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:40
> +#import <UIKit/UIWindow_Private.h>

Ditto.

> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:56
> +    : m_page(&page), m_lastFencePort(0)

Each initialization on its own line please.
Comment 4 Jer Noble 2015-03-27 08:54:08 PDT
Comment on attachment 249562 [details]
Patch

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

>> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:623
>> +        id<CAAction> action = nil; // [self actionForKey:@"bounds"];
> 
> Please don't commit commented-out code. Reference a bug in a comment if you need to.

This must have been inadvertent. It makes the following section meaningless.

>> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:624
>> +        if (action && action != [NSNull null]) {
> 
> Should this use -isEqual:?

It should probably just get reversed to:

if (!action || [action isKindOfClass:[NSNull class]])
    ...disableActions...
else {
    ...other stuff...
}

I'm curious, however, why the `action` doesn't seem to be used inside the following block:

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:626
> +            [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
> +            [CATransaction setAnimationDuration:0.4];

Shouldn't we be matching the timing function and duration with that of the action?
Comment 5 Jeremy Jones 2015-03-27 11:20:55 PDT
(In reply to comment #3)
> Comment on attachment 249562 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=249562&action=review
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:623
> > +        id<CAAction> action = nil; // [self actionForKey:@"bounds"];
> 
> Please don't commit commented-out code. Reference a bug in a comment if you
> need to.

Removed. Code, referenced radar.

> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:624
> > +        if (action && action != [NSNull null]) {
> 
> Should this use -isEqual:?

NSNull is a singleton, so this is valid, but I'll change it to -isEqual:

> 
> > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:38
> > +#import <BackBoardServices/BKSAnimationFence.h>
> > +#import <BackBoardServices/BKSAnimationFence_Private.h>
> 
> This will break the public iOS build.

Removed imports. Created BackBoardServiesSPI.h

> 
> > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:40
> > +#import <UIKit/UIWindow_Private.h>
> 
> Ditto.

Removed import. Added interfaces to UIKitSPI.h

> 
> > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:56
> > +    : m_page(&page), m_lastFencePort(0)
> 
> Each initialization on its own line please.

Moved to separate line.
Comment 6 Jeremy Jones 2015-03-27 11:30:45 PDT
(In reply to comment #4)
> Comment on attachment 249562 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=249562&action=review
> 
> >> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:623
> >> +        id<CAAction> action = nil; // [self actionForKey:@"bounds"];
> > 
> > Please don't commit commented-out code. Reference a bug in a comment if you need to.

Removed commented out code. Referenced a radar.

> 
> This must have been inadvertent. It makes the following section meaningless.

Intentional. I'll remove that code also and put it in the radar. The commented out code causes big UI problems. Still need to find a better way to do that.

> 
> >> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:624
> >> +        if (action && action != [NSNull null]) {
> > 
> > Should this use -isEqual:?

NSNull is a singleton, so it is valid, but I've changed it to -isEqual:

> 
> It should probably just get reversed to:
> 
> if (!action || [action isKindOfClass:[NSNull class]])
>     ...disableActions...
> else {
>     ...other stuff...
> }

Reversed.

> 
> I'm curious, however, why the `action` doesn't seem to be used inside the
> following block:
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:626
> > +            [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
> > +            [CATransaction setAnimationDuration:0.4];
> 
> Shouldn't we be matching the timing function and duration with that of the
> action?

That action is a private class from UIKit and doesn't lend itself to proper inspection. I'm still looking for a better way to do that.

I'll remove this code and move it to the radar.
Comment 7 Jeremy Jones 2015-03-27 12:12:36 PDT
Created attachment 249594 [details]
Patch
Comment 8 Jeremy Jones 2015-03-27 14:59:07 PDT
Created attachment 249610 [details]
Patch
Comment 9 Jer Noble 2015-04-02 18:47:39 PDT
Created attachment 250028 [details]
Patch
Comment 10 WebKit Commit Bot 2015-04-06 15:03:40 PDT
Comment on attachment 250028 [details]
Patch

Clearing flags on attachment: 250028

Committed r182439: <http://trac.webkit.org/changeset/182439>
Comment 11 WebKit Commit Bot 2015-04-06 15:03:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Jer Noble 2015-04-07 10:20:07 PDT
Follow up build fix committed.

Committed r182477: <http://trac.webkit.org/r182477>.