Notify the UI delegate when a MediaDocument's natural size changes
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 23:46:59 +0000 (23:46 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 23:46:59 +0000 (23:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147182

Reviewed by Simon Fraser.

Source/WebCore:

Notify the MediaDocument that it's underlying media element has changed its natural size, either when
the media engine notifies us that the size changed, or when the ready state progresses to HAVE_METADATA.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState): Notify the media document.
(WebCore::HTMLMediaElement::mediaPlayerSizeChanged): Ditto.
* html/MediaDocument.cpp:
(WebCore::MediaDocument::mediaElementNaturalSizeChanged): Pass to the chrome client.
* html/MediaDocument.h:
* page/ChromeClient.h:

Source/WebKit2:

Pipe notifications of media document natural size changes up from the chrome client, through
to the UIProcess,  through the page client, through the WKWebView, to the UIDelegate.

* UIProcess/API/APIUIClient.h:
(API::UIClient::mediaDocumentNaturalSizeChanged):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mediaDocumentNaturalSizeChanged:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::mediaDocumentNaturalSizeChanged):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mediaDocumentNaturalSizeChanged):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::mediaDocumentNaturalSizeChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mediaDocumentNaturalSizeChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mediaDocumentNaturalSizeChanged):
* WebProcess/WebPage/WebPage.h:
* UIProcess/API/gtk/PageClientImpl.h: Add default, empty implementation of new pure-virtual method.
* UIProcess/efl/WebViewEfl.h: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187272 268f45cc-cd09-0410-ab3c-d52691b4dbfc


No differences found