Title: [207582] trunk
Revision
207582
Author
commit-qu...@webkit.org
Date
2016-10-19 17:47:39 -0700 (Wed, 19 Oct 2016)

Log Message

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

Patch by Alex Christensen <achristen...@webkit.org> on 2016-10-19
Reviewed by Darin Adler.

Source/WebCore:

I disabled the URLParser for non-Safari applications in r207305
to give me time to make URLParser more compatible, which I did in r207321

Updated some API tests which will be investigated in
https://bugs.webkit.org/show_bug.cgi?id=163127

* platform/URLParser.cpp:
(WebCore::URLParser::setEnabled):
(WebCore::URLParser::enabled):
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setURLParserEnabled): Deleted.
* testing/js/WebCoreTestSupport.h:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(DumpRenderTreeMain):
* TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm:
(-[LoadInvalidURLNavigationActionDelegate webView:didFailProvisionalNavigation:withError:]):
* TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
(TestWebKitAPI::TEST):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (207581 => 207582)


--- trunk/Source/WebCore/ChangeLog	2016-10-20 00:39:09 UTC (rev 207581)
+++ trunk/Source/WebCore/ChangeLog	2016-10-20 00:47:39 UTC (rev 207582)
@@ -1,3 +1,23 @@
+2016-10-19  Alex Christensen  <achristen...@webkit.org>
+
+        Re-enable URLParser for non-Safari Cocoa apps after r207321
+        https://bugs.webkit.org/show_bug.cgi?id=163690
+
+        Reviewed by Darin Adler.
+
+        I disabled the URLParser for non-Safari applications in r207305
+        to give me time to make URLParser more compatible, which I did in r207321
+
+        Updated some API tests which will be investigated in 
+        https://bugs.webkit.org/show_bug.cgi?id=163127
+
+        * platform/URLParser.cpp:
+        (WebCore::URLParser::setEnabled):
+        (WebCore::URLParser::enabled):
+        * testing/js/WebCoreTestSupport.cpp:
+        (WebCoreTestSupport::setURLParserEnabled): Deleted.
+        * testing/js/WebCoreTestSupport.h:
+
 2016-10-19  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         CSS font-variation-settings does not handle uppercase axis names in variable fonts

Modified: trunk/Source/WebCore/platform/URLParser.cpp (207581 => 207582)


--- trunk/Source/WebCore/platform/URLParser.cpp	2016-10-20 00:39:09 UTC (rev 207581)
+++ trunk/Source/WebCore/platform/URLParser.cpp	2016-10-20 00:47:39 UTC (rev 207582)
@@ -2843,31 +2843,16 @@
     // It should be able to be deduced from m_isValid and m_string.length() to save memory.
 }
 
-enum class URLParserEnabled {
-    Undetermined,
-    Yes,
-    No
-};
+static bool urlParserEnabled = true;
 
-static URLParserEnabled urlParserEnabled = URLParserEnabled::Undetermined;
-
 void URLParser::setEnabled(bool enabled)
 {
-    urlParserEnabled = enabled ? URLParserEnabled::Yes : URLParserEnabled::No;
+    urlParserEnabled = enabled;
 }
 
 bool URLParser::enabled()
 {
-    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;
+    return urlParserEnabled;
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp (207581 => 207582)


--- trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2016-10-20 00:39:09 UTC (rev 207581)
+++ trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2016-10-20 00:47:39 UTC (rev 207582)
@@ -121,11 +121,6 @@
     InternalSettings::setAllowsAnySSLCertificate(allowAnySSLCertificate);
 }
 
-void setURLParserEnabled(bool enabled)
-{
-    URLParser::setEnabled(enabled);
-}
-
 void installMockGamepadProvider()
 {
 #if ENABLE(GAMEPAD)

Modified: trunk/Source/WebCore/testing/js/WebCoreTestSupport.h (207581 => 207582)


--- trunk/Source/WebCore/testing/js/WebCoreTestSupport.h	2016-10-20 00:39:09 UTC (rev 207581)
+++ trunk/Source/WebCore/testing/js/WebCoreTestSupport.h	2016-10-20 00:47:39 UTC (rev 207582)
@@ -56,7 +56,6 @@
 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 (207581 => 207582)


--- trunk/Tools/ChangeLog	2016-10-20 00:39:09 UTC (rev 207581)
+++ trunk/Tools/ChangeLog	2016-10-20 00:47:39 UTC (rev 207582)
@@ -1,3 +1,19 @@
+2016-10-19  Alex Christensen  <achristen...@webkit.org>
+
+        Re-enable URLParser for non-Safari Cocoa apps after r207321
+        https://bugs.webkit.org/show_bug.cgi?id=163690
+
+        Reviewed by Darin Adler.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (DumpRenderTreeMain):
+        * TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm:
+        (-[LoadInvalidURLNavigationActionDelegate webView:didFailProvisionalNavigation:withError:]):
+        * TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
+        (TestWebKitAPI::TEST):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::TestController):
+
 2016-10-19  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed, rolling out r207557.

Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (207581 => 207582)


--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2016-10-20 00:39:09 UTC (rev 207581)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm	2016-10-20 00:47:39 UTC (rev 207582)
@@ -1411,7 +1411,6 @@
 
 int DumpRenderTreeMain(int argc, const char *argv[])
 {
-    WebCoreTestSupport::setURLParserEnabled(true);
     atexit(atexitFunction);
 
 #if PLATFORM(IOS)

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm (207581 => 207582)


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

Modified: trunk/Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm (207581 => 207582)


--- trunk/Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm	2016-10-20 00:39:09 UTC (rev 207581)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm	2016-10-20 00:47:39 UTC (rev 207582)
@@ -77,7 +77,7 @@
         didFailProvisionalLoad = false;
         Util::run(&didFinishTest);
 
-        EXPECT_TRUE(didFailProvisionalLoad);
+        EXPECT_FALSE(didFailProvisionalLoad);
     }
 }
 

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (207581 => 207582)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2016-10-20 00:39:09 UTC (rev 207581)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2016-10-20 00:47:39 UTC (rev 207582)
@@ -115,7 +115,6 @@
 
 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