You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
webkit2-gtk: update to 2.52.4
Fixes: https://trac.macports.org/ticket/65492
This commit is contained in:
committed by
Dan Ports
parent
58aca1d0ed
commit
a644187252
+161
-147
@@ -9,15 +9,16 @@ PortGroup active_variants 1.1
|
||||
PortGroup cmake 1.1
|
||||
PortGroup legacysupport 1.1
|
||||
|
||||
compiler.cxx_standard 2017
|
||||
compiler.cxx_standard 2023
|
||||
compiler.blacklist-append {clang < 1600}
|
||||
compiler.blacklist-append macports-clang-17
|
||||
cmake.generator Ninja
|
||||
# Fix compilation for Angle subproject: platform.h: error: 'TARGET_OS_OSX' is not defined
|
||||
legacysupport.newest_darwin_requires_legacy 15
|
||||
|
||||
name webkit2-gtk
|
||||
conflicts webkit2-gtk-devel
|
||||
version 2.28.2
|
||||
revision 11
|
||||
version 2.52.4
|
||||
|
||||
description Apple's WebKit2 HTML rendering library for GTK+3
|
||||
long_description {*}${description}
|
||||
@@ -25,31 +26,29 @@ maintainers {devans @dbevans} {mascguy @mascguy}
|
||||
categories www gnome
|
||||
platforms darwin freebsd
|
||||
license LGPL-2+ BSD
|
||||
homepage http://webkitgtk.org/
|
||||
master_sites http://webkitgtk.org/releases/
|
||||
homepage https://webkitgtk.org/
|
||||
master_sites https://webkitgtk.org/releases/
|
||||
|
||||
use_xz yes
|
||||
distname webkitgtk-${version}
|
||||
|
||||
dist_subdir webkit-gtk
|
||||
|
||||
checksums rmd160 a626f58cf30b6dd1ef8a63c165ce85770c4da675 \
|
||||
sha256 b9d23525cfd8d22c37b5d964a9fe9a8ce7583042a2f8d3922e71e6bbc68c30bd \
|
||||
size 21427772
|
||||
checksums rmd160 247b1624c7502e35e20e873f462eb68f631f26b3 \
|
||||
sha256 cf4076a1ca2a64788edca8c452d8ebb68d5e2965e588fe46a388a016513edce4 \
|
||||
size 65093228
|
||||
|
||||
depends_build-append \
|
||||
port:gperf \
|
||||
port:gtk-doc \
|
||||
port:perl5.34 \
|
||||
port:pkgconfig \
|
||||
port:python27 \
|
||||
port:py27-simplejson
|
||||
port:python313 \
|
||||
port:ruby33 \
|
||||
port:unifdef
|
||||
|
||||
depends_lib-append port:atk \
|
||||
port:at-spi2-atk \
|
||||
port:bison \
|
||||
path:lib/pkgconfig/cairo.pc:cairo \
|
||||
port:flex \
|
||||
port:fontconfig \
|
||||
port:freetype \
|
||||
port:enchant2 \
|
||||
@@ -64,11 +63,17 @@ depends_lib-append port:atk \
|
||||
path:lib/pkgconfig/harfbuzz-icu.pc:harfbuzz-icu \
|
||||
port:hyphen \
|
||||
path:lib/pkgconfig/icu-uc.pc:icu \
|
||||
port:libavif \
|
||||
port:libjxl \
|
||||
path:include/turbojpeg.h:libjpeg-turbo \
|
||||
port:lcms2 \
|
||||
port:libepoxy \
|
||||
port:libgcrypt \
|
||||
port:libnotify \
|
||||
port:libpng \
|
||||
port:libsecret \
|
||||
path:lib/pkgconfig/libsoup-2.4.pc:libsoup-2.4 \
|
||||
path:lib/pkgconfig/libsoup-3.0.pc:libsoup \
|
||||
port:libtasn1 \
|
||||
port:libxml2 \
|
||||
port:libxslt \
|
||||
port:sqlite3 \
|
||||
@@ -76,70 +81,152 @@ depends_lib-append port:atk \
|
||||
port:woff2 \
|
||||
port:zlib
|
||||
|
||||
license_noconflict python27 py27-simplejson
|
||||
|
||||
# 1. add missing JavaScriptCore include directory used only on Apple webkit builds
|
||||
# 2. don't copy the ICU includes into the source tree
|
||||
# 3. add missing WebCore include directory used only on Apple webkit builds
|
||||
# 4. add a missing Apple-only header found in the WebKit project
|
||||
# 5. change some int64_t to gint64 to stop typedef errors in gstreamer
|
||||
patchfiles-append patch-webkit2gtk-macports.diff
|
||||
|
||||
# and a few more for webkit2-gtk-2.27.2
|
||||
patchfiles-append patch-webkit2gtk-272-macports.diff
|
||||
|
||||
# and a few more for 282
|
||||
patchfiles-append patch-webkit2gtk-2282-unprotected-egl-changes.diff
|
||||
|
||||
# os log is only available on newer systems.
|
||||
patchfiles-append patch-webkit2gtk-2282-os-log-availability.diff
|
||||
|
||||
# enable Netscape plugin architecture on macOS
|
||||
# or can be explicitly disabled with the following addition if preferred
|
||||
# configure.args-append -DENABLE_NETSCAPE_PLUGIN_API=OFF
|
||||
patchfiles-append patch-enable-plugin-architecture-unix.diff
|
||||
|
||||
# add a link library to WebCore. I am not sure this is still needed; builds and
|
||||
# runs without this patch.
|
||||
patchfiles-append patch-bundle-link-webcore.diff
|
||||
|
||||
# Fix incompatibility with XCode 12:
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=207871
|
||||
patchfiles-append patch-WTF-wtf-getVTablePointer.diff
|
||||
|
||||
# Fix build errors due to -WWc++11-narrowing
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=211193
|
||||
patchfiles-append patch-bool_narrowed.diff
|
||||
|
||||
# Explicitly specify installed dylib paths to g-ir-compile
|
||||
# Fixes dlopen errors in apps using webkit2gtk introspection
|
||||
patchfiles-append patch-webkit2gtk-specify-installed-dylibs.diff
|
||||
|
||||
# Backport https://github.com/WebKit/WebKit/commit/b83958928838b8a997c12a8de06f89377df0a903
|
||||
patchfiles-append patch-icu-68-true-false.diff
|
||||
|
||||
# API changed with libxml2 2.12+
|
||||
# https://github.com/WebKit/WebKit/commit/1bad176b2496579d760852c80cff3ad9fb7c3a4b
|
||||
patchfiles-append patch-webkit2-gtk-fixes-for-libxml2-2.12.0.diff
|
||||
|
||||
# Fix build with Ruby 3.2+
|
||||
# https://github.com/WebKit/WebKit/commit/b7ac5d0ccc7ca3ed6bf4f2d40fde60247ce87d3c
|
||||
patchfiles-append patch-deprecated-file-exists-rb32.diff
|
||||
|
||||
# Reduce compilation warnings
|
||||
configure.cppflags-append \
|
||||
-Wno-unknown-warning-option \
|
||||
-Wno-missing-template-arg-list-after-template-kw \
|
||||
-Wno-deprecated-declarations
|
||||
-Wno-deprecated-declarations \
|
||||
-isystem ${worksrcpath}/stub-headers
|
||||
|
||||
# Update WTF CMakeLists for stubs added in post-extract.
|
||||
patchfiles-append patch-wtf-apple-cocoa-missing-files.diff
|
||||
|
||||
# Add missing EventLoop.h include in DocumentLoader.cpp
|
||||
patchfiles-append patch-webcore-documentloader-eventloop-include.diff
|
||||
|
||||
# ANGLE assumes ANGLE_PLATFORM_LINUX for GTK; use ANGLE_PLATFORM_APPLE
|
||||
# instead.
|
||||
patchfiles-append patch-angle-platform-gtk-apple.diff
|
||||
|
||||
# bmalloc ProcessCheck: provide inline stubs for processNameString() and
|
||||
# shouldAllowMiniMode() on Darwin without Cocoa (implementations are in
|
||||
# a .mm file not included in the GTK tarball).
|
||||
patchfiles-append patch-bmalloc-processcheck-darwin-gtk.diff
|
||||
|
||||
# Disable TZONE (not included in the GTK tarball)
|
||||
patchfiles-append patch-bmalloc-disable-tzone.diff
|
||||
|
||||
# Use portable TLS sentinel instead of private pthread_self_is_exiting_np
|
||||
patchfiles-append patch-bmalloc-pthread-self-is-exiting.diff
|
||||
|
||||
# Replace forward declarations with #include to avoid incomplete type
|
||||
# errors with std::span in older libc++ (macports-clang-16)
|
||||
patchfiles-append patch-webkit-gtkpagerange-incomplete-type.diff
|
||||
|
||||
# Fix GStreamer API calls to use gint64/guint64 instead of int64_t.
|
||||
patchfiles-append patch-gstreamer-int64-type-mismatch.diff
|
||||
|
||||
# On macOS with GTK, both OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) are true.
|
||||
# Prefer UnixFileDescriptor (GTK) over MachSendRight (Cocoa-only).
|
||||
patchfiles-append patch-webkit-ipc-darwin-gtk.diff
|
||||
|
||||
# ...and use only unix sockets in serialization.in.
|
||||
patchfiles-append patch-webkit-serialization-elif-darwin.diff
|
||||
|
||||
# rename include of ArgumentCodersGlib.h to avoid case-insensitive
|
||||
# collision (see post-extract)
|
||||
patchfiles-append patch-webkit-argumentcoders-glib-case.diff
|
||||
|
||||
# Fix jsc/JSC include path collision on case-insensitive FS
|
||||
patchfiles-append patch-jsc-glib-include-case-collision.diff
|
||||
|
||||
# Fall back to CPU rendering when no EGL display can be created
|
||||
# instead of crashing
|
||||
patchfiles-append patch-egl-display-no-crash.diff
|
||||
|
||||
# Add missing SkPathDump.cpp to Skia CMakeLists to fix linker error
|
||||
patchfiles-append patch-skia-add-skpathdump.diff
|
||||
|
||||
# macOS does not support SOCK_SEQPACKET; use SOCK_DGRAM for IPC sockets
|
||||
# with enlarged buffers to accommodate WebKit's 4KB max message size.
|
||||
patchfiles-append patch-ipc-darwin-sock-dgram.diff
|
||||
|
||||
# Skip broken Darwin path for sqlite3 init
|
||||
patchfiles-append patch-sqlite-init-deadlock.diff
|
||||
|
||||
# KERN_NOT_FOUND missing from SDKs before macOS 12
|
||||
platform darwin {
|
||||
# mach_vm_offset_t not declared in older SDK headers
|
||||
patchfiles-append patch-wtf-mach-vm-types-include.diff
|
||||
if {${os.major} < 21} {
|
||||
patchfiles-append patch-bmalloc-kern-not-found.diff
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Create empty stub headers for Apple-specific WTF headers referenced under
|
||||
# OS(DARWIN) guards. The GTK tarball omits these but code still includes them.
|
||||
post-extract {
|
||||
set wtfdir ${worksrcpath}/Source/WTF/wtf
|
||||
foreach subdir {cf cocoa spi/cf spi/cocoa spi/mac text/cf} {
|
||||
file mkdir ${wtfdir}/${subdir}
|
||||
}
|
||||
foreach stub {
|
||||
cf/CFURLExtras.h cf/NotificationCenterCF.h cf/TypeCastsCF.h cf/VectorCF.h
|
||||
cocoa/CrashReporter.h cocoa/Entitlements.h cocoa/NSURLExtras.h
|
||||
cocoa/RuntimeApplicationChecksCocoa.h cocoa/SoftLinking.h
|
||||
cocoa/TollFreeBridging.h cocoa/TypeCastsCocoa.h cocoa/VectorCocoa.h
|
||||
spi/cf/CFBundleSPI.h spi/cf/CFStringSPI.h
|
||||
spi/cocoa/CFXPCBridgeSPI.h spi/cocoa/CrashReporterClientSPI.h
|
||||
spi/cocoa/IOSurfaceSPI.h spi/cocoa/MachVMSPI.h spi/cocoa/NSLocaleSPI.h
|
||||
spi/cocoa/NSObjCRuntimeSPI.h spi/cocoa/SecuritySPI.h spi/cocoa/objcSPI.h
|
||||
spi/mac/MetadataSPI.h
|
||||
text/cf/StringConcatenateCF.h text/cf/TextBreakIteratorCF.h
|
||||
} {
|
||||
close [open ${wtfdir}/${stub} w]
|
||||
}
|
||||
|
||||
# OSLogPrintStream.mm is not included in the GTK tarball (Apple-only).
|
||||
# Provide a .cpp implementation using the public os_log API.
|
||||
file copy ${filespath}/OSLogPrintStream.cpp ${wtfdir}/darwin/OSLogPrintStream.cpp
|
||||
|
||||
# TypeCastsOSObject.h uses Objective-C constructs (bridge_id_cast, object_getClass)
|
||||
# that cannot compile in C++ mode. Replace with a stub providing no-op macros.
|
||||
file copy -force ${filespath}/stub-TypeCastsOSObject.h \
|
||||
${wtfdir}/darwin/TypeCastsOSObject.h
|
||||
|
||||
# We do not have EGL but WebCore and Skia need the headers to
|
||||
# compile. Provide stubs with no-op implementations so they can
|
||||
# compile. The EGL paths will never be taken at runtime because
|
||||
# there is no EGL display.
|
||||
set stubdir ${worksrcpath}/stub-headers/epoxy
|
||||
file mkdir ${stubdir}
|
||||
file copy ${filespath}/stub-epoxy-egl.h ${stubdir}/egl.h
|
||||
|
||||
# Rename Platform/IPC/ArgumentCodersGlib.h to prevent collision
|
||||
# with Shared/glib/ArgumentCodersGLib.h on case-insensitive FS.
|
||||
file rename ${worksrcpath}/Source/WebKit/Platform/IPC/glib/ArgumentCodersGlib.h \
|
||||
${worksrcpath}/Source/WebKit/Platform/IPC/glib/ArgumentCodersGlibStrv.h
|
||||
}
|
||||
|
||||
# it is preferred to use the WebKit built in bmalloc if it builds on a given os.
|
||||
# it has improved security features, but not all systems can build it at present.
|
||||
configure.args-append \
|
||||
-DPORT=GTK \
|
||||
-DENABLE_BUBBLEWRAP_SANDBOX=OFF \
|
||||
-DENABLE_DOCUMENTATION=OFF \
|
||||
-DENABLE_GAMEPAD=OFF \
|
||||
-DENABLE_INTROSPECTION=ON \
|
||||
-DENABLE_JOURNALD_LOG=OFF \
|
||||
-DENABLE_MINIBROWSER=OFF \
|
||||
-DENABLE_VIDEO=ON \
|
||||
-DENABLE_SPEECH_SYNTHESIS=OFF \
|
||||
-DENABLE_WAYLAND_TARGET=OFF \
|
||||
-DENABLE_WEBGL=OFF \
|
||||
-DUSE_FLITE=OFF \
|
||||
-DUSE_GBM=OFF \
|
||||
-DUSE_GSTREAMER_GL=OFF \
|
||||
-DUSE_GTK4=OFF \
|
||||
-DUSE_LIBBACKTRACE=OFF \
|
||||
-DUSE_LIBDRM=OFF \
|
||||
-DUSE_LIBHYPHEN=ON \
|
||||
-DUSE_SPIEL=OFF \
|
||||
-DUSE_SYSTEM_MALLOC=OFF \
|
||||
-DPERL_EXECUTABLE=${prefix}/bin/perl5.34
|
||||
-DUSE_SYSTEM_SYSPROF_CAPTURE=OFF \
|
||||
-DUSE_SYSPROF_CAPTURE=OFF \
|
||||
-DUSE_APPLE_ICU=OFF \
|
||||
-DICU_ROOT=${prefix} \
|
||||
-DPERL_EXECUTABLE=${prefix}/bin/perl5.34 \
|
||||
-DPython_EXECUTABLE=${prefix}/bin/python3.13 \
|
||||
-DRuby_EXECUTABLE=${prefix}/bin/ruby3.3
|
||||
|
||||
pre-configure {
|
||||
if {![variant_isset quartz] && ![variant_isset x11]} {
|
||||
@@ -157,19 +244,9 @@ default_variants-append +minibrowser
|
||||
variant quartz conflicts x11 {
|
||||
require_active_variants path:lib/pkgconfig/gtk+-3.0.pc:gtk3 quartz
|
||||
|
||||
# TODO: restrict this patch to just Big Sur?
|
||||
patchfiles-append patch-Source_WebKit_Platform_IPC_Connection.cpp.diff
|
||||
|
||||
configure.args-append \
|
||||
-DENABLE_QUARTZ_TARGET=ON \
|
||||
-DENABLE_X11_TARGET=OFF \
|
||||
-DENABLE_OPENGL=OFF
|
||||
|
||||
# OPENGL does not work with +quartz, eg: https://trac.macports.org/ticket/52495
|
||||
# OPENGL must be explicitly turned off, otherwise GLX is found, but X11 is not, and:
|
||||
# CMake Error at Source/cmake/OptionsGTK.cmake:280 (message):
|
||||
# Either GLX or EGL is needed for ENABLE_OPENGL.
|
||||
|
||||
-DENABLE_X11_TARGET=OFF
|
||||
}
|
||||
|
||||
variant x11 conflicts quartz {
|
||||
@@ -177,8 +254,7 @@ variant x11 conflicts quartz {
|
||||
|
||||
configure.args-append \
|
||||
-DENABLE_QUARTZ_TARGET=OFF \
|
||||
-DENABLE_X11_TARGET=ON \
|
||||
-DENABLE_OPENGL=OFF
|
||||
-DENABLE_X11_TARGET=ON
|
||||
|
||||
depends_lib-append \
|
||||
port:mesa \
|
||||
@@ -189,6 +265,9 @@ variant minibrowser description {Build and install MiniBrowser (for testing)} {
|
||||
configure.args-delete -DENABLE_MINIBROWSER=OFF
|
||||
configure.args-append -DENABLE_MINIBROWSER=ON
|
||||
depends_run-append port:adwaita-icon-theme
|
||||
patchfiles-append patch-minibrowser-show-all.diff
|
||||
# [[fallthrough]] is a C23 attribute; use __attribute__ for compatibility
|
||||
patchfiles-append patch-minibrowser-fallthrough-c23.diff
|
||||
}
|
||||
|
||||
# see https://trac.macports.org/ticket/56792
|
||||
@@ -203,71 +282,6 @@ if {![option configure.ccache]} {
|
||||
build.env-append CCACHE_DIR=${workpath}/.ccache
|
||||
}
|
||||
|
||||
# the above code presently builds as-in on 10.13 and up
|
||||
if {${os.platform} eq "darwin" && ${os.major} <= 16} {
|
||||
|
||||
# build of bmalloc fails up to 10.12 https://trac.macports.org/ticket/59447
|
||||
configure.args-replace -DUSE_SYSTEM_MALLOC=OFF -DUSE_SYSTEM_MALLOC=ON
|
||||
patchfiles-append patch-ramsize.diff
|
||||
|
||||
# Source/WTF/wtf/unix/CPUTimeUnix.cpp : add back a previous Darwin compat version
|
||||
patchfiles-append patch-source-wtf-wtf-unix-cputimeunix-cpp-darwin-version-restore.diff
|
||||
|
||||
# some Darwin versions don't have MAP_JIT; only use it if available
|
||||
patchfiles-append patch-source-wtf-wtf-osallocatorposix-cpp-map-jit.diff
|
||||
|
||||
# gl cocoa build continues to fail due to use of API not available on darwin 12 or earlier
|
||||
# so gstreamergl is not available at present for darwin 12 or earlier
|
||||
# todo clarify further where this is exactly needed
|
||||
configure.args-append -DUSE_GSTREAMER_GL=OFF
|
||||
|
||||
# for the webcore/page/crypt code to flow correctly,
|
||||
# ENABLE_WEB_CRYPTO has to be ON for 10.10+ and OFF for 10.9 and less
|
||||
if {${os.major} <= 13} {
|
||||
configure.args-append -DENABLE_WEB_CRYPTO=OFF
|
||||
}
|
||||
# disable Apple internal security libraries, available only on new systems
|
||||
patchfiles-append patch-Webcore-page-crypto.diff
|
||||
|
||||
# restrict special process memory kernel calls to 10.9+ that support them
|
||||
patchfiles-append patch-WTF-wtf-spi-darwin-ProcessMemoryFootprint-h.diff
|
||||
|
||||
# the darwin build uses security features that are Apple internal only, but
|
||||
# the unix version does not FIXME: sort the ifdefs out
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=157554
|
||||
patchfiles-append patch-WTF-wtf-Randomdevice.diff
|
||||
|
||||
# disable veclib on 10.7 and 10.8. There is a definition for
|
||||
# class complex<> in the vForce.h header that collides with libc++
|
||||
# if anyone has a more elegant fix for this, please volunteer it
|
||||
if {${os.major} == 11 || ${os.major} == 12} {
|
||||
patchfiles-append patch-webcore-platform-audio-directconvolver-disable-veclib.diff
|
||||
}
|
||||
|
||||
# there is a missing header that manifests on 10.7 and less
|
||||
patchfiles-append patch-webkit2gtk-source-javascriptcore-jit-executableallocator-missingfcntl-h-older-systems.diff
|
||||
|
||||
# add dep for newer ruby and spec this for build
|
||||
# https://trac.macports.org/ticket/52016
|
||||
depends_build-append port:ruby25
|
||||
configure.args-append -DRUBY_EXECUTABLE=${prefix}/bin/ruby2.5
|
||||
|
||||
# fix missing PRId64 definitions on systems
|
||||
# that don't define __STDC_FORMAT_MACROS by default
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=156596
|
||||
# https://trac.macports.org/ticket/52016
|
||||
# also added defn for TARGET_OS_IOS to avoid innumerable warnings
|
||||
patchfiles-append patch-snowleopard-cmakelists-stdcformatmacros.diff
|
||||
|
||||
# special case: fix build on 10.6 with macports-libstdc++
|
||||
# contents of snowmath.h should someday become part of gcc6 cmath
|
||||
# TODO: remove this?
|
||||
if { ${configure.cxx_stdlib} eq "macports-libstdc++" && ${os.major} < 11 } {
|
||||
configure.cxxflags-append -D_GLIBCXX_USE_C99_MATH_TR1=1
|
||||
configure.cxxflags-append -include ${filespath}/snowmath.h
|
||||
}
|
||||
}
|
||||
|
||||
notes-append "
|
||||
If you are porting new software to use webkit2gtk on Apple systems,\
|
||||
you will likely need to define BUILDING_GTK__ to get the correct\
|
||||
@@ -275,5 +289,5 @@ behaviour from WebKitAvailability.h.
|
||||
"
|
||||
|
||||
livecheck.type regex
|
||||
livecheck.url http://webkitgtk.org/releases/
|
||||
livecheck.url https://webkitgtk.org/releases/
|
||||
livecheck.regex "webkitgtk-(\\d+\\.\\d*\[02468\](?:\\.\\d+)*)"
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#include "config.h"
|
||||
#include <wtf/darwin/OSLogPrintStream.h>
|
||||
#if OS(DARWIN)
|
||||
#include <cstdio>
|
||||
namespace WTF {
|
||||
|
||||
OSLogPrintStream::OSLogPrintStream(os_log_t log, os_log_type_t type)
|
||||
: m_log(log)
|
||||
, m_logType(type)
|
||||
{
|
||||
}
|
||||
|
||||
OSLogPrintStream::~OSLogPrintStream() { }
|
||||
|
||||
std::unique_ptr<OSLogPrintStream> OSLogPrintStream::open(const char* subsystem, const char* category, os_log_type_t logType)
|
||||
{
|
||||
return std::unique_ptr<OSLogPrintStream>(new OSLogPrintStream(os_log_create(subsystem, category), logType));
|
||||
}
|
||||
|
||||
void OSLogPrintStream::vprintf(const char* format, va_list args)
|
||||
{
|
||||
Locker locker { m_stringLock };
|
||||
char buf[512];
|
||||
std::vsnprintf(buf, sizeof(buf), format, args);
|
||||
os_log_with_type(m_log, m_logType, "%{public}s", buf);
|
||||
}
|
||||
|
||||
} // namespace WTF
|
||||
#endif
|
||||
@@ -1,20 +0,0 @@
|
||||
--- Source/WebKit/Platform/IPC/Connection.cpp.bak 2021-05-08 09:24:06.000000000 -0400
|
||||
+++ Source/WebKit/Platform/IPC/Connection.cpp 2021-05-08 10:04:20.000000000 -0400
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <wtf/text/WTFString.h>
|
||||
#include <wtf/threads/BinarySemaphore.h>
|
||||
|
||||
+#include <unistd.h>
|
||||
+
|
||||
#if PLATFORM(COCOA)
|
||||
#include "MachMessage.h"
|
||||
#endif
|
||||
@@ -669,7 +671,7 @@
|
||||
}
|
||||
|
||||
#if OS(DARWIN)
|
||||
- RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Timed-out while waiting for reply for %{public}s::%{public}s from process %d, id = %" PRIu64, messageReceiverName.toString().data(), messageName.toString().data(), remoteProcessID(), syncRequestID);
|
||||
+ RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Timed-out while waiting for reply for %{public}s::%{public}s from process %d, id = %" PRIu64, messageReceiverName.toString().data(), messageName.toString().data(), (int)getpid(), syncRequestID);
|
||||
#else
|
||||
RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Timed-out while waiting for reply for %s::%s, id = %" PRIu64, messageReceiverName.toString().data(), messageName.toString().data(), syncRequestID);
|
||||
#endif
|
||||
@@ -1,87 +0,0 @@
|
||||
diff --git Source/WTF/wtf/RandomDevice.cpp Source/WTF/wtf/RandomDevice.cpp
|
||||
index 89165f03..99251674 100644
|
||||
--- Source/WTF/wtf/RandomDevice.cpp
|
||||
+++ Source/WTF/wtf/RandomDevice.cpp
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
-#if !OS(DARWIN) && !OS(FUCHSIA) && OS(UNIX)
|
||||
+#if (1)
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <wincrypt.h> // windows.h must be included before wincrypt.h.
|
||||
#endif
|
||||
|
||||
-#if OS(DARWIN)
|
||||
+#if (0)
|
||||
#include <CommonCrypto/CommonCryptoError.h>
|
||||
#include <CommonCrypto/CommonRandom.h>
|
||||
#endif
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
namespace WTF {
|
||||
|
||||
-#if !OS(DARWIN) && !OS(FUCHSIA) && OS(UNIX)
|
||||
+#if (1)
|
||||
NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToOpenURandom()
|
||||
{
|
||||
CRASH();
|
||||
@@ -64,7 +64,7 @@ NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToReadFromURandom()
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if !OS(DARWIN) && !OS(FUCHSIA) && !OS(WINDOWS)
|
||||
+#if (1)
|
||||
RandomDevice::RandomDevice()
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -77,7 +77,7 @@ RandomDevice::RandomDevice()
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if !OS(DARWIN) && !OS(FUCHSIA) && !OS(WINDOWS)
|
||||
+#if (1)
|
||||
RandomDevice::~RandomDevice()
|
||||
{
|
||||
close(m_fd);
|
||||
@@ -88,11 +88,11 @@ RandomDevice::~RandomDevice()
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=170190
|
||||
void RandomDevice::cryptographicallyRandomValues(unsigned char* buffer, size_t length)
|
||||
{
|
||||
-#if OS(DARWIN)
|
||||
+#if (0)
|
||||
RELEASE_ASSERT(!CCRandomGenerateBytes(buffer, length));
|
||||
#elif OS(FUCHSIA)
|
||||
zx_cprng_draw(buffer, length);
|
||||
-#elif OS(UNIX)
|
||||
+#elif (1)
|
||||
ssize_t amountRead = 0;
|
||||
while (static_cast<size_t>(amountRead) < length) {
|
||||
ssize_t currentRead = read(m_fd, buffer + amountRead, length - amountRead);
|
||||
diff --git Source/WTF/wtf/RandomDevice.h Source/WTF/wtf/RandomDevice.h
|
||||
index 411bde3e..9c9c6da8 100644
|
||||
--- Source/WTF/wtf/RandomDevice.h
|
||||
+++ Source/WTF/wtf/RandomDevice.h
|
||||
@@ -35,7 +35,7 @@ class RandomDevice {
|
||||
WTF_MAKE_NONCOPYABLE(RandomDevice);
|
||||
WTF_MAKE_FAST_ALLOCATED;
|
||||
public:
|
||||
-#if OS(DARWIN) || OS(FUCHSIA) || OS(WINDOWS)
|
||||
+#if (0)
|
||||
RandomDevice() = default;
|
||||
#else
|
||||
RandomDevice();
|
||||
@@ -48,8 +48,8 @@ public:
|
||||
void cryptographicallyRandomValues(unsigned char* buffer, size_t length);
|
||||
|
||||
private:
|
||||
-#if OS(DARWIN) || OS(FUCHSIA) || OS(WINDOWS)
|
||||
-#elif OS(UNIX)
|
||||
+#if (0)
|
||||
+#elif (1)
|
||||
int m_fd { -1 };
|
||||
#else
|
||||
#error "This configuration doesn't have a strong source of randomness."
|
||||
@@ -1,37 +0,0 @@
|
||||
diff --git Source/WTF/wtf/PointerPreparations.h Source/WTF/wtf/PointerPreparations.h
|
||||
index ef20a5e48512..ef9495169ff4 100644
|
||||
--- Source/WTF/wtf/PointerPreparations.h
|
||||
+++ Source/WTF/wtf/PointerPreparations.h
|
||||
@@ -34,16 +34,16 @@ namespace WTF {
|
||||
#if COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)
|
||||
|
||||
template<typename T>
|
||||
-ALWAYS_INLINE void* getVTablePointer(T* o) { return __builtin_get_vtable_pointer(o); }
|
||||
+ALWAYS_INLINE const void* getVTablePointer(T* o) { return __builtin_get_vtable_pointer(o); }
|
||||
|
||||
#else // not COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)
|
||||
|
||||
#if CPU(ARM64E)
|
||||
template<typename T>
|
||||
-ALWAYS_INLINE void* getVTablePointer(T* o) { return __builtin_ptrauth_auth(*(reinterpret_cast<void**>(o)), ptrauth_key_cxx_vtable_pointer, 0); }
|
||||
+ALWAYS_INLINE const void* getVTablePointer(T* o) { return __builtin_ptrauth_auth(*(reinterpret_cast<void**>(o)), ptrauth_key_cxx_vtable_pointer, 0); }
|
||||
#else // not CPU(ARM64E)
|
||||
template<typename T>
|
||||
-ALWAYS_INLINE void* getVTablePointer(T* o) { return (*(reinterpret_cast<void**>(o))); }
|
||||
+ALWAYS_INLINE const void* getVTablePointer(T* o) { return (*(reinterpret_cast<void**>(o))); }
|
||||
#endif // not CPU(ARM64E)
|
||||
|
||||
#endif // not COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)
|
||||
diff --git Source/WebCore/bindings/scripts/CodeGeneratorJS.pm Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
|
||||
index 35db4d28ccd6..03dd9c161a83 100644
|
||||
--- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
|
||||
+++ Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
|
||||
@@ -4881,7 +4881,7 @@ END
|
||||
push(@implContent, <<END) if $vtableNameGnu;
|
||||
|
||||
#if ENABLE(BINDING_INTEGRITY)
|
||||
- void* actualVTablePointer = getVTablePointer(impl.ptr());
|
||||
+ const void* actualVTablePointer = getVTablePointer(impl.ptr());
|
||||
#if PLATFORM(WIN)
|
||||
void* expectedVTablePointer = ${vtableRefWin};
|
||||
#else
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h
|
||||
index 90852df6..525ace42 100644
|
||||
--- Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h
|
||||
+++ Source/WTF/wtf/spi/darwin/ProcessMemoryFootprint.h
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#if OS(DARWIN)
|
||||
|
||||
-#if !PLATFORM(IOS_FAMILY_SIMULATOR) && __has_include(<libproc.h>)
|
||||
+#if !PLATFORM(IOS_FAMILY_SIMULATOR) && __has_include(<libproc.h>) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
|
||||
# include <libproc.h>
|
||||
# if RUSAGE_INFO_CURRENT >= 4
|
||||
# define HAS_MAX_FOOTPRINT
|
||||
@@ -1,22 +0,0 @@
|
||||
diff --git Source/WebCore/page/Crypto.cpp Source/WebCore/page/Crypto.cpp
|
||||
index 69c36e97..07969aad 100644
|
||||
--- Source/WebCore/page/Crypto.cpp
|
||||
+++ Source/WebCore/page/Crypto.cpp
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <JavaScriptCore/ArrayBufferView.h>
|
||||
#include <wtf/CryptographicallyRandomNumber.h>
|
||||
|
||||
-#if OS(DARWIN)
|
||||
+#if OS(DARWIN) && (__MAC_OS_X_VERSION_MIN_REQUIRED > 1090)
|
||||
#include <CommonCrypto/CommonCryptor.h>
|
||||
#include <CommonCrypto/CommonRandom.h>
|
||||
#endif
|
||||
@@ -58,7 +58,7 @@ ExceptionOr<void> Crypto::getRandomValues(ArrayBufferView& array)
|
||||
return Exception { TypeMismatchError };
|
||||
if (array.byteLength() > 65536)
|
||||
return Exception { QuotaExceededError };
|
||||
-#if OS(DARWIN)
|
||||
+#if OS(DARWIN) && (__MAC_OS_X_VERSION_MIN_REQUIRED > 1090)
|
||||
auto rc = CCRandomGenerateBytes(array.baseAddress(), array.byteLength());
|
||||
RELEASE_ASSERT(rc == kCCSuccess);
|
||||
#else
|
||||
@@ -0,0 +1,12 @@
|
||||
--- Source/ThirdParty/ANGLE/PlatformGTK.cmake.orig 2026-04-28 00:36:35
|
||||
+++ Source/ThirdParty/ANGLE/PlatformGTK.cmake 2026-04-28 00:36:35
|
||||
@@ -1,3 +1,9 @@
|
||||
+# On macOS, ANGLE's GTK platform file assumes Linux. Skip ANGLE backends
|
||||
+# entirely on Apple since the GTK tarball does not include Metal or CGL sources.
|
||||
+if (APPLE)
|
||||
+ return()
|
||||
+endif ()
|
||||
+
|
||||
list(APPEND ANGLE_DEFINITIONS ANGLE_PLATFORM_LINUX EGL_NO_PLATFORM_SPECIFIC_TYPES USE_SYSTEM_EGL)
|
||||
include(linux.cmake)
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
--- Source/bmalloc/bmalloc/BPlatform.h.orig 2026-04-29 22:00:00
|
||||
+++ Source/bmalloc/bmalloc/BPlatform.h 2026-04-29 22:00:00
|
||||
@@ -429,9 +429,5 @@
|
||||
#endif
|
||||
|
||||
#if !defined(BUSE_TZONE)
|
||||
-#if BUSE(LIBPAS) && BOS(DARWIN) && (BCPU(ARM64) || BCPU(X86_64))
|
||||
-#define BUSE_TZONE 1
|
||||
-#else
|
||||
#define BUSE_TZONE 0
|
||||
#endif
|
||||
-#endif
|
||||
--- Source/WTF/wtf/PlatformUse.h.orig 2026-04-29 22:00:00
|
||||
+++ Source/WTF/wtf/PlatformUse.h 2026-04-29 22:00:00
|
||||
@@ -305,12 +305,8 @@
|
||||
#endif
|
||||
|
||||
#if !defined(USE_TZONE_MALLOC)
|
||||
-#if (CPU(ARM64) || CPU(X86_64)) && OS(DARWIN) && (__SIZEOF_POINTER__ == 8)
|
||||
-#define USE_TZONE_MALLOC 1
|
||||
-#else
|
||||
#define USE_TZONE_MALLOC 0
|
||||
#endif
|
||||
-#endif
|
||||
|
||||
#if !defined(USE_PROTECTED_JIT)
|
||||
#if CPU(ADDRESS64) && OS(DARWIN) && USE(APPLE_INTERNAL_SDK)
|
||||
@@ -0,0 +1,28 @@
|
||||
--- Source/bmalloc/libpas/src/libpas/pas_mar_report_crash.c.orig
|
||||
+++ Source/bmalloc/libpas/src/libpas/pas_mar_report_crash.c
|
||||
@@ -35,6 +35,11 @@
|
||||
|
||||
#include <malloc/malloc.h>
|
||||
|
||||
+/* KERN_NOT_FOUND was added after the macOS 10.14 SDK (value 56). */
|
||||
+#ifndef KERN_NOT_FOUND
|
||||
+#define KERN_NOT_FOUND 56
|
||||
+#endif
|
||||
+
|
||||
PAS_BEGIN_EXTERN_C;
|
||||
|
||||
kern_return_t pas_mar_populate_crash_report(pas_mar_crash_report* report, const char* error_type, const char* confidence,
|
||||
--- Source/bmalloc/libpas/src/libpas/pas_report_crash.c.orig
|
||||
+++ Source/bmalloc/libpas/src/libpas/pas_report_crash.c
|
||||
@@ -33,6 +33,11 @@
|
||||
#include "pas_report_crash.h"
|
||||
#include "pas_probabilistic_guard_malloc_allocator.h"
|
||||
|
||||
+/* KERN_NOT_FOUND was added after the macOS 10.14 SDK (value 56). */
|
||||
+#ifndef KERN_NOT_FOUND
|
||||
+#define KERN_NOT_FOUND 56
|
||||
+#endif
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
static void* pas_enumerator_reader_adapter(pas_enumerator* enumerator,
|
||||
void* remote_address, size_t size, void* arg)
|
||||
@@ -0,0 +1,14 @@
|
||||
--- Source/bmalloc/bmalloc/ProcessCheck.h.orig 2026-04-28 00:52:36
|
||||
+++ Source/bmalloc/bmalloc/ProcessCheck.h 2026-04-28 00:52:36
|
||||
@@ -40,9 +40,8 @@
|
||||
#endif
|
||||
|
||||
#if BOS(DARWIN)
|
||||
-const char* processNameString();
|
||||
-
|
||||
-bool shouldAllowMiniMode();
|
||||
+inline const char* processNameString() { return ""; }
|
||||
+inline bool shouldAllowMiniMode() { return true; }
|
||||
#else
|
||||
inline bool shouldAllowMiniMode() { return true; }
|
||||
#endif
|
||||
@@ -0,0 +1,42 @@
|
||||
--- Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h.orig
|
||||
+++ Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h
|
||||
@@ -105,20 +105,14 @@
|
||||
static inline pas_thread_local_cache* pas_thread_local_cache_try_get(void)
|
||||
{
|
||||
pas_thread_local_cache* cache = pas_thread_local_cache_try_get_impl();
|
||||
-#if !PAS_OS(DARWIN)
|
||||
if (((uintptr_t)cache) == PAS_THREAD_LOCAL_CACHE_DESTROYED)
|
||||
return NULL;
|
||||
-#endif
|
||||
return cache;
|
||||
}
|
||||
|
||||
static inline bool pas_thread_local_cache_can_set(void)
|
||||
{
|
||||
-#if PAS_OS(DARWIN)
|
||||
- return !pthread_self_is_exiting_np() && !pas_msl_is_enabled();
|
||||
-#else
|
||||
return ((uintptr_t)pas_thread_local_cache_try_get_impl()) != PAS_THREAD_LOCAL_CACHE_DESTROYED;
|
||||
-#endif
|
||||
}
|
||||
|
||||
static inline void pas_thread_local_cache_set_impl(pas_thread_local_cache* thread_local_cache)
|
||||
|
||||
--- Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c.orig
|
||||
+++ Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c
|
||||
@@ -147,7 +147,6 @@
|
||||
if (verbose)
|
||||
pas_log("[%d] Destructor call for TLS %p\n", getpid(), thread_local_cache);
|
||||
|
||||
-#if !PAS_OS(DARWIN)
|
||||
/* If pthread_self_is_exiting_np does not exist, we set PAS_THREAD_LOCAL_CACHE_DESTROYED in the TLS so that
|
||||
subsequent calls of pas_thread_local_cache_try_get() can detect whether TLS is destroyed. Since
|
||||
PAS_THREAD_LOCAL_CACHE_DESTROYED is a non-null value, pthread will call this destructor again (up to
|
||||
@@ -155,7 +154,6 @@
|
||||
PAS_THREAD_LOCAL_CACHE_DESTROYED in the TLS each time to continue to indicate that destroy() has already been called once. */
|
||||
pas_thread_local_cache_set_impl((pas_thread_local_cache*)PAS_THREAD_LOCAL_CACHE_DESTROYED);
|
||||
PAS_ASSERT(!pas_thread_local_cache_can_set());
|
||||
-#endif
|
||||
|
||||
if (((uintptr_t)thread_local_cache) != PAS_THREAD_LOCAL_CACHE_DESTROYED)
|
||||
destroy(thread_local_cache, pas_lock_is_not_held);
|
||||
@@ -1,11 +0,0 @@
|
||||
--- Source/WebCore/style/StyleResolver.cpp
|
||||
+++ Source/WebCore/style/StyleResolver.cpp
|
||||
@@ -107,7 +107,7 @@ Resolver::Resolver(Document& document)
|
||||
if (view)
|
||||
m_mediaQueryEvaluator = MediaQueryEvaluator { view->mediaType() };
|
||||
else
|
||||
- m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };
|
||||
+ m_mediaQueryEvaluator = MediaQueryEvaluator { "all", false };
|
||||
|
||||
if (root) {
|
||||
m_rootDefaultStyle = styleForElement(*root, m_document.renderStyle(), nullptr, RuleMatchingBehavior::MatchOnlyUserAgentRules).renderStyle;
|
||||
@@ -1,11 +0,0 @@
|
||||
--- Source/WebKit/PlatformGTK.cmake.orig 2020-02-04 02:24:08.000000000 -0800
|
||||
+++ Source/WebKit/PlatformGTK.cmake 2022-08-23 16:17:18.000000000 -0700
|
||||
@@ -576,7 +576,7 @@
|
||||
# Commands for building the built-in injected bundle.
|
||||
add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp")
|
||||
ADD_WEBKIT_PREFIX_HEADER(webkit2gtkinjectedbundle)
|
||||
-target_link_libraries(webkit2gtkinjectedbundle WebKit)
|
||||
+target_link_libraries(webkit2gtkinjectedbundle WebKit WebCore)
|
||||
|
||||
target_include_directories(webkit2gtkinjectedbundle PRIVATE
|
||||
${WebKit_INCLUDE_DIRECTORIES}
|
||||
@@ -1,33 +0,0 @@
|
||||
Fix:
|
||||
|
||||
undefined method `exists?' for class File (NoMethodError)
|
||||
|
||||
https://bugs.webkit.org/show_bug.cgi?id=246743
|
||||
https://github.com/WebKit/WebKit/commit/b7ac5d0ccc7ca3ed6bf4f2d40fde60247ce87d3c
|
||||
--- Source/JavaScriptCore/offlineasm/config.rb
|
||||
+++ Source/JavaScriptCore/offlineasm/config.rb
|
||||
@@ -22,11 +22,11 @@
|
||||
# THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
buildProductsDirectory = ENV['BUILT_PRODUCTS_DIR'];
|
||||
-if buildProductsDirectory and File.exists?(buildProductsDirectory)
|
||||
+if buildProductsDirectory and File.exist?(buildProductsDirectory)
|
||||
$: << "#{buildProductsDirectory}/usr/local/include/WebKitAdditions/Scripts"
|
||||
end
|
||||
sdkRootDirectory = ENV['SDKROOT'];
|
||||
-if sdkRootDirectory and File.exists?(sdkRootDirectory)
|
||||
+if sdkRootDirectory and File.exist?(sdkRootDirectory)
|
||||
$: << "#{sdkRootDirectory}/usr/local/include/WebKitAdditions/Scripts"
|
||||
end
|
||||
|
||||
--- Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb
|
||||
+++ Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb
|
||||
@@ -36,7 +36,7 @@
|
||||
end
|
||||
|
||||
generated_path = File.join tmpdir, output_filename
|
||||
- if !File.exists?(generated_path)
|
||||
+ if !File.exist?(generated_path)
|
||||
puts "ERROR: Generated file does not exist at expected path."
|
||||
exit 1
|
||||
end
|
||||
@@ -0,0 +1,61 @@
|
||||
--- Source/WebCore/platform/graphics/egl/PlatformDisplayDefault.cpp.orig
|
||||
+++ Source/WebCore/platform/graphics/egl/PlatformDisplayDefault.cpp
|
||||
@@ -37,8 +37,7 @@ std::unique_ptr<PlatformDisplayDefault> PlatformDisplayDefault::create()
|
||||
{
|
||||
auto glDisplay = GLDisplay::create(eglGetDisplay(EGL_DEFAULT_DISPLAY));
|
||||
if (!glDisplay) {
|
||||
- WTFLogAlways("Could not create default EGL display: %s. Aborting...", GLContext::lastErrorString());
|
||||
- CRASH();
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
return std::unique_ptr<PlatformDisplayDefault>(new PlatformDisplayDefault(WTFMove(glDisplay)));
|
||||
--- Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.cpp.orig
|
||||
+++ Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.cpp
|
||||
@@ -44,8 +44,7 @@ std::unique_ptr<PlatformDisplaySurfaceless> PlatformDisplaySurfaceless::create()
|
||||
glDisplay = GLDisplay::create(eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, EGL_DEFAULT_DISPLAY, nullptr));
|
||||
|
||||
if (!glDisplay) {
|
||||
- WTFLogAlways("Could not create surfaceless EGL display: %s. Aborting...", GLContext::lastErrorString());
|
||||
- CRASH();
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
return std::unique_ptr<PlatformDisplaySurfaceless>(new PlatformDisplaySurfaceless(WTFMove(glDisplay)));
|
||||
--- Source/WebKit/WebProcess/glib/WebProcessGLib.cpp.orig
|
||||
+++ Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
|
||||
@@ -169,8 +169,7 @@ void WebProcess::initializePlatformDisplayIfNeeded() const
|
||||
}
|
||||
#endif
|
||||
|
||||
- WTFLogAlways("Could not create EGL display: no supported platform available. Aborting...");
|
||||
- CRASH();
|
||||
+ return;
|
||||
}
|
||||
|
||||
void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
|
||||
--- Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp.orig
|
||||
+++ Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <WebCore/Page.h>
|
||||
#include <WebCore/PageOverlayController.h>
|
||||
#include <WebCore/Region.h>
|
||||
+#include <WebCore/PlatformDisplay.h>
|
||||
#include <WebCore/Settings.h>
|
||||
#include <WebCore/ShareableBitmap.h>
|
||||
#include <wtf/SetForScope.h>
|
||||
@@ -204,8 +205,13 @@ void DrawingAreaCoordinatedGraphics::updatePreferences(const WebPreferencesStore&
|
||||
{
|
||||
Settings& settings = m_webPage->corePage()->settings();
|
||||
#if PLATFORM(GTK)
|
||||
- if (settings.acceleratedCompositingEnabled())
|
||||
+ if (settings.acceleratedCompositingEnabled()) {
|
||||
WebProcess::singleton().initializePlatformDisplayIfNeeded();
|
||||
+ if (!PlatformDisplay::sharedDisplayIfExists()) {
|
||||
+ settings.setAcceleratedCompositingEnabled(false);
|
||||
+ settings.setForceCompositingMode(false);
|
||||
+ }
|
||||
+ }
|
||||
#endif
|
||||
settings.setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey()));
|
||||
// Fixed position elements need to be composited and create stacking contexts
|
||||
@@ -1,16 +0,0 @@
|
||||
--- Source/WebKit/config.h.orig 2018-06-13 23:57:05.000000000 +0800
|
||||
+++ Source/WebKit/config.h 2018-06-13 23:59:35.000000000 +0800
|
||||
@@ -49,10 +49,10 @@
|
||||
#endif
|
||||
|
||||
#ifndef PLUGIN_ARCHITECTURE_UNSUPPORTED
|
||||
-#if PLATFORM(MAC)
|
||||
-#define PLUGIN_ARCHITECTURE_MAC 1
|
||||
-#elif PLATFORM(GTK) && OS(UNIX) && !OS(MAC_OS_X)
|
||||
+#if PLATFORM(GTK) && OS(UNIX)
|
||||
#define PLUGIN_ARCHITECTURE_UNIX 1
|
||||
+#elif PLATFORM(MAC)
|
||||
+#define PLUGIN_ARCHITECTURE_MAC 1
|
||||
#else
|
||||
#define PLUGIN_ARCHITECTURE_UNSUPPORTED 1
|
||||
#endif
|
||||
@@ -0,0 +1,76 @@
|
||||
--- Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp.orig 2026-04-29 22:00:00
|
||||
+++ Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp 2026-04-29 22:00:00
|
||||
@@ -1364,14 +1364,20 @@
|
||||
if (gst_structure_get_int(structure, key.utf8(), &value))
|
||||
return value;
|
||||
} else if constexpr(std::is_same_v<T, int64_t>) {
|
||||
- if (gst_structure_get_int64(structure, key.utf8(), &value))
|
||||
+ gint64 gstValue;
|
||||
+ if (gst_structure_get_int64(structure, key.utf8(), &gstValue)) {
|
||||
+ value = gstValue;
|
||||
return value;
|
||||
+ }
|
||||
} else if constexpr(std::is_same_v<T, unsigned>) {
|
||||
if (gst_structure_get_uint(structure, key.utf8(), &value))
|
||||
return value;
|
||||
} else if constexpr(std::is_same_v<T, uint64_t>) {
|
||||
- if (gst_structure_get_uint64(structure, key.utf8(), &value))
|
||||
+ guint64 gstValue;
|
||||
+ if (gst_structure_get_uint64(structure, key.utf8(), &gstValue)) {
|
||||
+ value = gstValue;
|
||||
return value;
|
||||
+ }
|
||||
} else if constexpr(std::is_same_v<T, double>) {
|
||||
if (gst_structure_get_double(structure, key.utf8(), &value))
|
||||
return value;
|
||||
--- Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp.orig 2026-04-29 23:00:00
|
||||
+++ Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp 2026-04-29 23:00:00
|
||||
@@ -828,7 +828,7 @@
|
||||
double rate;
|
||||
GstFormat format;
|
||||
GstSeekType startType;
|
||||
- int64_t start;
|
||||
+ gint64 start;
|
||||
gst_event_parse_seek(event.get(), &rate, &format, nullptr, &startType, &start, nullptr, nullptr);
|
||||
if (format != GST_FORMAT_TIME || startType != GST_SEEK_TYPE_SET) {
|
||||
GST_ERROR_OBJECT(element, "Rejecting unsupported seek event: %" GST_PTR_FORMAT, event.get());
|
||||
--- Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp.orig 2026-04-29 23:00:00
|
||||
+++ Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2026-04-29 23:00:00
|
||||
@@ -644,7 +644,7 @@
|
||||
GstFormat format;
|
||||
GstSeekFlags flags;
|
||||
GstSeekType startType, stopType;
|
||||
- int64_t start, stop;
|
||||
+ gint64 start, stop;
|
||||
gst_event_parse_seek(data->event.get(), &rate, &format, &flags, &startType, &start, &stopType, &stop);
|
||||
if (!gst_element_send_event(pipeline, data->event.leakRef()))
|
||||
return;
|
||||
@@ -1408,7 +1408,7 @@
|
||||
if (GST_STATE(m_pipeline.get()) < GST_STATE_PAUSED)
|
||||
return MediaTime::invalidTime();
|
||||
|
||||
- int64_t duration = 0;
|
||||
+ gint64 duration = 0;
|
||||
if (!gst_element_query_duration(m_pipeline.get(), GST_FORMAT_TIME, &duration) || !GST_CLOCK_TIME_IS_VALID(duration)) {
|
||||
GST_DEBUG_OBJECT(pipeline(), "Time duration query failed for %s", m_url.string().utf8().data());
|
||||
// https://www.w3.org/TR/2011/WD-html5-20110113/video.html#getting-media-metadata
|
||||
@@ -4688,7 +4688,7 @@
|
||||
if (GST_BUFFER_PTS_IS_VALID(buffer)) {
|
||||
auto segment = gst_sample_get_segment(m_sample.get());
|
||||
RELEASE_ASSERT(segment);
|
||||
- uint64_t streamTime;
|
||||
+ guint64 streamTime;
|
||||
if (int sign = gst_segment_to_stream_time_full(segment, GST_FORMAT_TIME, GST_BUFFER_PTS(buffer), &streamTime))
|
||||
metadata.mediaTime = sign * fromGstClockTime(streamTime).toDouble();
|
||||
}
|
||||
--- Source/WebCore/platform/mediarecorder/MediaRecorderPrivateGStreamer.cpp.orig 2026-04-29 23:00:00
|
||||
+++ Source/WebCore/platform/mediarecorder/MediaRecorderPrivateGStreamer.cpp 2026-04-29 23:00:00
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
void MediaRecorderPrivateBackend::positionUpdated()
|
||||
{
|
||||
- int64_t position;
|
||||
+ gint64 position;
|
||||
if (!gst_element_query_position(m_pipeline.get(), GST_FORMAT_TIME, &position)) {
|
||||
GST_LOG_OBJECT(m_pipeline.get(), "Could not query position");
|
||||
return;
|
||||
@@ -1,141 +0,0 @@
|
||||
diff --git Source/WTF/wtf/text/icu/UTextProvider.h Source/WTF/wtf/text/icu/UTextProvider.h
|
||||
index c8f28d6ed3da..3c6fbeab6a5c 100644
|
||||
--- Source/WTF/wtf/text/icu/UTextProvider.h
|
||||
+++ Source/WTF/wtf/text/icu/UTextProvider.h
|
||||
@@ -79,12 +79,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
|
||||
// Ensure chunk offset is well formed if computed offset exceeds int32_t range.
|
||||
ASSERT(offset < std::numeric_limits<int32_t>::max());
|
||||
text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
|
||||
- isAccessible = TRUE;
|
||||
+ isAccessible = true;
|
||||
return true;
|
||||
}
|
||||
if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) {
|
||||
text->chunkOffset = text->chunkLength;
|
||||
- isAccessible = FALSE;
|
||||
+ isAccessible = false;
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@@ -93,12 +93,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
|
||||
// Ensure chunk offset is well formed if computed offset exceeds int32_t range.
|
||||
ASSERT(offset < std::numeric_limits<int32_t>::max());
|
||||
text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
|
||||
- isAccessible = TRUE;
|
||||
+ isAccessible = true;
|
||||
return true;
|
||||
}
|
||||
if (nativeIndex <= 0 && !text->chunkNativeStart) {
|
||||
text->chunkOffset = 0;
|
||||
- isAccessible = FALSE;
|
||||
+ isAccessible = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
diff --git Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp
|
||||
index 0a646b7f390d..49980f95ba79 100644
|
||||
--- Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp
|
||||
+++ Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp
|
||||
@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward)
|
||||
if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) {
|
||||
// Already inside the buffer. Set the new offset.
|
||||
uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
|
||||
- return TRUE;
|
||||
+ return true;
|
||||
}
|
||||
if (index >= length && uText->chunkNativeLimit == length) {
|
||||
// Off the end of the buffer, but we can't get it.
|
||||
uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
|
||||
- return FALSE;
|
||||
+ return false;
|
||||
}
|
||||
} else {
|
||||
if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) {
|
||||
// Already inside the buffer. Set the new offset.
|
||||
uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
|
||||
- return TRUE;
|
||||
+ return true;
|
||||
}
|
||||
if (!index && !uText->chunkNativeStart) {
|
||||
// Already at the beginning; can't go any farther.
|
||||
uText->chunkOffset = 0;
|
||||
- return FALSE;
|
||||
+ return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward)
|
||||
|
||||
uText->nativeIndexingLimit = uText->chunkLength;
|
||||
|
||||
- return TRUE;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status)
|
||||
@@ -337,7 +337,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UText* text)
|
||||
static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
|
||||
{
|
||||
if (!text->context)
|
||||
- return FALSE;
|
||||
+ return false;
|
||||
int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text);
|
||||
UBool isAccessible;
|
||||
if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
|
||||
@@ -357,7 +357,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBo
|
||||
ASSERT(newContext == UTextProviderContext::PriorContext);
|
||||
textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
|
||||
}
|
||||
- return TRUE;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
|
||||
diff --git Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp
|
||||
index 69c8d091bd62..9c3fa709200a 100644
|
||||
--- Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp
|
||||
+++ Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp
|
||||
@@ -126,7 +126,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLength(UText* text)
|
||||
static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
|
||||
{
|
||||
if (!text->context)
|
||||
- return FALSE;
|
||||
+ return false;
|
||||
int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text);
|
||||
UBool isAccessible;
|
||||
if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
|
||||
@@ -146,7 +146,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBoo
|
||||
ASSERT(newContext == UTextProviderContext::PriorContext);
|
||||
textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
|
||||
}
|
||||
- return TRUE;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
|
||||
diff --git Source/WebCore/platform/text/TextCodecICU.cpp Source/WebCore/platform/text/TextCodecICU.cpp
|
||||
index 19b41eb7125f..2f7d1930b8d7 100644
|
||||
--- Source/WebCore/platform/text/TextCodecICU.cpp
|
||||
+++ Source/WebCore/platform/text/TextCodecICU.cpp
|
||||
@@ -194,7 +194,7 @@ void TextCodecICU::createICUConverter() const
|
||||
UErrorCode error = U_ZERO_ERROR;
|
||||
m_converter = ICUConverterPtr { ucnv_open(m_canonicalConverterName, &error), ucnv_close };
|
||||
if (m_converter)
|
||||
- ucnv_setFallback(m_converter.get(), TRUE);
|
||||
+ ucnv_setFallback(m_converter.get(), true);
|
||||
}
|
||||
|
||||
int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& error)
|
||||
diff --git Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
|
||||
index 61e3f6050d7f..5a51b9ec1d68 100644
|
||||
--- Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
|
||||
+++ Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
|
||||
@@ -402,7 +402,7 @@ DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::~DrawingMonitor()
|
||||
int DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::webViewDrawCallback(DrawingAreaProxyCoordinatedGraphics::DrawingMonitor* monitor)
|
||||
{
|
||||
monitor->didDraw();
|
||||
- return FALSE;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::start(WTF::Function<void(CallbackBase::Error)>&& callback)
|
||||
@@ -0,0 +1,29 @@
|
||||
--- Source/WebKit/Platform/IPC/unix/IPCUtilitiesUnix.cpp.orig
|
||||
+++ Source/WebKit/Platform/IPC/unix/IPCUtilitiesUnix.cpp
|
||||
@@ -34,6 +34,18 @@
|
||||
SocketPair createPlatformConnection(int socketType, unsigned options)
|
||||
{
|
||||
std::array<int, 2> sockets;
|
||||
+
|
||||
+#if OS(DARWIN)
|
||||
+ // macOS has a very small default buffer for AF_UNIX SOCK_DGRAM (2KB).
|
||||
+ // WebKit IPC messages can be up to 4KB, so increase the buffer size.
|
||||
+ socketType = SOCK_DGRAM;
|
||||
+ RELEASE_ASSERT(socketpair(AF_UNIX, socketType, 0, sockets.data()) != -1);
|
||||
+ constexpr int bufferSize = 262144;
|
||||
+ setsockopt(sockets[0], SOL_SOCKET, SO_SNDBUF, &bufferSize, sizeof(bufferSize));
|
||||
+ setsockopt(sockets[1], SOL_SOCKET, SO_SNDBUF, &bufferSize, sizeof(bufferSize));
|
||||
+ setsockopt(sockets[0], SOL_SOCKET, SO_RCVBUF, &bufferSize, sizeof(bufferSize));
|
||||
+ setsockopt(sockets[1], SOL_SOCKET, SO_RCVBUF, &bufferSize, sizeof(bufferSize));
|
||||
+#else
|
||||
|
||||
#if OS(LINUX)
|
||||
if ((options & SetCloexecOnServer) || (options & SetCloexecOnClient)) {
|
||||
@@ -48,6 +60,7 @@
|
||||
#endif
|
||||
|
||||
RELEASE_ASSERT(socketpair(AF_UNIX, socketType, 0, sockets.data()) != -1);
|
||||
+#endif // OS(DARWIN)
|
||||
|
||||
if (options & SetCloexecOnServer)
|
||||
RELEASE_ASSERT(setCloseOnExec(sockets[1]));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user