<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[23963] trunk</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/23963">23963</a></dd>
<dt>Author</dt> <dd>adele</dd>
<dt>Date</dt> <dd>2007-07-03 16:16:02 -0700 (Tue, 03 Jul 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>LayoutTests:

        Reviewed by Darin.

        Test for: &lt;rdar://problem/5292988&gt; domain names shouldn't contain ignorable characters

        * fast/encoding/idn-security-expected.txt: Added.
        * fast/encoding/idn-security.html: Added.
        * win/Skipped: Blocked by &lt;rdar://problem/5301954&gt;.

WebKit:

        Reviewed by Darin.

        Fix for: &lt;rdar://problem/5292988&gt; domain names shouldn't contain ignorable characters

        * Misc/WebNSURLExtras.m:
        (isLookalikeCharacter): Renamed.  Also excludes any non-printable character, 
         any character considered as whitespace that isn't already converted to a space by ICU, any ignorable character,
         and any character excluded in Mozilla's blacklist: http://kb.mozillazine.org/Network.IDN.blacklist_chars
        (allCharactersInIDNScriptWhiteList):

WebKitTools:

        Reviewed by Darin.

        Extended DumpRenderTree to test encoding and decoding host names.

        * DumpRenderTree/DumpRenderTree.m:
        (+[LayoutTestController isSelectorExcludedFromWebScript:]): Added cases for encodeHostName and decodeHostName.
        (+[LayoutTestController webScriptNameForSelector:]): ditto.
        (-[LayoutTestController decodeHostName:]): Added.
        (-[LayoutTestController encodeHostName:]): Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestswinSkipped">trunk/LayoutTests/win/Skipped</a></li>
<li><a href="#trunkWebKitChangeLog">trunk/WebKit/ChangeLog</a></li>
<li><a href="#trunkWebKitMiscWebNSURLExtrasm">trunk/WebKit/Misc/WebNSURLExtras.m</a></li>
<li><a href="#trunkWebKitToolsChangeLog">trunk/WebKitTools/ChangeLog</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreeDumpRenderTreem">trunk/WebKitTools/DumpRenderTree/DumpRenderTree.m</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastencodingidnsecurityexpectedtxt">trunk/LayoutTests/fast/encoding/idn-security-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastencodingidnsecurityhtml">trunk/LayoutTests/fast/encoding/idn-security.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (23962 => 23963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-07-03 23:03:33 UTC (rev 23962)
+++ trunk/LayoutTests/ChangeLog        2007-07-03 23:16:02 UTC (rev 23963)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2007-07-03  Adele Peterson  &lt;adele@apple.com&gt;
+
+        Reviewed by Darin.
+
+        Test for: &lt;rdar://problem/5292988&gt; domain names shouldn't contain ignorable characters
+
+        * fast/encoding/idn-security-expected.txt: Added.
+        * fast/encoding/idn-security.html: Added.
+        * win/Skipped: Blocked by &lt;rdar://problem/5301954&gt;.
+
</ins><span class="cx"> 2007-07-03  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin.
</span></span></pre></div>
<a id="trunkLayoutTestsfastencodingidnsecurityexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/encoding/idn-security-expected.txt (0 => 23963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/encoding/idn-security-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/encoding/idn-security-expected.txt        2007-07-03 23:16:02 UTC (rev 23963)
</span><span class="lines">@@ -0,0 +1,229 @@
</span><ins>+PASS testIDNRoundTrip(0x2e) is '.'
+PASS testIDNRoundTripNotFirstCharacter(0x2e) is '.'
+PASS testIDNRoundTrip(0x2f) is '/'
+PASS testIDNRoundTripNotFirstCharacter(0x2f) is '/'
+PASS testIDNRoundTrip(0x41) is 'A'
+PASS testIDNRoundTripNotFirstCharacter(0x41) is 'A'
+PASS testIDNRoundTrip(0x633) is '%u0633'
+PASS testIDNRoundTripNotFirstCharacter(0x633) is '%u0633'
+PASS testIDNRoundTrip(0x561) is '%u0561'
+PASS testIDNRoundTripNotFirstCharacter(0x561) is '%u0561'
+PASS testIDNRoundTrip(0x3105) is '%u3105'
+PASS testIDNRoundTripNotFirstCharacter(0x3105) is '%u3105'
+PASS testIDNRoundTrip(0x1613) is '%u1613'
+PASS testIDNRoundTripNotFirstCharacter(0x1613) is '%u1613'
+PASS testIDNRoundTrip(0x905) is '%u0905'
+PASS testIDNRoundTripNotFirstCharacter(0x905) is '%u0905'
+PASS testIDNRoundTrip(0xa85) is '%u0A85'
+PASS testIDNRoundTripNotFirstCharacter(0xa85) is '%u0A85'
+PASS testIDNRoundTrip(0xa05) is '%u0A05'
+PASS testIDNRoundTripNotFirstCharacter(0xa05) is '%u0A05'
+PASS testIDNRoundTrip(0x1115) is '%u1115'
+PASS testIDNRoundTripNotFirstCharacter(0x1115) is '%u1115'
+PASS testIDNRoundTrip(0x4e2d) is '%u4E2D'
+PASS testIDNRoundTripNotFirstCharacter(0x4e2d) is '%u4E2D'
+PASS testIDNRoundTrip(0x5d0) is '%u05D0'
+PASS testIDNRoundTripNotFirstCharacter(0x5d0) is '%u05D0'
+PASS testIDNRoundTrip(0x3041) is '%u3041'
+PASS testIDNRoundTripNotFirstCharacter(0x3041) is '%u3041'
+PASS testIDNRoundTrip(0x30a1) is '%u30A1'
+PASS testIDNRoundTripNotFirstCharacter(0x30a1) is '%u30A1'
+PASS testIDNRoundTrip(0xb94) is '%u0B94'
+PASS testIDNRoundTripNotFirstCharacter(0xb94) is '%u0B94'
+PASS testIDNRoundTrip(0xe01) is '%u0E01'
+PASS testIDNRoundTripNotFirstCharacter(0xe01) is '%u0E01'
+PASS testIDNRoundTrip(0xa000) is '%uA000'
+PASS testIDNRoundTripNotFirstCharacter(0xa000) is '%uA000'
+PASS testIDNRoundTrip(0x2024) is '.'
+PASS testIDNRoundTripNotFirstCharacter(0x2024) is '.'
+PASS testIDNRoundTrip(0xfe52) is '.'
+PASS testIDNRoundTripNotFirstCharacter(0xfe52) is '.'
+PASS testIDNRoundTrip(0xff0f) is '/'
+PASS testIDNRoundTripNotFirstCharacter(0xff0f) is '/'
+PASS testIDNRoundTrip(0xa0) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0xa0) is '%20'
+PASS testIDNRoundTrip(0x2000) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2000) is '%20'
+PASS testIDNRoundTrip(0x2001) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2001) is '%20'
+PASS testIDNRoundTrip(0x2002) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2002) is '%20'
+PASS testIDNRoundTrip(0x2003) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2003) is '%20'
+PASS testIDNRoundTrip(0x2004) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2004) is '%20'
+PASS testIDNRoundTrip(0x2005) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2005) is '%20'
+PASS testIDNRoundTrip(0x2006) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2006) is '%20'
+PASS testIDNRoundTrip(0x2007) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2007) is '%20'
+PASS testIDNRoundTrip(0x2008) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2008) is '%20'
+PASS testIDNRoundTrip(0x2009) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x2009) is '%20'
+PASS testIDNRoundTrip(0x200a) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x200a) is '%20'
+PASS testIDNRoundTrip(0x202f) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x202f) is '%20'
+PASS testIDNRoundTrip(0x205f) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x205f) is '%20'
+PASS testIDNRoundTrip(0x3000) is '%20'
+PASS testIDNRoundTripNotFirstCharacter(0x3000) is '%20'
+PASS testIDNRoundTrip(0xbc) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0xbc) is 'punycode'
+PASS testIDNRoundTrip(0xbd) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0xbd) is 'punycode'
+PASS testIDNRoundTrip(0x1c3) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x1c3) is 'punycode'
+PASS testIDNRoundTrip(0x337) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x337) is 'punycode'
+PASS testIDNRoundTrip(0x337) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x337) is 'punycode'
+PASS testIDNRoundTrip(0x338) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x338) is 'punycode'
+PASS testIDNRoundTrip(0x338) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x338) is 'punycode'
+PASS testIDNRoundTrip(0x5b4) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x5b4) is 'punycode'
+PASS testIDNRoundTrip(0x5bc) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x5bc) is 'punycode'
+PASS testIDNRoundTrip(0x660) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x660) is 'punycode'
+PASS testIDNRoundTrip(0x6f0) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x6f0) is 'punycode'
+PASS testIDNRoundTrip(0x115f) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x115f) is 'punycode'
+PASS testIDNRoundTrip(0x1160) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x1160) is 'punycode'
+PASS testIDNRoundTrip(0x2027) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2027) is 'punycode'
+PASS testIDNRoundTrip(0x2039) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2039) is 'punycode'
+PASS testIDNRoundTrip(0x203a) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x203a) is 'punycode'
+PASS testIDNRoundTrip(0x2044) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2044) is 'punycode'
+PASS testIDNRoundTrip(0x2044) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2044) is 'punycode'
+PASS testIDNRoundTrip(0x2154) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2154) is 'punycode'
+PASS testIDNRoundTrip(0x2155) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2155) is 'punycode'
+PASS testIDNRoundTrip(0x2156) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2156) is 'punycode'
+PASS testIDNRoundTrip(0x2159) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2159) is 'punycode'
+PASS testIDNRoundTrip(0x215a) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x215a) is 'punycode'
+PASS testIDNRoundTrip(0x215b) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x215b) is 'punycode'
+PASS testIDNRoundTrip(0x215f) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x215f) is 'punycode'
+PASS testIDNRoundTrip(0x2215) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2215) is 'punycode'
+PASS testIDNRoundTrip(0x2215) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2215) is 'punycode'
+PASS testIDNRoundTrip(0x23ae) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x23ae) is 'punycode'
+PASS testIDNRoundTrip(0x2571) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2571) is 'punycode'
+PASS testIDNRoundTrip(0x29f6) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x29f6) is 'punycode'
+PASS testIDNRoundTrip(0x29f8) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x29f8) is 'punycode'
+PASS testIDNRoundTrip(0x29f8) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x29f8) is 'punycode'
+PASS testIDNRoundTrip(0x2afb) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2afb) is 'punycode'
+PASS testIDNRoundTrip(0x2afd) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x2afd) is 'punycode'
+PASS testIDNRoundTrip(0x3014) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x3014) is 'punycode'
+PASS testIDNRoundTrip(0x3015) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x3015) is 'punycode'
+PASS testIDNRoundTrip(0x3033) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x3033) is 'punycode'
+PASS testIDNRoundTrip(0x3164) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x3164) is 'punycode'
+PASS testIDNRoundTrip(0x321d) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x321d) is 'punycode'
+PASS testIDNRoundTrip(0x321e) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x321e) is 'punycode'
+PASS testIDNRoundTrip(0x33ae) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x33ae) is 'punycode'
+PASS testIDNRoundTrip(0x33af) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x33af) is 'punycode'
+PASS testIDNRoundTrip(0x33c6) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x33c6) is 'punycode'
+PASS testIDNRoundTrip(0x33df) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0x33df) is 'punycode'
+PASS testIDNRoundTrip(0xfe14) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0xfe14) is 'punycode'
+PASS testIDNRoundTrip(0xfe15) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0xfe15) is 'punycode'
+PASS testIDNRoundTrip(0xfe3f) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0xfe3f) is 'punycode'
+PASS testIDNRoundTrip(0xfe5d) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0xfe5d) is 'punycode'
+PASS testIDNRoundTrip(0xfe5e) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0xfe5e) is 'punycode'
+PASS testIDNRoundTrip(0xffa0) is 'punycode'
+PASS testIDNRoundTripNotFirstCharacter(0xffa0) is 'punycode'
+PASS testIDNEncode(0x2028) is '%u2028'
+PASS testIDNEncodeNotFirstCharacter(0x2028) is '%u2028'
+PASS testIDNEncode(0x2029) is '%u2029'
+PASS testIDNEncodeNotFirstCharacter(0x2029) is '%u2029'
+PASS testIDNEncode(0x2ff0) is '%u2FF0'
+PASS testIDNEncodeNotFirstCharacter(0x2ff0) is '%u2FF0'
+PASS testIDNEncode(0x2ff1) is '%u2FF1'
+PASS testIDNEncodeNotFirstCharacter(0x2ff1) is '%u2FF1'
+PASS testIDNEncode(0x2ff2) is '%u2FF2'
+PASS testIDNEncodeNotFirstCharacter(0x2ff2) is '%u2FF2'
+PASS testIDNEncode(0x2ff3) is '%u2FF3'
+PASS testIDNEncodeNotFirstCharacter(0x2ff3) is '%u2FF3'
+PASS testIDNEncode(0x2ff4) is '%u2FF4'
+PASS testIDNEncodeNotFirstCharacter(0x2ff4) is '%u2FF4'
+PASS testIDNEncode(0x2ff5) is '%u2FF5'
+PASS testIDNEncodeNotFirstCharacter(0x2ff5) is '%u2FF5'
+PASS testIDNEncode(0x2ff6) is '%u2FF6'
+PASS testIDNEncodeNotFirstCharacter(0x2ff6) is '%u2FF6'
+PASS testIDNEncode(0x2ff7) is '%u2FF7'
+PASS testIDNEncodeNotFirstCharacter(0x2ff7) is '%u2FF7'
+PASS testIDNEncode(0x2ff8) is '%u2FF8'
+PASS testIDNEncodeNotFirstCharacter(0x2ff8) is '%u2FF8'
+PASS testIDNEncode(0x2ff9) is '%u2FF9'
+PASS testIDNEncodeNotFirstCharacter(0x2ff9) is '%u2FF9'
+PASS testIDNEncode(0x2ffa) is '%u2FFA'
+PASS testIDNEncodeNotFirstCharacter(0x2ffa) is '%u2FFA'
+PASS testIDNEncode(0x2ffb) is '%u2FFB'
+PASS testIDNEncodeNotFirstCharacter(0x2ffb) is '%u2FFB'
+PASS testIDNEncode(0xfff9) is '%uFFF9'
+PASS testIDNEncodeNotFirstCharacter(0xfff9) is '%uFFF9'
+PASS testIDNEncode(0xfffa) is '%uFFFA'
+PASS testIDNEncodeNotFirstCharacter(0xfffa) is '%uFFFA'
+PASS testIDNEncode(0xfffb) is '%uFFFB'
+PASS testIDNEncodeNotFirstCharacter(0xfffb) is '%uFFFB'
+PASS testIDNEncode(0xfffc) is '%uFFFC'
+PASS testIDNEncodeNotFirstCharacter(0xfffc) is '%uFFFC'
+PASS testIDNEncode(0xfffd) is '%uFFFD'
+PASS testIDNEncodeNotFirstCharacter(0xfffd) is '%uFFFD'
+PASS testIDNRoundTrip(0x5c3) is 'punycode'
+PASS testIDNEncodeNotFirstCharacter(0x5c3) is '%u05C3'
+PASS testIDNRoundTrip(0x5f4) is 'punycode'
+PASS testIDNEncodeNotFirstCharacter(0x5f4) is '%u05F4'
+PASS testIDNRoundTrip(0x6d4) is 'punycode'
+PASS testIDNEncodeNotFirstCharacter(0x6d4) is '%u06D4'
+PASS testIDNRoundTrip(0x702) is 'punycode'
+PASS testIDNEncodeNotFirstCharacter(0x702) is '%u0702'
+PASS testIDNEncode(0x200b) is '%u200B'
+PASS testIDNRoundTripNotFirstCharacter(0x200b) is ''
+PASS testIDNEncode(0x3002) is '%u3002'
+PASS testIDNRoundTripNotFirstCharacter(0x3002) is '.'
+PASS testIDNEncode(0xff0e) is '%uFF0E'
+PASS testIDNRoundTripNotFirstCharacter(0xff0e) is '.'
+PASS testIDNEncode(0xff61) is '%uFF61'
+PASS testIDNRoundTripNotFirstCharacter(0xff61) is '.'
+PASS testIDNEncode(0xfeff) is '%uFEFF'
+PASS testIDNRoundTripNotFirstCharacter(0xfeff) is ''
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastencodingidnsecurityhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/encoding/idn-security.html (0 => 23963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/encoding/idn-security.html                                (rev 0)
+++ trunk/LayoutTests/fast/encoding/idn-security.html        2007-07-03 23:16:02 UTC (rev 23963)
</span><span class="lines">@@ -0,0 +1,255 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+function testIDNEncode(charCode)
+{
+    var str = String.fromCharCode(charCode);
+    str = layoutTestController.encodeHostName(str);
+    if (str.substr(0, 4) == &quot;xn--&quot;)
+        return &quot;punycode&quot;;
+    return escape(str);
+}
+
+function testIDNEncodeNotFirstCharacter(charCode)
+{
+    var str = String.fromCharCode(charCode);
+    str = &quot;a&quot; + str;
+    str = layoutTestController.encodeHostName(str);
+    if (str.substr(0, 4) == &quot;xn--&quot;)
+        return &quot;punycode&quot;;
+    if (str.substr(0, 1) == &quot;a&quot;)
+        str = str.substr(1, str.length - 1);
+    return escape(str);
+}
+
+function testIDNRoundTrip(charCode)
+{
+    var str = String.fromCharCode(charCode);
+    str = layoutTestController.encodeHostName(str);
+    str = layoutTestController.decodeHostName(str);
+    if (str.substr(0, 4) == &quot;xn--&quot;)
+        return &quot;punycode&quot;;
+    return escape(str);
+}
+
+function testIDNRoundTripNotFirstCharacter(charCode)
+{
+    var str = String.fromCharCode(charCode);
+    str = &quot;a&quot; + str;
+    str = layoutTestController.encodeHostName(str);
+    str = layoutTestController.decodeHostName(str);
+    if (str.substr(0, 4) == &quot;xn--&quot;)
+        return &quot;punycode&quot;;
+    if (str.substr(0, 1) == &quot;a&quot;)
+        str = str.substr(1, str.length - 1);
+    return escape(str);
+}
+
+function testFunctionName(expected)
+{
+    if (expected == &quot;does not encode&quot;)
+        return &quot;testIDNEncode&quot;;
+    return &quot;testIDNRoundTrip&quot;;
+}
+
+function expectedTestResult(charCode, expected)
+{
+    if (expected == &quot;disallowed&quot;)
+        return &quot;'punycode'&quot;;
+    if (expected == &quot;allowed&quot; || expected == &quot;does not encode&quot;)
+        return &quot;'&quot; + escape(String.fromCharCode(charCode)) + &quot;'&quot;;
+    return &quot;'&quot; + expected + &quot;'&quot;;
+}
+
+function testIDNCharacter(charCode, expected, expectedNotFirstCharacter)
+{
+    if (expectedNotFirstCharacter == null)
+        expectedNotFirstCharacter = expected;
+
+    shouldBe(testFunctionName(expected) + &quot;(0x&quot; + charCode.toString(16) + &quot;)&quot;,
+        expectedTestResult(charCode, expected));
+
+    shouldBe(testFunctionName(expectedNotFirstCharacter) + &quot;NotFirstCharacter(0x&quot; + charCode.toString(16) + &quot;)&quot;,
+        expectedTestResult(charCode, expectedNotFirstCharacter));    
+}
+
+function testBecomesSpaceIDNCharacter(charCode)
+{
+    shouldBe(&quot;testIDNRoundTrip(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'%20'&quot;);
+    shouldBe(&quot;testIDNRoundTripFirstCharacter(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'%20'&quot;);
+}
+
+function testBecomesASCIIIDNCharacter(charCode, expected)
+{
+    shouldBe(&quot;testIDNRoundTrip(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'&quot; + expected + &quot;'&quot;);
+    shouldBe(&quot;testIDNRoundTripFirstCharacter(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'&quot; + expected + &quot;'&quot;);
+}
+
+function testDisallowedIDNCharacter(charCode)
+{
+    shouldBe(&quot;testIDNRoundTrip(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'punycode'&quot;);
+    shouldBe(&quot;testIDNRoundTripFirstCharacter(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'punycode'&quot;);
+}
+
+function testAllowedIDNCharacter(charCode)
+{
+    var expected = escape(String.fromCharCode(charCode));
+    shouldBe(&quot;testIDNRoundTrip(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'&quot; + expected + &quot;'&quot;);
+    shouldBe(&quot;testIDNRoundTripFirstCharacter(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'&quot; + expected + &quot;'&quot;);
+}
+
+function testDoesNotEncodeIDNCharacter(charCode)
+{
+    var expected = escape(String.fromCharCode(charCode));
+    shouldBe(&quot;testIDNEncode(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'&quot; + expected + &quot;'&quot;);
+    shouldBe(&quot;testIDNEncodeTripFirstCharacter(0x&quot; + charCode.toString(16) + &quot;)&quot;, &quot;'&quot; + expected + &quot;'&quot;);
+}
+
+/* Allowed Characters - dot and slash */
+testIDNCharacter(&quot;.&quot;.charCodeAt(0), &quot;allowed&quot;);
+testIDNCharacter(&quot;/&quot;.charCodeAt(0), &quot;allowed&quot;);
+
+/* Allowed Characters - one character for each script in the default IDN whitelist*/
+testIDNCharacter(0x0041, &quot;allowed&quot;);
+testIDNCharacter(0x0633, &quot;allowed&quot;);
+testIDNCharacter(0x0561, &quot;allowed&quot;);
+testIDNCharacter(0x3105, &quot;allowed&quot;);
+testIDNCharacter(0x1613, &quot;allowed&quot;);
+testIDNCharacter(0x0905, &quot;allowed&quot;);
+testIDNCharacter(0x0A85, &quot;allowed&quot;);
+testIDNCharacter(0x0A05, &quot;allowed&quot;);
+testIDNCharacter(0x1115, &quot;allowed&quot;);
+testIDNCharacter(0x4E2D, &quot;allowed&quot;);
+testIDNCharacter(0x05D0, &quot;allowed&quot;);
+testIDNCharacter(0x3041, &quot;allowed&quot;);
+testIDNCharacter(0x30A1, &quot;allowed&quot;);
+testIDNCharacter(0x0B94, &quot;allowed&quot;);
+testIDNCharacter(0x0E01, &quot;allowed&quot;);
+testIDNCharacter(0xA000, &quot;allowed&quot;);
+
+/* ICU converts these to other allowed characters, so the original character can't be used to get to a phishy domain name */
+testIDNCharacter(0x2024, &quot;.&quot;);
+testIDNCharacter(0xFE52, &quot;.&quot;);
+testIDNCharacter(0xFF0F, &quot;/&quot;);
+
+/* ICU converts these characters to space, so the original character can't be used to get to a phishy domain name */
+testIDNCharacter(0x00A0, &quot;%20&quot;);
+testIDNCharacter(0x2000, &quot;%20&quot;);
+testIDNCharacter(0x2001, &quot;%20&quot;);
+testIDNCharacter(0x2002, &quot;%20&quot;);
+testIDNCharacter(0x2003, &quot;%20&quot;);
+testIDNCharacter(0x2004, &quot;%20&quot;);
+testIDNCharacter(0x2005, &quot;%20&quot;);
+testIDNCharacter(0x2006, &quot;%20&quot;);
+testIDNCharacter(0x2007, &quot;%20&quot;);
+testIDNCharacter(0x2008, &quot;%20&quot;);
+testIDNCharacter(0x2009, &quot;%20&quot;);
+testIDNCharacter(0x200A, &quot;%20&quot;);
+testIDNCharacter(0x202F, &quot;%20&quot;);
+testIDNCharacter(0x205F, &quot;%20&quot;);
+testIDNCharacter(0x3000, &quot;%20&quot;);
+
+/* Disallow these characters.  Some of these are known lookalike characters for dot and slash.  
+   A lot of these are from Mozilla's blacklist: http://kb.mozillazine.org/Network.IDN.blacklist_chars
+*/
+testIDNCharacter(0x00BC, &quot;disallowed&quot;);
+testIDNCharacter(0x00BD, &quot;disallowed&quot;);
+testIDNCharacter(0x01C3, &quot;disallowed&quot;);
+testIDNCharacter(0x0337, &quot;disallowed&quot;);
+testIDNCharacter(0x0337, &quot;disallowed&quot;);
+testIDNCharacter(0x0338, &quot;disallowed&quot;);
+testIDNCharacter(0x0338, &quot;disallowed&quot;);
+testIDNCharacter(0x05B4, &quot;disallowed&quot;);
+testIDNCharacter(0x05BC, &quot;disallowed&quot;);
+testIDNCharacter(0x0660, &quot;disallowed&quot;);
+testIDNCharacter(0x06F0, &quot;disallowed&quot;);
+testIDNCharacter(0x115F, &quot;disallowed&quot;);
+testIDNCharacter(0x1160, &quot;disallowed&quot;);
+testIDNCharacter(0x2027, &quot;disallowed&quot;);
+testIDNCharacter(0x2039, &quot;disallowed&quot;);
+testIDNCharacter(0x203A, &quot;disallowed&quot;);
+testIDNCharacter(0x2044, &quot;disallowed&quot;);
+testIDNCharacter(0x2044, &quot;disallowed&quot;);
+testIDNCharacter(0x2154, &quot;disallowed&quot;);
+testIDNCharacter(0x2155, &quot;disallowed&quot;);
+testIDNCharacter(0x2156, &quot;disallowed&quot;);
+testIDNCharacter(0x2159, &quot;disallowed&quot;);
+testIDNCharacter(0x215A, &quot;disallowed&quot;);
+testIDNCharacter(0x215B, &quot;disallowed&quot;);
+testIDNCharacter(0x215F, &quot;disallowed&quot;);
+testIDNCharacter(0x2215, &quot;disallowed&quot;);
+testIDNCharacter(0x2215, &quot;disallowed&quot;);
+testIDNCharacter(0x23AE, &quot;disallowed&quot;);
+testIDNCharacter(0x2571, &quot;disallowed&quot;);
+testIDNCharacter(0x29F6, &quot;disallowed&quot;);
+testIDNCharacter(0x29F8, &quot;disallowed&quot;);
+testIDNCharacter(0x29F8, &quot;disallowed&quot;);
+testIDNCharacter(0x2AFB, &quot;disallowed&quot;);
+testIDNCharacter(0x2AFD, &quot;disallowed&quot;);
+testIDNCharacter(0x3014, &quot;disallowed&quot;);
+testIDNCharacter(0x3015, &quot;disallowed&quot;);
+testIDNCharacter(0x3033, &quot;disallowed&quot;);
+testIDNCharacter(0x3164, &quot;disallowed&quot;);
+testIDNCharacter(0x321D, &quot;disallowed&quot;);
+testIDNCharacter(0x321E, &quot;disallowed&quot;);
+testIDNCharacter(0x33AE, &quot;disallowed&quot;);
+testIDNCharacter(0x33AF, &quot;disallowed&quot;);
+testIDNCharacter(0x33C6, &quot;disallowed&quot;);
+testIDNCharacter(0x33DF, &quot;disallowed&quot;);
+testIDNCharacter(0xFE14, &quot;disallowed&quot;);
+testIDNCharacter(0xFE15, &quot;disallowed&quot;);
+testIDNCharacter(0xFE3F, &quot;disallowed&quot;);
+testIDNCharacter(0xFE5D, &quot;disallowed&quot;);
+testIDNCharacter(0xFE5E, &quot;disallowed&quot;);
+testIDNCharacter(0xFFA0, &quot;disallowed&quot;);
+
+/* ICU won't encode these characters in IDN, thus we should always get 'host not found'. */
+testIDNCharacter(0x2028, &quot;does not encode&quot;);
+testIDNCharacter(0x2029, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF0, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF1, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF2, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF3, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF4, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF5, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF6, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF7, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF8, &quot;does not encode&quot;);
+testIDNCharacter(0x2FF9, &quot;does not encode&quot;);
+testIDNCharacter(0x2FFA, &quot;does not encode&quot;);
+testIDNCharacter(0x2FFB, &quot;does not encode&quot;);
+testIDNCharacter(0xFFF9, &quot;does not encode&quot;);
+testIDNCharacter(0xFFFA, &quot;does not encode&quot;);
+testIDNCharacter(0xFFFB, &quot;does not encode&quot;);
+testIDNCharacter(0xFFFC, &quot;does not encode&quot;);
+testIDNCharacter(0xFFFD, &quot;does not encode&quot;);
+
+/* ICU won't encode these characters if they're not the first character in the host name.  
+   If the character does get encoded as the first character, then we will disallow it */
+   
+testIDNCharacter(0x05C3, &quot;disallowed&quot;, &quot;does not encode&quot;);
+testIDNCharacter(0x05F4, &quot;disallowed&quot;, &quot;does not encode&quot;);
+testIDNCharacter(0x06D4, &quot;disallowed&quot;, &quot;does not encode&quot;);
+testIDNCharacter(0x0702, &quot;disallowed&quot;, &quot;does not encode&quot;);
+
+/* ICU won't encode these characters if they're the first character in the host name.  
+   If the character does get encoded as the first character, then ICU converts it to another allowed character */
+
+testIDNCharacter(0x200B, &quot;does not encode&quot;, &quot;&quot;);
+testIDNCharacter(0x3002, &quot;does not encode&quot;, &quot;.&quot;);
+testIDNCharacter(0xFF0E, &quot;does not encode&quot;, &quot;.&quot;);
+testIDNCharacter(0xFF61, &quot;does not encode&quot;, &quot;.&quot;);
+testIDNCharacter(0xFEFF, &quot;does not encode&quot;, &quot;&quot;);
+
+successfullyParsed = true;
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestswinSkipped"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/win/Skipped (23962 => 23963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/win/Skipped        2007-07-03 23:03:33 UTC (rev 23962)
+++ trunk/LayoutTests/win/Skipped        2007-07-03 23:16:02 UTC (rev 23963)
</span><span class="lines">@@ -647,3 +647,6 @@
</span><span class="cx"> 
</span><span class="cx"> # Crash in CMM8Bit3ChanNoConvEncoder::InnerDoEncode
</span><span class="cx"> fast/css/contentDivWithChildren.html
</span><ins>+
+# Need to add functionality to DumpRenderTree to test IDN &lt;rdar://problem/5301954&gt;
+fast/encoding/idn-security.html
</ins></span></pre></div>
<a id="trunkWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/ChangeLog (23962 => 23963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/ChangeLog        2007-07-03 23:03:33 UTC (rev 23962)
+++ trunk/WebKit/ChangeLog        2007-07-03 23:16:02 UTC (rev 23963)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2007-07-03  Adele Peterson  &lt;adele@apple.com&gt;
+
+        Reviewed by Darin.
+
+        Fix for: &lt;rdar://problem/5292988&gt; domain names shouldn't contain ignorable characters
+
+        * Misc/WebNSURLExtras.m:
+        (isLookalikeCharacter): Renamed.  Also excludes any non-printable character, 
+         any character considered as whitespace that isn't already converted to a space by ICU, any ignorable character,
+         and any character excluded in Mozilla's blacklist: http://kb.mozillazine.org/Network.IDN.blacklist_chars
+        (allCharactersInIDNScriptWhiteList):
+
</ins><span class="cx"> 2007-07-03  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Maciej.
</span></span></pre></div>
<a id="trunkWebKitMiscWebNSURLExtrasm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/Misc/WebNSURLExtras.m (23962 => 23963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/Misc/WebNSURLExtras.m        2007-07-03 23:03:33 UTC (rev 23962)
+++ trunk/WebKit/Misc/WebNSURLExtras.m        2007-07-03 23:16:02 UTC (rev 23963)
</span><span class="lines">@@ -56,29 +56,51 @@
</span><span class="cx"> static pthread_once_t IDNScriptWhiteListFileRead = PTHREAD_ONCE_INIT;
</span><span class="cx"> static uint32_t IDNScriptWhiteList[(USCRIPT_CODE_LIMIT + 31) / 32];
</span><span class="cx"> 
</span><del>-static inline BOOL isSlashOrPeriodLookalike(int charCode)
</del><ins>+static inline BOOL isLookalikeCharacter(int charCode)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Move this code down into WebCore so it can be shared with other platforms.
</span><del>-/*
-    There are a few characters that look like they should belong in this list, 
-    but the IDN functions in ICU convert them to the plain ASCII equivalent
-    
-    Fullwidth Solidus   0xFF0F
-    One Dot Leader      0x2024
-    Small Full Stop     0xFE52
-    Fullwidth Full Stop 0xFF0E
-*/
</del><ins>+
+// This function treats the following as unsafe, lookalike characters:
+// any non-printable character, any character considered as whitespace that isn't already converted to a space by ICU, 
+// any ignorable character, and any character excluded in Mozilla's blacklist: http://kb.mozillazine.org/Network.IDN.blacklist_chars
+
+    if (!u_isprint(charCode) || u_isUWhiteSpace(charCode) || u_hasBinaryProperty(charCode, UCHAR_DEFAULT_IGNORABLE_CODE_POINT))
+        return YES;
+
</ins><span class="cx">     switch (charCode) {
</span><del>-        case 0x2215: /* Division Slash */
-        case 0x2044: /* Fraction Slash */
-        case 0x2571: /* Box Drawings Light Diagonal Upper Right To Lower Left */
-        case 0x0337: /* Combining Short Solidus Overlay */
-        case 0x0338: /* Combining Long Solidus Overlay */
-        case 0x29F8: /* Big Solidus */
-        case 0x0660: /* Arabic Indic Digit Zero */
-        case 0x06F0: /* Extended Arabic Indic Digit Zero */
-        case 0x05B4: /* Hebrew Point Hiriq */
-        case 0x05BC: /* Hebrew Point Dagesh Or Mapiq */
</del><ins>+        case 0x01C3: /* LATIN LETTER RETROFLEX CLICK */
+        case 0x0337: /* COMBINING SHORT SOLIDUS OVERLAY */
+        case 0x0338: /* COMBINING LONG SOLIDUS OVERLAY */
+        case 0x05B4: /* HEBREW POINT HIRIQ */
+        case 0x05BC: /* HEBREW POINT DAGESH OR MAPIQ */
+        case 0x05C3: /* HEBREW PUNCTUATION SOF PASUQ */
+        case 0x05F4: /* HEBREW PUNCTUATION GERSHAYIM */
+        case 0x0660: /* ARABIC INDIC DIGIT ZERO */
+        case 0x06D4: /* ARABIC FULL STOP */
+        case 0x06F0: /* EXTENDED ARABIC INDIC DIGIT ZERO */
+        case 0x2027: /* HYPHENATION POINT */
+        case 0x2039: /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
+        case 0x203A: /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
+        case 0x2044: /* FRACTION SLASH */
+        case 0x2215: /* DIVISION SLASH */
+        case 0x23ae: /* INTEGRAL EXTENSION */
+        case 0x2571: /* BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT */
+        case 0x29F8: /* BIG SOLIDUS */
+        case 0x29f6: /* SOLIDUS WITH OVERBAR */
+        case 0x2AFB: /* TRIPLE SOLIDUS BINARY RELATION */
+        case 0x2AFD: /* DOUBLE SOLIDUS OPERATOR */
+        case 0x3008: /* LEFT ANGLE BRACKET */
+        case 0x3014: /* LEFT TORTOISE SHELL BRACKET */
+        case 0x3015: /* RIGHT TORTOISE SHELL BRACKET */
+        case 0x3033: /* VERTICAL KANA REPEAT MARK UPPER HALF */
+        case 0x321D: /* PARENTHESIZED KOREAN CHARACTER OJEON */
+        case 0x321E: /* PARENTHESIZED KOREAN CHARACTER O HU */
+        case 0x33DF: /* SQUARE A OVER M */
+        case 0xFE14: /* PRESENTATION FORM FOR VERTICAL SEMICOLON */
+        case 0xFE15: /* PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK */
+        case 0xFE3F: /* PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET */
+        case 0xFE5D: /* SMALL LEFT TORTOISE SHELL BRACKET */
+        case 0xFE5E: /* SMALL RIGHT TORTOISE SHELL BRACKET */
</ins><span class="cx">             return YES;
</span><span class="cx">         default:
</span><span class="cx">             return NO;
</span><span class="lines">@@ -306,6 +328,7 @@
</span><span class="cx">         : collectRangesThatNeedDecoding;
</span><span class="cx">     applyHostNameFunctionToURLString(string, f, &amp;hostNameRanges);
</span><span class="cx">     if (hostNameRanges == nil) {
</span><ins>+        printf(&quot;failed to apply host name function.  idn encoding will not occur\n&quot;);
</ins><span class="cx">         return string;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -883,7 +906,7 @@
</span><span class="cx">             return NO;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (isSlashOrPeriodLookalike(c))
</del><ins>+        if (isLookalikeCharacter(c))
</ins><span class="cx">             return NO;
</span><span class="cx">     }
</span><span class="cx">     return YES;
</span></span></pre></div>
<a id="trunkWebKitToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/ChangeLog (23962 => 23963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/ChangeLog        2007-07-03 23:03:33 UTC (rev 23962)
+++ trunk/WebKitTools/ChangeLog        2007-07-03 23:16:02 UTC (rev 23963)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2007-07-03  Adele Peterson  &lt;adele@apple.com&gt;
+
+        Reviewed by Darin.
+
+        Extended DumpRenderTree to test encoding and decoding host names.
+
+        * DumpRenderTree/DumpRenderTree.m:
+        (+[LayoutTestController isSelectorExcludedFromWebScript:]): Added cases for encodeHostName and decodeHostName.
+        (+[LayoutTestController webScriptNameForSelector:]): ditto.
+        (-[LayoutTestController decodeHostName:]): Added.
+        (-[LayoutTestController encodeHostName:]): Added.
+
</ins><span class="cx"> 2007-07-03  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin.
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreeDumpRenderTreem"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/DumpRenderTree.m (23962 => 23963)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/DumpRenderTree.m        2007-07-03 23:03:33 UTC (rev 23962)
+++ trunk/WebKitTools/DumpRenderTree/DumpRenderTree.m        2007-07-03 23:16:02 UTC (rev 23963)
</span><span class="lines">@@ -936,49 +936,53 @@
</span><span class="cx"> 
</span><span class="cx"> + (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
</span><span class="cx"> {
</span><del>-    if (aSelector == @selector(waitUntilDone)
-            || aSelector == @selector(notifyDone)
</del><ins>+    if (0
+            || aSelector == @selector(accessStoredWebScriptObject)
+            || aSelector == @selector(addDisallowedURL:)    
+            || aSelector == @selector(addFileToPasteboardOnDrag)
+            || aSelector == @selector(clearBackForwardList)
+            || aSelector == @selector(decodeHostName:)
+            || aSelector == @selector(display)
</ins><span class="cx">             || aSelector == @selector(dumpAsText)
</span><del>-            || aSelector == @selector(dumpDOMAsWebArchive)
-            || aSelector == @selector(dumpSourceAsWebArchive)
-            || aSelector == @selector(dumpTitleChanges)
</del><span class="cx">             || aSelector == @selector(dumpBackForwardList)
</span><span class="cx">             || aSelector == @selector(dumpChildFrameScrollPositions)
</span><ins>+            || aSelector == @selector(dumpDOMAsWebArchive)
</ins><span class="cx">             || aSelector == @selector(dumpEditingCallbacks)
</span><ins>+            || aSelector == @selector(dumpFrameLoadCallbacks)
</ins><span class="cx">             || aSelector == @selector(dumpResourceLoadCallbacks)
</span><del>-            || aSelector == @selector(dumpFrameLoadCallbacks)
-            || aSelector == @selector(setWindowIsKey:)
-            || aSelector == @selector(setMainFrameIsFirstResponder:)
</del><span class="cx">             || aSelector == @selector(dumpSelectionRect)
</span><del>-            || aSelector == @selector(display)
-            || aSelector == @selector(testRepaint)
-            || aSelector == @selector(repaintSweepHorizontally)
</del><ins>+            || aSelector == @selector(dumpSourceAsWebArchive)
+            || aSelector == @selector(dumpTitleChanges)
+            || aSelector == @selector(encodeHostName:)
+            || aSelector == @selector(keepWebHistory)
+            || aSelector == @selector(notifyDone)
+            || aSelector == @selector(objCClassNameOf:)
+            || aSelector == @selector(objCIdentityIsEqual::)
+            || aSelector == @selector(objCObjectOfClass:)
+            || aSelector == @selector(objCLongLongRoundTrip:)
+            || aSelector == @selector(objCUnsignedLongLongRoundTrip:)
</ins><span class="cx">             || aSelector == @selector(queueBackNavigation:)
</span><span class="cx">             || aSelector == @selector(queueForwardNavigation:)
</span><ins>+            || aSelector == @selector(queueLoad:target:)
</ins><span class="cx">             || aSelector == @selector(queueReload)
</span><span class="cx">             || aSelector == @selector(queueScript:)
</span><del>-            || aSelector == @selector(queueLoad:target:)
-            || aSelector == @selector(clearBackForwardList)
-            || aSelector == @selector(keepWebHistory)
</del><ins>+            || aSelector == @selector(repaintSweepHorizontally)
</ins><span class="cx">             || aSelector == @selector(setAcceptsEditing:)
</span><ins>+            || aSelector == @selector(setCallCloseOnWebViews:)
+            || aSelector == @selector(setCanOpenWindows)
+            || aSelector == @selector(setCloseRemainingWindowsWhenComplete:)
+            || aSelector == @selector(setMainFrameIsFirstResponder:)
</ins><span class="cx">             || aSelector == @selector(setTabKeyCyclesThroughElements:)
</span><ins>+            || aSelector == @selector(setUseDashboardCompatibilityMode:)
+            || aSelector == @selector(setUserStyleSheetEnabled:)
+            || aSelector == @selector(setUserStyleSheetLocation:)
+            || aSelector == @selector(setWindowIsKey:)
</ins><span class="cx">             || aSelector == @selector(storeWebScriptObject:)
</span><del>-            || aSelector == @selector(accessStoredWebScriptObject)
</del><ins>+            || aSelector == @selector(testRepaint)
</ins><span class="cx">             || aSelector == @selector(testWrapperRoundTripping:)
</span><del>-            || aSelector == @selector(setUserStyleSheetLocation:)
-            || aSelector == @selector(setUserStyleSheetEnabled:)
-            || aSelector == @selector(objCClassNameOf:)
-            || aSelector == @selector(objCObjectOfClass:)
-            || aSelector == @selector(objCIdentityIsEqual::)
-            || aSelector == @selector(addDisallowedURL:)    
-            || aSelector == @selector(setCanOpenWindows)
-            || aSelector == @selector(setCallCloseOnWebViews:)
-            || aSelector == @selector(setCloseRemainingWindowsWhenComplete:)
-            || aSelector == @selector(setUseDashboardCompatibilityMode:)
</del><ins>+            || aSelector == @selector(waitUntilDone)
</ins><span class="cx">             || aSelector == @selector(windowCount)
</span><del>-            || aSelector == @selector(addFileToPasteboardOnDrag)
-            || aSelector == @selector(objCLongLongRoundTrip:)
-            || aSelector == @selector(objCUnsignedLongLongRoundTrip:))
</del><ins>+        )
</ins><span class="cx">         return NO;
</span><span class="cx">     return YES;
</span><span class="cx"> }
</span><span class="lines">@@ -1023,6 +1027,10 @@
</span><span class="cx">         return @&quot;setCloseRemainingWindowsWhenComplete&quot;;
</span><span class="cx">     if (aSelector == @selector(setUseDashboardCompatibilityMode:))
</span><span class="cx">         return @&quot;setUseDashboardCompatiblityMode&quot;;
</span><ins>+    if (aSelector == @selector(encodeHostName:))
+        return @&quot;encodeHostName&quot;;
+    if (aSelector == @selector(decodeHostName:))
+        return @&quot;decodeHostName&quot;;    
</ins><span class="cx">     if (aSelector == @selector(objCLongLongRoundTrip:))
</span><span class="cx">         return @&quot;objCLongLongRoundTrip&quot;;
</span><span class="cx">     if (aSelector == @selector(objCUnsignedLongLongRoundTrip:))
</span><span class="lines">@@ -1388,6 +1396,16 @@
</span><span class="cx">     return a == b;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (NSString*)decodeHostName:(NSString*)name
+{
+    return [name _web_decodeHostName];
+}
+
+- (NSString*)encodeHostName:(NSString*)name
+{
+    return [name _web_encodeHostName];
+}
+
</ins><span class="cx"> - (long long)objCLongLongRoundTrip:(long long)num
</span><span class="cx"> {
</span><span class="cx">     return num;
</span></span></pre>
</div>
</div>

</body>
</html>