Commit 0a7a361b authored by ruth_fong@apple.com's avatar ruth_fong@apple.com

Rename WebColorChooserProxy

<rdar://problem/14528039> and https://bugs.webkit.org/show_bug.cgi?id=119025

Reviewed by Brady Eidson.

Renamed WebColorChooserProxy to WebColorPicker since the name WebColorChoooserProxy
implies that it represents the same object as WebColorChooser, which is not true.
Also, renamed createColorChooserProxy to createColorPicker in WebPageProxy and
platform-equivalent versions of it.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebViewPrivate::createColorPicker):
* UIProcess/API/qt/raw/qrawwebview_p_p.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createColorPicker):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebColorChooserProxy.cpp: Removed.
* UIProcess/WebColorChooserProxy.h: Removed.
* UIProcess/WebColorPicker.cpp: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.cpp.
(WebKit::WebColorPicker::WebColorPicker):
(WebKit::WebColorPicker::~WebColorPicker):
(WebKit::WebColorPicker::endChooser):
(WebKit::WebColorPicker::setSelectedColor):
* UIProcess/WebColorPicker.h: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.h.
(WebKit::WebColorPicker::create):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::showColorChooser):
(WebKit::WebPageProxy::setColorChooserColor):
(WebKit::WebPageProxy::endColorChooser):
(WebKit::WebPageProxy::didEndColorChooser):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h: Renamed m_colorChooser to m_colorPicker.
* UIProcess/qt/QtPageClient.cpp:
(WebKit::QtPageClient::createColorPicker):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/WebColorChooserProxyQt.cpp: Removed.
* UIProcess/qt/WebColorChooserProxyQt.h: Removed.
* UIProcess/qt/WebColorPickerQt.cpp: Added.
(WebKit::ColorChooserContextObject::ColorChooserContextObject):
(WebKit::ColorChooserContextObject::currentColor):
(WebKit::ColorChooserContextObject::elementRect):
(WebKit::ColorChooserContextObject::accept):
(WebKit::ColorChooserContextObject::reject):
(WebKit::WebColorPickerQt::WebColorPickerQt):
(WebKit::WebColorPickerQt::~WebColorPickerQt):
(WebKit::WebColorPickerQt::createItem):
(WebKit::WebColorPickerQt::createContext):
(WebKit::WebColorPickerQt::setSelectedColor):
(WebKit::WebColorPickerQt::notifyColorSelected):
(WebKit::WebColorPickerQt::endChooser):
* UIProcess/qt/WebColorPickerQt.h: Added.
(WebKit::WebColorPickerQt::create):
* WebKit2.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 16a649dc
......@@ -265,7 +265,7 @@ set(WebKit2_SOURCES
UIProcess/WebBackForwardList.cpp
UIProcess/WebBatteryManagerProxy.cpp
UIProcess/WebBatteryProvider.cpp
UIProcess/WebColorChooserProxy.cpp
UIProcess/WebColorPicker.cpp
UIProcess/WebColorPickerResultListenerProxy.cpp
UIProcess/WebConnectionToWebProcess.cpp
UIProcess/WebContext.cpp
......
2013-07-24 Ruth Fong <ruth_fong@apple.com>
Rename WebColorChooserProxy
<rdar://problem/14528039> and https://bugs.webkit.org/show_bug.cgi?id=119025
Reviewed by Brady Eidson.
Renamed WebColorChooserProxy to WebColorPicker since the name WebColorChoooserProxy
implies that it represents the same object as WebColorChooser, which is not true.
Also, renamed createColorChooserProxy to createColorPicker in WebPageProxy and
platform-equivalent versions of it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebViewPrivate::createColorPicker):
* UIProcess/API/qt/raw/qrawwebview_p_p.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createColorPicker):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebColorChooserProxy.cpp: Removed.
* UIProcess/WebColorChooserProxy.h: Removed.
* UIProcess/WebColorPicker.cpp: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.cpp.
(WebKit::WebColorPicker::WebColorPicker):
(WebKit::WebColorPicker::~WebColorPicker):
(WebKit::WebColorPicker::endChooser):
(WebKit::WebColorPicker::setSelectedColor):
* UIProcess/WebColorPicker.h: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.h.
(WebKit::WebColorPicker::create):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::showColorChooser):
(WebKit::WebPageProxy::setColorChooserColor):
(WebKit::WebPageProxy::endColorChooser):
(WebKit::WebPageProxy::didEndColorChooser):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h: Renamed m_colorChooser to m_colorPicker.
* UIProcess/qt/QtPageClient.cpp:
(WebKit::QtPageClient::createColorPicker):
* UIProcess/qt/QtPageClient.h:
* UIProcess/qt/WebColorChooserProxyQt.cpp: Removed.
* UIProcess/qt/WebColorChooserProxyQt.h: Removed.
* UIProcess/qt/WebColorPickerQt.cpp: Added.
(WebKit::ColorChooserContextObject::ColorChooserContextObject):
(WebKit::ColorChooserContextObject::currentColor):
(WebKit::ColorChooserContextObject::elementRect):
(WebKit::ColorChooserContextObject::accept):
(WebKit::ColorChooserContextObject::reject):
(WebKit::WebColorPickerQt::WebColorPickerQt):
(WebKit::WebColorPickerQt::~WebColorPickerQt):
(WebKit::WebColorPickerQt::createItem):
(WebKit::WebColorPickerQt::createContext):
(WebKit::WebColorPickerQt::setSelectedColor):
(WebKit::WebColorPickerQt::notifyColorSelected):
(WebKit::WebColorPickerQt::endChooser):
* UIProcess/qt/WebColorPickerQt.h: Added.
(WebKit::WebColorPickerQt::create):
* WebKit2.xcodeproj/project.pbxproj:
2013-07-24 Anders Carlsson <andersca@apple.com>
Crash when calling WKPageGetProcessIdentifier after aborted process launch
......
......@@ -885,8 +885,8 @@ webkit2_sources += \
Source/WebKit2/UIProcess/WebBatteryManagerProxy.h \
Source/WebKit2/UIProcess/WebBatteryProvider.cpp \
Source/WebKit2/UIProcess/WebBatteryProvider.h \
Source/WebKit2/UIProcess/WebColorChooserProxy.cpp \
Source/WebKit2/UIProcess/WebColorChooserProxy.h \
Source/WebKit2/UIProcess/WebColorPicker.cpp \
Source/WebKit2/UIProcess/WebColorPicker.h \
Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp \
Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h \
Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp \
......
......@@ -242,7 +242,7 @@ HEADERS += \
UIProcess/WebBackForwardList.h \
UIProcess/WebBatteryManagerProxy.h \
UIProcess/WebBatteryProvider.h \
UIProcess/WebColorChooserProxy.h \
UIProcess/WebColorPicker.h \
UIProcess/WebColorPickerResultListenerProxy.h \
UIProcess/WebConnectionToWebProcess.h \
UIProcess/WebContext.h \
......@@ -600,7 +600,7 @@ SOURCES += \
UIProcess/WebBackForwardList.cpp \
UIProcess/WebBatteryManagerProxy.cpp \
UIProcess/WebBatteryProvider.cpp \
UIProcess/WebColorChooserProxy.cpp \
UIProcess/WebColorPicker.cpp \
UIProcess/WebColorPickerResultListenerProxy.cpp \
UIProcess/WebConnectionToWebProcess.cpp \
UIProcess/WebContext.cpp \
......@@ -847,9 +847,9 @@ have?(QTQUICK) {
enable?(INPUT_TYPE_COLOR) {
HEADERS += \
UIProcess/qt/WebColorChooserProxyQt.h
UIProcess/qt/WebColorPickerQt.h
SOURCES += \
UIProcess/qt/WebColorChooserProxyQt.cpp
UIProcess/qt/WebColorPickerQt.cpp
}
}
......
......@@ -231,7 +231,7 @@ PassRefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPagePr
}
#if ENABLE(INPUT_TYPE_COLOR)
PassRefPtr<WebColorChooserProxy> PageClientImpl::createColorChooserProxy(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
PassRefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
{
notImplemented();
return 0;
......
......@@ -84,7 +84,7 @@ private:
virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*);
virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*);
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassRefPtr<WebColorChooserProxy> createColorChooserProxy(WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&);
virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&);
#endif
virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut, bool animate);
virtual void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
......
......@@ -101,7 +101,7 @@ private:
virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*);
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassRefPtr<WebColorChooserProxy> createColorChooserProxy(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&);
virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&);
#endif
void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut, bool animate);
......
......@@ -393,7 +393,7 @@ PassRefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPagePr
}
#if ENABLE(INPUT_TYPE_COLOR)
PassRefPtr<WebColorChooserProxy> PageClientImpl::createColorChooserProxy(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
PassRefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
{
notImplemented();
return 0;
......
......@@ -190,10 +190,10 @@ PassRefPtr<WebKit::WebContextMenuProxy> QRawWebViewPrivate::createContextMenuPro
}
#if ENABLE(INPUT_TYPE_COLOR)
PassRefPtr<WebKit::WebColorChooserProxy> QRawWebViewPrivate::createColorChooserProxy(WebKit::WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&)
PassRefPtr<WebKit::WebColorPicker> QRawWebViewPrivate::createColorPicker(WebKit::WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&)
{
notImplemented();
return PassRefPtr<WebKit::WebColorChooserProxy>();
return PassRefPtr<WebKit::WebColorPicker>();
}
#endif
......
......@@ -86,7 +86,7 @@ public:
virtual PassRefPtr<WebKit::WebContextMenuProxy> createContextMenuProxy(WebKit::WebPageProxy* webPageProxy);
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassRefPtr<WebKit::WebColorChooserProxy> createColorChooserProxy(WebKit::WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&);
virtual PassRefPtr<WebKit::WebColorPicker> createColorPicker(WebKit::WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&);
#endif
QRawWebViewPrivate(WebKit::WebContext*, WebKit::WebPageGroup*, QRawWebViewClient*);
......
......@@ -412,7 +412,7 @@ PassRefPtr<WebContextMenuProxy> WebView::createContextMenuProxy(WebPageProxy*)
}
#if ENABLE(INPUT_TYPE_COLOR)
PassRefPtr<WebColorChooserProxy> WebView::createColorChooserProxy(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
PassRefPtr<WebColorPicker> WebView::createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
{
notImplemented();
return 0;
......
......@@ -174,7 +174,7 @@ protected:
virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) OVERRIDE;
virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) OVERRIDE;
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassRefPtr<WebColorChooserProxy> createColorChooserProxy(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) OVERRIDE;
virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) OVERRIDE;
#endif
virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool, bool) OVERRIDE;
......
......@@ -27,7 +27,7 @@
#define PageClient_h
#include "ShareableBitmap.h"
#include "WebColorChooserProxy.h"
#include "WebColorPicker.h"
#include "WebPageProxy.h"
#include "WebPopupMenuProxy.h"
#include <WebCore/AlternativeTextClient.h>
......@@ -65,7 +65,7 @@ class WebContextMenuProxy;
class WebEditCommandProxy;
class WebPopupMenuProxy;
#if ENABLE(INPUT_TYPE_COLOR)
class WebColorChooserProxy;
class WebColorPicker;
#endif
#if PLATFORM(MAC)
......@@ -187,7 +187,7 @@ public:
virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) = 0;
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassRefPtr<WebColorChooserProxy> createColorChooserProxy(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) = 0;
virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) = 0;
#endif
virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut, bool animate) = 0;
......
......@@ -24,22 +24,22 @@
*/
#include "config.h"
#include "WebColorChooserProxy.h"
#include "WebColorPicker.h"
#if ENABLE(INPUT_TYPE_COLOR)
namespace WebKit {
WebColorChooserProxy::WebColorChooserProxy(Client* client)
WebColorPicker::WebColorPicker(Client* client)
: m_client(client)
{
}
WebColorChooserProxy::~WebColorChooserProxy()
WebColorPicker::~WebColorPicker()
{
}
void WebColorChooserProxy::endChooser()
void WebColorPicker::endChooser()
{
if (!m_client)
return;
......@@ -47,7 +47,7 @@ void WebColorChooserProxy::endChooser()
m_client->didEndColorChooser();
}
void WebColorChooserProxy::setSelectedColor(const WebCore::Color& color)
void WebColorPicker::setSelectedColor(const WebCore::Color& color)
{
if (!m_client)
return;
......
......@@ -23,8 +23,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef WebColorChooserProxy_h
#define WebColorChooserProxy_h
#ifndef WebColorPicker_h
#define WebColorPicker_h
#if ENABLE(INPUT_TYPE_COLOR)
......@@ -39,7 +39,7 @@ namespace WebKit {
class WebPageProxy;
class WebColorChooserProxy : public RefCounted<WebColorChooserProxy> {
class WebColorPicker : public RefCounted<WebColorPicker> {
public:
class Client {
protected:
......@@ -50,12 +50,12 @@ public:
virtual void didEndColorChooser() = 0;
};
static PassRefPtr<WebColorChooserProxy> create(Client* client)
static PassRefPtr<WebColorPicker> create(Client* client)
{
return adoptRef(new WebColorChooserProxy(client));
return adoptRef(new WebColorPicker(client));
}
virtual ~WebColorChooserProxy();
virtual ~WebColorPicker();
void invalidate() { m_client = 0; }
......@@ -63,7 +63,7 @@ public:
virtual void setSelectedColor(const WebCore::Color&);
protected:
explicit WebColorChooserProxy(Client*);
explicit WebColorPicker(Client*);
Client* m_client;
};
......@@ -72,4 +72,4 @@ protected:
#endif // ENABLE(INPUT_TYPE_COLOR)
#endif // WebColorChooserProxy_h
#endif // WebColorPicker_h
......@@ -576,9 +576,9 @@ void WebPageProxy::close()
}
#if ENABLE(INPUT_TYPE_COLOR)
if (m_colorChooser) {
m_colorChooser->invalidate();
m_colorChooser = nullptr;
if (m_colorPicker) {
m_colorPicker->invalidate();
m_colorPicker = nullptr;
}
if (m_colorPickerResultListener) {
......@@ -2920,7 +2920,7 @@ void WebPageProxy::needTouchEvents(bool needTouchEvents)
#if ENABLE(INPUT_TYPE_COLOR)
void WebPageProxy::showColorChooser(const WebCore::Color& initialColor, const IntRect& elementRect)
{
ASSERT(!m_colorChooser);
ASSERT(!m_colorPicker);
if (m_colorPickerResultListener) {
m_colorPickerResultListener->invalidate();
......@@ -2928,28 +2928,28 @@ void WebPageProxy::showColorChooser(const WebCore::Color& initialColor, const In
}
m_colorPickerResultListener = WebColorPickerResultListenerProxy::create(this);
m_colorChooser = WebColorChooserProxy::create(this);
m_colorPicker = WebColorPicker::create(this);
if (m_uiClient.showColorPicker(this, initialColor.serialized(), m_colorPickerResultListener.get()))
return;
m_colorChooser = m_pageClient->createColorChooserProxy(this, initialColor, elementRect);
if (!m_colorChooser)
m_colorPicker = m_pageClient->createColorPicker(this, initialColor, elementRect);
if (!m_colorPicker)
didEndColorChooser();
}
void WebPageProxy::setColorChooserColor(const WebCore::Color& color)
{
ASSERT(m_colorChooser);
ASSERT(m_colorPicker);
m_colorChooser->setSelectedColor(color);
m_colorPicker->setSelectedColor(color);
}
void WebPageProxy::endColorChooser()
{
ASSERT(m_colorChooser);
ASSERT(m_colorPicker);
m_colorChooser->endChooser();
m_colorPicker->endChooser();
}
void WebPageProxy::didChooseColor(const WebCore::Color& color)
......@@ -2965,9 +2965,9 @@ void WebPageProxy::didEndColorChooser()
if (!isValid())
return;
if (m_colorChooser) {
m_colorChooser->invalidate();
m_colorChooser = nullptr;
if (m_colorPicker) {
m_colorPicker->invalidate();
m_colorPicker = nullptr;
}
m_process->send(Messages::WebPage::DidEndColorChooser(), m_pageID);
......@@ -3836,9 +3836,9 @@ void WebPageProxy::resetStateAfterProcessExited()
}
#if ENABLE(INPUT_TYPE_COLOR)
if (m_colorChooser) {
m_colorChooser->invalidate();
m_colorChooser = nullptr;
if (m_colorPicker) {
m_colorPicker->invalidate();
m_colorPicker = nullptr;
}
if (m_colorPickerResultListener) {
......
......@@ -39,7 +39,7 @@
#include "ShareableBitmap.h"
#include "WKBase.h"
#include "WKPagePrivate.h"
#include "WebColorChooserProxy.h"
#include "WebColorPicker.h"
#include "WebContextMenuItemData.h"
#include "WebCoreArgumentCoders.h"
#include "WebFindClient.h"
......@@ -232,7 +232,7 @@ private:
class WebPageProxy
: public TypedAPIObject<APIObject::TypePage>
#if ENABLE(INPUT_TYPE_COLOR)
, public WebColorChooserProxy::Client
, public WebColorPicker::Client
#endif
, public WebPopupMenuProxy::Client
, public CoreIPC::MessageReceiver {
......@@ -1199,7 +1199,7 @@ private:
Deque<QueuedTouchEvents> m_touchEventQueue;
#endif
#if ENABLE(INPUT_TYPE_COLOR)
RefPtr<WebColorChooserProxy> m_colorChooser;
RefPtr<WebColorPicker> m_colorPicker;
RefPtr<WebColorPickerResultListenerProxy> m_colorPickerResultListener;
#endif
......
......@@ -27,7 +27,7 @@
#include "QtWebPageEventHandler.h"
#include "ShareableBitmap.h"
#if ENABLE(INPUT_TYPE_COLOR)
#include "WebColorChooserProxyQt.h"
#include "WebColorPickerQt.h"
#endif
#include "WebContextMenuProxyQt.h"
#include "WebEditCommandProxy.h"
......@@ -221,9 +221,9 @@ PassRefPtr<WebContextMenuProxy> QtPageClient::createContextMenuProxy(WebPageProx
}
#if ENABLE(INPUT_TYPE_COLOR)
PassRefPtr<WebColorChooserProxy> QtPageClient::createColorChooserProxy(WebPageProxy* webPageProxy, const WebCore::Color& initialColor, const WebCore::IntRect& elementRect)
PassRefPtr<WebColorPicker> QtPageClient::createColorPicker(WebPageProxy* webPageProxy, const WebCore::Color& initialColor, const WebCore::IntRect& elementRect)
{
return WebColorChooserProxyQt::create(webPageProxy, m_webView, initialColor, elementRect);
return WebColorPickerQt::create(webPageProxy, m_webView, initialColor, elementRect);
}
#endif
......
......@@ -90,7 +90,7 @@ public:
virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*);
virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*);
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassRefPtr<WebColorChooserProxy> createColorChooserProxy(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&);
virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&);
#endif
virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut, bool animate) { }
virtual void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
......
......@@ -20,7 +20,7 @@
*/
#include "config.h"
#include "WebColorChooserProxyQt.h"
#include "WebColorPickerQt.h"
#include "qquickwebview_p.h"
#include "qquickwebview_p_p.h"
......@@ -58,8 +58,8 @@ private:
QRectF m_rect;
};
WebColorChooserProxyQt::WebColorChooserProxyQt(WebColorChooserProxy::Client* client, QQuickWebView* webView, const Color& initialColor, const IntRect& elementRect)
: WebColorChooserProxy(client)
WebColorPickerQt::WebColorPickerQt(WebColorPicker::Client* client, QQuickWebView* webView, const Color& initialColor, const IntRect& elementRect)
: WebColorPicker(client)
, m_webView(webView)
{
const QRectF mappedRect= m_webView->mapRectFromWebContent(QRect(elementRect));
......@@ -67,11 +67,11 @@ WebColorChooserProxyQt::WebColorChooserProxyQt(WebColorChooserProxy::Client* cli
createItem(contextObject);
}
WebColorChooserProxyQt::~WebColorChooserProxyQt()
WebColorPickerQt::~WebColorPickerQt()
{
}
void WebColorChooserProxyQt::createItem(QObject* contextObject)
void WebColorPickerQt::createItem(QObject* contextObject)
{
QQmlComponent* component = m_webView->experimental()->colorChooser();
if (!component) {
......@@ -102,7 +102,7 @@ void WebColorChooserProxyQt::createItem(QObject* contextObject)
component->completeCreate();
}
void WebColorChooserProxyQt::createContext(QQmlComponent* component, QObject* contextObject)
void WebColorPickerQt::createContext(QQmlComponent* component, QObject* contextObject)
{
QQmlContext* baseContext = component->creationContext();
if (!baseContext)
......@@ -114,7 +114,7 @@ void WebColorChooserProxyQt::createContext(QQmlComponent* component, QObject* co
m_context->setContextObject(contextObject);
}
void WebColorChooserProxyQt::setSelectedColor(const Color&)
void WebColorPickerQt::setSelectedColor(const Color&)
{
// This is suppose to be used to react to DOM changes. When
// a user script changes the input value, the method gives the
......@@ -123,7 +123,7 @@ void WebColorChooserProxyQt::setSelectedColor(const Color&)
// And yes, the name sounds misleading but comes from WebCore.
}
void WebColorChooserProxyQt::notifyColorSelected(const QColor& color)
void WebColorPickerQt::notifyColorSelected(const QColor& color)
{
if (!m_client)
return;
......@@ -135,7 +135,7 @@ void WebColorChooserProxyQt::notifyColorSelected(const QColor& color)
endChooser();
}
void WebColorChooserProxyQt::endChooser()
void WebColorPickerQt::endChooser()
{
m_colorChooser.clear();
m_context.clear();
......@@ -148,5 +148,5 @@ void WebColorChooserProxyQt::endChooser()
} // namespace WebKit
#include "WebColorChooserProxyQt.moc"
#include "moc_WebColorChooserProxyQt.cpp"
#include "WebColorPickerQt.moc"
#include "moc_WebColorPickerQt.cpp"
......@@ -18,11 +18,11 @@
*
*/
#ifndef WebColorChooserProxyQt_h
#define WebColorChooserProxyQt_h
#ifndef WebColorPickerQt_h
#define WebColorPickerQt_h
#include "IntRect.h"
#include "WebColorChooserProxy.h"
#include "WebColorPicker.h"
#include <QtCore/QObject>
#include <wtf/OwnPtr.h>
......@@ -40,15 +40,15 @@ class Color;
namespace WebKit {
class WebColorChooserProxyQt : public QObject, public WebColorChooserProxy {
class WebColorPickerQt : public QObject, public WebColorPicker {
Q_OBJECT
public:
static PassRefPtr<WebColorChooserProxy> create(WebColorChooserProxy::Client* client, QQuickWebView* webView, const WebCore::Color& initialColor, const WebCore::IntRect& elementRect)
static PassRefPtr<WebColorPicker> create(WebColorPicker::Client* client, QQuickWebView* webView, const WebCore::Color& initialColor, const WebCore::IntRect& elementRect)
{
return adoptRef(new WebColorChooserProxyQt(client, webView, initialColor, elementRect));
return adoptRef(new WebColorPickerQt(client, webView, initialColor, elementRect));
}
~WebColorChooserProxyQt();
~WebColorPickerQt();
virtual void setSelectedColor(const WebCore::Color&);
......@@ -59,7 +59,7 @@ private Q_SLOTS:
void notifyColorSelected(const QColor&);
private:
WebColorChooserProxyQt(WebColorChooserProxy::Client*, QQuickWebView*, const WebCore::Color&, const WebCore::IntRect&);
WebColorPickerQt(WebColorPicker::Client*, QQuickWebView*, const WebCore::Color&, const WebCore::IntRect&);
void createItem(QObject*);
void createContext(QQmlComponent*, QObject*);
......@@ -72,4 +72,4 @@ private:
} // namespace WebKit
#endif // WebColorChooserProxyQt_h
#endif // WebColorPickerQt_h
......@@ -406,7 +406,7 @@
37F90DE31376560E0051CF68 /* HTTPCookieAcceptPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = F638954F133BEF38008941D5 /* HTTPCookieAcceptPolicy.h */; };
3F87B9BD158940120090FF62 /* WebColorChooser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F87B9BA15893F630090FF62 /* WebColorChooser.cpp */; };
3F87B9BE158940190090FF62 /* WebColorChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F87B9BB15893F630090FF62 /* WebColorChooser.h */; };
3F87B9C0158940D80090FF62 /* WebColorChooserProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F87B9BF158940D80090FF62 /* WebColorChooserProxy.h */; };
3F87B9C0158940D80090FF62 /* WebColorPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F87B9BF158940D80090FF62 /* WebColorPicker.h */; };
4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F601430155C5A32001FBDE0 /* BlockingResponseMap.h */; };
51021E9C12B16788005C033C /* WebContextMenuClientMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51021E9B12B16788005C033C /* WebContextMenuClientMac.mm */; };
510AFFB916542048001BA05E /* WebResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510AFFB716542048001BA05E /* WebResourceLoader.cpp */; };
......@@ -1196,7 +1196,7 @@
EDCA71B7128DDA8C00201B26 /* WKBundlePageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A22F1001289FCD90085E74F /* WKBundlePageOverlay.cpp */; };
F036978515F4BE6B00C3A80E /* WKColorPickerResultListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978315F4BE6B00C3A80E /* WKColorPickerResultListener.cpp */; };
F036978615F4BE6B00C3A80E /* WKColorPickerResultListener.h in Headers */ = {isa = PBXBuildFile; fileRef = F036978415F4BE6B00C3A80E /* WKColorPickerResultListener.h */; };
F036978815F4BF0500C3A80E /* WebColorChooserProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978715F4BF0500C3A80E /* WebColorChooserProxy.cpp */; };
F036978815F4BF0500C3A80E /* WebColorPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978715F4BF0500C3A80E /* WebColorPicker.cpp */; };
F036978B15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */; };
F6113E25126CE1820057D0A7 /* WebUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = F6113E24126CE1820057D0A7 /* WebUserContentURLPattern.h */; };
F6113E28126CE19B0057D0A7 /* WKUserContentURLPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */; };
......@@ -1871,7 +1871,7 @@
37F623B712A57B6200E3FDF6 /* WKFindOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFindOptions.h; sourceTree = "<group>"; };
3F87B9BA15893F630090FF62 /* WebColorChooser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorChooser.cpp; sourceTree = "<group>"; };
3F87B9BB15893F630090FF62 /* WebColorChooser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorChooser.h; sourceTree = "<group>"; };
3F87B9BF158940D80090FF62 /* WebColorChooserProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorChooserProxy.h; sourceTree = "<group>"; };
3F87B9BF158940D80090FF62 /* WebColorPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPicker.h; sourceTree = "<group>"; };
4F601430155C5A32001FBDE0 /* BlockingResponseMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockingResponseMap.h; sourceTree = "<group>"; };
510031F61379CACB00C8DFE4 /* SecItemShim.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = SecItemShim.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
51021E9B12B16788005C033C /* WebContextMenuClientMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMenuClientMac.mm; sourceTree = "<group>"; };
......@@ -2724,7 +2724,7 @@
E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageEditorClient.cpp; sourceTree = "<group>"; };
F036978315F4BE6B00C3A80E /* WKColorPickerResultListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKColorPickerResultListener.cpp; sourceTree = "<group>"; };
F036978415F4BE6B00C3A80E /* WKColorPickerResultListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKColorPickerResultListener.h; sourceTree = "<group>"; };
F036978715F4BF0500C3A80E /* WebColorChooserProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorChooserProxy.cpp; sourceTree = "<group>"; };
F036978715F4BF0500C3A80E /* WebColorPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPicker.cpp; sourceTree = "<group>"; };
F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPickerResultListenerProxy.cpp; sourceTree = "<group>"; };
F036978A15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPickerResultListenerProxy.h; sourceTree = "<group>"; };
F6113E24126CE1820057D0A7 /* WebUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentURLPattern.h; sourceTree = "<group>"; };
......@@ -4046,8 +4046,8 @@
512E35F0130B638C00ABD19A /* WebApplicationCacheManagerProxy.messages.in */,
BC72BA1B11E64907001EB4EA /* WebBackForwardList.cpp */,
BC72BA1C11E64907001EB4EA /* WebBackForwardList.h */,
F036978715F4BF0500C3A80E /* WebColorChooserProxy.cpp */,
3F87B9BF158940D80090FF62 /* WebColorChooserProxy.h */,
F036978715F4BF0500C3A80E /* WebColorPicker.cpp */,
3F87B9BF158940D80090FF62 /* WebColorPicker.h */,
F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */,
F036978A15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.h */,
BC4A62A514744EC6006C681A /* WebConnectionToWebProcess.cpp */,
......@@ -5542,7 +5542,7 @@
BCF50728124329AA005955AE /* WebCertificateInfo.h in Headers */,
BC032D7510F4378D0058C15A /* WebChromeClient.h in Headers */,
3F87B9BE158940190090FF62 /* WebColorChooser.h in Headers */,
3F87B9C0158940D80090FF62 /* WebColorChooserProxy.h in Headers */,
3F87B9C0158940D80090FF62 /* WebColorPicker.h in Headers */,
BC4A6290147312BE006C681A /* WebConnection.h in Headers */,
BC4A6292147312BE006C681A /* WebConnectionClient.h in Headers */,
1A1FEC1D1627B45700700F6D /* WebConnectionMessages.h in Headers */,
......@@ -6814,7 +6814,7 @@
BC72B9FA11E6476B001EB4EA /* WebBackForwardListProxy.cpp in Sources */,
BC111A5A112F4FBB00337BAB /* WebChromeClient.cpp in Sources */,
3F87B9BD158940120090FF62 /* WebColorChooser.cpp in Sources */,
F036978815F4BF0500C3A80E /* WebColorChooserProxy.cpp in Sources */,
F036978815F4BF0500C3A80E /* WebColorPicker.cpp in Sources */,
F036978B15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp in Sources */,
BC4A628F147312BE006C681A /* WebConnection.cpp in Sources */,
BC4A6291147312BE006C681A /* WebConnectionClient.cpp in Sources */,
......