Implement <input type=color> UI WebKit chromium part
authorkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Dec 2011 10:37:10 +0000 (10:37 +0000)
committerkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Dec 2011 10:37:10 +0000 (10:37 +0000)
commitb90ff84ef85f656d45fc447e4bbfa210659683da
treebf5a35667faf28a92a09bb213752f331789155d3
parentedb4cc50b5c70d9fa187e614024b216288753605
Implement <input type=color> UI WebKit chromium part
https://bugs.webkit.org/show_bug.cgi?id=65897

Reviewed by Darin Fisher.

Source/WebCore:

* WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h

Source/WebKit/chromium:

* WebKit.gyp: Added new files.
* features.gypi: Added ENABLE_INPUT_COLOR.
* public/WebColorChooser.h: Added. Interface for ColorChooserProxy to call.
(WebKit::WebColorChooser::~WebColorChooser):
(WebKit::WebColorChooser::setSelectedColor):
(WebKit::WebColorChooser::endChooser):
* public/WebColorChooserClient.h: Added.
(WebKit::WebColorChooserClient::~WebColorChooserClient):
(WebKit::WebColorChooserClient::didChooseColor): Only called when user changes the color.
(WebKit::WebColorChooserClient::didEndChooser): Called when WebColorChooser::endChooser is called.
* public/WebViewClient.h:
(WebKit::WebViewClient::createColorChooser): Creates a new color chooser. If there is an old color chooser, this will end it.
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::createColorChooser): Calls WebViewClient::createColorChooser.
* src/ChromeClientImpl.h:
* src/ColorChooserProxy.cpp: Proxies calls to WebCore::ColorChooser to WebKit::WebColorChooser.
(WebKit::ColorChooserProxy::ColorChooserProxy):
(WebKit::ColorChooserProxy::~ColorChooserProxy):
(WebKit::ColorChooserProxy::setSelectedColor):
(WebKit::ColorChooserProxy::endChooser):
* src/ColorChooserProxy.h:
* src/WebColorChooserClientImpl.cpp: Proxies calls to WebKit::WebColorChooserClient to WebCore::ColorChooserClient.
(WebKit::WebColorChooserClientImpl::WebColorChooserClientImpl):
(WebKit::WebColorChooserClientImpl::~WebColorChooserClientImpl):
(WebKit::WebColorChooserClientImpl::didChooseColor):
(WebKit::WebColorChooserClientImpl::didEndChooser):
* src/WebColorChooserClientImpl.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/features.gypi
Source/WebKit/chromium/public/WebColorChooser.h [new file with mode: 0644]
Source/WebKit/chromium/public/WebColorChooserClient.h [new file with mode: 0644]
Source/WebKit/chromium/public/WebViewClient.h
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/ChromeClientImpl.h
Source/WebKit/chromium/src/ColorChooserProxy.cpp [new file with mode: 0644]
Source/WebKit/chromium/src/ColorChooserProxy.h [moved from Source/WebCore/platform/ColorChooser.cpp with 57% similarity]
Source/WebKit/chromium/src/WebColorChooserClientImpl.cpp [new file with mode: 0644]
Source/WebKit/chromium/src/WebColorChooserClientImpl.h [new file with mode: 0644]