Unreviewed, rolling out r199660.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2016 09:48:33 +0000 (09:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Apr 2016 09:48:33 +0000 (09:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=156691

It broke the iOS build (Requested by KaL on #webkit).

Reverted changeset:

"Pending API request URL no set when loading Data, Alternate
HTML or plain text"
https://bugs.webkit.org/show_bug.cgi?id=136916
http://trac.webkit.org/changeset/199660

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199662 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/PlatformEfl.cmake
Tools/TestWebKitAPI/PlatformGTK.cmake
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2/PendingAPIRequestURL.cpp [deleted file]
Tools/TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp

index 85b49ea..cde8153 100644 (file)
@@ -1,3 +1,17 @@
+2016-04-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r199660.
+        https://bugs.webkit.org/show_bug.cgi?id=156691
+
+        It broke the iOS build (Requested by KaL on #webkit).
+
+        Reverted changeset:
+
+        "Pending API request URL no set when loading Data, Alternate
+        HTML or plain text"
+        https://bugs.webkit.org/show_bug.cgi?id=136916
+        http://trac.webkit.org/changeset/199660
+
 2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Pending API request URL no set when loading Data, Alternate HTML or plain text
index 09d55d1..d2f3d2a 100644 (file)
@@ -971,7 +971,7 @@ RefPtr<API::Navigation> WebPageProxy::loadData(API::Data* data, const String& MI
 
     auto transaction = m_pageLoadState.transaction();
 
-    m_pageLoadState.setPendingAPIRequestURL(transaction, !baseURL.isEmpty() ? baseURL : blankURL().string());
+    m_pageLoadState.setPendingAPIRequestURL(transaction, !baseURL.isEmpty() ? baseURL : ASCIILiteral("about:blank"));
 
     if (!isValid())
         reattachToWebProcess();
@@ -993,7 +993,7 @@ RefPtr<API::Navigation> WebPageProxy::loadHTMLString(const String& htmlString, c
 
     auto transaction = m_pageLoadState.transaction();
 
-    m_pageLoadState.setPendingAPIRequestURL(transaction, !baseURL.isEmpty() ? baseURL : blankURL().string());
+    m_pageLoadState.setPendingAPIRequestURL(transaction, !baseURL.isEmpty() ? baseURL : ASCIILiteral("about:blank"));
 
     if (!isValid())
         reattachToWebProcess();
@@ -1021,7 +1021,6 @@ void WebPageProxy::loadAlternateHTMLString(const String& htmlString, const Strin
 
     auto transaction = m_pageLoadState.transaction();
 
-    m_pageLoadState.setPendingAPIRequestURL(transaction, unreachableURL);
     m_pageLoadState.setUnreachableURL(transaction, unreachableURL);
 
     if (m_mainFrame)
@@ -1041,9 +1040,6 @@ void WebPageProxy::loadPlainTextString(const String& string, API::Object* userDa
     if (!isValid())
         reattachToWebProcess();
 
-    auto transaction = m_pageLoadState.transaction();
-    m_pageLoadState.setPendingAPIRequestURL(transaction, blankURL().string());
-
     m_process->send(Messages::WebPage::LoadPlainTextString(string, UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
     m_process->responsivenessTimer().start();
 }
@@ -1056,9 +1052,6 @@ void WebPageProxy::loadWebArchiveData(API::Data* webArchiveData, API::Object* us
     if (!isValid())
         reattachToWebProcess();
 
-    auto transaction = m_pageLoadState.transaction();
-    m_pageLoadState.setPendingAPIRequestURL(transaction, blankURL().string());
-
     m_process->send(Messages::WebPage::LoadWebArchiveData(webArchiveData->dataReference(), UserData(process().transformObjectsToHandles(userData).get())), m_pageID);
     m_process->responsivenessTimer().start();
 }
index 094b16d..1cd4be8 100644 (file)
@@ -1,3 +1,17 @@
+2016-04-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r199660.
+        https://bugs.webkit.org/show_bug.cgi?id=156691
+
+        It broke the iOS build (Requested by KaL on #webkit).
+
+        Reverted changeset:
+
+        "Pending API request URL no set when loading Data, Alternate
+        HTML or plain text"
+        https://bugs.webkit.org/show_bug.cgi?id=136916
+        http://trac.webkit.org/changeset/199660
+
 2016-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Pending API request URL no set when loading Data, Alternate HTML or plain text
index 67e25e7..ec905c9 100644 (file)
@@ -94,7 +94,6 @@ set(test_webkit2_api_BINARIES
     PageLoadBasic
     PageLoadDidChangeLocationWithinPageForFrame
     ParentFrame
-    PendingAPIRequestURL
     PreventEmptyUserAgent
     PrivateBrowsingPushStateNoHistoryCallback
     ResponsivenessTimerDoesntFireEarly
index f4a6a3a..d928832 100644 (file)
@@ -98,7 +98,6 @@ add_executable(TestWebKit2
     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/PageLoadBasic.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/ParentFrame.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WebKit2/PendingAPIRequestURL.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/PreventEmptyUserAgent.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp
     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/ReloadPageAfterCrash.cpp
index 6471985..2b58485 100644 (file)
@@ -7,7 +7,6 @@
        objects = {
 
 /* Begin PBXBuildFile section */
-               0766DD201A5AD5200023E3BB /* PendingAPIRequestURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0766DD1F1A5AD5200023E3BB /* PendingAPIRequestURL.cpp */; };
                0F139E771A423A5B00F590F5 /* WeakObjCPtr.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F139E751A423A5300F590F5 /* WeakObjCPtr.mm */; };
                0F139E781A423A6B00F590F5 /* PlatformUtilitiesCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */; };
                0F139E791A42457000F590F5 /* PlatformUtilitiesCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */; };
 /* Begin PBXFileReference section */
                00BC16851680FE810065F1E5 /* PublicSuffix.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PublicSuffix.mm; sourceTree = "<group>"; };
                00CD9F6215BE312C002DA2CE /* BackForwardList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackForwardList.mm; sourceTree = "<group>"; };
-               0766DD1F1A5AD5200023E3BB /* PendingAPIRequestURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PendingAPIRequestURL.cpp; sourceTree = "<group>"; };
                0BCD833414857CE400EA2003 /* HashMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HashMap.cpp; sourceTree = "<group>"; };
                0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TemporaryChange.cpp; sourceTree = "<group>"; };
                0F139E721A423A2B00F590F5 /* PlatformUtilitiesCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatformUtilitiesCocoa.mm; path = cocoa/PlatformUtilitiesCocoa.mm; sourceTree = "<group>"; };
                BC9096411255616000083756 /* WebKit2 */ = {
                        isa = PBXGroup;
                        children = (
-                               0766DD1F1A5AD5200023E3BB /* PendingAPIRequestURL.cpp */,
                                0F139E741A423A4600F590F5 /* cocoa */,
                                C0C5D3BB14598B6F00A802A6 /* mac */,
                                BC90977B125571AE00083756 /* Resources */,
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                                0766DD201A5AD5200023E3BB /* PendingAPIRequestURL.cpp in Sources */,
                                2D9A53AF1B31FA8D0074D5AA /* ShrinkToFit.mm in Sources */,
                                51B454EC1B4E236B0085EAA6 /* WebViewCloseInsideDidFinishLoadForFrame.mm in Sources */,
                                57901FAD1CAF12C200ED64F9 /* LoadInvalidURLRequest.mm in Sources */,
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/PendingAPIRequestURL.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/PendingAPIRequestURL.cpp
deleted file mode 100644 (file)
index 1af01b7..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2014 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PlatformUtilities.h"
-#include "PlatformWebView.h"
-#include "Test.h"
-#include <WebKit/WKRetainPtr.h>
-
-namespace TestWebKitAPI {
-
-TEST(WebKit2, PendingAPIRequestURL)
-{
-    WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
-    PlatformWebView webView(context.get());
-
-    WKRetainPtr<WKURLRef> activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    EXPECT_NULL(activeURL.get());
-
-    WKRetainPtr<WKURLRef> url = adoptWK(Util::createURLForResource("simple", "html"));
-    WKPageLoadURL(webView.page(), url.get());
-    activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    ASSERT_NOT_NULL(activeURL.get());
-    EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get()));
-    WKPageStopLoading(webView.page());
-
-    WKRetainPtr<WKStringRef> htmlString = Util::toWK("<body>Hello, World</body>");
-    WKRetainPtr<WKURLRef> blankURL = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
-    WKPageLoadHTMLString(webView.page(), htmlString.get(), nullptr);
-    activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    ASSERT_NOT_NULL(activeURL.get());
-    EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get()));
-    WKPageStopLoading(webView.page());
-
-    url = adoptWK(WKURLCreateWithUTF8CString("http://www.webkit.org"));
-    WKPageLoadHTMLString(webView.page(), htmlString.get(), url.get());
-    activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    ASSERT_NOT_NULL(activeURL.get());
-    EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get()));
-    WKPageStopLoading(webView.page());
-
-    WKRetainPtr<WKDataRef> data = adoptWK(WKDataCreate(nullptr, 0));
-    WKPageLoadData(webView.page(), data.get(), nullptr, nullptr, nullptr);
-    activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    ASSERT_NOT_NULL(activeURL.get());
-    EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get()));
-    WKPageStopLoading(webView.page());
-
-    WKPageLoadData(webView.page(), data.get(), nullptr, nullptr, url.get());
-    activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    ASSERT_NOT_NULL(activeURL.get());
-    EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get()));
-    WKPageStopLoading(webView.page());
-
-    WKPageLoadAlternateHTMLString(webView.page(), htmlString.get(), nullptr, url.get());
-    activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    ASSERT_NOT_NULL(activeURL.get());
-    EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get()));
-    WKPageStopLoading(webView.page());
-
-    WKRetainPtr<WKStringRef> plainTextString = Util::toWK("Hello, World");
-    WKPageLoadPlainTextString(webView.page(), plainTextString.get());
-    activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    ASSERT_NOT_NULL(activeURL.get());
-    EXPECT_TRUE(WKURLIsEqual(activeURL.get(), blankURL.get()));
-    WKPageStopLoading(webView.page());
-
-    url = adoptWK(WKURLCreateWithUTF8CString("file:///tmp/index.html"));
-    WKPageLoadFile(webView.page(), url.get(), nullptr);
-    activeURL = adoptWK(WKPageCopyActiveURL(webView.page()));
-    ASSERT_NOT_NULL(activeURL.get());
-    EXPECT_TRUE(WKURLIsEqual(activeURL.get(), url.get()));
-    WKPageStopLoading(webView.page());
-}
-
-} // namespace TestWebKitAPI
index b0217ae..7b34830 100644 (file)
@@ -82,8 +82,12 @@ void WebViewTest::loadPlainText(const char* plainText)
 {
     m_activeURI = "about:blank";
     webkit_web_view_load_plain_text(m_webView, plainText);
+#if 0
+    // FIXME: Pending API request URL no set when loading plain text.
+    // See https://bugs.webkit.org/show_bug.cgi?id=136916.
     g_assert(webkit_web_view_is_loading(m_webView));
     g_assert_cmpstr(webkit_web_view_get_uri(m_webView), ==, m_activeURI.data());
+#endif
 }
 
 void WebViewTest::loadBytes(GBytes* bytes, const char* mimeType, const char* encoding, const char* baseURI)
@@ -93,8 +97,12 @@ void WebViewTest::loadBytes(GBytes* bytes, const char* mimeType, const char* enc
     else
         m_activeURI = baseURI;
     webkit_web_view_load_bytes(m_webView, bytes, mimeType, encoding, baseURI);
+#if 0
+    // FIXME: Pending API request URL no set when loading data.
+    // See https://bugs.webkit.org/show_bug.cgi?id=136916.
     g_assert(webkit_web_view_is_loading(m_webView));
     g_assert_cmpstr(webkit_web_view_get_uri(m_webView), ==, m_activeURI.data());
+#endif
 }
 
 void WebViewTest::loadRequest(WebKitURIRequest* request)
@@ -109,7 +117,11 @@ void WebViewTest::loadAlternateHTML(const char* html, const char* contentURI, co
 {
     m_activeURI = contentURI;
     webkit_web_view_load_alternate_html(m_webView, html, contentURI, baseURI);
+#if 0
+    // FIXME: Pending API request URL no set when loading Alternate HTML.
+    // See https://bugs.webkit.org/show_bug.cgi?id=136916.
     g_assert(webkit_web_view_is_loading(m_webView));
+#endif
     g_assert_cmpstr(webkit_web_view_get_uri(m_webView), ==, m_activeURI.data());
 }