Need API to control page underlay color
https://bugs.webkit.org/show_bug.cgi?id=110918
Patch by Conrad Shultz <conrad_shultz@apple.com> on 2013-02-28
Reviewed by Simon Fraser.
Source/WebCore:
* page/ChromeClient.h:
(ChromeClient):
Declare underlayColor().
* platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::setUpOverhangAreasLayerContents):
Have setUpOverhangAreasLayerContents() take a background color parameter.
* platform/mac/ScrollbarThemeMac.h:
(ScrollbarThemeMac):
Ditto.
* platform/mac/ScrollbarThemeMac.mm:
Include ColorMac.h.
(WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents):
Use the passed-in background color, if valid, for the overhang area layer.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
Get the underlay color from the chrome client and pass it into setUpOverhangAreasLayerContents().
Source/WebKit2:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
Encode underlayColor.
(WebKit::WebPageCreationParameters::decode):
Decode underlayColor.
* Shared/WebPageCreationParameters.h:
(WebPageCreationParameters):
Add underlayColor member.
* UIProcess/API/mac/WKView.mm:
(-[WKView underlayColor]):
Accessor; retrieves the WebCore::Color from the WebPageProxy and converts it to an NSColor.
(-[WKView setUnderlayColor:]):
Mutator; converts the NSColor to a WebCore::Color and passes it to the WebPageProxy.
* UIProcess/API/mac/WKViewPrivate.h:
Add underlayColor @property.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setUnderlayColor):
Mutator; dispatches SetUnderlayColor to WebPage.
(WebKit::WebPageProxy::creationParameters):
Set the parameters' underlayColor member appropriately.
* UIProcess/WebPageProxy.h:
Declare new member functions and variable.
(WebKit::WebPageProxy::underlayColor):
Accessor.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::underlayColor):
Return the associated WebPage's underlayColor.
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
Declare underlayColor().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Apply any underlayColor that was supplied as part of the WebPageCreationParameters.
* WebProcess/WebPage/WebPage.h:
Declare new member functions and variable.
(WebKit::WebPage::underlayColor):
Accessor.
* WebProcess/WebPage/WebPage.messages.in:
Add SetUnderlayColor message.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144397
268f45cc-cd09-0410-ab3c-
d52691b4dbfc