Bug 91956

Summary: [EFL] Change prototype of run_open_panel
Product: WebKit Reporter: Kihong Kwon <kihong.kwon>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gyuyoung.kim, haraken, lucas.de.marchi, rakuco, sw0524.lee, vimff0, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Unspecified   
Bug Depends on: 91957    
Bug Blocks: 91842    
Attachments:
Description Flags
Patch
none
Patch none

Description Kihong Kwon 2012-07-22 21:15:12 PDT
There are many attributes for fileChooser.
And we need to use capture attribute to implement HTML media capture on the EFL.

But we can not use that, because function prototype is like below.
- Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Eina_Bool allows_multiple_files, Eina_List *accept_types, Eina_List **selected_filenames);
We can used only two attributes with this prototype.(allows_multiple_files and accept_types)

Therefore I think we need to change this prototype to like this.
- Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Ewk_File_Chooser_Settings *settings, Eina_List **selected_filenames);
Comment 1 Kihong Kwon 2012-07-25 03:50:46 PDT
Created attachment 154315 [details]
Patch
Comment 2 Raphael Kubo da Costa (:rakuco) 2012-07-25 07:56:37 PDT
Comment on attachment 154315 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154315&action=review

> Source/WebKit/efl/ChangeLog:10
> +        i.e., change "Eina_Bool allows_multiple_files, Eina_List *accpet_types"

Nit: s/accpet/accept/

> Source/WebKit/efl/ewk/ewk_view.h:191
> -    Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Eina_Bool allows_multiple_files, Eina_List *accept_types, Eina_List **selected_filenames);
> +    Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Ewk_File_Chooser *file_chooser, Eina_List **selected_filenames);

Whenever you change this public smart class you must update EWK_VIEW_SMART_CLASS_VERSION below.
Comment 3 Chris Dumez 2012-07-25 08:06:07 PDT
Comment on attachment 154315 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154315&action=review

> Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp:487
>          filenames.append((char*)filename);

I know this is not related to your patch but since you're touching this part of the code:
We should probably use here: filenames.append(String::fromUTF8(static_cast<char*>(filename)));
Comment 4 Kihong Kwon 2012-07-26 19:33:46 PDT
Comment on attachment 154315 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154315&action=review

>> Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp:487
>>          filenames.append((char*)filename);
> 
> I know this is not related to your patch but since you're touching this part of the code:
> We should probably use here: filenames.append(String::fromUTF8(static_cast<char*>(filename)));

OK, I will do that.

>> Source/WebKit/efl/ewk/ewk_view.h:191
>> +    Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Ewk_File_Chooser *file_chooser, Eina_List **selected_filenames);
> 
> Whenever you change this public smart class you must update EWK_VIEW_SMART_CLASS_VERSION below.

Done.
Comment 5 Kihong Kwon 2012-07-26 19:38:18 PDT
Created attachment 154816 [details]
Patch
Comment 6 Raphael Kubo da Costa (:rakuco) 2012-07-26 20:06:33 PDT
Comment on attachment 154816 [details]
Patch

Looks fine.
Comment 7 Kentaro Hara 2012-07-26 22:36:05 PDT
Comment on attachment 154816 [details]
Patch

rs=me
Comment 8 WebKit Review Bot 2012-07-27 00:56:57 PDT
Comment on attachment 154816 [details]
Patch

Clearing flags on attachment: 154816

Committed r123847: <http://trac.webkit.org/changeset/123847>
Comment 9 WebKit Review Bot 2012-07-27 00:57:02 PDT
All reviewed patches have been landed.  Closing bug.