Add color picker API support for WebKit2
I implemented this feature to bug 91832.
Created attachment 161901 [details] Patch I think, it can be handled separately from bug 91832. In this patch, there are two UI client callbacks for show/hide color picker. And one set API for setting selected color.
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Attachment 161901 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/CMakeLists.txt', u'Source/W..." exit_code: 1 Source/WebKit2/UIProcess/WebColorChooserProxy.h:65: The parameter name "client" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 28 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 161904 [details] Patch Fixed style.
Comment on attachment 161904 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161904&action=review > Source/WebKit2/Shared/APIObject.h:111 > + TypeColorPickerResultListener, Wrong alphabetical order. > Source/WebKit2/UIProcess/WebColorChooserProxy.h:65 > + WebColorChooserProxy(Client*); Missing explicit keyword. > Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h:53 > + WebColorPickerResultListenerProxy(WebPageProxy*); ditto.
Created attachment 161950 [details] Patch Fixed coding style and added explicit keyword.
Comment on attachment 161950 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161950&action=review > Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp:39 > +void WKColorPickerResultListenerColorSet(WKColorPickerResultListenerRef listenerRef, const WKStringRef color) WKColorPickerResultListenerColorSet -> WKColorPickerResultListenerSetColor ? We shouldn't use Yoda style here, this isn't EFL :)
Created attachment 161973 [details] Patch WKColorPickerResultListenerColorSet -> WKColorPickerResultListenerSetColor
Comment on attachment 161973 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161973&action=review It looks showColorPicker and hideColorPicker are duplicate with Bug 91832. Do you explain what is difference between this bug and Bug 91832 ? > Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp:35 > +{ Missing #if ENABLE() macro.
(In reply to comment #10) > (From update of attachment 161973 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=161973&action=review > > It looks showColorPicker and hideColorPicker are duplicate with Bug 91832. Do you explain what is difference between this bug and Bug 91832 ? This patch has only WK2 C API part. I will change bug 91832 to use this patch. It's EFL API implementation. > > > Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp:35 > > +{ > > Missing #if ENABLE() macro. I think, WKColorPickerResultListenerGetTypeID() should return TypeColorPickerResultListener always even though ENABLE(COLOR_INPUT_TYPE) is not defined. So I'm not using ENABLE() macro. WKColorPickerResultListenerGetTypeID() may return 0 instead of TypeColorPickerResultListener?
Created attachment 162751 [details] Patch Added #if ENABLE()
Looks find on my side. Simon, could you take a look this patch ?
If there is no comment by tomorrow, I'd like to set r+.
Comment on attachment 162751 [details] Patch Rejecting attachment 162751 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: hing file Source/WebKit2/win/WebKit2.vcproj patching file Source/WebKit2/win/WebKit2Generated.make patching file Tools/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Tools/MiniBrowser/mac/BrowserWindowController.m patching file Tools/MiniBrowser/win/BrowserView.cpp patching file Tools/WebKitTestRunner/TestController.cpp Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Gyuyoung K..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue Full output: http://queues.webkit.org/results/13845413
Created attachment 164032 [details] Patch Rebased.
Comment on attachment 164032 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164032&action=review > Source/WebKit2/Shared/API/c/WKBase.h:127 > +typedef const struct OpaqueWKColorPickerResultListener* WKColorPickerResultListenerRef; Nit: Wrong alphabetical order.
Created attachment 164035 [details] Patch Fixed alphabetical order.
Comment on attachment 164035 [details] Patch Clearing flags on attachment: 164035 Committed r128553: <http://trac.webkit.org/changeset/128553>
All reviewed patches have been landed. Closing bug.