RESOLVED FIXED 119120
[EFL][WK2] Move and make WKColorPickerResultListener to EFL specific interface
https://bugs.webkit.org/show_bug.cgi?id=119120
Summary [EFL][WK2] Move and make WKColorPickerResultListener to EFL specific interface
Ryuan Choi
Reported 2013-07-25 19:30:20 PDT
As 61276 and 119030 addressed, WK2 ports implement color picker as two way. 1. inherit WebColorPicker 2. register PageUIClient Callback Only EFL port implements it as second way. Second way might be good for some ports to expose UIClient as WK API. But I think that it just make confusion. I will refactor EFL port to use first way.
Attachments
Patch (16.29 KB, patch)
2013-07-25 19:39 PDT, Ryuan Choi
no flags
Patch (16.39 KB, patch)
2013-07-31 18:35 PDT, Ryuan Choi
no flags
another suggestion (26.43 KB, patch)
2013-08-05 01:28 PDT, Ryuan Choi
no flags
another suggestion (41.45 KB, patch)
2013-08-05 02:39 PDT, Ryuan Choi
no flags
another suggestion (43.72 KB, patch)
2013-08-05 02:57 PDT, Ryuan Choi
no flags
another suggestion (54.50 KB, patch)
2013-08-05 03:15 PDT, Ryuan Choi
no flags
another suggestion (57.34 KB, patch)
2013-08-05 03:50 PDT, Ryuan Choi
no flags
rebased (56.67 KB, patch)
2014-02-04 21:19 PST, Ryuan Choi
no flags
rebased (56.66 KB, patch)
2014-02-04 21:48 PST, Ryuan Choi
no flags
rebased (56.61 KB, patch)
2014-02-04 21:50 PST, Ryuan Choi
no flags
Patch (56.52 KB, patch)
2014-02-17 19:22 PST, Ryuan Choi
no flags
Ryuan Choi
Comment 1 2013-07-25 19:39:45 PDT
Ryuan Choi
Comment 2 2013-07-31 18:35:31 PDT
Gyuyoung Kim
Comment 3 2013-07-31 19:03:10 PDT
(In reply to comment #0) > As 61276 and 119030 addressed, WK2 ports implement color picker as two way. > 1. inherit WebColorPicker > 2. register PageUIClient Callback > > Only EFL port implements it as second way. > Second way might be good for some ports to expose UIClient as WK API. > But I think that it just make confusion. > > I will refactor EFL port to use first way. As far as I know, we have tried to use C API instead of inheriting WK2 internal class. This may violate a layer rule on EFL ewk implementation. Why not we use second way ?
Chris Dumez
Comment 4 2013-07-31 22:40:49 PDT
Comment on attachment 207892 [details] Patch We are using the C API on purpose. Using internal wk2 types from our API layer is a layering violation. Therefore, I believe this patch is a step in the wrong direction.
Ryuan Choi
Comment 5 2013-08-05 01:28:16 PDT
Created attachment 208110 [details] another suggestion
Ryuan Choi
Comment 6 2013-08-05 01:34:33 PDT
(In reply to comment #4) > (From update of attachment 207892 [details]) > We are using the C API on purpose. Using internal wk2 types from our API layer is a layering violation. Therefore, I believe this patch is a step in the wrong direction. OK, but previous logic looks confusing because there were two paths in WebPageProxy and m_uiClient.showColorPicker was only for EFL (at least now) Instead, I added Efl specific WK API to isolate color picker callbacks only for EFL.
Early Warning System Bot
Comment 7 2013-08-05 01:39:53 PDT
Comment on attachment 208110 [details] another suggestion Attachment 208110 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1357023
Build Bot
Comment 8 2013-08-05 01:53:40 PDT
Comment on attachment 208110 [details] another suggestion Attachment 208110 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1377054
Build Bot
Comment 9 2013-08-05 02:07:38 PDT
Comment on attachment 208110 [details] another suggestion Attachment 208110 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1378051
Ryuan Choi
Comment 10 2013-08-05 02:39:32 PDT
Created attachment 208113 [details] another suggestion
Early Warning System Bot
Comment 11 2013-08-05 02:45:39 PDT
Comment on attachment 208113 [details] another suggestion Attachment 208113 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1380071
Ryuan Choi
Comment 12 2013-08-05 02:57:51 PDT
Created attachment 208114 [details] another suggestion
Early Warning System Bot
Comment 13 2013-08-05 03:04:23 PDT
Comment on attachment 208114 [details] another suggestion Attachment 208114 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1375063
Ryuan Choi
Comment 14 2013-08-05 03:15:24 PDT
Created attachment 208115 [details] another suggestion
Build Bot
Comment 15 2013-08-05 03:40:17 PDT
Comment on attachment 208115 [details] another suggestion Attachment 208115 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1376096
Gyuyoung Kim
Comment 16 2013-08-05 03:44:52 PDT
Comment on attachment 208114 [details] another suggestion View in context: https://bugs.webkit.org/attachment.cgi?id=208114&action=review r- because qt-wk2 ews is failed. > Source/WebKit2/ChangeLog:3 > + [EFL][WK2] Refactor color picker implementation I'm not sure if we can use [EFL] prefix in title. Because this patch influences on QT and GTK ports. How about changing with "[WK2] Refactor color picker implementation for EFL port." ? It looks you need to get approval of WK2 owner. > Source/WebKit2/ChangeLog:12 > + So, this patch introduce WKColorPickerClient which is new WK interface introduces ?
Ryuan Choi
Comment 17 2013-08-05 03:50:43 PDT
Created attachment 208116 [details] another suggestion
Ryuan Choi
Comment 18 2013-08-05 04:04:12 PDT
(In reply to comment #16) > (From update of attachment 208114 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=208114&action=review > > r- because qt-wk2 ews is failed. > Sorry for noise, I hope that last patch be fine for all wk2 bot. > > Source/WebKit2/ChangeLog:3 > > + [EFL][WK2] Refactor color picker implementation > > I'm not sure if we can use [EFL] prefix in title. Because this patch influences on QT and GTK ports. How about changing with "[WK2] Refactor color picker implementation for EFL port." ? It looks you need to get approval of WK2 owner. > I agree with you, so I wanted to separate patches about it because I think that this is for EFL. If this approach is acceptable, I can move ColorPickerResultListener related files in another bug before landing this. Or just removing "[EFL]" is acceptable, I will do it. > > Source/WebKit2/ChangeLog:12 > > + So, this patch introduce WKColorPickerClient which is new WK interface > > introduces ? OK, I will fix it in next patch.
Chris Dumez
Comment 19 2013-08-09 03:22:20 PDT
Comment on attachment 208116 [details] another suggestion View in context: https://bugs.webkit.org/attachment.cgi?id=208116&action=review It is really not clear to me why this patch improves the current situation and the Changelog does not clarify things. It seems this patch mostly move generic WK2 code and makes it EFL-specific (thus preventing other ports from using it). > Source/WebKit2/ChangeLog:8 > + Since r153541, WK2 port removed a way to register PageUIClient Callbacks, I don't understand this sentence. > Source/WebKit2/ChangeLog:19 > + * UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Renamed from Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp. I'm not sure we want to move this one to efl/. iirc, the file was put there in the first place because other ports showed interest in using it as well.
Santosh Mahto
Comment 20 2013-08-23 06:23:00 PDT
Hi ryuan Crash is happening while clicking to launch color picker. It looks to me efl need your colorful this patch.
Gyuyoung Kim
Comment 21 2013-12-25 21:04:27 PST
Any update ?
Ryuan Choi
Comment 22 2014-01-01 20:51:14 PST
Comment on attachment 208116 [details] another suggestion Clearing flags. At least, this patch should be rebased.
Ryuan Choi
Comment 23 2014-02-04 21:19:29 PST
Ryuan Choi
Comment 24 2014-02-04 21:27:04 PST
(In reply to comment #19) > (From update of attachment 208116 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=208116&action=review > > It is really not clear to me why this patch improves the current situation and the Changelog does not clarify things. It seems this patch mostly move generic WK2 code and makes it EFL-specific (thus preventing other ports from using it). > > > Source/WebKit2/ChangeLog:8 > > + Since r153541, WK2 port removed a way to register PageUIClient Callbacks, > > I don't understand this sentence. > > > Source/WebKit2/ChangeLog:19 > > + * UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Renamed from Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp. > > I'm not sure we want to move this one to efl/. iirc, the file was put there in the first place because other ports showed interest in using it as well. I updated bug title and change log little bit. Since I made this patch, EFL port has a crash when accessed color input. I don't know who want to use WKColorPickerResultListener but I believe that EFL port will only use it until new port are appeared. So, I want to move them out of the common code until someone raise their needs once more.
Jinwoo Song
Comment 25 2014-02-04 21:42:12 PST
Comment on attachment 223207 [details] rebased View in context: https://bugs.webkit.org/attachment.cgi?id=223207&action=review > Source/WebKit2/UIProcess/efl/ViewClientEfl.h:56 > +#if ENABLE(TOUCH_EVENTS) INPUT_TYPE_COLOR?
Ryuan Choi
Comment 26 2014-02-04 21:45:46 PST
Comment on attachment 223207 [details] rebased View in context: https://bugs.webkit.org/attachment.cgi?id=223207&action=review >> Source/WebKit2/UIProcess/efl/ViewClientEfl.h:56 >> +#if ENABLE(TOUCH_EVENTS) > > INPUT_TYPE_COLOR? Unbelievable. I will fix it. Thank you so much.
Ryuan Choi
Comment 27 2014-02-04 21:48:26 PST
Ryuan Choi
Comment 28 2014-02-04 21:50:27 PST
Gyuyoung Kim
Comment 29 2014-02-17 16:14:08 PST
Comment on attachment 223210 [details] rebased View in context: https://bugs.webkit.org/attachment.cgi?id=223210&action=review > Source/WebKit2/ChangeLog:9 > + Indeed, it does not work since refactored common logic for ColorPicker in WebPageProxy. Are you sure if Mac or GTK won't use this logic in future ? > Source/WebKit2/UIProcess/efl/ViewClientEfl.cpp:199 > +#if ENABLE(INPUT_TYPE_COLOR) Why can't we initialize colorPickerClient when color picker needs to be shown ? > Source/WebKit2/UIProcess/efl/WebColorPickerEfl.h:48 > + void didChooseColor(const WebCore::Color&); Add a new line.
Ryuan Choi
Comment 30 2014-02-17 17:54:03 PST
Comment on attachment 223210 [details] rebased View in context: https://bugs.webkit.org/attachment.cgi?id=223210&action=review >> Source/WebKit2/ChangeLog:9 >> + Indeed, it does not work since refactored common logic for ColorPicker in WebPageProxy. > > Are you sure if Mac or GTK won't use this logic in future ? Absolutely. Mac implemented color picker using another way and GTK port does not use WK interface(And GTK also use color picker like Mac port, IIRC) They don't need to use interface because they can implement picker in the platform. But in EFL side, we can't implement complex UI components in ewebkit because we don't use elm. >> Source/WebKit2/UIProcess/efl/ViewClientEfl.cpp:199 >> +#if ENABLE(INPUT_TYPE_COLOR) > > Why can't we initialize colorPickerClient when color picker needs to be shown ? It is to receive callback which notify when color picker needs to be shown. >> Source/WebKit2/UIProcess/efl/WebColorPickerEfl.h:48 >> + void didChooseColor(const WebCore::Color&); > > Add a new line. OK, I will add it.
Ryuan Choi
Comment 31 2014-02-17 19:22:05 PST
Gyuyoung Kim
Comment 32 2014-02-17 20:54:21 PST
Comment on attachment 224459 [details] Patch This patch was created a very long time ago. I think now is time to move this to EFL specific place. However, if any port will want to use this concept in future, we need to roll this change back. Looks fine for now.
Ryuan Choi
Comment 33 2014-02-17 21:08:11 PST
Comment on attachment 224459 [details] Patch Clearing flags on attachment: 224459 Committed r164271: <http://trac.webkit.org/changeset/164271>
Ryuan Choi
Comment 34 2014-02-17 21:08:21 PST
All reviewed patches have been landed. Closing bug.
Michal Pakula vel Rutka
Comment 35 2014-02-18 05:32:48 PST
*** Bug 126067 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.