Changeset 259531 in webkit
- Timestamp:
- Apr 4, 2020 10:06:23 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r259516 r259531 1 2020-04-04 Peng Liu <peng.liu6@apple.com> 2 3 REGRESSION (r259095): ASSERTION FAILED: m_videoFullscreenMode != VideoFullscreenModeNone seen with TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS 4 https://bugs.webkit.org/show_bug.cgi?id=209680 5 6 Reviewed by Jer Noble. 7 8 Remove the crashing expectation for media/media-fullscreen-return-to-inline.html 9 10 * platform/mac/TestExpectations: 11 1 12 2020-04-03 Truitt Savell <tsavell@apple.com> 2 13 -
trunk/LayoutTests/platform/mac/TestExpectations
r259480 r259531 1652 1652 webkit.org/b/195466 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/error-codes/error.html [ Pass Failure ] 1653 1653 1654 webkit.org/b/193399 media/media-fullscreen-return-to-inline.html [ Pass Timeout Crash]1654 webkit.org/b/193399 media/media-fullscreen-return-to-inline.html [ Pass Timeout ] 1655 1655 1656 1656 http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers.html [ Pass Failure ] -
trunk/Source/WebCore/ChangeLog
r259527 r259531 1 2020-04-04 Peng Liu <peng.liu6@apple.com> 2 3 REGRESSION (r259095): ASSERTION FAILED: m_videoFullscreenMode != VideoFullscreenModeNone seen with TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS 4 https://bugs.webkit.org/show_bug.cgi?id=209680 5 6 Reviewed by Jer Noble. 7 8 API test: WebKitLegacy.PreemptVideoFullscreen 9 10 Call fullscreenModeChanged(VideoFullscreenModeNone) right before calling the 11 functions of ChromeClient to make sure the state (m_videoFullscreenMode) 12 has the expected value when some callbacks come back to the video element. 13 14 * html/HTMLMediaElement.cpp: 15 (WebCore::HTMLMediaElement::dispatchEvent): 16 (WebCore::HTMLMediaElement::exitFullscreen): 17 18 Add null pointer checkings to fix two crashes found in stress tests. 19 * platform/ios/WebVideoFullscreenControllerAVKit.mm: 20 (VideoFullscreenControllerContext::requestVideoContentLayer): 21 (VideoFullscreenControllerContext::returnVideoContentLayer): 22 1 23 2020-04-03 David Kilzer <ddkilzer@apple.com> 2 24 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r259435 r259531 5817 5817 // to change the position/size back *before* exiting fullscreen. 5818 5818 // Otherwise, the exit fullscreen animation will be incorrect. 5819 if (!m_videoFullscreenStandby && event.type() == eventNames().webkitendfullscreenEvent) 5819 if (!m_videoFullscreenStandby && event.type() == eventNames().webkitendfullscreenEvent) { 5820 fullscreenModeChanged(VideoFullscreenModeNone); 5820 5821 document().page()->chrome().client().exitVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this)); 5822 } 5821 5823 } 5822 5824 … … 6057 6059 6058 6060 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE) 6059 if (document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped()) 6061 if (document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped()) { 6062 fullscreenModeChanged(VideoFullscreenModeNone); 6060 6063 document().page()->chrome().client().exitVideoFullscreenToModeWithoutAnimation(downcast<HTMLVideoElement>(*this), VideoFullscreenModeNone); 6064 } 6061 6065 else 6062 6066 #endif 6063 6067 if (document().page()->chrome().client().supportsVideoFullscreen(oldVideoFullscreenMode)) { 6064 if (m_videoFullscreenStandby) 6068 if (m_videoFullscreenStandby) { 6069 fullscreenModeChanged(VideoFullscreenModeNone); 6065 6070 document().page()->chrome().client().enterVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this), m_videoFullscreenMode, m_videoFullscreenStandby); 6071 } 6066 6072 6067 6073 scheduleEvent(eventNames().webkitendfullscreenEvent); -
trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
r254490 r259531 261 261 m_fullscreenModel->setVideoFullscreenLayer(videoFullscreenLayer.get(), [protectedThis = WTFMove(protectedThis), this] () mutable { 262 262 dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] { 263 if (!m_interface) 264 return; 265 263 266 m_interface->setHasVideoContentLayer(true); 264 267 }); … … 278 281 m_fullscreenModel->setVideoFullscreenLayer(nil, [protectedThis = WTFMove(protectedThis), this] () mutable { 279 282 dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] { 283 if (!m_interface) 284 return; 285 280 286 m_interface->setHasVideoContentLayer(false); 281 287 }); -
trunk/Source/WebKitLegacy/mac/ChangeLog
r259523 r259531 1 2020-04-04 Peng Liu <peng.liu6@apple.com> 2 3 REGRESSION (r259095): ASSERTION FAILED: m_videoFullscreenMode != VideoFullscreenModeNone seen with TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS 4 https://bugs.webkit.org/show_bug.cgi?id=209680 5 6 Reviewed by Jer Noble. 7 8 With this patch, the WebKit-Legacy can support multiple video elements request 9 to enter video fullscreen almost at the same time, and only the last one will succeed. 10 Also, this patch fixes webkit.org/b/209610 for WebKit-Legacy. 11 12 * WebView/WebView.mm: 13 * WebView/WebViewData.h: 14 1 15 2020-04-03 Alex Christensen <achristensen@webkit.org> 2 16 -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r259523 r259531 9337 9337 // First exit Fullscreen for the old videoElement. 9338 9338 [_private->fullscreenController videoElement]->exitFullscreen(); 9339 // This previous call has to trigger _exitFullscreen, 9340 // which has to clear _private->fullscreenController. 9341 ASSERT(!_private->fullscreenController); 9342 } 9339 _private->fullscreenControllersExiting.append(std::exchange(_private->fullscreenController, nil)); 9340 } 9341 9343 9342 if (!_private->fullscreenController) { 9344 _private->fullscreenController = [[WebVideoFullscreenController alloc] init];9343 _private->fullscreenController = adoptNS([[WebVideoFullscreenController alloc] init]); 9345 9344 [_private->fullscreenController setVideoElement:videoElement]; 9346 9345 #if PLATFORM(IOS_FAMILY) … … 9356 9355 - (void)_exitVideoFullscreen 9357 9356 { 9358 if (!_private->fullscreenController) 9359 return; 9360 [_private->fullscreenController exitFullscreen]; 9361 [_private->fullscreenController release]; 9357 if (!_private->fullscreenController && _private->fullscreenControllersExiting.isEmpty()) 9358 return; 9359 9360 if (!_private->fullscreenControllersExiting.isEmpty()) { 9361 auto controller = _private->fullscreenControllersExiting.first(); 9362 _private->fullscreenControllersExiting.remove(0); 9363 9364 [controller exitFullscreen]; 9365 return; 9366 } 9367 9368 auto fullscreenController = _private->fullscreenController; 9362 9369 _private->fullscreenController = nil; 9370 9371 [fullscreenController exitFullscreen]; 9363 9372 } 9364 9373 -
trunk/Source/WebKitLegacy/mac/WebView/WebViewData.h
r256834 r259531 317 317 RetainPtr<NSImage> _mainFrameIcon; 318 318 #endif 319 319 320 320 NSSize lastLayoutSize; 321 321 322 322 #if ENABLE(VIDEO) 323 WebVideoFullscreenController *fullscreenController; 323 RetainPtr<WebVideoFullscreenController> fullscreenController; 324 Vector<RetainPtr<WebVideoFullscreenController>> fullscreenControllersExiting; 324 325 #endif 325 326 -
trunk/Tools/ChangeLog
r259523 r259531 1 2020-04-04 Peng Liu <peng.liu6@apple.com> 2 3 REGRESSION (r259095): ASSERTION FAILED: m_videoFullscreenMode != VideoFullscreenModeNone seen with TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS 4 https://bugs.webkit.org/show_bug.cgi?id=209680 5 6 Reviewed by Jer Noble. 7 8 Add an API test for the video fullscreen support of WebKitLegacy on iOS. 9 10 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 11 * TestWebKitAPI/Tests/WebKitLegacy/ios/PreemptVideoFullscreen.mm: Added. 12 (-[VideoFullscreenStressUIWebViewDelegate webViewDidFinishLoad:]): 13 (-[VideoFullscreenStressUIWebViewDelegate uiWebView:didCommitLoadForFrame:]): 14 (-[VideoFullscreenStressUIWebViewDelegate handleEvent:]): 15 (TestWebKitAPI::TEST): 16 * TestWebKitAPI/Tests/WebKitLegacy/ios/two-videos.html: Added. 17 1 18 2020-04-03 Alex Christensen <achristensen@webkit.org> 2 19 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r259461 r259531 114 114 1CF59AE321E68932006E37EC /* ForceLightAppearanceInBundle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CF59ADF21E68925006E37EC /* ForceLightAppearanceInBundle.mm */; }; 115 115 1CF59AE521E6977D006E37EC /* dark-mode.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1CF59AE421E696FB006E37EC /* dark-mode.html */; }; 116 1D67BFDC2433E0A7006B5047 /* PreemptVideoFullscreen.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1D67BFDB2433E0A7006B5047 /* PreemptVideoFullscreen.mm */; }; 117 1D67BFDD2433EE66006B5047 /* two-videos.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1D67BFD92433DFD8006B5047 /* two-videos.html */; }; 116 118 1F83571B1D3FFB2300E3967B /* WKBackForwardList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F83571A1D3FFB0E00E3967B /* WKBackForwardList.mm */; }; 117 119 26DF5A6315A2A27E003689C2 /* CancelLoadFromResourceLoadDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 26DF5A6115A2A22B003689C2 /* CancelLoadFromResourceLoadDelegate.html */; }; … … 1519 1521 C22FA32D228F8AEB009D7988 /* TextWidth.html in Copy Resources */, 1520 1522 F4451C761EB8FD890020C5DA /* two-paragraph-contenteditable.html in Copy Resources */, 1523 1D67BFDD2433EE66006B5047 /* two-videos.html in Copy Resources */, 1521 1524 C540F784152E5A9A00A40C8C /* verboseMarkup.html in Copy Resources */, 1522 1525 CD57779D211CE91F001B371E /* video-with-audio-and-web-audio.html in Copy Resources */, … … 1665 1668 1CF59AE021E68925006E37EC /* ForceLightAppearanceInBundle_Bundle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ForceLightAppearanceInBundle_Bundle.mm; sourceTree = "<group>"; }; 1666 1669 1CF59AE421E696FB006E37EC /* dark-mode.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "dark-mode.html"; sourceTree = "<group>"; }; 1670 1D67BFD92433DFD8006B5047 /* two-videos.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "two-videos.html"; sourceTree = "<group>"; }; 1671 1D67BFDB2433E0A7006B5047 /* PreemptVideoFullscreen.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PreemptVideoFullscreen.mm; sourceTree = "<group>"; }; 1667 1672 1F83571A1D3FFB0E00E3967B /* WKBackForwardList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKBackForwardList.mm; path = Tests/WebKit/WKBackForwardList.mm; sourceTree = SOURCE_ROOT; }; 1668 1673 260BA5781B1D2E7B004FA07C /* DFACombiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DFACombiner.cpp; sourceTree = "<group>"; }; … … 4327 4332 CDC8E4851BC5B19400594FEC /* AudioSessionCategoryIOS.mm */, 4328 4333 E35FC7B122B82A6D00F32F98 /* JSLockTakesWebThreadLock.mm */, 4334 1D67BFDB2433E0A7006B5047 /* PreemptVideoFullscreen.mm */, 4329 4335 CDC0932A21C872C10030C4B0 /* ScrollingDoesNotPauseMedia.mm */, 4330 4336 F434CA1922E65BCA005DDB26 /* ScrollToRevealSelection.mm */, … … 4338 4344 children = ( 4339 4345 CD9E292D1C90C1BA000BB800 /* audio-only.html */, 4346 1D67BFD92433DFD8006B5047 /* two-videos.html */, 4340 4347 CDC8E4891BC5C96200594FEC /* video-with-audio.html */, 4341 4348 CDC8E48A1BC5C96200594FEC /* video-with-audio.mp4 */, … … 5003 5010 7CCE7EA71A411A1300447C4C /* PlatformWebViewMac.mm in Sources */, 5004 5011 83BAEE8D1EF4625500DDE894 /* PluginLoadClientPolicies.mm in Sources */, 5012 1D67BFDC2433E0A7006B5047 /* PreemptVideoFullscreen.mm in Sources */, 5005 5013 C15CBB3F23FB177A00300CC7 /* PreferenceChanges.mm in Sources */, 5006 5014 7CCE7F261A411AF600447C4C /* Preferences.mm in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.