2011-06-30 Kentaro Hara <haraken@google.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jun 2011 10:40:32 +0000 (10:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jun 2011 10:40:32 +0000 (10:40 +0000)
        Reviewed by Kent Tamura.

        Change the label of an HTML5 file chooser button to "Choose Files"
        https://bugs.webkit.org/show_bug.cgi?id=49245

        We should notify capability of multiple files to users.
        input-file-label.html is a test that checks a label of the file chooser
        with/without 'multiple' attribute. input-file-label.html will fail in Chromium
        until a planned Chromium patch is landed. input-file-re-render.html will
        also fail in Chromium, gtk and MacLeopard until we update the expected images
        for the test.

        * fast/forms/input-file-label-expected.txt: Added.
        * fast/forms/input-file-label.html: Added.
        * platform/chromium/test_expectations.txt:
        * platform/mac/fast/forms/input-file-re-render-expected.png:
        * platform/mac/fast/forms/input-file-re-render-expected.txt:
2011-06-30  Kentaro Hara  <haraken@google.com>

        Reviewed by Kent Tamura.

        Change the label of an HTML5 file chooser button to "Choose Files"
        https://bugs.webkit.org/show_bug.cgi?id=49245

        We should notify capability of multiple files to users.

        Test: fast/forms/input-file-label.html

        * English.lproj/Localizable.strings:
        * html/FileInputType.cpp:
        (WebCore::UploadButtonElement::createForMultiple): Constructs a multiple file chooser button.
        (WebCore::FileInputType::createShadowSubtree): Constructs a single/multiple file chooser button depending on 'multiple' attribute.
        (WebCore::FileInputType::multipleAttributeChanged): Updates the label of the file chooser button.
        * html/FileInputType.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::parseMappedAttribute): Updates the shadow tree of the file chooser button when 'multiple' attribute is set or unset.
        * html/InputType.cpp:
        (WebCore::InputType::multipleAttributeChanged): Virtual method to be overridden by FileInputType.
        * html/InputType.h:
        * platform/DefaultLocalizationStrategy.cpp:
        (WebCore::DefaultLocalizationStrategy::fileButtonChooseFileLabel): Updated the description for "Choose File".
        (WebCore::DefaultLocalizationStrategy::fileButtonChooseMultipleFilesLabel): Returns a string "Choose Files".
        * platform/DefaultLocalizationStrategy.h:
        * platform/LocalizationStrategy.h:
        * platform/LocalizedStrings.cpp:
        (WebCore::fileButtonChooseMultipleFilesLabel): Wrapper method for getting the "Choose Files" label.
        * platform/LocalizedStrings.h:
        * platform/brew/LocalizedStringsBrew.cpp:
        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
        * platform/efl/LocalizedStringsEfl.cpp:
        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
        * platform/gtk/LocalizedStringsGtk.cpp:
        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
        * platform/haiku/LocalizedStringsHaiku.cpp:
        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
        * platform/wx/LocalizedStringsWx.cpp:
        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
2011-06-30  Kentaro Hara  <haraken@google.com>

        Reviewed by Kent Tamura.

        Change the label of an HTML5 file chooser button to "Choose Files"
        https://bugs.webkit.org/show_bug.cgi?id=49245

        We should notify capability of multiple files to users.

        Test: fast/forms/input-file-label.html

        * DEPS:
        * public/WebLocalizedString.h: Depends on chromium_rev>=91051.
        * src/LocalizedStrings.cpp:
        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
2011-06-30  Kentaro Hara  <haraken@google.com>

        Reviewed by Kent Tamura.

        Change the label of an HTML5 file chooser button to "Choose Files"
        https://bugs.webkit.org/show_bug.cgi?id=49245

        We should notify capability of multiple files to users.

        Test: fast/forms/input-file-label.html

        * WebCoreSupport/WebPlatformStrategies.cpp:
        (WebPlatformStrategies::fileButtonChooseFileLabel): Updated the description for "Choose File".
        (WebPlatformStrategies::fileButtonChooseMultipleFilesLabel):  Returns a "Choose Files" label.
        * WebCoreSupport/WebPlatformStrategies.h:
2011-06-30  Kentaro Hara  <haraken@google.com>

        Reviewed by Kent Tamura.

        Change the label of an HTML5 file chooser button to "Choose Files"
        https://bugs.webkit.org/show_bug.cgi?id=49245

        We should notify capability of multiple files to users.

        Test: fast/forms/input-file-label.html

        * WebCoreSupport/PlatformStrategiesWinCE.cpp:
        (PlatformStrategiesWinCE::fileButtonChooseFileLabel): Updated the description for "Choose File".
        (PlatformStrategiesWinCE::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
        * WebCoreSupport/PlatformStrategiesWinCE.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90101 268f45cc-cd09-0410-ab3c-d52691b4dbfc

33 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/input-file-label-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/input-file-label.html [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.png
LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebCore/html/FileInputType.cpp
Source/WebCore/html/FileInputType.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/platform/DefaultLocalizationStrategy.cpp
Source/WebCore/platform/DefaultLocalizationStrategy.h
Source/WebCore/platform/LocalizationStrategy.h
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h
Source/WebCore/platform/brew/LocalizedStringsBrew.cpp
Source/WebCore/platform/efl/LocalizedStringsEfl.cpp
Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
Source/WebCore/platform/wx/LocalizedStringsWx.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/DEPS
Source/WebKit/chromium/public/WebLocalizedString.h
Source/WebKit/chromium/src/LocalizedStrings.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp
Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h

index 03c07ed..f3f2b5a 100644 (file)
@@ -1,3 +1,23 @@
+2011-06-30  Kentaro Hara  <haraken@google.com>
+
+        Reviewed by Kent Tamura.
+
+        Change the label of an HTML5 file chooser button to "Choose Files"
+        https://bugs.webkit.org/show_bug.cgi?id=49245
+
+        We should notify capability of multiple files to users.
+        input-file-label.html is a test that checks a label of the file chooser
+        with/without 'multiple' attribute. input-file-label.html will fail in Chromium
+        until a planned Chromium patch is landed. input-file-re-render.html will
+        also fail in Chromium, gtk and MacLeopard until we update the expected images
+        for the test.
+
+        * fast/forms/input-file-label-expected.txt: Added.
+        * fast/forms/input-file-label.html: Added.
+        * platform/chromium/test_expectations.txt:
+        * platform/mac/fast/forms/input-file-re-render-expected.png:
+        * platform/mac/fast/forms/input-file-re-render-expected.txt:
+
 2011-06-30  Yuta Kitamura  <yutak@chromium.org>
 
         Reviewed by Kent Tamura.
diff --git a/LayoutTests/fast/forms/input-file-label-expected.txt b/LayoutTests/fast/forms/input-file-label-expected.txt
new file mode 100644 (file)
index 0000000..cb40a59
--- /dev/null
@@ -0,0 +1,12 @@
+  
+This tests the label of a file chooser button.
+
+PASS The label of a single file chooser button is "Choose File".
+PASS The label of a multiple file chooser button is "Choose Files".
+PASS Initially, the label of a file chooser button is "Choose File".
+PASS Set "multiple" attribute, then the label of the file chooser button becomes "Choose Files".
+PASS Unset "multiple" attribute, then the label of the file chooser button becomes "Choose File".
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/input-file-label.html b/LayoutTests/fast/forms/input-file-label.html
new file mode 100644 (file)
index 0000000..0ed99fb
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<input id="single_file" name="upfile" type="file" />
+<input id="multiple_files" name="upfile[]" multiple="multiple" type="file" />
+<input id="single_or_multiple_file" name="upfile[]" type="file" />
+<p>This tests the label of a file chooser button.</p>
+<div id="console"></div>
+<script>
+if (window.layoutTestController) {
+    var file = document.getElementById('single_file');
+    var button = internals.shadowRoot(file).firstChild;
+    var label = button.getAttribute('value');
+    var result = 'The label of a single file chooser button is "' + label + '".';
+    label == 'Choose File' ? testPassed(result) : testFailed(result);
+
+    file = document.getElementById('multiple_files');
+    button = internals.shadowRoot(file).firstChild;
+    label = button.getAttribute('value');
+    result = 'The label of a multiple file chooser button is "' + label + '".';
+    label == 'Choose Files' ? testPassed(result) : testFailed(result);
+
+    file = document.getElementById('single_or_multiple_file');
+    button = internals.shadowRoot(file).firstChild;
+    label = button.getAttribute('value');
+    result = 'Initially, the label of a file chooser button is "' + label + '".';
+    label == 'Choose File' ? testPassed(result) : testFailed(result);
+
+    file.setAttribute("multiple", "multiple");
+    button = internals.shadowRoot(file).firstChild;
+    label = button.getAttribute('value');
+    result = 'Set "multiple" attribute, then the label of the file chooser button becomes "' + label + '".';
+    label == 'Choose Files' ? testPassed(result) : testFailed(result);
+
+    file.removeAttribute("multiple");
+    button = internals.shadowRoot(file).firstChild;
+    label = button.getAttribute('value');
+    result = 'Unset "multiple" attribute, then the label of the file chooser button becomes "' + label + '".';
+    label == 'Choose File' ? testPassed(result) : testFailed(result);
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
index 9ba0aa6..e3ce2a7 100644 (file)
@@ -216,6 +216,16 @@ WONTFIX SKIP : animations/animation-api-1.html = FAIL
 // Unskip after implementing LayoutTestController::setDefersLoading and ::goBack.
 BUGWK60877 SKIP : loader/navigation-while-deferring-loads.html = FAIL
 
+// This test fails because WebLocalizedString::FileButtonChooseMultipleFilesLabel
+// is not described in switch cases in ToMessageID(), in order to avoid compiler warnings
+// in the Chromium patch. See here: http://codereview.chromium.org/7273024/.
+// This failure is going to be removed when a planned Chromium patch is merged.
+BUGWK49245 : fast/forms/input-file-label.html = FAIL
+
+// This test fails because the label of a multiple file chooser button is updated.
+// We need to update expected.txt and expected.png.
+BUGWK49245 : fast/forms/input-file-re-render.html = FAIL
+
 // -----------------------------------------------------------------
 // WONTFIX TESTS
 // -----------------------------------------------------------------
index 2c6620d..7fa200e 100644 (file)
Binary files a/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.png and b/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.png differ
index 2d4facf..a3c541a 100644 (file)
@@ -5,10 +5,10 @@ layer at (0,0) size 800x80
     RenderBody {BODY} at (8,8) size 784x56
       RenderBlock {FORM} at (0,0) size 784x22
         RenderFileUploadControl {INPUT} at (2,2) size 237x18 "2 files"
-          RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
-            RenderBlock (anonymous) at (8,2) size 62x13
-              RenderText at (0,0) size 62x13
-                text run at (0,0) width 62: "Choose File"
+          RenderButton {INPUT} at (0,0) size 84x18 [bgcolor=#C0C0C0]
+            RenderBlock (anonymous) at (8,2) size 68x13
+              RenderText at (0,0) size 68x13
+                text run at (0,0) width 68: "Choose Files"
         RenderText {#text} at (0,0) size 0x0
       RenderBlock {P} at (0,38) size 784x18
         RenderText {#text} at (0,0) size 442x18
index c441df3..278a9c1 100644 (file)
@@ -1,3 +1,44 @@
+2011-06-30  Kentaro Hara  <haraken@google.com>
+
+        Reviewed by Kent Tamura.
+
+        Change the label of an HTML5 file chooser button to "Choose Files"
+        https://bugs.webkit.org/show_bug.cgi?id=49245
+
+        We should notify capability of multiple files to users.
+
+        Test: fast/forms/input-file-label.html
+
+        * English.lproj/Localizable.strings:
+        * html/FileInputType.cpp:
+        (WebCore::UploadButtonElement::createForMultiple): Constructs a multiple file chooser button.
+        (WebCore::FileInputType::createShadowSubtree): Constructs a single/multiple file chooser button depending on 'multiple' attribute.
+        (WebCore::FileInputType::multipleAttributeChanged): Updates the label of the file chooser button.
+        * html/FileInputType.h:
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::parseMappedAttribute): Updates the shadow tree of the file chooser button when 'multiple' attribute is set or unset.
+        * html/InputType.cpp:
+        (WebCore::InputType::multipleAttributeChanged): Virtual method to be overridden by FileInputType.
+        * html/InputType.h:
+        * platform/DefaultLocalizationStrategy.cpp:
+        (WebCore::DefaultLocalizationStrategy::fileButtonChooseFileLabel): Updated the description for "Choose File".
+        (WebCore::DefaultLocalizationStrategy::fileButtonChooseMultipleFilesLabel): Returns a string "Choose Files".
+        * platform/DefaultLocalizationStrategy.h:
+        * platform/LocalizationStrategy.h:
+        * platform/LocalizedStrings.cpp:
+        (WebCore::fileButtonChooseMultipleFilesLabel): Wrapper method for getting the "Choose Files" label.
+        * platform/LocalizedStrings.h:
+        * platform/brew/LocalizedStringsBrew.cpp:
+        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
+        * platform/efl/LocalizedStringsEfl.cpp:
+        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
+        * platform/haiku/LocalizedStringsHaiku.cpp:
+        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
+        * platform/wx/LocalizedStringsWx.cpp:
+        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
+
 2011-06-30  Ryosuke Niwa  <rniwa@webkit.org>
 
         Reviewed by Kent Tamura.
index f4fcc92..656bb10 100644 (file)
Binary files a/Source/WebCore/English.lproj/Localizable.strings and b/Source/WebCore/English.lproj/Localizable.strings differ
index 6daac39..ba1305a 100644 (file)
@@ -47,6 +47,7 @@ using namespace HTMLNames;
 class UploadButtonElement : public HTMLInputElement {
 public:
     static PassRefPtr<UploadButtonElement> create(Document*);
+    static PassRefPtr<UploadButtonElement> createForMultiple(Document*);
 
 private:
     UploadButtonElement(Document*);
@@ -62,6 +63,13 @@ PassRefPtr<UploadButtonElement> UploadButtonElement::create(Document* document)
     return button.release();
 }
 
+PassRefPtr<UploadButtonElement> UploadButtonElement::createForMultiple(Document* document)
+{
+    RefPtr<UploadButtonElement> button = adoptRef(new UploadButtonElement(document));
+    button->setType("button");
+    button->setValue(fileButtonChooseMultipleFilesLabel());
+    return button.release();
+}
 
 UploadButtonElement::UploadButtonElement(Document* document)
     : HTMLInputElement(inputTag, document, 0, false)
@@ -248,7 +256,14 @@ bool FileInputType::isFileUpload() const
 void FileInputType::createShadowSubtree()
 {
     ExceptionCode ec = 0;
-    element()->ensureShadowRoot()->appendChild(UploadButtonElement::create(element()->document()), ec);
+    element()->ensureShadowRoot()->appendChild(element()->multiple() ? UploadButtonElement::createForMultiple(element()->document()): UploadButtonElement::create(element()->document()), ec);
+}
+
+void FileInputType::multipleAttributeChanged()
+{
+    UploadButtonElement* button = static_cast<UploadButtonElement*>(element()->ensureShadowRoot()->firstChild());
+    if (button)
+        button->setValue(element()->multiple() ? fileButtonChooseMultipleFilesLabel() : fileButtonChooseFileLabel());
 }
 
 void FileInputType::requestIcon(const Vector<String>& paths)
index 2df8c09..aacbd21 100644 (file)
@@ -64,6 +64,7 @@ private:
     virtual Icon* icon() const;
     virtual bool isFileUpload() const;
     virtual void createShadowSubtree();
+    virtual void multipleAttributeChanged();
 
     // FileChooserClient implementation.
     virtual void filesChosen(const Vector<String>&);
index b8af49c..ec37400 100644 (file)
@@ -733,7 +733,10 @@ void HTMLInputElement::parseMappedAttribute(Attribute* attr)
     else if (attr->name() == minAttr || attr->name() == maxAttr) {
         m_inputType->minOrMaxAttributeChanged();
         setNeedsValidityCheck();
-    } else if (attr->name() == multipleAttr || attr->name() == patternAttr || attr->name() == precisionAttr || attr->name() == stepAttr)
+    } else if (attr->name() == multipleAttr) {
+        m_inputType->multipleAttributeChanged();
+        setNeedsValidityCheck();
+    } else if (attr->name() == patternAttr || attr->name() == precisionAttr || attr->name() == stepAttr)
         setNeedsValidityCheck();
 #if ENABLE(DATALIST)
     else if (attr->name() == listAttr)
index b8c1200..91046a9 100644 (file)
@@ -660,6 +660,10 @@ bool InputType::supportsPlaceholder() const
     return false;
 }
 
+void InputType::multipleAttributeChanged()
+{
+}
+
 namespace InputTypeNames {
 
 // The type names must be lowercased because they will be the return values of
index de4c047..bab9cc7 100644 (file)
@@ -226,6 +226,7 @@ public:
     virtual bool isSteppable() const;
     virtual bool shouldRespectHeightAndWidthAttributes();
     virtual bool supportsPlaceholder() const;
+    virtual void multipleAttributeChanged();
 
     // Parses the specified string for the type, and return
     // the double value for the parsing result if the parsing
index 1e83a99..53b1869 100644 (file)
@@ -123,7 +123,12 @@ String DefaultLocalizationStrategy::submitButtonDefaultLabel()
 
 String DefaultLocalizationStrategy::fileButtonChooseFileLabel()
 {
-    return WEB_UI_STRING("Choose File", "title for file button used in HTML forms");
+    return WEB_UI_STRING("Choose File", "title for a single file chooser button used in HTML forms");
+}
+
+String DefaultLocalizationStrategy::fileButtonChooseMultipleFilesLabel()
+{
+    return WEB_UI_STRING("Choose Files", "title for a multiple file chooser button used in HTML forms. This title should be as short as possible.");
 }
 
 String DefaultLocalizationStrategy::fileButtonNoFileSelectedLabel()
index 45561ec..9462a43 100644 (file)
@@ -44,6 +44,7 @@ public:
     virtual String searchableIndexIntroduction();
     virtual String submitButtonDefaultLabel();
     virtual String fileButtonChooseFileLabel();
+    virtual String fileButtonChooseMultipleFilesLabel();
     virtual String fileButtonNoFileSelectedLabel();
     virtual String defaultDetailsSummaryText();
 #if PLATFORM(MAC)
index f883893..7c4eb75 100644 (file)
@@ -42,6 +42,7 @@ public:
     virtual String searchableIndexIntroduction() = 0;
     virtual String submitButtonDefaultLabel() = 0;
     virtual String fileButtonChooseFileLabel() = 0;
+    virtual String fileButtonChooseMultipleFilesLabel() = 0;
     virtual String fileButtonNoFileSelectedLabel() = 0;
     virtual String defaultDetailsSummaryText() = 0;
 
index 6c9aa46..75f705b 100644 (file)
@@ -69,6 +69,11 @@ String fileButtonChooseFileLabel()
     return localizationStrategy()->fileButtonChooseFileLabel();
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return localizationStrategy()->fileButtonChooseMultipleFilesLabel();
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return localizationStrategy()->fileButtonNoFileSelectedLabel();
index 777fcec..76e1d2b 100644 (file)
@@ -38,6 +38,7 @@ namespace WebCore {
     String searchableIndexIntroduction();
     String submitButtonDefaultLabel();
     String fileButtonChooseFileLabel();
+    String fileButtonChooseMultipleFilesLabel();
     String fileButtonNoFileSelectedLabel();
     String defaultDetailsSummaryText();
 
index ba5d4a9..ee65fd2 100644 (file)
@@ -61,6 +61,11 @@ String fileButtonChooseFileLabel()
     return "Choose File";
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return "Choose Files";
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return "No file selected";
@@ -502,4 +507,3 @@ String crashedPluginText()
 }
 
 } // namespace WebCore
-
index 36a9f01..d537157 100644 (file)
@@ -68,6 +68,11 @@ String fileButtonChooseFileLabel()
     return String::fromUTF8("Choose File");
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return String::fromUTF8("Choose Files");
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return String::fromUTF8("No file selected");
index 13c46fc..64697b7 100644 (file)
@@ -81,6 +81,11 @@ String fileButtonChooseFileLabel()
     return String::fromUTF8(_("Choose File"));
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return String::fromUTF8(_("Choose Files"));
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return String::fromUTF8(_("(None)"));
index c1f3641..d4c4495 100644 (file)
@@ -68,6 +68,11 @@ String fileButtonChooseFileLabel()
     return "Choose File";
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return "Choose Files";
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return "No file selected";
@@ -499,4 +504,3 @@ String validationMessageStepMismatchText(const String&, const String&)
 }
 
 } // namespace WebCore
-
index 8ec791e..e1ad2dc 100644 (file)
@@ -67,6 +67,11 @@ String fileButtonChooseFileLabel()
     return String("Choose File"); 
 }
 
+String fileButtonChooseMultipleFilesLabel() 
+{ 
+    return String("Choose Files"); 
+}
+
 String fileButtonNoFileSelectedLabel() 
 { 
     return String("No file selected"); 
index f872a2b..3814138 100644 (file)
@@ -1,3 +1,19 @@
+2011-06-30  Kentaro Hara  <haraken@google.com>
+
+        Reviewed by Kent Tamura.
+
+        Change the label of an HTML5 file chooser button to "Choose Files"
+        https://bugs.webkit.org/show_bug.cgi?id=49245
+
+        We should notify capability of multiple files to users.
+
+        Test: fast/forms/input-file-label.html
+
+        * DEPS:
+        * public/WebLocalizedString.h: Depends on chromium_rev>=91051.
+        * src/LocalizedStrings.cpp:
+        (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
+
 2011-06-29  James Hawkins  <jhawkins@chromium.org>
 
         Reviewed by Pavel Feldman.
index 3fe57d1..01babcd 100644 (file)
@@ -32,7 +32,7 @@
 
 vars = {
   'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
-  'chromium_rev': '90878'
+  'chromium_rev': '91051'
 }
 
 deps = {
index 598e972..65f3cae 100644 (file)
@@ -39,6 +39,7 @@ struct WebLocalizedString {
         InputElementAltText,
         ResetButtonDefaultLabel,
         FileButtonChooseFileLabel,
+        FileButtonChooseMultipleFilesLabel,
         FileButtonNoFileSelectedLabel,
         MultipleFileUploadText,
         SearchableIndexIntroduction,
index 35e03c4..0df4723 100644 (file)
@@ -87,6 +87,11 @@ String fileButtonChooseFileLabel()
     return query(WebLocalizedString::FileButtonChooseFileLabel);
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return query(WebLocalizedString::FileButtonChooseMultipleFilesLabel);
+}
+
 String defaultDetailsSummaryText()
 {
     notImplemented();
index db1be89..29aa1e6 100644 (file)
@@ -1,3 +1,19 @@
+2011-06-30  Kentaro Hara  <haraken@google.com>
+
+        Reviewed by Kent Tamura.
+
+        Change the label of an HTML5 file chooser button to "Choose Files"
+        https://bugs.webkit.org/show_bug.cgi?id=49245
+
+        We should notify capability of multiple files to users.
+
+        Test: fast/forms/input-file-label.html
+
+        * WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebPlatformStrategies::fileButtonChooseFileLabel): Updated the description for "Choose File".
+        (WebPlatformStrategies::fileButtonChooseMultipleFilesLabel):  Returns a "Choose Files" label.
+        * WebCoreSupport/WebPlatformStrategies.h:
+
 2011-06-29  Alexis Menard  <alexis.menard@openbossa.org>
 
         Reviewed by Benjamin Poulain.
index 182fe38..adf8614 100644 (file)
@@ -169,7 +169,12 @@ String WebPlatformStrategies::submitButtonDefaultLabel()
 
 String WebPlatformStrategies::fileButtonChooseFileLabel()
 {
-    return QCoreApplication::translate("QWebPage", "Choose File", "title for file button used in HTML forms");
+    return QCoreApplication::translate("QWebPage", "Choose File", "title for a single file chooser button used in HTML forms");
+}
+
+String WebPlatformStrategies::fileButtonChooseMultipleFilesLabel()
+{
+    return QCoreApplication::translate("QWebPage", "Choose Files", "title for a multiple file chooser button used in HTML forms. This title should be as short as possible.");
 }
 
 String WebPlatformStrategies::fileButtonNoFileSelectedLabel()
index b74af39..1024dac 100644 (file)
@@ -64,6 +64,7 @@ private:
     virtual WTF::String searchableIndexIntroduction();
     virtual WTF::String submitButtonDefaultLabel();
     virtual WTF::String fileButtonChooseFileLabel();
+    virtual WTF::String fileButtonChooseMultipleFilesLabel();
     virtual WTF::String fileButtonNoFileSelectedLabel();
     virtual WTF::String defaultDetailsSummaryText();
     virtual WTF::String contextMenuItemTagOpenLinkInNewWindow();
index 14ce057..9e0c425 100644 (file)
@@ -1,3 +1,19 @@
+2011-06-30  Kentaro Hara  <haraken@google.com>
+
+        Reviewed by Kent Tamura.
+
+        Change the label of an HTML5 file chooser button to "Choose Files"
+        https://bugs.webkit.org/show_bug.cgi?id=49245
+
+        We should notify capability of multiple files to users.
+
+        Test: fast/forms/input-file-label.html
+
+        * WebCoreSupport/PlatformStrategiesWinCE.cpp:
+        (PlatformStrategiesWinCE::fileButtonChooseFileLabel): Updated the description for "Choose File".
+        (PlatformStrategiesWinCE::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
+        * WebCoreSupport/PlatformStrategiesWinCE.h:
+
 2011-06-20  Ryosuke Niwa  <rniwa@webkit.org>
 
         WinCE build fix after r89293.
index 455da71..4869674 100644 (file)
@@ -136,7 +136,12 @@ String PlatformStrategiesWinCE::resetButtonDefaultLabel()
 
 String PlatformStrategiesWinCE::fileButtonChooseFileLabel()
 {
-    return UI_STRING("Choose File", "title for file button used in HTML forms");
+    return UI_STRING("Choose File", "title for a single file chooser button used in HTML forms");
+}
+
+String PlatformStrategiesWinCE::fileButtonChooseMultipleFilesLabel()
+{
+    return UI_STRING("Choose Files", "title for a multiple file chooser button used in HTML forms. This title should be as short as possible.");
 }
 
 String PlatformStrategiesWinCE::fileButtonNoFileSelectedLabel()
index 6ed49ae..83a7491 100644 (file)
@@ -57,6 +57,7 @@ private:
     virtual WTF::String searchableIndexIntroduction();
     virtual WTF::String submitButtonDefaultLabel();
     virtual WTF::String fileButtonChooseFileLabel();
+    virtual WTF::String fileButtonChooseMultipleFilesLabel();
     virtual WTF::String fileButtonNoFileSelectedLabel();
     virtual WTF::String defaultDetailsSummaryText();
 #if ENABLE(CONTEXT_MENUS)