Title: [230146] trunk
Revision
230146
Author
[email protected]
Date
2018-04-01 19:04:05 -0700 (Sun, 01 Apr 2018)

Log Message

Show punycode if URL contains hyphen character
https://bugs.webkit.org/show_bug.cgi?id=184221
<rdar://problem/38044633>

Reviewed by Darin Adler.

Source/WebCore:

Revise our "lookalike character" logic to include the hyphen,
non-breaking hyphen, and minus sign.

Test: fast/url/host.html

* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::isLookalikeCharacter):

LayoutTests:

* fast/url/host-expected.txt:
* fast/url/host.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (230145 => 230146)


--- trunk/LayoutTests/ChangeLog	2018-04-01 19:46:05 UTC (rev 230145)
+++ trunk/LayoutTests/ChangeLog	2018-04-02 02:04:05 UTC (rev 230146)
@@ -1,3 +1,14 @@
+2018-03-31  Brent Fulgham  <[email protected]>
+
+        Show punycode if URL contains hyphen character
+        https://bugs.webkit.org/show_bug.cgi?id=184221
+        <rdar://problem/38044633>
+
+        Reviewed by Darin Adler.
+
+        * fast/url/host-expected.txt:
+        * fast/url/host.html:
+
 2018-03-30  Devin Rousso  <[email protected]>
 
         Web Inspector: tint all pixels drawn by shader program when hovering ShaderProgramTreeElement

Modified: trunk/LayoutTests/fast/url/host-expected.txt (230145 => 230146)


--- trunk/LayoutTests/fast/url/host-expected.txt	2018-04-01 19:46:05 UTC (rev 230145)
+++ trunk/LayoutTests/fast/url/host-expected.txt	2018-04-02 02:04:05 UTC (rev 230146)
@@ -44,6 +44,9 @@
 PASS canonicalize('http://.:./') is 'http://.:./'
 PASS canonicalize('http://////@google.com//') is 'http://google.com//'
 PASS canonicalize('http://@google.com/') is 'http://google.com/'
+PASS canonicalize('http://quip‐apple.com/') is 'http://xn--quipapple-y79d.com/'
+PASS canonicalize('http://quip‑apple.com/') is 'http://xn--quipapple-y79d.com/'
+PASS canonicalize('http://quip−apple.com/') is 'http://xn--quipapple-tf4e.com/'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/url/host.html (230145 => 230146)


--- trunk/LayoutTests/fast/url/host.html	2018-04-01 19:46:05 UTC (rev 230145)
+++ trunk/LayoutTests/fast/url/host.html	2018-04-02 02:04:05 UTC (rev 230146)
@@ -84,7 +84,10 @@
   ["xxxx:","xxxx"],
   [".:.",".:."],
   ["////@google.com/","google.com/"],
-  ["@google.com","google.com"]
+  ["@google.com","google.com"],
+  ["quip\u2010apple.com", "xn--quipapple-y79d.com"],
+  ["quip\u2011apple.com", "xn--quipapple-y79d.com"],
+  ["quip\u2212apple.com", "xn--quipapple-tf4e.com"]
 ];
 
 for (var i = 0; i < cases.length; ++i) {

Modified: trunk/Source/WebCore/ChangeLog (230145 => 230146)


--- trunk/Source/WebCore/ChangeLog	2018-04-01 19:46:05 UTC (rev 230145)
+++ trunk/Source/WebCore/ChangeLog	2018-04-02 02:04:05 UTC (rev 230146)
@@ -1,3 +1,19 @@
+2018-03-31  Brent Fulgham  <[email protected]>
+
+        Show punycode if URL contains hyphen character
+        https://bugs.webkit.org/show_bug.cgi?id=184221
+        <rdar://problem/38044633>
+
+        Reviewed by Darin Adler.
+
+        Revise our "lookalike character" logic to include the hyphen,
+        non-breaking hyphen, and minus sign.
+
+        Test: fast/url/host.html
+
+        * platform/mac/WebCoreNSURLExtras.mm:
+        (WebCore::isLookalikeCharacter):
+
 2018-03-31  Filip Pizlo  <[email protected]>
 
         JSObject shouldn't do index masking

Modified: trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (230145 => 230146)


--- trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm	2018-04-01 19:46:05 UTC (rev 230145)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm	2018-04-02 02:04:05 UTC (rev 230146)
@@ -147,6 +147,8 @@
         case 0x1D20: /* LATIN LETTER SMALL CAPITAL V */
         case 0x1D21: /* LATIN LETTER SMALL CAPITAL W */
         case 0x1D22: /* LATIN LETTER SMALL CAPITAL Z */
+        case 0x2010: /* HYPHEN */
+        case 0x2011: /* NON-BREAKING HYPHEN */
         case 0x2024: /* ONE DOT LEADER */
         case 0x2027: /* HYPHENATION POINT */
         case 0x2039: /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
@@ -167,6 +169,7 @@
         case 0x215D: /* VULGAR FRACTION FIVE EIGHTHS */
         case 0x215E: /* VULGAR FRACTION SEVEN EIGHTHS */
         case 0x215F: /* FRACTION NUMERATOR ONE */
+        case 0x2212: /* MINUS SIGN */
         case 0x2215: /* DIVISION SLASH */
         case 0x2216: /* SET MINUS */
         case 0x2236: /* RATIO */
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to