Changeset 86186 in webkit
- Timestamp:
- May 10, 2011 3:43:29 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r86184 r86186 1 2011-05-09 Jeremy Noble <jer.noble@apple.com> 2 3 Reviewed by Darin Adler. 4 5 WebKit2: Cancelling full screen before animation completes leads to full screen window staying up. 6 https://bugs.webkit.org/show_bug.cgi?id=60531 7 8 Remove the (unused) _isAnimating ivar and replace it with two ivars: _isEnteringFullScreen and 9 _isExitingFullScreen. These will ensure each is only called once per full screen request, and 10 that if one exit/enter request interrupts another, that the required functions are called in 11 order. 12 13 * UIProcess/mac/WKFullScreenWindowController.h: 14 * UIProcess/mac/WKFullScreenWindowController.mm: 15 (-[WKFullScreenWindowController enterFullScreen:]): Removed _isAnimating. 16 (-[WKFullScreenWindowController exitFullScreen]): Ditto. 17 (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Gate on _isEnteringFullScreen. Check _isExitingFullScreen 18 and call [self finishedExitFullScreenAnimation:] if necessary. 19 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Gate on _isEnteringFullScreen. 20 (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Gate on _isExitingFullScreen. Check _isEnteringFullScreen 21 and call [self finishedEnterFullScreenAnimation:] if necessary. 22 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Gate on _isExitingFullScreen. 23 1 24 2011-05-10 Beth Dakin <bdakin@apple.com> 2 25 -
trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h
r80923 r86186 46 46 RetainPtr<NSView> _layerHostingView; 47 47 48 BOOL _isAnimating; 48 BOOL _isEnteringFullScreen; 49 BOOL _isExitingFullScreen; 49 50 BOOL _isFullScreen; 50 51 BOOL _isWindowLoaded; -
trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
r86107 r86186 177 177 178 178 _isFullScreen = YES; 179 _isAnimating = YES;180 179 181 180 NSDisableScreenUpdates(); … … 209 208 210 209 - (void)beganEnterFullScreenAnimation 211 { 210 { 211 if (_isEnteringFullScreen) 212 return; 213 _isEnteringFullScreen = YES; 214 215 if (_isExitingFullScreen) 216 [self finishedExitFullScreenAnimation:NO]; 217 212 218 [self _updateMenuAndDockForFullScreen]; 213 219 [self _updatePowerAssertions]; … … 229 235 230 236 NSEnableScreenUpdates(); 231 _isAnimating = YES;232 237 } 233 238 234 239 - (void)finishedEnterFullScreenAnimation:(bool)completed 235 240 { 241 if (!_isEnteringFullScreen) 242 return; 243 _isEnteringFullScreen = NO; 244 236 245 NSDisableScreenUpdates(); 237 246 … … 268 277 [self _manager]->didEnterFullScreen(); 269 278 NSEnableScreenUpdates(); 270 271 _isAnimating = NO;272 279 } 273 280 … … 278 285 279 286 _isFullScreen = NO; 280 _isAnimating = YES;281 287 282 288 NSDisableScreenUpdates(); … … 287 293 288 294 - (void)beganExitFullScreenAnimation 289 { 295 { 296 if (_isExitingFullScreen) 297 return; 298 _isExitingFullScreen = YES; 299 300 if (_isEnteringFullScreen) 301 [self finishedExitFullScreenAnimation:NO]; 302 290 303 [self _updateMenuAndDockForFullScreen]; 291 304 [self _updatePowerAssertions]; … … 318 331 319 332 NSEnableScreenUpdates(); 320 _isAnimating = YES;321 333 } 322 334 323 335 - (void)finishedExitFullScreenAnimation:(bool)completed 324 336 { 337 if (!_isExitingFullScreen) 338 return; 339 _isExitingFullScreen = NO; 340 325 341 NSDisableScreenUpdates(); 326 342 … … 335 351 336 352 [self _manager]->didExitFullScreen(); 337 NSEnableScreenUpdates(); 338 339 _isAnimating = NO; 353 NSEnableScreenUpdates(); 340 354 } 341 355
Note: See TracChangeset
for help on using the changeset viewer.