Title: [121630] trunk
Revision
121630
Author
[email protected]
Date
2012-06-30 15:54:56 -0700 (Sat, 30 Jun 2012)

Log Message

[BlackBerry] WebView/Browser cause blank screen when selecting a dropdown field.
https://bugs.webkit.org/show_bug.cgi?id=90241

This issue is caused by single quotes in option's labels.
We should use the escape character of single quotes in _javascript_'s string which
starts and ends with single quotes.
So we replace lablels' single quotes with its escape character during generating the
select popUp's HTML.

.:

Patch by Jason Liu <[email protected]> on 2012-06-30
Reviewed by George Staikos.

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

Source/WebKit/blackberry:

Patch by Jason Liu <[email protected]> on 2012-06-30
Reviewed by George Staikos.

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

Modified Paths

Diff

Modified: trunk/ChangeLog (121629 => 121630)


--- trunk/ChangeLog	2012-06-30 19:28:26 UTC (rev 121629)
+++ trunk/ChangeLog	2012-06-30 22:54:56 UTC (rev 121630)
@@ -1,3 +1,19 @@
+2012-06-30  Jason Liu  <[email protected]>
+
+        [BlackBerry] WebView/Browser cause blank screen when selecting a dropdown field.
+        https://bugs.webkit.org/show_bug.cgi?id=90241
+
+        This issue is caused by single quotes in option's labels.
+        We should use the escape character of single quotes in _javascript_'s string which 
+        starts and ends with single quotes.
+        So we replace lablels' single quotes with its escape character during generating the 
+        select popUp's HTML.
+
+
+        Reviewed by George Staikos.
+
+        * ManualTests/blackberry/select-popup-items-unicode-display.html:
+
 2012-06-29  Luiz Agostini  <[email protected]>
 
         [Qt][WK2] Private non-QtQuick API

Modified: trunk/ManualTests/blackberry/select-popup-items-unicode-display.html (121629 => 121630)


--- trunk/ManualTests/blackberry/select-popup-items-unicode-display.html	2012-06-30 19:28:26 UTC (rev 121629)
+++ trunk/ManualTests/blackberry/select-popup-items-unicode-display.html	2012-06-30 22:54:56 UTC (rev 121630)
@@ -9,6 +9,7 @@
         <option selected="selected">北京</option>
         <option>ShenYang</option>
         <option>澳门</option>
+        <option>Republic of Côte d'Ivoire</option>
     </select>
   </body>
 </html>

Modified: trunk/Source/WebKit/blackberry/ChangeLog (121629 => 121630)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-06-30 19:28:26 UTC (rev 121629)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-06-30 22:54:56 UTC (rev 121630)
@@ -1,3 +1,19 @@
+2012-06-30  Jason Liu  <[email protected]>
+
+        [BlackBerry] WebView/Browser cause blank screen when selecting a dropdown field.
+        https://bugs.webkit.org/show_bug.cgi?id=90241
+
+        This issue is caused by single quotes in option's labels.
+        We should use the escape character of single quotes in _javascript_'s string which 
+        starts and ends with single quotes.
+        So we replace lablels' single quotes with its escape character during generating the 
+        select popUp's HTML.
+
+        Reviewed by George Staikos.
+
+        * WebCoreSupport/SelectPopupClient.cpp:
+        (WebCore::SelectPopupClient::generateHTML):
+
 2012-06-30  Jakob Petsovits  <[email protected]>
 
         [BlackBerry] Allow surface resizing for use cases other than rotation.

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp (121629 => 121630)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp	2012-06-30 19:28:26 UTC (rev 121629)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp	2012-06-30 22:54:56 UTC (rev 121630)
@@ -82,7 +82,7 @@
     // Add labels.
     source.append("[");
     for (int i = 0; i < size; i++) {
-        source.append("'" + String(labels[i].impl()) + "'");
+        source.append("'" + String(labels[i].impl()).replace("'", "\\'") + "'");
         // Don't append ',' to last element.
         if (i != size - 1)
             source.append(", ");
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to