Title: [153504] trunk/Source/WebKit2
Revision
153504
Author
[email protected]
Date
2013-07-30 17:58:27 -0700 (Tue, 30 Jul 2013)

Log Message

Rename <input type='color'> functions in WebPageProxy, WebColorPicker
<rdar://problem/14549771> and https://bugs.webkit.org/show_bug.cgi?id=119097

Patch by Ruth Fong <[email protected]> on 2013-07-30
Reviewed by Tim Horton.

In bug 119025, WebColorChooserProxy was renamed WebColorPicker. This patch makes the UIProcess consistent
by renaming UIProcess INPUT_TYPE_COLOR functions from ...colorChooser to ...colorPicker.

* UIProcess/WebColorPicker.cpp:
(WebKit::WebColorPicker::endPicker):
* UIProcess/WebColorPicker.h:
* UIProcess/WebColorPickerResultListenerProxy.cpp:
(WebKit::WebColorPickerResultListenerProxy::setColor):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showColorPicker):
(WebKit::WebPageProxy::setColorPickerColor):
(WebKit::WebPageProxy::endColorPicker):
(WebKit::WebPageProxy::didEndColorPicker):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/WebColorPickerQt.cpp:
(WebKit::WebColorPickerQt::createItem):
(WebKit::WebColorPickerQt::notifyColorSelected):
(WebKit::WebColorPickerQt::endPicker):
* UIProcess/qt/WebColorPickerQt.h:
* WebProcess/WebCoreSupport/WebColorChooser.cpp:
(WebKit::WebColorChooser::WebColorChooser):
(WebKit::WebColorChooser::setSelectedColor):
(WebKit::WebColorChooser::endChooser):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didEndColorPicker):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (153503 => 153504)


--- trunk/Source/WebKit2/ChangeLog	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/ChangeLog	2013-07-31 00:58:27 UTC (rev 153504)
@@ -1,3 +1,39 @@
+2013-07-30  Ruth Fong  <[email protected]>
+
+        Rename <input type='color'> functions in WebPageProxy, WebColorPicker
+        <rdar://problem/14549771> and https://bugs.webkit.org/show_bug.cgi?id=119097
+
+        Reviewed by Tim Horton.
+
+        In bug 119025, WebColorChooserProxy was renamed WebColorPicker. This patch makes the UIProcess consistent
+        by renaming UIProcess INPUT_TYPE_COLOR functions from ...colorChooser to ...colorPicker.
+
+        * UIProcess/WebColorPicker.cpp:
+        (WebKit::WebColorPicker::endPicker):
+        * UIProcess/WebColorPicker.h:
+        * UIProcess/WebColorPickerResultListenerProxy.cpp:
+        (WebKit::WebColorPickerResultListenerProxy::setColor):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::showColorPicker):
+        (WebKit::WebPageProxy::setColorPickerColor):
+        (WebKit::WebPageProxy::endColorPicker):
+        (WebKit::WebPageProxy::didEndColorPicker):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/qt/WebColorPickerQt.cpp:
+        (WebKit::WebColorPickerQt::createItem):
+        (WebKit::WebColorPickerQt::notifyColorSelected):
+        (WebKit::WebColorPickerQt::endPicker):
+        * UIProcess/qt/WebColorPickerQt.h:
+        * WebProcess/WebCoreSupport/WebColorChooser.cpp:
+        (WebKit::WebColorChooser::WebColorChooser):
+        (WebKit::WebColorChooser::setSelectedColor):
+        (WebKit::WebColorChooser::endChooser):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::didEndColorPicker):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+
 2013-07-30  Anders Carlsson  <[email protected]>
 
         Speculative fix for crash due to string access on multiple threads

Modified: trunk/Source/WebKit2/UIProcess/WebColorPicker.cpp (153503 => 153504)


--- trunk/Source/WebKit2/UIProcess/WebColorPicker.cpp	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/UIProcess/WebColorPicker.cpp	2013-07-31 00:58:27 UTC (rev 153504)
@@ -39,12 +39,12 @@
 {
 }
 
-void WebColorPicker::endChooser()
+void WebColorPicker::endPicker()
 {
     if (!m_client)
         return;
 
-    m_client->didEndColorChooser();
+    m_client->didEndColorPicker();
 }
 
 void WebColorPicker::setSelectedColor(const WebCore::Color& color)

Modified: trunk/Source/WebKit2/UIProcess/WebColorPicker.h (153503 => 153504)


--- trunk/Source/WebKit2/UIProcess/WebColorPicker.h	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/UIProcess/WebColorPicker.h	2013-07-31 00:58:27 UTC (rev 153504)
@@ -47,7 +47,7 @@
 
     public:
         virtual void didChooseColor(const WebCore::Color&) = 0;
-        virtual void didEndColorChooser() = 0;
+        virtual void didEndColorPicker() = 0;
     };
 
     static PassRefPtr<WebColorPicker> create(Client* client)
@@ -59,7 +59,7 @@
 
     void invalidate() { m_client = 0; }
 
-    virtual void endChooser();
+    virtual void endPicker();
     virtual void setSelectedColor(const WebCore::Color&);
 
 protected:

Modified: trunk/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp (153503 => 153504)


--- trunk/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp	2013-07-31 00:58:27 UTC (rev 153504)
@@ -51,8 +51,8 @@
     if (!m_page)
         return;
 
-    m_page->setColorChooserColor(WebCore::Color(color));
-    m_page->endColorChooser();
+    m_page->setColorPickerColor(WebCore::Color(color));
+    m_page->endColorPicker();
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (153503 => 153504)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-07-31 00:58:27 UTC (rev 153504)
@@ -2926,7 +2926,7 @@
 #endif
 
 #if ENABLE(INPUT_TYPE_COLOR)
-void WebPageProxy::showColorChooser(const WebCore::Color& initialColor, const IntRect& elementRect)
+void WebPageProxy::showColorPicker(const WebCore::Color& initialColor, const IntRect& elementRect)
 {
     ASSERT(!m_colorPicker);
 
@@ -2943,21 +2943,21 @@
 
     m_colorPicker = m_pageClient->createColorPicker(this, initialColor, elementRect);
     if (!m_colorPicker)
-        didEndColorChooser();
+        didEndColorPicker();
 }
 
-void WebPageProxy::setColorChooserColor(const WebCore::Color& color)
+void WebPageProxy::setColorPickerColor(const WebCore::Color& color)
 {
     ASSERT(m_colorPicker);
 
     m_colorPicker->setSelectedColor(color);
 }
 
-void WebPageProxy::endColorChooser()
+void WebPageProxy::endColorPicker()
 {
     ASSERT(m_colorPicker);
 
-    m_colorPicker->endChooser();
+    m_colorPicker->endPicker();
 }
 
 void WebPageProxy::didChooseColor(const WebCore::Color& color)
@@ -2968,7 +2968,7 @@
     m_process->send(Messages::WebPage::DidChooseColor(color), m_pageID);
 }
 
-void WebPageProxy::didEndColorChooser()
+void WebPageProxy::didEndColorPicker()
 {
     if (!isValid())
         return;
@@ -2978,7 +2978,7 @@
         m_colorPicker = nullptr;
     }
 
-    m_process->send(Messages::WebPage::DidEndColorChooser(), m_pageID);
+    m_process->send(Messages::WebPage::DidEndColorPicker(), m_pageID);
 
     m_colorPickerResultListener->invalidate();
     m_colorPickerResultListener = nullptr;

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (153503 => 153504)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2013-07-31 00:58:27 UTC (rev 153504)
@@ -749,8 +749,8 @@
     void postMessageToInjectedBundle(const String& messageName, APIObject* messageBody);
 
 #if ENABLE(INPUT_TYPE_COLOR)
-    void setColorChooserColor(const WebCore::Color&);
-    void endColorChooser();
+    void setColorPickerColor(const WebCore::Color&);
+    void endColorPicker();
 #endif
 
     const WebLoaderClient& loaderClient() { return m_loaderClient; }
@@ -900,9 +900,9 @@
 #endif
 
 #if ENABLE(INPUT_TYPE_COLOR)
-    void showColorChooser(const WebCore::Color& initialColor, const WebCore::IntRect&);
+    void showColorPicker(const WebCore::Color& initialColor, const WebCore::IntRect&);
     void didChooseColor(const WebCore::Color&);
-    void didEndColorChooser();
+    void didEndColorPicker();
 #endif
 
     void editorStateChanged(const EditorState&);

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (153503 => 153504)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2013-07-31 00:58:27 UTC (rev 153504)
@@ -95,9 +95,9 @@
 #endif
 
 #if ENABLE(INPUT_TYPE_COLOR)
-    ShowColorChooser(WebCore::Color initialColor, WebCore::IntRect elementRect);
-    SetColorChooserColor(WebCore::Color color);
-    EndColorChooser();
+    ShowColorPicker(WebCore::Color initialColor, WebCore::IntRect elementRect);
+    SetColorPickerColor(WebCore::Color color);
+    EndColorPicker();
 #endif
 
     # Policy messages

Modified: trunk/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp (153503 => 153504)


--- trunk/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp	2013-07-31 00:58:27 UTC (rev 153504)
@@ -94,7 +94,7 @@
 
     // Needs to be enqueue because it might trigger deletion.
     connect(contextObject, SIGNAL(accepted(QColor)), SLOT(notifyColorSelected(QColor)), Qt::QueuedConnection);
-    connect(contextObject, SIGNAL(rejected()), SLOT(endChooser()), Qt::QueuedConnection);
+    connect(contextObject, SIGNAL(rejected()), SLOT(endPicker()), Qt::QueuedConnection);
 
     QQuickWebViewPrivate::get(m_webView)->addAttachedPropertyTo(m_colorChooser.get());
     m_colorChooser->setParentItem(m_webView);
@@ -132,10 +132,10 @@
     Color coreColor = makeRGB(color.red(), color.green(), color.blue());
     m_client->didChooseColor(coreColor);
 
-    endChooser();
+    endPicker();
 }
 
-void WebColorPickerQt::endChooser()
+void WebColorPickerQt::endPicker()
 {
     m_colorChooser.clear();
     m_context.clear();
@@ -143,7 +143,7 @@
     if (!m_client)
         return;
 
-    m_client->didEndColorChooser();
+    m_client->didEndColorPicker();
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h (153503 => 153504)


--- trunk/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h	2013-07-31 00:58:27 UTC (rev 153504)
@@ -53,7 +53,7 @@
     virtual void setSelectedColor(const WebCore::Color&);
 
 public Q_SLOTS:
-    virtual void endChooser();
+    virtual void endPicker();
 
 private Q_SLOTS:
     void notifyColorSelected(const QColor&);

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebColorChooser.cpp (153503 => 153504)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebColorChooser.cpp	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebColorChooser.cpp	2013-07-31 00:58:27 UTC (rev 153504)
@@ -43,7 +43,7 @@
     , m_page(page)
 {
     m_page->setActiveColorChooser(this);
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorChooser(initialColor, client->elementRectRelativeToRootView()), m_page->pageID());
+    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorPicker(initialColor, client->elementRectRelativeToRootView()), m_page->pageID());
 }
 
 WebColorChooser::~WebColorChooser()
@@ -74,7 +74,7 @@
     if (!m_page)
         return;
 
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::SetColorChooserColor(color), m_page->pageID());
+    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::SetColorPickerColor(color), m_page->pageID());
 }
 
 void WebColorChooser::endChooser()
@@ -82,7 +82,7 @@
     if (!m_page)
         return;
 
-    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::EndColorChooser(), m_page->pageID());
+    WebProcess::shared().parentProcessConnection()->send(Messages::WebPageProxy::EndColorPicker(), m_page->pageID());
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (153503 => 153504)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-07-31 00:58:27 UTC (rev 153504)
@@ -2844,7 +2844,7 @@
     m_activeColorChooser = colorChooser;
 }
 
-void WebPage::didEndColorChooser()
+void WebPage::didEndColorPicker()
 {
     m_activeColorChooser->didEndChooser();
 }

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (153503 => 153504)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2013-07-31 00:58:27 UTC (rev 153504)
@@ -235,7 +235,7 @@
     WebColorChooser* activeColorChooser() const { return m_activeColorChooser; }
     void setActiveColorChooser(WebColorChooser*);
     void didChooseColor(const WebCore::Color&);
-    void didEndColorChooser();
+    void didEndColorPicker();
 #endif
 
     WebOpenPanelResultListener* activeOpenPanelResultListener() const { return m_activeOpenPanelResultListener.get(); }

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (153503 => 153504)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2013-07-31 00:19:44 UTC (rev 153503)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2013-07-31 00:58:27 UTC (rev 153504)
@@ -48,7 +48,7 @@
 #endif
 
 #if ENABLE(INPUT_TYPE_COLOR)
-    DidEndColorChooser()
+    DidEndColorPicker()
     DidChooseColor(WebCore::Color color)
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to