[EFL] Add API for color chooser
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 11:44:22 +0000 (11:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Apr 2012 11:44:22 +0000 (11:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83692

.:

Enables INPUT_TYPE_COLOR by default on the EFL port.

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-04-13
Reviewed by Kenneth Rohde Christiansen.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebCore:

Added new API to enable browsers to display a custom color picker
when an input field of type "color" is activated.

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-04-13
Reviewed by Kenneth Rohde Christiansen.

* PlatformEfl.cmake:
* platform/efl/ColorChooserEfl.cpp: Added.
(WebCore):
(WebCore::ColorChooserEfl::ColorChooserEfl):
(WebCore::ColorChooserEfl::~ColorChooserEfl):
(WebCore::ColorChooserEfl::setSelectedColor):
(WebCore::ColorChooserEfl::endChooser):
* platform/efl/ColorChooserEfl.h: Added.
(WebCore):
(ColorChooserEfl):

Source/WebKit/efl:

Added new API to enable browsers to display a custom color picker
when an input field of type "color" is activated.

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-04-13
Reviewed by Kenneth Rohde Christiansen.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore):
(WebCore::ChromeClientEfl::createColorChooser):
(WebCore::ChromeClientEfl::removeColorChooser):
(WebCore::ChromeClientEfl::updateColorChooser):
* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):
* ewk/ewk_private.h:
(WebCore):
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(ewk_view_color_chooser_new):
(ewk_view_color_chooser_destroy):
(ewk_view_color_chooser_color_set):
(ewk_view_color_chooser_changed):
* ewk/ewk_view.h:

Tools:

Enables INPUT_TYPE_COLOR by default on the EFL port.

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-04-13
Reviewed by Kenneth Rohde Christiansen.

* Scripts/build-webkit:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/platform/efl/ColorChooserEfl.cpp [new file with mode: 0644]
Source/WebCore/platform/efl/ColorChooserEfl.h [new file with mode: 0644]
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/efl/ewk/ewk_private.h
Source/WebKit/efl/ewk/ewk_view.cpp
Source/WebKit/efl/ewk/ewk_view.h
Source/cmake/OptionsEfl.cmake
Source/cmake/WebKitFeatures.cmake
Source/cmakeconfig.h.cmake
Tools/ChangeLog
Tools/Scripts/build-webkit

index defc1c2..49fecff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-04-13  Thiago Marcos P. Santos  <thiago.santos@intel.com>
+
+        [EFL] Add API for color chooser
+        https://bugs.webkit.org/show_bug.cgi?id=83692
+
+        Enables INPUT_TYPE_COLOR by default on the EFL port.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * Source/cmake/OptionsEfl.cmake:
+        * Source/cmake/WebKitFeatures.cmake:
+        * Source/cmakeconfig.h.cmake:
+
 2012-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Enable WebKit2 by default in configure
index b95f30c..2e949cb 100644 (file)
@@ -1,3 +1,24 @@
+2012-04-13  Thiago Marcos P. Santos  <thiago.santos@intel.com>
+
+        [EFL] Add API for color chooser
+        https://bugs.webkit.org/show_bug.cgi?id=83692
+
+        Added new API to enable browsers to display a custom color picker
+        when an input field of type "color" is activated.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * PlatformEfl.cmake:
+        * platform/efl/ColorChooserEfl.cpp: Added.
+        (WebCore):
+        (WebCore::ColorChooserEfl::ColorChooserEfl):
+        (WebCore::ColorChooserEfl::~ColorChooserEfl):
+        (WebCore::ColorChooserEfl::setSelectedColor):
+        (WebCore::ColorChooserEfl::endChooser):
+        * platform/efl/ColorChooserEfl.h: Added.
+        (WebCore):
+        (ColorChooserEfl):
+
 2012-04-13  Zalan Bujtas  <zbujtas@gmail.com>
 
         Enabling/disabling delegates scrolling when page has no composited content asserts on WK1.
index c35db6d..79a5013 100644 (file)
@@ -23,6 +23,7 @@ LIST(APPEND WebCore_SOURCES
   page/efl/EventHandlerEfl.cpp
   platform/Cursor.cpp
   platform/efl/ClipboardEfl.cpp
+  platform/efl/ColorChooserEfl.cpp
   platform/efl/ContextMenuEfl.cpp
   platform/efl/ContextMenuItemEfl.cpp
   platform/efl/CursorEfl.cpp
diff --git a/Source/WebCore/platform/efl/ColorChooserEfl.cpp b/Source/WebCore/platform/efl/ColorChooserEfl.cpp
new file mode 100644 (file)
index 0000000..8003be1
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2012, Intel Corporation
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of Intel Corporation nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(INPUT_TYPE_COLOR)
+
+#include "ColorChooserEfl.h"
+
+#include "ChromeClientEfl.h"
+
+namespace WebCore {
+
+ColorChooserEfl::ColorChooserEfl(ChromeClientEfl* chromeClient)
+    : m_chromeClient(chromeClient)
+{
+    ASSERT(m_chromeClient);
+}
+
+ColorChooserEfl::~ColorChooserEfl()
+{
+}
+
+void ColorChooserEfl::setSelectedColor(const Color& color)
+{
+    m_chromeClient->updateColorChooser(color);
+}
+
+void ColorChooserEfl::endChooser()
+{
+    m_chromeClient->removeColorChooser();
+}
+
+}
+
+#endif // ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebCore/platform/efl/ColorChooserEfl.h b/Source/WebCore/platform/efl/ColorChooserEfl.h
new file mode 100644 (file)
index 0000000..c1c8d06
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2012, Intel Corporation
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of Intel Corporation nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ColorChooserEfl_h
+#define ColorChooserEfl_h
+
+#include "Color.h"
+#include "ColorChooser.h"
+
+#include <Evas.h>
+
+namespace WebCore {
+
+class ChromeClientEfl;
+
+class ColorChooserEfl : public ColorChooser {
+public:
+    ColorChooserEfl(ChromeClientEfl*);
+    ~ColorChooserEfl();
+
+    // ColorChooser implementation.
+    virtual void setSelectedColor(const Color&);
+    virtual void endChooser();
+
+private:
+    ChromeClientEfl* m_chromeClient;
+};
+
+}
+
+#endif // ColorChooserEfl_h
index 039eaeb..cbdbe04 100644 (file)
@@ -1,3 +1,30 @@
+2012-04-13  Thiago Marcos P. Santos  <thiago.santos@intel.com>
+
+        [EFL] Add API for color chooser
+        https://bugs.webkit.org/show_bug.cgi?id=83692
+
+        Added new API to enable browsers to display a custom color picker
+        when an input field of type "color" is activated.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        (WebCore):
+        (WebCore::ChromeClientEfl::createColorChooser):
+        (WebCore::ChromeClientEfl::removeColorChooser):
+        (WebCore::ChromeClientEfl::updateColorChooser):
+        * WebCoreSupport/ChromeClientEfl.h:
+        (ChromeClientEfl):
+        * ewk/ewk_private.h:
+        (WebCore):
+        * ewk/ewk_view.cpp:
+        (_Ewk_View_Private_Data):
+        (ewk_view_color_chooser_new):
+        (ewk_view_color_chooser_destroy):
+        (ewk_view_color_chooser_color_set):
+        (ewk_view_color_chooser_changed):
+        * ewk/ewk_view.h:
+
 2012-04-11  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
 
         [EFL] LayoutTestController needs implementation of pageProperty
index 68adf5f..d02b931 100644 (file)
 #include "DatabaseTracker.h"
 #endif
 
+#if ENABLE(INPUT_TYPE_COLOR)
+#include "ColorChooserEfl.h"
+#endif
+
 using namespace WebCore;
 
 static inline Evas_Object* kit(Frame* frame)
@@ -425,6 +429,25 @@ NotificationClient* ChromeClientEfl::notificationPresenter() const
 }
 #endif
 
+#if ENABLE(INPUT_TYPE_COLOR)
+PassOwnPtr<ColorChooser> ChromeClientEfl::createColorChooser(ColorChooserClient* colorChooserClient, const Color& initialColor)
+{
+    ewk_view_color_chooser_new(m_view, colorChooserClient, initialColor);
+
+    return adoptPtr(new ColorChooserEfl(this));
+}
+
+void ChromeClientEfl::removeColorChooser()
+{
+    ewk_view_color_chooser_destroy(m_view);
+}
+
+void ChromeClientEfl::updateColorChooser(const Color& color)
+{
+    ewk_view_color_chooser_changed(m_view, color);
+}
+#endif
+
 void ChromeClientEfl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
 {
     RefPtr<FileChooser> chooser = prpFileChooser;
index 9ce9d68..65eaeb3 100644 (file)
 #include "KURL.h"
 #include "PopupMenu.h"
 
+#if ENABLE(INPUT_TYPE_COLOR)
+#include "ColorChooser.h"
+#endif
+
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
 #include "NotificationClient.h"
 #endif
@@ -138,6 +142,12 @@ public:
     virtual void exitFullScreenForElement(WebCore::Element*);
 #endif
 
+#if ENABLE(INPUT_TYPE_COLOR)
+    virtual PassOwnPtr<ColorChooser> createColorChooser(ColorChooserClient*, const Color&);
+    virtual void removeColorChooser();
+    virtual void updateColorChooser(const Color&);
+#endif
+
     virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
     virtual void loadIconForFiles(const Vector<String>&, FileIconLoader*);
     virtual void formStateDidChange(const Node*);
index 96e4795..96fa753 100644 (file)
@@ -77,6 +77,10 @@ namespace WebCore {
 struct PopupMenuClient;
 struct ContextMenu;
 struct ContextMenuItem;
+#if ENABLE(INPUT_TYPE_COLOR)
+struct Color;
+struct ColorChooserClient;
+#endif
 #if USE(ACCELERATED_COMPOSITING)
 class GraphicsContext3D;
 class GraphicsLayer;
@@ -154,6 +158,11 @@ WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object* ewkView, Evas
 
 WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* ewkView, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually);
 
+#if ENABLE(INPUT_TYPE_COLOR)
+void ewk_view_color_chooser_new(Evas_Object* ewkView, WebCore::ColorChooserClient* client, const WebCore::Color& initialColor);
+void ewk_view_color_chooser_changed(Evas_Object* ewkView, const WebCore::Color& newColor);
+#endif
+
 void ewk_view_popup_new(Evas_Object* ewkView, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect);
 void ewk_view_viewport_attributes_set(Evas_Object* ewkView, const WebCore::ViewportArguments& arguments);
 
index 2d42a32..c65acab 100644 (file)
@@ -1,6 +1,7 @@
 /*
     Copyright (C) 2009-2010 ProFUSION embedded systems
     Copyright (C) 2009-2012 Samsung Electronics
+    Copyright (C) 2012 Intel Corporation
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Library General Public
 #include "NetworkInfoClientEfl.h"
 #endif
 
+#if ENABLE(INPUT_TYPE_COLOR)
+#include "ColorChooserClient.h"
+#endif
+
 static const float zoomMinimum = 0.05;
 static const float zoomMaximum = 4.0;
 
@@ -103,6 +108,9 @@ static const size_t ewkViewScrollsSizeStep = 2;
 static const size_t ewkViewScrollsSizeMaximumFree = 32;
 
 static const Evas_Smart_Cb_Description _ewk_view_callback_names[] = {
+    { "colorchooser,create", "(yyyy)" },
+    { "colorchooser,willdelete", "" },
+    { "colorchooser,color,changed", "(yyyy)" },
     { "download,request", "p" },
     { "editorclient,contents,changed", "" },
     { "editorclient,selection,changed", "" },
@@ -152,6 +160,9 @@ struct _Ewk_View_Private_Data {
     WebCore::ViewportArguments viewportArguments;
     Ewk_History* history;
     OwnPtr<WebCore::PageClientEfl> pageClient;
+#if ENABLE(INPUT_TYPE_COLOR)
+    WebCore::ColorChooserClient* colorChooserClient;
+#endif
     struct {
         Ewk_Menu menu;
         WebCore::PopupMenuClient* menuClient;
@@ -3521,6 +3532,88 @@ void ewk_view_popup_selected_set(Evas_Object* ewkView, int index)
     priv->popup.menuClient->valueChanged(index);
 }
 
+#if ENABLE(INPUT_TYPE_COLOR)
+/**
+ * @internal
+ *
+ * Creates a new color chooser with an initial selected color.
+ *
+ * @param client ColorChooserClient instance that allows communication with webkit.
+ * @param initialColor The initial selected color.
+ *
+ */
+void ewk_view_color_chooser_new(Evas_Object* ewkView, WebCore::ColorChooserClient* client, const WebCore::Color& initialColor)
+{
+    INF("ewkView=%p", ewkView);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    if (priv->colorChooserClient)
+        ewk_view_color_chooser_destroy(ewkView);
+
+    priv->colorChooserClient = client;
+
+    Ewk_Color color;
+    color.r = initialColor.red();
+    color.g = initialColor.green();
+    color.b = initialColor.blue();
+    color.a = initialColor.alpha();
+
+    evas_object_smart_callback_call(ewkView, "colorchooser,create", &color);
+}
+
+Eina_Bool ewk_view_color_chooser_destroy(Evas_Object* ewkView)
+{
+    INF("ewkView=%p", ewkView);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
+
+    if (!priv->colorChooserClient)
+        return false;
+
+    evas_object_smart_callback_call(ewkView, "colorchooser,willdelete", 0);
+
+    priv->colorChooserClient->didEndChooser();
+    priv->colorChooserClient = 0;
+
+    return true;
+}
+
+void ewk_view_color_chooser_color_set(Evas_Object *ewkView, int r, int g, int b)
+{
+    INF("ewkView=%p", ewkView);
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+    EINA_SAFETY_ON_NULL_RETURN(priv->colorChooserClient);
+
+    // Alpha channel is not allowed, see ColorInputType::sanitizeValue().
+    priv->colorChooserClient->didChooseColor(WebCore::Color(r, g, b));
+}
+
+/**
+ * @internal
+ *
+ * The selected color of the color input associated with the color chooser has
+ * changed. Usually the browser should updated the current selected value on the
+ * color picker if the user is not interacting.
+ *
+ * @param newColor The new selected color.
+ *
+ */
+void ewk_view_color_chooser_changed(Evas_Object* ewkView, const WebCore::Color& newColor)
+{
+    INF("ewkView=%p", ewkView);
+
+    Ewk_Color color;
+    color.r = newColor.red();
+    color.g = newColor.green();
+    color.b = newColor.blue();
+    color.a = newColor.alpha();
+
+    evas_object_smart_callback_call(ewkView, "colorchooser,color,changed", &color);
+}
+#endif
+
 /**
  * @internal
  * Request a download to user.
index fa382a9..3743898 100644 (file)
@@ -1,6 +1,7 @@
 /*
     Copyright (C) 2009-2010 ProFUSION embedded systems
     Copyright (C) 2009-2010 Samsung Electronics
+    Copyright (C) 2012 Intel Corporation
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Library General Public
  *
  * The following signals (see evas_object_smart_callback_add()) are emitted:
  *
+ *  - "colorchooser,create", Ewk_Color: a new color chooser should be created.
+ *  - "colorchooser,willdelete", void: reports that a previously created color
+ *    chooser will be deleted.
+ *  - "colorchooser,color,changed", Ewk_Color: the value at the color input widget
+ *    corresponding to the color chooser has changed.
  *  - "download,request", Ewk_Download: reports a download is being requested
  *  - "editorclient,contents,changed", void: reports to the view that editor
  *    client's contents were changed
@@ -284,6 +290,16 @@ struct _Ewk_Scroll_Request {
     Evas_Coord x, y, w, h, x2, y2;
 };
 
+/// Creates a type name for @a _Ewk_Color.
+typedef struct _Ewk_Color Ewk_Color;
+/// Represents a color using the RGBA format.
+struct _Ewk_Color {
+    unsigned char r; /**< Red channel. */
+    unsigned char g; /**< Green channel. */
+    unsigned char b; /**< Blue channel. */
+    unsigned char a; /**< Alpha channel. */
+};
+
 /**
  * @brief Contains an internal View data.
  *
@@ -750,6 +766,35 @@ typedef enum _Ewk_Editor_Command Ewk_Editor_Command;
 EAPI Eina_Bool    ewk_view_execute_editor_command(Evas_Object *o, const Ewk_Editor_Command command, const char *value);
 
 /**
+ * Destroys a previously created color chooser.
+ *
+ * Before destroying, it informs client that color chooser's data is ready to be
+ * destroyed by sending a "colorchooser,willdelete". Then it removes any reference
+ * to the color chooser inside webkit. It's safe to call this function either from
+ * inside webkit or from browser.
+ *
+ * @param o view object
+ *
+ * @return @c EINA_TRUE in case color chooser was successfully destroyed or @c EINA_TRUE in
+ * case there wasn't any color chooser to be destroyed
+ */
+EAPI Eina_Bool    ewk_view_color_chooser_destroy(Evas_Object* o);
+
+/**
+ * Changes the selected color.
+ *
+ * Changes the color selected in the color input widget. The browser should call
+ * this when the user chooses a new color. It's likely that ewk_view_color_chooser_destroy
+ * will be called afterwards.
+ *
+ * @param o view object
+ * @param r red color component
+ * @param g green color component
+ * @param b blue color component
+ */
+EAPI void         ewk_view_color_chooser_color_set(Evas_Object* o, int r, int g, int b);
+
+/**
  * Changes currently selected item.
  *
  * Changes the option selected in select widget. This is called by browser
index eeb7eba..10362aa 100644 (file)
@@ -69,6 +69,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BATTERY_STATUS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FAST_MOBILE_SCROLLING ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GLIB_SUPPORT ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETWORK_INFO ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PAGE_VISIBILITY_API ON)
index aec3dcc..6ab8740 100644 (file)
@@ -40,8 +40,8 @@ MACRO (WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(ENABLE_ICONDATABASE "Toggle Icon database support" ON)
     WEBKIT_OPTION_DEFINE(ENABLE_IMAGE_DECODER_DOWN_SAMPLING "Toggle image decoder down sampling support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_INDEXED_DATABASE "Toggle Indexed Database API support" OFF)
-    WEBKIT_OPTION_DEFINE(ENABLE_INPUT_COLOR "Toggle Color Input support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_INPUT_SPEECH "Toggle Speech Input API support" OFF)
+    WEBKIT_OPTION_DEFINE(ENABLE_INPUT_TYPE_COLOR "Toggle Color Input support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_INPUT_TYPE_DATE "Toggle date type <input> support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_INPUT_TYPE_DATETIME "Toggle datetime type <input> support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_INPUT_TYPE_DATETIMELOCAL "Toggle datetime-local type <input> support" OFF)
index 180d57d..3f4c37a 100644 (file)
@@ -31,7 +31,7 @@
 #cmakedefine01 ENABLE_ICONDATABASE
 #cmakedefine01 ENABLE_IMAGE_DECODER_DOWN_SAMPLING
 #cmakedefine01 ENABLE_INDEXED_DATABASE
-#cmakedefine01 ENABLE_INPUT_COLOR
+#cmakedefine01 ENABLE_INPUT_TYPE_COLOR
 #cmakedefine01 ENABLE_INPUT_TYPE_DATE
 #cmakedefine01 ENABLE_INPUT_TYPE_DATETIME
 #cmakedefine01 ENABLE_INPUT_TYPE_DATETIMELOCAL
index 0c96e46..c063b8f 100644 (file)
@@ -1,3 +1,14 @@
+2012-04-13  Thiago Marcos P. Santos  <thiago.santos@intel.com>
+
+        [EFL] Add API for color chooser
+        https://bugs.webkit.org/show_bug.cgi?id=83692
+
+        Enables INPUT_TYPE_COLOR by default on the EFL port.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * Scripts/build-webkit:
+
 2012-04-12  Ryosuke Niwa  <rniwa@webkit.org>
 
         Extract PerfTest class from PerfTestRunner
index 75b2b40..91f01ac 100755 (executable)
@@ -236,7 +236,7 @@ my @features = (
       define => "ENABLE_SCRIPTED_SPEECH", default => 0, value => \$scriptedSpeechSupport },
 
     { option => "input-type-color", desc => "Toggle color type <input> support",
-      define => "ENABLE_INPUT_TYPE_COLOR", default => isBlackBerry(), value => \$inputTypeColorSupport },
+      define => "ENABLE_INPUT_TYPE_COLOR", default => (isBlackBerry() || isEfl()), value => \$inputTypeColorSupport },
 
     { option => "input-type-date", desc => "Toggle date type <input> support",
       define => "ENABLE_INPUT_TYPE_DATE", default => 0, value => \$inputTypeDateSupport },