- Update to version 2.44.4:

+ Add quirk to allow totale.rosettastone.com to load properly.
  + Fix webkit_web_resource_get_data() not working properly in some
    sites.
  + Fix not being able to jump-to-source in Web Inspector canvas
    traces.
  + Fix not being able to scroll list of WebGL shader programs in
    the Web Inspector.
  + Fix linker relocation errors on Debug/RelWithDebInfo builds.
  + Fix crashes when built with Clang with Link-Time Optimization
    (LTO).
  + Fix several crashes and rendering issues.
- Drop revert-271175.patch: Fixed upstream.
- Enable LTO again, pass define _lto_cflags for only select targets

OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/webkit2gtk3?expand=0&rev=479
This commit is contained in:
Dominique Leuenberger 2024-09-11 14:28:56 +00:00 committed by Git OBS Bridge
commit 15cddb5c5d
22 changed files with 5929 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,59 @@
From 9d5844679af8f84036f1b800307e799bd7ab73ba Mon Sep 17 00:00:00 2001
From: Philippe Normand <philn@igalia.com>
Date: Thu, 20 Jun 2024 12:39:27 -0700
Subject: [PATCH] [GTK][GStreamer] VA+DMABuf videos flicker
https://bugs.webkit.org/show_bug.cgi?id=253807
Reviewed by Xabier Rodriguez-Calvar.
By requesting a video frame allocation pool containing at least 3 frames, the risks of flickering
when rendering should be reduced.
* Source/WebCore/platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp:
(WebKitVideoSinkProbe::doProbe):
Canonical link: https://commits.webkit.org/280210@main
---
.../gstreamer/GStreamerVideoSinkCommon.cpp | 29 +++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp
index dc3f912e11d8..b2ddaad303e8 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp
@@ -73,8 +73,33 @@ class WebKitVideoSinkProbe {
player->updateVideoOrientation(tagList);
}
- if (info->type & GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM && GST_QUERY_TYPE(GST_PAD_PROBE_INFO_QUERY(info)) == GST_QUERY_ALLOCATION)
- gst_query_add_allocation_meta(GST_PAD_PROBE_INFO_QUERY(info), GST_VIDEO_META_API_TYPE, nullptr);
+ if (info->type & GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM && GST_QUERY_TYPE(GST_PAD_PROBE_INFO_QUERY(info)) == GST_QUERY_ALLOCATION) {
+ auto query = GST_PAD_PROBE_INFO_QUERY(info);
+ gst_query_add_allocation_meta(query, GST_VIDEO_META_API_TYPE, nullptr);
+
+ GstCaps* caps;
+ gboolean needPool;
+ gst_query_parse_allocation(query, &caps, &needPool);
+ if (UNLIKELY(!caps) || !needPool)
+ return GST_PAD_PROBE_OK;
+
+ unsigned size;
+#if GST_CHECK_VERSION(1, 24, 0)
+ if (gst_video_is_dma_drm_caps(caps)) {
+ GstVideoInfoDmaDrm drmInfo;
+ if (!gst_video_info_dma_drm_from_caps(&drmInfo, caps))
+ return GST_PAD_PROBE_OK;
+ size = GST_VIDEO_INFO_SIZE(&drmInfo.vinfo);
+ } else
+#endif
+ {
+ GstVideoInfo info;
+ if (!gst_video_info_from_caps(&info, caps))
+ return GST_PAD_PROBE_OK;
+ size = GST_VIDEO_INFO_SIZE(&info);
+ }
+ gst_query_add_allocation_pool(query, nullptr, size, 3, 0);
+ }
#if USE(GSTREAMER_GL)
// FIXME: Verify the following comment. Investigate what actually should be done here.

45
_constraints Normal file
View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<constraints>
<hardware>
<jobs>4</jobs>
<disk>
<size unit="G">26</size>
</disk>
<physicalmemory>
<size unit="G">15</size>
</physicalmemory>
</hardware>
<hostlabel exclude="true">SLOW_CPU</hostlabel>
<overwrite>
<conditions>
<arch>aarch64</arch>
<package>webkit2gtk3:gtk3-soup2</package>
</conditions>
<hardware>
<cpu>
<flag>asimdrdm</flag>
</cpu>
</hardware>
</overwrite>
<overwrite>
<conditions>
<arch>armv6l</arch>
<arch>armv7l</arch>
</conditions>
<hardware>
<physicalmemory>
<size unit="M">5500</size>
</physicalmemory>
</hardware>
</overwrite>
<overwrite>
<conditions>
<arch>riscv64</arch>
</conditions>
<hardware>
<physicalmemory>
<size unit="M">7250</size>
</physicalmemory>
</hardware>
</overwrite>
</constraints>

6
_multibuild Normal file
View File

@ -0,0 +1,6 @@
<multibuild>
<package>gtk3</package>
<package>gtk3-soup2</package>
<package>gtk4</package>
</multibuild>

2
baselibs.conf Normal file
View File

@ -0,0 +1,2 @@
libjavascriptcoregtk-4_0-18
libwebkit2gtk-4_0-37

11
reproducibility.patch Normal file
View File

@ -0,0 +1,11 @@
--- webkitgtk-2.40.0-orig/Source/JavaScriptCore/generator/GeneratedFile.rb 2023-02-20 10:22:05.321689800 +0100
+++ webkitgtk-2.40.0/Source/JavaScriptCore/generator/GeneratedFile.rb 2023-03-28 10:29:49.754813443 +0200
@@ -25,7 +25,7 @@
require 'digest'
$LICENSE = <<-EOF
-Copyright (C) #{Date.today.year} Apple Inc. All rights reserved.
+Copyright (C) 2023 Apple Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions

47
revert-271175.patch Normal file
View File

@ -0,0 +1,47 @@
From 9140ce712aa87091613874d802787ab476be0e39 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Wed, 14 Aug 2024 14:58:05 -0500
Subject: [PATCH] Revert "Cherry-pick 272448.770@safari-7618-branch
(6d311cd7fefc). https://bugs.webkit.org/show_bug.cgi?id=271175"
https://bugs.webkit.org/show_bug.cgi?id=278113
This reverts commit 279c9d7963182cc35cf4e0bfebe87df2d83eaef8.
This broke wasm, and I don't know how to fix it.
Canonical link: https://commits.webkit.org/274313.373@webkitglib/2.44
---
.../stress/many-calls-results-on-stack.js | 39 -------------------
Source/JavaScriptCore/wasm/WasmBBQJIT.cpp | 19 ---------
2 files changed, 58 deletions(-)
delete mode 100644 JSTests/wasm/stress/many-calls-results-on-stack.js
index 9049865e8ce7..3f142cf5e90f 100644
--- a/Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
+++ b/Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
@@ -3958,25 +3958,6 @@ void BBQJIT::returnValuesFromCall(Vector<Value, N>& results, const FunctionSigna
ASSERT(m_validFPRs.contains(returnLocation.asFPR(), Width::Width128));
m_fprSet.add(returnLocation.asFPR(), Width::Width128);
}
- } else {
- ASSERT(returnLocation.isStackArgument());
- // FIXME: Ideally, we would leave these values where they are but a subsequent call could clobber them before they are used.
- // That said, stack results are very rare so this isn't too painful.
- // Even if we did leave them where they are, we'd need to flush them to their canonical location at the next branch otherwise
- // we could have something like (assume no result regs for simplicity):
- // call (result i32 i32) $foo
- // if (result i32) // Stack: i32(StackArgument:8) i32(StackArgument:0)
- // // Stack: i32(StackArgument:8)
- // else
- // call (result i32 i32) $bar // Stack: i32(StackArgument:8) we have to flush the stack argument to make room for the result of bar
- // drop // Stack: i32(Stack:X) i32(StackArgument:8) i32(StackArgument:0)
- // drop // Stack: i32(Stack:X) i32(StackArgument:8)
- // end
- // return // Stack i32(*Conflicting locations*)
-
- Location canonicalLocation = canonicalSlot(result);
- emitMoveMemory(result.type(), returnLocation, canonicalLocation);
- returnLocation = canonicalLocation;
}
}
bind(result, returnLocation);

View File

@ -0,0 +1,165 @@
From b951404ea74ae432312a83138f5c8945a0d09e1b Mon Sep 17 00:00:00 2001
From: Jean-Yves Avenard <jya@apple.com>
Date: Wed, 24 Apr 2024 19:01:06 -0700
Subject: [PATCH] Cherry-pick 272448.960@safari-7618-branch (b7ccdb65258e).
https://bugs.webkit.org/show_bug.cgi?id=273176
Always copy all audio channels to the AudioBus to guarantee data lifetime.
https://bugs.webkit.org/show_bug.cgi?id=273176
rdar://125166710
Reviewed by Chris Dumez.
Following 275262@main, a task is dispatched on the audio render thread.
This task dispatch takes a reference to the source and destination AudioBus
however when a MultiChannelResampler is in use, the source AudioBus may
contain a raw pointer to the resampled's AudioArray and the lifetime of
this object may be shorter than the AudioBus.
In 232182@main, a speed and memory optimisation was added by passed-in buffer
as memory for the first channel in the AudioBus.
We revert this change for now and copy all channels' data to the AudioBus.
Added test.
* LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash-expected.txt: Added.
* LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash.html: Added.
* Source/WebCore/platform/audio/MultiChannelResampler.cpp:
(WebCore::MultiChannelResampler::MultiChannelResampler):
(WebCore::MultiChannelResampler::provideInputForChannel):
* Source/WebCore/platform/audio/MultiChannelResampler.h:
Canonical link: https://commits.webkit.org/274313.332@webkitglib/2.44
---
...et-concurrent-resampler-crash-expected.txt | 1 +
...dioworklet-concurrent-resampler-crash.html | 44 +++++++++++++++++++
.../platform/audio/MultiChannelResampler.cpp | 23 ++--------
.../platform/audio/MultiChannelResampler.h | 2 -
4 files changed, 48 insertions(+), 22 deletions(-)
create mode 100644 LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash-expected.txt
create mode 100644 LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash.html
diff --git a/LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash-expected.txt b/LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash-expected.txt
new file mode 100644
index 000000000000..654ddf7f17ef
--- /dev/null
+++ b/LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash-expected.txt
@@ -0,0 +1 @@
+This test passes if it does not crash.
diff --git a/LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash.html b/LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash.html
new file mode 100644
index 000000000000..b3ab181d4787
--- /dev/null
+++ b/LayoutTests/webaudio/crashtest/audioworklet-concurrent-resampler-crash.html
@@ -0,0 +1,44 @@
+<html>
+<head>
+ <script>
+ let worklet_source = `
+ class Processor extends AudioWorkletProcessor {
+ process(inputs, outputs, parameters) {
+ return true;
+ }
+ }
+ registerProcessor('P2', Processor);
+ `;
+
+ let blob = new Blob([worklet_source], { type: 'application/javascript' });
+ let worklet = URL.createObjectURL(blob);
+
+ var ctx = new AudioContext({ sampleRate: 44100});
+ const dest = ctx.destination;
+ dest.channelCountMode = "max";
+
+ async function main() {
+ await ctx.audioWorklet.addModule(worklet);
+ var script_processor = ctx.createScriptProcessor();
+ script_processor.onaudioprocess = function() {
+ dest.channelCount = 1;
+ audio_worklet.disconnect();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ var audio_worklet = new AudioWorkletNode(ctx, "P2");
+ script_processor.connect(audio_worklet);
+ audio_worklet.connect(dest);
+ }
+ </script>
+</head>
+<body onload="main()">
+ <p>This test passes if it does not crash.</p>
+ <script>
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+ </script>
+</body>
+</html>
diff --git a/Source/WebCore/platform/audio/MultiChannelResampler.cpp b/Source/WebCore/platform/audio/MultiChannelResampler.cpp
index e5a0cfc10caa..c44df274cbbc 100644
--- a/Source/WebCore/platform/audio/MultiChannelResampler.cpp
+++ b/Source/WebCore/platform/audio/MultiChannelResampler.cpp
@@ -42,19 +42,8 @@ namespace WebCore {
MultiChannelResampler::MultiChannelResampler(double scaleFactor, unsigned numberOfChannels, unsigned requestFrames, Function<void(AudioBus*, size_t framesToProcess)>&& provideInput)
: m_numberOfChannels(numberOfChannels)
, m_provideInput(WTFMove(provideInput))
- , m_multiChannelBus(AudioBus::create(numberOfChannels, requestFrames, false))
+ , m_multiChannelBus(AudioBus::create(numberOfChannels, requestFrames))
{
- // As an optimization, we will use the buffer passed to provideInputForChannel() as channel memory for the first channel so we
- // only need to allocate memory if there is more than one channel.
- if (numberOfChannels > 1) {
- m_channelsMemory = Vector<std::unique_ptr<AudioFloatArray>>(numberOfChannels - 1, [&](size_t i) {
- size_t channelIndex = i + 1;
- auto floatArray = makeUnique<AudioFloatArray>(requestFrames);
- m_multiChannelBus->setChannelMemory(channelIndex, floatArray->data(), requestFrames);
- return floatArray;
- });
- }
-
// Create each channel's resampler.
m_kernels = Vector<std::unique_ptr<SincResampler>>(numberOfChannels, [&](size_t channelIndex) {
return makeUnique<SincResampler>(scaleFactor, requestFrames, std::bind(&MultiChannelResampler::provideInputForChannel, this, std::placeholders::_1, std::placeholders::_2, channelIndex));
@@ -93,16 +82,10 @@ void MultiChannelResampler::process(AudioBus* destination, size_t framesToProces
void MultiChannelResampler::provideInputForChannel(std::span<float> buffer, size_t framesToProcess, unsigned channelIndex)
{
ASSERT(channelIndex < m_multiChannelBus->numberOfChannels());
- ASSERT(framesToProcess == m_multiChannelBus->length());
+ ASSERT(framesToProcess <= m_multiChannelBus->length());
- if (!channelIndex) {
- // As an optimization, we use the provided buffer as memory for the first channel in the AudioBus. This avoids
- // having to memcpy() for the first channel.
- RELEASE_ASSERT(framesToProcess <= buffer.size());
- m_multiChannelBus->setChannelMemory(0, buffer.data(), framesToProcess);
+ if (!channelIndex)
m_provideInput(m_multiChannelBus.get(), framesToProcess);
- return;
- }
// Copy the channel data from what we received from m_multiChannelProvider.
memcpySpan(buffer.subspan(0, framesToProcess), m_multiChannelBus->channel(channelIndex)->span().subspan(0, framesToProcess));
diff --git a/Source/WebCore/platform/audio/MultiChannelResampler.h b/Source/WebCore/platform/audio/MultiChannelResampler.h
index 25d43100b71f..214ee06567ac 100644
--- a/Source/WebCore/platform/audio/MultiChannelResampler.h
+++ b/Source/WebCore/platform/audio/MultiChannelResampler.h
@@ -29,7 +29,6 @@
#ifndef MultiChannelResampler_h
#define MultiChannelResampler_h
-#include "AudioArray.h"
#include <memory>
#include <wtf/Function.h>
#include <wtf/Vector.h>
@@ -62,7 +61,6 @@ private:
size_t m_outputFramesReady { 0 };
Function<void(AudioBus*, size_t framesToProcess)> m_provideInput;
RefPtr<AudioBus> m_multiChannelBus;
- Vector<std::unique_ptr<AudioFloatArray>> m_channelsMemory;
};
} // namespace WebCore
--
2.45.2

View File

@ -0,0 +1,88 @@
From 2fe5ae29a5f6434ef456afe9673a4f400ec63848 Mon Sep 17 00:00:00 2001
From: Jean-Yves Avenard <jya@apple.com>
Date: Fri, 14 Jun 2024 16:08:19 -0700
Subject: [PATCH] Cherry-pick 272448.1085@safari-7618.3.10-branch
(ff52ff7cb64e). https://bugs.webkit.org/show_bug.cgi?id=275431
HeapBufferOverflow in computeSampleUsingLinearInterpolation
https://bugs.webkit.org/show_bug.cgi?id=275431
rdar://125617812
Reviewed by Youenn Fablet.
Add boundary check.
This is a copy of blink code for that same function.
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/webaudio/audio_buffer_source_handler.cc;l=336-341
* LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash-expected.txt: Added.
* LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash.html: Added.
* Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::renderFromBuffer):
Canonical link: https://commits.webkit.org/274313.347@webkitglib/2.44
---
...er-sourcenode-resampler-crash-expected.txt | 1 +
...udiobuffer-sourcenode-resampler-crash.html | 25 +++++++++++++++++++
.../webaudio/AudioBufferSourceNode.cpp | 6 +++++
3 files changed, 32 insertions(+)
create mode 100644 LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash-expected.txt
create mode 100644 LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash.html
diff --git a/LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash-expected.txt b/LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash-expected.txt
new file mode 100644
index 000000000000..654ddf7f17ef
--- /dev/null
+++ b/LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash-expected.txt
@@ -0,0 +1 @@
+This test passes if it does not crash.
diff --git a/LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash.html b/LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash.html
new file mode 100644
index 000000000000..5fb2dd8c8a5f
--- /dev/null
+++ b/LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+ <script>
+ async function main() {
+ var ctx = new AudioContext();
+ var src = new AudioBufferSourceNode(ctx);
+ src.buffer = ctx.createBuffer(1, 8192, 44100);
+ src.start(undefined, 0.5);
+ src.playbackRate.value = -1;
+ src.connect(ctx.destination, 0, 0);
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ </script>
+</head>
+<body onload="main()">
+ <p>This test passes if it does not crash.</p>
+ <script>
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+ </script>
+</body>
+</html>
diff --git a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
index 298bd48cdff5..740b793e0ec5 100644
--- a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
@@ -350,6 +350,12 @@ bool AudioBufferSourceNode::renderFromBuffer(AudioBus* bus, unsigned destination
if (readIndex2 >= maxFrame)
readIndex2 = m_isLooping ? minFrame : readIndex;
+ // Final sanity check on buffer access.
+ // FIXME: as an optimization, try to get rid of this inner-loop check and
+ // put assertions and guards before the loop.
+ if (readIndex >= bufferLength || readIndex2 >= bufferLength)
+ break;
+
// Linear interpolation.
for (unsigned i = 0; i < numberOfChannels; ++i) {
float* destination = destinationChannels[i];
--
2.45.2

View File

@ -0,0 +1,102 @@
From e83e4c7460972898dc06a5f5ab36eed7c6b101b5 Mon Sep 17 00:00:00 2001
From: Jer Noble <jer.noble@apple.com>
Date: Tue, 11 Jun 2024 11:54:06 -0700
Subject: [PATCH] Cherry-pick 272448.1080@safari-7618.3.10-branch
(64c9479d6f29). https://bugs.webkit.org/show_bug.cgi?id=275273
Add check in AudioBufferSourceNode::renderFromBuffer() when detune is set to large negative value
https://bugs.webkit.org/show_bug.cgi?id=275273
rdar://125617842
Reviewed by Eric Carlson.
* LayoutTests/webaudio/audiobuffersourcenode-detune-crash-expected.txt: Added.
* LayoutTests/webaudio/audiobuffersourcenode-detune-crash.html: Added.
* Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::renderFromBuffer):
Canonical link: https://commits.webkit.org/274313.345@webkitglib/2.44
---
...buffersourcenode-detune-crash-expected.txt | 10 +++++++
.../audiobuffersourcenode-detune-crash.html | 30 +++++++++++++++++++
.../webaudio/AudioBufferSourceNode.cpp | 7 +++++
3 files changed, 47 insertions(+)
create mode 100644 LayoutTests/webaudio/audiobuffersourcenode-detune-crash-expected.txt
create mode 100644 LayoutTests/webaudio/audiobuffersourcenode-detune-crash.html
diff --git a/LayoutTests/webaudio/audiobuffersourcenode-detune-crash-expected.txt b/LayoutTests/webaudio/audiobuffersourcenode-detune-crash-expected.txt
new file mode 100644
index 000000000000..914ba0b133c4
--- /dev/null
+++ b/LayoutTests/webaudio/audiobuffersourcenode-detune-crash-expected.txt
@@ -0,0 +1,10 @@
+Attempting to create a AudioBufferSourceNode with a large negative detune value should not crash.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS Test passed because it did not crash.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/webaudio/audiobuffersourcenode-detune-crash.html b/LayoutTests/webaudio/audiobuffersourcenode-detune-crash.html
new file mode 100644
index 000000000000..e8af579db9d2
--- /dev/null
+++ b/LayoutTests/webaudio/audiobuffersourcenode-detune-crash.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="../resources/js-test-pre.js"></script>
+ <script src="resources/audio-testing.js"></script>
+ </head>
+ <body>
+ <script>
+ description("Attempting to create a AudioBufferSourceNode with a large negative detune value should not crash.");
+
+ jsTestIsAsync = true;
+
+ var context = new AudioContext();
+ var src = context.createBufferSource();
+ var buffer = context.createBuffer(1, 256, 44100);
+ src.buffer = buffer;
+ src.start(undefined, 1);
+ src.connect(context.listener.positionX, 0);
+ var panner = context.createPanner();
+ src.detune.value = -0xffffff;
+ panner.connect(context.destination);
+ setTimeout(() => {
+ testPassed("Test passed because it did not crash.");
+ finishJSTest();
+ }, 100);
+ </script>
+
+ <script src="../resources/js-test-post.js"></script>
+ </body>
+</html>
diff --git a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
index f86bffb9b507..298bd48cdff5 100644
--- a/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
@@ -328,9 +328,16 @@ bool AudioBufferSourceNode::renderFromBuffer(AudioBus* bus, unsigned destination
virtualReadIndex = readIndex;
} else if (!pitchRate) {
unsigned readIndex = static_cast<unsigned>(virtualReadIndex);
+ int deltaFrames = static_cast<int>(virtualDeltaFrames);
+ maxFrame = static_cast<unsigned>(virtualMaxFrame);
+
+ if (readIndex >= maxFrame)
+ readIndex -= deltaFrames;
for (unsigned i = 0; i < numberOfChannels; ++i)
std::fill_n(destinationChannels[i] + writeIndex, framesToProcess, sourceChannels[i][readIndex]);
+
+ virtualReadIndex = readIndex;
} else if (reverse) {
unsigned maxFrame = static_cast<unsigned>(virtualMaxFrame);
unsigned minFrame = static_cast<unsigned>(floorf(virtualMinFrame));
--
2.45.2

View File

@ -0,0 +1,84 @@
From 617f1c4c9c7f1525abc47967d4c7734fed3ff525 Mon Sep 17 00:00:00 2001
From: Antti Koivisto <antti@apple.com>
Date: Mon, 20 May 2024 11:36:34 -0700
Subject: [PATCH] Cherry-pick 279005@main (c2f9092d3a8e).
https://bugs.webkit.org/show_bug.cgi?id=268770
Nullptr crash due to `display:block ruby` and continuations
https://bugs.webkit.org/show_bug.cgi?id=268770
rdar://121960530
Reviewed by Alan Baradlay.
Continuations may end up splitting anonymous 'display:ruby' box inside block ruby.
* LayoutTests/fast/ruby/ruby-block-continuation-crash-expected.txt: Added.
* LayoutTests/fast/ruby/ruby-block-continuation-crash.html: Added.
* Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild):
Find the correct anonymous box from nested continuation structure.
Canonical link: https://commits.webkit.org/279005@main
Canonical link: https://commits.webkit.org/274313.286@webkitglib/2.44
---
.../ruby/ruby-block-continuation-crash-expected.txt | 3 +++
.../fast/ruby/ruby-block-continuation-crash.html | 9 +++++++++
.../rendering/updating/RenderTreeBuilderRuby.cpp | 13 ++++++++++---
3 files changed, 22 insertions(+), 3 deletions(-)
create mode 100644 LayoutTests/fast/ruby/ruby-block-continuation-crash-expected.txt
create mode 100644 LayoutTests/fast/ruby/ruby-block-continuation-crash.html
diff --git a/LayoutTests/fast/ruby/ruby-block-continuation-crash-expected.txt b/LayoutTests/fast/ruby/ruby-block-continuation-crash-expected.txt
new file mode 100644
index 000000000000..f85a15505104
--- /dev/null
+++ b/LayoutTests/fast/ruby/ruby-block-continuation-crash-expected.txt
@@ -0,0 +1,3 @@
+base with
+forced
+line break annotation This test passes if it doesn't crash.
diff --git a/LayoutTests/fast/ruby/ruby-block-continuation-crash.html b/LayoutTests/fast/ruby/ruby-block-continuation-crash.html
new file mode 100644
index 000000000000..3f762d4236ea
--- /dev/null
+++ b/LayoutTests/fast/ruby/ruby-block-continuation-crash.html
@@ -0,0 +1,9 @@
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+<ruby style="position: absolute">
+ <rb><span>base with <div>forced</div> line break</span></rb>
+ <rt>annotation</rt>
+</ruby>
+This test passes if it doesn't crash.
diff --git a/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp b/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
index 62d8b6803323..9f7634612822 100644
--- a/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
+++ b/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
@@ -271,10 +271,17 @@ RenderElement& RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild
if (!child.isRenderText() && child.style().display() == DisplayType::Ruby && parent.style().display() == DisplayType::RubyBlock)
return parent;
- if (parent.style().display() == DisplayType::RubyBlock && parent.firstChild()) {
+ if (parent.style().display() == DisplayType::RubyBlock) {
// See if we have an anonymous ruby box already.
- ASSERT(parent.firstChild()->style().display() == DisplayType::Ruby);
- return downcast<RenderElement>(*parent.firstChild());
+ // FIXME: It should be the immediate child but continuations can break this assumption.
+ for (CheckedPtr first = parent.firstChild(); first; first = first->firstChildSlow()) {
+ if (!first->isAnonymous()) {
+ ASSERT_NOT_REACHED();
+ break;
+ }
+ if (first->style().display() == DisplayType::Ruby)
+ return downcast<RenderElement>(*first);
+ }
}
if (parent.style().display() != DisplayType::Ruby) {
--
2.45.2

View File

@ -0,0 +1,65 @@
From: Carlos Garcia Campos <cgarcia@igalia.com>
Subject: Disable DMABuf renderer for NVIDIA proprietary drivers
Bug: https://bugs.webkit.org/show_bug.cgi?id=262607
Bug-Debian: https://bugs.debian.org/1039720
Origin: https://github.com/WebKit/WebKit/pull/18614
Index: webkitgtk-2.44.0/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
===================================================================
--- webkitgtk-2.44.0.orig/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
+++ webkitgtk-2.44.0/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
@@ -37,6 +37,7 @@
#include <WebCore/GLContext.h>
#include <WebCore/IntRect.h>
#include <WebCore/PlatformDisplay.h>
+#include <WebCore/PlatformDisplaySurfaceless.h>
#include <WebCore/ShareableBitmap.h>
#include <WebCore/SharedMemory.h>
#include <epoxy/egl.h>
@@ -45,6 +46,7 @@
#if USE(GBM)
#include <drm_fourcc.h>
+#include <WebCore/PlatformDisplayGBM.h>
#include <gbm.h>
static constexpr uint64_t s_dmabufInvalidModifier = DRM_FORMAT_MOD_INVALID;
@@ -58,6 +60,29 @@ static constexpr uint64_t s_dmabufInvali
namespace WebKit {
+static bool isNVIDIA()
+{
+ const char* forceDMABuf = getenv("WEBKIT_FORCE_DMABUF_RENDERER");
+ if (forceDMABuf && strcmp(forceDMABuf, "0"))
+ return false;
+
+ std::unique_ptr<WebCore::PlatformDisplay> platformDisplay;
+#if USE(GBM)
+ const char* disableGBM = getenv("WEBKIT_DMABUF_RENDERER_DISABLE_GBM");
+ if (!disableGBM || !strcmp(disableGBM, "0")) {
+ if (auto* device = WebCore::PlatformDisplay::sharedDisplay().gbmDevice())
+ platformDisplay = WebCore::PlatformDisplayGBM::create(device);
+ }
+#endif
+ if (!platformDisplay)
+ platformDisplay = WebCore::PlatformDisplaySurfaceless::create();
+
+ WebCore::GLContext::ScopedGLContext glContext(WebCore::GLContext::createOffscreen(platformDisplay ? *platformDisplay : WebCore::PlatformDisplay::sharedDisplay()));
+ if (strstr(reinterpret_cast<const char*>(glGetString(GL_VENDOR)), "NVIDIA"))
+ return true;
+ return false;
+}
+
OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBufferMode()
{
static OptionSet<DMABufRendererBufferMode> mode;
@@ -73,6 +98,9 @@ OptionSet<DMABufRendererBufferMode> Acce
return;
}
+ if (isNVIDIA())
+ return;
+
mode.add(DMABufRendererBufferMode::SharedMemory);
const char* forceSHM = getenv("WEBKIT_DMABUF_RENDERER_FORCE_SHM");

4555
webkit2gtk3.changes Normal file

File diff suppressed because it is too large Load Diff

BIN
webkit2gtk3.keyring Normal file

Binary file not shown.

629
webkit2gtk3.spec Normal file
View File

@ -0,0 +1,629 @@
#
# spec file for package webkit2gtk3
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define flavor @BUILD_FLAVOR@%nil
%define _name webkitgtk
%if "%{flavor}" == ""
# gtknamesuffix is just so we do not have to rename the source package - no package is generated here
%define _gtknamesuffix gtk3
ExclusiveArch: do-not-build
%endif
%define usegcc11 0%{?sle_version} && 0%{?sle_version} < 160000
%define use_jxl !(0%{?sle_version} && 0%{?sle_version} < 160000)
%if "%{flavor}" == "gtk3"
%define _gtknamesuffix gtk3
%define _pkgname_no_slpp libwebkit2gtk3
%define _apiver 4.1
%define _sover -4_1-0
%define _wk2sover -4_1-0
%define _sonamever 4.1
%define _sonameverpkg 4_1
%define _gtkver 3.0
%define _jscver 4.1
%define _pkgconfig_suffix gtk-3.0
%define _usesoup2 0
%endif
%if "%{flavor}" == "gtk3-soup2"
%define _gtknamesuffix gtk3-soup2
%define _pkgname_no_slpp libwebkit2gtk3
%define _apiver 4.0
%define _sover -4_0-18
%define _wk2sover -4_0-37
%define _sonamever 4.0
%define _sonameverpkg 4_0
%define _gtkver 3.0
%define _jscver 4
%define _pkgconfig_suffix gtk-3.0
%define _usesoup2 1
%endif
%if "%{flavor}" == "gtk4"
%define _gtknamesuffix gtk4
%define _pkgname_no_slpp libwebkit2gtk4
%define _apiver 6.0
%define _sover -6_0-0
%define _wk2sover -6_0-0
%define _sonamever 6.0
%define _sonameverpkg 6_0
%define _gtkver 4.0
%define _jscver 6.0
%define _pkgconfig_suffix gtk-4.0
%define _usesoup2 0
%define _wk2sover6api -6_0-4
%define _soverlj6api -6_0-1
%define _with_backtrace 1
%endif
# Disable LTO on select targets
%ifarch %{ix86} ppc64le
%global _lto_cflags %{nil}
%endif
Name: webkit2%{_gtknamesuffix}
Version: 2.44.4
Release: 0
Summary: Library for rendering web content, GTK+ Port
License: BSD-3-Clause AND LGPL-2.0-or-later
Group: Development/Libraries/C and C++
URL: https://webkitgtk.org
Source0: %{url}/releases/%{_name}-%{version}.tar.xz
Source1: %{url}/releases/%{_name}-%{version}.tar.xz.asc
Source98: baselibs.conf
Source99: webkit2gtk3.keyring
# PATCH-FEATURE-OPENSUSE reproducibility.patch -- Make build reproducible
Patch0: reproducibility.patch
# PATCH-FIX-UPSTREAM webkit2gtk3-disable-dmabuf-nvidia.patch boo#1216778 mgorse@suse.com -- disable the DMABuf renderer for NVIDIA proprietary drivers.
Patch2: webkit2gtk3-disable-dmabuf-nvidia.patch
BuildRequires: Mesa-libEGL-devel
BuildRequires: Mesa-libGL-devel
BuildRequires: Mesa-libGLESv1_CM-devel
BuildRequires: Mesa-libGLESv2-devel
BuildRequires: Mesa-libGLESv3-devel
BuildRequires: bison >= 2.3
BuildRequires: bubblewrap
BuildRequires: cmake
BuildRequires: enchant-devel
BuildRequires: flex
%if 0%{?_with_backtrace}
BuildRequires: libbacktrace-devel
%endif
%if %usegcc11
BuildRequires: gcc11-c++
%else
BuildRequires: gcc-c++ >= 10.2
%endif
BuildRequires: gobject-introspection-devel
BuildRequires: gperf >= 3.0.1
BuildRequires: hyphen-devel
BuildRequires: libjpeg-devel
BuildRequires: ninja
BuildRequires: openjpeg2
BuildRequires: openjpeg2-devel
BuildRequires: perl >= 5.10.0
BuildRequires: pkgconfig
BuildRequires: python3
BuildRequires: ruby >= 2.5
BuildRequires: unifdef
BuildRequires: xdg-dbus-proxy
BuildRequires: pkgconfig(atk)
BuildRequires: pkgconfig(atspi-2) >= 2.5.3
BuildRequires: pkgconfig(cairo) >= 1.16.0
BuildRequires: pkgconfig(epoxy)
BuildRequires: pkgconfig(fontconfig) >= 2.13.0
BuildRequires: pkgconfig(freetype2) >= 2.9.0
%if "%{flavor}" == "gtk4"
BuildRequires: pkgconfig(glib-2.0) >= 2.70.0
%else
BuildRequires: pkgconfig(glib-2.0) >= 2.56.4
%endif
BuildRequires: pkgconfig(icu-i18n)
%if %usegcc11
BuildRequires: pkgconfig(glproto)
%endif
BuildRequires: pkgconfig(gnutls) >= 3.0.0
BuildRequires: pkgconfig(gstreamer-1.0) >= 1.18.4
BuildRequires: pkgconfig(gstreamer-app-1.0)
BuildRequires: pkgconfig(gstreamer-audio-1.0)
BuildRequires: pkgconfig(gstreamer-codecparsers-1.0)
BuildRequires: pkgconfig(gstreamer-fft-1.0)
BuildRequires: pkgconfig(gstreamer-gl-1.0)
BuildRequires: pkgconfig(gstreamer-mpegts-1.0)
BuildRequires: pkgconfig(gstreamer-pbutils-1.0)
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires: pkgconfig(gstreamer-tag-1.0)
BuildRequires: pkgconfig(gstreamer-transcoder-1.0)
BuildRequires: pkgconfig(gstreamer-video-1.0)
%if "%{flavor}" == "gtk3" || "%{flavor}" == "gtk3-soup2"
BuildRequires: pkgconfig(gtk+-3.0) >= 3.22.0
%endif
%if "%{flavor}" == "gtk4"
BuildRequires: pkgconfig(gtk4) >= 4.6.0
BuildRequires: pkgconfig(xcomposite)
%endif
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(harfbuzz) >= 1.4.2
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libavif) >= 0.9.0
%if %{use_jxl}
BuildRequires: pkgconfig(libjxl)
%endif
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libseccomp)
BuildRequires: pkgconfig(libsecret-1)
%if %{_usesoup2}
BuildRequires: pkgconfig(libsoup-2.4) >= 2.54.0
%else
BuildRequires: pkgconfig(libsoup-3.0) >= 3.0.0
%endif
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(libwoff2dec)
BuildRequires: pkgconfig(libxml-2.0) >= 2.8.0
BuildRequires: pkgconfig(libxslt) >= 1.1.7
BuildRequires: pkgconfig(manette-0.2)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(upower-glib)
BuildRequires: pkgconfig(wayland-protocols)
BuildRequires: pkgconfig(wpe-1.0) >= 1.3.0
BuildRequires: pkgconfig(wpebackend-fdo-1.0) >= 1.6.0
BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(zlib)
%description
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
%package -n libwebkit2gtk%{_wk2sover}
Summary: Library for rendering web content, GTK+ Port
# Require the injected bundles. The bundles are dlopen()ed
Group: System/Libraries
Requires: bubblewrap
%if "%{flavor}" == "gtk4"
Requires: libjavascriptcoregtk%{_soverlj6api} = %{version}
%else
Requires: libjavascriptcoregtk%{_sover} = %{version}
%endif
Requires: libwayland-client0 >= 1.20.0
Requires: webkit2gtk-%{_sonameverpkg}-injected-bundles
Requires: xdg-dbus-proxy
Provides: %{_pkgname_no_slpp} = %{version}
Provides: WebKitGTK-%{_apiver}
Obsoletes: webkit2gtk3-plugin-process-gtk2 < %{version}
Recommends: geoclue2
Recommends: gstreamer-plugins-bad
Recommends: gstreamer-plugins-good
Recommends: xdg-desktop-portal-gtk
%description -n libwebkit2gtk%{_wk2sover}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
%package -n libwebkitgtk%{_wk2sover6api}
Summary: Library for rendering web content, GTK+ Port
# Require the injected bundles. The bundles are dlopen()ed
Group: System/Libraries
Requires: bubblewrap
%if "%{flavor}" == "gtk4"
Requires: libjavascriptcoregtk%{_soverlj6api} = %{version}
Requires: webkitgtk-%{_sonameverpkg}-injected-bundles
# Package was wrongly named
Obsoletes: libwebkitgtk6_0-4 < 2.42.6
%else
Requires: libjavascriptcoregtk%{_sover} = %{version}
Requires: webkit2gtk-%{_sonameverpkg}-injected-bundles
%endif
Requires: xdg-dbus-proxy
Provides: %{_pkgname_no_slpp} = %{version}
Provides: WebKitGTK-%{_apiver}
Obsoletes: webkit2gtk3-plugin-process-gtk2 < %{version}
Recommends: geoclue2
Recommends: gstreamer-plugins-bad
Recommends: gstreamer-plugins-good
Recommends: xdg-desktop-portal-gtk
%description -n libwebkitgtk%{_wk2sover6api}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
%package -n webkitgtk-%{_sonameverpkg}-injected-bundles
Summary: Injected bundles for %{name}
Group: System/Libraries
%description -n webkitgtk-%{_sonameverpkg}-injected-bundles
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
%package -n webkit2gtk-%{_sonameverpkg}-injected-bundles
Summary: Injected bundles for %{name}
Group: System/Libraries
%description -n webkit2gtk-%{_sonameverpkg}-injected-bundles
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
%package -n libjavascriptcoregtk%{_sover}
Summary: JavaScript Core Engine, GTK+ Port
Group: System/Libraries
%description -n libjavascriptcoregtk%{_sover}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
%package -n libjavascriptcoregtk%{_soverlj6api}
Summary: JavaScript Core Engine, GTK+ Port
Group: System/Libraries
# Package was wrongly named
Obsoletes: libjavascriptcoregtk6_0-1 < 2.42.6
%description -n libjavascriptcoregtk%{_soverlj6api}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
%package -n typelib-1_0-WebKit-%{_sonameverpkg}
Summary: Introspection bindings for %{name}
Group: System/Libraries
%description -n typelib-1_0-WebKit-%{_sonameverpkg}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
This package provides the GObject Introspection bindings for the GTK+
port of WebKit2.
%package -n typelib-1_0-WebKitWebProcessExtension-%{_sonameverpkg}
Summary: Introspection bindings for %{name}
Group: System/Libraries
%description -n typelib-1_0-WebKitWebProcessExtension-%{_sonameverpkg}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
This package provides the GObject Introspection bindings for the GTK+
port of WebKit2.
%package -n typelib-1_0-WebKit2-%{_sonameverpkg}
Summary: Introspection bindings for %{name}
Group: System/Libraries
%description -n typelib-1_0-WebKit2-%{_sonameverpkg}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
This package provides the GObject Introspection bindings for the GTK+
port of WebKit2.
%package -n typelib-1_0-WebKit2WebExtension-%{_sonameverpkg}
Summary: Introspection bindings for %{name}
Group: System/Libraries
%description -n typelib-1_0-WebKit2WebExtension-%{_sonameverpkg}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
This package provides the GObject Introspection bindings for the GTK+
port of WebKit2.
%package -n typelib-1_0-JavaScriptCore-%{_sonameverpkg}
Summary: Introspection bindings for the GTK+ port of the JavaScript Core Engine
Group: System/Libraries
%description -n typelib-1_0-JavaScriptCore-%{_sonameverpkg}
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
This package provides the GObject Introspection bindings for the GTK+
port of the JavaScript Core engine.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
%if "%{flavor}" == "gtk4"
Requires: libjavascriptcoregtk%{_soverlj6api} = %{version}
Requires: libwebkitgtk%{_wk2sover6api} = %{version}
Requires: typelib-1_0-JavaScriptCore-%{_sonameverpkg}
Requires: typelib-1_0-WebKit-%{_sonameverpkg}
Requires: typelib-1_0-WebKitWebProcessExtension-%{_sonameverpkg}
%else
Requires: libjavascriptcoregtk%{_sover} = %{version}
Requires: libwebkit2gtk%{_wk2sover} = %{version}
Requires: typelib-1_0-JavaScriptCore-%{_sonameverpkg}
Requires: typelib-1_0-WebKit2-%{_sonameverpkg}
Requires: typelib-1_0-WebKit2WebExtension-%{_sonameverpkg}
%endif
%description devel
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser. It is made to be
embedded in other applications, such as mail readers, or web browsers.
It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.
%package -n webkit-jsc-%{_jscver}
Summary: JavaScript command line from WebKit
Group: Development/Tools/Other
%description -n webkit-jsc-%{_jscver}
jsc is a command-line utility that allows you to run JavaScript
programs outside of the context of a web browser. It is primarily
used as part of the test harness for validating the JavaScript
portions of WebKit, but can also be used as a scripting tool.
jsc can be run in an interactive mode to test out JavaScript
expressions, or it can be passed one or more files to run similar to
invoking a Perl or Python script.
%package minibrowser
Summary: MiniBrowser from WebKit
Group: Development/Tools/Other
%description minibrowser
A small test browswer from webkit, useful for testing features.
%dnl Expand %%lang_package to Obsoletes its older-name counterpart
%package -n WebKitGTK-%{_apiver}-lang
Summary: Translations for package %{name}
Group: System/Localization
Requires: WebKitGTK-%{_apiver} = %{version}
Provides: WebKitGTK-%{_apiver}-lang-all = %{version}
Obsoletes: WebKit2GTK-lang < 2.40.0
Obsoletes: libwebkit2gtk3-lang < %{version}
BuildArch: noarch
%description -n WebKitGTK-%{_apiver}-lang
Provides translations for the "%{name}" package.
%prep
%autosetup -p1 -n webkitgtk-%{version}
# Adjust path to GStreamer's gst-plugin-scanner (we rename it to - gst-plugin-scanner-%%{_target_cpu}
sed -i 's|/gst-plugin-scanner|/gst-plugin-scanner-%{_target_cpu}|' ./Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
%build
# Here we must muzzle our dog so it doesn't eat all the memory
max_link_jobs="%{?jobs}%{!?jobs:1}"
max_compile_jobs="%{?jobs}%{!?jobs:4}"
echo "Available memory:"
cat /proc/meminfo
echo "System limits:"
ulimit -a
if test -n "$max_link_jobs" -a "$max_link_jobs" -gt 1 ; then
mem_per_process=2000000
max_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
max_jobs="$(($max_mem / $mem_per_process))"
test "$max_link_jobs" -gt "$max_jobs" && max_link_jobs="$max_jobs" && echo "Warning: Reducing number of link jobs to $max_jobs because of memory limits"
test "$max_link_jobs" -le 0 && max_link_jobs=1 && echo "Warning: Not linking in parallel at all becuse of memory limits"
fi
export PYTHON=%{_bindir}/python3
# Use linker flags to reduce memory consumption
%global optflags %(echo %{optflags} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads | sed 's/-g /-g1 /')
%cmake \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_DOCUMENTATION=OFF \
-DUSE_LIBBACKTRACE=%[ %{defined _with_backtrace} ? "ON" : "OFF" ] \
%if %usegcc11
-DCMAKE_C_COMPILER=gcc-11 \
-DCMAKE_CXX_COMPILER=g++-11 \
%endif
-DPORT=GTK \
%if "%{flavor}" == "gtk4"
-DLIBEXEC_INSTALL_DIR=%{_libexecdir}/libwebkitgtk%{_wk2sover} \
-DUSE_GTK4=ON \
-DENABLE_WEBDRIVER=ON \
%else
-DLIBEXEC_INSTALL_DIR=%{_libexecdir}/libwebkit2gtk%{_wk2sover} \
-DUSE_GTK4=OFF \
-DENABLE_WEBDRIVER=OFF \
%endif
-DUSE_AVIF=ON \
-DENABLE_MINIBROWSER=ON \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now -pthread" \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now -pthread" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now -pthread" \
-DPYTHON_EXECUTABLE=%{_bindir}/python3 \
%if %{_usesoup2}
-DUSE_SOUP2=ON \
%endif
%ifarch aarch64
-DENABLE_JIT=OFF \
-DUSE_SYSTEM_MALLOC=ON \
%else
%if 0%{?sle_version} && 0%{?sle_version} < 160000
-DUSE_SYSTEM_MALLOC=ON \
%endif
%endif
%if !%{use_jxl}
-DUSE_JPEGXL=OFF \
%endif
%ninja_build -j $max_link_jobs
%install
%ninja_install -C build
%find_lang WebKitGTK-%{_apiver}
%if "%{flavor}" == "gtk4"
%ldconfig_scriptlets -n libwebkitgtk%{_wk2sover6api}
%ldconfig_scriptlets -n libjavascriptcoregtk%{_soverlj6api}
%else
%ldconfig_scriptlets -n libwebkit2gtk%{_wk2sover}
%ldconfig_scriptlets -n libjavascriptcoregtk%{_sover}
%endif
%if "%{flavor}" == "gtk4"
%files -n libwebkitgtk%{_wk2sover6api}
# Exclude jsc and MiniBrowser - we package them on their own
%exclude %{_libexecdir}/libwebkitgtk%{_wk2sover}/jsc
%exclude %{_libexecdir}/libwebkitgtk%{_wk2sover}/MiniBrowser
%{_libexecdir}/libwebkitgtk%{_wk2sover}/
%{_libdir}/libwebkitgtk-%{_apiver}.so.*
%files -n webkitgtk-%{_sonameverpkg}-injected-bundles
%dir %{_libdir}/webkitgtk-%{_apiver}
%dir %{_libdir}/webkitgtk-%{_apiver}/injected-bundle
%{_libdir}/webkitgtk-%{_apiver}/injected-bundle/libwebkitgtkinjectedbundle.so
%else
%files -n libwebkit2gtk%{_wk2sover}
# Exclude jsc and MiniBrowser - we package them on their own
%exclude %{_libexecdir}/libwebkit2gtk%{_wk2sover}/jsc
%exclude %{_libexecdir}/libwebkit2gtk%{_wk2sover}/MiniBrowser
%{_libexecdir}/libwebkit2gtk%{_wk2sover}/
%{_libdir}/libwebkit2gtk-%{_apiver}.so.*
%files -n webkit2gtk-%{_sonameverpkg}-injected-bundles
%dir %{_libdir}/webkit2gtk-%{_apiver}
%dir %{_libdir}/webkit2gtk-%{_apiver}/injected-bundle
%{_libdir}/webkit2gtk-%{_apiver}/injected-bundle/libwebkit2gtkinjectedbundle.so
%endif
%if "%{flavor}" == "gtk4"
%files -n libjavascriptcoregtk%{_soverlj6api}
%license Source/JavaScriptCore/COPYING.LIB
%{_libdir}/libjavascriptcoregtk-%{_apiver}.so.*
%files -n typelib-1_0-WebKit-%{_sonameverpkg}
%{_libdir}/girepository-1.0/WebKit-%{_sonamever}.typelib
%files -n typelib-1_0-WebKitWebProcessExtension-%{_sonameverpkg}
%{_libdir}/girepository-1.0/WebKitWebProcessExtension-%{_sonamever}.typelib
%else
%files -n libjavascriptcoregtk%{_sover}
%license Source/JavaScriptCore/COPYING.LIB
%{_libdir}/libjavascriptcoregtk-%{_apiver}.so.*
%files -n typelib-1_0-WebKit2-%{_sonameverpkg}
%{_libdir}/girepository-1.0/WebKit2-%{_sonamever}.typelib
%files -n typelib-1_0-WebKit2WebExtension-%{_sonameverpkg}
%{_libdir}/girepository-1.0/WebKit2WebExtension-%{_sonamever}.typelib
%endif
%files -n typelib-1_0-JavaScriptCore-%{_sonameverpkg}
%{_libdir}/girepository-1.0/JavaScriptCore-%{_sonamever}.typelib
%files devel
%{_datadir}/gir-1.0/*.gir
%{_includedir}/webkitgtk-%{_apiver}/
%if "%{flavor}" == "gtk4"
%{_libdir}/libwebkitgtk-%{_sonamever}.so
%{_libdir}/pkgconfig/webkitgtk-%{_apiver}.pc
%{_libdir}/pkgconfig/webkitgtk-web-process-extension-%{_apiver}.pc
%else
%{_libdir}/libwebkit2gtk-%{_sonamever}.so
%{_libdir}/pkgconfig/webkit2gtk-%{_apiver}.pc
%{_libdir}/pkgconfig/webkit2gtk-web-extension-%{_apiver}.pc
%endif
%{_libdir}/libjavascriptcoregtk-%{_sonamever}.so
%{_libdir}/pkgconfig/javascriptcoregtk-%{_apiver}.pc
%files -n webkit-jsc-%{_jscver}
%if "%{flavor}" == "gtk4"
%{_libexecdir}/libwebkitgtk%{_wk2sover}/jsc
%else
%{_libexecdir}/libwebkit2gtk%{_wk2sover}/jsc
%endif
%files minibrowser
%if "%{flavor}" == "gtk4"
%{_libexecdir}/libwebkitgtk%{_wk2sover}/MiniBrowser
%{_bindir}/WebKitWebDriver
%else
%{_libexecdir}/libwebkit2gtk%{_wk2sover}/MiniBrowser
%endif
%files -n WebKitGTK-%{_apiver}-lang -f WebKitGTK-%{_apiver}.lang
%changelog

BIN
webkitgtk-2.44.2.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEAToBJ6ycZbNP+mJSbBAJtpOXU5MFAmZF9iQACgkQbBAJtpOX
U5ORGQ//ZZJ0eviTeoGMmxzwbnGHPuusinRUsR7Tc6U1nN+Q9AFspcTQyCrj9IEB
fsyV9Kcu7v8FB7HQvguY1mkyUSNTiteKw9YwvUtqqrrFoYAnVKTReUEnt38SUWWT
LiwcQ3D13OiVqywRRrNalo7BqzfqoOylhDwdIg1D7w6HCHNxlhAaw71b9TRinZx4
a3WyfPz3E1lnEIzU2djsZv3lhQJa6tHR39pCXacXQGU35v88VbZ3mHeUyche6sQ0
BC+6IB1nphyO2/pLcYPv7Dp9IFEnTTl3A44v/7Zaj3eLX0+6GdZuuUc9x22+Sl+6
IwZ5AjQOXw8+tGNTkGbWnD3kgRc14s+uCNJ8qEjSmv/oN3hUEh3vf4+pL4gDgGYi
jVQe9uIjQO5AfgEFTumMfTaeN5MgvWGTPjtPhjfN3MyKgkU+I3qrdt+fHH57HUeJ
TiWkHFxgI32ucjRjdQ1YqZ5sUna/5uKKyxufa7hwOzwYumhFcouMzAqBxJ+96X7n
tL0/j+JZHmeJwCHUdIaTnTh2pYFZ4HFfJqcXda+xq43wNAM7qKMjps6h+szNKSo/
9xBEFpuWyV7xyCzGQ3Ul/S/DZ1dr/UQrK8SA9EBjVhsVQTmoxf8A+QK/LJqmtHwA
dfkKRYwQ6qedeESVJ2+HCzvZnxhKyU8cSgvI2Yz1pe7C3zFJv3o=
=unwr
-----END PGP SIGNATURE-----

BIN
webkitgtk-2.44.3.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEAToBJ6ycZbNP+mJSbBAJtpOXU5MFAma7BpQACgkQbBAJtpOX
U5PeIxAAhv6cl4WsiFyPuNQdzik1GdxtSuFxpBW9SokOxFPn4zW/sMIkke20q1et
RhGwKskkuOEgavV/2grC07d8peFbsse6zTeerZECRaB+Saj7ZOWoZQoDbCTxWjzi
yoxsziwIJA4LDdhqxV8TRSCl3bLy+uFQkUfNX1JJot9bMze+9lUjxJ/hAglCUjP8
WIJdQ1mE+cJguBHJMfdZbDINLywRjesaLXAvTCmpnn3mn0GXMbCQM+W+GCybwhMB
1dl8eFEfcvAhUe85mHJNW3WmYRzvquTMuFuLzU8b1U1/6+LQc+IOXAZEpkP9ztSn
VItLwPnHJ/4g5KY+gUonMxZ1LMhTwiu/ga41Yez0sZftkC6tgIPIldaTY/tjeNLh
C5GnMSyRTJ7d2ywLJSdzCIGkwhOJ7oHArGxbpzCWft3rrU8SbvQd3dGOMip1iniN
ewdMyoqZQgzN51BRUklhjoBCaUkcVbgYr6qfLZiU42kR4RWgrTx/s//naCM4peQe
8vGeRlF9zpsGw3ivCJBNjqk9SrqcPQ2i52lgKs28DkVy13duuQwKEMa+/Tv7eH60
wNdKSRjeA81DLZkuyX5yJOEJ1pru1HiS4sdP112dPb1HajVhOehZJc7a8b9ohOH5
go2lIxnJjZOXRHM/JwtTcLKsnfna1m6yzNGdOHNcLKPJodHcpXY=
=jHOh
-----END PGP SIGNATURE-----

3
webkitgtk-2.44.4.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2ce4ec1b78413035037aba8326b31ed72696626b7bea7bace5e46ac0d8cbe796
size 35858056

View File

@ -0,0 +1,6 @@
-----BEGIN PGP SIGNATURE-----
iF0EABEDAB0WIQRao7wzT9fjNp58d7KRxVnb5MkSOwUCZt6j0AAKCRCRxVnb5MkS
O8uuAJ4hLC/UXFDJsanfXyaQ6/y3hf684ACdEdyKE/nxBYL9dQEzL/50xEBsl5o=
=aQH7
-----END PGP SIGNATURE-----