Title: [238851] trunk
Revision
238851
Author
carlo...@webkit.org
Date
2018-12-04 03:01:17 -0800 (Tue, 04 Dec 2018)

Log Message

[SOUP] Move URLSoup back to WebCore after r238771
https://bugs.webkit.org/show_bug.cgi?id=192306

Reviewed by Michael Catanzaro.

Source/WebCore:

Add soupURIToURL() and urlToSoupURI() to replace the URL contructor taking a Soup URI and
URL::createSoupURI(). Fix several build failures that showed up after removing the soup includes from URL
header.

* platform/Cookie.h:
* platform/SharedBuffer.h:
* platform/SourcesSoup.txt:
* platform/network/soup/CookieSoup.cpp:
* platform/network/soup/GUniquePtrSoup.h: Renamed from Source/WTF/wtf/glib/GUniquePtrSoup.h.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::deleteCookie const):
(WebCore::NetworkStorageSession::getCookies):
(WebCore::NetworkStorageSession::getRawCookies const):
(WebCore::cookiesForSession):
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::failingURI):
* platform/network/soup/ResourceHandleSoup.cpp:
* platform/network/soup/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageMembers const):
(WebCore::ResourceRequest::updateFromSoupMessage):
(WebCore::ResourceRequest::createSoupURI const):
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::updateFromSoupMessage):
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::create):
* platform/network/soup/SoupNetworkSession.cpp:
* platform/network/soup/URLSoup.cpp: Copied from Source/WTF/wtf/glib/URLSoup.cpp.
(WebCore::soupURIToURL):
(WebCore::urlToSoupURI):
* platform/network/soup/URLSoup.h: Renamed from Source/WTF/wtf/glib/URLSoup.cpp.

Source/WebKit:

Include GUniquePtrSoup from WebCore again and fix several build failures that showed up after removing the soup
includes from URL header.

* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::tlsConnectionAcceptCertificate):
* PluginProcess/PluginProcess.cpp:
* Shared/API/glib/WebKitURIRequest.cpp:
* Shared/API/glib/WebKitURIResponse.cpp:
* UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
* UIProcess/API/glib/WebKitURISchemeRequest.cpp:
(webkit_uri_scheme_request_finish_error): Use soupURIToURL().
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_load_uri): Use soupURIToURL().
* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
* UIProcess/Launcher/glib/BubblewrapLauncher.h:
* UIProcess/Launcher/glib/FlatpakLauncher.cpp:
* UIProcess/Launcher/glib/FlatpakLauncher.h:

Source/WTF:

In r238771 URL was moved from WebCore to WTF, including the soup implementation. Unfortunately that added
libsoup as a new dependency of libjavascriptcoregtk.

* wtf/PlatformGTK.cmake:
* wtf/PlatformWPE.cmake:
* wtf/URL.h:
* wtf/glib/URLGLib.cpp: Copied from Source/WTF/wtf/glib/URLSoup.cpp.

Tools:

Include GUniquePtrSoup from WebCore again.

* TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (238850 => 238851)


--- trunk/Source/WTF/ChangeLog	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WTF/ChangeLog	2018-12-04 11:01:17 UTC (rev 238851)
@@ -1,3 +1,18 @@
+2018-12-04  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [SOUP] Move URLSoup back to WebCore after r238771
+        https://bugs.webkit.org/show_bug.cgi?id=192306
+
+        Reviewed by Michael Catanzaro.
+
+        In r238771 URL was moved from WebCore to WTF, including the soup implementation. Unfortunately that added
+        libsoup as a new dependency of libjavascriptcoregtk.
+
+        * wtf/PlatformGTK.cmake:
+        * wtf/PlatformWPE.cmake:
+        * wtf/URL.h:
+        * wtf/glib/URLGLib.cpp: Copied from Source/WTF/wtf/glib/URLSoup.cpp.
+
 2018-12-03  Don Olmstead  <don.olmst...@sony.com>
 
         Fix some unused parameter warnings

Modified: trunk/Source/WTF/wtf/PlatformGTK.cmake (238850 => 238851)


--- trunk/Source/WTF/wtf/PlatformGTK.cmake	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WTF/wtf/PlatformGTK.cmake	2018-12-04 11:01:17 UTC (rev 238851)
@@ -6,7 +6,6 @@
     glib/GRefPtr.h
     glib/GTypedefs.h
     glib/GUniquePtr.h
-    glib/GUniquePtrSoup.h
     glib/RunLoopSourcePriority.h
     glib/WTFGType.h
 )
@@ -26,7 +25,7 @@
     glib/GLibUtilities.cpp
     glib/GRefPtr.cpp
     glib/RunLoopGLib.cpp
-    glib/URLSoup.cpp
+    glib/URLGLib.cpp
 
     text/unix/TextBreakIteratorInternalICUUnix.cpp
 
@@ -52,11 +51,9 @@
     ${GLIB_GIO_LIBRARIES}
     ${GLIB_GOBJECT_LIBRARIES}
     ${GLIB_LIBRARIES}
-    ${LIBSOUP_LIBRARIES}
     ${ZLIB_LIBRARIES}
 )
 
 list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
-    ${LIBSOUP_INCLUDE_DIRS}
 )

Modified: trunk/Source/WTF/wtf/PlatformWPE.cmake (238850 => 238851)


--- trunk/Source/WTF/wtf/PlatformWPE.cmake	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WTF/wtf/PlatformWPE.cmake	2018-12-04 11:01:17 UTC (rev 238851)
@@ -4,7 +4,6 @@
     glib/GRefPtr.h
     glib/GTypedefs.h
     glib/GUniquePtr.h
-    glib/GUniquePtrSoup.h
     glib/RunLoopSourcePriority.h
     glib/WTFGType.h
 
@@ -20,7 +19,7 @@
     glib/GLibUtilities.cpp
     glib/GRefPtr.cpp
     glib/RunLoopGLib.cpp
-    glib/URLSoup.cpp
+    glib/URLGLib.cpp
 
     linux/CurrentProcessMemoryStatus.cpp
     linux/MemoryFootprintLinux.cpp
@@ -37,11 +36,9 @@
     ${GLIB_GIO_LIBRARIES}
     ${GLIB_GOBJECT_LIBRARIES}
     ${GLIB_LIBRARIES}
-    ${LIBSOUP_LIBRARIES}
     ${ZLIB_LIBRARIES}
 )
 
 list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
-    ${LIBSOUP_INCLUDE_DIRS}
 )

Modified: trunk/Source/WTF/wtf/URL.h (238850 => 238851)


--- trunk/Source/WTF/wtf/URL.h	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WTF/wtf/URL.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -33,10 +33,6 @@
 typedef const struct __CFURL* CFURLRef;
 #endif
 
-#if USE(SOUP)
-#include <wtf/glib/GUniquePtrSoup.h>
-#endif
-
 #if USE(FOUNDATION)
 OBJC_CLASS NSURL;
 #endif
@@ -179,11 +175,6 @@
     RetainPtr<CFURLRef> createCFURL() const;
 #endif
 
-#if USE(SOUP)
-    URL(SoupURI*);
-    GUniquePtr<SoupURI> createSoupURI() const;
-#endif
-
 #if USE(FOUNDATION)
     URL(NSURL*);
     operator NSURL*() const;

Deleted: trunk/Source/WTF/wtf/glib/GUniquePtrSoup.h (238850 => 238851)


--- trunk/Source/WTF/wtf/glib/GUniquePtrSoup.h	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WTF/wtf/glib/GUniquePtrSoup.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -1,38 +0,0 @@
-/*
- *  Copyright (C) 2014 Igalia S.L
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include <wtf/Platform.h>
-
-#if USE(SOUP)
-
-#include <libsoup/soup.h>
-#include <wtf/glib/GUniquePtr.h>
-
-namespace WTF {
-
-WTF_DEFINE_GPTR_DELETER(SoupURI, soup_uri_free)
-WTF_DEFINE_GPTR_DELETER(SoupCookie, soup_cookie_free)
-WTF_DEFINE_GPTR_DELETER(SoupMessageHeaders, soup_message_headers_free)
-WTF_DEFINE_GPTR_DELETER(SoupBuffer, soup_buffer_free)
-
-} // namespace WTF
-
-#endif // USE(SOUP)

Copied: trunk/Source/WTF/wtf/glib/URLGLib.cpp (from rev 238850, trunk/Source/WTF/wtf/glib/URLSoup.cpp) (0 => 238851)


--- trunk/Source/WTF/wtf/glib/URLGLib.cpp	                        (rev 0)
+++ trunk/Source/WTF/wtf/glib/URLGLib.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -0,0 +1,43 @@
+/*
+ * 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. ``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
+ * 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 "URL.h"
+
+#if USE(GLIB)
+
+#include <glib.h>
+#include <wtf/text/CString.h>
+
+namespace WTF {
+
+bool URL::hostIsIPAddress(StringView host)
+{
+    return !host.isEmpty() && g_hostname_is_ip_address(host.utf8().data());
+}
+
+} // namespace WTF
+
+#endif // USE(GLIB)

Deleted: trunk/Source/WTF/wtf/glib/URLSoup.cpp (238850 => 238851)


--- trunk/Source/WTF/wtf/glib/URLSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WTF/wtf/glib/URLSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -1,75 +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. ``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
- * 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"
-
-#if USE(SOUP)
-
-#include <libsoup/soup.h>
-#include <wtf/URL.h>
-#include <wtf/URLParser.h>
-#include <wtf/text/CString.h>
-
-namespace WTF {
-
-URL::URL(SoupURI* soupURI)
-{
-    if (!soupURI) {
-        invalidate();
-        return;
-    }
-
-    GUniquePtr<gchar> urlString(soup_uri_to_string(soupURI, FALSE));
-    URLParser parser(String::fromUTF8(urlString.get()));
-    *this = parser.result();
-
-    if (!isValid())
-        return;
-
-    // Motivated by https://bugs.webkit.org/show_bug.cgi?id=38956. libsoup
-    // does not add the password to the URL when calling
-    // soup_uri_to_string, and thus the requests are not properly
-    // built. Fixing soup_uri_to_string is a no-no as the maintainer does
-    // not want to break compatibility with previous implementations
-    if (soupURI->password)
-        setPass(String::fromUTF8(soupURI->password));
-}
-
-GUniquePtr<SoupURI> URL::createSoupURI() const
-{
-    if (!isValid())
-        return nullptr;
-
-    return GUniquePtr<SoupURI>(soup_uri_new(string().utf8().data()));
-}
-
-bool URL::hostIsIPAddress(StringView host)
-{
-    return !host.isEmpty() && g_hostname_is_ip_address(host.utf8().data());
-}
-
-} // namespace WTF
-
-#endif

Modified: trunk/Source/WebCore/ChangeLog (238850 => 238851)


--- trunk/Source/WebCore/ChangeLog	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/ChangeLog	2018-12-04 11:01:17 UTC (rev 238851)
@@ -1,3 +1,45 @@
+2018-12-04  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [SOUP] Move URLSoup back to WebCore after r238771
+        https://bugs.webkit.org/show_bug.cgi?id=192306
+
+        Reviewed by Michael Catanzaro.
+
+        Add soupURIToURL() and urlToSoupURI() to replace the URL contructor taking a Soup URI and
+        URL::createSoupURI(). Fix several build failures that showed up after removing the soup includes from URL
+        header.
+
+        * platform/Cookie.h:
+        * platform/SharedBuffer.h:
+        * platform/SourcesSoup.txt:
+        * platform/network/soup/CookieSoup.cpp:
+        * platform/network/soup/GUniquePtrSoup.h: Renamed from Source/WTF/wtf/glib/GUniquePtrSoup.h.
+        * platform/network/soup/NetworkStorageSessionSoup.cpp:
+        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
+        (WebCore::NetworkStorageSession::deleteCookie const):
+        (WebCore::NetworkStorageSession::getCookies):
+        (WebCore::NetworkStorageSession::getRawCookies const):
+        (WebCore::cookiesForSession):
+        * platform/network/soup/ResourceErrorSoup.cpp:
+        (WebCore::failingURI):
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        * platform/network/soup/ResourceRequest.h:
+        (WebCore::ResourceRequest::ResourceRequest):
+        * platform/network/soup/ResourceRequestSoup.cpp:
+        (WebCore::ResourceRequest::updateSoupMessageMembers const):
+        (WebCore::ResourceRequest::updateFromSoupMessage):
+        (WebCore::ResourceRequest::createSoupURI const):
+        * platform/network/soup/ResourceResponseSoup.cpp:
+        (WebCore::ResourceResponse::updateFromSoupMessage):
+        * platform/network/soup/SocketStreamHandleImpl.h:
+        * platform/network/soup/SocketStreamHandleImplSoup.cpp:
+        (WebCore::SocketStreamHandleImpl::create):
+        * platform/network/soup/SoupNetworkSession.cpp:
+        * platform/network/soup/URLSoup.cpp: Copied from Source/WTF/wtf/glib/URLSoup.cpp.
+        (WebCore::soupURIToURL):
+        (WebCore::urlToSoupURI):
+        * platform/network/soup/URLSoup.h: Renamed from Source/WTF/wtf/glib/URLSoup.cpp.
+
 2018-12-04  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Audit: tests should support async operations

Modified: trunk/Source/WebCore/platform/Cookie.h (238850 => 238851)


--- trunk/Source/WebCore/platform/Cookie.h	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/Cookie.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -34,6 +34,10 @@
 #include <objc/objc.h>
 #endif
 
+#if USE(SOUP)
+typedef struct _SoupCookie SoupCookie;
+#endif
+
 namespace WebCore {
 
 struct Cookie {

Modified: trunk/Source/WebCore/platform/SharedBuffer.h (238850 => 238851)


--- trunk/Source/WebCore/platform/SharedBuffer.h	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/SharedBuffer.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -40,7 +40,7 @@
 #endif
 
 #if USE(SOUP)
-#include <wtf/glib/GUniquePtrSoup.h>
+#include "GUniquePtrSoup.h"
 #endif
 
 #if USE(GLIB)

Modified: trunk/Source/WebCore/platform/SourcesSoup.txt (238850 => 238851)


--- trunk/Source/WebCore/platform/SourcesSoup.txt	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/SourcesSoup.txt	2018-12-04 11:01:17 UTC (rev 238851)
@@ -37,6 +37,7 @@
 platform/network/soup/SocketStreamHandleImplSoup.cpp
 platform/network/soup/SoupNetworkSession.cpp
 platform/network/soup/SynchronousLoaderClientSoup.cpp
+platform/network/soup/URLSoup.cpp
 platform/network/soup/WebKitSoupRequestGeneric.cpp
 
 platform/soup/PublicSuffixSoup.cpp

Modified: trunk/Source/WebCore/platform/network/soup/CookieSoup.cpp (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/CookieSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/CookieSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -27,6 +27,7 @@
 #include "config.h"
 #include "Cookie.h"
 
+#include <libsoup/soup.h>
 #include <wtf/DateMath.h>
 
 namespace WebCore {

Copied: trunk/Source/WebCore/platform/network/soup/GUniquePtrSoup.h (from rev 238850, trunk/Source/WTF/wtf/glib/GUniquePtrSoup.h) (0 => 238851)


--- trunk/Source/WebCore/platform/network/soup/GUniquePtrSoup.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/network/soup/GUniquePtrSoup.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -0,0 +1,38 @@
+/*
+ *  Copyright (C) 2014 Igalia S.L
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include <wtf/Platform.h>
+
+#if USE(SOUP)
+
+#include <libsoup/soup.h>
+#include <wtf/glib/GUniquePtr.h>
+
+namespace WTF {
+
+WTF_DEFINE_GPTR_DELETER(SoupURI, soup_uri_free)
+WTF_DEFINE_GPTR_DELETER(SoupCookie, soup_cookie_free)
+WTF_DEFINE_GPTR_DELETER(SoupMessageHeaders, soup_message_headers_free)
+WTF_DEFINE_GPTR_DELETER(SoupBuffer, soup_buffer_free)
+
+} // namespace WTF
+
+#endif // USE(SOUP)

Modified: trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -33,14 +33,15 @@
 
 #include "Cookie.h"
 #include "CookieRequestHeaderFieldProxy.h"
+#include "GUniquePtrSoup.h"
 #include "ResourceHandle.h"
 #include "SoupNetworkSession.h"
+#include "URLSoup.h"
 #include <libsoup/soup.h>
 #include <wtf/DateMath.h>
 #include <wtf/MainThread.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/glib/GUniquePtr.h>
-#include <wtf/glib/GUniquePtrSoup.h>
 
 #if USE(LIBSECRET)
 #include "GRefPtrGtk.h"
@@ -318,11 +319,11 @@
 {
     UNUSED_PARAM(frameID);
     UNUSED_PARAM(pageID);
-    GUniquePtr<SoupURI> origin = url.createSoupURI();
+    GUniquePtr<SoupURI> origin = urlToSoupURI(url);
     if (!origin)
         return;
 
-    GUniquePtr<SoupURI> firstPartyURI = firstParty.createSoupURI();
+    GUniquePtr<SoupURI> firstPartyURI = urlToSoupURI(firstParty);
     if (!firstPartyURI)
         return;
 
@@ -369,7 +370,7 @@
 
 void NetworkStorageSession::deleteCookie(const URL& url, const String& name) const
 {
-    GUniquePtr<SoupURI> uri = url.createSoupURI();
+    GUniquePtr<SoupURI> uri = urlToSoupURI(url);
     if (!uri)
         return;
 
@@ -447,7 +448,7 @@
 Vector<Cookie> NetworkStorageSession::getCookies(const URL& url)
 {
     Vector<Cookie> cookies;
-    GUniquePtr<SoupURI> uri = url.createSoupURI();
+    GUniquePtr<SoupURI> uri = urlToSoupURI(url);
     if (!uri)
         return cookies;
 
@@ -466,7 +467,7 @@
     UNUSED_PARAM(frameID);
     UNUSED_PARAM(pageID);
     rawCookies.clear();
-    GUniquePtr<SoupURI> uri = url.createSoupURI();
+    GUniquePtr<SoupURI> uri = urlToSoupURI(url);
     if (!uri)
         return false;
 
@@ -495,7 +496,7 @@
 
 static std::pair<String, bool> cookiesForSession(const NetworkStorageSession& session, const URL& url, bool forHTTPHeader, IncludeSecureCookies includeSecureCookies)
 {
-    GUniquePtr<SoupURI> uri = url.createSoupURI();
+    GUniquePtr<SoupURI> uri = urlToSoupURI(url);
     if (!uri)
         return { { }, false };
 

Modified: trunk/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -29,6 +29,7 @@
 #if USE(SOUP)
 
 #include "LocalizedStrings.h"
+#include "URLSoup.h"
 #include <libsoup/soup.h>
 #include <wtf/glib/GUniquePtr.h>
 #include <wtf/text/CString.h>
@@ -38,7 +39,7 @@
 static URL failingURI(SoupURI* soupURI)
 {
     ASSERT(soupURI);
-    return URL(soupURI);
+    return soupURIToURL(soupURI);
 }
 
 static URL failingURI(SoupRequest* request)

Modified: trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -33,6 +33,7 @@
 
 #include "CredentialStorage.h"
 #include "FileSystem.h"
+#include "GUniquePtrSoup.h"
 #include "HTTPParsers.h"
 #include "LocalizedStrings.h"
 #include "MIMETypeRegistry.h"
@@ -57,7 +58,6 @@
 #endif
 #include <wtf/CompletionHandler.h>
 #include <wtf/glib/GRefPtr.h>
-#include <wtf/glib/GUniquePtrSoup.h>
 #include <wtf/glib/RunLoopSourcePriority.h>
 #include <wtf/text/CString.h>
 

Modified: trunk/Source/WebCore/platform/network/soup/ResourceRequest.h (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/ResourceRequest.h	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/ResourceRequest.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -28,8 +28,7 @@
 #define ResourceRequest_h
 
 #include "ResourceRequestBase.h"
-#include <libsoup/soup.h>
-#include <wtf/glib/GUniquePtrSoup.h>
+#include "URLSoup.h"
 
 namespace WebCore {
 
@@ -78,7 +77,7 @@
         }
 
         ResourceRequest(SoupRequest* soupRequest)
-            : ResourceRequestBase(URL(soup_request_get_uri(soupRequest)), ResourceRequestCachePolicy::UseProtocolCachePolicy)
+            : ResourceRequestBase(soupURIToURL(soup_request_get_uri(soupRequest)), ResourceRequestCachePolicy::UseProtocolCachePolicy)
             , m_acceptEncoding(true)
             , m_soupFlags(static_cast<SoupMessageFlags>(0))
             , m_initiatingPageID(0)

Modified: trunk/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -24,11 +24,12 @@
 
 #include "BlobData.h"
 #include "BlobRegistryImpl.h"
+#include "GUniquePtrSoup.h"
 #include "HTTPParsers.h"
 #include "MIMETypeRegistry.h"
 #include "SharedBuffer.h"
+#include "URLSoup.h"
 #include "WebKitSoupRequestGeneric.h"
-#include <wtf/glib/GUniquePtrSoup.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
@@ -106,7 +107,7 @@
 {
     updateSoupMessageHeaders(soupMessage->request_headers);
 
-    GUniquePtr<SoupURI> firstParty = firstPartyForCookies().createSoupURI();
+    GUniquePtr<SoupURI> firstParty = urlToSoupURI(firstPartyForCookies());
     if (firstParty)
         soup_message_set_first_party(soupMessage, firstParty.get());
 
@@ -153,7 +154,7 @@
 void ResourceRequest::updateFromSoupMessage(SoupMessage* soupMessage)
 {
     bool shouldPortBeResetToZero = m_url.port() && !m_url.port().value();
-    m_url = URL(soup_message_get_uri(soupMessage));
+    m_url = soupURIToURL(soup_message_get_uri(soupMessage));
 
     // SoupURI cannot differeniate between an explicitly specified port 0 and
     // no port specified.
@@ -168,7 +169,7 @@
         m_httpBody = FormData::create(soupMessage->request_body->data, soupMessage->request_body->length);
 
     if (SoupURI* firstParty = soup_message_get_first_party(soupMessage))
-        m_firstPartyForCookies = URL(firstParty);
+        m_firstPartyForCookies = soupURIToURL(firstParty);
 
     m_soupFlags = soup_message_get_flags(soupMessage);
 
@@ -216,7 +217,7 @@
         return GUniquePtr<SoupURI>(soup_uri_new(urlString.utf8().data()));
     }
 
-    GUniquePtr<SoupURI> soupURI = m_url.createSoupURI();
+    GUniquePtr<SoupURI> soupURI = urlToSoupURI(m_url);
 
     // Versions of libsoup prior to 2.42 have a soup_uri_new that will convert empty passwords that are not
     // prefixed by a colon into null. Some parts of soup like the SoupAuthenticationManager will only be active

Modified: trunk/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -27,6 +27,7 @@
 #include "HTTPHeaderNames.h"
 #include "HTTPParsers.h"
 #include "MIMETypeRegistry.h"
+#include "URLSoup.h"
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
@@ -40,7 +41,7 @@
 
 void ResourceResponse::updateFromSoupMessage(SoupMessage* soupMessage)
 {
-    m_url = URL(soup_message_get_uri(soupMessage));
+    m_url = soupURIToURL(soup_message_get_uri(soupMessage));
 
     switch (soup_message_get_http_version(soupMessage)) {
     case SOUP_HTTP_1_0:

Modified: trunk/Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/SocketStreamHandleImpl.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -41,6 +41,9 @@
 #include <wtf/UniqueArray.h>
 #include <wtf/glib/GRefPtr.h>
 
+typedef struct _GIOStream GIOStream;
+typedef struct _GObject GObject;
+
 namespace WebCore {
 
 class SocketStreamError;

Modified: trunk/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -41,6 +41,7 @@
 #include "SocketStreamError.h"
 #include "SocketStreamHandleClient.h"
 #include "SoupNetworkSession.h"
+#include "URLSoup.h"
 #include <gio/gio.h>
 #include <glib.h>
 #include <wtf/URL.h>
@@ -89,7 +90,7 @@
     if (!networkStorageSession)
         return socket;
 
-    auto uri = url.createSoupURI();
+    auto uri = urlToSoupURI(url);
     Ref<SocketStreamHandle> protectedSocketStreamHandle = socket.copyRef();
     soup_session_connect_async(networkStorageSession->getOrCreateSoupNetworkSession().soupSession(), uri.get(), socket->m_cancellable.get(),
         url.protocolIs("wss") ? reinterpret_cast<SoupSessionConnectProgressCallback>(connectProgressCallback) : nullptr,

Modified: trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp (238850 => 238851)


--- trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -31,6 +31,7 @@
 
 #include "AuthenticationChallenge.h"
 #include "FileSystem.h"
+#include "GUniquePtrSoup.h"
 #include "Logging.h"
 #include "SoupNetworkProxySettings.h"
 #include <glib/gstdio.h>
@@ -38,7 +39,6 @@
 #include <pal/crypto/CryptoDigest.h>
 #include <wtf/HashSet.h>
 #include <wtf/NeverDestroyed.h>
-#include <wtf/glib/GUniquePtrSoup.h>
 #include <wtf/text/Base64.h>
 #include <wtf/text/CString.h>
 

Copied: trunk/Source/WebCore/platform/network/soup/URLSoup.cpp (from rev 238850, trunk/Source/WTF/wtf/glib/URLSoup.cpp) (0 => 238851)


--- trunk/Source/WebCore/platform/network/soup/URLSoup.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/network/soup/URLSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2014, 2018 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. ``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
+ * 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 "URLSoup.h"
+
+#include <wtf/URL.h>
+
+namespace WebCore {
+
+URL soupURIToURL(SoupURI* soupURI)
+{
+    if (!soupURI)
+        return URL();
+
+    GUniquePtr<gchar> urlString(soup_uri_to_string(soupURI, FALSE));
+    URL url(URL(), String::fromUTF8(urlString.get()));
+    if (url.isValid()) {
+        // Motivated by https://bugs.webkit.org/show_bug.cgi?id=38956. libsoup
+        // does not add the password to the URL when calling
+        // soup_uri_to_string, and thus the requests are not properly
+        // built. Fixing soup_uri_to_string is a no-no as the maintainer does
+        // not want to break compatibility with previous implementations
+        if (soupURI->password)
+            url.setPass(String::fromUTF8(soupURI->password));
+    }
+
+    return url;
+}
+
+GUniquePtr<SoupURI> urlToSoupURI(const URL& url)
+{
+    if (!url.isValid())
+        return nullptr;
+
+    return GUniquePtr<SoupURI>(soup_uri_new(url.string().utf8().data()));
+}
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/platform/network/soup/URLSoup.h (from rev 238850, trunk/Source/WTF/wtf/glib/URLSoup.cpp) (0 => 238851)


--- trunk/Source/WebCore/platform/network/soup/URLSoup.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/network/soup/URLSoup.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2018 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. ``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
+ * 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.
+ */
+
+#pragma once
+
+#include "GUniquePtrSoup.h"
+
+namespace WTF {
+class URL;
+}
+
+namespace WebCore {
+URL soupURIToURL(SoupURI*);
+GUniquePtr<SoupURI> urlToSoupURI(const WTF::URL&);
+} // namespace WebCore

Modified: trunk/Source/WebKit/ChangeLog (238850 => 238851)


--- trunk/Source/WebKit/ChangeLog	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/ChangeLog	2018-12-04 11:01:17 UTC (rev 238851)
@@ -1,3 +1,28 @@
+2018-12-04  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [SOUP] Move URLSoup back to WebCore after r238771
+        https://bugs.webkit.org/show_bug.cgi?id=192306
+
+        Reviewed by Michael Catanzaro.
+
+        Include GUniquePtrSoup from WebCore again and fix several build failures that showed up after removing the soup
+        includes from URL header.
+
+        * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
+        (WebKit::NetworkDataTaskSoup::tlsConnectionAcceptCertificate):
+        * PluginProcess/PluginProcess.cpp:
+        * Shared/API/glib/WebKitURIRequest.cpp:
+        * Shared/API/glib/WebKitURIResponse.cpp:
+        * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
+        * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
+        (webkit_uri_scheme_request_finish_error): Use soupURIToURL().
+        * UIProcess/API/glib/WebKitWebView.cpp:
+        (webkit_web_view_load_uri): Use soupURIToURL().
+        * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
+        * UIProcess/Launcher/glib/BubblewrapLauncher.h:
+        * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
+        * UIProcess/Launcher/glib/FlatpakLauncher.h:
+
 2018-12-04  Tim Horton  <timothy_hor...@apple.com>
 
         Fix the watchOS build; stop unnecessarily linking CorePDF

Modified: trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp (238850 => 238851)


--- trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -423,7 +423,7 @@
 bool NetworkDataTaskSoup::tlsConnectionAcceptCertificate(GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors)
 {
     ASSERT(m_soupRequest);
-    URL url(soup_request_get_uri(m_soupRequest.get()));
+    URL url = ""
     auto error = SoupNetworkSession::checkTLSErrors(url, certificate, tlsErrors);
     if (!error)
         return true;

Modified: trunk/Source/WebKit/PluginProcess/PluginProcess.cpp (238850 => 238851)


--- trunk/Source/WebKit/PluginProcess/PluginProcess.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/PluginProcess/PluginProcess.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -39,6 +39,7 @@
 #include "WebProcessConnection.h"
 #include <WebCore/NetworkStorageSession.h>
 #include <WebCore/NotImplemented.h>
+#include <unistd.h>
 #include <wtf/MemoryPressureHandler.h>
 #include <wtf/NeverDestroyed.h>
 #include <wtf/ProcessPrivilege.h>

Modified: trunk/Source/WebKit/Shared/API/glib/WebKitURIRequest.cpp (238850 => 238851)


--- trunk/Source/WebKit/Shared/API/glib/WebKitURIRequest.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/Shared/API/glib/WebKitURIRequest.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -21,8 +21,8 @@
 #include "WebKitURIRequest.h"
 
 #include "WebKitURIRequestPrivate.h"
+#include <WebCore/GUniquePtrSoup.h>
 #include <glib/gi18n-lib.h>
-#include <wtf/glib/GUniquePtrSoup.h>
 #include <wtf/glib/WTFGType.h>
 #include <wtf/text/CString.h>
 

Modified: trunk/Source/WebKit/Shared/API/glib/WebKitURIResponse.cpp (238850 => 238851)


--- trunk/Source/WebKit/Shared/API/glib/WebKitURIResponse.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/Shared/API/glib/WebKitURIResponse.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -21,8 +21,8 @@
 #include "WebKitURIResponse.h"
 
 #include "WebKitURIResponsePrivate.h"
+#include <WebCore/GUniquePtrSoup.h>
 #include <glib/gi18n-lib.h>
-#include <wtf/glib/GUniquePtrSoup.h>
 #include <wtf/glib/WTFGType.h>
 #include <wtf/text/CString.h>
 

Modified: trunk/Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp (238850 => 238851)


--- trunk/Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -27,6 +27,7 @@
 #include "APIWebsiteDataStore.h"
 
 #include <WebCore/FileSystem.h>
+#include <wtf/glib/GUniquePtr.h>
 
 #if PLATFORM(GTK)
 #define BASE_DIRECTORY "webkitgtk"

Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequest.cpp (238850 => 238851)


--- trunk/Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequest.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequest.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -26,10 +26,11 @@
 #include "WebKitWebContextPrivate.h"
 #include "WebKitWebView.h"
 #include "WebPageProxy.h"
+#include <WebCore/GUniquePtrSoup.h>
 #include <WebCore/ResourceError.h>
+#include <WebCore/URLSoup.h>
 #include <libsoup/soup.h>
 #include <wtf/glib/GRefPtr.h>
-#include <wtf/glib/GUniquePtrSoup.h>
 #include <wtf/glib/RunLoopSourcePriority.h>
 #include <wtf/glib/WTFGType.h>
 #include <wtf/text/CString.h>
@@ -257,7 +258,7 @@
         return;
 
     priv->stream = nullptr;
-    ResourceError resourceError(g_quark_to_string(error->domain), toWebCoreError(error->code), URL(priv->soupURI.get()), String::fromUTF8(error->message));
+    ResourceError resourceError(g_quark_to_string(error->domain), toWebCoreError(error->code), soupURIToURL(priv->soupURI.get()), String::fromUTF8(error->message));
     priv->manager->didFailWithError(priv->requestID, resourceError);
     webkitWebContextDidFinishLoadingCustomProtocol(priv->webContext, priv->requestID);
 }

Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp (238850 => 238851)


--- trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -66,12 +66,13 @@
 #include <_javascript_Core/JSRetainPtr.h>
 #include <jsc/JSCContextPrivate.h>
 #include <WebCore/CertificateInfo.h>
+#include <WebCore/GUniquePtrSoup.h>
 #include <WebCore/JSDOMExceptionHandling.h>
 #include <WebCore/RefPtrCairo.h>
+#include <WebCore/URLSoup.h>
 #include <glib/gi18n-lib.h>
 #include <wtf/URL.h>
 #include <wtf/glib/GRefPtr.h>
-#include <wtf/glib/GUniquePtrSoup.h>
 #include <wtf/glib/WTFGType.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
@@ -2585,7 +2586,7 @@
     g_return_if_fail(uri);
 
     GUniquePtr<SoupURI> soupURI(soup_uri_new(uri));
-    getPage(webView).loadRequest(URL(soupURI.get()));
+    getPage(webView).loadRequest(soupURIToURL(soupURI.get()));
 }
 
 /**

Modified: trunk/Source/WebKit/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp (238850 => 238851)


--- trunk/Source/WebKit/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -25,6 +25,8 @@
 #include "WebKitCredentialPrivate.h"
 #include "WebKitWebView.h"
 #include <glib/gi18n-lib.h>
+#include <wtf/glib/GRefPtr.h>
+#include <wtf/glib/GUniquePtr.h>
 #include <wtf/glib/WTFGType.h>
 #include <wtf/text/CString.h>
 

Modified: trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.h (238850 => 238851)


--- trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.h	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -29,8 +29,11 @@
 
 #include "ProcessLauncher.h"
 
-#include <glib.h>
+#include <wtf/glib/GRefPtr.h>
 
+typedef struct _GSubprocess GSubprocess;
+typedef struct _GSubprocessLauncher GSubprocessLauncher;
+
 namespace WebKit {
 
 GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher*, const ProcessLauncher::LaunchOptions&, char** argv, GError**);

Modified: trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp (238850 => 238851)


--- trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -28,6 +28,8 @@
 
 #if OS(LINUX)
 
+#include <gio/gio.h>
+
 namespace WebKit {
 
 GRefPtr<GSubprocess> flatpakSpawn(GSubprocessLauncher* launcher, const WebKit::ProcessLauncher::LaunchOptions& launchOptions, char** argv, GError **error)

Modified: trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.h (238850 => 238851)


--- trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.h	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.h	2018-12-04 11:01:17 UTC (rev 238851)
@@ -29,8 +29,11 @@
 
 #include "ProcessLauncher.h"
 
-#include <glib.h>
+#include <wtf/glib/GRefPtr.h>
 
+typedef struct _GSubprocess GSubprocess;
+typedef struct _GSubprocessLauncher GSubprocessLauncher;
+
 namespace WebKit {
 
 GRefPtr<GSubprocess> flatpakSpawn(GSubprocessLauncher*, const WebKit::ProcessLauncher::LaunchOptions&, char** argv, GError**);

Modified: trunk/Tools/ChangeLog (238850 => 238851)


--- trunk/Tools/ChangeLog	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Tools/ChangeLog	2018-12-04 11:01:17 UTC (rev 238851)
@@ -1,3 +1,14 @@
+2018-12-04  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [SOUP] Move URLSoup back to WebCore after r238771
+        https://bugs.webkit.org/show_bug.cgi?id=192306
+
+        Reviewed by Michael Catanzaro.
+
+        Include GUniquePtrSoup from WebCore again.
+
+        * TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:
+
 2018-12-03  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [GTK] Bump freetype, fontconfig, harfbuzz, cairo and icu in jhbuild

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp (238850 => 238851)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp	2018-12-04 09:08:42 UTC (rev 238850)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp	2018-12-04 11:01:17 UTC (rev 238851)
@@ -22,8 +22,8 @@
 
 #include "WebKitTestServer.h"
 #include "WebViewTest.h"
+#include <WebCore/GUniquePtrSoup.h>
 #include <glib/gstdio.h>
-#include <wtf/glib/GUniquePtrSoup.h>
 
 static WebKitTestServer* kServer;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to