Title: [99083] trunk/Source
Revision
99083
Author
[email protected]
Date
2011-11-02 11:35:42 -0700 (Wed, 02 Nov 2011)

Log Message

<input=file multiple> default text uses singular instead of plural
https://bugs.webkit.org/show_bug.cgi?id=71319
<rdar://problem/10379021>

Reviewed by Darin Adler.

Source/WebCore:

Added a new method to return the label text for a file upload control that
allows multiple files. Needed to extend the RenderTheme function to pass down
a boolean representing whether multiple files are allowed in the file list.

* English.lproj/Localizable.strings:
* html/FileInputType.cpp:
(WebCore::FileInputType::defaultToolTip):
* platform/DefaultLocalizationStrategy.cpp:
(WebCore::DefaultLocalizationStrategy::fileButtonNoFilesSelectedLabel):
* platform/DefaultLocalizationStrategy.h:
* platform/LocalizationStrategy.h:
* platform/LocalizedStrings.cpp:
(WebCore::fileButtonNoFilesSelectedLabel):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::fileButtonNoFilesSelectedLabel):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::fileButtonNoFilesSelectedLabel):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::fileListNameForWidth):
* platform/gtk/RenderThemeGtk.h:
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::fileListNameForWidth):
* platform/qt/RenderThemeQt.h:
* platform/wx/LocalizedStringsWx.cpp:
(WebCore::fileButtonNoFilesSelectedLabel):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::fileTextValue):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::fileListNameForWidth):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::fileListNameForWidth):

Source/WebKit/chromium:

* src/LocalizedStrings.cpp:
(WebCore::fileButtonNoFilesSelectedLabel):

Source/WebKit/qt:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::fileButtonNoFilesSelectedLabel):
* WebCoreSupport/WebPlatformStrategies.h:

Source/WebKit/wince:

* WebCoreSupport/PlatformStrategiesWinCE.cpp:
(PlatformStrategiesWinCE::fileButtonNoFilesSelectedLabel):
* WebCoreSupport/PlatformStrategiesWinCE.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (99082 => 99083)


--- trunk/Source/WebCore/ChangeLog	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/ChangeLog	2011-11-02 18:35:42 UTC (rev 99083)
@@ -1,3 +1,46 @@
+2011-11-02  Jon Lee  <[email protected]>
+
+        <input=file multiple> default text uses singular instead of plural
+        https://bugs.webkit.org/show_bug.cgi?id=71319
+        <rdar://problem/10379021>
+
+        Reviewed by Darin Adler.
+
+        Added a new method to return the label text for a file upload control that
+        allows multiple files. Needed to extend the RenderTheme function to pass down
+        a boolean representing whether multiple files are allowed in the file list.
+
+        * English.lproj/Localizable.strings:
+        * html/FileInputType.cpp:
+        (WebCore::FileInputType::defaultToolTip):
+        * platform/DefaultLocalizationStrategy.cpp:
+        (WebCore::DefaultLocalizationStrategy::fileButtonNoFilesSelectedLabel):
+        * platform/DefaultLocalizationStrategy.h:
+        * platform/LocalizationStrategy.h:
+        * platform/LocalizedStrings.cpp:
+        (WebCore::fileButtonNoFilesSelectedLabel):
+        * platform/LocalizedStrings.h:
+        * platform/efl/LocalizedStringsEfl.cpp:
+        (WebCore::fileButtonNoFilesSelectedLabel):
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        (WebCore::fileButtonNoFilesSelectedLabel):
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::fileListNameForWidth):
+        * platform/gtk/RenderThemeGtk.h:
+        * platform/qt/RenderThemeQt.cpp:
+        (WebCore::RenderThemeQt::fileListNameForWidth):
+        * platform/qt/RenderThemeQt.h:
+        * platform/wx/LocalizedStringsWx.cpp:
+        (WebCore::fileButtonNoFilesSelectedLabel):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::fileTextValue):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::fileListNameForWidth):
+        * rendering/RenderTheme.h:
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::fileListNameForWidth):
+
 2011-11-02  Andras Becsi  <[email protected]>
 
         [Qt] Fix the build with NO_LISTBOX_RENDERING

Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (99082 => 99083)


--- trunk/Source/WebCore/English.lproj/Localizable.strings	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings	2011-11-02 18:35:42 UTC (rev 99083)
@@ -682,6 +682,9 @@
 /* text to display in file button used in HTML forms when no file is selected */
 "no file selected" = "no file selected";
 
+/* text to display in file button used in HTML forms when no files are selected and the button allows multiple files to be selected */
+"no files selected" = "no files selected";
+
 /* HTTP result code string */
 "no longer exists" = "no longer exists";
 

Modified: trunk/Source/WebCore/html/FileInputType.cpp (99082 => 99083)


--- trunk/Source/WebCore/html/FileInputType.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/html/FileInputType.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -373,8 +373,11 @@
 {
     FileList* fileList = m_fileList.get();
     unsigned listSize = fileList->length();
-    if (!listSize)
+    if (!listSize) {
+        if (element()->multiple())
+            return fileButtonNoFilesSelectedLabel();
         return fileButtonNoFileSelectedLabel();
+    }
 
     StringBuilder names;
     for (size_t i = 0; i < listSize; ++i) {

Modified: trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp (99082 => 99083)


--- trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -136,6 +136,11 @@
     return WEB_UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected");
 }
 
+String DefaultLocalizationStrategy::fileButtonNoFilesSelectedLabel()
+{
+    return WEB_UI_STRING("no files selected", "text to display in file button used in HTML forms when no files are selected and the button allows multiple files to be selected");
+}
+
 String DefaultLocalizationStrategy::defaultDetailsSummaryText()
 {
     return WEB_UI_STRING("Details", "text to display in <details> tag when it has no <summary> child");

Modified: trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h (99082 => 99083)


--- trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -46,6 +46,7 @@
     virtual String fileButtonChooseFileLabel();
     virtual String fileButtonChooseMultipleFilesLabel();
     virtual String fileButtonNoFileSelectedLabel();
+    virtual String fileButtonNoFilesSelectedLabel();
     virtual String defaultDetailsSummaryText();
 #if PLATFORM(MAC)
     virtual String copyImageUnknownFileLabel();

Modified: trunk/Source/WebCore/platform/LocalizationStrategy.h (99082 => 99083)


--- trunk/Source/WebCore/platform/LocalizationStrategy.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/LocalizationStrategy.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -44,6 +44,7 @@
     virtual String fileButtonChooseFileLabel() = 0;
     virtual String fileButtonChooseMultipleFilesLabel() = 0;
     virtual String fileButtonNoFileSelectedLabel() = 0;
+    virtual String fileButtonNoFilesSelectedLabel() = 0;
     virtual String defaultDetailsSummaryText() = 0;
 
 #if PLATFORM(MAC)

Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (99082 => 99083)


--- trunk/Source/WebCore/platform/LocalizedStrings.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -79,6 +79,11 @@
     return localizationStrategy()->fileButtonNoFileSelectedLabel();
 }
 
+String fileButtonNoFilesSelectedLabel()
+{
+    return localizationStrategy()->fileButtonNoFilesSelectedLabel();
+}
+
 String defaultDetailsSummaryText()
 {
     return localizationStrategy()->defaultDetailsSummaryText();

Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (99082 => 99083)


--- trunk/Source/WebCore/platform/LocalizedStrings.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -40,6 +40,7 @@
     String fileButtonChooseFileLabel();
     String fileButtonChooseMultipleFilesLabel();
     String fileButtonNoFileSelectedLabel();
+    String fileButtonNoFilesSelectedLabel();
     String defaultDetailsSummaryText();
 
 #if PLATFORM(MAC)

Modified: trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp (99082 => 99083)


--- trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/efl/LocalizedStringsEfl.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -78,6 +78,11 @@
     return String::fromUTF8("No file selected");
 }
 
+String fileButtonNoFilesSelectedLabel()
+{
+    return String::fromUTF8("No files selected");
+}
+
 String contextMenuItemTagOpenLinkInNewWindow()
 {
     return String::fromUTF8("Open Link in New Window");

Modified: trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (99082 => 99083)


--- trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -91,6 +91,11 @@
     return String::fromUTF8(_("(None)"));
 }
 
+String fileButtonNoFilesSelectedLabel()
+{
+    return String::fromUTF8(_("(None)"));
+}
+
 String contextMenuItemTagOpenLinkInNewWindow()
 {
     return String::fromUTF8(_("Open Link in New _Window"));

Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp (99082 => 99083)


--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -700,12 +700,14 @@
     return true;
 }
 
-String RenderThemeGtk::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width)
+String RenderThemeGtk::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width, bool multipleFilesAllowed)
 {
     if (width <= 0)
         return String();
 
     String string = fileButtonNoFileSelectedLabel();
+    if (multipleFilesAllowed)
+        string = fileButtonNoFilesSelectedLabel();
 
     if (filenames.size() == 1) {
         CString systemFilename = fileSystemRepresentation(filenames[0]);

Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h (99082 => 99083)


--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -179,7 +179,7 @@
     virtual bool paintInnerSpinButton(RenderObject*, const PaintInfo&, const IntRect&);
 
 private:
-    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width);
+    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width, bool multipleFilesAllowed);
 
     void platformInit();
     static void setTextInputBorders(RenderStyle*);

Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp (99082 => 99083)


--- trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -1570,14 +1570,18 @@
     return  QApplication::cursorFlashTime() / 1000.0 / 2.0;
 }
 
-String RenderThemeQt::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width)
+String RenderThemeQt::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width, bool multipleFilesAllowed)
 {
     if (width <= 0)
         return String();
 
     String string;
-    if (filenames.isEmpty())
-        string = fileButtonNoFileSelectedLabel();
+    if (filenames.isEmpty()) {
+        if (multipleFilesAllowed)
+            string = fileButtonNoFilesSelectedLabel();
+        else
+            string = fileButtonNoFileSelectedLabel();
+    }
     else if (filenames.size() == 1) {
         String fname = filenames[0];
         QFontMetrics fm(font.font());

Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.h (99082 => 99083)


--- trunk/Source/WebCore/platform/qt/RenderThemeQt.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -173,7 +173,7 @@
     void computeSizeBasedOnStyle(RenderStyle* renderStyle) const;
 
 private:
-    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width);
+    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width, bool multipleFilesAllowed);
 
     bool supportsFocus(ControlPart) const;
 

Modified: trunk/Source/WebCore/platform/wx/LocalizedStringsWx.cpp (99082 => 99083)


--- trunk/Source/WebCore/platform/wx/LocalizedStringsWx.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/platform/wx/LocalizedStringsWx.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -77,6 +77,11 @@
     return String("No file selected"); 
 }
 
+String fileButtonNoFilesSelectedLabel() 
+{ 
+    return String("No files selected"); 
+}
+
 String contextMenuItemTagOpenLinkInNewWindow() 
 { 
     return String("Open Link in New Window"); 

Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp (99082 => 99083)


--- trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -228,7 +228,7 @@
 {
     HTMLInputElement* input = static_cast<HTMLInputElement*>(node());
     ASSERT(input->files());
-    return theme()->fileListNameForWidth(input->files()->paths(), style()->font(), maxFilenameWidth());
+    return theme()->fileListNameForWidth(input->files()->paths(), style()->font(), maxFilenameWidth(), input->multiple());
 }
     
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (99082 => 99083)


--- trunk/Source/WebCore/rendering/RenderTheme.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -1101,14 +1101,18 @@
     return customFocusRingColor().isValid() ? customFocusRingColor() : defaultTheme()->platformFocusRingColor();
 }
 
-String RenderTheme::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width)
+String RenderTheme::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width, bool multipleFilesAllowed)
 {
     if (width <= 0)
         return String();
 
     String string;
-    if (filenames.isEmpty())
-        string = fileButtonNoFileSelectedLabel();
+    if (filenames.isEmpty()) {
+        if (multipleFilesAllowed)
+            string = fileButtonNoFilesSelectedLabel();
+        else
+            string = fileButtonNoFileSelectedLabel();
+    }
     else if (filenames.size() == 1)
         string = pathGetFileName(filenames[0]);
     else

Modified: trunk/Source/WebCore/rendering/RenderTheme.h (99082 => 99083)


--- trunk/Source/WebCore/rendering/RenderTheme.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/rendering/RenderTheme.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -207,7 +207,7 @@
     virtual bool shouldShowPlaceholderWhenFocused() const { return false; }
     virtual bool shouldHaveSpinButton(HTMLInputElement*) const;
 
-    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width);
+    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width, bool multipleFilesAllowed);
 
 protected:
     // The platform selection color.

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.h (99082 => 99083)


--- trunk/Source/WebCore/rendering/RenderThemeMac.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -177,7 +177,7 @@
     virtual bool shouldShowPlaceholderWhenFocused() const;
 
 private:
-    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width);
+    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width, bool multipleFilesAllowed);
 
     IntRect inflateRect(const IntRect&, const IntSize&, const int* margins, float zoomLevel = 1.0f) const;
 

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (99082 => 99083)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2011-11-02 18:35:42 UTC (rev 99083)
@@ -2085,14 +2085,18 @@
     return m_sliderThumbVertical.get();
 }
 
-String RenderThemeMac::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width)
+String RenderThemeMac::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width, bool multipleFilesAllowed)
 {
     if (width <= 0)
         return String();
 
     String strToTruncate;
-    if (filenames.isEmpty())
-        strToTruncate = fileButtonNoFileSelectedLabel();
+    if (filenames.isEmpty()) {
+        if (multipleFilesAllowed)
+            strToTruncate = fileButtonNoFilesSelectedLabel();
+        else
+            strToTruncate = fileButtonNoFileSelectedLabel();
+    }
     else if (filenames.size() == 1)
         strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(filenames[0])];
     else

Modified: trunk/Source/WebKit/chromium/ChangeLog (99082 => 99083)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-11-02 18:35:42 UTC (rev 99083)
@@ -1,3 +1,14 @@
+2011-11-02  Jon Lee  <[email protected]>
+
+        <input=file multiple> default text uses singular instead of plural
+        https://bugs.webkit.org/show_bug.cgi?id=71319
+        <rdar://problem/10379021>
+
+        Reviewed by Darin Adler.
+
+        * src/LocalizedStrings.cpp:
+        (WebCore::fileButtonNoFilesSelectedLabel):
+
 2011-11-02  Andrey Kosyakov  <[email protected]>
 
         Unreviewed fix for build failure on chromium shared linux caused by r99020.

Modified: trunk/Source/WebKit/chromium/src/LocalizedStrings.cpp (99082 => 99083)


--- trunk/Source/WebKit/chromium/src/LocalizedStrings.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebKit/chromium/src/LocalizedStrings.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -102,6 +102,11 @@
     return query(WebLocalizedString::FileButtonNoFileSelectedLabel);
 }
 
+String fileButtonNoFilesSelectedLabel()
+{
+    return query(WebLocalizedString::FileButtonNoFileSelectedLabel);
+}
+
 String searchMenuNoRecentSearchesText()
 {
     return query(WebLocalizedString::SearchMenuNoRecentSearchesText);

Modified: trunk/Source/WebKit/qt/ChangeLog (99082 => 99083)


--- trunk/Source/WebKit/qt/ChangeLog	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-11-02 18:35:42 UTC (rev 99083)
@@ -1,3 +1,15 @@
+2011-11-02  Jon Lee  <[email protected]>
+
+        <input=file multiple> default text uses singular instead of plural
+        https://bugs.webkit.org/show_bug.cgi?id=71319
+        <rdar://problem/10379021>
+
+        Reviewed by Darin Adler.
+
+        * WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebPlatformStrategies::fileButtonNoFilesSelectedLabel):
+        * WebCoreSupport/WebPlatformStrategies.h:
+
 2011-11-02  Deepak Sherveghar  <[email protected]>
 
         [Qt] Failing test media/video-document-types.html

Modified: trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp (99082 => 99083)


--- trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -183,6 +183,11 @@
     return QCoreApplication::translate("QWebPage", "No file selected", "text to display in file button used in HTML forms when no file is selected");
 }
 
+String WebPlatformStrategies::fileButtonNoFilesSelectedLabel()
+{
+    return QCoreApplication::translate("QWebPage", "No files selected", "text to display in file button used in HTML forms when no files are selected and the button allows multiple files to be selected");
+}
+
 String WebPlatformStrategies::defaultDetailsSummaryText()
 {
     return QCoreApplication::translate("QWebPage", "Details", "text to display in <details> tag when it has no <summary> child");

Modified: trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h (99082 => 99083)


--- trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -66,6 +66,7 @@
     virtual WTF::String fileButtonChooseFileLabel();
     virtual WTF::String fileButtonChooseMultipleFilesLabel();
     virtual WTF::String fileButtonNoFileSelectedLabel();
+    virtual WTF::String fileButtonNoFilesSelectedLabel();
     virtual WTF::String defaultDetailsSummaryText();
     virtual WTF::String contextMenuItemTagOpenLinkInNewWindow();
     virtual WTF::String contextMenuItemTagDownloadLinkToDisk();

Modified: trunk/Source/WebKit/wince/ChangeLog (99082 => 99083)


--- trunk/Source/WebKit/wince/ChangeLog	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebKit/wince/ChangeLog	2011-11-02 18:35:42 UTC (rev 99083)
@@ -1,3 +1,15 @@
+2011-11-02  Jon Lee  <[email protected]>
+
+        <input=file multiple> default text uses singular instead of plural
+        https://bugs.webkit.org/show_bug.cgi?id=71319
+        <rdar://problem/10379021>
+
+        Reviewed by Darin Adler.
+
+        * WebCoreSupport/PlatformStrategiesWinCE.cpp:
+        (PlatformStrategiesWinCE::fileButtonNoFilesSelectedLabel):
+        * WebCoreSupport/PlatformStrategiesWinCE.h:
+
 2011-10-28  Jochen Eisinger  <[email protected]>
 
         Rename a number of methods mentioning _javascript_ to just Script instead

Modified: trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp (99082 => 99083)


--- trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp	2011-11-02 18:35:42 UTC (rev 99083)
@@ -149,6 +149,11 @@
     return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected");
 }
 
+String PlatformStrategiesWinCE::fileButtonNoFilesSelectedLabel()
+{
+    return UI_STRING("no files selected", "text to display in file button used in HTML forms when no files are selected and the button allows multiple files to be selected");
+}
+
 String PlatformStrategiesWinCE::defaultDetailsSummaryText()
 {
     return UI_STRING("Details", "text to display in <details> tag when it has no <summary> child");

Modified: trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h (99082 => 99083)


--- trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h	2011-11-02 18:10:57 UTC (rev 99082)
+++ trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h	2011-11-02 18:35:42 UTC (rev 99083)
@@ -59,6 +59,7 @@
     virtual WTF::String fileButtonChooseFileLabel();
     virtual WTF::String fileButtonChooseMultipleFilesLabel();
     virtual WTF::String fileButtonNoFileSelectedLabel();
+    virtual WTF::String fileButtonNoFilesSelectedLabel();
     virtual WTF::String defaultDetailsSummaryText();
 #if ENABLE(CONTEXT_MENUS)
     virtual WTF::String contextMenuItemTagOpenLinkInNewWindow();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to