WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
69598
Pass Parsed Accept Attribute MIME Types to WebKit Clients
https://bugs.webkit.org/show_bug.cgi?id=69598
Summary
Pass Parsed Accept Attribute MIME Types to WebKit Clients
Joseph Pecoraro
Reported
2011-10-06 19:52:41 PDT
Rather then have each of the WebKit clients parse the MIME types from the accept attribute string via FileChooser, WebCore should parse the string and pass a list. WebCore already has the HTML5 compatible parser logic. NOTE: Chromium is the only client that uses the "acceptType" attribute of FileChooser right now. They pass it along as a string and parse it later in chromium code. See also: <
http://webkit.org/b/51045
> [Qt] Implement HTML File Input "accept" attribute <
http://webkit.org/b/45079
> HTML <input type="file"> accept attribute
Attachments
[PATCH] Proposed Fix
(7.13 KB, patch)
2011-10-06 20:02 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
[PATCH] Part 1 - Deprecate String version of acceptTypes
(3.70 KB, patch)
2011-10-07 12:45 PDT
,
Joseph Pecoraro
gyuyoung.kim
: commit-queue-
Details
Formatted Diff
Diff
[PATCH] Part 2 - Switch a WebKit2 mirror struct to just use WebCore::FileChooserSettings
(16.35 KB, patch)
2011-10-07 12:46 PDT
,
Joseph Pecoraro
andersca
: review+
Details
Formatted Diff
Diff
[PATCH] Part 3 - Add acceptMIMETypes parsed list to FileChooserSettings
(5.75 KB, patch)
2011-10-07 12:47 PDT
,
Joseph Pecoraro
ddkilzer
: review+
Details
Formatted Diff
Diff
[PATCH] Part 1 - Deprecate String version of acceptTypes (Fix EFL)
(6.20 KB, patch)
2011-10-07 14:34 PDT
,
Joseph Pecoraro
gustavo
: commit-queue-
Details
Formatted Diff
Diff
[PATCH] Part 1 - Deprecate String version of acceptTypes (Fix Builds)
(8.03 KB, patch)
2011-10-11 10:29 PDT
,
Joseph Pecoraro
tkent
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2011-10-06 20:02:25 PDT
Created
attachment 110082
[details]
[PATCH] Proposed Fix I think this is the preferable approach. Rather then passing the "accept" attribute string to WebKit clients, we instead pass the parsed list of trimmed MIME types. This way ports don't have to write their own, possibly differing parsing implementations and we can make use of the HTML5 parsers already in WebCore. I'm not very familiar with WK2, but this looks like it would affect the WebKit2 API. Does that require any special considerations?
Joseph Pecoraro
Comment 2
2011-10-07 12:44:13 PDT
Comment on
attachment 110082
[details]
[PATCH] Proposed Fix Clearing flags. Based on some feedback I'm going to do some extra clean-up and break this up into parts.
Joseph Pecoraro
Comment 3
2011-10-07 12:45:44 PDT
Created
attachment 110198
[details]
[PATCH] Part 1 - Deprecate String version of acceptTypes Chromium folks, check out Part 3 when it is up. Instead of parsing the mime types in chromium WebKit ports should share the implementation in WebCore.
Joseph Pecoraro
Comment 4
2011-10-07 12:46:42 PDT
Created
attachment 110199
[details]
[PATCH] Part 2 - Switch a WebKit2 mirror struct to just use WebCore::FileChooserSettings
Joseph Pecoraro
Comment 5
2011-10-07 12:47:23 PDT
Created
attachment 110200
[details]
[PATCH] Part 3 - Add acceptMIMETypes parsed list to FileChooserSettings
Gyuyoung Kim
Comment 6
2011-10-07 13:59:34 PDT
Comment on
attachment 110198
[details]
[PATCH] Part 1 - Deprecate String version of acceptTypes
Attachment 110198
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/10006296
Joseph Pecoraro
Comment 7
2011-10-07 14:30:39 PDT
(In reply to
comment #6
)
> (From update of
attachment 110198
[details]
) >
Attachment 110198
[details]
did not pass efl-ews (efl): > Output:
http://queues.webkit.org/results/10006296
Looks like the EFL port also used this and exposed it to their api as a char*: Eina_Bool (*run_open_panel)(Ewk_View_Smart_Data *sd, Evas_Object *frame, Eina_Bool allows_multiple_files, const char *accept_types, Eina_List **selected_filenames); If they want to move away from the deprecated type It looks like they could upgrade their API to use an Eina_List* for the MIME types list. I'll update Part 1.
Joseph Pecoraro
Comment 8
2011-10-07 14:34:49 PDT
Created
attachment 110217
[details]
[PATCH] Part 1 - Deprecate String version of acceptTypes (Fix EFL)
Gustavo Noronha (kov)
Comment 9
2011-10-07 18:24:00 PDT
Comment on
attachment 110217
[details]
[PATCH] Part 1 - Deprecate String version of acceptTypes (Fix EFL)
Attachment 110217
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/10006349
Kent Tamura
Comment 10
2011-10-10 20:57:20 PDT
Part 1 and Part3 look reasonable. Please fix build failures of GTK and Windows.
Joseph Pecoraro
Comment 11
2011-10-11 10:29:20 PDT
Created
attachment 110533
[details]
[PATCH] Part 1 - Deprecate String version of acceptTypes (Fix Builds) I forgot to change the WebKit2 one that gets removed in the next patch. I retroactively created the patches. Lets give this one a shot on the bots, while my system is having a little bit of trouble building in general.
Kent Tamura
Comment 12
2011-10-11 16:25:04 PDT
Comment on
attachment 110533
[details]
[PATCH] Part 1 - Deprecate String version of acceptTypes (Fix Builds) Looks good.
David Kilzer (:ddkilzer)
Comment 13
2011-10-12 12:39:42 PDT
Comment on
attachment 110200
[details]
[PATCH] Part 3 - Add acceptMIMETypes parsed list to FileChooserSettings r=me
Joseph Pecoraro
Comment 14
2011-10-12 19:54:35 PDT
Landed the 3 Parts in:
http://trac.webkit.org/changeset/97336
http://trac.webkit.org/changeset/97337
http://trac.webkit.org/changeset/97338
Joseph Pecoraro
Comment 15
2011-10-12 23:42:14 PDT
The bots look good. I think this is the first time I had 3 patches reviewed by 3 different people. Thanks for coming together! To remove the deprecated string I filed bugs on EFL and Chromium: <
http://webkit.org/b/70002
> [EFL]: Move from FileChooserSettings deprecatedAcceptType to acceptMIMETypes <
http://webkit.org/b/70003
> [Chromium]: Move from FileChooserSettings deprecatedAcceptType to acceptMIMETypes
Jon Lee
Comment 16
2011-11-07 11:24:22 PST
***
Bug 45079
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.
Top of Page
Format For Printing
XML
Clone This Bug