Changeset 86107 in webkit
- Timestamp:
- May 9, 2011 4:50:28 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r85925 r86107 1 2011-05-09 Jeremy Noble <jer.noble@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash 6 https://bugs.webkit.org/show_bug.cgi?id=60496 7 8 When animating into and out of full screen, order out and back in the original webView window, 9 disabling animations when necessary. The exitFullscreen method was targeting the wrong window, 10 as the webView is hosted in the full screen window when we ask for it's parent window. 11 12 * WebView/WebFullScreenController.mm: 13 (-[WebFullScreenController windowDidEnterFullscreen:]): 14 (-[WebFullScreenController exitFullscreen]): 15 1 16 2011-05-04 Philippe Normand <pnormand@igalia.com> 2 17 -
trunk/Source/WebKit/mac/WebView/WebFullScreenController.mm
r85248 r86107 272 272 _placeholderView = [[NSView alloc] init]; 273 273 274 WebView *webView = [self webView]; 275 NSWindow *webWindow = [webView window]; 276 274 277 // Do not swap the placeholder into place if already is in a window, 275 278 // assuming the placeholder's window will always be the webView's 276 279 // original window. 277 280 if (![_placeholderView window]) { 278 WebView* webView = [self webView];279 281 [_placeholderView setFrame:[webView frame]]; 280 282 [_placeholderView setAutoresizingMask:[webView autoresizingMask]]; … … 286 288 [webView setFrame:[(NSView *)[[self window] contentView] bounds]]; 287 289 } 290 291 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 292 // In Lion, NSWindow will animate into and out of orderOut operations. Suppress that 293 // behavior here, making sure to reset the animation behavior afterward. 294 NSWindowAnimationBehavior animationBehavior = [webWindow animationBehavior]; 295 [webWindow setAnimationBehavior:NSWindowAnimationBehaviorNone]; 296 #endif 297 [webWindow orderOut:self]; 298 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 299 [webWindow setAnimationBehavior:animationBehavior]; 300 #endif 288 301 289 302 WebFullscreenWindow* window = [self _fullscreenWindow]; … … 503 516 NSDisableScreenUpdates(); 504 517 505 // The user may have moved the fullscreen window in Spaces, so temporarily change506 // the collectionBehavior of the webView's window:507 NSWindow* webWindow = [[self webView] window];508 NSWindowCollectionBehavior behavior = [webWindow collectionBehavior];509 [webWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];510 [webWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];511 [webWindow setCollectionBehavior:behavior];512 518 513 519 // The fullscreen animation may have been cancelled before the … … 523 529 [[_placeholderView superview] replaceSubview:_placeholderView with:webView]; 524 530 531 NSWindow *webWindow = [[self webView] window]; 532 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 533 // In Lion, NSWindow will animate into and out of orderOut operations. Suppress that 534 // behavior here, making sure to reset the animation behavior afterward. 535 NSWindowAnimationBehavior animationBehavior = [webWindow animationBehavior]; 536 [webWindow setAnimationBehavior:NSWindowAnimationBehaviorNone]; 537 #endif 538 // The user may have moved the fullscreen window in Spaces, so temporarily change 539 // the collectionBehavior of the fullscreen window: 540 NSWindowCollectionBehavior behavior = [webWindow collectionBehavior]; 541 [webWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces]; 542 [webWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]]; 543 [webWindow setCollectionBehavior:behavior]; 544 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 545 [webWindow setAnimationBehavior:animationBehavior]; 546 #endif 547 525 548 // Because the animation view is layer-hosted, make sure to 526 549 // disable animations when changing the layer's opacity. Other- -
trunk/Source/WebKit2/ChangeLog
r86103 r86107 1 2011-05-09 Jeremy Noble <jer.noble@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash 6 https://bugs.webkit.org/show_bug.cgi?id=60496 7 8 When animating into and out of full screen, order out and back in the original webView window, 9 disabling animations when necessary. The beganExitFullScreenAnimation method was targeting the wrong window, 10 as the webView is hosted in the full screen window when we ask for it's parent window. 11 12 * UIProcess/mac/WKFullScreenWindowController.mm: 13 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): 14 (-[WKFullScreenWindowController beganExitFullScreenAnimation]): 15 1 16 2011-05-09 Dan Bernstein <mitz@apple.com> 2 17 -
trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
r85036 r86107 252 252 [CATransaction commit]; 253 253 254 // FIXME: In Barolo, orderIn will animate, which is not what we want. Find a way 255 // to work around this behavior. 256 //[[_webViewPlaceholder.get() window] orderOut:self]; 254 NSWindow *webWindow = [_webViewPlaceholder.get() window]; 255 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 256 // In Lion, NSWindow will animate into and out of orderOut operations. Suppress that 257 // behavior here, making sure to reset the animation behavior afterward. 258 NSWindowAnimationBehavior animationBehavior = [webWindow animationBehavior]; 259 [webWindow setAnimationBehavior:NSWindowAnimationBehaviorNone]; 260 #endif 261 [webWindow orderOut:self]; 262 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 263 [webWindow setAnimationBehavior:animationBehavior]; 264 #endif 257 265 [[self window] makeKeyAndOrderFront:self]; 258 266 } … … 283 291 [self _updatePowerAssertions]; 284 292 285 // The user may have moved the fullScreen window in Spaces, so temporarily change286 // the collectionBehavior of the webView's window:287 NSWindow* webWindow = [[self webView] window];288 NSWindowCollectionBehavior behavior = [webWindow collectionBehavior];289 [webWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];290 [webWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]];291 [webWindow setCollectionBehavior:behavior];292 293 293 // Swap the webView back into its original position: 294 if ([_webView window] == [self window]) 294 if ([_webView window] == [self window]) { 295 295 [self _swapView:_webViewPlaceholder.get() with:_webView]; 296 NSWindow* webWindow = [_webView window]; 297 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 298 // In Lion, NSWindow will animate into and out of orderOut operations. Suppress that 299 // behavior here, making sure to reset the animation behavior afterward. 300 NSWindowAnimationBehavior animationBehavior = [webWindow animationBehavior]; 301 [webWindow setAnimationBehavior:NSWindowAnimationBehaviorNone]; 302 #endif 303 // The user may have moved the fullScreen window in Spaces, so temporarily change 304 // the collectionBehavior of the webView's window: 305 NSWindowCollectionBehavior behavior = [webWindow collectionBehavior]; 306 [webWindow setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces]; 307 [webWindow orderWindow:NSWindowBelow relativeTo:[[self window] windowNumber]]; 308 [webWindow setCollectionBehavior:behavior]; 309 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 310 [webWindow setAnimationBehavior:animationBehavior]; 311 #endif 312 } 296 313 297 314 [CATransaction begin];
Note: See TracChangeset
for help on using the changeset viewer.