.webp not listed when accept="image/*"
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: asia, Assigned: michael.katilevsky)
References
Details
(Keywords: good-first-bug)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
Steps to reproduce:
I opened a HTML page with:
<input type="file" accept="image/*" />
While the file picker opened, no '.webp' files listed.
Actual results:
No '.webp' extension files listed.
Expected results:
Have .webp file listed.
Another BUG: https://bugzilla.mozilla.org/show_bug.cgi?id=1619153
.jpeg not listed when accept="image/jpeg"
Updated•4 years ago
|
Comment 2•4 years ago
|
||
This should be a matter of adding the extension to https://searchfox.org/mozilla-central/source/toolkit/content/filepicker.properties#8 .
Comment 3•4 years ago
|
||
Indeed it's only a matter of adding the extension to that list, you're right: image/* video/* and audio/* have hardcoded extension list, unlike generic mime type, for which the logic is more complex, and involves an hardcoded list and information retrieved from the OS.
I'm fine implementing the change but I'm not sure however who should review it. Probably Peter since he is the module of dom/* according to 1?
Note the file is located in toolkit/content but it is actually used in dom/html/HTMLInputElement.cpp 2
Comment 4•4 years ago
|
||
Maybe Mounir could review the change as well since he originally worked on this, but I'm not sure if he is still working on this Firefox those days?
Hi! I noticed there is no assignee for this bug, and I would love to fix it as my first bug contribution! Would it be possible to assign me to this bug? Thanks a lot!
Updated•4 years ago
|
Hi! I was able to replicate the bug and believe to have applied a fix. Here are screenshots demonstrating the before and after behavior of the functionality in question:
Before fix, no .webp files could be selected: <br>
![Before](https://i.imgur.com/8NZQf1c.png =450x)
After fix, .webp files can now be uploaded: <br>
![After](https://i.imgur.com/mQWRCZG.png =450x)
I submitted a fix for the bug, I am however not sure whom to set as reviewer(s) for the patch. Please let me know if there is someone I could set as reviewer, if necessary!
Best
Comment 8•4 years ago
|
||
(In reply to Michael from comment #7)
I submitted a fix for the bug,
Thank you.
I am however not sure whom to set as reviewer(s) for the patch. Please let me know if there is someone I could set as reviewer, if necessary!
In general, the way this is supposed to work is that you match the code you are changing to the module list at https://wiki.mozilla.org/Modules/All . However, as comment 3 points out, this file is actually used by DOM code rather than Toolkit code, so a DOM peer review should be enough. I've reviewed the patch.
If the "View Stack in Lando" link on Phabricator doesn't let you land this, I can land this as well.
(In reply to Henri Sivonen (:hsivonen) from comment #8)
In general, the way this is supposed to work is that you match the code you are changing to the module list at https://wiki.mozilla.org/Modules/All . However, as comment 3 points out, this file is actually used by DOM code rather than Toolkit code, so a DOM peer review should be enough. I've reviewed the patch.
I see, thank you very much for the info - and for the revision!
If the "View Stack in Lando" link on Phabricator doesn't let you land this, I can land this as well.
Unfortunately I do not have Level 3 Commit Access, so I am unable to land this; I would really appreciate it if you could land this instead! Thanks a lot for your time :)
Comment 10•4 years ago
|
||
I think you should be able to set the "Check-in Needed" tag in "Edit Revision". To expedite the process I just triggered lando myself.
Comment 11•4 years ago
|
||
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/02ef6cee073c Added .webp to supported image file types so that it is possible to upload .webp files. r=hsivonen
Comment 12•4 years ago
|
||
Backed out for mochitest failures on test_input_file_picker.html.
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=293591231&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/70f8ce3e2d394a8c4d08725b108003844abbbff9
[task 2020-03-18T00:31:34.281Z] 00:31:34 INFO - 304 INFO TEST-PASS | dom/html/test/forms/test_input_file_picker.html | filterAll is missing (d)
[task 2020-03-18T00:31:34.281Z] 00:31:34 INFO - Buffered messages finished
[task 2020-03-18T00:31:34.281Z] 00:31:34 WARNING - 305 INFO TEST-UNEXPECTED-FAIL | dom/html/test/forms/test_input_file_picker.html | Correct filters should have been added (d) - got "*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp; *.ico; *.svg; *.svgz; *.tif; *.tiff; *.ai; *.drw; *.pct; *.psp; *.xcf; *.psd; *.raw; *.webp; *.aac; *.aif; *.flac; *.iff; *.m4a; *.m4b; *.mid; *.midi; *.mp3; *.mpa; *.mpc; *.oga; *.ogg; *.ra; *.ram; *.snd; *.wav; .wma", expected ".jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp; *.ico; *.svg; *.svgz; *.tif; *.tiff; *.ai; *.drw; *.pct; *.psp; *.xcf; *.psd; *.raw; *.aac; *.aif; *.flac; *.iff; *.m4a; *.m4b; *.mid; *.midi; *.mp3; *.mpa; *.mpc; *.oga; *.ogg; *.ra; *.ram; *.snd; *.wav; *.wma"
[task 2020-03-18T00:31:34.281Z] 00:31:34 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:383:14
[task 2020-03-18T00:31:34.281Z] 00:31:34 INFO - runTests/MockFilePicker.showCallback/<@dom/html/test/forms/test_input_file_picker.html:249:13
[task 2020-03-18T00:31:34.281Z] 00:31:34 INFO - 306 INFO TEST-PASS | dom/html/test/forms/test_input_file_picker.html | appendFilters not called as often as expected (d)
Assignee | ||
Comment 13•4 years ago
|
||
It appears to me that test_input_file_picker.html fails simply because ".webp" was not added as a known file extension in test_input_file_picker.html. I will add ".webp" to test_input_file_picker.html and push a new patch; hopefully that will fix it.
Comment 14•4 years ago
|
||
Pushed by rgurzau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e1b78dd147a1 Added .webp to supported image file types so that it is possible to upload .webp files. r=hsivonen
Comment 15•4 years ago
|
||
bugherder |
Description
•