Title: [90101] trunk
Revision
90101
Author
[email protected]
Date
2011-06-30 03:40:32 -0700 (Thu, 30 Jun 2011)

Log Message

2011-06-30  Kentaro Hara  <[email protected]>

        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  <[email protected]>

        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  <[email protected]>

        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  <[email protected]>

        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  <[email protected]>

        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:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (90100 => 90101)


--- trunk/LayoutTests/ChangeLog	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/LayoutTests/ChangeLog	2011-06-30 10:40:32 UTC (rev 90101)
@@ -1,3 +1,23 @@
+2011-06-30  Kentaro Hara  <[email protected]>
+
+        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  <[email protected]>
 
         Reviewed by Kent Tamura.

Added: trunk/LayoutTests/fast/forms/input-file-label-expected.txt (0 => 90101)


--- trunk/LayoutTests/fast/forms/input-file-label-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/input-file-label-expected.txt	2011-06-30 10:40:32 UTC (rev 90101)
@@ -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
+

Added: trunk/LayoutTests/fast/forms/input-file-label.html (0 => 90101)


--- trunk/LayoutTests/fast/forms/input-file-label.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/input-file-label.html	2011-06-30 10:40:32 UTC (rev 90101)
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</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=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (90100 => 90101)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-06-30 10:40:32 UTC (rev 90101)
@@ -216,6 +216,16 @@
 // 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
 // -----------------------------------------------------------------

Modified: trunk/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.txt (90100 => 90101)


--- trunk/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.txt	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.txt	2011-06-30 10:40:32 UTC (rev 90101)
@@ -5,10 +5,10 @@
     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

Modified: trunk/Source/WebCore/ChangeLog (90100 => 90101)


--- trunk/Source/WebCore/ChangeLog	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/ChangeLog	2011-06-30 10:40:32 UTC (rev 90101)
@@ -1,3 +1,44 @@
+2011-06-30  Kentaro Hara  <[email protected]>
+
+        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  <[email protected]>
 
         Reviewed by Kent Tamura.

Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (90100 => 90101)


--- trunk/Source/WebCore/English.lproj/Localizable.strings	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings	2011-06-30 10:40:32 UTC (rev 90101)
@@ -70,6 +70,9 @@
 /* title for file button used in HTML forms */
 "Choose File" = "Choose File";
 
+/* title for file button used in HTML5 file chooser */
+"Choose Files" = "Choose Files";
+
 /* menu item in Recent Searches menu that empties menu's contents */
 "Clear Recent Searches" = "Clear Recent Searches";
 

Modified: trunk/Source/WebCore/html/FileInputType.cpp (90100 => 90101)


--- trunk/Source/WebCore/html/FileInputType.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/html/FileInputType.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -47,6 +47,7 @@
 class UploadButtonElement : public HTMLInputElement {
 public:
     static PassRefPtr<UploadButtonElement> create(Document*);
+    static PassRefPtr<UploadButtonElement> createForMultiple(Document*);
 
 private:
     UploadButtonElement(Document*);
@@ -62,6 +63,13 @@
     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,9 +256,16 @@
 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)
 {
     if (!paths.size())

Modified: trunk/Source/WebCore/html/FileInputType.h (90100 => 90101)


--- trunk/Source/WebCore/html/FileInputType.h	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/html/FileInputType.h	2011-06-30 10:40:32 UTC (rev 90101)
@@ -64,6 +64,7 @@
     virtual Icon* icon() const;
     virtual bool isFileUpload() const;
     virtual void createShadowSubtree();
+    virtual void multipleAttributeChanged();
 
     // FileChooserClient implementation.
     virtual void filesChosen(const Vector<String>&);

Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (90100 => 90101)


--- trunk/Source/WebCore/html/HTMLInputElement.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -733,8 +733,11 @@
     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)
         m_hasNonEmptyList = !attr->isEmpty();

Modified: trunk/Source/WebCore/html/InputType.cpp (90100 => 90101)


--- trunk/Source/WebCore/html/InputType.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/html/InputType.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -660,6 +660,10 @@
     return false;
 }
 
+void InputType::multipleAttributeChanged()
+{
+}
+
 namespace InputTypeNames {
 
 // The type names must be lowercased because they will be the return values of

Modified: trunk/Source/WebCore/html/InputType.h (90100 => 90101)


--- trunk/Source/WebCore/html/InputType.h	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/html/InputType.h	2011-06-30 10:40:32 UTC (rev 90101)
@@ -226,6 +226,7 @@
     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

Modified: trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp (90100 => 90101)


--- trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -123,9 +123,14 @@
 
 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()
 {
     return WEB_UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected");

Modified: trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h (90100 => 90101)


--- trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h	2011-06-30 10:40:32 UTC (rev 90101)
@@ -44,6 +44,7 @@
     virtual String searchableIndexIntroduction();
     virtual String submitButtonDefaultLabel();
     virtual String fileButtonChooseFileLabel();
+    virtual String fileButtonChooseMultipleFilesLabel();
     virtual String fileButtonNoFileSelectedLabel();
     virtual String defaultDetailsSummaryText();
 #if PLATFORM(MAC)

Modified: trunk/Source/WebCore/platform/LocalizationStrategy.h (90100 => 90101)


--- trunk/Source/WebCore/platform/LocalizationStrategy.h	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/LocalizationStrategy.h	2011-06-30 10:40:32 UTC (rev 90101)
@@ -42,6 +42,7 @@
     virtual String searchableIndexIntroduction() = 0;
     virtual String submitButtonDefaultLabel() = 0;
     virtual String fileButtonChooseFileLabel() = 0;
+    virtual String fileButtonChooseMultipleFilesLabel() = 0;
     virtual String fileButtonNoFileSelectedLabel() = 0;
     virtual String defaultDetailsSummaryText() = 0;
 

Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (90100 => 90101)


--- trunk/Source/WebCore/platform/LocalizedStrings.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -69,6 +69,11 @@
     return localizationStrategy()->fileButtonChooseFileLabel();
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return localizationStrategy()->fileButtonChooseMultipleFilesLabel();
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return localizationStrategy()->fileButtonNoFileSelectedLabel();

Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (90100 => 90101)


--- trunk/Source/WebCore/platform/LocalizedStrings.h	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h	2011-06-30 10:40:32 UTC (rev 90101)
@@ -38,6 +38,7 @@
     String searchableIndexIntroduction();
     String submitButtonDefaultLabel();
     String fileButtonChooseFileLabel();
+    String fileButtonChooseMultipleFilesLabel();
     String fileButtonNoFileSelectedLabel();
     String defaultDetailsSummaryText();
 

Modified: trunk/Source/WebCore/platform/brew/LocalizedStringsBrew.cpp (90100 => 90101)


--- trunk/Source/WebCore/platform/brew/LocalizedStringsBrew.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/brew/LocalizedStringsBrew.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -61,6 +61,11 @@
     return "Choose File";
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return "Choose Files";
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return "No file selected";
@@ -502,4 +507,3 @@
 }
 
 } // namespace WebCore
-

Modified: trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (90100 => 90101)


--- trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -68,6 +68,11 @@
     return String::fromUTF8("Choose File");
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return String::fromUTF8("Choose Files");
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return String::fromUTF8("No file selected");

Modified: trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (90100 => 90101)


--- trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -81,6 +81,11 @@
     return String::fromUTF8(_("Choose File"));
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return String::fromUTF8(_("Choose Files"));
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return String::fromUTF8(_("(None)"));

Modified: trunk/Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp (90100 => 90101)


--- trunk/Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/haiku/LocalizedStringsHaiku.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -68,6 +68,11 @@
     return "Choose File";
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return "Choose Files";
+}
+
 String fileButtonNoFileSelectedLabel()
 {
     return "No file selected";
@@ -499,4 +504,3 @@
 }
 
 } // namespace WebCore
-

Modified: trunk/Source/WebCore/platform/wx/LocalizedStringsWx.cpp (90100 => 90101)


--- trunk/Source/WebCore/platform/wx/LocalizedStringsWx.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebCore/platform/wx/LocalizedStringsWx.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -67,6 +67,11 @@
     return String("Choose File"); 
 }
 
+String fileButtonChooseMultipleFilesLabel() 
+{ 
+    return String("Choose Files"); 
+}
+
 String fileButtonNoFileSelectedLabel() 
 { 
     return String("No file selected"); 

Modified: trunk/Source/WebKit/chromium/ChangeLog (90100 => 90101)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-06-30 10:40:32 UTC (rev 90101)
@@ -1,3 +1,19 @@
+2011-06-30  Kentaro Hara  <[email protected]>
+
+        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  <[email protected]>
 
         Reviewed by Pavel Feldman.

Modified: trunk/Source/WebKit/chromium/DEPS (90100 => 90101)


--- trunk/Source/WebKit/chromium/DEPS	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/chromium/DEPS	2011-06-30 10:40:32 UTC (rev 90101)
@@ -32,7 +32,7 @@
 
 vars = {
   'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
-  'chromium_rev': '90878'
+  'chromium_rev': '91051'
 }
 
 deps = {

Modified: trunk/Source/WebKit/chromium/public/WebLocalizedString.h (90100 => 90101)


--- trunk/Source/WebKit/chromium/public/WebLocalizedString.h	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/chromium/public/WebLocalizedString.h	2011-06-30 10:40:32 UTC (rev 90101)
@@ -39,6 +39,7 @@
         InputElementAltText,
         ResetButtonDefaultLabel,
         FileButtonChooseFileLabel,
+        FileButtonChooseMultipleFilesLabel,
         FileButtonNoFileSelectedLabel,
         MultipleFileUploadText,
         SearchableIndexIntroduction,

Modified: trunk/Source/WebKit/chromium/src/LocalizedStrings.cpp (90100 => 90101)


--- trunk/Source/WebKit/chromium/src/LocalizedStrings.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/chromium/src/LocalizedStrings.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -87,6 +87,11 @@
     return query(WebLocalizedString::FileButtonChooseFileLabel);
 }
 
+String fileButtonChooseMultipleFilesLabel()
+{
+    return query(WebLocalizedString::FileButtonChooseMultipleFilesLabel);
+}
+
 String defaultDetailsSummaryText()
 {
     notImplemented();

Modified: trunk/Source/WebKit/qt/ChangeLog (90100 => 90101)


--- trunk/Source/WebKit/qt/ChangeLog	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-06-30 10:40:32 UTC (rev 90101)
@@ -1,3 +1,19 @@
+2011-06-30  Kentaro Hara  <[email protected]>
+
+        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  <[email protected]>
 
         Reviewed by Benjamin Poulain.

Modified: trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp (90100 => 90101)


--- trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -169,9 +169,14 @@
 
 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()
 {
     return QCoreApplication::translate("QWebPage", "No file selected", "text to display in file button used in HTML forms when no file is selected");

Modified: trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h (90100 => 90101)


--- trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h	2011-06-30 10:40:32 UTC (rev 90101)
@@ -64,6 +64,7 @@
     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();

Modified: trunk/Source/WebKit/wince/ChangeLog (90100 => 90101)


--- trunk/Source/WebKit/wince/ChangeLog	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/wince/ChangeLog	2011-06-30 10:40:32 UTC (rev 90101)
@@ -1,3 +1,19 @@
+2011-06-30  Kentaro Hara  <[email protected]>
+
+        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  <[email protected]>
 
         WinCE build fix after r89293.

Modified: trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp (90100 => 90101)


--- trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp	2011-06-30 10:40:32 UTC (rev 90101)
@@ -136,9 +136,14 @@
 
 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()
 {
     return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected");

Modified: trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h (90100 => 90101)


--- trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h	2011-06-30 09:31:01 UTC (rev 90100)
+++ trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h	2011-06-30 10:40:32 UTC (rev 90101)
@@ -57,6 +57,7 @@
     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)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to