Title: [107440] trunk/Source/WebCore
Revision
107440
Author
[email protected]
Date
2012-02-10 14:17:30 -0800 (Fri, 10 Feb 2012)

Log Message

DefaultLocalizationStrategy::htmlSelectMultipleItems() should use size_t instead of int
https://bugs.webkit.org/show_bug.cgi?id=78374

Patch by Benjamin Poulain <[email protected]> on 2012-02-10
Reviewed by Joseph Pecoraro.

The value comes from size_t and is converted to int for no good reason. We should use
size_t.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107439 => 107440)


--- trunk/Source/WebCore/ChangeLog	2012-02-10 22:17:28 UTC (rev 107439)
+++ trunk/Source/WebCore/ChangeLog	2012-02-10 22:17:30 UTC (rev 107440)
@@ -1,3 +1,18 @@
+2012-02-10  Benjamin Poulain  <[email protected]>
+
+        DefaultLocalizationStrategy::htmlSelectMultipleItems() should use size_t instead of int
+        https://bugs.webkit.org/show_bug.cgi?id=78374
+
+        Reviewed by Joseph Pecoraro.
+
+        The value comes from size_t and is converted to int for no good reason. We should use
+        size_t.
+
+        * platform/DefaultLocalizationStrategy.cpp:
+        (WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):
+        * platform/DefaultLocalizationStrategy.h:
+        (DefaultLocalizationStrategy):
+
 2012-02-10  Anders Carlsson  <[email protected]>
 
         More ScrollableArea cleanup

Modified: trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp (107439 => 107440)


--- trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp	2012-02-10 22:17:28 UTC (rev 107439)
+++ trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp	2012-02-10 22:17:30 UTC (rev 107440)
@@ -768,7 +768,7 @@
 }
 
 #if PLATFORM(IOS)
-String DefaultLocalizationStrategy::htmlSelectMultipleItems(int count)
+String DefaultLocalizationStrategy::htmlSelectMultipleItems(size_t count)
 {
     switch (count) {
     case 0:
@@ -776,7 +776,7 @@
     case 1:
         return WEB_UI_STRING("1 Item", "Present the element <select multiple> when a single <option> is selected (iOS only)");
     default:
-        return formatLocalizedString(WEB_UI_STRING("%d Items", "Present the number of selected <option> items in a <select multiple> element (iOS only)"), count);
+        return formatLocalizedString(WEB_UI_STRING("%zu Items", "Present the number of selected <option> items in a <select multiple> element (iOS only)"), count);
     }
 }
 #endif // PLATFORM(IOS)

Modified: trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h (107439 => 107440)


--- trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h	2012-02-10 22:17:28 UTC (rev 107439)
+++ trunk/Source/WebCore/platform/DefaultLocalizationStrategy.h	2012-02-10 22:17:30 UTC (rev 107440)
@@ -170,7 +170,7 @@
     virtual String keygenMenuItem2048();
     virtual String keygenKeychainItemName(const String& host);
 #if PLATFORM(IOS)
-    virtual String htmlSelectMultipleItems(int);
+    virtual String htmlSelectMultipleItems(size_t);
 #endif // PLATFORM(IOS)
 #endif // PLATFORM(MAC)
     virtual String imageTitle(const String& filename, const IntSize&);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to