- Revision
- 275021
- Author
- [email protected]
- Date
- 2021-03-25 07:06:40 -0700 (Thu, 25 Mar 2021)
Log Message
Merge r274375 - REGRESSION(r274270): [WPE][GTK] Broke Epiphany test /embed/ephy-web-view/error-pages-not-stored-in-history
https://bugs.webkit.org/show_bug.cgi?id=223140
Patch by Michael Catanzaro <[email protected]> on 2021-03-12
Reviewed by Alex Christensen.
Source/WebCore:
If the SecurityOriginData has no protocol or host, return an empty string instead of "://"
* page/SecurityOriginData.cpp:
(WebCore::SecurityOriginData::toString const):
Source/WebKit:
Convert empty strings to NULL.
* UIProcess/API/glib/WebKitSecurityOrigin.cpp:
(webkit_security_origin_to_string):
Tools:
Improve WebKitSecurityOrigin tests a bit.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp:
(testCustomProtocolOrigin): Drive-by improvement: check webkit_security_origin_to_string().
(testBogusURI): Added, tests for this bug.
(beforeAll):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (275020 => 275021)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog 2021-03-25 14:06:33 UTC (rev 275020)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog 2021-03-25 14:06:40 UTC (rev 275021)
@@ -1,3 +1,15 @@
+2021-03-12 Michael Catanzaro <[email protected]>
+
+ REGRESSION(r274270): [WPE][GTK] Broke Epiphany test /embed/ephy-web-view/error-pages-not-stored-in-history
+ https://bugs.webkit.org/show_bug.cgi?id=223140
+
+ Reviewed by Alex Christensen.
+
+ If the SecurityOriginData has no protocol or host, return an empty string instead of "://"
+
+ * page/SecurityOriginData.cpp:
+ (WebCore::SecurityOriginData::toString const):
+
2021-03-12 Philippe Normand <[email protected]>
[GStreamer] Crashes deep in GStreamer under gst_element_add_pad
Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/page/SecurityOriginData.cpp (275020 => 275021)
--- releases/WebKitGTK/webkit-2.32/Source/WebCore/page/SecurityOriginData.cpp 2021-03-25 14:06:33 UTC (rev 275020)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/page/SecurityOriginData.cpp 2021-03-25 14:06:40 UTC (rev 275021)
@@ -41,6 +41,9 @@
if (protocol == "file")
return "file://"_s;
+ if (protocol.isEmpty() && host.isEmpty())
+ return { };
+
if (!port)
return makeString(protocol, "://", host);
return makeString(protocol, "://", host, ':', static_cast<uint32_t>(*port));
Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog (275020 => 275021)
--- releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog 2021-03-25 14:06:33 UTC (rev 275020)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog 2021-03-25 14:06:40 UTC (rev 275021)
@@ -1,3 +1,15 @@
+2021-03-12 Michael Catanzaro <[email protected]>
+
+ REGRESSION(r274270): [WPE][GTK] Broke Epiphany test /embed/ephy-web-view/error-pages-not-stored-in-history
+ https://bugs.webkit.org/show_bug.cgi?id=223140
+
+ Reviewed by Alex Christensen.
+
+ Convert empty strings to NULL.
+
+ * UIProcess/API/glib/WebKitSecurityOrigin.cpp:
+ (webkit_security_origin_to_string):
+
2021-03-12 Adrian Perez de Castro <[email protected]>
Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.31.91 release
Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/API/glib/WebKitSecurityOrigin.cpp (275020 => 275021)
--- releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/API/glib/WebKitSecurityOrigin.cpp 2021-03-25 14:06:33 UTC (rev 275020)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/API/glib/WebKitSecurityOrigin.cpp 2021-03-25 14:06:40 UTC (rev 275021)
@@ -257,5 +257,5 @@
g_return_val_if_fail(origin, nullptr);
CString cstring = origin->securityOriginData.toString().utf8();
- return cstring == "null" ? nullptr : g_strdup (cstring.data());
+ return cstring == "null" || cstring == "" ? nullptr : g_strdup (cstring.data());
}
Modified: releases/WebKitGTK/webkit-2.32/Tools/ChangeLog (275020 => 275021)
--- releases/WebKitGTK/webkit-2.32/Tools/ChangeLog 2021-03-25 14:06:33 UTC (rev 275020)
+++ releases/WebKitGTK/webkit-2.32/Tools/ChangeLog 2021-03-25 14:06:40 UTC (rev 275021)
@@ -1,3 +1,17 @@
+2021-03-12 Michael Catanzaro <[email protected]>
+
+ REGRESSION(r274270): [WPE][GTK] Broke Epiphany test /embed/ephy-web-view/error-pages-not-stored-in-history
+ https://bugs.webkit.org/show_bug.cgi?id=223140
+
+ Reviewed by Alex Christensen.
+
+ Improve WebKitSecurityOrigin tests a bit.
+
+ * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp:
+ (testCustomProtocolOrigin): Drive-by improvement: check webkit_security_origin_to_string().
+ (testBogusURI): Added, tests for this bug.
+ (beforeAll):
+
2021-03-12 Carlos Garcia Campos <[email protected]>
[GTK] Bump API version when building with libsoup3
Modified: releases/WebKitGTK/webkit-2.32/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp (275020 => 275021)
--- releases/WebKitGTK/webkit-2.32/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp 2021-03-25 14:06:33 UTC (rev 275020)
+++ releases/WebKitGTK/webkit-2.32/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp 2021-03-25 14:06:40 UTC (rev 275021)
@@ -122,6 +122,8 @@
{
WebKitSecurityOrigin* origin = webkit_security_origin_new_for_uri("squirrel://fish");
g_assert_nonnull(origin);
+ GUniquePtr<char> asString(webkit_security_origin_to_string(origin));
+ g_assert_cmpstr(asString.get(), ==, "squirrel://fish");
g_assert_cmpstr(webkit_security_origin_get_protocol(origin), ==, "squirrel");
g_assert_cmpstr(webkit_security_origin_get_host(origin), ==, "fish");
g_assert_cmpint(webkit_security_origin_get_port(origin), ==, 0);
@@ -128,6 +130,18 @@
webkit_security_origin_unref(origin);
}
+static void testBogusURI(Test*, gconstpointer)
+{
+ WebKitSecurityOrigin* origin = webkit_security_origin_new_for_uri("http://localhost:2984375932");
+ g_assert_nonnull(origin);
+ GUniquePtr<char> asString(webkit_security_origin_to_string(origin));
+ g_assert_null(asString.get());
+ g_assert_null(webkit_security_origin_get_protocol(origin));
+ g_assert_null(webkit_security_origin_get_host(origin));
+ g_assert_cmpint(webkit_security_origin_get_port(origin), ==, 0);
+ webkit_security_origin_unref(origin);
+}
+
void beforeAll()
{
Test::add("WebKitSecurityOrigin", "basic-constructor", testSecurityOriginBasicConstructor);
@@ -136,6 +150,7 @@
Test::add("WebKitSecurityOrigin", "file-uri", testSecurityOriginFileURI);
Test::add("WebKitSecurityOrigin", "blob-uri", testSecurityOriginDataURI);
Test::add("WebKitSecurityOrigin", "custom-protocol-origin", testCustomProtocolOrigin);
+ Test::add("WebKitSecurityOrigin", "bogus-uri", testBogusURI);
}
void afterAll()