<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[179922] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/179922">179922</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-02-11 01:03:06 -0800 (Wed, 11 Feb 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK] Add default color chooser implementation using GtkColorChooserDialog
https://bugs.webkit.org/show_bug.cgi?id=141392
Reviewed by Gustavo Noronha Silva.
.:
Enable INPUT_TYPE_COLOR by default for GTK+ port.
* Source/cmake/OptionsGTK.cmake:
Source/WebKit2:
* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createColorPicker): Call WebColorPickerGtk::create().
* UIProcess/gtk/WebColorPickerGtk.cpp: Added.
(WebKit::WebColorPickerGtk::create):
(WebKit::WebColorPickerGtk::WebColorPickerGtk):
(WebKit::WebColorPickerGtk::~WebColorPickerGtk):
(WebKit::WebColorPickerGtk::cancel): Set initial color.
(WebKit::WebColorPickerGtk::endPicker): Destroy the color chooser dialog.
(WebKit::WebColorPickerGtk::didChooseColor): Notify the client.
(WebKit::WebColorPickerGtk::colorChooserDialogRGBAChangedCallback):
Update the selected color.
(WebKit::WebColorPickerGtk::colorChooserDialogResponseCallback):
Cancel or finish the operation depending on the dialog response.
(WebKit::WebColorPickerGtk::showColorPicker): Create a
GtkColorChooserDialog to handle the color picker operation.
* UIProcess/gtk/WebColorPickerGtk.h: Added.
(WebKit::WebColorPickerGtk::initialColor):
Tools:
Enable INPUT_TYPE_COLOR by default for GTK+ port.
* Scripts/webkitperl/FeatureList.pm:
LayoutTests:
Unskip input color tests.
* platform/gtk/TestExpectations:
* platform/gtk/fast/forms/color/input-appearance-color-expected.txt: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkPageClientImplcpp">trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp</a></li>
<li><a href="#trunkSourcecmakeOptionsGTKcmake">trunk/Source/cmake/OptionsGTK.cmake</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitperlFeatureListpm">trunk/Tools/Scripts/webkitperl/FeatureList.pm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/gtk/fast/forms/color/</li>
<li><a href="#trunkLayoutTestsplatformgtkfastformscolorinputappearancecolorexpectedtxt">trunk/LayoutTests/platform/gtk/fast/forms/color/input-appearance-color-expected.txt</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebColorPickerGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebColorPickerGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebColorPickerGtkh">trunk/Source/WebKit2/UIProcess/gtk/WebColorPickerGtk.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/ChangeLog        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-02-11 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add default color chooser implementation using GtkColorChooserDialog
+ https://bugs.webkit.org/show_bug.cgi?id=141392
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Enable INPUT_TYPE_COLOR by default for GTK+ port.
+
+ * Source/cmake/OptionsGTK.cmake:
+
</ins><span class="cx"> 2015-02-09 Sergio Villar Senin <svillar@igalia.com>
</span><span class="cx">
</span><span class="cx"> ASSERTION FAILED: resolvedInitialPosition <= resolvedFinalPosition in WebCore::GridSpan::GridSpan
</span></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/LayoutTests/ChangeLog        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-02-11 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add default color chooser implementation using GtkColorChooserDialog
+ https://bugs.webkit.org/show_bug.cgi?id=141392
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Unskip input color tests.
+
+ * platform/gtk/TestExpectations:
+ * platform/gtk/fast/forms/color/input-appearance-color-expected.txt: Added.
+
</ins><span class="cx"> 2015-02-11 ChangSeok Oh <changseok.oh@collabora.com>
</span><span class="cx">
</span><span class="cx"> Div having contentEditable and display:flex cannot be edited if it is empty.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -160,9 +160,6 @@
</span><span class="cx"> # Datalist is not yet enabled.
</span><span class="cx"> webkit.org/b/98934 fast/forms/datalist [ Skip ]
</span><span class="cx">
</span><del>-# Color input is not yet enabled.
-webkit.org/b/98935 fast/forms/color [ Skip ]
-
</del><span class="cx"> # ENABLE_INPUT_TYPE_* are not enabled.
</span><span class="cx"> webkit.org/b/98936 fast/forms/date [ Skip ]
</span><span class="cx"> webkit.org/b/98936 fast/forms/datetime [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkfastformscolorinputappearancecolorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/gtk/fast/forms/color/input-appearance-color-expected.txt (0 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/fast/forms/color/input-appearance-color-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/gtk/fast/forms/color/input-appearance-color-expected.txt        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -0,0 +1,115 @@
</span><ins>+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {H3} at (0,0) size 784x22
+ RenderText {#text} at (0,0) size 164x21
+ text run at (0,0) width 164: "Default Appearance"
+ RenderBlock (anonymous) at (0,40) size 784x42
+ RenderText {#text} at (0,0) size 456x17
+ text run at (0,0) width 456: "List color controls have different appearance if ENABLE(DATALIST)."
+ RenderBR {BR} at (456,14) size 0x0
+ RenderBlock {INPUT} at (0,18) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#000000] [border: (1px solid #777777)]
+ RenderBlock {INPUT} at (44,18) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#000000] [border: (1px solid #777777)]
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {H3} at (0,100) size 784x23
+ RenderText {#text} at (0,0) size 160x21
+ text run at (0,0) width 160: "Different Font Sizes"
+ RenderBlock (anonymous) at (0,141) size 784x42
+ RenderText {#text} at (0,0) size 577x17
+ text run at (0,0) width 577: "List color controls have different sizes depending on font sizes. Normal color controls don't."
+ RenderBR {BR} at (577,14) size 0x0
+ RenderBlock {INPUT} at (0,18) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#00FF00] [border: (1px solid #777777)]
+ RenderText {#text} at (44,19) size 4x17
+ text run at (44,19) width 4: " "
+ RenderBlock {INPUT} at (48,18) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#00FF00] [border: (1px solid #777777)]
+ RenderText {#text} at (92,19) size 4x17
+ text run at (92,19) width 4: " "
+ RenderBlock {INPUT} at (96,18) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#00FF00] [border: (1px solid #777777)]
+ RenderText {#text} at (140,19) size 4x17
+ text run at (140,19) width 4: " "
+ RenderBlock {INPUT} at (144,18) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#00FF00] [border: (1px solid #777777)]
+ RenderText {#text} at (188,19) size 4x17
+ text run at (188,19) width 4: " "
+ RenderBlock {INPUT} at (192,18) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#00FF00] [border: (1px solid #777777)]
+ RenderText {#text} at (236,19) size 4x17
+ text run at (236,19) width 4: " "
+ RenderBlock {INPUT} at (240,18) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#00FF00] [border: (1px solid #777777)]
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {H3} at (0,200) size 784x23
+ RenderText {#text} at (0,0) size 124x21
+ text run at (0,0) width 124: "Various Colors"
+ RenderBlock (anonymous) at (0,241) size 784x24
+ RenderBlock {INPUT} at (0,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#FF0000] [border: (1px solid #777777)]
+ RenderText {#text} at (44,1) size 4x17
+ text run at (44,1) width 4: " "
+ RenderBlock {INPUT} at (48,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#00FF00] [border: (1px solid #777777)]
+ RenderText {#text} at (92,1) size 4x17
+ text run at (92,1) width 4: " "
+ RenderBlock {INPUT} at (96,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#0000FF] [border: (1px solid #777777)]
+ RenderText {#text} at (140,1) size 4x17
+ text run at (140,1) width 4: " "
+ RenderBlock {INPUT} at (144,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#EC008C] [border: (1px solid #777777)]
+ RenderText {#text} at (188,1) size 4x17
+ text run at (188,1) width 4: " "
+ RenderBlock {INPUT} at (192,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#40E0D0] [border: (1px solid #777777)]
+ RenderText {#text} at (236,1) size 4x17
+ text run at (236,1) width 4: " "
+ RenderBlock {INPUT} at (240,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#FF0000] [border: (1px solid #777777)]
+ RenderText {#text} at (284,1) size 4x17
+ text run at (284,1) width 4: " "
+ RenderBlock {INPUT} at (288,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#00FF00] [border: (1px solid #777777)]
+ RenderText {#text} at (332,1) size 4x17
+ text run at (332,1) width 4: " "
+ RenderBlock {INPUT} at (336,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#0000FF] [border: (1px solid #777777)]
+ RenderText {#text} at (380,1) size 4x17
+ text run at (380,1) width 4: " "
+ RenderBlock {INPUT} at (384,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#EC008C] [border: (1px solid #777777)]
+ RenderText {#text} at (428,1) size 4x17
+ text run at (428,1) width 4: " "
+ RenderBlock {INPUT} at (432,0) size 44x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 38x17
+ RenderBlock {DIV} at (2,4) size 34x9 [bgcolor=#40E0D0] [border: (1px solid #777777)]
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {H3} at (0,283) size 784x23
+ RenderText {#text} at (0,0) size 117x21
+ text run at (0,0) width 117: "Arbitrary Size"
+ RenderBlock (anonymous) at (0,324) size 784x31
+ RenderBlock {INPUT} at (0,0) size 100x30 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 94x24
+ RenderBlock {DIV} at (2,4) size 90x16 [bgcolor=#FF0000] [border: (1px solid #777777)]
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/Source/WebKit2/ChangeLog        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2015-02-11 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add default color chooser implementation using GtkColorChooserDialog
+ https://bugs.webkit.org/show_bug.cgi?id=141392
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * PlatformGTK.cmake: Add new files to compilation.
+ * UIProcess/API/gtk/PageClientImpl.cpp:
+ (WebKit::PageClientImpl::createColorPicker): Call WebColorPickerGtk::create().
+ * UIProcess/gtk/WebColorPickerGtk.cpp: Added.
+ (WebKit::WebColorPickerGtk::create):
+ (WebKit::WebColorPickerGtk::WebColorPickerGtk):
+ (WebKit::WebColorPickerGtk::~WebColorPickerGtk):
+ (WebKit::WebColorPickerGtk::cancel): Set initial color.
+ (WebKit::WebColorPickerGtk::endPicker): Destroy the color chooser dialog.
+ (WebKit::WebColorPickerGtk::didChooseColor): Notify the client.
+ (WebKit::WebColorPickerGtk::colorChooserDialogRGBAChangedCallback):
+ Update the selected color.
+ (WebKit::WebColorPickerGtk::colorChooserDialogResponseCallback):
+ Cancel or finish the operation depending on the dialog response.
+ (WebKit::WebColorPickerGtk::showColorPicker): Create a
+ GtkColorChooserDialog to handle the color picker operation.
+ * UIProcess/gtk/WebColorPickerGtk.h: Added.
+ (WebKit::WebColorPickerGtk::initialColor):
+
</ins><span class="cx"> 2015-02-11 Commit Queue <commit-queue@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r179910.
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -274,6 +274,7 @@
</span><span class="cx"> UIProcess/gtk/InputMethodFilter.cpp
</span><span class="cx"> UIProcess/gtk/RedirectedXCompositeWindow.cpp
</span><span class="cx"> UIProcess/gtk/TextCheckerGtk.cpp
</span><ins>+ UIProcess/gtk/WebColorPickerGtk.cpp
</ins><span class="cx"> UIProcess/gtk/WebContextMenuProxyGtk.cpp
</span><span class="cx"> UIProcess/gtk/WebFullScreenClientGtk.cpp
</span><span class="cx"> UIProcess/gtk/WebInspectorClientGtk.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkPageClientImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "NativeWebKeyboardEvent.h"
</span><span class="cx"> #include "NativeWebMouseEvent.h"
</span><span class="cx"> #include "NotImplemented.h"
</span><ins>+#include "WebColorPickerGtk.h"
</ins><span class="cx"> #include "WebContextMenuProxyGtk.h"
</span><span class="cx"> #include "WebEventFactory.h"
</span><span class="cx"> #include "WebKitWebViewBasePrivate.h"
</span><span class="lines">@@ -226,10 +227,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><del>-PassRefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
</del><ins>+PassRefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color& color, const WebCore::IntRect& rect)
</ins><span class="cx"> {
</span><del>- notImplemented();
- return 0;
</del><ins>+ return WebColorPickerGtk::create(*page, color, rect);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebColorPickerGtkcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/gtk/WebColorPickerGtk.cpp (0 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebColorPickerGtk.cpp         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebColorPickerGtk.cpp        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -0,0 +1,115 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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"
+#include "WebColorPickerGtk.h"
+
+#if ENABLE(INPUT_TYPE_COLOR)
+
+#include "WebPageProxy.h"
+#include <WebCore/GtkUtilities.h>
+#include <glib/gi18n-lib.h>
+#include <gtk/gtk.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassRefPtr<WebColorPickerGtk> WebColorPickerGtk::create(WebPageProxy& page, const Color& initialColor, const IntRect& rect)
+{
+ return adoptRef(new WebColorPickerGtk(page, initialColor, rect));
+}
+
+WebColorPickerGtk::WebColorPickerGtk(WebPageProxy& page, const Color& initialColor, const IntRect&)
+ : WebColorPicker(&page)
+ , m_initialColor(initialColor)
+ , m_webView(page.viewWidget())
+ , m_colorChooser(nullptr)
+{
+}
+
+WebColorPickerGtk::~WebColorPickerGtk()
+{
+ endPicker();
+}
+
+void WebColorPickerGtk::cancel()
+{
+ setSelectedColor(m_initialColor);
+}
+
+void WebColorPickerGtk::endPicker()
+{
+ if (!m_colorChooser)
+ return;
+
+ gtk_widget_destroy(m_colorChooser);
+ m_colorChooser = nullptr;
+}
+
+void WebColorPickerGtk::didChooseColor(const Color& color)
+{
+ if (!m_client)
+ return;
+
+ m_client->didChooseColor(color);
+}
+
+void WebColorPickerGtk::colorChooserDialogRGBAChangedCallback(GtkColorChooser* colorChooser, GParamSpec*, WebColorPickerGtk* colorPicker)
+{
+ GdkRGBA rgba;
+ gtk_color_chooser_get_rgba(colorChooser, &rgba);
+ colorPicker->didChooseColor(rgba);
+}
+
+void WebColorPickerGtk::colorChooserDialogResponseCallback(GtkColorChooser*, int responseID, WebColorPickerGtk* colorPicker)
+{
+ if (responseID != GTK_RESPONSE_OK)
+ colorPicker->cancel();
+ colorPicker->endPicker();
+}
+
+void WebColorPickerGtk::showColorPicker(const Color& color)
+{
+ if (!m_client)
+ return;
+
+ m_initialColor = color;
+
+ if (!m_colorChooser) {
+ GtkWidget* toplevel = gtk_widget_get_toplevel(m_webView);
+ m_colorChooser = gtk_color_chooser_dialog_new(_("Select Color"), WebCore::widgetIsOnscreenToplevelWindow(toplevel) ? GTK_WINDOW(toplevel) : nullptr);
+ gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(m_colorChooser), &m_initialColor);
+ g_signal_connect(m_colorChooser, "notify::rgba", G_CALLBACK(WebColorPickerGtk::colorChooserDialogRGBAChangedCallback), this);
+ g_signal_connect(m_colorChooser, "response", G_CALLBACK(WebColorPickerGtk::colorChooserDialogResponseCallback), this);
+ } else
+ gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(m_colorChooser), &m_initialColor);
+
+ gtk_widget_show(m_colorChooser);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INPUT_TYPE_COLOR)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebColorPickerGtkh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/gtk/WebColorPickerGtk.h (0 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebColorPickerGtk.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebColorPickerGtk.h        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 WebColorPickerGtk_h
+#define WebColorPickerGtk_h
+
+#if ENABLE(INPUT_TYPE_COLOR)
+
+#include "WebColorPicker.h"
+#include <gdk/gdk.h>
+
+typedef struct _GtkColorChooser GtkColorChooser;
+
+namespace WebCore {
+class Color;
+class IntRect;
+}
+
+namespace WebKit {
+
+class WebColorPickerGtk : public WebColorPicker {
+public:
+ static PassRefPtr<WebColorPickerGtk> create(WebPageProxy&, const WebCore::Color&, const WebCore::IntRect&);
+ virtual ~WebColorPickerGtk();
+
+ virtual void endPicker() override;
+ virtual void showColorPicker(const WebCore::Color&) override;
+
+ void cancel();
+
+ const GdkRGBA* initialColor() const { return &m_initialColor; }
+
+protected:
+ WebColorPickerGtk(WebPageProxy&, const WebCore::Color&, const WebCore::IntRect&);
+
+ void didChooseColor(const WebCore::Color&);
+
+ GdkRGBA m_initialColor;
+ GtkWidget* m_webView;
+
+private:
+ static void colorChooserDialogRGBAChangedCallback(GtkColorChooser*, GParamSpec*, WebColorPickerGtk*);
+ static void colorChooserDialogResponseCallback(GtkColorChooser*, int /*responseID*/, WebColorPickerGtk*);
+
+ GtkWidget* m_colorChooser;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(INPUT_TYPE_COLOR)
+#endif // WebColorPickerGtk_h
</ins></span></pre></div>
<a id="trunkSourcecmakeOptionsGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/OptionsGTK.cmake (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/OptionsGTK.cmake        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/Source/cmake/OptionsGTK.cmake        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD_DEPRECATED OFF)
</span><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE OFF)
</span><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE_IN_WORKERS OFF)
</span><del>-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR OFF)
</del><ins>+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR ON)
</ins><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_WEB_AUDIO OFF)
</span><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LINK_PREFETCH OFF)
</span><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CAPTURE OFF)
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/Tools/ChangeLog        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-02-11 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add default color chooser implementation using GtkColorChooserDialog
+ https://bugs.webkit.org/show_bug.cgi?id=141392
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Enable INPUT_TYPE_COLOR by default for GTK+ port.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
</ins><span class="cx"> 2015-02-09 Csaba Osztrogonác <ossy@webkit.org>
</span><span class="cx">
</span><span class="cx"> run-jsc-stress-tests shell test runner should run tests in fixed order
</span></span></pre></div>
<a id="trunkToolsScriptswebkitperlFeatureListpm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitperl/FeatureList.pm (179921 => 179922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitperl/FeatureList.pm        2015-02-11 08:51:55 UTC (rev 179921)
+++ trunk/Tools/Scripts/webkitperl/FeatureList.pm        2015-02-11 09:03:06 UTC (rev 179922)
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx"> define => "ENABLE_INPUT_SPEECH", default => 0, value => \$inputSpeechSupport },
</span><span class="cx">
</span><span class="cx"> { option => "input-type-color", desc => "Toggle Input Type Color support",
</span><del>- define => "ENABLE_INPUT_TYPE_COLOR", default => isEfl(), value => \$inputTypeColorSupport },
</del><ins>+ define => "ENABLE_INPUT_TYPE_COLOR", default => (isEfl() || isGtk()), value => \$inputTypeColorSupport },
</ins><span class="cx">
</span><span class="cx"> { option => "input-type-date", desc => "Toggle Input Type Date support",
</span><span class="cx"> define => "ENABLE_INPUT_TYPE_DATE", default => 0, value => \$inputTypeDateSupport },
</span></span></pre>
</div>
</div>
</body>
</html>