RESOLVED FIXED Bug 63063
[EFL] Use accept attribute when executing the file picker for input element
https://bugs.webkit.org/show_bug.cgi?id=63063
Summary [EFL] Use accept attribute when executing the file picker for input element
Jongseok Yang
Reported 2011-06-21 06:01:33 PDT
The accept attribute is only used with <input type="file"> and it specifies the types of files that can be submitted through a file upload. EFL port should use the attribute within the function "ChromeClientEfl::runOpenPanel()"
Attachments
Use accept attribute for the file picker for INPUT element (5.91 KB, patch)
2011-06-21 06:29 PDT, Jongseok Yang
leandro: review-
fix the naming scheme (5.92 KB, patch)
2011-06-21 19:51 PDT, Jongseok Yang
no flags
fix the naming scheme (5.92 KB, patch)
2011-06-24 01:03 PDT, Jongseok Yang
tkent: review-
fix build error (5.96 KB, patch)
2011-06-26 23:39 PDT, Jongseok Yang
no flags
Jongseok Yang
Comment 1 2011-06-21 06:29:22 PDT
Created attachment 97977 [details] Use accept attribute for the file picker for INPUT element
Ryuan Choi
Comment 2 2011-06-21 07:05:24 PDT
Good point. I didn't know that file type should control 'accept'. Anyway. Could you explain little bit about why we can remove suggestedFilenames. View in context: https://bugs.webkit.org/attachment.cgi?id=97977&action=review > Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp:429 > + CString accept = chooser->acceptTypes().utf8(); > + confirm = ewk_view_run_open_panel(m_view, kit(frame), chooser->allowsMultipleFiles(), accept.data(), &selectedFilenames); And as small thing, I think that it's no need to store it into accept.
Leandro Pereira
Comment 3 2011-06-21 14:56:24 PDT
Comment on attachment 97977 [details] Use accept attribute for the file picker for INPUT element Looks good; but please fix the naming scheme on the ewk_* files.
Gyuyoung Kim
Comment 4 2011-06-21 19:06:11 PDT
Comment on attachment 97977 [details] Use accept attribute for the file picker for INPUT element View in context: https://bugs.webkit.org/attachment.cgi?id=97977&action=review > Source/WebKit/efl/ewk/ewk_private.h:99 > +Eina_Bool ewk_view_run_open_panel(Evas_Object* o, Evas_Object* frame, Eina_Bool allows_multiple_files, const char* acceptTypes, Eina_List** selected_filenames); For efl style, it is better to change acceptTypes with accept_types.
Jongseok Yang
Comment 5 2011-06-21 19:51:05 PDT
Created attachment 98105 [details] fix the naming scheme
Jongseok Yang
Comment 6 2011-06-21 20:00:04 PDT
(In reply to comment #2) > Good point. > I didn't know that file type should control 'accept'. > > Anyway. > Could you explain little bit about why we can remove suggestedFilenames. > > View in context: https://bugs.webkit.org/attachment.cgi?id=97977&action=review > > > Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp:429 > > + CString accept = chooser->acceptTypes().utf8(); > > + confirm = ewk_view_run_open_panel(m_view, kit(frame), chooser->allowsMultipleFiles(), accept.data(), &selectedFilenames); > > And as small thing, I think that it's no need to store it into accept. I had thought that suggestedFilenames was not required. I found out the below statement from HTML4 specification and I could not find out any comment about that from HTML5 "Creates a file select control. User agents may use the value of the value attribute as the initial file name." I think that it's just implementation choice. If you want to use the value, I will fix that.
Ryuan Choi
Comment 7 2011-06-21 20:06:01 PDT
(In reply to comment #6) > (In reply to comment #2) > > Good point. > > I didn't know that file type should control 'accept'. > > > > Anyway. > > Could you explain little bit about why we can remove suggestedFilenames. > > > > View in context: https://bugs.webkit.org/attachment.cgi?id=97977&action=review > > > > > Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp:429 > > > + CString accept = chooser->acceptTypes().utf8(); > > > + confirm = ewk_view_run_open_panel(m_view, kit(frame), chooser->allowsMultipleFiles(), accept.data(), &selectedFilenames); > > > > And as small thing, I think that it's no need to store it into accept. > > I had thought that suggestedFilenames was not required. > I found out the below statement from HTML4 specification and I could not find out any comment about that from HTML5 > "Creates a file select control. User agents may use the value of the value attribute as the initial file name." > > I think that it's just implementation choice. > If you want to use the value, I will fix that. Thanks, I agree with you. I couldn't find any way to give suggestedFilenames also.
Jongseok Yang
Comment 8 2011-06-24 01:03:48 PDT
Created attachment 98471 [details] fix the naming scheme fix the naming scheme from ewk_view.cpp
Kent Tamura
Comment 9 2011-06-24 03:37:58 PDT
Comment on attachment 98471 [details] fix the naming scheme r- because of EWS failures.
Jongseok Yang
Comment 10 2011-06-26 23:39:55 PDT
Created attachment 98666 [details] fix build error The cause for build error was that The FileChooser interface was changed by other-side. I applied the new interface for FileChooser to my patch.
Gyuyoung Kim
Comment 11 2011-06-27 00:04:57 PDT
Comment on attachment 98666 [details] fix build error LGTM.
Kent Tamura
Comment 12 2011-06-27 03:02:31 PDT
Comment on attachment 98666 [details] fix build error Rubber-stamped by me
WebKit Review Bot
Comment 13 2011-06-27 03:46:08 PDT
Comment on attachment 98666 [details] fix build error Clearing flags on attachment: 98666 Committed r89812: <http://trac.webkit.org/changeset/89812>
WebKit Review Bot
Comment 14 2011-06-27 03:46:13 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.