[WK2] Color chooser API missing
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Jun 2012 00:43:59 +0000 (00:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Jun 2012 00:43:59 +0000 (00:43 +0000)
commit8f51942c24c76941dea016c35a606f600f9eab39
treee1b99f9faa7d55ead15325a4c02c9d1c277a0b9b
parent85c6f5b6de5cdb221a4005cb2bd926f6d02c612f
[WK2] Color chooser API missing
https://bugs.webkit.org/show_bug.cgi?id=87495

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-06-20
Reviewed by Andreas Kling.

Added ColorChooser API to WebKit2. This API allows the
embedder to define a custom color picker for <input type="color">.

Only one ColorChooser can be active for a page at a time. Although
the implementation doesn't not assume a modal dialog, no other
color chooser will be created until the active one is closed.

Also added stubs for all platforms, so it wont break the build when
enabling color chooser, even though they don't have the backend
implemented yet.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit):
(WebKit::PageClientImpl::createColorChooserProxy):
* UIProcess/API/efl/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit):
(WebKit::PageClientImpl::createColorChooserProxy):
* UIProcess/API/gtk/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit):
(WebKit::PageClientImpl::createColorChooserProxy):
* UIProcess/PageClient.h:
(WebKit):
(PageClient):
* UIProcess/WebColorChooserProxy.h: Added.
(WebCore):
(WebKit):
(WebColorChooserProxy):
(Client):
(WebKit::WebColorChooserProxy::Client::~Client):
(WebKit::WebColorChooserProxy::~WebColorChooserProxy):
(WebKit::WebColorChooserProxy::invalidate):
(WebKit::WebColorChooserProxy::WebColorChooserProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit):
(WebKit::WebPageProxy::showColorChooser):
(WebKit::WebPageProxy::setColorChooserColor):
(WebKit::WebPageProxy::endColorChooser):
(WebKit::WebPageProxy::didChooseColor):
(WebKit::WebPageProxy::didEndColorChooser):
(WebKit::WebPageProxy::processDidCrash):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtPageClient.cpp:
(WebKit):
(WebKit::QtPageClient::createColorChooserProxy):
* UIProcess/qt/QtPageClient.h:
(QtPageClient):
* UIProcess/win/WebView.cpp:
(WebKit):
(WebKit::WebView::createColorChooserProxy):
* UIProcess/win/WebView.h:
(WebView):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createColorChooser):
* WebProcess/WebCoreSupport/WebColorChooser.cpp: Added.
(WebKit):
(WebKit::WebColorChooser::WebColorChooser):
(WebKit::WebColorChooser::~WebColorChooser):
(WebKit::WebColorChooser::didChooseColor):
(WebKit::WebColorChooser::didEndChooser):
(WebKit::WebColorChooser::disconnectFromPage):
(WebKit::WebColorChooser::setSelectedColor):
(WebKit::WebColorChooser::endChooser):
* WebProcess/WebCoreSupport/WebColorChooser.h: Added.
(WebCore):
(WebKit):
(WebColorChooser):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::close):
(WebKit):
(WebKit::WebPage::setActiveColorChooser):
(WebKit::WebPage::didEndColorChooser):
(WebKit::WebPage::didChooseColor):
* WebProcess/WebPage/WebPage.h:
(WebKit):
(WebPage):
(WebKit::WebPage::activeColorChooser):
* WebProcess/WebPage/WebPage.messages.in:
* win/WebKit2.vcproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/GNUmakefile.list.am
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
Source/WebKit2/UIProcess/API/efl/PageClientImpl.h
Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp
Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebColorChooserProxy.h [new file with mode: 0644]
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/qt/QtPageClient.cpp
Source/WebKit2/UIProcess/qt/QtPageClient.h
Source/WebKit2/UIProcess/win/WebView.cpp
Source/WebKit2/UIProcess/win/WebView.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebColorChooser.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/WebCoreSupport/WebColorChooser.h [new file with mode: 0644]
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/win/WebKit2.vcproj