net-libs/webkit-gtk: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
Michael Mair-Keimberger
2024-10-10 20:47:38 +02:00
committed by Conrad Kostecki
parent 32b9c67e09
commit bf3fa8e63e
4 changed files with 0 additions and 406 deletions

View File

@@ -1,29 +0,0 @@
From 56001e951362a5064027b1af81283e523e35559b Mon Sep 17 00:00:00 2001
From: Dennis Camera <dennis.camera+webkit@riiengineering.ch>
Date: Mon, 4 Mar 2024 09:27:54 -0800
Subject: [PATCH] [JSC] A64DOpcode include <mutex>
https://bugs.webkit.org/show_bug.cgi?id=270394
Reviewed by Michael Catanzaro.
When UNIFIED_BUILDS are disabled, the build fails due to missing std::call_once.
* Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h: include <mutex>.
Canonical link: https://commits.webkit.org/275630@main
---
Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h b/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h
index 0392bcb6e20a0..202aa4d1d81de 100644
--- a/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h
+++ b/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h
@@ -25,6 +25,7 @@
#pragma once
+#include <mutex>
#include <stdint.h>
#include <wtf/Assertions.h>
#include <wtf/DataLog.h>

View File

@@ -1,262 +0,0 @@
From 53ca279739365f9a604fba0a673f0539dfd67c55 Mon Sep 17 00:00:00 2001
From: Patrick Griffis <pgriffis@igalia.com>
Date: Mon, 8 Apr 2024 10:21:34 -0700
Subject: [PATCH 1/6] Cherry-pick 277203@main (bd1249cc9c4f).
https://bugs.webkit.org/show_bug.cgi?id=272309
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Workaround restrict error in GCC 12
https://bugs.webkit.org/show_bug.cgi?id=272309
Reviewed by Darin Adler.
In GCC 12.3.0:
In static member function ‘static constexpr std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)’,
inlined from ‘static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:431:21,
inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.tcc:532:22,
inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:2179:19,
inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:1936:22,
inlined from ‘std::ostream& WTF::operator<<(std::ostream&, Int128Impl)’ at /host/home/tingping/Projects/WebKit/Source/WTF/wtf/Int128.cpp:268:17:
/usr/include/c++/12/bits/char_traits.h:435:56: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
435 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
* Source/WTF/wtf/Int128.cpp:
(WTF::operator<<):
Canonical link: https://commits.webkit.org/277203@main
Canonical link: https://commits.webkit.org/274313.129@webkitglib/2.44
---
Source/WTF/wtf/Int128.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/WTF/wtf/Int128.cpp b/Source/WTF/wtf/Int128.cpp
index 3962059d0cb9..c04f6d74543a 100644
--- a/Source/WTF/wtf/Int128.cpp
+++ b/Source/WTF/wtf/Int128.cpp
@@ -265,9 +265,9 @@ std::ostream& operator<<(std::ostream& os, Int128Impl v) {
(flags & std::ios::basefield) == std::ios_base::fmtflags();
if (print_as_decimal) {
if (Int128High64(v) < 0) {
- rep = "-";
+ rep.append("-");
} else if (flags & std::ios::showpos) {
- rep = "+";
+ rep.append("+");
}
}
--
2.43.0
From 8ce83c4bf224122e0062248752a3ed014efc67e5 Mon Sep 17 00:00:00 2001
From: Tim Nguyen <ntim@apple.com>
Date: Wed, 3 Apr 2024 09:22:37 -0700
Subject: [PATCH 4/6] Cherry-pick 277007@main (1870b119a450).
https://bugs.webkit.org/show_bug.cgi?id=272044
CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::ValidatedFormListedElement::updateValidity
https://bugs.webkit.org/show_bug.cgi?id=272044
rdar://117727866
Reviewed by Ryosuke Niwa.
It speculatively fixes a bug that RadioButtonGroup::m_members may contain a nullptr WeakRef.
* Source/WebCore/dom/RadioButtonGroups.cpp:
(WebCore::RadioButtonGroup::isEmpty const):
(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):
(WebCore::RadioButtonGroup::updateValidityForAllButtons):
Canonical link: https://commits.webkit.org/277007@main
Canonical link: https://commits.webkit.org/274313.132@webkitglib/2.44
---
Source/WebCore/dom/RadioButtonGroups.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Source/WebCore/dom/RadioButtonGroups.cpp b/Source/WebCore/dom/RadioButtonGroups.cpp
index ba07a3fbdf09..4bbae6cbb72f 100644
--- a/Source/WebCore/dom/RadioButtonGroups.cpp
+++ b/Source/WebCore/dom/RadioButtonGroups.cpp
@@ -31,7 +31,7 @@ namespace WebCore {
class RadioButtonGroup {
WTF_MAKE_FAST_ALLOCATED;
public:
- bool isEmpty() const { return m_members.isEmpty(); }
+ bool isEmpty() const { return m_members.isEmptyIgnoringNullReferences(); }
bool isRequired() const { return m_requiredCount; }
RefPtr<HTMLInputElement> checkedButton() const { return m_checkedButton.get(); }
void add(HTMLInputElement&);
@@ -47,7 +47,7 @@ private:
bool isValid() const;
void setCheckedButton(HTMLInputElement*);
- HashSet<WeakRef<HTMLInputElement, WeakPtrImplWithEventTargetData>> m_members;
+ WeakHashSet<HTMLInputElement, WeakPtrImplWithEventTargetData> m_members;
WeakPtr<HTMLInputElement, WeakPtrImplWithEventTargetData> m_checkedButton;
size_t m_requiredCount { 0 };
};
@@ -60,7 +60,7 @@ inline bool RadioButtonGroup::isValid() const
Vector<Ref<HTMLInputElement>> RadioButtonGroup::members() const
{
auto sortedMembers = WTF::map(m_members, [](auto& element) -> Ref<HTMLInputElement> {
- return element.get();
+ return element;
});
std::sort(sortedMembers.begin(), sortedMembers.end(), [](auto& a, auto& b) {
return is_lt(treeOrder<ComposedTree>(a, b));
@@ -155,7 +155,7 @@ void RadioButtonGroup::remove(HTMLInputElement& button)
}
}
- if (m_members.isEmpty()) {
+ if (m_members.isEmptyIgnoringNullReferences()) {
ASSERT(!m_requiredCount);
ASSERT(!m_checkedButton);
} else if (wasValid != isValid())
@@ -170,7 +170,7 @@ void RadioButtonGroup::remove(HTMLInputElement& button)
void RadioButtonGroup::setNeedsStyleRecalcForAllButtons()
{
for (auto& checkedButton : m_members) {
- Ref button = checkedButton.get();
+ Ref button = checkedButton;
ASSERT(button->isRadioButton());
button->invalidateStyleForSubtree();
}
@@ -179,7 +179,7 @@ void RadioButtonGroup::setNeedsStyleRecalcForAllButtons()
void RadioButtonGroup::updateValidityForAllButtons()
{
for (auto& checkedButton : m_members) {
- Ref button = checkedButton.get();
+ Ref button = checkedButton;
ASSERT(button->isRadioButton());
button->updateValidity();
}
--
2.43.0
From 93bde17ed761f5de54726de83ced4959303794c6 Mon Sep 17 00:00:00 2001
From: Abrar Rahman Protyasha <a_protyasha@apple.com>
Date: Mon, 1 Apr 2024 22:42:12 -0700
Subject: [PATCH 5/6] Cherry-pick 276925@main (59cedf7135bc).
https://bugs.webkit.org/show_bug.cgi?id=271962
Linker error when logging ViewportConfiguration to TextStream in Release configuration
https://bugs.webkit.org/show_bug.cgi?id=271962
rdar://125713559
Reviewed by Sihui Liu.
WebCore::operator<<(WTF::TextStream&, WebCore::ViewConfiguration const&)
is defined behind !LOG_DISABLED, which means in Release configuration,
the linker cannot find this definition.
This patch fixes the linker error by removing the relevant !LOG_DISABLED
checks around both the operator<< overload definition and the
description()/dump() declarations, since said methods are referenced by
the operator<< overload.
* Source/WebCore/page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::setIsKnownToLayOutWiderThanViewport):
(WebCore::ViewportConfiguration::dump const):
* Source/WebCore/page/ViewportConfiguration.h:
Canonical link: https://commits.webkit.org/276925@main
Canonical link: https://commits.webkit.org/274313.133@webkitglib/2.44
---
Source/WebCore/page/ViewportConfiguration.cpp | 4 ++--
Source/WebCore/page/ViewportConfiguration.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Source/WebCore/page/ViewportConfiguration.cpp b/Source/WebCore/page/ViewportConfiguration.cpp
index 51abb1154515..c58bc368cd6c 100644
--- a/Source/WebCore/page/ViewportConfiguration.cpp
+++ b/Source/WebCore/page/ViewportConfiguration.cpp
@@ -674,8 +674,6 @@ bool ViewportConfiguration::setIsKnownToLayOutWiderThanViewport(bool value)
return true;
}
-#if !LOG_DISABLED
-
TextStream& operator<<(TextStream& ts, const ViewportConfiguration::Parameters& parameters)
{
ts.startGroup();
@@ -747,6 +745,8 @@ String ViewportConfiguration::description() const
return ts.release();
}
+#if !LOG_DISABLED
+
void ViewportConfiguration::dump() const
{
WTFLogAlways("%s", description().utf8().data());
diff --git a/Source/WebCore/page/ViewportConfiguration.h b/Source/WebCore/page/ViewportConfiguration.h
index acd5a92ae089..1a7c27225a4b 100644
--- a/Source/WebCore/page/ViewportConfiguration.h
+++ b/Source/WebCore/page/ViewportConfiguration.h
@@ -148,9 +148,9 @@ public:
WEBCORE_EXPORT static Parameters imageDocumentParameters();
WEBCORE_EXPORT static Parameters xhtmlMobileParameters();
WEBCORE_EXPORT static Parameters testingParameters();
-
-#if !LOG_DISABLED
+
String description() const;
+#if !LOG_DISABLED
WEBCORE_EXPORT void dump() const;
#endif
--
2.43.0
From aff53249f2d491d082094a2aa57008c46e55d278 Mon Sep 17 00:00:00 2001
From: Erica Li <lerica@apple.com>
Date: Tue, 19 Mar 2024 18:27:04 -0700
Subject: [PATCH 6/6] Cherry-pick 276379@main (d036679431a5).
https://bugs.webkit.org/show_bug.cgi?id=271028
ASAN_SEGV | WebCore::LocalFrame::injectUserScripts.
rdar://124432384
https://bugs.webkit.org/show_bug.cgi?id=271028
Reviewed by Ryosuke Niwa.
Frame might be detached early, null checking before injectUserScripts from image document.
* Source/WebCore/html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure):
Canonical link: https://commits.webkit.org/276379@main
Canonical link: https://commits.webkit.org/274313.134@webkitglib/2.44
---
Source/WebCore/html/ImageDocument.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Source/WebCore/html/ImageDocument.cpp b/Source/WebCore/html/ImageDocument.cpp
index f91478f138fe..67d3ed0d09af 100644
--- a/Source/WebCore/html/ImageDocument.cpp
+++ b/Source/WebCore/html/ImageDocument.cpp
@@ -230,7 +230,8 @@ void ImageDocument::createDocumentStructure()
rootElement->insertedByParser();
rootElement->setInlineStyleProperty(CSSPropertyHeight, 100, CSSUnitType::CSS_PERCENTAGE);
- frame()->injectUserScripts(UserScriptInjectionTime::DocumentStart);
+ if (RefPtr localFrame = frame())
+ localFrame->injectUserScripts(UserScriptInjectionTime::DocumentStart);
// We need a <head> so that the call to setTitle() later on actually has an <head> to append to <title> to.
auto head = HTMLHeadElement::create(*this);
--
2.43.0

View File

@@ -1,62 +0,0 @@
From 30e1d5e22213fdaca2a29ec3400c927d710a37a8 Mon Sep 17 00:00:00 2001
From: Thomas Devoogdt <thomas.devoogdt@barco.com>
Date: Mon, 16 Jan 2023 17:03:30 +0100
Subject: [PATCH] REGRESSION(257865@main): B3Validate.cpp: fix
!ENABLE(WEBASSEMBLY_B3JIT)
https://bugs.webkit.org/show_bug.cgi?id=250681
Reviewed by NOBODY (OOPS!).
WasmTypeDefinition.h isn't included if not ENABLE(WEBASSEMBLY_B3JIT).
Also, toB3Type and simdScalarType are not defined if it is included.
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
Source/JavaScriptCore/b3/B3Validate.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Source/JavaScriptCore/b3/B3Validate.cpp b/Source/JavaScriptCore/b3/B3Validate.cpp
index d06a76023392..53bf8b16ed86 100644
--- a/Source/JavaScriptCore/b3/B3Validate.cpp
+++ b/Source/JavaScriptCore/b3/B3Validate.cpp
@@ -47,6 +47,12 @@
#include <wtf/StringPrintStream.h>
#include <wtf/text/CString.h>
+#if ENABLE(WEBASSEMBLY) && ENABLE(WEBASSEMBLY_B3JIT)
+#define simdScalarTypeToB3Type(type) toB3Type(Wasm::simdScalarType(type))
+#else
+#define simdScalarTypeToB3Type(type) B3::Type()
+#endif
+
namespace JSC { namespace B3 {
namespace {
@@ -452,7 +458,7 @@ class Validater {
case VectorExtractLane:
VALIDATE(!value->kind().hasExtraBits(), ("At ", *value));
VALIDATE(value->numChildren() == 1, ("At ", *value));
- VALIDATE(value->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
+ VALIDATE(value->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value));
VALIDATE(value->child(0)->type() == V128, ("At ", *value));
break;
case VectorReplaceLane:
@@ -460,7 +466,7 @@ class Validater {
VALIDATE(value->numChildren() == 2, ("At ", *value));
VALIDATE(value->type() == V128, ("At ", *value));
VALIDATE(value->child(0)->type() == V128, ("At ", *value));
- VALIDATE(value->child(1)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
+ VALIDATE(value->child(1)->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value));
break;
case VectorNot:
case VectorAbs:
@@ -475,7 +481,7 @@ class Validater {
VALIDATE(!value->kind().hasExtraBits(), ("At ", *value));
VALIDATE(value->numChildren() == 1, ("At ", *value));
VALIDATE(value->type() == V128, ("At ", *value));
- VALIDATE(value->child(0)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
+ VALIDATE(value->child(0)->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value));
break;
case VectorPopcnt:

View File

@@ -1,53 +0,0 @@
From c6f625d1c91df9986d79a928b01399dce4beb1cc Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Sat, 18 May 2024 08:25:37 -0500
Subject: [PATCH] Revert "Cherry-pick 276798@main (f91aeb92bd8e).
https://bugs.webkit.org/show_bug.cgi?id=260455"
Unreviewed. This reverts commit 30ad9a720e6b12a6c958fcef0d7dd3f52da485bd.
See: https://bugs.webkit.org/show_bug.cgi?id=274261
Canonical link: https://commits.webkit.org/274313.257@webkitglib/2.44
---
...e-muted-scroll-and-seek-crash-expected.txt | 4 --
...ia-source-muted-scroll-and-seek-crash.html | 65 -------------------
.../gstreamer/MediaPlayerPrivateGStreamer.cpp | 14 +---
3 files changed, 3 insertions(+), 80 deletions(-)
delete mode 100644 LayoutTests/media/media-source/media-source-muted-scroll-and-seek-crash-expected.txt
delete mode 100644 LayoutTests/media/media-source/media-source-muted-scroll-and-seek-crash.html
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index 7b28083fae71..a5fb5d679153 100644
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -328,8 +328,8 @@ void MediaPlayerPrivateGStreamer::load(const String& urlString)
m_fillTimer.stop();
ASSERT(m_pipeline);
- setPlaybinURL(url);
setVisibleInViewport(player->isVisibleInViewport());
+ setPlaybinURL(url);
GST_DEBUG_OBJECT(pipeline(), "preload: %s", convertEnumerationToString(m_preload).utf8().data());
if (m_preload == MediaPlayer::Preload::None && !isMediaSource()) {
@@ -4027,18 +4027,10 @@ void MediaPlayerPrivateGStreamer::setVisibleInViewport(bool isVisible)
if (!isVisible) {
GstState currentState;
gst_element_get_state(m_pipeline.get(), &currentState, nullptr, 0);
- // WebKitMediaSrc cannot properly handle PAUSED -> READY -> PAUSED currently, so we have to avoid transitioning
- // back to READY when the player becomes visible.
- GstState minimumState = isMediaSource() ? GST_STATE_PAUSED : GST_STATE_READY;
- if (currentState >= minimumState)
+ if (currentState > GST_STATE_NULL)
m_invisiblePlayerState = currentState;
m_isVisibleInViewport = false;
- // Avoid setting the pipeline to PAUSED unless the playbin URL has already been set,
- // otherwise it will fail, and may leave the pipeline stuck on READY with PAUSE pending.
- if (!m_url.isValid())
- return;
- [[maybe_unused]] auto setStateResult = gst_element_set_state(m_pipeline.get(), GST_STATE_PAUSED);
- ASSERT(setStateResult != GST_STATE_CHANGE_FAILURE);
+ gst_element_set_state(m_pipeline.get(), GST_STATE_PAUSED);
} else {
m_isVisibleInViewport = true;
if (m_invisiblePlayerState != GST_STATE_VOID_PENDING)