Changeset 185726 in webkit
- Timestamp:
- Jun 18, 2015, 4:38:55 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (modified) (2 diffs)
-
WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r185722 r185726 1 2015-06-18 Jeremy Jones <jeremyj@apple.com> 2 3 Fix crash when entering fullscreen during exit fullscreen animation. 4 https://bugs.webkit.org/show_bug.cgi?id=146117 5 6 Reviewed by Simon Fraser. 7 8 Because enterFullscreen can be called during exitFullscreen animation, the exit fullscreen teardown 9 should not imply a fullscreen state change on video element. 10 11 * platform/ios/WebVideoFullscreenControllerAVKit.mm: 12 (WebVideoFullscreenControllerContext::exitFullscreen): May be called from mainThread 13 (-[WebVideoFullscreenController exitFullscreen]): May be called from mainThread 14 * platform/ios/WebVideoFullscreenModelVideoElement.mm: 15 (WebVideoFullscreenModelVideoElement::setVideoElement): 16 Changing associated video element does not imply fullscreen mode change. 17 1 18 2015-06-18 Brian J. Burg <burg@cs.washington.edu> 2 19 -
trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
r184922 r185726 530 530 void WebVideoFullscreenControllerContext::exitFullscreen() 531 531 { 532 ASSERT(WebThreadIsCurrent() );532 ASSERT(WebThreadIsCurrent() || isMainThread()); 533 533 IntRect screenRect = m_videoElement->screenRect(); 534 534 RefPtr<WebVideoFullscreenControllerContext> strongThis(this); … … 578 578 - (void)exitFullscreen 579 579 { 580 ASSERT(WebThreadIsCurrent() );580 ASSERT(WebThreadIsCurrent() || isMainThread()); 581 581 _context->exitFullscreen(); 582 582 } -
trunk/Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm
r184922 r185726 83 83 m_videoFullscreenInterface->resetMediaState(); 84 84 85 if (m_videoElement && m_videoElement->fullscreenMode())86 m_videoElement->fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenModeNone);87 88 85 if (m_videoElement && m_videoElement->videoFullscreenLayer()) 89 86 m_videoElement->setVideoFullscreenLayer(nullptr); -
trunk/Source/WebKit2/ChangeLog
r185721 r185726 1 2015-06-18 Jeremy Jones <jeremyj@apple.com> 2 3 Fix crash when entering fullscreen during exit fullscreen animation. 4 https://bugs.webkit.org/show_bug.cgi?id=146117 5 6 Reviewed by Simon Fraser. 7 8 A partial teardown left the LayerHostingContext in a bad state when attempting to reuse the model and interface 9 objects. Instead, complete the teardown and don't reuse the objects. 10 11 * WebProcess/ios/WebVideoFullscreenManager.mm: 12 (WebKit::WebVideoFullscreenManager::didEnterFullscreen): WebThreadRun is a no-op in WK2. Use dispatch_async. 13 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Do complete teardown before entering fullscreen again. 14 1 15 2015-06-18 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm
r184670 r185726 450 450 // exit fullscreen now if it was previously requested during an animation. 451 451 RefPtr<WebVideoFullscreenManager> strongThis(this); 452 WebThreadRun([strongThis, videoElement] {452 dispatch_async(dispatch_get_main_queue(), [strongThis, videoElement] { 453 453 strongThis->exitVideoFullscreenForVideoElement(*videoElement); 454 454 }); … … 483 483 interface->setIsFullscreen(false); 484 484 HTMLMediaElementEnums::VideoFullscreenMode mode = interface->fullscreenMode(); 485 bool targetIsFullscreen = interface->targetIsFullscreen(); 485 486 486 487 model->setVideoFullscreenLayer(nil); 487 488 RefPtr<HTMLVideoElement> videoElement = model->videoElement(); 488 489 489 if (!interface->targetIsFullscreen()) { 490 model->setVideoElement(nullptr); 491 model->setWebVideoFullscreenInterface(nullptr); 492 interface->invalidate(); 493 m_videoElements.remove(videoElement.get()); 494 m_contextMap.remove(contextId); 490 model->setVideoElement(nullptr); 491 model->setWebVideoFullscreenInterface(nullptr); 492 interface->invalidate(); 493 m_videoElements.remove(videoElement.get()); 494 m_contextMap.remove(contextId); 495 496 if (!videoElement || !targetIsFullscreen) 495 497 return; 496 } 497 498 if (!videoElement) 499 return; 500 501 // exit fullscreen now if it was previously requested during an animation. 498 502 499 RefPtr<WebVideoFullscreenManager> strongThis(this); 503 WebThreadRun([strongThis, videoElement, mode] {500 dispatch_async(dispatch_get_main_queue(), [strongThis, videoElement, mode] { 504 501 strongThis->enterVideoFullscreenForVideoElement(*videoElement, mode); 505 502 });
Note:
See TracChangeset
for help on using the changeset viewer.