Upstream htmlSelectMultipleItems needed for <select multiple> by iOS
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Dec 2011 03:48:35 +0000 (03:48 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Dec 2011 03:48:35 +0000 (03:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=73734

Patch by Benjamin Poulain <bpoulain@apple.com> on 2011-12-05
Reviewed by David Kilzer.

* platform/DefaultLocalizationStrategy.cpp:
(WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):
* platform/DefaultLocalizationStrategy.h:

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

Source/WebCore/ChangeLog
Source/WebCore/platform/DefaultLocalizationStrategy.cpp
Source/WebCore/platform/DefaultLocalizationStrategy.h

index b6b956e..138b4cc 100644 (file)
@@ -1,3 +1,14 @@
+2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
+
+        Upstream htmlSelectMultipleItems needed for <select multiple> by iOS
+        https://bugs.webkit.org/show_bug.cgi?id=73734
+
+        Reviewed by David Kilzer.
+
+        * platform/DefaultLocalizationStrategy.cpp:
+        (WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):
+        * platform/DefaultLocalizationStrategy.h:
+
 2011-12-05  Darin Adler  <darin@apple.com>
 
         Use HashMap<OwnPtr> in CrossOriginPreflightResultCache
index e453323..2a5f0f9 100644 (file)
@@ -767,7 +767,13 @@ String DefaultLocalizationStrategy::keygenKeychainItemName(const String& host)
     return formatLocalizedString(WEB_UI_STRING("Key from %@", "Name of keychain key generated by the KEYGEN tag"), hostCFString.get());
 }
 
-#endif
+#if PLATFORM(IOS)
+String DefaultLocalizationStrategy::htmlSelectMultipleItems(int count)
+{
+    return formatLocalizedString(WEB_UI_STRING("%d Items", "Present the number of selected <option> items in a <select multiple> element (iOS only)"), count);
+}
+#endif // PLATFORM(IOS)
+#endif // PLATFORM(MAC)
 
 String DefaultLocalizationStrategy::imageTitle(const String& filename, const IntSize& size)
 {
index 0900f46..4fa4d9c 100644 (file)
@@ -169,7 +169,10 @@ public:
     virtual String keygenMenuItem1024();
     virtual String keygenMenuItem2048();
     virtual String keygenKeychainItemName(const String& host);
-#endif
+#if PLATFORM(IOS)
+    virtual String htmlSelectMultipleItems(int);
+#endif // PLATFORM(IOS)
+#endif // PLATFORM(MAC)
     virtual String imageTitle(const String& filename, const IntSize&);
     virtual String mediaElementLoadingStateText();
     virtual String mediaElementLiveBroadcastStateText();