Update to 2.52.3

Resolves: RHEL-157522
Resolves: RHEL-157538
Resolves: RHEL-157595
Resolves: RHEL-157609
Resolves: RHEL-157623
Resolves: RHEL-157638
Resolves: RHEL-157652
Resolves: RHEL-157666
Resolves: RHEL-157682
Resolves: RHEL-157696
Resolves: RHEL-157710
Resolves: RHEL-162720
Resolves: RHEL-162734
Resolves: RHEL-162749
Resolves: RHEL-162763
Resolves: RHEL-162777
Resolves: RHEL-162791
Resolves: RHEL-162805
This commit is contained in:
Michael Catanzaro 2026-04-22 12:30:18 -05:00
parent db8b44454e
commit 32c010cd2e
13 changed files with 3853 additions and 245 deletions

329
aarch64-build.patch Normal file
View File

@ -0,0 +1,329 @@
From a98fdf70489a743d3ee98f91758e043ffee9f9ca Mon Sep 17 00:00:00 2001
From: Shu-yu Guo <syg@apple.com>
Date: Fri, 17 Apr 2026 16:10:11 -0500
Subject: [PATCH] Cherry-pick 7cda001308f2.
https://bugs.webkit.org/show_bug.cgi?id=306638
[JSC] Fix !ENABLE(JIT) build
https://bugs.webkit.org/show_bug.cgi?id=306638
rdar://169822205
Reviewed by NOBODY (OOPS!).
* Source/JavaScriptCore/jit/ExecutableAllocator.h:
(JSC::performJITMemcpy):
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/llint/LLIntData.cpp:
(JSC::LLInt::initialize):
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
* Source/WTF/wtf/PlatformEnable.h:
---
.../JavaScriptCore/jit/ExecutableAllocator.h | 8 ++
.../llint/InPlaceInterpreter.asm | 8 +-
Source/JavaScriptCore/llint/LLIntData.cpp | 81 +++++++++++++++----
Source/JavaScriptCore/wasm/WasmCallee.cpp | 18 ++++-
Source/WTF/wtf/PlatformEnable.h | 2 +-
5 files changed, 93 insertions(+), 24 deletions(-)
diff --git a/Source/JavaScriptCore/jit/ExecutableAllocator.h b/Source/JavaScriptCore/jit/ExecutableAllocator.h
index 3e8efce28cfe..cb81579c8703 100644
--- a/Source/JavaScriptCore/jit/ExecutableAllocator.h
+++ b/Source/JavaScriptCore/jit/ExecutableAllocator.h
@@ -390,6 +390,14 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
}
+template<RepatchingInfo>
+inline void* performJITMemcpy(void *dst, const void *src, size_t n)
+{
+WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
+ return memcpy(dst, src, n);
+WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
+}
+
inline bool isJITPC(void*) { return false; }
#endif // ENABLE(JIT)
diff --git a/Source/JavaScriptCore/llint/InPlaceInterpreter.asm b/Source/JavaScriptCore/llint/InPlaceInterpreter.asm
index 64db9cdb21df..dac1faa5260a 100644
--- a/Source/JavaScriptCore/llint/InPlaceInterpreter.asm
+++ b/Source/JavaScriptCore/llint/InPlaceInterpreter.asm
@@ -420,7 +420,7 @@ end
# OSR
macro ipintPrologueOSR(increment)
-if JIT
+if WEBASSEMBLY_BBQJIT
loadp UnboxedWasmCalleeStackSlot[cfr], ws0
baddis increment, Wasm::IPIntCallee::m_tierUpCounter + Wasm::IPIntTierUpCounter::m_counter[ws0], .continue
@@ -457,11 +457,11 @@ end
if ARMv7
break # FIXME: ipint support.
end # ARMv7
-end # JIT
+end # WEBASSEMBLY_BBQJIT
end
macro ipintLoopOSR(increment)
-if JIT and not ARMv7
+if WEBASSEMBLY_BBQJIT and not ARMv7
validateOpcodeConfig(ws0)
loadp UnboxedWasmCalleeStackSlot[cfr], ws0
baddis increment, Wasm::IPIntCallee::m_tierUpCounter + Wasm::IPIntTierUpCounter::m_counter[ws0], .continue
@@ -492,7 +492,7 @@ end
end
macro ipintEpilogueOSR(increment)
-if JIT and not ARMv7
+if WEBASSEMBLY_BBQJIT and not ARMv7
loadp UnboxedWasmCalleeStackSlot[cfr], ws0
baddis increment, Wasm::IPIntCallee::m_tierUpCounter + Wasm::IPIntTierUpCounter::m_counter[ws0], .continue
diff --git a/Source/JavaScriptCore/llint/LLIntData.cpp b/Source/JavaScriptCore/llint/LLIntData.cpp
index 5d7c88f72571..2509dc4132f3 100644
--- a/Source/JavaScriptCore/llint/LLIntData.cpp
+++ b/Source/JavaScriptCore/llint/LLIntData.cpp
@@ -199,8 +199,28 @@ void initialize()
#if CPU(ARM64E)
#if ENABLE(JIT_CAGE)
- if (Options::useJITCage())
+ if (Options::useJITCage()) {
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::jitCagePtr)] = jitCagePtrThunk().code().taggedPtr();
+#if ENABLE(WEBASSEMBLY)
+ // JSPI JITCage gates
+ g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::jspiResignReturnPCs)] = jspiResignReturnPCsThunk().code().taggedPtr();
+ g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::jspiExecuteSliceEntry)] = jspiExecuteSliceEntryThunk().code().taggedPtr();
+ // jspiExitImplantedSlice is stored untagged because it's used as a return address
+ // (not as a jump target) and will be signed by JITCage with the stack pointer diversifier.
+ g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::jspiExitImplantedSlice)] = jspiExitImplantedSliceThunk().code().untaggedPtr();
+#endif // ENABLE(WEBASSEMBLY)
+ }
+#endif
+
+#if ENABLE(JIT)
+#define INITIALIZE_JS_GATE_JIT_PATH(name, tag) \
+ if (Options::useJIT()) { \
+ codeRef8.construct(createJSGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getCodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name)); \
+ codeRef16.construct(createJSGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getWide16CodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name "_wide16")); \
+ codeRef32.construct(createJSGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getWide32CodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name "_wide32")); \
+ } else
+#else
+#define INITIALIZE_JS_GATE_JIT_PATH(name, tag)
#endif
#define INITIALIZE_JS_GATE(name, tag) \
@@ -208,11 +228,7 @@ void initialize()
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef8; \
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef16; \
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef32; \
- if (Options::useJIT()) { \
- codeRef8.construct(createJSGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getCodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name)); \
- codeRef16.construct(createJSGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getWide16CodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name "_wide16")); \
- codeRef32.construct(createJSGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getWide32CodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name "_wide32")); \
- } else { \
+ INITIALIZE_JS_GATE_JIT_PATH(name, tag) { \
codeRef8.construct(LLInt::getCodeRef<NativeToJITGatePtrTag>(js_trampoline_##name)); \
codeRef16.construct(LLInt::getWide16CodeRef<NativeToJITGatePtrTag>(js_trampoline_##name)); \
codeRef32.construct(LLInt::getWide32CodeRef<NativeToJITGatePtrTag>(js_trampoline_##name)); \
@@ -226,16 +242,23 @@ void initialize()
#if ENABLE(WEBASSEMBLY)
+#if ENABLE(JIT)
+#define INITIALIZE_WASM_GATE_JIT_PATH(name, tag) \
+ if (Options::useJIT()) { \
+ codeRef8.construct(createWasmGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getCodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name)); \
+ codeRef16.construct(createWasmGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getWide16CodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name "_wide16")); \
+ codeRef32.construct(createWasmGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getWide32CodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name "_wide32")); \
+ } else
+#else
+#define INITIALIZE_WASM_GATE_JIT_PATH(name, tag)
+#endif
+
#define INITIALIZE_WASM_GATE(name, tag) \
do { \
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef8; \
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef16; \
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef32; \
- if (Options::useJIT()) { \
- codeRef8.construct(createWasmGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getCodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name)); \
- codeRef16.construct(createWasmGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getWide16CodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name "_wide16")); \
- codeRef32.construct(createWasmGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(LLInt::getWide32CodeFunctionPtr<CFunctionPtrTag>(name##_return_location)), tag, #name "_wide32")); \
- } else { \
+ INITIALIZE_WASM_GATE_JIT_PATH(name, tag) { \
codeRef8.construct(LLInt::getCodeRef<NativeToJITGatePtrTag>(wasm_trampoline_##name)); \
codeRef16.construct(LLInt::getWide16CodeRef<NativeToJITGatePtrTag>(wasm_trampoline_##name)); \
codeRef32.construct(LLInt::getWide32CodeRef<NativeToJITGatePtrTag>(wasm_trampoline_##name)); \
@@ -253,10 +276,12 @@ void initialize()
// This is key to entering the interpreter.
{
static LazyNeverDestroyed<MacroAssemblerCodeRef<VMEntryToJITGatePtrTag>> codeRef;
+#if ENABLE(JIT)
if (Options::useJIT()) {
auto gateCodeRef = createJSGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(&vmEntryToJavaScriptGateAfter), JSEntryPtrTag, "vmEntryToJavaScript");
codeRef.construct(gateCodeRef.retagged<VMEntryToJITGatePtrTag>());
} else
+#endif
codeRef.construct(MacroAssemblerCodeRef<VMEntryToJITGatePtrTag>::createSelfManagedCodeRef(CodePtr<VMEntryToJITGatePtrTag>::fromTaggedPtr(retagCodePtr<void*, CFunctionPtrTag, VMEntryToJITGatePtrTag>(&vmEntryToJavaScriptTrampoline))));
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::vmEntryToJavaScript)] = codeRef.get().code().taggedPtr();
}
@@ -268,79 +293,103 @@ void initialize()
{
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef;
+#if ENABLE(JIT)
if (Options::useJIT())
codeRef.construct(createTailCallGate(JSEntryPtrTag, true));
else
+#endif
codeRef.construct(MacroAssemblerCodeRef<NativeToJITGatePtrTag>::createSelfManagedCodeRef(CodePtr<NativeToJITGatePtrTag>::fromTaggedPtr(retagCodePtr<void*, CFunctionPtrTag, NativeToJITGatePtrTag>(&tailCallJSEntryTrampoline))));
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::tailCallJSEntryPtrTag)]= codeRef.get().code().taggedPtr();
}
{
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef;
+#if ENABLE(JIT)
if (Options::useJIT())
codeRef.construct(createTailCallGate(JSEntryPtrTag, true));
else
+#endif
codeRef.construct(MacroAssemblerCodeRef<NativeToJITGatePtrTag>::createSelfManagedCodeRef(CodePtr<NativeToJITGatePtrTag>::fromTaggedPtr(retagCodePtr<void*, CFunctionPtrTag, NativeToJITGatePtrTag>(&tailCallJSEntrySlowPathTrampoline))));
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::tailCallJSEntrySlowPathPtrTag)] = codeRef.get().code().taggedPtr();
}
{
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef;
+#if ENABLE(JIT)
if (Options::useJIT())
codeRef.construct(createTailCallGate(JSEntryPtrTag, false));
else
+#endif
codeRef.construct(MacroAssemblerCodeRef<NativeToJITGatePtrTag>::createSelfManagedCodeRef(CodePtr<NativeToJITGatePtrTag>::fromTaggedPtr(retagCodePtr<void*, CFunctionPtrTag, NativeToJITGatePtrTag>(&tailCallWithoutUntagJSEntryTrampoline))));
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::tailCallWithoutUntagJSEntryPtrTag)]= codeRef.get().code().taggedPtr();
}
{
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef;
+#if ENABLE(JIT)
if (Options::useJIT())
codeRef.construct(createWasmTailCallGate(WasmEntryPtrTag));
else
+#endif
codeRef.construct(MacroAssemblerCodeRef<NativeToJITGatePtrTag>::createSelfManagedCodeRef(CodePtr<NativeToJITGatePtrTag>::fromTaggedPtr(retagCodePtr<void*, CFunctionPtrTag, NativeToJITGatePtrTag>(&wasmTailCallTrampoline))));
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::wasmTailCallWasmEntryPtrTag)]= codeRef.get().code().taggedPtr();
}
{
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef;
+#if ENABLE(JIT)
if (Options::useJIT())
codeRef.construct(createWasmTailCallGate(WasmEntryPtrTag));
else
+#endif
codeRef.construct(MacroAssemblerCodeRef<NativeToJITGatePtrTag>::createSelfManagedCodeRef(CodePtr<NativeToJITGatePtrTag>::fromTaggedPtr(retagCodePtr<void*, CFunctionPtrTag, NativeToJITGatePtrTag>(&wasmTailCallTrampoline))));
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::wasmIPIntTailCallWasmEntryPtrTag)]= codeRef.get().code().taggedPtr();
}
{
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef;
+#if ENABLE(JIT)
if (Options::useJIT())
codeRef.construct(exceptionHandlerGateThunk());
else
+#endif
codeRef.construct(MacroAssemblerCodeRef<NativeToJITGatePtrTag>::createSelfManagedCodeRef(CodePtr<NativeToJITGatePtrTag>::fromTaggedPtr(retagCodePtr<void*, CFunctionPtrTag, NativeToJITGatePtrTag>(&exceptionHandlerTrampoline))));
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::exceptionHandler)] = codeRef.get().code().taggedPtr();
}
{
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> codeRef;
+#if ENABLE(JIT)
if (Options::useJIT())
codeRef.construct(returnFromLLIntGateThunk());
else
+#endif
codeRef.construct(MacroAssemblerCodeRef<NativeToJITGatePtrTag>::createSelfManagedCodeRef(CodePtr<NativeToJITGatePtrTag>::fromTaggedPtr(retagCodePtr<void*, CFunctionPtrTag, NativeToJITGatePtrTag>(&returnFromLLIntTrampoline))));
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::returnFromLLInt)] = codeRef.get().code().taggedPtr();
}
+#if ENABLE(JIT)
if (Options::useJIT()) {
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::loopOSREntry)] = loopOSREntryGateThunk().code().taggedPtr();
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::entryOSREntry)] = entryOSREntryGateThunk().code().taggedPtr();
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::wasmOSREntry)] = wasmOSREntryGateThunk().code().taggedPtr();
- } else {
+ } else
+#endif
+ {
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::loopOSREntry)] = LLInt::getCodeRef<NativeToJITGatePtrTag>(loop_osr_entry_gate).code().taggedPtr();
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::entryOSREntry)] = nullptr;
g_jscConfig.llint.gateMap[static_cast<unsigned>(Gate::wasmOSREntry)] = nullptr;
}
+#if ENABLE(JIT)
+#define INITIALIZE_TAG_AND_UNTAG_THUNKS_JIT_PATH(name) \
+ if (Options::useJIT()) { \
+ tagCodeRef.construct(tagGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(name##TagGateAfter))); \
+ untagCodeRef.construct(untagGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(name##UntagGateAfter))); \
+ } else
+#else
+#define INITIALIZE_TAG_AND_UNTAG_THUNKS_JIT_PATH(name)
+#endif
+
#define INITIALIZE_TAG_AND_UNTAG_THUNKS(name) \
do { \
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> tagCodeRef; \
static LazyNeverDestroyed<MacroAssemblerCodeRef<NativeToJITGatePtrTag>> untagCodeRef; \
- if (Options::useJIT()) { \
- tagCodeRef.construct(tagGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(name##TagGateAfter))); \
- untagCodeRef.construct(untagGateThunk(retagCodePtr<void*, CFunctionPtrTag, OperationPtrTag>(name##UntagGateAfter))); \
- } else { \
+ INITIALIZE_TAG_AND_UNTAG_THUNKS_JIT_PATH(name) { \
tagCodeRef.construct(LLInt::getCodeRef<NativeToJITGatePtrTag>(js_trampoline_##name##_tag)); \
untagCodeRef.construct(LLInt::getCodeRef<NativeToJITGatePtrTag>(js_trampoline_##name##_untag)); \
} \
diff --git a/Source/JavaScriptCore/wasm/WasmCallee.cpp b/Source/JavaScriptCore/wasm/WasmCallee.cpp
index 94a845ab47e4..b689f00143ab 100644
--- a/Source/JavaScriptCore/wasm/WasmCallee.cpp
+++ b/Source/JavaScriptCore/wasm/WasmCallee.cpp
@@ -55,13 +55,25 @@ WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(Callee);
WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(JITCallee);
WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(JSToWasmCallee);
WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(WasmToJSCallee);
+WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(IPIntCallee);
+WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(WasmBuiltinCallee);
+
+#if ENABLE(JIT)
WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(JSToWasmICCallee);
+#endif
+
+#if ENABLE(WEBASSEMBLY_BBQJIT) || ENABLE(WEBASSEMBLY_OMGJIT)
WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(OptimizingJITCallee);
+#endif
+
+#if ENABLE(WEBASSEMBLY_BBQJIT)
+WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(BBQCallee);
+#endif
+
+#if ENABLE(WEBASSEMBLY_OMGJIT)
WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(OMGCallee);
WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(OMGOSREntryCallee);
-WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(BBQCallee);
-WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(IPIntCallee);
-WTF_MAKE_COMPACT_TZONE_ALLOCATED_IMPL(WasmBuiltinCallee);
+#endif
Callee::Callee(Wasm::CompilationMode compilationMode)
: NativeCallee(NativeCallee::Category::Wasm, ImplementationVisibility::Private)
diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
index 9c20eb45de48..1561e5ecc85a 100644
--- a/Source/WTF/wtf/PlatformEnable.h
+++ b/Source/WTF/wtf/PlatformEnable.h
@@ -1006,7 +1006,7 @@
#define ENABLE_JIT_OPERATION_DISASSEMBLY 1
#endif
-#if CPU(ARM64E)
+#if CPU(ARM64E) && ENABLE(JIT)
#define ENABLE_JIT_SIGN_ASSEMBLER_BUFFER 1
#endif
--
2.53.0

View File

@ -1,4 +1,4 @@
From 35146c99cad7f842666d9123113936ec89388261 Mon Sep 17 00:00:00 2001
From a36c4b810651f0c4a66142514da0acc338995431 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Tue, 23 Sep 2025 15:47:39 -0500
Subject: [PATCH] Build against cairo 1.15
@ -8,19 +8,19 @@ Subject: [PATCH] Build against cairo 1.15
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
index 5222f5ea81ab..77ec61c954c0 100644
index a70213b2edf5..eea6eb87ad4b 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -9,7 +9,7 @@ set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string")
# Update Source/WTF/wtf/Platform.h to match required GLib versions.
find_package(GLIB 2.70.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
find_package(GLib 2.56.0 REQUIRED COMPONENTS GioUnix Thread Module)
-find_package(Cairo 1.16.0 REQUIRED)
+find_package(Cairo 1.14.0 REQUIRED)
find_package(LibGcrypt 1.7.0 REQUIRED)
find_package(Libtasn1 REQUIRED)
find_package(HarfBuzz 2.7.4 REQUIRED COMPONENTS ICU)
@@ -132,7 +132,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_THUNDER PRIVATE ${ENABLE_DEVELOPER_MODE}
find_package(Soup3 3.0.0 REQUIRED)
find_package(Tasn1 REQUIRED)
@@ -134,7 +134,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_THUNDER PRIVATE ${ENABLE_DEVELOPER_MODE}
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PERIODIC_MEMORY_MONITOR PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_POINTER_LOCK PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SHAREABLE_RESOURCE PRIVATE ON)
@ -30,5 +30,5 @@ index 5222f5ea81ab..77ec61c954c0 100644
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CODECS PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_RTC PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
--
2.51.0
2.53.0

View File

@ -1,4 +1,4 @@
From f3dd0fe388842a7cb35266b4b0b79cfb4ef930c4 Mon Sep 17 00:00:00 2001
From ee1a6eb354e881e211b7004e465828a669be5156 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Tue, 23 Sep 2025 15:46:28 -0500
Subject: [PATCH] Suppress some build warnings
@ -21,10 +21,10 @@ index 7ea8f0469ad7..13a9e390643a 100644
-Wno-unused-parameter
)
diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake
index 77a292fb8b15..f6648c39c4e0 100644
index 7eb24e774b40..fe7eedd20507 100644
--- a/Source/cmake/WebKitCompilerFlags.cmake
+++ b/Source/cmake/WebKitCompilerFlags.cmake
@@ -129,11 +129,6 @@ if (DEVELOPER_MODE AND DEVELOPER_MODE_FATAL_WARNINGS)
@@ -130,11 +130,6 @@ if (DEVELOPER_MODE AND DEVELOPER_MODE_FATAL_WARNINGS)
else ()
set(FATAL_WARNINGS_FLAG -Werror)
endif ()
@ -36,9 +36,9 @@ index 77a292fb8b15..f6648c39c4e0 100644
endif ()
if (DEVELOPER_MODE OR ARM)
@@ -186,8 +181,7 @@ if (COMPILER_IS_GCC_OR_CLANG)
-Wno-misleading-indentation
-Wno-psabi)
@@ -188,8 +183,7 @@ if (COMPILER_IS_GCC_OR_CLANG)
-Wno-psabi
-Wno-nullability-completeness)
- # GCC < 12.0 gives false warnings for mismatched-new-delete <https://webkit.org/b/241516>
- if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0.0"))
@ -47,5 +47,5 @@ index 77a292fb8b15..f6648c39c4e0 100644
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-uninitialized)
endif ()
--
2.51.0
2.53.0

View File

@ -1,4 +1,4 @@
From 01c16493deb6dab8e04adfcdd244aaad3067d434 Mon Sep 17 00:00:00 2001
From 2de7d9e8776e5c49b889c8eaeec49f53e62f55b8 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Tue, 7 Oct 2025 11:19:06 -0500
Subject: [PATCH] Suppress warning about WEBKIT_FORCE_SANDBOX for Evolution
@ -8,10 +8,10 @@ Subject: [PATCH] Suppress warning about WEBKIT_FORCE_SANDBOX for Evolution
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
index 044ddc0c3e95..a953dda3dcb8 100644
index 329dbe6a0281..80b9609a47be 100644
--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
+++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
@@ -155,7 +155,8 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
@@ -154,7 +154,8 @@ void WebProcessPool::platformInitialize(NeedsGlobalStaticInitialization)
else {
static bool once = false;
if (!once) {
@ -22,5 +22,5 @@ index 044ddc0c3e95..a953dda3dcb8 100644
}
}
--
2.51.0
2.53.0

View File

@ -1,4 +1,4 @@
From 5fd4924b8d61545a7798be25ac9cb45c007a1795 Mon Sep 17 00:00:00 2001
From e13100155debec49c5ded3740901ac2a3c669370 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Tue, 7 Oct 2025 11:18:05 -0500
Subject: [PATCH] Use a single web process for Evolution
@ -8,19 +8,19 @@ Subject: [PATCH] Use a single web process for Evolution
1 file changed, 3 insertions(+)
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
index dca689a7ace5..b63d037a00f4 100644
index 5cbc8739a2fe..5778f7a2da72 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
@@ -457,6 +457,9 @@ static void webkitWebContextConstructed(GObject* object)
}
configuration.setTimeZoneOverride(String::fromUTF8(priv->timeZoneOverride.span()));
configuration->setTimeZoneOverride(String::fromUTF8(priv->timeZoneOverride.span()));
+ if (!g_strcmp0(g_get_prgname(), "evolution"))
+ configuration.setUsesSingleWebProcess(true);
+ configuration->setUsesSingleWebProcess(true);
+
#if !ENABLE(2022_GLIB_API)
if (!priv->websiteDataManager)
priv->websiteDataManager = adoptGRef(webkit_website_data_manager_new("local-storage-directory", priv->localStorageDirectory.data(), nullptr));
--
2.51.0
2.53.0

View File

@ -0,0 +1,28 @@
From f3a8648a0c5902b0e44c26bba1a882ff296a6c8d Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Mon, 6 Apr 2026 18:05:37 -0500
Subject: [PATCH] Make g-ir-scanner warnings nonfatal
Otherwise, the build fails whenever it sees an unrecognized annotation,
which is not great whenever WebKit starts using new annotations that do
not exist in old RHELs.
---
Source/cmake/FindGI.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/cmake/FindGI.cmake b/Source/cmake/FindGI.cmake
index 8cf372f3b172..cb724a418020 100644
--- a/Source/cmake/FindGI.cmake
+++ b/Source/cmake/FindGI.cmake
@@ -342,7 +342,7 @@ function(GI_INTROSPECT namespace nsversion header)
VERBATIM
COMMAND_EXPAND_LISTS
COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS}"
- "${GI_SCANNER_EXE}" --quiet --warn-all --warn-error --no-libtool
+ "${GI_SCANNER_EXE}" --quiet --warn-all --no-libtool
"--output=${gir_path}"
"--library=$<TARGET_FILE_BASE_NAME:${opt_TARGET}>"
"--library-path=$<TARGET_FILE_DIR:${opt_TARGET}>"
--
2.53.0

View File

@ -1,49 +1,42 @@
From b668f6fc8731b55105a49e72faf266a90d8e65ac Mon Sep 17 00:00:00 2001
From faa96c8ff6fa906beaa5daf8e36bc1f865a9cf66 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Fri, 4 Apr 2025 13:58:05 -0500
Subject: [PATCH] Build against GLib 2.56
---
Source/WTF/wtf/Platform.h | 2 --
Source/WTF/wtf/URL.h | 4 ++--
Source/WTF/wtf/glib/GRefPtr.h | 2 ++
Source/WTF/wtf/glib/SocketConnection.cpp | 13 ++++++++++++-
Source/WTF/wtf/glib/URLGLib.cpp | 2 ++
Source/WebCore/platform/LowPowerModeNotifier.h | 2 ++
.../platform/glib/LowPowerModeNotifierGLib.cpp | 8 ++++++++
.../platform/network/soup/CertificateInfoSoup.cpp | 8 ++++++++
Source/WebKit/NetworkProcess/glib/DNSCache.cpp | 12 ++++++++++++
Source/WebKit/NetworkProcess/glib/DNSCache.h | 2 ++
.../NetworkProcess/glib/WebKitCachedResolver.cpp | 6 ++++++
.../glib/WebKitOverridingResolver.cpp | 4 ++++
Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp | 6 ++++++
Source/cmake/OptionsGTK.cmake | 14 ++++++++++++--
Tools/MiniBrowser/gtk/BrowserSettingsDialog.c | 3 ++-
Tools/MiniBrowser/gtk/main.c | 3 ++-
16 files changed, 82 insertions(+), 9 deletions(-)
Source/WTF/wtf/Platform.h | 2 +-
Source/WTF/wtf/URL.h | 4 ++--
Source/WTF/wtf/glib/GRefPtr.h | 2 ++
Source/WTF/wtf/glib/SocketConnection.cpp | 13 ++++++++++++-
Source/WTF/wtf/glib/URLGLib.cpp | 2 ++
Source/WebCore/platform/LowPowerModeNotifier.h | 2 ++
.../platform/glib/LowPowerModeNotifierGLib.cpp | 8 ++++++++
.../platform/network/soup/CertificateInfoSoup.cpp | 8 ++++++++
Source/WebKit/NetworkProcess/glib/DNSCache.cpp | 12 ++++++++++++
Source/WebKit/NetworkProcess/glib/DNSCache.h | 2 ++
.../NetworkProcess/glib/WebKitCachedResolver.cpp | 6 ++++++
.../glib/WebKitOverridingResolver.cpp | 4 ++++
Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp | 6 ++++++
Source/cmake/OptionsGTK.cmake | 7 ++++++-
Tools/MiniBrowser/gtk/BrowserSettingsDialog.c | 3 ++-
Tools/MiniBrowser/gtk/main.c | 3 ++-
16 files changed, 77 insertions(+), 7 deletions(-)
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index cbb81ce6c8dc..46cbad83fe4e 100644
index 0c3ba74482f6..57a1b5126290 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -84,7 +84,6 @@
@@ -92,7 +92,7 @@
#if PLATFORM(GTK)
#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_56
-#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_70
#if USE(GTK4)
#define GDK_VERSION_MIN_REQUIRED GDK_VERSION_4_0
#else
@@ -94,7 +93,6 @@
#if PLATFORM(WPE)
#if USE(GLIB)
#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_56
-#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_70
+#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_56
#endif
#if USE(SOUP)
#if PLATFORM(GTK)
diff --git a/Source/WTF/wtf/URL.h b/Source/WTF/wtf/URL.h
index daa9f726eb0c..a24c68e1934b 100644
index 677314b5c781..f739e6df4892 100644
--- a/Source/WTF/wtf/URL.h
+++ b/Source/WTF/wtf/URL.h
@@ -27,7 +27,7 @@
@ -65,10 +58,10 @@ index daa9f726eb0c..a24c68e1934b 100644
WTF_EXPORT_PRIVATE GRefPtr<GUri> createGUri() const;
#endif
diff --git a/Source/WTF/wtf/glib/GRefPtr.h b/Source/WTF/wtf/glib/GRefPtr.h
index e4cf3bd45104..9729d6709376 100644
index 46d25f00cc69..d3a764808a6f 100644
--- a/Source/WTF/wtf/glib/GRefPtr.h
+++ b/Source/WTF/wtf/glib/GRefPtr.h
@@ -328,7 +328,9 @@ WTF_DEFINE_GREF_TRAITS_INLINE(GMainLoop, g_main_loop_ref, g_main_loop_unref)
@@ -329,7 +329,9 @@ WTF_DEFINE_GREF_TRAITS_INLINE(GMainLoop, g_main_loop_ref, g_main_loop_unref)
WTF_DEFINE_GREF_TRAITS_INLINE(GMappedFile, g_mapped_file_ref, g_mapped_file_unref)
WTF_DEFINE_GREF_TRAITS_INLINE(GPtrArray, g_ptr_array_ref, g_ptr_array_unref)
WTF_DEFINE_GREF_TRAITS_INLINE(GSource, g_source_ref, g_source_unref)
@ -79,10 +72,10 @@ index e4cf3bd45104..9729d6709376 100644
WTF_DEFINE_GREF_TRAITS_INLINE(GVariant, g_variant_ref_sink, g_variant_unref, g_variant_is_floating)
diff --git a/Source/WTF/wtf/glib/SocketConnection.cpp b/Source/WTF/wtf/glib/SocketConnection.cpp
index d28e6dbd67f6..c98362e85f09 100644
index b74955924938..4ea234a93c30 100644
--- a/Source/WTF/wtf/glib/SocketConnection.cpp
+++ b/Source/WTF/wtf/glib/SocketConnection.cpp
@@ -165,7 +165,18 @@ bool SocketConnection::readMessage()
@@ -166,7 +166,18 @@ bool SocketConnection::readMessage()
GRefPtr<GVariant> parameters;
if (!it->value.first.isNull()) {
GUniquePtr<GVariantType> variantType(g_variant_type_new(it->value.first.data()));
@ -138,7 +131,7 @@ index c8f2051d77f6..e2ea0dae3292 100644
#endif
};
diff --git a/Source/WebCore/platform/glib/LowPowerModeNotifierGLib.cpp b/Source/WebCore/platform/glib/LowPowerModeNotifierGLib.cpp
index e083cc66934e..7c0f55d089e6 100644
index c9bf6a774f49..546a974075c6 100644
--- a/Source/WebCore/platform/glib/LowPowerModeNotifierGLib.cpp
+++ b/Source/WebCore/platform/glib/LowPowerModeNotifierGLib.cpp
@@ -28,10 +28,13 @@ namespace WebCore {
@ -146,7 +139,7 @@ index e083cc66934e..7c0f55d089e6 100644
LowPowerModeNotifier::LowPowerModeNotifier(LowPowerModeChangeCallback&& callback)
+#if GLIB_CHECK_VERSION(2, 69, 1)
: m_callback(WTFMove(callback))
: m_callback(WTF::move(callback))
, m_powerProfileMonitor(adoptGRef(g_power_profile_monitor_dup_default()))
, m_lowPowerModeEnabled(g_power_profile_monitor_get_power_saver_enabled(m_powerProfileMonitor.get()))
+#endif
@ -173,7 +166,7 @@ index e083cc66934e..7c0f55d089e6 100644
bool LowPowerModeNotifier::isLowPowerModeEnabled() const
diff --git a/Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp b/Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp
index f32ecca7a300..e81a5433709d 100644
index fb5773d56767..bc10fda05f78 100644
--- a/Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp
+++ b/Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp
@@ -73,9 +73,11 @@ CertificateInfo CertificateInfo::isolatedCopy() const
@ -218,7 +211,7 @@ index f32ecca7a300..e81a5433709d 100644
} // namespace WebCore
diff --git a/Source/WebKit/NetworkProcess/glib/DNSCache.cpp b/Source/WebKit/NetworkProcess/glib/DNSCache.cpp
index a560e73f58a3..78007d891af1 100644
index 5ecfdc770d9b..38911a681028 100644
--- a/Source/WebKit/NetworkProcess/glib/DNSCache.cpp
+++ b/Source/WebKit/NetworkProcess/glib/DNSCache.cpp
@@ -50,9 +50,17 @@ DNSCache::DNSCacheMap& DNSCache::mapForType(Type type)
@ -261,10 +254,10 @@ index a560e73f58a3..78007d891af1 100644
} // namespace WebKit
diff --git a/Source/WebKit/NetworkProcess/glib/DNSCache.h b/Source/WebKit/NetworkProcess/glib/DNSCache.h
index 6aa530f44321..49aded549588 100644
index 30332200b7ec..f0b6ac73389b 100644
--- a/Source/WebKit/NetworkProcess/glib/DNSCache.h
+++ b/Source/WebKit/NetworkProcess/glib/DNSCache.h
@@ -65,8 +65,10 @@ private:
@@ -64,8 +64,10 @@ private:
Lock m_lock;
DNSCacheMap m_dnsMap WTF_GUARDED_BY_LOCK(m_lock);
@ -276,7 +269,7 @@ index 6aa530f44321..49aded549588 100644
};
diff --git a/Source/WebKit/NetworkProcess/glib/WebKitCachedResolver.cpp b/Source/WebKit/NetworkProcess/glib/WebKitCachedResolver.cpp
index 2752ff9cfc2c..7804e8b7a588 100644
index 27399475ab7a..10f189484a2f 100644
--- a/Source/WebKit/NetworkProcess/glib/WebKitCachedResolver.cpp
+++ b/Source/WebKit/NetworkProcess/glib/WebKitCachedResolver.cpp
@@ -67,7 +67,9 @@ static Vector<GRefPtr<GInetAddress>> addressListGListToVector(GList* addressList
@ -318,7 +311,7 @@ index 2752ff9cfc2c..7804e8b7a588 100644
resolverClass->lookup_by_address_async = webkitCachedResolverLookupByAddressAsync;
resolverClass->lookup_by_address_finish = webkitCachedResolverLookupByAddressFinish;
diff --git a/Source/WebKit/NetworkProcess/glib/WebKitOverridingResolver.cpp b/Source/WebKit/NetworkProcess/glib/WebKitOverridingResolver.cpp
index 150d74ed0296..f461e3c695fe 100644
index c09d90cbd1dc..76a9ae84fb7e 100644
--- a/Source/WebKit/NetworkProcess/glib/WebKitOverridingResolver.cpp
+++ b/Source/WebKit/NetworkProcess/glib/WebKitOverridingResolver.cpp
@@ -90,6 +90,7 @@ static GList* webkitOverridingResolverLookupByNameFinish(GResolver* resolver, GA
@ -350,7 +343,7 @@ index 150d74ed0296..f461e3c695fe 100644
resolverClass->lookup_by_address_async = webkitOverridingResolverLookupByAddressAsync;
resolverClass->lookup_by_address_finish = webkitOverridingResolverLookupByAddressFinish;
diff --git a/Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp b/Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp
index a9ee8507c28a..eae6ab798c8f 100644
index 6112a107f99a..b569c48de5ba 100644
--- a/Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp
+++ b/Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp
@@ -121,11 +121,13 @@ void ArgumentCoder<GRefPtr<GTlsCertificate>>::encode(Encoder& encoder, const GRe
@ -395,33 +388,19 @@ index a9ee8507c28a..eae6ab798c8f 100644
issuer = certificate.get();
i++;
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
index 4522ffdd9f36..0f25e3eae2e1 100644
index a5ebd3e3d879..ce1791f7a470 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -7,8 +7,6 @@ SET_PROJECT_VERSION(2 50 3)
@@ -8,7 +8,7 @@ SET_PROJECT_VERSION(2 52 3)
set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string")
-# Update Source/WTF/wtf/Platform.h to match required GLib versions.
-find_package(GLIB 2.70.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
find_package(Cairo 1.14.0 REQUIRED)
# Update Source/WTF/wtf/Platform.h to match required GLib versions.
-find_package(GLib 2.70.0 REQUIRED COMPONENTS GioUnix Thread Module)
+find_package(GLib 2.56.0 REQUIRED COMPONENTS GioUnix Thread Module)
find_package(Cairo 1.16.0 REQUIRED)
find_package(LibGcrypt 1.7.0 REQUIRED)
find_package(Libtasn1 REQUIRED)
@@ -207,6 +205,13 @@ else ()
SET_AND_EXPOSE_TO_BUILD(ENABLE_2022_GLIB_API OFF)
endif ()
+if (ENABLE_2022_GLIB_API)
+ set(GLIB_MINIMUM_VERSION 2.70.0)
+else ()
+ set(GLIB_MINIMUM_VERSION 2.56.4)
+endif ()
+find_package(GLIB ${GLIB_MINIMUM_VERSION} REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
+
EXPOSE_STRING_VARIABLE_TO_BUILD(WEBKITGTK_API_INFIX)
EXPOSE_STRING_VARIABLE_TO_BUILD(WEBKITGTK_API_VERSION)
@@ -277,6 +282,11 @@ if (ENABLED_COMPILER_SANITIZERS)
find_package(Soup3 3.0.0 REQUIRED)
@@ -258,6 +258,11 @@ if (ENABLED_COMPILER_SANITIZERS)
set(ENABLE_DOCUMENTATION OFF)
endif ()
@ -473,5 +452,5 @@ index d3fbb968ee46..4f49ad82f9fd 100644
}
--
2.52.0
2.53.0

View File

@ -1,25 +1,26 @@
From f083d6f8d80c919d185c1b3f77a2bdd705816a2e Mon Sep 17 00:00:00 2001
From 757b61bda6fa34c3bd2de45eeccc976b10c5b035 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Fri, 4 Apr 2025 14:00:12 -0500
Subject: [PATCH] Build against GStreamer 1.16
---
.../AudioSourceProviderGStreamer.cpp | 3 +-
.../gstreamer/GLVideoSinkGStreamer.cpp | 35 ++++-----
.../gstreamer/GLVideoSinkGStreamer.cpp | 36 ++++----
.../gstreamer/GStreamerAudioMixer.cpp | 2 +-
.../graphics/gstreamer/GStreamerCommon.cpp | 78 +++++++++++++------
.../graphics/gstreamer/GStreamerCommon.cpp | 82 +++++++++++++------
.../graphics/gstreamer/GStreamerCommon.h | 15 ++++
.../gstreamer/MediaPlayerPrivateGStreamer.cpp | 23 +-----
.../gstreamer/GStreamerCodecUtilities.cpp | 39 ++++++----
.../gstreamer/MediaPlayerPrivateGStreamer.cpp | 30 +------
.../CoordinatedPlatformLayerBufferVideo.cpp | 14 +---
.../gstreamer/GStreamerCodecUtilities.cpp | 39 +++++----
.../VideoEncoderPrivateGStreamer.cpp | 16 ----
Source/cmake/GStreamerChecks.cmake | 4 +-
9 files changed, 114 insertions(+), 101 deletions(-)
10 files changed, 121 insertions(+), 120 deletions(-)
diff --git a/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp b/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
index acee31b1cc4e..e54adb748f98 100644
index 33037a80b0ca..20c3cdc80b31 100644
--- a/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
+++ b/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
@@ -125,7 +125,8 @@ AudioSourceProviderGStreamer::AudioSourceProviderGStreamer(MediaStreamTrackPriva
@@ -141,7 +141,8 @@ AudioSourceProviderGStreamer::AudioSourceProviderGStreamer(MediaStreamTrackPriva
g_signal_connect_swapped(decodebin, "pad-added", G_CALLBACK(+[](AudioSourceProviderGStreamer* provider, GstPad* pad) {
auto padCaps = adoptGRef(gst_pad_query_caps(pad, nullptr));
bool isAudio = doCapsHaveType(padCaps.get(), "audio"_s);
@ -30,28 +31,32 @@ index acee31b1cc4e..e54adb748f98 100644
auto sinkPad = adoptGRef(gst_element_get_static_pad(provider->m_audioSinkBin.get(), "sink"));
gst_pad_link(pad, sinkPad.get());
diff --git a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
index 056f6ca71eb7..87d081cf1e6b 100644
index f247b617d9c3..eadb3b0e97ba 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
@@ -67,16 +67,7 @@ static bool s_isDMABufDisabled;
@@ -70,20 +70,10 @@ WEBKIT_DEFINE_TYPE_WITH_CODE(WebKitGLVideoSink, webkit_gl_video_sink, GST_TYPE_B
GST_DEBUG_CATEGORY_INIT(webkit_gl_video_sink_debug, "webkitglvideosink", 0, "GL video sink element"))
#if USE(GBM)
-static bool s_isDMABufDisabled;
+static bool s_isDMABufDisabled = true;
static void initializeDMABufAvailability()
{
- static std::once_flag onceFlag;
- std::call_once(onceFlag, [] {
- if (!webkitGstCheckVersion(1, 20, 0))
- if (!gst_check_version(1, 20, 0))
- return;
-
- auto value = unsafeSpan(g_getenv("WEBKIT_GST_DMABUF_SINK_DISABLED"));
- s_isDMABufDisabled = value.data() && (equalLettersIgnoringASCIICase(value, "true"_s) || equalLettersIgnoringASCIICase(value, "1"_s));
- auto value = CStringView::unsafeFromUTF8(g_getenv("WEBKIT_GST_DMABUF_SINK_DISABLED"));
- s_isDMABufDisabled = !value.isEmpty() && (equalLettersIgnoringASCIICase(value.span(), "true"_s) || equalLettersIgnoringASCIICase(value.span(), "1"_s));
- if (!s_isDMABufDisabled && !DRMDeviceManager::singleton().mainGBMDevice(DRMDeviceManager::NodeType::Render))
- s_isDMABufDisabled = true;
- });
+ s_isDMABufDisabled = true;
}
#endif
@@ -119,7 +110,19 @@ static void webKitGLVideoSinkConstructed(GObject* object)
@@ -129,7 +119,19 @@ static void webKitGLVideoSinkConstructed(GObject* object)
if (!s_isDMABufDisabled)
gst_caps_append(caps.get(), buildDMABufCaps().leakRef());
#endif
@ -72,7 +77,7 @@ index 056f6ca71eb7..87d081cf1e6b 100644
gst_caps_set_features(glCaps.get(), 0, gst_caps_features_new(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr));
gst_caps_append(caps.get(), glCaps.leakRef());
@@ -178,17 +181,11 @@ static GstStateChangeReturn webKitGLVideoSinkChangeState(GstElement* element, Gs
@@ -171,17 +173,11 @@ static GstStateChangeReturn webKitGLVideoSinkChangeState(GstElement* element, Gs
return GST_ELEMENT_CLASS(webkit_gl_video_sink_parent_class)->change_state(element, transition);
}
@ -93,7 +98,7 @@ index 056f6ca71eb7..87d081cf1e6b 100644
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, paramSpec);
RELEASE_ASSERT_NOT_REACHED();
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp
index c982bcf51e01..01190fe89f9e 100644
index afbe4777dbc7..d414525f0cb6 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp
@@ -32,7 +32,7 @@ GST_DEBUG_CATEGORY_STATIC(webkit_media_gst_audio_mixer_debug);
@ -106,10 +111,10 @@ index c982bcf51e01..01190fe89f9e 100644
GStreamerAudioMixer& GStreamerAudioMixer::singleton()
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
index 419190b917b5..c7b0dacfc117 100644
index a78ef36c5eec..de77a6ef4760 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
@@ -136,6 +136,25 @@ WARN_UNUSED_RETURN GstPad* webkitGstGhostPadFromStaticTemplate(GstStaticPadTempl
@@ -137,6 +137,25 @@ static GstClockTime s_webkitGstInitTime;
}
#if ENABLE(VIDEO)
@ -135,7 +140,7 @@ index 419190b917b5..c7b0dacfc117 100644
bool getVideoSizeAndFormatFromCaps(const GstCaps* caps, WebCore::IntSize& size, GstVideoFormat& format, int& pixelAspectRatioNumerator, int& pixelAspectRatioDenominator, int& stride, double& frameRate, PlatformVideoColorSpace& colorSpace)
{
if (!doCapsHaveType(caps, GST_VIDEO_CAPS_TYPE_PREFIX)) {
@@ -695,31 +714,6 @@ void deinitializeGStreamer()
@@ -725,31 +744,6 @@ void deinitializeGStreamer()
teardownVideoEncoderSingleton();
teardownGStreamerImageDecoders();
#endif
@ -144,7 +149,7 @@ index 419190b917b5..c7b0dacfc117 100644
- auto activeTracers = gst_tracing_get_active_tracers();
- while (activeTracers) {
- auto tracer = adoptGRef(GST_TRACER_CAST(activeTracers->data));
- if (!isLeaksTracerActive && !g_strcmp0(G_OBJECT_TYPE_NAME(G_OBJECT(tracer.get())), "GstLeaksTracer"))
- if (!isLeaksTracerActive && equal(unsafeSpan(G_OBJECT_TYPE_NAME(G_OBJECT(tracer.get()))), "GstLeaksTracer"_s))
- isLeaksTracerActive = true;
- activeTracers = g_list_delete_link(activeTracers, activeTracers);
- }
@ -166,8 +171,26 @@ index 419190b917b5..c7b0dacfc117 100644
- gst_deinit();
}
unsigned getGstPlayFlag(const char* nick)
@@ -1495,6 +1489,36 @@ String gstStructureToJSONString(const GstStructure* structure)
unsigned getGstPlayFlag(ASCIILiteral nick)
@@ -839,7 +833,7 @@ GstMappedFrame::GstMappedFrame(const GRefPtr<GstSample>& sample, GstMapFlags fla
return;
gst_video_alignment_reset(&m_alignment);
- gst_video_info_align_full(&info, &m_alignment, m_planeSizes.data());
+ gst_video_info_align(&info, &m_alignment);
}
GstMappedFrame::~GstMappedFrame()
@@ -918,6 +912,8 @@ int GstMappedFrame::planeStride(uint32_t planeIndex) const
return GST_VIDEO_FRAME_PLANE_STRIDE(&m_frame, planeIndex);
}
+#define GST_VIDEO_INFO_PLANE_HEIGHT(i,p,sizes) ((i)->stride[p] == 0 ? 0 : sizes[p] / (i)->stride[p])
+
size_t GstMappedFrame::planeHeight(uint32_t planeIndex) const
{
RELEASE_ASSERT(isValid());
@@ -1611,6 +1607,36 @@ String gstStructureToJSONString(const GstStructure* structure)
return value->toJSONString();
}
@ -204,7 +227,7 @@ index 419190b917b5..c7b0dacfc117 100644
GstClockTime webkitGstInitTime()
{
return s_webkitGstInitTime;
@@ -1552,6 +1576,7 @@ PlatformVideoColorSpace videoColorSpaceFromInfo(const GstVideoInfo& info)
@@ -1668,6 +1694,7 @@ PlatformVideoColorSpace videoColorSpaceFromInfo(const GstVideoInfo& info)
case GST_VIDEO_TRANSFER_BT709:
colorSpace.transfer = PlatformVideoTransferCharacteristics::Bt709;
break;
@ -212,7 +235,7 @@ index 419190b917b5..c7b0dacfc117 100644
case GST_VIDEO_TRANSFER_BT601:
colorSpace.transfer = PlatformVideoTransferCharacteristics::Smpte170m;
break;
@@ -1564,6 +1589,7 @@ PlatformVideoColorSpace videoColorSpaceFromInfo(const GstVideoInfo& info)
@@ -1680,6 +1707,7 @@ PlatformVideoColorSpace videoColorSpaceFromInfo(const GstVideoInfo& info)
case GST_VIDEO_TRANSFER_BT2020_10:
colorSpace.transfer = PlatformVideoTransferCharacteristics::Bt2020_10bit;
break;
@ -220,7 +243,7 @@ index 419190b917b5..c7b0dacfc117 100644
case GST_VIDEO_TRANSFER_BT2020_12:
colorSpace.transfer = PlatformVideoTransferCharacteristics::Bt2020_12bit;
break;
@@ -1682,6 +1708,7 @@ void fillVideoInfoColorimetryFromColorSpace(GstVideoInfo* info, const PlatformVi
@@ -1798,6 +1826,7 @@ void fillVideoInfoColorimetryFromColorSpace(GstVideoInfo* info, const PlatformVi
case PlatformVideoTransferCharacteristics::Bt709:
GST_VIDEO_INFO_COLORIMETRY(info).transfer = GST_VIDEO_TRANSFER_BT709;
break;
@ -228,7 +251,7 @@ index 419190b917b5..c7b0dacfc117 100644
case PlatformVideoTransferCharacteristics::Smpte170m:
GST_VIDEO_INFO_COLORIMETRY(info).transfer = GST_VIDEO_TRANSFER_BT601;
break;
@@ -1694,6 +1721,7 @@ void fillVideoInfoColorimetryFromColorSpace(GstVideoInfo* info, const PlatformVi
@@ -1810,6 +1839,7 @@ void fillVideoInfoColorimetryFromColorSpace(GstVideoInfo* info, const PlatformVi
case PlatformVideoTransferCharacteristics::Bt2020_10bit:
GST_VIDEO_INFO_COLORIMETRY(info).transfer = GST_VIDEO_TRANSFER_BT2020_10;
break;
@ -237,12 +260,12 @@ index 419190b917b5..c7b0dacfc117 100644
GST_VIDEO_INFO_COLORIMETRY(info).transfer = GST_VIDEO_TRANSFER_BT2020_12;
break;
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
index 49e031a72585..c7680e1a49c5 100644
index b4fd887c4036..79873050f8d9 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
@@ -74,6 +74,14 @@ inline bool webkitGstCheckVersion(guint major, guint minor, guint micro)
return true;
@@ -78,6 +78,14 @@ inline bool gst_check_version(guint major, guint minor, guint micro)
}
#endif
+#if !GST_CHECK_VERSION(1, 18, 0)
+// gst_video_format_info_component() is GStreamer 1.18 API, so for older versions we use a local
@ -255,7 +278,7 @@ index 49e031a72585..c7680e1a49c5 100644
#define GST_VIDEO_CAPS_TYPE_PREFIX "video/"_s
#define GST_AUDIO_CAPS_TYPE_PREFIX "audio/"_s
#define GST_TEXT_CAPS_TYPE_PREFIX "text/"_s
@@ -303,6 +311,13 @@ Vector<T> gstStructureGetList(const GstStructure*, ASCIILiteral key);
@@ -317,6 +325,13 @@ Vector<T> gstStructureGetList(const GstStructure*, CStringView key);
String gstStructureToJSONString(const GstStructure*);
@ -270,10 +293,10 @@ index 49e031a72585..c7680e1a49c5 100644
PlatformVideoColorSpace videoColorSpaceFromCaps(const GstCaps*);
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index f504e21e0e3f..6bc8f319bbcd 100644
index 34a8785843bb..ecf19035a27d 100644
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -624,8 +624,6 @@ bool MediaPlayerPrivateGStreamer::doSeek(const SeekTarget& target, float rate, b
@@ -630,8 +630,6 @@ bool MediaPlayerPrivateGStreamer::doSeek(const SeekTarget& target, float rate, b
auto seekStop = toGstClockTime(endTime);
auto event = adoptGRef(gst_event_new_seek(rate, GST_FORMAT_TIME, seekFlags, GST_SEEK_TYPE_SET, seekStart, GST_SEEK_TYPE_SET, seekStop));
@ -281,8 +304,8 @@ index f504e21e0e3f..6bc8f319bbcd 100644
-
if (isAsync) {
auto data = createAsyncSeekData();
data->event = WTFMove(event);
@@ -4330,26 +4328,7 @@ void MediaPlayerPrivateGStreamer::setStreamVolumeElement(GstStreamVolume* volume
data->event = WTF::move(event);
@@ -4428,33 +4426,7 @@ void MediaPlayerPrivateGStreamer::setStreamVolumeElement(GstStreamVolume* volume
bool MediaPlayerPrivateGStreamer::updateVideoSinkStatistics()
{
@ -296,8 +319,9 @@ index f504e21e0e3f..6bc8f319bbcd 100644
-
- auto totalVideoFrames = gstStructureGet<uint64_t>(stats.get(), "rendered"_s);
- auto droppedVideoFrames = gstStructureGet<uint64_t>(stats.get(), "dropped"_s);
- auto averageRate = gstStructureGet<double>(stats.get(), "average-rate"_s);
-
- if (!totalVideoFrames || !droppedVideoFrames)
- if (!totalVideoFrames || !droppedVideoFrames || !averageRate)
- return false;
-
- // Caching is required so that metrics queries performed after EOS still return valid values.
@ -305,16 +329,68 @@ index f504e21e0e3f..6bc8f319bbcd 100644
- m_totalVideoFrames = *totalVideoFrames;
- if (*droppedVideoFrames)
- m_droppedVideoFrames = *droppedVideoFrames;
-
- if (*averageRate && m_videoInfo) {
- double frameRate;
- gst_util_fraction_to_double(GST_VIDEO_INFO_FPS_N(&m_videoInfo->info), GST_VIDEO_INFO_FPS_D(&m_videoInfo->info), &frameRate);
- m_averageFrameRate = *averageRate * frameRate;
- }
- return true;
+ return false;
}
std::optional<VideoPlaybackQualityMetrics> MediaPlayerPrivateGStreamer::videoPlaybackQualityMetrics()
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.cpp
index b9905616d55f..ec1e8c4ab19e 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.cpp
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.cpp
@@ -103,7 +103,7 @@ std::unique_ptr<CoordinatedPlatformLayerBuffer> CoordinatedPlatformLayerBufferVi
// When not having a texture, we map the frame here and upload the pixels to a texture in the
// compositor thread, in paintToTextureMapper(), which also allows us to use the texture mapper
// bitmap texture pool.
- auto caps = adoptGRef(gst_video_info_to_caps(videoInfo));
+ auto caps = adoptGRef(gst_video_info_to_caps((GstVideoInfo *)videoInfo));
auto sample = adoptGRef(gst_sample_new(buffer, caps.get(), nullptr, nullptr));
m_videoFrame.emplace(GstMappedFrame(sample, GST_MAP_READ));
if (!*m_videoFrame) {
@@ -190,10 +190,7 @@ std::unique_ptr<CoordinatedPlatformLayerBuffer> CoordinatedPlatformLayerBufferVi
colorSpace = DMABufBuffer::ColorSpace::Bt709;
else if (gst_video_colorimetry_matches(&GST_VIDEO_INFO_COLORIMETRY(videoInfo), GST_VIDEO_COLORIMETRY_BT2020))
colorSpace = DMABufBuffer::ColorSpace::Bt2020;
- else if (gst_video_colorimetry_matches(&GST_VIDEO_INFO_COLORIMETRY(videoInfo), GST_VIDEO_COLORIMETRY_BT2100_PQ)) {
- colorSpace = DMABufBuffer::ColorSpace::Bt2020;
- transferFunction = DMABufBuffer::TransferFunction::Pq;
- } else if (gst_video_colorimetry_matches(&GST_VIDEO_INFO_COLORIMETRY(videoInfo), GST_VIDEO_COLORIMETRY_SMPTE240M))
+ else if (gst_video_colorimetry_matches(&GST_VIDEO_INFO_COLORIMETRY(videoInfo), GST_VIDEO_COLORIMETRY_SMPTE240M))
colorSpace = DMABufBuffer::ColorSpace::Smpte240M;
dmabuf->setColorSpace(colorSpace);
dmabuf->setTransferFunction(transferFunction);
@@ -210,7 +207,7 @@ std::unique_ptr<CoordinatedPlatformLayerBuffer> CoordinatedPlatformLayerBufferVi
#if USE(GSTREAMER_GL)
std::unique_ptr<CoordinatedPlatformLayerBuffer> CoordinatedPlatformLayerBufferVideo::createBufferFromGLMemory(GstBuffer* buffer, const GstVideoInfo* videoInfo)
{
- auto caps = adoptGRef(gst_video_info_to_caps(videoInfo));
+ auto caps = adoptGRef(gst_video_info_to_caps((GstVideoInfo *)videoInfo));
auto sample = adoptGRef(gst_sample_new(buffer, caps.get(), nullptr, nullptr));
m_videoFrame.emplace(GstMappedFrame(sample, static_cast<GstMapFlags>(GST_MAP_READ | GST_MAP_GL)));
if (!*m_videoFrame) {
@@ -255,10 +252,7 @@ std::unique_ptr<CoordinatedPlatformLayerBuffer> CoordinatedPlatformLayerBufferVi
yuvToRgbColorSpace = CoordinatedPlatformLayerBufferYUV::YuvToRgbColorSpace::Bt709;
else if (gst_video_colorimetry_matches(&GST_VIDEO_INFO_COLORIMETRY(m_videoFrame->info()), GST_VIDEO_COLORIMETRY_BT2020))
yuvToRgbColorSpace = CoordinatedPlatformLayerBufferYUV::YuvToRgbColorSpace::Bt2020;
- else if (gst_video_colorimetry_matches(&GST_VIDEO_INFO_COLORIMETRY(m_videoFrame->info()), GST_VIDEO_COLORIMETRY_BT2100_PQ)) {
- yuvToRgbColorSpace = CoordinatedPlatformLayerBufferYUV::YuvToRgbColorSpace::Bt2020;
- transferFunction = CoordinatedPlatformLayerBufferYUV::TransferFunction::Pq;
- } else if (gst_video_colorimetry_matches(&GST_VIDEO_INFO_COLORIMETRY(m_videoFrame->info()), GST_VIDEO_COLORIMETRY_SMPTE240M))
+ else if (gst_video_colorimetry_matches(&GST_VIDEO_INFO_COLORIMETRY(m_videoFrame->info()), GST_VIDEO_COLORIMETRY_SMPTE240M))
yuvToRgbColorSpace = CoordinatedPlatformLayerBufferYUV::YuvToRgbColorSpace::Smpte240M;
return CoordinatedPlatformLayerBufferYUV::create(numberOfPlanes, WTF::move(planes), WTF::move(yuvPlane), WTF::move(yuvPlaneOffset), yuvToRgbColorSpace, transferFunction, m_size, m_flags, nullptr);
diff --git a/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp b/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp
index 52be1e0338bd..7eb0d67108f1 100644
index 643ef5a67982..b5e35f09bcf1 100644
--- a/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp
+++ b/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp
@@ -256,9 +256,10 @@ static std::pair<GRefPtr<GstCaps>, GRefPtr<GstCaps>> vpxCapsFromCodecString(cons
@@ -254,9 +254,10 @@ static std::pair<GRefPtr<GstCaps>, GRefPtr<GstCaps>> vpxCapsFromCodecString(cons
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_BT709;
else if (transfer == VPConfigurationTransferCharacteristics::BT_470_7_BG)
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_GAMMA28;
@ -328,7 +404,7 @@ index 52be1e0338bd..7eb0d67108f1 100644
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_SMPTE240M;
else if (transfer == VPConfigurationTransferCharacteristics::Linear)
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_GAMMA10;
@@ -271,17 +272,21 @@ static std::pair<GRefPtr<GstCaps>, GRefPtr<GstCaps>> vpxCapsFromCodecString(cons
@@ -269,17 +270,21 @@ static std::pair<GRefPtr<GstCaps>, GRefPtr<GstCaps>> vpxCapsFromCodecString(cons
else if (transfer == VPConfigurationTransferCharacteristics::IEC_61966_2_1) {
GST_WARNING("VPConfigurationTransferCharacteristics::IEC_61966_2_1 not supported");
GST_VIDEO_INFO_COLORIMETRY(&info).transfer = GST_VIDEO_TRANSFER_UNKNOWN;
@ -396,10 +472,10 @@ index 52be1e0338bd..7eb0d67108f1 100644
};
diff --git a/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp b/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
index 4e57c2422148..993357fdb9ca 100644
index ceb958629a20..2dac345cdbc5 100644
--- a/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
+++ b/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
@@ -857,22 +857,6 @@ static void webkit_video_encoder_class_init(WebKitVideoEncoderClass* klass)
@@ -889,22 +889,6 @@ static void webkit_video_encoder_class_init(WebKitVideoEncoderClass* klass)
"temporal-scalability-rate-decimator", decimators.get(),
"temporal-scalability-target-bitrate", bitrates.get(), nullptr);
@ -423,19 +499,18 @@ index 4e57c2422148..993357fdb9ca 100644
});
diff --git a/Source/cmake/GStreamerChecks.cmake b/Source/cmake/GStreamerChecks.cmake
index af7ad6df1f8f..465e9264cbee 100644
index 0472cde8df37..aabca8479f22 100644
--- a/Source/cmake/GStreamerChecks.cmake
+++ b/Source/cmake/GStreamerChecks.cmake
@@ -1,7 +1,7 @@
if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO OR ENABLE_WEB_CODECS)
SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
@@ -1,6 +1,6 @@
if (USE_GSTREAMER)
if (USE_GSTREAMER_FULL)
- find_package(GStreamer 1.18.4 REQUIRED COMPONENTS full)
+ find_package(GStreamer 1.16.1 REQUIRED COMPONENTS full)
if (NOT PC_GSTREAMER_FULL_FOUND)
message(FATAL_ERROR "GStreamer static library libgstreamer-full-1.0 not found")
else ()
@@ -25,7 +25,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO OR ENABLE_WEB_CODECS)
@@ -20,7 +20,7 @@ if (USE_GSTREAMER)
list(APPEND GSTREAMER_COMPONENTS webrtc)
endif ()
@ -445,5 +520,5 @@ index af7ad6df1f8f..465e9264cbee 100644
if (ENABLE_WEB_AUDIO)
if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
--
2.52.0
2.53.0

View File

@ -1,4 +1,4 @@
From 4d81f51a0d3ddd85ec8eac48b3093d9818c97907 Mon Sep 17 00:00:00 2001
From d2017cd8ab51b24dcd3bda6fb90fec686b9a86ad Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Tue, 23 Sep 2025 15:48:27 -0500
Subject: [PATCH] Build against harfbuzz 1.7.5
@ -6,10 +6,11 @@ Subject: [PATCH] Build against harfbuzz 1.7.5
---
.../skia/modules/skshaper/src/SkShaper_harfbuzz.cpp | 11 ++++-------
.../platform/graphics/skia/SkiaHarfBuzzFont.cpp | 8 +++++---
2 files changed, 9 insertions(+), 10 deletions(-)
Source/cmake/OptionsGTK.cmake | 2 +-
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/Source/ThirdParty/skia/modules/skshaper/src/SkShaper_harfbuzz.cpp b/Source/ThirdParty/skia/modules/skshaper/src/SkShaper_harfbuzz.cpp
index c40b01d85ab4..79c883dd1380 100644
index 67c475c0bb54..14a644865348 100644
--- a/Source/ThirdParty/skia/modules/skshaper/src/SkShaper_harfbuzz.cpp
+++ b/Source/ThirdParty/skia/modules/skshaper/src/SkShaper_harfbuzz.cpp
@@ -275,13 +275,10 @@ HBFace create_hb_face(const SkTypeface& typeface) {
@ -31,10 +32,10 @@ index c40b01d85ab4..79c883dd1380 100644
}
if (!face) {
diff --git a/Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp b/Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp
index dbbb5cc21cb6..8818343d3b57 100644
index 37930ac270ae..90f66d8b63bb 100644
--- a/Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp
+++ b/Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp
@@ -101,9 +101,10 @@ static HbUniquePtr<hb_face_t> createHarfBuzzFace(SkTypeface& typeface)
@@ -104,9 +104,10 @@ static HbUniquePtr<hb_face_t> createHarfBuzzFace(SkTypeface& typeface)
HbUniquePtr<hb_blob_t> blob(hb_blob_create(reinterpret_cast<const char*>(memory), size, HB_MEMORY_MODE_READONLY, stream.release(), [](void* data) {
delete reinterpret_cast<SkStreamAsset*>(data);
}));
@ -48,14 +49,27 @@ index dbbb5cc21cb6..8818343d3b57 100644
}
}
@@ -126,6 +127,7 @@ SkiaHarfBuzzFont::SkiaHarfBuzzFont(SkTypeface& typeface)
@@ -130,6 +131,7 @@ SkiaHarfBuzzFont::SkiaHarfBuzzFont(SkTypeface& typeface)
{
auto hbFace = createHarfBuzzFace(typeface);
HbUniquePtr<hb_font_t> hbFont(hb_font_create(hbFace.get()));
+ hb_ot_font_set_funcs(hbFont.get());
if (int axisCount = typeface.getVariationDesignPosition(nullptr, 0)) {
if (int axisCount = typeface.getVariationDesignPosition({ }); axisCount > 0) {
Vector<SkFontArguments::VariationPosition::Coordinate> axisValues(axisCount);
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
index eea6eb87ad4b..6d5f17debcc7 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -13,7 +13,7 @@ find_package(Cairo 1.14.0 REQUIRED)
find_package(LibGcrypt 1.7.0 REQUIRED)
find_package(Soup3 3.0.0 REQUIRED)
find_package(Tasn1 REQUIRED)
-find_package(HarfBuzz 2.7.4 REQUIRED COMPONENTS ICU)
+find_package(HarfBuzz 1.7.5 REQUIRED COMPONENTS ICU)
find_package(ICU 70.1 REQUIRED COMPONENTS data i18n uc)
find_package(JPEG REQUIRED)
find_package(Epoxy 1.5.4 REQUIRED)
--
2.51.0
2.53.0

View File

@ -1,24 +1,22 @@
From be79a15040dd992cdac91c59d481fea5d7209df3 Mon Sep 17 00:00:00 2001
From 0bfb64461f6c6b59011068858d1ff79c88d48df5 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Thu, 27 Mar 2025 15:56:41 -0500
Subject: [PATCH 1/5] Revert "[CMake] Update minimum ICU version to 70.1"
This reverts commit 95d71be25d5b838b1171e6b9b2cd526190118fba.
---
Source/cmake/OptionsGTK.cmake | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Source/cmake/OptionsGTK.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
index 285ab3737bfa..83377867f3b1 100644
index 85189edccdba..a393ffc105cb 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -10,11 +10,11 @@ set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string")
find_package(Cairo 1.14.0 REQUIRED)
@@ -13,10 +13,10 @@ find_package(Cairo 1.14.0 REQUIRED)
find_package(LibGcrypt 1.7.0 REQUIRED)
find_package(Libtasn1 REQUIRED)
-find_package(HarfBuzz 2.7.4 REQUIRED COMPONENTS ICU)
find_package(Tasn1 REQUIRED)
find_package(HarfBuzz 1.7.5 REQUIRED COMPONENTS ICU)
-find_package(ICU 70.1 REQUIRED COMPONENTS data i18n uc)
+find_package(HarfBuzz 1.4.2 REQUIRED COMPONENTS ICU)
+find_package(ICU 61.2 REQUIRED COMPONENTS data i18n uc)
find_package(JPEG REQUIRED)
find_package(Epoxy 1.5.4 REQUIRED)
@ -28,10 +26,10 @@ index 285ab3737bfa..83377867f3b1 100644
find_package(SQLite3 REQUIRED)
find_package(Threads REQUIRED)
--
2.51.0
2.53.0
From 4c60130350756d48e7f8ed85b4d86d2b049da332 Mon Sep 17 00:00:00 2001
From 3a19acb5d6bb8cb1b2874f4aa428366957b8769b Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Fri, 28 Mar 2025 14:45:03 -0500
Subject: [PATCH 2/5] Revert "[JSC] Remove unnecessary ICU version checks"
@ -44,7 +42,7 @@ This reverts commit af62f09a1fad0b72293a7f0d082704d92116cb9a.
3 files changed, 47 insertions(+), 24 deletions(-)
diff --git a/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp b/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
index 9bf431425007..17c5b1b848d7 100644
index 7be0a6a2b047..d87992a36119 100644
--- a/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
@@ -457,7 +457,7 @@ static Vector<Element> collectElements(JSGlobalObject* globalObject, const IntlD
@ -57,10 +55,10 @@ index 9bf431425007..17c5b1b848d7 100644
skeletonBuilder.append("00"_s);
else
diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp b/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
index b05c7813294c..c16e6bcee859 100644
index a1b08f5470ed..f34684cf7fcf 100644
--- a/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
@@ -496,10 +496,14 @@ void IntlNumberFormat::initializeNumberFormat(JSGlobalObject* globalObject, JSVa
@@ -503,10 +503,14 @@ void IntlNumberFormat::initializeNumberFormat(JSGlobalObject* globalObject, JSVa
skeletonBuilder.append(" sign-except-zero"_s);
break;
case SignDisplay::Negative:
@ -80,10 +78,10 @@ index b05c7813294c..c16e6bcee859 100644
}
diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormatInlines.h b/Source/JavaScriptCore/runtime/IntlNumberFormatInlines.h
index c640b73cc891..e678978e453d 100644
index 8f8444163fc4..81b7c3322fcb 100644
--- a/Source/JavaScriptCore/runtime/IntlNumberFormatInlines.h
+++ b/Source/JavaScriptCore/runtime/IntlNumberFormatInlines.h
@@ -200,12 +200,24 @@ void appendNumberFormatDigitOptionsToSkeleton(IntlType* intlInstance, StringBuil
@@ -201,12 +201,24 @@ void appendNumberFormatDigitOptionsToSkeleton(IntlType* intlInstance, StringBuil
case RoundingMode::Trunc:
skeletonBuilder.append(" rounding-mode-down"_s);
break;
@ -112,7 +110,7 @@ index c640b73cc891..e678978e453d 100644
case RoundingMode::HalfExpand:
skeletonBuilder.append(" rounding-mode-half-up"_s);
break;
@@ -218,7 +230,7 @@ void appendNumberFormatDigitOptionsToSkeleton(IntlType* intlInstance, StringBuil
@@ -219,7 +231,7 @@ void appendNumberFormatDigitOptionsToSkeleton(IntlType* intlInstance, StringBuil
}
// https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#integer-width
@ -121,7 +119,7 @@ index c640b73cc891..e678978e453d 100644
for (unsigned i = 0; i < intlInstance->m_minimumIntegerDigits; ++i)
skeletonBuilder.append('0');
@@ -256,19 +268,23 @@ void appendNumberFormatDigitOptionsToSkeleton(IntlType* intlInstance, StringBuil
@@ -257,19 +269,23 @@ void appendNumberFormatDigitOptionsToSkeleton(IntlType* intlInstance, StringBuil
}
case IntlRoundingType::MorePrecision:
case IntlRoundingType::LessPrecision:
@ -158,7 +156,7 @@ index c640b73cc891..e678978e453d 100644
break;
}
}
@@ -279,7 +295,10 @@ void appendNumberFormatDigitOptionsToSkeleton(IntlType* intlInstance, StringBuil
@@ -280,7 +296,10 @@ void appendNumberFormatDigitOptionsToSkeleton(IntlType* intlInstance, StringBuil
case IntlTrailingZeroDisplay::Auto:
break;
case IntlTrailingZeroDisplay::StripIfInteger:
@ -171,10 +169,10 @@ index c640b73cc891..e678978e453d 100644
}
}
--
2.51.0
2.53.0
From 6f52a2ff3327c5ef714fb385f647daceeab1680f Mon Sep 17 00:00:00 2001
From 004d72aaf71b66aa1bf324c957af49cc7b141667 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Fri, 28 Mar 2025 15:01:00 -0500
Subject: [PATCH 3/5] Revert "[JSC] TimeZone Cache should be per-process level"
@ -185,7 +183,7 @@ This reverts commit c779aa30eced87609c7c808d672a8f23c5c4821d.
1 file changed, 21 insertions(+), 40 deletions(-)
diff --git a/Source/JavaScriptCore/runtime/JSDateMath.cpp b/Source/JavaScriptCore/runtime/JSDateMath.cpp
index 96993af52d33..c40f917fc99f 100644
index 1bcd8fab40ea..14c4d65a9696 100644
--- a/Source/JavaScriptCore/runtime/JSDateMath.cpp
+++ b/Source/JavaScriptCore/runtime/JSDateMath.cpp
@@ -453,12 +453,9 @@ String DateCache::timeZoneDisplayName(bool isDST)
@ -234,7 +232,7 @@ index 96993af52d33..c40f917fc99f 100644
- if (canonical.isNull() || isUTCEquivalent(canonical))
- canonical = "UTC"_s;
-
- globalCache.get() = std::tuple { canonical.isolatedCopy(), WTFMove(timeZoneID), currentID };
- globalCache.get() = std::tuple { canonical.isolatedCopy(), WTF::move(timeZoneID), currentID };
- }
- return std::tuple { std::get<0>(globalCache.get()).isolatedCopy(), std::get<1>(globalCache.get()) };
-}
@ -251,7 +249,7 @@ index 96993af52d33..c40f917fc99f 100644
+ Vector<char16_t, 32> timeZoneID;
+ getTimeZoneOverride(timeZoneID);
auto* cache = new OpaqueICUTimeZone;
- cache->m_canonicalTimeZoneID = WTFMove(canonical);
- cache->m_canonicalTimeZoneID = WTF::move(canonical);
+
+ String canonical;
UErrorCode status = U_ZERO_ERROR;
@ -268,7 +266,7 @@ index 96993af52d33..c40f917fc99f 100644
+ }
+ if (canonical.isNull() || isUTCEquivalent(canonical))
+ canonical = "UTC"_s;
+ cache->m_canonicalTimeZoneID = WTFMove(canonical);
+ cache->m_canonicalTimeZoneID = WTF::move(canonical);
+
+ status = U_ZERO_ERROR;
+ cache->m_calendar = std::unique_ptr<UCalendar, ICUDeleter<ucal_close>>(ucal_open(timeZoneID.data(), timeZoneID.size(), "", UCAL_DEFAULT, &status));
@ -276,10 +274,10 @@ index 96993af52d33..c40f917fc99f 100644
ucal_setGregorianChange(cache->m_calendar.get(), minECMAScriptTime, &status); // Ignore "unsupported" error.
m_timeZoneCache = std::unique_ptr<OpaqueICUTimeZone, OpaqueICUTimeZoneDeleter>(cache);
--
2.51.0
2.53.0
From c5fb088366f855f23a2920b31744740edb5506a2 Mon Sep 17 00:00:00 2001
From 0a84e39e2e0c90784a70ea8931725e84f276853c Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Fri, 28 Mar 2025 15:01:11 -0500
Subject: [PATCH 4/5] Revert "[JSC] Rebaseline Intl implementation based on
@ -306,7 +304,7 @@ This reverts commit 31a358087be7e5e70c7a03bdfcf89de35628a2a2.
16 files changed, 479 insertions(+), 16 deletions(-)
diff --git a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
index 202e266c55da..9a413dc037a7 100644
index 4eb85711f506..e37be067520b 100644
--- a/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
@@ -42,12 +42,16 @@
@ -326,7 +324,7 @@ index 202e266c55da..9a413dc037a7 100644
WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
@@ -1430,6 +1434,8 @@ UDateIntervalFormat* IntlDateTimeFormat::createDateIntervalFormatIfNecessary(JSG
@@ -1453,6 +1457,8 @@ UDateIntervalFormat* IntlDateTimeFormat::createDateIntervalFormatIfNecessary(JSG
return m_dateIntervalFormat.get();
}
@ -335,7 +333,7 @@ index 202e266c55da..9a413dc037a7 100644
static std::unique_ptr<UFormattedDateInterval, ICUDeleter<udtitvfmt_closeResult>> formattedValueFromDateRange(UDateIntervalFormat& dateIntervalFormat, UDateFormat& dateFormat, double startDate, double endDate, UErrorCode& status)
{
auto result = std::unique_ptr<UFormattedDateInterval, ICUDeleter<udtitvfmt_closeResult>>(udtitvfmt_openResult(&status));
@@ -1508,6 +1514,8 @@ static bool dateFieldsPracticallyEqual(const UFormattedValue* formattedValue, UE
@@ -1531,6 +1537,8 @@ static bool dateFieldsPracticallyEqual(const UFormattedValue* formattedValue, UE
return !hasSpan;
}
@ -344,7 +342,7 @@ index 202e266c55da..9a413dc037a7 100644
JSValue IntlDateTimeFormat::formatRange(JSGlobalObject* globalObject, double startDate, double endDate)
{
ASSERT(m_dateFormat);
@@ -1526,6 +1534,7 @@ JSValue IntlDateTimeFormat::formatRange(JSGlobalObject* globalObject, double sta
@@ -1549,6 +1557,7 @@ JSValue IntlDateTimeFormat::formatRange(JSGlobalObject* globalObject, double sta
auto* dateIntervalFormat = createDateIntervalFormatIfNecessary(globalObject);
RETURN_IF_EXCEPTION(scope, { });
@ -352,10 +350,10 @@ index 202e266c55da..9a413dc037a7 100644
UErrorCode status = U_ZERO_ERROR;
auto result = formattedValueFromDateRange(*dateIntervalFormat, *m_dateFormat, startDate, endDate, status);
if (U_FAILURE(status)) {
@@ -1563,6 +1572,17 @@ JSValue IntlDateTimeFormat::formatRange(JSGlobalObject* globalObject, double sta
@@ -1586,6 +1595,17 @@ JSValue IntlDateTimeFormat::formatRange(JSGlobalObject* globalObject, double sta
replaceNarrowNoBreakSpaceOrThinSpaceWithNormalSpace(buffer);
return jsString(vm, String(WTFMove(buffer)));
return jsString(vm, String(WTF::move(buffer)));
+#else
+ Vector<UChar, 32> buffer;
+ auto status = callBufferProducingFunction(udtitvfmt_format, dateIntervalFormat, startDate, endDate, buffer, nullptr);
@ -365,12 +363,12 @@ index 202e266c55da..9a413dc037a7 100644
+ }
+ replaceNarrowNoBreakSpaceOrThinSpaceWithNormalSpace(buffer);
+
+ return jsString(vm, String(WTFMove(buffer)));
+ return jsString(vm, String(WTF::move(buffer)));
+#endif
}
JSValue IntlDateTimeFormat::formatRangeToParts(JSGlobalObject* globalObject, double startDate, double endDate)
@@ -1572,6 +1592,7 @@ JSValue IntlDateTimeFormat::formatRangeToParts(JSGlobalObject* globalObject, dou
@@ -1595,6 +1615,7 @@ JSValue IntlDateTimeFormat::formatRangeToParts(JSGlobalObject* globalObject, dou
VM& vm = globalObject->vm();
auto scope = DECLARE_THROW_SCOPE(vm);
@ -378,7 +376,7 @@ index 202e266c55da..9a413dc037a7 100644
// http://tc39.es/proposal-intl-DateTimeFormat-formatRange/#sec-partitiondatetimerangepattern
startDate = timeClip(startDate);
endDate = timeClip(endDate);
@@ -1775,6 +1796,12 @@ JSValue IntlDateTimeFormat::formatRangeToParts(JSGlobalObject* globalObject, dou
@@ -1798,6 +1819,12 @@ JSValue IntlDateTimeFormat::formatRangeToParts(JSGlobalObject* globalObject, dou
}
return parts;
@ -434,7 +432,7 @@ index 7a739f61e2c1..da457ad03212 100644
}
diff --git a/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp b/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
index 17c5b1b848d7..c066e80ab130 100644
index d87992a36119..ba46191c620f 100644
--- a/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
@@ -36,14 +36,21 @@
@ -496,13 +494,13 @@ index 17c5b1b848d7..c066e80ab130 100644
auto scope = DECLARE_THROW_SCOPE(vm);
+#if HAVE(ICU_U_LIST_FORMATTER)
auto elements = collectElements(globalObject, this, WTFMove(duration));
auto elements = collectElements(globalObject, this, WTF::move(duration));
RETURN_IF_EXCEPTION(scope, { });
@@ -676,6 +694,10 @@ JSValue IntlDurationFormat::format(JSGlobalObject* globalObject, ISO8601::Durati
return throwTypeError(globalObject, scope, "failed to format list of strings"_s);
return jsString(vm, String(WTFMove(result)));
return jsString(vm, String(WTF::move(result)));
+#else
+ UNUSED_PARAM(duration);
+ return throwTypeError(globalObject, scope, "failed to format list of strings"_s);
@ -515,7 +513,7 @@ index 17c5b1b848d7..c066e80ab130 100644
auto scope = DECLARE_THROW_SCOPE(vm);
+#if HAVE(ICU_U_LIST_FORMATTER)
auto elements = collectElements(globalObject, this, WTFMove(duration));
auto elements = collectElements(globalObject, this, WTF::move(duration));
RETURN_IF_EXCEPTION(scope, { });
@@ -836,6 +859,10 @@ JSValue IntlDurationFormat::formatToParts(JSGlobalObject* globalObject, ISO8601:
@ -544,7 +542,7 @@ index 69e64f9c8332..b3f781a54ad4 100644
String m_numberingSystem;
CString m_dataLocaleWithExtensions;
diff --git a/Source/JavaScriptCore/runtime/IntlListFormat.cpp b/Source/JavaScriptCore/runtime/IntlListFormat.cpp
index 8bc64220a7c7..c24073ce3171 100644
index bcaa44af1fbd..b565a532cb0e 100644
--- a/Source/JavaScriptCore/runtime/IntlListFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlListFormat.cpp
@@ -33,12 +33,19 @@
@ -608,7 +606,7 @@ index 8bc64220a7c7..c24073ce3171 100644
@@ -176,6 +191,10 @@ JSValue IntlListFormat::format(JSGlobalObject* globalObject, JSValue list) const
return throwTypeError(globalObject, scope, "failed to format list of strings"_s);
return jsString(vm, String(WTFMove(result)));
return jsString(vm, String(WTF::move(result)));
+#else
+ UNUSED_PARAM(list);
+ return throwTypeError(globalObject, scope, "failed to format list of strings"_s);
@ -653,7 +651,7 @@ index 2d071949e06f..af6f2c2e7b0a 100644
namespace JSC {
diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp b/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
index c16e6bcee859..1fc664fab1e5 100644
index f34684cf7fcf..e5c9f5850e46 100644
--- a/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
@@ -43,8 +43,12 @@
@ -720,7 +718,7 @@ index c16e6bcee859..1fc664fab1e5 100644
// These should not show up because there is no way to specify them in NumberFormat options.
// If they do, they don't fit well into any of known part types, so consider it an "unknown".
case UNUM_PERMILL_FIELD:
@@ -399,6 +411,7 @@ void IntlNumberFormat::initializeNumberFormat(JSGlobalObject* globalObject, JSVa
@@ -406,6 +418,7 @@ void IntlNumberFormat::initializeNumberFormat(JSGlobalObject* globalObject, JSVa
// Options are obtained. Configure formatter here.
@ -728,7 +726,7 @@ index c16e6bcee859..1fc664fab1e5 100644
// Constructing ICU Number Skeletons to configure UNumberFormatter.
// https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md
@@ -536,11 +549,120 @@ void IntlNumberFormat::initializeNumberFormat(JSGlobalObject* globalObject, JSVa
@@ -543,11 +556,120 @@ void IntlNumberFormat::initializeNumberFormat(JSGlobalObject* globalObject, JSVa
return;
}
@ -849,7 +847,7 @@ index c16e6bcee859..1fc664fab1e5 100644
}
// https://tc39.es/ecma402/#sec-formatnumber
@@ -552,6 +674,7 @@ JSValue IntlNumberFormat::format(JSGlobalObject* globalObject, double value) con
@@ -559,6 +681,7 @@ JSValue IntlNumberFormat::format(JSGlobalObject* globalObject, double value) con
value = purifyNaN(value);
Vector<char16_t, 32> buffer;
@ -857,7 +855,7 @@ index c16e6bcee859..1fc664fab1e5 100644
ASSERT(m_numberFormatter);
UErrorCode status = U_ZERO_ERROR;
auto formattedNumber = std::unique_ptr<UFormattedNumber, ICUDeleter<unumf_closeResult>>(unumf_openResult(&status));
@@ -563,6 +686,12 @@ JSValue IntlNumberFormat::format(JSGlobalObject* globalObject, double value) con
@@ -570,6 +693,12 @@ JSValue IntlNumberFormat::format(JSGlobalObject* globalObject, double value) con
status = callBufferProducingFunction(unumf_resultToString, formattedNumber.get(), buffer);
if (U_FAILURE(status))
return throwTypeError(globalObject, scope, "Failed to format a number."_s);
@ -867,10 +865,10 @@ index c16e6bcee859..1fc664fab1e5 100644
+ if (U_FAILURE(status))
+ return throwTypeError(globalObject, scope, "Failed to format a number."_s);
+#endif
return jsString(vm, String(WTFMove(buffer)));
return jsString(vm, String(WTF::move(buffer)));
}
@@ -576,6 +705,7 @@ JSValue IntlNumberFormat::format(JSGlobalObject* globalObject, IntlMathematicalV
@@ -583,6 +712,7 @@ JSValue IntlNumberFormat::format(JSGlobalObject* globalObject, IntlMathematicalV
const auto& string = value.getString();
Vector<char16_t, 32> buffer;
@ -878,7 +876,7 @@ index c16e6bcee859..1fc664fab1e5 100644
ASSERT(m_numberFormatter);
UErrorCode status = U_ZERO_ERROR;
auto formattedNumber = std::unique_ptr<UFormattedNumber, ICUDeleter<unumf_closeResult>>(unumf_openResult(&status));
@@ -587,9 +717,16 @@ JSValue IntlNumberFormat::format(JSGlobalObject* globalObject, IntlMathematicalV
@@ -594,9 +724,16 @@ JSValue IntlNumberFormat::format(JSGlobalObject* globalObject, IntlMathematicalV
status = callBufferProducingFunction(unumf_resultToString, formattedNumber.get(), buffer);
if (U_FAILURE(status))
return throwTypeError(globalObject, scope, "Failed to format a BigInt."_s);
@ -888,14 +886,14 @@ index c16e6bcee859..1fc664fab1e5 100644
+ if (U_FAILURE(status))
+ return throwTypeError(globalObject, scope, "Failed to format a BigInt."_s);
+#endif
return jsString(vm, String(WTFMove(buffer)));
return jsString(vm, String(WTF::move(buffer)));
}
+#if HAVE(ICU_U_NUMBER_RANGE_FORMATTER)
JSValue IntlNumberFormat::formatRange(JSGlobalObject* globalObject, double start, double end) const
{
VM& vm = globalObject->vm();
@@ -657,6 +794,7 @@ JSValue IntlNumberFormat::formatRange(JSGlobalObject* globalObject, IntlMathemat
@@ -664,6 +801,7 @@ JSValue IntlNumberFormat::formatRange(JSGlobalObject* globalObject, IntlMathemat
return jsString(vm, String({ string, static_cast<size_t>(length) }));
}
@ -903,7 +901,7 @@ index c16e6bcee859..1fc664fab1e5 100644
static constexpr int32_t literalField = -1;
struct IntlNumberFormatField {
@@ -769,6 +907,7 @@ static Vector<IntlNumberFormatField> flattenFields(Vector<IntlNumberFormatField>
@@ -776,6 +914,7 @@ static Vector<IntlNumberFormatField> flattenFields(Vector<IntlNumberFormatField>
return flatten;
}
@ -911,7 +909,7 @@ index c16e6bcee859..1fc664fab1e5 100644
static bool numberFieldsPracticallyEqual(const UFormattedValue* formattedValue, UErrorCode& status)
{
auto iterator = std::unique_ptr<UConstrainedFieldPosition, ICUDeleter<ucfpos_close>>(ucfpos_open(&status));
@@ -1010,6 +1149,7 @@ JSValue IntlNumberFormat::formatRangeToParts(JSGlobalObject* globalObject, IntlM
@@ -1017,6 +1156,7 @@ JSValue IntlNumberFormat::formatRangeToParts(JSGlobalObject* globalObject, IntlM
return parts;
}
@ -919,7 +917,7 @@ index c16e6bcee859..1fc664fab1e5 100644
ASCIILiteral IntlNumberFormat::styleString(Style style)
{
@@ -1307,6 +1447,7 @@ JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, double val
@@ -1314,6 +1454,7 @@ JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, double val
return throwTypeError(globalObject, scope, "failed to open field position iterator"_s);
Vector<char16_t, 32> result;
@ -927,7 +925,7 @@ index c16e6bcee859..1fc664fab1e5 100644
ASSERT(m_numberFormatter);
auto formattedNumber = std::unique_ptr<UFormattedNumber, ICUDeleter<unumf_closeResult>>(unumf_openResult(&status));
if (U_FAILURE(status))
@@ -1321,6 +1462,13 @@ JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, double val
@@ -1328,6 +1469,13 @@ JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, double val
if (U_FAILURE(status))
return throwTypeError(globalObject, scope, "Failed to format a number."_s);
IntlFieldIterator iterator(*fieldItr.get());
@ -939,9 +937,9 @@ index c16e6bcee859..1fc664fab1e5 100644
+ IntlFieldIterator iterator(*fieldItr.get());
+#endif
auto resultString = String(WTFMove(result));
auto resultString = String(WTF::move(result));
@@ -1334,6 +1482,7 @@ JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, double val
@@ -1341,6 +1489,7 @@ JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, double val
return parts;
}
@ -949,7 +947,7 @@ index c16e6bcee859..1fc664fab1e5 100644
JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, IntlMathematicalValue&& value, JSString* sourceType) const
{
VM& vm = globalObject->vm();
@@ -1378,6 +1527,7 @@ JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, IntlMathem
@@ -1385,6 +1534,7 @@ JSValue IntlNumberFormat::formatToParts(JSGlobalObject* globalObject, IntlMathem
return parts;
}
@ -1042,7 +1040,7 @@ index 65a6795b013f..29d197e462fb 100644
String m_locale;
String m_numberingSystem;
diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp b/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp
index d951aa27c715..4e3615ba7242 100644
index 23ea9bf1ce04..92e9dcad1127 100644
--- a/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp
+++ b/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp
@@ -35,12 +35,18 @@
@ -1104,7 +1102,7 @@ index d951aa27c715..4e3615ba7242 100644
VM& vm = globalObject->vm();
@@ -163,6 +174,7 @@ JSC_DEFINE_HOST_FUNCTION(intlNumberFormatPrototypeFuncFormatRange, (JSGlobalObje
RELEASE_AND_RETURN(scope, JSValue::encode(numberFormat->formatRange(globalObject, WTFMove(start), WTFMove(end))));
RELEASE_AND_RETURN(scope, JSValue::encode(numberFormat->formatRange(globalObject, WTF::move(start), WTF::move(end))));
}
+#endif
@ -1121,7 +1119,7 @@ index d951aa27c715..4e3615ba7242 100644
@@ -184,8 +197,15 @@ JSC_DEFINE_HOST_FUNCTION(intlNumberFormatPrototypeFuncFormatToParts, (JSGlobalOb
RELEASE_AND_RETURN(scope, JSValue::encode(numberFormat->formatToParts(globalObject, number.value())));
RELEASE_AND_RETURN(scope, JSValue::encode(numberFormat->formatToParts(globalObject, WTFMove(value))));
RELEASE_AND_RETURN(scope, JSValue::encode(numberFormat->formatToParts(globalObject, WTF::move(value))));
+#else
+ double value = callFrame->argument(0).toNumber(globalObject);
+ RETURN_IF_EXCEPTION(scope, { });
@ -1136,14 +1134,14 @@ index d951aa27c715..4e3615ba7242 100644
VM& vm = globalObject->vm();
@@ -215,6 +235,7 @@ JSC_DEFINE_HOST_FUNCTION(intlNumberFormatPrototypeFuncFormatRangeToParts, (JSGlo
RELEASE_AND_RETURN(scope, JSValue::encode(numberFormat->formatRangeToParts(globalObject, WTFMove(start), WTFMove(end))));
RELEASE_AND_RETURN(scope, JSValue::encode(numberFormat->formatRangeToParts(globalObject, WTF::move(start), WTF::move(end))));
}
+#endif
JSC_DEFINE_HOST_FUNCTION(intlNumberFormatPrototypeFuncResolvedOptions, (JSGlobalObject* globalObject, CallFrame* callFrame))
{
diff --git a/Source/JavaScriptCore/runtime/IntlObject.cpp b/Source/JavaScriptCore/runtime/IntlObject.cpp
index 8ef1ee678063..f8413f12dec7 100644
index a79aba3e7717..899ea323a08a 100644
--- a/Source/JavaScriptCore/runtime/IntlObject.cpp
+++ b/Source/JavaScriptCore/runtime/IntlObject.cpp
@@ -169,8 +169,6 @@ namespace JSC {
@ -1170,7 +1168,7 @@ index 8ef1ee678063..f8413f12dec7 100644
Structure* IntlObject::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
diff --git a/Source/JavaScriptCore/runtime/IntlPluralRules.cpp b/Source/JavaScriptCore/runtime/IntlPluralRules.cpp
index b3e58fc6453f..c451478086f7 100644
index 54feb0061675..884bd1c96e4e 100644
--- a/Source/JavaScriptCore/runtime/IntlPluralRules.cpp
+++ b/Source/JavaScriptCore/runtime/IntlPluralRules.cpp
@@ -36,8 +36,12 @@
@ -1242,7 +1240,7 @@ index b3e58fc6453f..c451478086f7 100644
@@ -245,8 +276,17 @@ JSValue IntlPluralRules::select(JSGlobalObject* globalObject, double value) cons
if (U_FAILURE(status))
return throwTypeError(globalObject, scope, "failed to select plural value"_s);
return jsString(vm, String(WTFMove(buffer)));
return jsString(vm, String(WTF::move(buffer)));
+#else
+ Vector<UChar, 8> result(8);
+ auto length = uplrules_selectWithFormat(m_pluralRules.get(), value, m_numberFormat.get(), result.data(), result.size(), &status);
@ -1259,7 +1257,7 @@ index b3e58fc6453f..c451478086f7 100644
ASSERT(m_numberRangeFormatter);
@@ -272,5 +312,6 @@ JSValue IntlPluralRules::selectRange(JSGlobalObject* globalObject, double start,
return throwTypeError(globalObject, scope, "failed to select plural value"_s);
return jsString(vm, String(WTFMove(buffer)));
return jsString(vm, String(WTF::move(buffer)));
}
+#endif
@ -1379,7 +1377,7 @@ index c6c1fa0cd228..85d7e85469a7 100644
} // namespace JSC
diff --git a/Source/JavaScriptCore/runtime/JSDateMath.cpp b/Source/JavaScriptCore/runtime/JSDateMath.cpp
index c40f917fc99f..755337022004 100644
index 14c4d65a9696..fce7e787f9fc 100644
--- a/Source/JavaScriptCore/runtime/JSDateMath.cpp
+++ b/Source/JavaScriptCore/runtime/JSDateMath.cpp
@@ -74,6 +74,7 @@
@ -1517,7 +1515,7 @@ index c40f917fc99f..755337022004 100644
{
@@ -447,6 +514,21 @@ String DateCache::timeZoneDisplayName(bool isDST)
if (U_SUCCESS(status))
m_timeZoneDSTDisplayNameCache = String::adopt(WTFMove(dstDisplayNameBuffer));
m_timeZoneDSTDisplayNameCache = String::adopt(WTF::move(dstDisplayNameBuffer));
}
+#else
+ auto& timeZoneCache = *toICUTimeZone(this->timeZoneCache());
@ -1561,10 +1559,10 @@ index c40f917fc99f..755337022004 100644
void DateCache::resetIfNecessarySlow()
--
2.51.0
2.53.0
From 294fbe4a1e2d4a142696597ee8f2d1f748480691 Mon Sep 17 00:00:00 2001
From bc5d5cb86a3ba99bec46ca4b0bd519227ef2a615 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Wed, 2 Apr 2025 15:56:18 -0500
Subject: [PATCH 5/5] Build against ICU 60
@ -1586,7 +1584,7 @@ Subject: [PATCH 5/5] Build against ICU 60
13 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/Source/JavaScriptCore/runtime/IntlCache.cpp b/Source/JavaScriptCore/runtime/IntlCache.cpp
index d099acc9f2f4..26331b92cf84 100644
index 0bf726012dd4..04a0fef64ecc 100644
--- a/Source/JavaScriptCore/runtime/IntlCache.cpp
+++ b/Source/JavaScriptCore/runtime/IntlCache.cpp
@@ -26,6 +26,7 @@
@ -1635,7 +1633,7 @@ index 2b31dc1bdd9c..36adaac47e9a 100644
private:
UDateTimePatternGenerator* getSharedPatternGenerator(const CString& locale, UErrorCode& status)
diff --git a/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp b/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp
index 3742d05523f6..e8f6317d68b9 100644
index 6dce21592deb..2ab89a8a81fb 100644
--- a/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp
+++ b/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp
@@ -106,6 +106,7 @@ void IntlDisplayNames::initializeDisplayNames(JSGlobalObject* globalObject, JSVa
@ -1668,7 +1666,7 @@ index 3742d05523f6..e8f6317d68b9 100644
@@ -346,6 +352,11 @@ JSValue IntlDisplayNames::of(JSGlobalObject* globalObject, JSValue codeValue) co
return throwTypeError(globalObject, scope, "Failed to query a display name."_s);
}
return jsString(vm, String(WTFMove(buffer)));
return jsString(vm, String(WTF::move(buffer)));
+#else
+ UNUSED_PARAM(codeValue);
+ throwTypeError(globalObject, scope, "failed to initialize Intl.DisplayNames since feature is not supported by the ICU version"_s);
@ -1696,7 +1694,7 @@ index 17f257cb04a5..883825ed93f4 100644
enum class RelevantExtensionKey : uint8_t;
diff --git a/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp b/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
index c066e80ab130..6161997d3461 100644
index ba46191c620f..fe148279c676 100644
--- a/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
@@ -42,7 +42,6 @@
@ -1716,7 +1714,7 @@ index c066e80ab130..6161997d3461 100644
WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
diff --git a/Source/JavaScriptCore/runtime/IntlObject.cpp b/Source/JavaScriptCore/runtime/IntlObject.cpp
index f8413f12dec7..7041f19dfbbd 100644
index 899ea323a08a..84ab0e584090 100644
--- a/Source/JavaScriptCore/runtime/IntlObject.cpp
+++ b/Source/JavaScriptCore/runtime/IntlObject.cpp
@@ -168,7 +168,6 @@ namespace JSC {
@ -1740,11 +1738,11 @@ index f8413f12dec7..7041f19dfbbd 100644
putDirectWithoutTransition(vm, vm.propertyNames->DurationFormat, createDurationFormatConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
putDirectWithoutTransition(vm, vm.propertyNames->ListFormat, createListFormatConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
diff --git a/Source/JavaScriptCore/runtime/IntlPluralRules.cpp b/Source/JavaScriptCore/runtime/IntlPluralRules.cpp
index c451478086f7..76461d3c8bcd 100644
index 884bd1c96e4e..44d2ec41ba3a 100644
--- a/Source/JavaScriptCore/runtime/IntlPluralRules.cpp
+++ b/Source/JavaScriptCore/runtime/IntlPluralRules.cpp
@@ -278,11 +278,11 @@ JSValue IntlPluralRules::select(JSGlobalObject* globalObject, double value) cons
return jsString(vm, String(WTFMove(buffer)));
return jsString(vm, String(WTF::move(buffer)));
#else
Vector<UChar, 8> result(8);
- auto length = uplrules_selectWithFormat(m_pluralRules.get(), value, m_numberFormat.get(), result.data(), result.size(), &status);
@ -1758,7 +1756,7 @@ index c451478086f7..76461d3c8bcd 100644
}
diff --git a/Source/JavaScriptCore/runtime/JSDateMath.cpp b/Source/JavaScriptCore/runtime/JSDateMath.cpp
index 755337022004..d4b61acb3d13 100644
index fce7e787f9fc..c4bb091d554e 100644
--- a/Source/JavaScriptCore/runtime/JSDateMath.cpp
+++ b/Source/JavaScriptCore/runtime/JSDateMath.cpp
@@ -177,7 +177,7 @@ LocalTimeOffset DateCache::calculateLocalTimeOffset(double millisecondsFromEpoch
@ -1780,7 +1778,7 @@ index 755337022004..d4b61acb3d13 100644
}
// Do not use icu::TimeZone::createDefault. ICU internally has a cache for timezone and createDefault returns this cached value.
diff --git a/Source/WTF/wtf/URLHelpers.cpp b/Source/WTF/wtf/URLHelpers.cpp
index e984a4356715..7e0748f03722 100644
index ab3b2cdb51d0..0bc3320f96b5 100644
--- a/Source/WTF/wtf/URLHelpers.cpp
+++ b/Source/WTF/wtf/URLHelpers.cpp
@@ -866,7 +866,9 @@ static String escapeUnsafeCharacters(const String& sourceBuffer)
@ -1795,7 +1793,7 @@ index e984a4356715..7e0748f03722 100644
for (size_t j = 0; j < offset; ++j) {
diff --git a/Source/WTF/wtf/URLParser.cpp b/Source/WTF/wtf/URLParser.cpp
index 6325d2a26ba3..b3b292536be5 100644
index 3875c15e7ef8..5fa7ef50fb43 100644
--- a/Source/WTF/wtf/URLParser.cpp
+++ b/Source/WTF/wtf/URLParser.cpp
@@ -516,7 +516,7 @@ ALWAYS_INLINE void URLParser::utf8PercentEncode(const CodePointIterator<Characte
@ -1816,7 +1814,7 @@ index 6325d2a26ba3..b3b292536be5 100644
if (isError) {
appendToASCIIBuffer(replacementCharacterUTF8PercentEncoded.span8());
return;
@@ -2878,7 +2878,7 @@ auto URLParser::parseHostAndPort(CodePointIterator<CharacterType> iterator) -> H
@@ -2880,7 +2880,7 @@ auto URLParser::parseHostAndPort(CodePointIterator<CharacterType> iterator) -> H
std::array<uint8_t, U8_MAX_LENGTH> buffer;
size_t offset = 0;
UBool isError = false;
@ -1826,11 +1824,11 @@ index 6325d2a26ba3..b3b292536be5 100644
return HostParsingResult::InvalidHost;
utf8Encoded.append(std::span { buffer }.first(offset));
diff --git a/Source/WTF/wtf/unicode/UTF8Conversion.cpp b/Source/WTF/wtf/unicode/UTF8Conversion.cpp
index a86aefecd09c..c599c6727b53 100644
index edfa0b83890d..4c66ef7ede32 100644
--- a/Source/WTF/wtf/unicode/UTF8Conversion.cpp
+++ b/Source/WTF/wtf/unicode/UTF8Conversion.cpp
@@ -78,7 +78,9 @@ template<> char32_t next<Replacement::ReplaceInvalidSequences, char16_t>(std::sp
template<> bool append<Replacement::None, char8_t>(std::span<char8_t> characters, size_t& offset, char32_t character)
@@ -79,7 +79,9 @@ template<> char32_t next<Replacement::ReplaceInvalidSequences, char16_t>(std::sp
template<> bool append<char8_t>(std::span<char8_t> characters, size_t& offset, char32_t character)
{
UBool sawError = false;
- U8_APPEND(characters, offset, characters.size(), character, sawError);
@ -1854,18 +1852,18 @@ index fe8694cfce9d..7d8b5ad2e3c9 100644
break;
if (U_IS_BMP(token))
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
index 83377867f3b1..aa0941950559 100644
index a393ffc105cb..ee74e1326632 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -11,7 +11,7 @@ find_package(Cairo 1.14.0 REQUIRED)
@@ -13,7 +13,7 @@ find_package(Cairo 1.14.0 REQUIRED)
find_package(LibGcrypt 1.7.0 REQUIRED)
find_package(Libtasn1 REQUIRED)
find_package(HarfBuzz 1.4.2 REQUIRED COMPONENTS ICU)
find_package(Tasn1 REQUIRED)
find_package(HarfBuzz 1.7.5 REQUIRED COMPONENTS ICU)
-find_package(ICU 61.2 REQUIRED COMPONENTS data i18n uc)
+find_package(ICU 60 REQUIRED COMPONENTS data i18n uc)
find_package(JPEG REQUIRED)
find_package(Epoxy 1.5.4 REQUIRED)
find_package(LibXml2 2.8.0 REQUIRED)
--
2.51.0
2.53.0

3178
libsoup2.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,2 @@
SHA512 (webkitgtk-2.50.4.tar.xz) = e7b8a6d93f91cd63f00567c886f21853b3fd8e9e48ac21a61b4a841a096b472c3ad0ef0aea45d3c6b8a6bf13790683bdeb3c57f1ba4c949861e9599af4a0051c
SHA512 (webkitgtk-2.50.4.tar.xz.asc) = 2315affcf0c5f49bc0ff53301ecd625d4d46bf4ca3732af847594be34d85e2ca364233e22295b6a19c6f02aaa7adb6620e82aa0916a101c6c0ce5af270ca06bf
SHA512 (webkitgtk-2.52.3.tar.xz) = 8007688e4eb5b465a6f50e05e89858f970f7bbaed45844b8f97175de1fb24e41e6d88f4f6b6299d5ae2ad4e19483da371ac16257d787626da29de7551fbd2a3c
SHA512 (webkitgtk-2.52.3.tar.xz.asc) = cb7f6dc0e2d65c763988e9a18c48ee6810d60a8d2351912bdd33358dcd2d46b994ba34f85c6f8315a34d5b5cb78bd2f0dcb78d076af58e657d1817fdd56f005d

View File

@ -6,7 +6,7 @@
cp -p %1 _license_files/$(echo '%1' | sed -e 's!/!.!g')
Name: webkit2gtk3
Version: 2.50.4
Version: 2.52.3
Release: 1%{?dist}
Summary: GTK Web content engine library
@ -36,22 +36,26 @@ Patch201: evolution-sandbox-warning.patch
## Patches to support older or missing build dependencies
##
Patch300: cairo-1.15.patch
Patch301: glib-2.56.patch
Patch300: glib-2.56.patch
Patch301: cairo-1.15.patch
Patch302: gstreamer-1.16.patch
Patch303: harfbuzz-1.7.5.patch
Patch304: icu60.patch
Patch304: libsoup2.patch
Patch305: icu60.patch
Patch306: g-ir-scanner-nonfatal.patch
##
## Upstream patches to remove, hopefully after next update
##
# No patches currently! :)
# https://github.com/WebKit/WebKit/pull/58096
Patch400: aarch64-build.patch
BuildRequires: bison
BuildRequires: clang
BuildRequires: cmake
BuildRequires: flex
BuildRequires: gcc-toolset-14-libatomic-devel
BuildRequires: gettext
BuildRequires: git
BuildRequires: gnupg2
@ -217,8 +221,6 @@ rm -rf Source/ThirdParty/qunit/
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
# -DUSE_SYSTEM_MALLOC=ON is really bad for security, but libpas requires
# __atomic_compare_exchange_16 which is not available in RHEL 8.
%cmake \
-GNinja \
-DPORT=GTK \
@ -237,12 +239,14 @@ rm -rf Source/ThirdParty/qunit/
-DUSE_JPEGXL=OFF \
-DUSE_LIBBACKTRACE=OFF \
-DUSE_SOUP2=ON \
-DUSE_SYSTEM_MALLOC=ON \
-DUSE_SYSTEM_SYSPROF_CAPTURE=OFF \
%if 0%{?rhel}
%ifarch aarch64
-DUSE_64KB_PAGE_BLOCK=ON \
%endif
%ifarch aarch64 s390x
-DENABLE_SPELLCHECK=OFF \
%endif
%endif
%{nil}
@ -313,6 +317,9 @@ export NINJA_STATUS="[%f/%t][%e] "
%{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
%changelog
* Wed Apr 22 2026 Michael Catanzaro <mcatanzaro@redhat.com> - 2.52.3-1
- Update to 2.52.3
* Thu Dec 18 2025 Tomas Popela <tpopela@redhat.com> - 2.50.4-1
- Update to 2.50.4