[packages/gtk-webkit4.1] - updated to 2.54.3
qboosh
qboosh at pld-linux.org
Wed Nov 25 20:09:26 CET 2026
commit b0b9b4e10347185131730b8349989ca7fc665d4a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Nov 25 20:09:29 2026 +0100
- updated to 2.54.3
gtk-webkit4.1.spec | 126 +++++++++++++-------------
max-bundle-size.patch | 11 ---
webkitgtk-serializers.patch | 209 --------------------------------------------
3 files changed, 60 insertions(+), 286 deletions(-)
---
diff --git a/gtk-webkit4.1.spec b/gtk-webkit4.1.spec
index e2baa8c..702e007 100644
--- a/gtk-webkit4.1.spec
+++ b/gtk-webkit4.1.spec
@@ -1,11 +1,12 @@
# TODO: review configure options:
# - FTL_JIT on !x86_64?
-# - WEB_RTC (experimental) + MEDIA_STREAM (BR: openwebrtc)
+# - WEB_RTC (default off for gtk port) + MEDIA_STREAM (BR: openwebrtc)?
# - ENCRYPTED_MEDIA (experimental)
-# - THUNDER? (BR: Thunder + ThunderClientLibraries)
+# - THUNDER? (developer; BR: Thunder + ThunderClientLibraries)
# - WEBDRIVER_BIDI (experimental)
# - WEBXR (experimental; BR: OpenXR >= 1.0.20)
# - WK_WEB_EXTENSIONS (experimental)
+# - USE_VULKAN (experimental; BR: vulkan-volk)
#
# Conditional build:
%bcond_without introspection # GObject introspection
@@ -27,19 +28,17 @@
Summary: Port of WebKit embeddable web component to GTK+ 3 with HTTP/2 support
Summary(pl.UTF-8): Port osadzalnego komponentu WWW WebKit do GTK+ 3 z obsługą HTTP/2
Name: gtk-webkit4.1
-# NOTE: 2.52.x is stable, 2.53.x devel
-Version: 2.52.6
-Release: 2
+# NOTE: 2.54.x is stable, 2.55.x devel
+Version: 2.54.3
+Release: 1
License: BSD-like
Group: X11/Libraries
Source0: https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
-# Source0-md5: b0a3fe77f93e174e6b30f099da1ae320
+# Source0-md5: e573b42fe1d53aa559b8d82bb8586892
Patch0: x32.patch
Patch1: gtk-webkit4-icu59.patch
Patch2: parallel-gir.patch
Patch3: gtk-webkit4-driver-version-suffix.patch
-Patch4: max-bundle-size.patch
-Patch5: webkitgtk-serializers.patch
URL: https://webkitgtk.org/
BuildRequires: /usr/bin/ld.gold
BuildRequires: EGL-devel
@@ -102,6 +101,7 @@ BuildRequires: libtasn1-devel
BuildRequires: libwebp-devel
BuildRequires: libxml2-devel >= 1:2.9.13
BuildRequires: libxslt-devel >= 1.1.13
+BuildRequires: ninja
BuildRequires: openjpeg2-devel >= 2.2.0
BuildRequires: openssl-devel >= 3.0.0
BuildRequires: pango-devel >= 1:1.32.0
@@ -136,25 +136,25 @@ BuildRequires: xorg-lib-libXrender-devel
BuildRequires: xorg-lib-libXt-devel
BuildRequires: xz
BuildRequires: zlib-devel
-Requires: at-spi2-core-libs >= 2.5.3
-Requires: atk >= 1:2.16.0
-Requires: cairo >= 1.16.0
-Requires: fontconfig-libs >= 2.13.0
-Requires: freetype >= 1:2.9.0
-Requires: glib2 >= 1:2.70.0
-Requires: gstreamer >= 1.2.3
-Requires: gstreamer-plugins-base >= 1.2.3
-Requires: gtk+3 >= 3.22.0
-Requires: harfbuzz >= 2.7.4
-Requires: libgcrypt >= 1.7.0
-Requires: libjxl >= 0.7.0
-Requires: libsoup3 >= 3.0
-Requires: libxml2 >= 1:2.9.13
-Requires: libxslt >= 1.1.13
-Requires: openjpeg2 >= 2.2.0
-Requires: pango >= 1:1.32.0
-Requires: wayland >= 1.20
-Requires: woff2 >= 1.0.2
+Requires: at-spi2-core-libs%{?_isa} >= 2.5.3
+Requires: atk%{?_isa} >= 1:2.16.0
+Requires: cairo%{?_isa} >= 1.16.0
+Requires: fontconfig-libs%{?_isa} >= 2.13.0
+Requires: freetype%{?_isa} >= 1:2.9.0
+Requires: glib2%{?_isa} >= 1:2.70.0
+Requires: gstreamer%{?_isa} >= 1.2.3
+Requires: gstreamer-plugins-base%{?_isa} >= 1.2.3
+Requires: gtk+3%{?_isa} >= 3.22.0
+Requires: harfbuzz%{?_isa} >= 2.7.4
+Requires: libgcrypt%{?_isa} >= 1.7.0
+Requires: libjxl%{?_isa} >= 0.7.0
+Requires: libsoup3%{?_isa} >= 3.0
+Requires: libxml2%{?_isa} >= 1:2.9.13
+Requires: libxslt%{?_isa} >= 1.1.13
+Requires: openjpeg2%{?_isa} >= 2.2.0
+Requires: pango%{?_isa} >= 1:1.32.0
+Requires: wayland%{?_isa} >= 1.20
+Requires: woff2%{?_isa} >= 1.0.2
%{?with_introspection:Conflicts: gir-repository < 0.6.5-7}
# Source/JavaScriptCore/CMakeLists.txt /WTF_CPU_
ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 hppa mips ppc ppc64 ppc64le s390 s390x sh4
@@ -172,11 +172,11 @@ obsługą HTTP/2 (libsoup 3).
Summary: Development files for WebKit for GTK+ 3 with HTTP/2 support
Summary(pl.UTF-8): Pliki programistyczne komponentu WebKit dla GTK+ 3 z obsługą HTTP/2
Group: X11/Development/Libraries
-Requires: gtk-webkit4.1 = %{version}-%{release}
-Requires: glib2-devel >= 1:2.70.0
-Requires: gtk+3-devel >= 3.22.0
-Requires: libsoup3-devel >= 3.0
-Requires: libstdc++-devel >= 6:11.2
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: glib2-devel%{?_isa} >= 1:2.70.0
+Requires: gtk+3-devel%{?_isa} >= 3.22.0
+Requires: libsoup3-devel%{?_isa} >= 3.0
+Requires: libstdc++-devel%{?_isa} >= 6:12.2
%description devel
Development files for WebKit for GTK+ 3 with HTTP/2 support.
@@ -200,25 +200,25 @@ Dokumentacja API portu WebKitu do GTK+ 3 z obsługą HTTP/2.
Summary: Port of WebKit embeddable web component to GTK 4
Summary(pl.UTF-8): Port osadzalnego komponentu WWW WebKit do GTK 4
Group: X11/Libraries
-Requires: at-spi2-core-libs >= 2.5.3
-Requires: atk >= 1:2.16.0
-Requires: cairo >= 1.16.0
-Requires: fontconfig-libs >= 2.13.0
-Requires: freetype >= 1:2.9.0
-Requires: glib2 >= 1:2.70.0
-Requires: gstreamer >= 1.2.3
-Requires: gstreamer-plugins-base >= 1.2.3
-Requires: gtk4 >= 4.6.0
-Requires: harfbuzz >= 2.7.4
-Requires: libgcrypt >= 1.7.0
-Requires: libjxl >= 0.7.0
-Requires: libsoup3 >= 3.0
-Requires: libxml2 >= 1:2.9.13
-Requires: libxslt >= 1.1.13
-Requires: openjpeg2 >= 2.2.0
-Requires: pango >= 1:1.32.0
-Requires: wayland >= 1.20
-Requires: woff2 >= 1.0.2
+Requires: at-spi2-core-libs%{?_isa} >= 2.5.3
+Requires: atk%{?_isa} >= 1:2.16.0
+Requires: cairo%{?_isa} >= 1.16.0
+Requires: fontconfig-libs%{?_isa} >= 2.13.0
+Requires: freetype%{?_isa} >= 1:2.9.0
+Requires: glib2%{?_isa} >= 1:2.70.0
+Requires: gstreamer%{?_isa} >= 1.2.3
+Requires: gstreamer-plugins-base%{?_isa} >= 1.2.3
+Requires: gtk4%{?_isa} >= 4.6.0
+Requires: harfbuzz%{?_isa} >= 2.7.4
+Requires: libgcrypt%{?_isa} >= 1.7.0
+Requires: libjxl%{?_isa} >= 0.7.0
+Requires: libsoup3%{?_isa} >= 3.0
+Requires: libxml2%{?_isa} >= 1:2.9.13
+Requires: libxslt%{?_isa} >= 1.1.13
+Requires: openjpeg2%{?_isa} >= 2.2.0
+Requires: pango%{?_isa} >= 1:1.32.0
+Requires: wayland%{?_isa} >= 1.20
+Requires: woff2%{?_isa} >= 1.0.2
%description -n gtk-webkit6
gtk-webkit6 is a port of the WebKit embeddable web component to GTK 4.
@@ -230,11 +230,11 @@ gtk-webkit6 to port osadzalnego komponentu WWW WebKit do GTK+ 4.
Summary: Development files for WebKit for GTK 4
Summary(pl.UTF-8): Pliki programistyczne komponentu WebKit dla GTK 4
Group: X11/Development/Libraries
-Requires: gtk-webkit6 = %{version}-%{release}
-Requires: glib2-devel >= 1:2.70.0
-Requires: gtk4-devel >= 4.6.0
-Requires: libsoup3-devel >= 3.0
-Requires: libstdc++-devel >= 6:11.2
+Requires: gtk-webkit6%{?_isa} = %{version}-%{release}
+Requires: glib2-devel%{?_isa} >= 1:2.70.0
+Requires: gtk4-devel%{?_isa} >= 4.6.0
+Requires: libsoup3-devel%{?_isa} >= 3.0
+Requires: libstdc++-devel%{?_isa} >= 6:12.2
%description -n gtk-webkit6-devel
Development files for WebKit for GTK 4.
@@ -260,14 +260,12 @@ Dokumentacja API portu WebKitu do GTK 4.
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
-%patch -P4 -p1
-%patch -P5 -p1
%build
CXXFLAGS="%{rpmcxxflags} -DNDEBUG %{?with_lowmem:--param ggc-min-expand=20 --param ggc-min-heapsize=65536}"
for kind in %{?with_gtk3:gtk3} %{?with_gtk4:gtk4} ; do
# USE_SYSTEM_MALLOC=ON (default in 32-bit builds) is broken as of v2.52.4 (bmalloc_CopyHeaders referred unconditionally in Source/JavaScriptCore/CMakeLists.txt)
-%cmake -B build-${kind} \
+%cmake -B build-${kind} -GNinja \
-DENABLE_GEOLOCATION=ON \
-DENABLE_GTKDOC=ON \
%{!?with_introspection:-DENABLE_INTROSPECTION=OFF} \
@@ -280,9 +278,6 @@ for kind in %{?with_gtk3:gtk3} %{?with_gtk4:gtk4} ; do
-DENABLE_C_LOOP=ON \
-DENABLE_JIT=OFF \
-DENABLE_SAMPLING_PROFILER=OFF \
-%endif
-%ifarch %{ix86} %{x8664} x32
- -DHAVE_SSE2_EXTENSIONS=ON \
%endif
-DPORT=GTK \
-DSHOULD_INSTALL_JS_SHELL=ON \
@@ -290,17 +285,16 @@ for kind in %{?with_gtk3:gtk3} %{?with_gtk4:gtk4} ; do
-DUSE_LIBBACKTRACE=OFF \
%{!?with_sysprof:-DUSE_SYSPROF_CAPTURE=OFF} \
-DUSE_SYSTEM_MALLOC=OFF \
- %{?max_bundle_size:-DUNIFIED_BUILD_MAX_BUNDLE_SIZE=%{max_bundle_size}}
+ %{?max_bundle_size:-DWEBKIT_MAX_BUNDLE_SIZE=%{max_bundle_size}}
-%{__make} -C build-${kind}
+%ninja_build -C build-${kind}
done
%install
rm -rf $RPM_BUILD_ROOT
for kind in %{?with_gtk3:gtk3} %{?with_gtk4:gtk4} ; do
-%{__make} -C build-${kind} install \
- DESTDIR=$RPM_BUILD_ROOT
+%ninja_install -C build-${kind}
done
install -d $RPM_BUILD_ROOT%{_gidocdir}
diff --git a/max-bundle-size.patch b/max-bundle-size.patch
deleted file mode 100644
index 0765210..0000000
--- a/max-bundle-size.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- webkitgtk-2.50.4/Source/cmake/WebKitMacros.cmake.orig 2025-08-08 11:17:56.304456000 +0200
-+++ webkitgtk-2.50.4/Source/cmake/WebKitMacros.cmake 2026-01-23 12:48:45.426052097 +0100
-@@ -16,6 +16,8 @@
- # Windows needs a larger bundle size because that helps keep WebCore.lib's size below the 4GB maximum in debug builds.
- if (MSVC AND ${_framework} STREQUAL "WebCore" AND ${_framework}_LIBRARY_TYPE STREQUAL "STATIC")
- list(APPEND gusb_args --max-bundle-size 16)
-+ elseif (UNIFIED_BUILD_MAX_BUNDLE_SIZE)
-+ list(APPEND gusb_args --max-bundle-size ${UNIFIED_BUILD_MAX_BUNDLE_SIZE})
- endif ()
-
- if (ENABLE_UNIFIED_BUILDS)
diff --git a/webkitgtk-serializers.patch b/webkitgtk-serializers.patch
deleted file mode 100644
index bdbbf11..0000000
--- a/webkitgtk-serializers.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-Based on commit https://github.com/WebKit/WebKit/commit/9823057a18307774342fa90acf9c0e1c189e30a8
-but with "Shared" part split additionally in 4 files to let compilation fit in 3GB address space
-
---- webkitgtk-2.52.4/Source/WebKit/CMakeLists.txt.orig 2026-06-11 06:12:49.003188621 +0200
-+++ webkitgtk-2.52.4/Source/WebKit/CMakeLists.txt 2026-06-11 06:27:30.225366168 +0200
-@@ -943,7 +943,17 @@ list(APPEND WebKit_SERIALIZATION_DEPENDE
-
- list(APPEND WebKit_DERIVED_SOURCES
- ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializers.h
-- ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializers.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersShared.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersSharedRemoteLayerTree.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersSharedWebCoreArgumentCoders.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersSharedWebGPU.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersWebProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersGPUProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersNetworkProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersPlatform.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersModelProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersUIProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersCommon.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
- ${WebKit_DERIVED_SOURCES_DIR}/SerializedTypeInfo.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
- ${WebKit_DERIVED_SOURCES_DIR}/WebKitPlatformGeneratedSerializers.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
- )
-@@ -951,7 +961,17 @@ list(APPEND WebKit_DERIVED_SOURCES
- add_custom_command(
- OUTPUT
- ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializers.h
-- ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializers.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersShared.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersSharedRemoteLayerTree.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersSharedWebCoreArgumentCoders.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersSharedWebGPU.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersWebProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersGPUProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersNetworkProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersPlatform.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersModelProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersUIProcess.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
-+ ${WebKit_DERIVED_SOURCES_DIR}/GeneratedSerializersCommon.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
- ${WebKit_DERIVED_SOURCES_DIR}/SerializedTypeInfo.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
- ${WebKit_DERIVED_SOURCES_DIR}/WebKitPlatformGeneratedSerializers.${WebKit_GENERATED_SERIALIZERS_SUFFIX}
- MAIN_DEPENDENCY ${WEBKIT_DIR}/Scripts/generate-serializers.py
---- webkitgtk-2.52.4/Source/WebKit/Scripts/generate-serializers.py.orig 2026-06-11 06:13:09.926528604 +0200
-+++ webkitgtk-2.52.4/Source/WebKit/Scripts/generate-serializers.py 2026-06-11 06:28:56.328233042 +0200
-@@ -30,6 +30,40 @@ import sys
-
- from webkit.opaque_ipc_types import is_opaque_type, opaque_ipc_types
-
-+# Directories under Source/WebKit/ that get their own per-domain
-+# GeneratedSerializers<Domain>.{mm,cpp} translation unit when invoked with
-+# --split-by-directory. Anything not matching one of these falls into
-+# GeneratedSerializersCommon.{mm,cpp} (the residual bucket).
-+KNOWN_DOMAINS = ['Shared', 'SharedRemoteLayerTree', 'SharedWebGPU', 'SharedWebCoreArgumentCoders', 'WebProcess', 'GPUProcess', 'NetworkProcess', 'Platform', 'ModelProcess', 'UIProcess']
-+RESIDUAL_DOMAIN = '__residual__'
-+
-+
-+def derive_source_directory(input_file_path):
-+ """Return the top-level subdirectory under Source/WebKit/ for a .serialization.in path,
-+ or None if the file doesn't live under Source/WebKit/<DIR>/...
-+ """
-+ parts = os.path.normpath(input_file_path).split(os.sep)
-+ for i in range(len(parts) - 2):
-+ if parts[i] == 'Source' and parts[i + 1] == 'WebKit':
-+ if parts[i + 2] == "Shared":
-+ if parts[i + 3] in {"WebGPU", "RemoteLayerTree"}:
-+ return f"Shared{parts[i+3]}"
-+ elif parts[i + 3].startswith("WebCoreArgumentCoders"):
-+ return "SharedWebCoreArgumentCoders"
-+ return "Shared"
-+ return parts[i + 2]
-+ return None
-+
-+
-+def matches_domain(item, domain_filter):
-+ """Filter helper used by argument_coder_declarations and generate_impl."""
-+ if domain_filter is None:
-+ return True
-+ source_directory = getattr(item, 'source_directory', None)
-+ if domain_filter == RESIDUAL_DOMAIN:
-+ return source_directory not in KNOWN_DOMAINS
-+ return source_directory == domain_filter
-+
- # Supported type attributes:
- #
- # AdditionalEncoder - generate serializers for StreamConnectionEncoder in addition to IPC::Encoder.
-@@ -106,6 +140,7 @@ class SerializedType(object):
- self.disableMissingMemberCheck = False
- self.debug_decoding_failure = False
- self.generic_wrapper = None
-+ self.source_directory = None
- if attributes is not None:
- for attribute in attributes.split(', '):
- if '=' in attribute:
-@@ -273,6 +308,7 @@ class SerializedEnum(object):
- self.valid_values = valid_values
- self.condition = condition
- self.attributes = attributes
-+ self.source_directory = None
-
- def namespace_and_name(self):
- if self.namespace is None:
-@@ -572,13 +608,15 @@ def one_argument_coder_declaration(type,
- return result
-
-
--def argument_coder_declarations(serialized_types, skip_nested, webkit_platform):
-+def argument_coder_declarations(serialized_types, skip_nested, webkit_platform, domain_filter=None):
- result = []
- for type in serialized_types:
- if type.nested == skip_nested:
- continue
- if (webkit_platform is not None and type.webkit_platform != webkit_platform):
- continue
-+ if not matches_domain(type, domain_filter):
-+ continue
- if type.templates:
- for template in type.templates:
- result.extend(one_argument_coder_declaration(type, template))
-@@ -1157,7 +1195,7 @@ def generate_one_impl(type, template_arg
- return result
-
-
--def generate_impl(serialized_types, serialized_enums, headers, generating_webkit_platform_impl, objc_wrapped_types):
-+def generate_impl(serialized_types, serialized_enums, headers, generating_webkit_platform_impl, objc_wrapped_types, domain_filter=None):
- result = []
- result.append(_license_header)
- result.append('#include "config.h"')
-@@ -1218,12 +1256,14 @@ def generate_impl(serialized_types, seri
- result.append(f'#endif // {type.condition}')
- result.append('')
-
-- result = result + argument_coder_declarations(serialized_types, False, generating_webkit_platform_impl)
-+ result = result + argument_coder_declarations(serialized_types, False, generating_webkit_platform_impl, domain_filter=domain_filter)
- result.append('')
-
- for type in serialized_types:
- if type.webkit_platform != generating_webkit_platform_impl:
- continue
-+ if not matches_domain(type, domain_filter):
-+ continue
- if type.templates:
- for template in type.templates:
- result.extend(generate_one_impl(type, template, serialized_types))
-@@ -1237,6 +1277,8 @@ def generate_impl(serialized_types, seri
- continue
- if not type.members_are_subclasses:
- continue
-+ if not matches_domain(type, domain_filter):
-+ continue
- result.append('')
- if type.condition is not None:
- result.append(f'#if {type.condition}')
-@@ -1261,6 +1303,8 @@ def generate_impl(serialized_types, seri
- for enum in serialized_enums:
- if enum.is_webkit_platform() != generating_webkit_platform_impl:
- continue
-+ if not matches_domain(enum, domain_filter):
-+ continue
- result.append('')
- if enum.condition is not None:
- result.append(f'#if {enum.condition}')
-@@ -2026,6 +2070,7 @@ def generate_webkit_secure_coding_header
-
-
- def main(argv):
-+ split_by_directory = True
- serialized_types = []
- serialized_enums = []
- using_statements = []
-@@ -2036,12 +2081,15 @@ def main(argv):
- additional_forward_declarations_list = []
- file_extension = argv[1]
- for i in range(2, len(argv)):
-+ source_directory = derive_source_directory(argv[i])
- with open(argv[i]) as file:
- new_types, new_enums, new_headers, new_using_statements, new_additional_forward_declarations, new_objc_wrapped_types = parse_serialized_types(file)
- for type in new_types:
- type.enforce_opaque_ipc_types_usage()
-+ type.source_directory = source_directory
- serialized_types.append(type)
- for enum in new_enums:
-+ enum.source_directory = source_directory
- serialized_enums.append(enum)
- for using_statement in new_using_statements:
- using_statement.enforce_opaque_ipc_types_usage()
-@@ -2058,8 +2106,20 @@ def main(argv):
-
- with open('GeneratedSerializers.h', "w+") as output:
- output.write(generate_header(serialized_types, serialized_enums, additional_forward_declarations_list))
-- with open('GeneratedSerializers.%s' % file_extension, "w+") as output:
-- output.write(generate_impl(serialized_types, serialized_enums, headers, False, []))
-+ if split_by_directory:
-+ for domain in KNOWN_DOMAINS:
-+ with open(f'GeneratedSerializers{domain}.{file_extension}', "w+") as output:
-+ output.write(generate_impl(serialized_types, serialized_enums, headers, False, [], domain_filter=domain))
-+ with open(f'GeneratedSerializersCommon.{file_extension}', "w+") as output:
-+ output.write(generate_impl(serialized_types, serialized_enums, headers, False, [], domain_filter=RESIDUAL_DOMAIN))
-+
-+ residual_types = [t.namespace_and_name() for t in serialized_types
-+ if not t.webkit_platform and t.source_directory not in KNOWN_DOMAINS]
-+ if residual_types:
-+ sys.stderr.write(f'generate-serializers.py: {len(residual_types)} type(s) fell into GeneratedSerializersCommon.{file_extension} (residual bucket): {", ".join(sorted(set(residual_types))[:10])}{"..." if len(residual_types) > 10 else ""}\n')
-+ else:
-+ with open('GeneratedSerializers.%s' % file_extension, "w+") as output:
-+ output.write(generate_impl(serialized_types, serialized_enums, headers, False, []))
- with open('WebKitPlatformGeneratedSerializers.%s' % file_extension, "w+") as output:
- output.write(generate_impl(serialized_types, serialized_enums, headers, True, objc_wrapped_types))
- with open('SerializedTypeInfo.%s' % file_extension, "w+") as output:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gtk-webkit4.1.git/commitdiff/b0b9b4e10347185131730b8349989ca7fc665d4a
More information about the pld-cvs-commit
mailing list