Title: [211186] branches/safari-603-branch
- Revision
- 211186
- Author
- matthew_han...@apple.com
- Date
- 2017-01-25 17:40:57 -0800 (Wed, 25 Jan 2017)
Log Message
Merge r211137. rdar://problem/29896656
Modified Paths
Diff
Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (211185 => 211186)
--- branches/safari-603-branch/Source/WebCore/ChangeLog 2017-01-26 01:40:52 UTC (rev 211185)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog 2017-01-26 01:40:57 UTC (rev 211186)
@@ -1,3 +1,24 @@
+2017-01-25 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r211137. rdar://problem/29896656
+
+ 2017-01-24 Alex Christensen <achristen...@webkit.org>
+
+ REGRESSION (r208902): URLWithUserTypedString returns nil with file URLs
+ https://bugs.webkit.org/show_bug.cgi?id=167402
+ <rdar://problem/29896656>
+
+ Reviewed by Ryosuke Niwa.
+
+ Covered by a new API test.
+
+ * platform/mac/WebCoreNSURLExtras.mm:
+ (WebCore::mapHostNameWithRange):
+ uidna_IDNToASCII succeeds when length is 0.
+ uidna_nameToASCII fails when length is 0.
+ This causes bad things to happen with file URLs, which have no host, so their host length is 0.
+ This makes us match behavior before r208902.
+
2017-01-25 Dean Jackson <d...@apple.com>
Disable Variation fonts on this branch.
Modified: branches/safari-603-branch/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (211185 => 211186)
--- branches/safari-603-branch/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm 2017-01-26 01:40:52 UTC (rev 211185)
+++ branches/safari-603-branch/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm 2017-01-26 01:40:57 UTC (rev 211186)
@@ -481,7 +481,7 @@
UErrorCode uerror = U_ZERO_ERROR;
UIDNAInfo processingDetails = UIDNA_INFO_INITIALIZER;
int32_t numCharactersConverted = (encode ? uidna_nameToASCII : uidna_nameToUnicode)(&URLParser::internationalDomainNameTranscoder(), sourceBuffer, length, destinationBuffer, HOST_NAME_BUFFER_LENGTH, &processingDetails, &uerror);
- if (U_FAILURE(uerror) || processingDetails.errors) {
+ if (length && (U_FAILURE(uerror) || processingDetails.errors)) {
*error = YES;
return nil;
}
Modified: branches/safari-603-branch/Tools/ChangeLog (211185 => 211186)
--- branches/safari-603-branch/Tools/ChangeLog 2017-01-26 01:40:52 UTC (rev 211185)
+++ branches/safari-603-branch/Tools/ChangeLog 2017-01-26 01:40:57 UTC (rev 211186)
@@ -1,3 +1,17 @@
+2017-01-25 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r211137. rdar://problem/29896656
+
+ 2017-01-24 Alex Christensen <achristen...@webkit.org>
+
+ REGRESSION (r208902): URLWithUserTypedString returns nil with file URLs
+ https://bugs.webkit.org/show_bug.cgi?id=167402
+
+ Reviewed by Ryosuke Niwa.
+
+ * TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:
+ (TestWebKitAPI::TEST):
+
2017-01-25 Dean Jackson <d...@apple.com>
Disable Variation fonts on this branch.
Modified: branches/safari-603-branch/Tools/TestWebKitAPI/Tests/Cocoa/URLExtras.mm (211185 => 211186)
--- branches/safari-603-branch/Tools/TestWebKitAPI/Tests/Cocoa/URLExtras.mm 2017-01-26 01:40:52 UTC (rev 211185)
+++ branches/safari-603-branch/Tools/TestWebKitAPI/Tests/Cocoa/URLExtras.mm 2017-01-26 01:40:57 UTC (rev 211186)
@@ -127,6 +127,11 @@
EXPECT_STREQ("site.com\xE3\x80\x80othersite.org", [WebCore::decodeHostName(@"site.com\xE3\x80\x80othersite.org") UTF8String]);
}
+TEST(WebCore, URLExtras_File)
+{
+ EXPECT_STREQ("file:///%E2%98%83", [[WebCore::URLWithUserTypedString(@"file:///☃", nil) absoluteString] UTF8String]);
+}
+
TEST(WebCore, URLExtras_ParsingError)
{
// Expect IDN failure.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes