Title: [183937] trunk/Source/WebKit2
- Revision
- 183937
- Author
- jer.no...@apple.com
- Date
- 2015-05-07 11:26:14 -0700 (Thu, 07 May 2015)
Log Message
[WK2][Fullscreen] Fullscreen video does not enter low-power mode.
https://bugs.webkit.org/show_bug.cgi?id=144744
Reviewed by Darin Adler.
One of the requirements of entering low-power compositing mode is that no masking layers
are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
transition animation completes, remove the mask layer entirely from our clipping layer.
This means it needs to be re-created and added when entering fullscreen, rather than just
at initialization time.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (183936 => 183937)
--- trunk/Source/WebKit2/ChangeLog 2015-05-07 18:24:31 UTC (rev 183936)
+++ trunk/Source/WebKit2/ChangeLog 2015-05-07 18:26:14 UTC (rev 183937)
@@ -1,3 +1,21 @@
+2015-05-07 Jer Noble <jer.no...@apple.com>
+
+ [WK2][Fullscreen] Fullscreen video does not enter low-power mode.
+ https://bugs.webkit.org/show_bug.cgi?id=144744
+
+ Reviewed by Darin Adler.
+
+ One of the requirements of entering low-power compositing mode is that no masking layers
+ are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
+ transition animation completes, remove the mask layer entirely from our clipping layer.
+ This means it needs to be re-created and added when entering fullscreen, rather than just
+ at initialization time.
+
+ * UIProcess/mac/WKFullScreenWindowController.mm:
+ (-[WKFullScreenWindowController initWithWindow:webView:]):
+ (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
+ (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
+
2015-05-07 Martin Robinson <mrobin...@igalia.com>
[GTK] All spell checking layout tests fail
Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (183936 => 183937)
--- trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2015-05-07 18:24:31 UTC (rev 183936)
+++ trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2015-05-07 18:26:14 UTC (rev 183937)
@@ -102,12 +102,6 @@
_clipView = adoptNS([[NSView alloc] initWithFrame:contentView.bounds]);
[_clipView setWantsLayer:YES];
[_clipView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
- CALayer *maskLayer = [CALayer layer];
- maskLayer.anchorPoint = CGPointZero;
- maskLayer.frame = NSRectToCGRect(contentView.bounds);
- maskLayer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
- maskLayer.autoresizingMask = (NSViewWidthSizable | NSViewHeightSizable);
- [_clipView layer].mask = maskLayer;
[contentView addSubview:_clipView.get()];
[self windowDidLoad];
@@ -300,7 +294,7 @@
NSView *contentView = [[self window] contentView];
[contentView.layer removeAllAnimations];
[[_clipView layer] removeAllAnimations];
- [[_clipView layer].mask removeAllAnimations];
+ [[_clipView layer] setMask:nil];
[_webViewPlaceholder setExitWarningVisible:YES];
[_webViewPlaceholder setTarget:self];
@@ -584,10 +578,17 @@
- (void)_startEnterFullScreenAnimationWithDuration:(NSTimeInterval)duration
{
+ NSView* contentView = [[self window] contentView];
+
[[_clipView layer] addAnimation:zoomAnimation(_initialFrame, _finalFrame, self.window.screen.frame, duration, AnimateIn) forKey:@"fullscreen"];
- [[_clipView layer].mask addAnimation:maskAnimation(_initialFrame, _finalFrame, self.window.screen.frame, duration, AnimateIn) forKey:@"fullscreen"];
+ CALayer *maskLayer = [CALayer layer];
+ maskLayer.anchorPoint = CGPointZero;
+ maskLayer.frame = NSRectToCGRect(contentView.bounds);
+ maskLayer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
+ maskLayer.autoresizingMask = (NSViewWidthSizable | NSViewHeightSizable);
+ [maskLayer addAnimation:maskAnimation(_initialFrame, _finalFrame, self.window.screen.frame, duration, AnimateIn) forKey:@"fullscreen"];
+ [_clipView layer].mask = maskLayer;
- NSView* contentView = [[self window] contentView];
contentView.layer.hidden = NO;
[contentView.layer addAnimation:fadeAnimation(duration, AnimateIn) forKey:@"fullscreen"];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes