[BlackBerry] Selection items show as garbage for non-ascii characters.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2012 04:20:18 +0000 (04:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2012 04:20:18 +0000 (04:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=89969

Add charset utf-8 to the select popup's page.

Patch by Jason Liu <jason.liu@torchmobile.com.cn> on 2012-06-28
Reviewed by Antonio Gomes.

.:

* ManualTests/blackberry/select-popup-items-unicode-display.html: Added.

Source/WebKit/blackberry:

* WebCoreSupport/SelectPopupClient.cpp:
(WebCore::SelectPopupClient::generateHTML):

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

ChangeLog
ManualTests/blackberry/select-popup-items-unicode-display.html [new file with mode: 0644]
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp

index 0be9fa5..596eeed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-06-28  Jason Liu  <jason.liu@torchmobile.com.cn>
+
+        [BlackBerry] Selection items show as garbage for non-ascii characters.
+        https://bugs.webkit.org/show_bug.cgi?id=89969
+
+        Add charset utf-8 to the select popup's page.
+
+        Reviewed by Antonio Gomes.
+
+        * ManualTests/blackberry/select-popup-items-unicode-display.html: Added.
+
 2012-06-28  Christophe Dumez  <christophe.dumez@intel.com>
 
         [EFL] Enable support for HTML5 datalist
diff --git a/ManualTests/blackberry/select-popup-items-unicode-display.html b/ManualTests/blackberry/select-popup-items-unicode-display.html
new file mode 100644 (file)
index 0000000..582e76b
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <body>
+    <p>This tests if we can show unicode correctly. It is for <a href="https://bugs.webkit.org/show_bug.cgi?id=89969">https://bugs.webkit.org/show_bug.cgi?id=89969.</a></p>
+    <p>
+      If you can see chinese(北京, 澳门) after pressing the droplist, this test passes.
+   </p>
+    <select>
+        <option selected="selected">北京</option>
+        <option>ShenYang</option>
+        <option>澳门</option>
+    </select>
+  </body>
+</html>
index 50e05cb..1a47b15 100644 (file)
@@ -1,3 +1,15 @@
+2012-06-28  Jason Liu  <jason.liu@torchmobile.com.cn>
+
+        [BlackBerry] Selection items show as garbage for non-ascii characters.
+        https://bugs.webkit.org/show_bug.cgi?id=89969
+
+        Add charset utf-8 to the select popup's page.
+
+        Reviewed by Antonio Gomes.
+
+        * WebCoreSupport/SelectPopupClient.cpp:
+        (WebCore::SelectPopupClient::generateHTML):
+
 2012-06-28  Leo Yang  <leo.yang@torchmobile.com.cn>
 
         [BlackBerry] Checkerboard shown when clicking on error page buttons
index f30d01e..15f1a76 100644 (file)
@@ -65,7 +65,7 @@ void SelectPopupClient::generateHTML(bool multiple, int size, const ScopeArray<B
     const int* itemType, bool* selecteds)
 {
     StringBuilder source;
-    source.append("<html><head><style>\n");
+    source.append("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/><style>\n");
     // Include CSS file.
     source.append(popupControlBlackBerryCss,
             sizeof(popupControlBlackBerryCss));