Title: [207700] trunk
Revision
207700
Author
achristen...@apple.com
Date
2016-10-21 16:55:23 -0700 (Fri, 21 Oct 2016)

Log Message

Unreviewed, rolling out r207582.
https://bugs.webkit.org/show_bug.cgi?id=163819

Not quite ready rdar://problem/28897179 (Requested by
alexchristensen on #webkit).

Reverted changeset:

"Re-enable URLParser for non-Safari Cocoa apps after r207321"
https://bugs.webkit.org/show_bug.cgi?id=163690
http://trac.webkit.org/changeset/207582

Patch by Commit Queue <commit-qu...@webkit.org> on 2016-10-21

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (207699 => 207700)


--- trunk/Source/WebCore/ChangeLog	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Source/WebCore/ChangeLog	2016-10-21 23:55:23 UTC (rev 207700)
@@ -1,3 +1,17 @@
+2016-10-21  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r207582.
+        https://bugs.webkit.org/show_bug.cgi?id=163819
+
+        Not quite ready rdar://problem/28897179 (Requested by
+        alexchristensen on #webkit).
+
+        Reverted changeset:
+
+        "Re-enable URLParser for non-Safari Cocoa apps after r207321"
+        https://bugs.webkit.org/show_bug.cgi?id=163690
+        http://trac.webkit.org/changeset/207582
+
 2016-10-21  Gavin Barraclough  <barraclo...@apple.com>
 
         WebPage should take UserActivity directly for user input

Modified: trunk/Source/WebCore/platform/URLParser.cpp (207699 => 207700)


--- trunk/Source/WebCore/platform/URLParser.cpp	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Source/WebCore/platform/URLParser.cpp	2016-10-21 23:55:23 UTC (rev 207700)
@@ -2843,16 +2843,31 @@
     // It should be able to be deduced from m_isValid and m_string.length() to save memory.
 }
 
-static bool urlParserEnabled = true;
+enum class URLParserEnabled {
+    Undetermined,
+    Yes,
+    No
+};
 
+static URLParserEnabled urlParserEnabled = URLParserEnabled::Undetermined;
+
 void URLParser::setEnabled(bool enabled)
 {
-    urlParserEnabled = enabled;
+    urlParserEnabled = enabled ? URLParserEnabled::Yes : URLParserEnabled::No;
 }
 
 bool URLParser::enabled()
 {
-    return urlParserEnabled;
+    if (urlParserEnabled == URLParserEnabled::Undetermined) {
+#if PLATFORM(MAC)
+        urlParserEnabled = MacApplication::isSafari() ? URLParserEnabled::Yes : URLParserEnabled::No;
+#elif PLATFORM(IOS)
+        urlParserEnabled = IOSApplication::isMobileSafari() ? URLParserEnabled::Yes : URLParserEnabled::No;
+#else
+        urlParserEnabled = URLParserEnabled::Yes;
+#endif
+    }
+    return urlParserEnabled == URLParserEnabled::Yes;
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp (207699 => 207700)


--- trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2016-10-21 23:55:23 UTC (rev 207700)
@@ -121,6 +121,11 @@
     InternalSettings::setAllowsAnySSLCertificate(allowAnySSLCertificate);
 }
 
+void setURLParserEnabled(bool enabled)
+{
+    URLParser::setEnabled(enabled);
+}
+
 void installMockGamepadProvider()
 {
 #if ENABLE(GAMEPAD)

Modified: trunk/Source/WebCore/testing/js/WebCoreTestSupport.h (207699 => 207700)


--- trunk/Source/WebCore/testing/js/WebCoreTestSupport.h	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Source/WebCore/testing/js/WebCoreTestSupport.h	2016-10-21 23:55:23 UTC (rev 207700)
@@ -56,6 +56,7 @@
 void setLogChannelToAccumulate(const WTF::String& name) TEST_SUPPORT_EXPORT;
 void initializeLogChannelsIfNecessary() TEST_SUPPORT_EXPORT;
 void setAllowsAnySSLCertificate(bool) TEST_SUPPORT_EXPORT;
+void setURLParserEnabled(bool) TEST_SUPPORT_EXPORT;
 
 void installMockGamepadProvider() TEST_SUPPORT_EXPORT;
 void connectMockGamepad(unsigned index) TEST_SUPPORT_EXPORT;

Modified: trunk/Tools/ChangeLog (207699 => 207700)


--- trunk/Tools/ChangeLog	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Tools/ChangeLog	2016-10-21 23:55:23 UTC (rev 207700)
@@ -1,3 +1,17 @@
+2016-10-21  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r207582.
+        https://bugs.webkit.org/show_bug.cgi?id=163819
+
+        Not quite ready rdar://problem/28897179 (Requested by
+        alexchristensen on #webkit).
+
+        Reverted changeset:
+
+        "Re-enable URLParser for non-Safari Cocoa apps after r207321"
+        https://bugs.webkit.org/show_bug.cgi?id=163690
+        http://trac.webkit.org/changeset/207582
+
 2016-10-21  Jonathan Bedard  <jbed...@apple.com>
 
         WebKitTestRunnerApp packages .idl file

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (207699 => 207700)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2016-10-21 23:55:23 UTC (rev 207700)
@@ -1411,6 +1411,7 @@
 
 int DumpRenderTreeMain(int argc, const char *argv[])
 {
+    WebCoreTestSupport::setURLParserEnabled(true);
     atexit(atexitFunction);
 
 #if PLATFORM(IOS)

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm (207699 => 207700)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm	2016-10-21 23:55:23 UTC (rev 207700)
@@ -54,8 +54,8 @@
 
 - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error
 {
-    EXPECT_WK_STREQ(error.domain, @"NSURLErrorDomain");
-    EXPECT_EQ(error.code, -1003);
+    EXPECT_WK_STREQ(error.domain, @"WebKitErrorDomain");
+    EXPECT_EQ(error.code, WebKitErrorCannotShowURL);
     EXPECT_TRUE([error.userInfo[@"NSErrorFailingURLKey"] isEqual:literalURL(literal)]);
 
     didFailProvisionalLoad = true;

Modified: trunk/Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm (207699 => 207700)


--- trunk/Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm	2016-10-21 23:55:23 UTC (rev 207700)
@@ -77,7 +77,7 @@
         didFailProvisionalLoad = false;
         Util::run(&didFinishTest);
 
-        EXPECT_FALSE(didFailProvisionalLoad);
+        EXPECT_TRUE(didFailProvisionalLoad);
     }
 }
 

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (207699 => 207700)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2016-10-21 23:20:11 UTC (rev 207699)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2016-10-21 23:55:23 UTC (rev 207700)
@@ -115,6 +115,7 @@
 
 TestController::TestController(int argc, const char* argv[])
 {
+    WebCoreTestSupport::setURLParserEnabled(true);
     initialize(argc, argv);
     controller = this;
     run();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to