Bug 142132

Summary: [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, jberlin, simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 142121    
Bug Blocks:    
Attachments:
Description Flags
Patch
thorton: review+
Patch for landing none

Description Jer Noble 2015-02-28 10:55:07 PST
[WK2][Mac] Use CALayer animations rather than NSWindow animations for the Fullscreen transition
Comment 1 Jer Noble 2015-02-28 11:28:17 PST
Created attachment 247605 [details]
Patch
Comment 2 Tim Horton 2015-03-02 12:02:40 PST
Comment on attachment 247605 [details]
Patch

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

> Source/WebKit2/ChangeLog:3
> +        [WK2][Mac] Use CALayer animations rather than NSWindow animations for the Fullscreen transition

The title is not great. Why not explain what you're fixing instead of how?

> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:97
> +    NSView* contentView = [window contentView];

star's on the wrong side.

> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:378
> +    NSView* contentView = [[self window] contentView];

star's on the wrong side

> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:441
>  - (NSArray *)customWindowsToEnterFullScreenForWindow:(NSWindow *)window

Do we still need this customWindowsToEnterFullScreenForWindow: mechanism at all?

> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:562
> +        fadeAnimation.toValue = (id)CGColorGetConstantColor(kCGColorBlack);

Could always use [NSColor blackColor] here (either way!).
Comment 3 Jer Noble 2015-03-02 14:09:14 PST
(In reply to comment #2)
> Comment on attachment 247605 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=247605&action=review
> 
> > Source/WebKit2/ChangeLog:3
> > +        [WK2][Mac] Use CALayer animations rather than NSWindow animations for the Fullscreen transition
> 
> The title is not great. Why not explain what you're fixing instead of how?

Sure thing; I'll update the title.

> > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:97
> > +    NSView* contentView = [window contentView];
> 
> star's on the wrong side.

Fixed.

> > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:378
> > +    NSView* contentView = [[self window] contentView];
> 
> star's on the wrong side

Ditto.

> > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:441
> >  - (NSArray *)customWindowsToEnterFullScreenForWindow:(NSWindow *)window
> 
> Do we still need this customWindowsToEnterFullScreenForWindow: mechanism at
> all?

Yes. You won't get the custom start callback unless you implement this delegate method.

> > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:562
> > +        fadeAnimation.toValue = (id)CGColorGetConstantColor(kCGColorBlack);
> 
> Could always use [NSColor blackColor] here (either way!).

Or! WebKit::cachedCGColor(WebKit::Color::black, WebKit::ColorSpaceDeviceRGB)!

(I'll just leave it as is.) :)
Comment 4 Jer Noble 2015-03-04 16:15:31 PST
Created attachment 247908 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2015-03-19 17:21:30 PDT
Comment on attachment 247908 [details]
Patch for landing

Clearing flags on attachment: 247908

Committed r181770: <http://trac.webkit.org/changeset/181770>
Comment 6 Jessie Berlin 2015-03-19 18:55:14 PDT
I attempted to fix the 32-bit build breakage in http://trac.webkit.org/changeset/181776
Comment 7 Jer Noble 2015-03-19 20:19:38 PDT
Thanks Jessie!