Skip to content

Conversation

@lulicdarko
Copy link

@lulicdarko lulicdarko commented Jan 21, 2026

Added option to enable new dtags.

Explanation:
This change introduces a Cmake option ENABLE_NEW_DTAGS to allow to use --enable-new-dtags for WPE Webkit build.
Primary goal is to force the linker to use DT_RUNPATH instead of legacy DT_RPATH. This change is important because:

  1. DT_RUNPATH respects LD_LIBRARY_PATH unlike older DT_RPATH
  2. This allows us to override system libraries or redirect library lookup at runtime without re-linkiing the entire Webkit.

Changes:

  • Source/cmake/OptionsCommon.cmake

youennf and others added 30 commits March 11, 2024 14:40
…after M120 upgrade

https://bugs.webkit.org/show_bug.cgi?id=267281
rdar://problem/120725671

Reviewed by Eric Carlson.

We were sometimes deadlocking when:
- main thread asks something to the webrtc stack by hopping to the signalling thread.
- signaling thread is destroying the LibWebRTCAudioModule which was calling callOnMainThreadAndWait to do its cleanup.

Instead of cleaning things in LibWebRTCAudioModule destructor synchronsouly, we are doing the clean-up asynchronously in LibWebRTCAudioModule::Terminate.
Setting m_logTimer to nullptr there is fine since m_logTimer is used in Start/Stop via callOnMainThread.

* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
(WebCore::LibWebRTCAudioModule::~LibWebRTCAudioModule):
(WebCore::LibWebRTCAudioModule::Terminate):
* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:

Canonical link: https://commits.webkit.org/272828@main
https://bugs.webkit.org/show_bug.cgi?id=265864

Reviewed by Philippe Normand.

Also update sources for 271602@main, 271603@main and 271605@main.

* Source/ThirdParty/libwebrtc/CMakeLists.txt:
* Source/ThirdParty/libwebrtc/Source/webrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc:

Canonical link: https://commits.webkit.org/272175@main
https://bugs.webkit.org/show_bug.cgi?id=265864

Reviewed by Philippe Normand.

WebKitGTK and WPE build was broken after the update, it's necessary to
update the CMake sources as well as other source files due to API
changes.

* Source/ThirdParty/libwebrtc/CMakeLists.txt:
* Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:
* Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoEncoderFactory.cpp:
(WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder):

Canonical link: https://commits.webkit.org/272416@main
Imported graphene version (1.6.0) was from 2017.

Library is available through system dependencies.
https://bugs.webkit.org/show_bug.cgi?id=247873

Reviewed by Michael Catanzaro.

This fixes several warnings that appear when building for ARMv7 (32-bits):
 - deprecated-enum-enum-conversion
 - unused-variable
 - unused-result
 - overflow
 - sign-compare

It also disables two warnings for old versions of GCC
(old versions give false positives).

* PerformanceTests/MallocBench/MallocBench/stress_aligned.cpp:
(benchmark_stress_aligned):
* Source/JavaScriptCore/assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::revertJumpTo_movT3movtcmpT2):
(JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp12Reg4FourFours):
(JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp12Reg4Reg4Imm12):
(JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp12Reg4Reg4Reg4Imm8):
(JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp12Reg40Imm3Reg4Imm20Imm5):
* Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp:
(WebCore::AccessibilityObjectAtspi::characterIndex const):
(WebCore::AccessibilityObjectAtspi::selectionChanged):
* Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:
(WebCore::FECompositeSoftwareApplier::applyArithmetic const):
* Source/WebCore/platform/graphics/gbm/DMABufReleaseFlag.h:
(WebCore::DMABufReleaseFlag::release):
* Source/cmake/WebKitCompilerFlags.cmake:

Canonical link: https://commits.webkit.org/256792@main
Fix error while building Cog:

Run-time dependency wayland-protocols found: YES 1.12
Tools/wpe/cog/platform/wayland/meson.build:94:12:
ERROR: Problem encountered: Cannot find protocol text-input-unstable-v3, file does not exist:
WPEWebKit/WebKitBuild/DependenciesWPE/Root/share/wayland-protocols/unstable/text-input/text-input-unstable-v3.xml
…edded/wpe-2.38-libwebrtc-m120

Wpe 2.38 libwebrtc m120
…hen not handled

https://bugs.webkit.org/show_bug.cgi?id=271041

Reviewed by Philippe Normand.

We may wish to use GST_EVENT_CUSTOM_DOWNSTREAM_OOB event for use cases beyond signaling an "attempt-to-decrypt".

Patch by Filipe Norte <filipe.norte@sky.uk>.

* Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(sinkEventHandler):

Canonical link: https://commits.webkit.org/276144@main
…8-fix-hole-punching

Disable blending of hole punching buffers with rounded rect clip
https://bugs.webkit.org/show_bug.cgi?id=271696

Reviewed by Adrian Perez de Castro.

Based on original patch by: Eugene Mutavchi <Ievgen_Mutavchi@comcast.com>

* Source/ThirdParty/libwebrtc/CMakeLists.txt:
* Source/ThirdParty/libwebrtc/cmake/FindLibPulse.cmake: Added.

Canonical link: https://commits.webkit.org/276708@main
https://bugs.webkit.org/show_bug.cgi?id=271696

CMake was failing because there was an attempt to set 'webrtc' when it
was not yet defined. Move faulting lines below, once 'webrtc' is already
defined.

* Source/ThirdParty/libwebrtc/CMakeLists.txt:

Canonical link: https://commits.webkit.org/276724@main
https://bugs.webkit.org/show_bug.cgi?id=269287

Reviewed by NOBODY (OOPS!).

Compile-time quirks prevent re-usability of the same binaries across different platforms (using
containers). The proposed solution is to always compile those, they don't depend on any specific
APIs so that shouldn't be an issue. Then at runtime quirks can be tweaked using the
WEBKIT_GST_QUIRKS and WEBKIT_GST_HOLE_PUNCH environment variables.

* Source/WebCore/platform/SourcesGStreamer.txt:
* Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
* Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::decodebinAutoplugSelectCallback):
(WebCore::AudioFileReader::~AudioFileReader):
(WebCore::AudioFileReader::decodeAudioForBusCreation):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::ensureGStreamerInitialized):
(WebCore::registerWebKitGStreamerElements):
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::ElementFactories::ElementFactories):
(WebCore::GStreamerRegistryScanner::ElementFactories::hasElementForCaps const):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::setSyncOnClock):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::gstreamerPositionFromSinks const):
(WebCore::MediaPlayerPrivateGStreamer::naturalSize const):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::configureElement):
(WebCore::MediaPlayerPrivateGStreamer::configureElementPlatformQuirks):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::MediaPlayerPrivateGStreamer::swapBuffersIfNeeded):
(WebCore::setRectangleToVideoSink):
(WebCore::MediaPlayerPrivateGStreamer::isHolePunchRenderingEnabled const):
(WebCore::MediaPlayerPrivateGStreamer::createHolePunchVideoSink):
(WebCore::MediaPlayerPrivateGStreamer::shouldIgnoreIntrinsicSize):
(WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkBcmNexus.cpp: Added.
(WebCore::GStreamerHolePunchQuirkBcmNexus::setHolePunchVideoRectangle):
* Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkBcmNexus.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkWesteros.cpp: Added.
(WebCore::GStreamerHolePunchQuirkWesteros::createHolePunchVideoSink):
(WebCore::GStreamerHolePunchQuirkWesteros::setHolePunchVideoRectangle):
* Source/WebCore/platform/gstreamer/GStreamerHolePunchQuirkWesteros.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkAmLogic.cpp: Added.
(WebCore::GStreamerQuirkAmLogic::GStreamerQuirkAmLogic):
(WebCore::GStreamerQuirkAmLogic::createWebAudioSink):
(WebCore::GStreamerQuirkAmLogic::configureElement):
* Source/WebCore/platform/gstreamer/GStreamerQuirkAmLogic.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkBcmNexus.cpp: Added.
(WebCore::GStreamerQuirkBcmNexus::GStreamerQuirkBcmNexus):
(WebCore::GStreamerQuirkBcmNexus::isHardwareAccelerated):
* Source/WebCore/platform/gstreamer/GStreamerQuirkBcmNexus.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkBroadcom.cpp: Added.
(WebCore::GStreamerQuirkBroadcom::GStreamerQuirkBroadcom):
(WebCore::GStreamerQuirkBroadcom::configureElement):
(WebCore::GStreamerQuirkBroadcom::isHardwareAccelerated):
* Source/WebCore/platform/gstreamer/GStreamerQuirkBroadcom.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkRealtek.cpp: Added.
(WebCore::GStreamerQuirkRealtek::GStreamerQuirkRealtek):
(WebCore::GStreamerQuirkRealtek::createWebAudioSink):
(WebCore::GStreamerQuirkRealtek::configureElement):
(WebCore::GStreamerQuirkRealtek::isHardwareAccelerated):
* Source/WebCore/platform/gstreamer/GStreamerQuirkRealtek.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirkWesteros.cpp: Added.
(WebCore::GStreamerQuirkWesteros::GStreamerQuirkWesteros):
(WebCore::GStreamerQuirkWesteros::configureElement):
(WebCore::GStreamerQuirkWesteros::isHardwareAccelerated):
* Source/WebCore/platform/gstreamer/GStreamerQuirkWesteros.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp: Added.
(WebCore::GStreamerQuirksManager::singleton):
(WebCore::GStreamerQuirksManager::GStreamerQuirksManager):
(WebCore::GStreamerQuirksManager::isEnabled const):
(WebCore::GStreamerQuirksManager::createWebAudioSink):
(WebCore::GStreamerQuirksManager::createHolePunchVideoSink):
(WebCore::GStreamerQuirksManager::setHolePunchVideoRectangle):
(WebCore::GStreamerQuirksManager::configureElement):
(WebCore::GStreamerQuirksManager::isHardwareAccelerated const):
(WebCore::GStreamerQuirksManager::supportsVideoHolePunchRendering const):
(WebCore::GStreamerQuirksManager::audioVideoDecoderFactoryListType const):
(WebCore::GStreamerQuirksManager::disallowedWebAudioDecoders const):
* Source/WebCore/platform/gstreamer/GStreamerQuirks.h: Added.
(WebCore::GStreamerQuirk::isPlatformSupported const):
(WebCore::GStreamerQuirk::createWebAudioSink):
(WebCore::GStreamerQuirk::configureElement):
(WebCore::GStreamerQuirk::isHardwareAccelerated):
(WebCore::GStreamerQuirk::audioVideoDecoderFactoryListType const):
(WebCore::GStreamerQuirk::disallowedWebAudioDecoders const):
(WebCore::GStreamerHolePunchQuirk::createHolePunchVideoSink):
(WebCore::GStreamerHolePunchQuirk::setHolePunchVideoRectangle):
* Source/cmake/OptionsWPE.cmake:
pgorszkowski-igalia and others added 26 commits April 11, 2025 11:16
…rceDataMap after content eviction

https://bugs.webkit.org/show_bug.cgi?id=290161

Reviewed by Devin Rousso.

After eviction of the content of the resource data due to exceeding the
threshold for maximum memory usage for gathered resources, WebKit still
keeps the structure of resource data in `m_requestIdToResourceDataMap`
because it is the primary structure used to track all other metadata
used by Web Inspector.
We can minimize the data kept there after eviction by resetting the
decoder which is not needed if we remove the content of resource data.

Additionally in case of platforms different than Cocoa we can skip
storing the certificate info because it is not used. The certificate
info is used only if supportsShowCertificate(), which is true only in
case of Cocoa platform.

This change adds a web preference `InspectorSupportsShowingCertificate` which
is true only in case of Cocoa and Win platform and enabling storing of the
certificate info for resource data in Web Inspector.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::supportsShowCertificate const):
* Source/WebCore/inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::ResourceData::evictContent):
(WebCore::NetworkResourcesData::NetworkResourcesData):
(WebCore::NetworkResourcesData::responseReceived):
(WebCore::NetworkResourcesData::setResourceContent):
(WebCore::NetworkResourcesData::maybeAddResourceData):
(WebCore::NetworkResourcesData::maybeDecodeDataToContent):
(WebCore::NetworkResourcesData::ensureFreeSpace):
* Source/WebCore/inspector/NetworkResourcesData.h:
(WebCore::NetworkResourcesData::Settings::Settings):
* Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
* Source/WebCore/inspector/agents/InspectorNetworkAgent.h:
* Source/WebCore/inspector/agents/page/PageNetworkAgent.cpp:
(WebCore::PageNetworkAgent::PageNetworkAgent):
* Source/WebCore/inspector/agents/worker/WorkerNetworkAgent.cpp:
(WebCore::WorkerNetworkAgent::WorkerNetworkAgent):

Canonical link: https://commits.webkit.org/293535@main
…://bugs.webkit.org/show_bug.cgi?id=290750

Reviewed by Sihui Liu.

Dispatch an error event "canceled" for queued utterances.

Specification: https://dvcs.w3.org/hg/speech-api/raw-file/tip/webspeechapi, point: 5.2.5.1.

Original author: Andrzej Surdej <Andrzej_Surdej@comcast.com>

See: WebPlatformForEmbedded#1474

* LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-expected.txt:
* LayoutTests/fast/speechsynthesis/speech-synthesis-cancel.html:
* Source/WebCore/Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::cancel):

Canonical link: https://commits.webkit.org/293536@main
…edded/pgorszkowski/2.38/WebInspector-minimize-the-number-of-data-kept-in-m_requestIdToResourceDataMap-after-content-eviction

[WebInspector] minimize the number of data kept in m_requestIdToResou…
…edded/pgorszkowski/2.38/SpeechSynthesis-Emit-error-event-for-all-cancelled-utterances

[SpeechSynthesis] Emit error event for all cancelled utterances
https://bugs.webkit.org/show_bug.cgi?id=290446

Reviewed by Michael Catanzaro.

To cancel all pending requests before network process exits, we have to
abort the current soup session. This will cancell all pending
cancellable task in glib-network backends (e.g.: OpenSSL, GnuTLS).

Original author: Volodymyr Ogorodnik()
See: WebPlatformForEmbedded#1482

* Source/WebCore/platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::~SoupNetworkSession):

Canonical link: https://commits.webkit.org/294000@main
…edded/pgorszkowski/2.38/SOUP-WPENetworkProcess-crashed-on-process-exit

[SOUP] WPENetworkProcess crashed on process exit
This is to save the memory allocated for swapchain surfaces
when wpe is going invisible.

Only active with RESIZE_WAYLAND_SURFACES_ON_SUSPEND_PAINTING
compilation var enabled, and with non-composite webgl
disabled.
…rczewski/2.38/ThreadedCompositor_resize_wayland_surfaces_at_suspend_painting

ThreadedCompositor: resize wayland surfaces at suspend painting
https://bugs.webkit.org/show_bug.cgi?id=291414

Reviewed by Alicia Boya Garcia.

If an MP3 with ID3 tags is appended to a SourceBuffer, AppendPipeline's
typefind detects it as application/x-id3 instead of audio/mpeg and can't
process it.

This commit takes care of that case by (optionally) creating an id3demux
that takes care of the ID3 tags (just ignores them) and produces
audio/mpeg at its output, so the processing can continue normally.

We can't know if id3demux can be created or not at AppendPipeline
instantiation time. In case the SourceBuffer mimetype is audio/mpeg, we
need to listen to the have-type signal from typefind and defer the
creation, configuration and connection of the demuxer (or identity, if
id3demux is not needed) until the signal happens.

The code to configure the demuxer has been refactored into its own
method, so it can be reused from the regular and the deferred demuxer
configuration codepaths.

* LayoutTests/media/content/silence_with_id3_tags.mp3: Added.
* LayoutTests/media/media-source/media-source-play-mp3-id3-tag-expected.txt: Added.
* LayoutTests/media/media-source/media-source-play-mp3-id3-tag.html: Added.
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::configureOptionalDemuxerFromAnyThread): Refactored code to configure the demuxer. The configuration code has been enhanced to detect the case of demuxers with static pads (such as id3demux) and treat them in the same immediate configuration way as identity.
(WebCore::AppendPipeline::AppendPipeline): If the SourceBuffer mimetype is audio/mpeg, listen to have-type and create and configure the demuxer/identity there (just the first time the signal is triggered).
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h: Added new configureOptionalDemuxerFromAnyThread() private method.

Canonical link: https://commits.webkit.org/294106@main
Adopt the created cairo pattern so that it is properly managed.
…edded/spena/wpe-2.38-adopt-pattern

[Cairo] Fix cairo pattern memory leak
…kit.org/show_bug.cgi?id=266973

Reviewed by Michael Catanzaro, Carlos Garcia Campos and Xabier Rodriguez-Calvar.

Store the WebKitWebSrc pointer as a weak reference in the CachedResourceStreamingClient. Using a
const raw pointer was not sufficient, because nothing prevented other code to dispose the element,
thus making the pointer point to garbage. We can't use a strong reference because it would introduce
a reference cycle between WebKitWebSrc and the CachedResourceStreamingClient.

* Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcMakeRequest):
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::checkUpdateBlocksize):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::loadFinished):

Canonical link: https://commits.webkit.org/272807@main

Signed-off-by: GlebNovodranPE <gnovodran@productengine.com>
https://bugs.webkit.org/show_bug.cgi?id=296690

Reviewed by Philippe Normand.

OpenCDM/Thunder can answer with a null message when loading a wrong session. We need to deal with that.

* Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp:
(WebCore::CDMInstanceSessionThunder::loadSession):

Canonical link: https://commits.webkit.org/298032@main
https://bugs.webkit.org/show_bug.cgi?id=243796
<rdar://98471033>

Reviewed by Eric Carlson.

We should be using the `detachMediaSource` method in `setSrcObject` in
order to be consistent with the rest of the `HTMLMediaElement` implementation.

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setSrcObject):

Canonical link: https://commits.webkit.org/253314@main
https://bugs.webkit.org/show_bug.cgi?id=300041

Reviewed by Philippe Normand.

Sometimes, in a downstream multimedia player, regular video playback
remains paused after seek instead of resuming automatically. It will
play normally when play() or another seek operation are manually
triggered.

Log analys shows that in the failing case the browser missed the state
transition to 'HaveCurrentData', and application can't resume playback
after seek. It was missed because it happened the gstreamer pipeline
remains in state transition for too long and can't process buffering
events. Normally it goes: seek -> Paused pipeline -> buffering
(HaveCurrentData) -> finish_buffering(HaveEnoughData) -> start_playback.
However, in the failing case, seek takes too long (~2sec) to set the
PAUSED state on the pipeline and we are missing the
buffering(HaveCurrentData) stage.

See: WebPlatformForEmbedded#1561

This patch returns the player readyState to HaveCurrentData and the
networkState to Loading when a seek is being processed. The states will
reach their final values as soon as the async state transition caused by
the seek finishes.

Original author: Volodymyr Ogorodnik (https://github.com/volodymyr-ogorodnik-red)

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Reset readyState and networkState to HaveCurrentData and Loading while the player is in an async state transition (in a seek) and buffering.

Canonical link: https://commits.webkit.org/300933@main
…g on 32 bits.

https://bugs.webkit.org/show_bug.cgi?id=293720

Reviewed by Yusuke Suzuki.

On 32-bit armv7/linux we run into an issue where the environment strings
located at the bottom of the stack, as well as some random bits inside
the libc portion of the stack are interpreted as cells pointing
into the heap, keeping actually dead objects alive.

Yusuke previously attempted to fix this by excluding environ and before,
but there are additional fake roots only a few hundred bytes below that.

This patch excludes the caller of main entirely.

* Source/JavaScriptCore/jsc.cpp:
(jscmain):
* Source/JavaScriptCore/runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):
* Source/WTF/wtf/StackBounds.cpp:
(WTF::StackBounds::setBottomOfMainThreadMain):
(WTF::StackBounds::currentThreadStackBoundsInternal):
* Source/WTF/wtf/StackBounds.h:
(WTF::StackBounds::checkConsistency const):
* Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMain):
* Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp:
(WebKit::WebProcessMain):
…/stack-scanning-backport

Exclude non-user portions of the main thread stack from stack scanning on 32 bits.
https://bugs.webkit.org/show_bug.cgi?id=303463

Reviewed by Philippe Normand.

We were missing to clear up the session and update and clear the keys.

Original patch by Santhosh-Kumar-infosys <sakumar.ext@libertyglobal.com>.

* Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp:
(WebCore::CDMInstanceSessionThunder::sessionChanged):
(WebCore::CDMInstanceSessionThunder::updateLicense):
(WebCore::CDMInstanceSessionThunder::loadSession):
(WebCore::CDMInstanceSessionThunder::removeSessionData):
(WebCore::CDMInstanceSessionThunder::sessionFailure): Deleted.
* Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.h:

Canonical link: https://commits.webkit.org/303826@main

This fixes WebPlatformForEmbedded#1585.
https://bugs.webkit.org/show_bug.cgi?id=303326

Reviewed by Philippe Normand.

GStreamerQuirksManager requires GStreamer to be initialized, which
does not happen soon enough if neither canPlayType() nor isTypeSupported() has
been called before, so in those cases no quirks are applied.

However, the quirks manager may be used in other processes, e.g. NetworkProcess
when determining support for a MIME type. To avoid issues, we should
only fully init GStreamer if on the WebProcess, and otherwise go for
a minimal initialization.

* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::ensureGStreamerInitializedNonWebProcess):
Added as a counterpart to ensureGStreamerInitialized, only does minimal init.
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::GStreamerRegistryScanner):
Use the new function to initialize gst if in the UIProcess
* Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp:
(WebCore::GStreamerQuirksManager::GStreamerQuirksManager):
Init GStreamer using either of the two methods

Original author: Andrzej Surdej <Andrzej_Surdej@comcast.com>

See: WebPlatformForEmbedded#1584
Canonical link: https://commits.webkit.org/303982@main
…agehide

https://bugs.webkit.org/show_bug.cgi?id=303619

Reviewed by Alexey Proskuryakov.

When the WebSocket is suspending and it was closed, or it is in the
middle of closing, it does not need to be closed separately (and dispatch
the error event).

There is already WPT test for that case. Now the test passes.

* LayoutTests/imported/w3c/web-platform-tests/websockets/back-forward-cache-with-open-websocket-connection-and-close-it-in-pagehide.window-expected.txt:
* Source/WebCore/Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::suspend):

Canonical link: https://commits.webkit.org/304082@main
https://bugs.webkit.org/show_bug.cgi?id=303326

Reviewed by Philippe Normand.

GStreamerQuirksManager requires GStreamer to be initialized, which
does not happen soon enough if neither canPlayType() nor isTypeSupported() has
been called before, so in those cases no quirks are applied.

However, the quirks manager may be used in other processes, e.g. NetworkProcess
when determining support for a MIME type. To avoid issues, we should
only fully init GStreamer if on the WebProcess, and otherwise go for
a minimal initialization.

* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::ensureGStreamerInitializedNonWebProcess):
Added as a counterpart to ensureGStreamerInitialized, only does minimal init.
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::GStreamerRegistryScanner):
Use the new function to initialize gst if in the UIProcess
* Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp:
(WebCore::GStreamerQuirksManager::GStreamerQuirksManager):
Init GStreamer using either of the two methods

Original author: Andrzej Surdej <Andrzej_Surdej@comcast.com>

See: WebPlatformForEmbedded#1584
Canonical link: https://commits.webkit.org/303982@main
https://bugs.webkit.org/show_bug.cgi?id=305473

Reviewed by Xabier Rodriguez-Calvar.

Sometimes applications create a <video> tag with 'preload="none"' and
then remove the element from the DOM without ever starting playback.
This results in the video element being leaked, because
HTMLMediaElement::virtualHasPendingActivity() retains the element while
its network state is still "Loading".

See: WebPlatformForEmbedded#1594

This patch keeps the default behaviour of changing the NetworkState to
"Loading", except in the case of a delayed load (the case triggered by
preload="none"), in which it's set to Idle and therefore allowing the
full destruction of the video element.

Original author: Eugene Mutavchi <Ievgen_Mutavchi@comcast.com>

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load): Reset NetworkState to Idle in case of delayed load. Set to Loading otherwise.

Canonical link: https://commits.webkit.org/305578@main
@modeveci
Copy link

@lulicdarko , do you maybe have an isolated patch or applied on 2.38 branch? This PR seems bringing all 2.46 changes to 2.38. If you do not have isolated environment, no problem the other PR is good enough to introduce the change on 2.38 as well.

@lulicdarko
Copy link
Author

@lulicdarko , do you maybe have an isolated patch or applied on 2.38 branch? This PR seems bringing all 2.46 changes to 2.38. If you do not have isolated environment, no problem the other PR is good enough to introduce the change on 2.38 as well.

Hello @modeveci you can find isolated pull request here #1605

@magomez
Copy link

magomez commented Jan 22, 2026

Clearly this is an invalid PR so I'm closing it.

@magomez magomez closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.