[Webkit-unassigned] [Bug 49245] <input type=file multiple /> button should say "Choose File(s)" instead of "Choose File"
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 29 04:44:45 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=49245
--- Comment #12 from Kentaro Hara <haraken at google.com> 2011-06-29 04:44:44 PST ---
(From update of attachment 98917)
View in context: https://bugs.webkit.org/attachment.cgi?id=98917&action=review
>> LayoutTests/ChangeLog:5
>> + Change a label of the HTML5 file chooser button to "Choose One or More Files"
>
> Do you have other ideas of shorter label?
> "Choose One or More Files" looks too long, and makes the file name area very short.
I changed it to "Choose Files".
>> LayoutTests/fast/forms/input-file-label.html:15
>> +}
>
> You don't need this function. You can use debug(), which is defined in js-test-pre.js.
Done.
>> LayoutTests/fast/forms/input-file-label.html:18
>> + layoutTestController.dumpAsText();
>
> You don't need to call dumpAsText(). js-test-pre.js already called it.
Done.
>> LayoutTests/fast/forms/input-file-label.html:23
>> + print((label == 'Choose File' ? 'PASS' : 'FAIL') + ': The label of a single file chooser was "' + label + '".');
>
> You can use testPassed() and testFailed() defined in js-test-pre.js.
Done.
>> LayoutTests/fast/forms/input-file-label.html:28
>> + print((label == 'Choose One or More Files' ? 'PASS' : 'FAIL') + ': The label of a multiple file chooser was "' + label + '".');
>
> ditto.
Done.
>>> Source/WebCore/html/FileInputType.cpp:49
>>> + static PassRefPtr<UploadButtonElement> create(Document*, bool multiple);
>>
>> bool parameter is not good.
>> - Define an enum, or
>> - Introduce another factory method, like "createForMultiple()"
>
> It's not a construction-time concept, right? This value may change during the button's lifetime. Should we instead change the value as the attribute is added/removed?
Kent: Introduced createForMultiple().
Dimitri: I added destroyShadowSubtree() and createShadowSubtree() in HTMLInputElement::parseMappedAttribute(), so that the shadow tree is re-constructed whenever 'multiple' attribute is changed. I also added its test in input-file-label.html.
>> Source/WebCore/html/FileInputType.cpp:61
>> + multiple ? button->setValue(fileButtonChooseMultipleFilesLabel()) : button->setValue(fileButtonChooseFileLabel());
>
> The ternary operator should be inside setValue() for clarity.
Done.
>> Source/WebKit/chromium/public/WebLocalizedString.h:47
>> +#define WE_WILL_REMOVE_THIS_MACRO_SOON
>
> See my comment for the Chromium change.
Done. Removed this tricky macro.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list