-
joepeck@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=91331 Reviewed by Eric Carlson. Source/WebCore: In prepareForLoad we start deferring the load event. If we fall into this clause where the page can not start loading media we bail, potentially indefinitely waiting until we can start loading media. Since we can not be certain this will ever happen, we should stop deferring the page's load event. Test: WebKit1.WindowlessWebViewWithMedia TestWebKitAPI test. The only way this path was reachable right now is on the mac port. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadInternal): Tools: Test a windowless WebView loading a page with a media element. The load event should happen on the next spin of the run loop, but we spin check the page, with a timeout of 250ms. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.html: Added. * TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm: Added. (-[WindowlessWebViewWithMediaFrameLoadDelegate webView:didFinishLoadForFrame:]): (TestWebKitAPI::spinLoop): Spin check with timeout. Runs a block each spin to early bail. (TestWebKitAPI::TEST): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14f8cec9