UIProcess needs to know the color of the page's extended background
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2014 20:47:03 +0000 (20:47 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Feb 2014 20:47:03 +0000 (20:47 +0000)
commita77065b17cdf6926c281a720d4ed4152d850a457
tree6cb92618b19d29a95cb3333728bd49694f7c7bfe
parent0e9fe2dd09f28fb9fc53d2d4328cfb78f820455e
UIProcess needs to know the color of the page's extended background
https://bugs.webkit.org/show_bug.cgi?id=129004

Source/WebCore:

Reviewed by Brent Fulgham.

This patch adds a new ChromeClient function,
pageExtendedBackgroundColorDidChange() which will be called whenever the extended
background color has changed.

New function.
* page/ChromeClient.h:
(WebCore::ChromeClient::pageExtendedBackgroundColorDidChange):

Store the extended background color in a member variable so that we can know if it
changed even if we do not have an m_layerForOverhangAreas.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
* rendering/RenderLayerCompositor.h:

Source/WebKit2:

Reviewed by Simon Fraser and Brent Fulgham.

New method on WKWebView and WKView will return the page’s extended background
color.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView pageExtendedBackgroundColor]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView pageExtendedBackgroundColor]):

The color is stored in the WebPageProxy, and the ChromeClient sends a message to
the WebPageProxy with the new color whenever it changes.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageExtendedBackgroundColorDidChange):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::pageExtendedBackgroundColor):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/ChromeClient.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h