[prev in list] [next in list] [prev in thread] [next in thread]
List: webkit-changes
Subject: [webkit-changes] [50046] trunk
From: eric () webkit ! org
Date: 2009-10-25 20:16:00
Message-ID: 20091025201604.277C32BB194A () beta ! macosforge ! org
[Download RAW message or body]
[Attachment #2 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[50046] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: \
verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: \
bold} #msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: \
bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: \
6px; } #logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em \
0; } #logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg \
h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } \
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; \
} #logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: \
-1.5em; padding-left: 1.5em; } #logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em \
1em 0 1em; background: white;} #logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid \
#fa0; border-bottom: 1px solid #fa0; background: #fff; } #logmsg table th { \
text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted \
#fa0; } #logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: \
0.2em 0.5em; } #logmsg table thead th { text-align: center; border-bottom: 1px solid \
#fa0; } #logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: \
6px; } #patch { width: 100%; }
#patch h4 {font-family: \
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, \
#patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins \
{background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del \
{background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, \
.info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a \
href="http://trac.webkit.org/projects/webkit/changeset/50046">50046</a></dd> \
<dt>Author</dt> <dd>eric@webkit.org</dd> <dt>Date</dt> <dd>2009-10-25 13:15:56 -0700 \
(Sun, 25 Oct 2009)</dd> </dl>
<h3>Log Message</h3>
<pre>2009-10-25 Hironori Bono <hbono@chromium.org>
Reviewed by Darin Adler.
A quick fix for Bug 29103.
Since String::startsWith() cannot fold non-ASCII characters, this change \
folds the prefix string and the option string before calling String::startsWith().
https://bugs.webkit.org/show_bug.cgi?id=29103
* fast/forms/listbox-typeahead-cyrillic-expected.txt: Added.
* fast/forms/listbox-typeahead-cyrillic.html: Added.
* fast/forms/listbox-typeahead-greek-expected.txt: Added.
* fast/forms/listbox-typeahead-greek.html: Added.
2009-10-25 Hironori Bono <hbono@chromium.org>
Reviewed by Darin Adler.
A quick fix for Bug 29103.
Since String::startsWith() cannot fold non-ASCII characters, this change \
folds the prefix string and the option string before calling String::startsWith().
https://bugs.webkit.org/show_bug.cgi?id=29103
Tests: fast/forms/listbox-typeahead-cyrillic.html
fast/forms/listbox-typeahead-greek.html
* dom/SelectElement.cpp:
(WebCore::SelectElement::typeAheadFind):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoredomSelectElementcpp">trunk/WebCore/dom/SelectElement.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastformslistboxtypeaheadcyrillicexpectedtxt">trunk/LayoutTests/fast/forms/listbox-typeahead-cyrillic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformslistboxtypeaheadcyrillichtml">trunk/LayoutTests/fast/forms/listbox-typeahead-cyrillic.html</a></li>
<li><a href="#trunkLayoutTestsfastformslistboxtypeaheadgreekexpectedtxt">trunk/LayoutTests/fast/forms/listbox-typeahead-greek-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformslistboxtypeaheadgreekhtml">trunk/LayoutTests/fast/forms/listbox-typeahead-greek.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (50045 => 50046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog 2009-10-25 17:28:10 UTC (rev \
50045)
+++ trunk/LayoutTests/ChangeLog 2009-10-25 20:15:56 UTC (rev 50046)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2009-10-25 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ A quick fix for Bug 29103.
+ Since String::startsWith() cannot fold non-ASCII characters, this change \
folds the prefix string + and the option string before calling \
String::startsWith(). + https://bugs.webkit.org/show_bug.cgi?id=29103
+
+ * fast/forms/listbox-typeahead-cyrillic-expected.txt: Added.
+ * fast/forms/listbox-typeahead-cyrillic.html: Added.
+ * fast/forms/listbox-typeahead-greek-expected.txt: Added.
+ * fast/forms/listbox-typeahead-greek.html: Added.
+
</ins><span class="cx"> 2009-10-25 Sam Weinig <sam@webkit.org>
</span><span class="cx">
</span><span class="cx"> Reviewed by Dan Bernstein.
</span></span></pre></div>
<a id="trunkLayoutTestsfastformslistboxtypeaheadcyrillicexpectedtxt"></a>
<div class="addfile"><h4>Added: \
trunk/LayoutTests/fast/forms/listbox-typeahead-cyrillic-expected.txt (0 => \
50046)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/LayoutTests/fast/forms/listbox-typeahead-cyrillic-expected.txt \
(rev 0)
+++ trunk/LayoutTests/fast/forms/listbox-typeahead-cyrillic-expected.txt 2009-10-25 \
20:15:56 UTC (rev 50046) </span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+This test verifies a drop-down menu can refine the selection when we \
send keydown events consisting of Cyrillic characters. +
+
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformslistboxtypeaheadcyrillichtml"></a>
<div class="addfile"><h4>Added: \
trunk/LayoutTests/fast/forms/listbox-typeahead-cyrillic.html (0 => 50046)</h4> <pre \
class="diff"><span> <span class="info">--- \
trunk/LayoutTests/fast/forms/listbox-typeahead-cyrillic.html \
(rev 0)
+++ trunk/LayoutTests/fast/forms/listbox-typeahead-cyrillic.html 2009-10-25 20:15:56 \
UTC (rev 50046) </span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+<html>
+<head>
+ <title></title>
+</head>
+<body>
+ <p>This test verifies a drop-down menu can refine the selection when we \
send keydown events consisting of Cyrillic characters.</p> + <select \
id="test"> + <option value="-1">should not see \
me</option> + <option \
value="0">&#x0410;</option> + <option \
value="1">&#x0410;&#x0411;</option> + <option \
value="2">&#x0410;&#x0411;&#x0412;</option> + \
<option value="3">&#x0410;&#x0411;&#x0412;&#x0413;</option>
+ <option \
value="4">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;</option>
+ <option \
value="5">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&#x0415;</option>
+ <option \
value="6">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&#x0415;&#x0416;</option>
+ <option \
value="7">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&#x0415;&#x0416;&#x0417;</option>
+ <option \
value="8">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&#x0415;&#x0416;&#x0417;&#x0418;</option>
+ <option \
value="9">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&#x0415;&#x0416;&#x0417;&#x0418;&#x0419;</option>
+ <option \
value="10">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;</option> \
+ <option value="11">&#x0410;&#x0411;&#x0412;&# \
x0413;&#x0414;&#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;</option>
+ <option \
value="12">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;&#x041C;</option>
+ <option \
value="13">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;&#x041C;&#x041D;</option>
+ <option \
value="14">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;&#x041C;&#x041D;&#x041E;</option>
+ <option \
value="15">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;&#x041C;&#x041D;&#x041E;&#x041F;</option>
+ <option \
value="16">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;&#x041C;&#x041D;&#x041E;&#x041F;&#x0420;</option>
+ <option \
value="17">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;</option> + \
<option value="18">&#x0410;&#x0411;&#x0412;&#x0413;&am \
p;#x0414;&#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;& \
#x041B;&#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;</option>
+ <option \
value="19">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&#x0423;</option>
+ <option \
value="20">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&#x0423;&#x0424;</option>
+ <option \
value="21">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&#x0423;&#x0424;&#x0425;</option>
+ <option \
value="22">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&#x0423;&#x0424;&#x0425;&#x0426;</option>
+ <option \
value="23">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&#x0423;&#x0424;&#x0425;&#x0426;&#x0427;</option>
+ <option \
value="24">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&# \
x0423;&#x0424;&#x0425;&#x0426;&#x0427;&#x0428;</option> + \
<option value="25">&#x0410;&#x0411;&#x0412;&#x0413;&am \
p;#x0414;&#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;& \
#x041B;&#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x \
0422;&#x0423;&#x0424;&#x0425;&#x0426;&#x0427;&#x0428;&#x0429;</option>
+ <option \
value="26">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&# \
x0423;&#x0424;&#x0425;&#x0426;&#x0427;&#x0428;&#x0429;&#x042A;</option>
+ <option \
value="27">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&# \
x0423;&#x0424;&#x0425;&#x0426;&#x0427;&#x0428;&#x0429;&#x042A;&#x042B;</option>
+ <option \
value="28">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&# \
x0423;&#x0424;&#x0425;&#x0426;&#x0427;&#x0428;&#x0429;&#x042A;&#x042B;&#x042C;</option>
+ <option \
value="29">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&# \
x0423;&#x0424;&#x0425;&#x0426;&#x0427;&#x0428;&#x0429;&#x042A;&#x042B;&#x042C;&#x042D;</option>
+ <option \
value="30">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&# \
x0423;&#x0424;&#x0425;&#x0426;&#x0427;&#x0428;&#x0429;&#x042A;&#x042B;&#x042C;&#x042D;&#x042E;</option>
+ <option \
value="31">&#x0410;&#x0411;&#x0412;&#x0413;&#x0414;&a \
mp;#x0415;&#x0416;&#x0417;&#x0418;&#x0419;&#x041A;&#x041B;& \
;#x041C;&#x041D;&#x041E;&#x041F;&#x0420;&#x0421;&#x0422;&# \
x0423;&#x0424;&#x0425;&#x0426;&#x0427;&#x0428;&#x0429;&#x042A;&#x042B;&#x042C;&#x042D;&#x042E;&#x042F;</option>
+ </select>
+ <ul id="console"></ul>
+</body>
+<script>
+function log(str) {
+ var li = document.createElement("li");
+ li.appendChild(document.createTextNode(str));
+ var console = document.getElementById("console");
+ console.appendChild(li);
+}
+
+if (window.layoutTestController)
+ window.layoutTestController.dumpAsText();
+
+// Set the input focus to the <select> element.
+var node = document.getElementById("test");
+node.focus();
+
+var base = 0x0430;
+for (var i = base; i <= 0x044F; i++) {
+ // Send a key event consisting of a Cyrillic small character.
+ eventSender.keyDown(String.fromCharCode(i));
+
+ // Compare the value of this <select> element with the expected result.
+ if (node.value == i - base)
+ log('SUCCEEDED');
+ else
+ log('FAILED: expected="' + i + '", actual="' + node.value + \
'".'); +}
+</script>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformslistboxtypeaheadgreekexpectedtxt"></a>
<div class="addfile"><h4>Added: \
trunk/LayoutTests/fast/forms/listbox-typeahead-greek-expected.txt (0 => 50046)</h4> \
<pre class="diff"><span> <span class="info">--- \
trunk/LayoutTests/fast/forms/listbox-typeahead-greek-expected.txt \
(rev 0)
+++ trunk/LayoutTests/fast/forms/listbox-typeahead-greek-expected.txt 2009-10-25 \
20:15:56 UTC (rev 50046) </span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+This test verifies a drop-down menu can refine the selection when we \
send keydown events consisting of Greek small characters. +
+
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
+SUCCEEDED
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformslistboxtypeaheadgreekhtml"></a>
<div class="addfile"><h4>Added: \
trunk/LayoutTests/fast/forms/listbox-typeahead-greek.html (0 => 50046)</h4> <pre \
class="diff"><span> <span class="info">--- \
trunk/LayoutTests/fast/forms/listbox-typeahead-greek.html \
(rev 0)
+++ trunk/LayoutTests/fast/forms/listbox-typeahead-greek.html 2009-10-25 20:15:56 UTC \
(rev 50046) </span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+<html>
+<head>
+ <title></title>
+</head>
+<body>
+ <p>This test verifies a drop-down menu can refine the selection when we \
send keydown events consisting of Greek small characters.</p> + <select \
id="test"> + <option value="-1">should not see \
me</option> + <option \
value="0">&#x0391;</option> + <option \
value="1">&#x0391;&#x0392;</option> + <option \
value="2">&#x0391;&#x0392;&#x0393;</option> + \
<option value="3">&#x0391;&#x0392;&#x0393;&#x0394;</option>
+ <option \
value="4">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;</option>
+ <option \
value="5">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&#x0396;</option>
+ <option \
value="6">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&#x0396;&#x0397;</option>
+ <option \
value="7">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&#x0396;&#x0397;&#x0398;</option>
+ <option \
value="8">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&#x0396;&#x0397;&#x0398;&#x0399;</option>
+ <option \
value="9">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&#x0396;&#x0397;&#x0398;&#x0399;&#x039A;</option>
+ <option \
value="10">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;</option> \
+ <option value="11">&#x0391;&#x0392;&#x0393;&# \
x0394;&#x0395;&#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;</option>
+ <option \
value="12">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;&#x039D;</option>
+ <option \
value="13">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;&#x039D;&#x039E;</option>
+ <option \
value="14">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;&#x039D;&#x039E;&#x039F;</option>
+ <option \
value="15">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;&#x039D;&#x039E;&#x039F;&#x03A0;</option>
+ <option \
value="16">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;&#x039D;&#x039E;&#x039F;&#x03A0;&#x03A1;</option>
+ <option \
value="18">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;& \
;#x039D;&#x039E;&#x039F;&#x03A0;&#x03A1;&#x03A3;</option> + \
<option value="19">&#x0391;&#x0392;&#x0393;&#x0394;&am \
p;#x0395;&#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;& \
#x039C;&#x039D;&#x039E;&#x039F;&#x03A0;&#x03A1;&#x03A3;&#x03A4;</option>
+ <option \
value="20">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;& \
;#x039D;&#x039E;&#x039F;&#x03A0;&#x03A1;&#x03A3;&#x03A4;&#x03A5;</option>
+ <option \
value="21">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;& \
;#x039D;&#x039E;&#x039F;&#x03A0;&#x03A1;&#x03A3;&#x03A4;&#x03A5;&#x03A6;</option>
+ <option \
value="22">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;& \
;#x039D;&#x039E;&#x039F;&#x03A0;&#x03A1;&#x03A3;&#x03A4;&#x03A5;&#x03A6;&#x03A7;</option>
+ <option \
value="23">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;& \
;#x039D;&#x039E;&#x039F;&#x03A0;&#x03A1;&#x03A3;&#x03A4;&#x03A5;&#x03A6;&#x03A7;&#x03A8;</option>
+ <option \
value="24">&#x0391;&#x0392;&#x0393;&#x0394;&#x0395;&a \
mp;#x0396;&#x0397;&#x0398;&#x0399;&#x039A;&#x039B;&#x039C;& \
;#x039D;&#x039E;&#x039F;&#x03A0;&#x03A1;&#x03A3;&#x03A4;&#x03A5;&#x03A6;&#x03A7;&#x03A8;&#x03A9;</option>
+ </select>
+ <ul id="console"></ul>
+</body>
+<script>
+function log(str) {
+ var li = document.createElement("li");
+ li.appendChild(document.createTextNode(str));
+ var console = document.getElementById("console");
+ console.appendChild(li);
+}
+
+if (window.layoutTestController)
+ window.layoutTestController.dumpAsText();
+
+// Set the input focus to the <select> element.
+var node = document.getElementById("test");
+node.focus();
+
+var base = 0x03B1;
+for (var i = base; i <= 0x03C9; i++) {
+ // We don't have to send U+03C2 (Greek Small Letter Final Sigma).
+ if (i != 0x03C2) {
+ // Send a key event consisting of a Greek small character.
+ eventSender.keyDown(String.fromCharCode(i));
+
+ // Compare the value of this <select> element with the expected \
result. + if (node.value == i - base)
+ log('SUCCEEDED');
+ else
+ log('FAILED: expected="' + i + '", actual="' + node.value \
+ '".'); + }
+}
+</script>
+</html>
</ins></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (50045 => 50046)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog 2009-10-25 17:28:10 UTC (rev 50045)
+++ trunk/WebCore/ChangeLog 2009-10-25 20:15:56 UTC (rev 50046)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2009-10-25 Hironori Bono <hbono@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ A quick fix for Bug 29103.
+ Since String::startsWith() cannot fold non-ASCII characters, this change \
folds the prefix string + and the option string before calling \
String::startsWith(). + https://bugs.webkit.org/show_bug.cgi?id=29103
+
+ Tests: fast/forms/listbox-typeahead-cyrillic.html
+ fast/forms/listbox-typeahead-greek.html
+
+ * dom/SelectElement.cpp:
+ (WebCore::SelectElement::typeAheadFind):
+
</ins><span class="cx"> 2009-10-25 Keishi Hattori <casey.hattori@gmail.com>
</span><span class="cx">
</span><span class="cx"> Reviewed by Timothy Hatcher.
</span></span></pre></div>
<a id="trunkWebCoredomSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/SelectElement.cpp (50045 => \
50046)</h4> <pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/SelectElement.cpp 2009-10-25 17:28:10 UTC \
(rev 50045)
+++ trunk/WebCore/dom/SelectElement.cpp 2009-10-25 20:15:56 UTC (rev 50046)
</span><span class="lines">@@ -874,13 +874,19 @@
</span><span class="cx"> int index = (optionToListIndex(data, element, selected \
>= 0 ? selected : 0) + searchStartOffset) % itemCount; </span><span class="cx"> \
ASSERT(index >= 0); </span><span class="cx">
</span><ins>+ // Compute a case-folded copy of the prefix string before beginning \
the search for + // a matching element. This code uses foldCase to work around the \
fact that + // String::startWith does not fold non-ASCII characters. This code can \
be changed + // to use startWith once that is fixed.
+ String prefixWithCaseFolded(prefix.foldCase());
</ins><span class="cx"> for (int i = 0; i < itemCount; ++i, index = (index + \
1) % itemCount) { </span><span class="cx"> OptionElement* optionElement = \
toOptionElement(items[index]); </span><span class="cx"> if (!optionElement || \
items[index]->disabled()) </span><span class="cx"> continue;
</span><span class="cx">
</span><ins>+ // Fold the option string and check if its prefix is equal to \
the folded prefix. </ins><span class="cx"> String text = \
optionElement->textIndentedToRespectGroupLabel(); </span><del>- if \
(stripLeadingWhiteSpace(text).startsWith(prefix, false)) { </del><ins>+ if \
(stripLeadingWhiteSpace(text).foldCase().startsWith(prefixWithCaseFolded)) { \
</ins><span class="cx"> setSelectedIndex(data, element, \
listToOptionIndex(data, element, index)); </span><span class="cx"> if \
(!data.usesMenuList()) </span><span class="cx"> listBoxOnChange(data, \
element); </span></span></pre>
</div>
</div>
</body>
</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic