forked from pool/nodejs-electron
Accepting request 1237196 from home:dziobian:gulgul-ultron:19
- Update to 33.3.1 * Drop 32-bit support * chromium 130.0.6723.170 * node 20.18.0 * v8 13.0 * Behavior Changed: frame properties may retrieve detached WebFrameMain instances or none at all * Behavior Changed: webContents property on login on app * Added a handler, app.setClientCertRequestPasswordHandler(handler), to help unlock cryptographic devices when a PIN is needed. * Added View.setBorderRadius(radius) for customizing the border radius of views—with compatibility for WebContentsView. * Extended navigationHistory API with 2 new functions for better history management. #42014 * see https://github.com/electron/electron/releases/tag/v33.0.0 and https://www.electronjs.org/blog/electron-33-0 for more - Disable aarch64 builds due to OBS hardware limits. Sorry. - Drop Leap 15.5 support - Drop no longer needed patches * absl-base-dynamic_annotations.patch * angle-State-constexpr.patch * chromium-124-shims.patch * color_provider-incomplete-ColorProviderInternal.patch * ConsumeRadii-linker-error.patch * Cr126-abseil-shims.patch * crashpad-use-system-abseil.patch * DesktopNativeWidgetAura-HandleActivationChanged-crash.patch * harfbuzz-replace-chromium-scoped-type.patch * harfbuzz-replace-HbScopedPointer.patch * http_auth_ntlm_mechanism-could-not-convert-to-base-span.patch * licenses.py-FileNotFoundError.patch * native_css_paint_definition-expected-unqualified-id.patch * page_popup_controller-missing-optional.patch * partition_alloc-no-lto.patch * preview_cancel_reason-missing-string.patch * quiche-QuicIntervalDeque-no-match-for-operator-mm.patch * real_time_reporting_bindings-forward-declaration.patch * run_segmenter-missing-optional.patch * skia-system-vulkan-headers.patch * system-zlib.patch * text_decoder-missing-optional.patch * wayland-proto-31-cursor-shape.patch - Drop libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch and replace it with more fine-grained reverts: * aom3.10-AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.patch * aom3.10-AV1E_SET_AUTO_TILES.patch * webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch * webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR-2.patch - Drop the following revert: * bad-font-gc0000.patch * bad-font-gc000.patch * bad-font-gc00.patch * bad-font-gc0.patch * bad-font-gc11.patch * bad-font-gc1.patch * bad-font-gc2.patch * bad-font-gc3.patch - Add bsc1224178-font-gc.patch for a proper fix for bsc#1224178 deb#1067886 - Add backported or forwardable patches to fix build errors: * account_id-missing-optional.patch * css_attr_value_tainting-missing-once_flag.patch * electron_usb_delegate-incomplete-UsbDeviceInfo.patch * exception_context-missing-variant.patch * fix-build-without-service-discovery.patch * ip_protection_data_types-missing-optional.patch * skia_image_decoder_base-missing-stack.patch * vtt_scanner-missing-variant.patch * wayland_connection-Wchanges-meaning.patch - Add patches to fix build errors due to our changes: * build-without-speech-service.patch * chromium-123-qrcode.patch * chromium-125-cloud_authenticator.patch * chromium-127-crabby.patch * chromium-129-disable-H.264-video-parser-during-demuxing.patch * chromium-130-fontations.patch * cr130-abseil-remove-unused-deps.patch * cr130-absl-base.patch * delete-old-language-detection-which-uses-tflite.patch * fix-build-without-screen-ai.patch * private_aggregation_host-uint128.patch * remove-libphonenumber.patch * system-absl_algorithm.patch * wayland_version.patch - 15.6: use bundled vulkan and spirv headers - 15.6: revert upstream changes to build with old wayland * wayland-protocol-toplevel-icon.patch * wayland-protocol-toplevel-icon-2.patch * wayland-protocol-toplevel-drag.patch - Use bundled yuv everywhere due to system version being too old OBS-URL: https://build.opensuse.org/request/show/1237196 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=182
This commit is contained in:
@@ -1,15 +0,0 @@
|
|||||||
--- src/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc.orig
|
|
||||||
+++ src/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
|
|
||||||
@@ -7654,6 +7654,12 @@ template bool ConsumeRadii(CSSValue* hor
|
|
||||||
const CSSParserContext& context,
|
|
||||||
bool use_legacy_parsing);
|
|
||||||
|
|
||||||
+template bool ConsumeRadii(CSSValue* horizontal_radii[4],
|
|
||||||
+ CSSValue* vertical_radii[4],
|
|
||||||
+ CSSParserTokenRange& stream,
|
|
||||||
+ const CSSParserContext& context,
|
|
||||||
+ bool use_legacy_parsing);
|
|
||||||
+
|
|
||||||
template <class T = CSSParserTokenRange>
|
|
||||||
requires std::is_same_v<T, CSSParserTokenStream> ||
|
|
||||||
std::is_same_v<T, CSSParserTokenRange>
|
|
@@ -1,65 +0,0 @@
|
|||||||
From b90d7410221d30c40a0d5ac1ff0041667fd8db0e Mon Sep 17 00:00:00 2001
|
|
||||||
From: "lauren n. liberda" <lauren@selfisekai.rocks>
|
|
||||||
Date: Wed, 26 Jun 2024 00:56:57 +0000
|
|
||||||
Subject: [PATCH] unbundle: update absl shims
|
|
||||||
|
|
||||||
Change-Id: I6fca3a8fd333c027fe48d8871073c79e7d8c3cd6
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5657110
|
|
||||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
||||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
|
||||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1319524}
|
|
||||||
---
|
|
||||||
build/linux/unbundle/absl_debugging.gn | 2 ++
|
|
||||||
build/linux/unbundle/absl_random.gn | 5 +++++
|
|
||||||
build/linux/unbundle/absl_status.gn | 2 ++
|
|
||||||
build/linux/unbundle/absl_types.gn | 2 ++
|
|
||||||
4 files changed, 11 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/build/linux/unbundle/absl_debugging.gn b/build/linux/unbundle/absl_debugging.gn
|
|
||||||
index 5fbd34abbc96ae..b59a45b0913116 100644
|
|
||||||
--- a/build/linux/unbundle/absl_debugging.gn
|
|
||||||
+++ b/build/linux/unbundle/absl_debugging.gn
|
|
||||||
@@ -46,5 +46,7 @@ source_set("symbolize") {
|
|
||||||
public_configs = [ ":system_absl_symbolize" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+source_set("demangle_rust_test") {
|
|
||||||
+}
|
|
||||||
source_set("stacktrace_test") {
|
|
||||||
}
|
|
||||||
diff --git a/build/linux/unbundle/absl_random.gn b/build/linux/unbundle/absl_random.gn
|
|
||||||
index 7bb70241ad1f8d..eae95345e491d1 100644
|
|
||||||
--- a/build/linux/unbundle/absl_random.gn
|
|
||||||
+++ b/build/linux/unbundle/absl_random.gn
|
|
||||||
@@ -57,3 +57,8 @@ source_set("random") {
|
|
||||||
deps = [ ":random_shim" ]
|
|
||||||
public_configs = [ ":system_absl_random_random" ]
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+group("distributions_test") {
|
|
||||||
+}
|
|
||||||
+group("mock_distributions_test") {
|
|
||||||
+}
|
|
||||||
diff --git a/build/linux/unbundle/absl_status.gn b/build/linux/unbundle/absl_status.gn
|
|
||||||
index 5f1e73a6d4d133..1905485814986e 100644
|
|
||||||
--- a/build/linux/unbundle/absl_status.gn
|
|
||||||
+++ b/build/linux/unbundle/absl_status.gn
|
|
||||||
@@ -38,3 +38,5 @@ source_set("status_test") {
|
|
||||||
}
|
|
||||||
source_set("statusor_test") {
|
|
||||||
}
|
|
||||||
+source_set("status_matchers_test") {
|
|
||||||
+}
|
|
||||||
diff --git a/build/linux/unbundle/absl_types.gn b/build/linux/unbundle/absl_types.gn
|
|
||||||
index 4bb77f1b631cbd..8d2b1314558f2c 100644
|
|
||||||
--- a/build/linux/unbundle/absl_types.gn
|
|
||||||
+++ b/build/linux/unbundle/absl_types.gn
|
|
||||||
@@ -93,5 +93,7 @@ source_set("variant") {
|
|
||||||
|
|
||||||
source_set("optional_test") {
|
|
||||||
}
|
|
||||||
+source_set("span_test") {
|
|
||||||
+}
|
|
||||||
source_set("variant_test") {
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
From f9819bb70b413c8310cd209c75cc555495e28564 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Allen Bauer <kylixrd@chromium.org>
|
|
||||||
Date: Fri, 31 May 2024 15:55:13 +0000
|
|
||||||
Subject: [PATCH] Harden DesktopNativeWidgetAura against a destroyed Widget.
|
|
||||||
|
|
||||||
Under CLIENT_OWNS_WIDGET ownership mode, it is possible for the Widget to have already been destroyed. This hardens the NativeWidget to handle this case without crashing.
|
|
||||||
|
|
||||||
Bug: 40242079, 40232479
|
|
||||||
Change-Id: I455e1690b49ff50e4eac3b9a085d9f15ccb6adec
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5585758
|
|
||||||
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
|
|
||||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
|
||||||
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1308668}
|
|
||||||
---
|
|
||||||
ui/views/widget/desktop_aura/desktop_native_widget_aura.cc | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
|
||||||
index 9ae19505357c6b..1974865e8c8a8f 100644
|
|
||||||
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
|
||||||
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
|
||||||
@@ -431,8 +431,8 @@ DesktopNativeWidgetAura::tooltip_controller() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopNativeWidgetAura::HandleActivationChanged(bool active) {
|
|
||||||
- DCHECK(native_widget_delegate_);
|
|
||||||
- if (!native_widget_delegate_->ShouldHandleNativeWidgetActivationChanged(
|
|
||||||
+ if (!native_widget_delegate_ ||
|
|
||||||
+ !native_widget_delegate_->ShouldHandleNativeWidgetActivationChanged(
|
|
||||||
active)) {
|
|
||||||
return;
|
|
||||||
}
|
|
@@ -1,5 +1,5 @@
|
|||||||
--- src/content/browser/renderer_host/render_frame_host_impl.cc.orig 2023-02-08 21:38:09.974003318 +0100
|
--- src/content/browser/renderer_host/render_frame_host_impl.cc.orig 2024-12-08 18:45:24.018025513 +0100
|
||||||
+++ src/content/browser/renderer_host/render_frame_host_impl.cc 2023-02-13 14:13:50.217792624 +0100
|
+++ src/content/browser/renderer_host/render_frame_host_impl.cc 2024-12-20 14:29:00.900380913 +0100
|
||||||
@@ -8,6 +8,7 @@
|
@@ -8,6 +8,7 @@
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@@ -8,10 +8,10 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
@@ -1818,7 +1819,12 @@ RenderFrameHostImpl::~RenderFrameHostImp
|
@@ -2276,7 +2277,12 @@ RenderFrameHostImpl::~RenderFrameHostImp
|
||||||
|
// completes. Among other things, this ensures that any `SafeRef`s from
|
||||||
// `DocumentService` and `RenderFrameHostUserData` subclasses are still valid
|
// `DocumentService` and `RenderFrameHostUserData` subclasses are still valid
|
||||||
// when their destructors run.
|
// when their destructors run.
|
||||||
document_associated_data_->RemoveAllServices();
|
|
||||||
- document_associated_data_.reset();
|
- document_associated_data_.reset();
|
||||||
+ // HACK: Using .reset() here works on MSVC and LLVM libc++ because the std::optional
|
+ // HACK: Using .reset() here works on MSVC and LLVM libc++ because the std::optional
|
||||||
+ // is still valid while the destructor runs. This does not work on GNU libstdc++
|
+ // is still valid while the destructor runs. This does not work on GNU libstdc++
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
// If this was the last active frame in the SiteInstanceGroup, the
|
// If this was the last active frame in the SiteInstanceGroup, the
|
||||||
// DecrementActiveFrameCount call will trigger the deletion of the
|
// DecrementActiveFrameCount call will trigger the deletion of the
|
||||||
@@ -13254,7 +13260,9 @@ bool RenderFrameHostImpl::DidCommitNavig
|
@@ -14482,7 +14488,9 @@ bool RenderFrameHostImpl::DidCommitNavig
|
||||||
// RenderFrameHost commits before the navigation commits. This happens
|
// RenderFrameHost commits before the navigation commits. This happens
|
||||||
// when the current RenderFrameHost crashes before navigating to a new
|
// when the current RenderFrameHost crashes before navigating to a new
|
||||||
// URL.
|
// URL.
|
||||||
|
14
_constraints
14
_constraints
@@ -15,7 +15,7 @@
|
|||||||
</conditions>
|
</conditions>
|
||||||
<hardware>
|
<hardware>
|
||||||
<memory>
|
<memory>
|
||||||
<size unit="G">24</size>
|
<size unit="G">30</size> <!-- lto1-wpa does really need enormous amounts of memory -->
|
||||||
</memory>
|
</memory>
|
||||||
</hardware>
|
</hardware>
|
||||||
</overwrite>
|
</overwrite>
|
||||||
@@ -31,16 +31,4 @@
|
|||||||
<jobs>8</jobs>
|
<jobs>8</jobs>
|
||||||
</hardware>
|
</hardware>
|
||||||
</overwrite>
|
</overwrite>
|
||||||
<overwrite>
|
|
||||||
<conditions>
|
|
||||||
<arch>aarch64</arch>
|
|
||||||
<arch>armv7l</arch>
|
|
||||||
<arch>armv6l</arch>
|
|
||||||
</conditions>
|
|
||||||
<hardware>
|
|
||||||
<cpu>
|
|
||||||
<flag>asimdrdm</flag> <!-- prevent scheduling on old machines -->
|
|
||||||
</cpu>
|
|
||||||
</hardware>
|
|
||||||
</overwrite>
|
|
||||||
</constraints>
|
</constraints>
|
||||||
|
@@ -1,27 +0,0 @@
|
|||||||
From 91a8dd6bff0c3965ab324b5c2a3c19c0a2931831 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "lauren n. liberda" <lauren@selfisekai.rocks>
|
|
||||||
Date: Sat, 29 Jun 2024 00:26:40 +0000
|
|
||||||
Subject: [PATCH] unbundle: add missing absl_base header
|
|
||||||
|
|
||||||
Change-Id: Ie4edda0ec8661437652b2c4c324ac82137bfcfed
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5659519
|
|
||||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
|
||||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
||||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1321266}
|
|
||||||
---
|
|
||||||
build/linux/unbundle/absl_base.gn | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/build/linux/unbundle/absl_base.gn b/build/linux/unbundle/absl_base.gn
|
|
||||||
index 7da86e46147bdd..b5ce0863e6fde7 100644
|
|
||||||
--- a/build/linux/unbundle/absl_base.gn
|
|
||||||
+++ b/build/linux/unbundle/absl_base.gn
|
|
||||||
@@ -27,6 +27,7 @@ shim_headers("base_shim") {
|
|
||||||
headers = [
|
|
||||||
"call_once.h",
|
|
||||||
"casts.h",
|
|
||||||
+ "dynamic_annotations.h",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
33
account_id-missing-optional.patch
Normal file
33
account_id-missing-optional.patch
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
From dc9db222b929f5da415216134b77d7f3bf141813 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ivan Murashov <ivan.murashov@lge.com>
|
||||||
|
Date: Wed, 18 Sep 2024 19:25:42 +0000
|
||||||
|
Subject: [PATCH] IWYU: Add missing include for std::optional usage in
|
||||||
|
account_id.h
|
||||||
|
|
||||||
|
In the CL https://crrev.com/c/5834683 used std::optional in the
|
||||||
|
components/account_id/account_id.h, but corresponding include
|
||||||
|
was missed. Added missing include for std::optional usage.
|
||||||
|
|
||||||
|
Bug: 41455655
|
||||||
|
Change-Id: Ifea71ffb41a8c83051ce95763d9cb836488ca86f
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5872821
|
||||||
|
Commit-Queue: Ivan Murashov <ivan.murashov@lge.com>
|
||||||
|
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
|
||||||
|
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1357262}
|
||||||
|
---
|
||||||
|
components/account_id/account_id.h | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/components/account_id/account_id.h b/components/account_id/account_id.h
|
||||||
|
index 9804f179139063..e03b974cb481ba 100644
|
||||||
|
--- a/components/account_id/account_id.h
|
||||||
|
+++ b/components/account_id/account_id.h
|
||||||
|
@@ -8,6 +8,7 @@
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
+#include <optional>
|
||||||
|
#include <ostream>
|
||||||
|
#include <string>
|
||||||
|
#include <string_view>
|
@@ -1,134 +0,0 @@
|
|||||||
From 0508fc9b920b001115f80790e4942ff69d3f5de1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roman Lavrov <romanl@google.com>
|
|
||||||
Date: Tue, 23 Apr 2024 15:32:52 -0400
|
|
||||||
Subject: [PATCH] Reland "Cleanup: replace DirtyObjectType check with constexpr
|
|
||||||
generator"
|
|
||||||
|
|
||||||
Avoid using lambdas with member function pointers which caused issues
|
|
||||||
on MSVC C++17.
|
|
||||||
|
|
||||||
This is a reland of commit 89caa0e1d99e45f3d6f355f6e14c147f8de3e0e5
|
|
||||||
|
|
||||||
Original change's description:
|
|
||||||
> Cleanup: replace DirtyObjectType check with constexpr generator
|
|
||||||
>
|
|
||||||
> Static assert was meant to avoid kDirtyObjectHandlers getting out of
|
|
||||||
> sync, but it doesn't achieve that goal as it's just comparing values
|
|
||||||
> with ints which is confusing.
|
|
||||||
>
|
|
||||||
> Replacing with constexpr generated std::array. C++20 allows to easily
|
|
||||||
> validate that all values are set by _not_ default-initializing
|
|
||||||
> `handlers`. C++17 makes it trickier, addeded static_assert on an
|
|
||||||
> additional static constexpr bool (silly but I can't find a more concise
|
|
||||||
> way)
|
|
||||||
>
|
|
||||||
> Bug: angleproject:8666
|
|
||||||
> Bug: b/335295728
|
|
||||||
> Change-Id: Idf9bbd087d09d5ba253a7587ce0503cae3fcf3a7
|
|
||||||
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5478231
|
|
||||||
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
||||||
> Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
||||||
|
|
||||||
Bug: angleproject:8666
|
|
||||||
Bug: b/335295728
|
|
||||||
Change-Id: I62e66b700512e072ef10cc57a17e8837a534c0d5
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5589285
|
|
||||||
Commit-Queue: Roman Lavrov <romanl@google.com>
|
|
||||||
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
||||||
---
|
|
||||||
src/libANGLE/State.cpp | 2 --
|
|
||||||
src/libANGLE/State.h | 67 +++++++++++++++++++++++++-----------------
|
|
||||||
2 files changed, 40 insertions(+), 29 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/libANGLE/State.h b/src/libANGLE/State.h
|
|
||||||
index b2aa6749060..38a219f489d 100644
|
|
||||||
--- src/third_party/angle/src/libANGLE/State.h.orig 2024-07-24 12:51:20.205804675 +0200
|
|
||||||
+++ src/third_party/angle/src/libANGLE/State.h 2024-07-26 14:11:54.188991370 +0200
|
|
||||||
@@ -1447,41 +1447,46 @@ class State : angle::NonCopyable
|
|
||||||
angle::Result syncProgramPipelineObject(const Context *context, Command command);
|
|
||||||
|
|
||||||
using DirtyObjectHandler = angle::Result (State::*)(const Context *context, Command command);
|
|
||||||
+ using DirtyObjectHandlerArray = std::array<DirtyObjectHandler, state::DIRTY_OBJECT_MAX>;
|
|
||||||
|
|
||||||
- static constexpr std::array<DirtyObjectHandler, state::DIRTY_OBJECT_MAX> kDirtyObjectHandlers =
|
|
||||||
- []() {
|
|
||||||
- // Work around C++'s lack of array element support in designated initializers
|
|
||||||
- std::array<DirtyObjectHandler, state::DIRTY_OBJECT_MAX> handlers{};
|
|
||||||
-
|
|
||||||
- handlers[state::DIRTY_OBJECT_ACTIVE_TEXTURES] = &State::syncActiveTextures;
|
|
||||||
- handlers[state::DIRTY_OBJECT_TEXTURES_INIT] = &State::syncTexturesInit;
|
|
||||||
- handlers[state::DIRTY_OBJECT_IMAGES_INIT] = &State::syncImagesInit;
|
|
||||||
- handlers[state::DIRTY_OBJECT_READ_ATTACHMENTS] = &State::syncReadAttachments;
|
|
||||||
- handlers[state::DIRTY_OBJECT_DRAW_ATTACHMENTS] = &State::syncDrawAttachments;
|
|
||||||
- handlers[state::DIRTY_OBJECT_READ_FRAMEBUFFER] = &State::syncReadFramebuffer;
|
|
||||||
- handlers[state::DIRTY_OBJECT_DRAW_FRAMEBUFFER] = &State::syncDrawFramebuffer;
|
|
||||||
- handlers[state::DIRTY_OBJECT_VERTEX_ARRAY] = &State::syncVertexArray;
|
|
||||||
- handlers[state::DIRTY_OBJECT_TEXTURES] = &State::syncTextures;
|
|
||||||
- handlers[state::DIRTY_OBJECT_IMAGES] = &State::syncImages;
|
|
||||||
- handlers[state::DIRTY_OBJECT_SAMPLERS] = &State::syncSamplers;
|
|
||||||
- handlers[state::DIRTY_OBJECT_PROGRAM_PIPELINE_OBJECT] =
|
|
||||||
- &State::syncProgramPipelineObject;
|
|
||||||
-
|
|
||||||
- return handlers;
|
|
||||||
- }();
|
|
||||||
-
|
|
||||||
- static_assert(
|
|
||||||
- []() {
|
|
||||||
- for (auto handler : kDirtyObjectHandlers)
|
|
||||||
+ static constexpr DirtyObjectHandlerArray MakeDirtyObjectHandlers()
|
|
||||||
+ {
|
|
||||||
+ // Work around C++'s lack of array element support in designated initializers
|
|
||||||
+ // This function cannot be a lambda due to MSVC C++17 limitations b/330910097#comment5
|
|
||||||
+ DirtyObjectHandlerArray handlers{};
|
|
||||||
+
|
|
||||||
+ handlers[state::DIRTY_OBJECT_ACTIVE_TEXTURES] = &State::syncActiveTextures;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_TEXTURES_INIT] = &State::syncTexturesInit;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_IMAGES_INIT] = &State::syncImagesInit;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_READ_ATTACHMENTS] = &State::syncReadAttachments;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_DRAW_ATTACHMENTS] = &State::syncDrawAttachments;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_READ_FRAMEBUFFER] = &State::syncReadFramebuffer;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_DRAW_FRAMEBUFFER] = &State::syncDrawFramebuffer;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_VERTEX_ARRAY] = &State::syncVertexArray;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_TEXTURES] = &State::syncTextures;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_IMAGES] = &State::syncImages;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_SAMPLERS] = &State::syncSamplers;
|
|
||||||
+ handlers[state::DIRTY_OBJECT_PROGRAM_PIPELINE_OBJECT] = &State::syncProgramPipelineObject;
|
|
||||||
+
|
|
||||||
+ // If a handler is missing, reset everything for ease of static_assert
|
|
||||||
+ for (auto handler : handlers)
|
|
||||||
+ {
|
|
||||||
+ if (handler == nullptr)
|
|
||||||
{
|
|
||||||
- if (handler == nullptr)
|
|
||||||
- {
|
|
||||||
- return false;
|
|
||||||
- }
|
|
||||||
+ return DirtyObjectHandlerArray();
|
|
||||||
}
|
|
||||||
- return true;
|
|
||||||
- }(),
|
|
||||||
- "kDirtyObjectHandlers missing a handler");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return handlers;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ angle::Result dirtyObjectHandler(size_t dirtyObject, const Context *context, Command command)
|
|
||||||
+ {
|
|
||||||
+ static constexpr DirtyObjectHandlerArray handlers = MakeDirtyObjectHandlers();
|
|
||||||
+ static_assert(handlers[0] != nullptr, "MakeDirtyObjectHandlers missing a handler");
|
|
||||||
+
|
|
||||||
+ return (this->*handlers[dirtyObject])(context, command);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
// Robust init must happen before Framebuffer init for the Vulkan back-end.
|
|
||||||
static_assert(state::DIRTY_OBJECT_ACTIVE_TEXTURES < state::DIRTY_OBJECT_TEXTURES_INIT,
|
|
||||||
@@ -1606,7 +1611,7 @@ ANGLE_INLINE angle::Result State::syncDi
|
|
||||||
|
|
||||||
for (size_t dirtyObject : dirtyObjects)
|
|
||||||
{
|
|
||||||
- ANGLE_TRY((this->*kDirtyObjectHandlers[dirtyObject])(context, command));
|
|
||||||
+ ANGLE_TRY(dirtyObjectHandler(dirtyObject, context, command));
|
|
||||||
}
|
|
||||||
|
|
||||||
mDirtyObjects &= ~dirtyObjects;
|
|
44
aom3.10-AV1E_SET_AUTO_TILES.patch
Normal file
44
aom3.10-AV1E_SET_AUTO_TILES.patch
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
From 0b4b5b0ae81dca83d3d602e905732e2c82bd340d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergey Silkin <ssilkin@webrtc.org>
|
||||||
|
Date: Fri, 30 Aug 2024 13:37:32 +0200
|
||||||
|
Subject: [PATCH] Use AV1E_SET_AUTO_TILES
|
||||||
|
|
||||||
|
Delegate control over number of times to encoder using AV1E_SET_AUTO_TILES that was added in https://aomedia-review.googlesource.com/c/aom/+/191102.
|
||||||
|
|
||||||
|
Bug: webrtc:351644568
|
||||||
|
Change-Id: I87ed11734e907c7f6c6508ac7389c84ececf5b21
|
||||||
|
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361140
|
||||||
|
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
|
||||||
|
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#42903}
|
||||||
|
---
|
||||||
|
.../codecs/av1/libaom_av1_encoder.cc | 16 +---------------
|
||||||
|
1 file changed, 1 insertion(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
index db9238477d..c06792207e 100644
|
||||||
|
--- a/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
+++ b/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
@@ -307,21 +307,7 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||||
|
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_PALETTE, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (cfg_.g_threads == 8) {
|
||||||
|
- // Values passed to AV1E_SET_TILE_ROWS and AV1E_SET_TILE_COLUMNS are log2()
|
||||||
|
- // based.
|
||||||
|
- // Use 4 tile columns x 2 tile rows for 8 threads.
|
||||||
|
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_ROWS, 1);
|
||||||
|
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS, 2);
|
||||||
|
- } else if (cfg_.g_threads == 4) {
|
||||||
|
- // Use 2 tile columns x 2 tile rows for 4 threads.
|
||||||
|
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_ROWS, 1);
|
||||||
|
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS, 1);
|
||||||
|
- } else {
|
||||||
|
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS,
|
||||||
|
- static_cast<int>(log2(cfg_.g_threads)));
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
+ SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_AUTO_TILES, 1);
|
||||||
|
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ROW_MT, 1);
|
||||||
|
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_OBMC, 0);
|
||||||
|
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_NOISE_SENSITIVITY, 0);
|
66
aom3.10-AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.patch
Normal file
66
aom3.10-AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.patch
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
From 84273f56d92953f15269cdb1d95d1851f83a8fe9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergey Silkin <ssilkin@webrtc.org>
|
||||||
|
Date: Fri, 30 Aug 2024 12:32:52 +0200
|
||||||
|
Subject: [PATCH] Specify max number of consecutive drops using time units
|
||||||
|
|
||||||
|
AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR was added in https://aomedia-review.googlesource.com/c/aom/+/192402. It allows to configure max number of consecutive frame drops using time units. Use it instead of AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.
|
||||||
|
|
||||||
|
Bug: webrtc:351644568
|
||||||
|
Change-Id: I73265d5258d681926eb5b65e32c2a61b26c310ba
|
||||||
|
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360842
|
||||||
|
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
|
||||||
|
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#42995}
|
||||||
|
---
|
||||||
|
.../codecs/av1/libaom_av1_encoder.cc | 24 ++++---------------
|
||||||
|
1 file changed, 5 insertions(+), 19 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
index 6b71874c3f..262cb9d36b 100644
|
||||||
|
--- a/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
+++ b/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
@@ -166,14 +166,6 @@ int32_t VerifyCodecSettings(const VideoCodec& codec_settings) {
|
||||||
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
-int GetMaxConsecDrops(double framerate_fps) {
|
||||||
|
- // Consecutive frame drops result in a video freeze. We want to minimize the
|
||||||
|
- // max number of consecutive drops and, at the same time, keep the value high
|
||||||
|
- // enough to let encoder drain the buffer at overshoot.
|
||||||
|
- constexpr double kMaxFreezeSeconds = 0.25;
|
||||||
|
- return std::ceil(kMaxFreezeSeconds * framerate_fps);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
LibaomAv1Encoder::LibaomAv1Encoder(const Environment& env,
|
||||||
|
LibaomAv1EncoderSettings settings)
|
||||||
|
: inited_(false),
|
||||||
|
@@ -339,6 +331,11 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||||
|
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_TX64, 0);
|
||||||
|
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_REFERENCE_FRAMES, 3);
|
||||||
|
|
||||||
|
+ if (adaptive_max_consec_drops_) {
|
||||||
|
+ SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR,
|
||||||
|
+ 250);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -815,17 +812,6 @@ void LibaomAv1Encoder::SetRates(const RateControlParameters& parameters) {
|
||||||
|
SetEncoderControlParameters(AV1E_SET_SVC_PARAMS, &*svc_params_);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (adaptive_max_consec_drops_ &&
|
||||||
|
- (!rates_configured_ || framerate_fps_ != parameters.framerate_fps)) {
|
||||||
|
- int max_consec_drops = GetMaxConsecDrops(parameters.framerate_fps);
|
||||||
|
- if (!SetEncoderControlParameters(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR,
|
||||||
|
- max_consec_drops)) {
|
||||||
|
- RTC_LOG(LS_WARNING)
|
||||||
|
- << "Failed to set AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR to "
|
||||||
|
- << max_consec_drops;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
framerate_fps_ = parameters.framerate_fps;
|
||||||
|
|
||||||
|
rates_configured_ = true;
|
@@ -1,250 +0,0 @@
|
|||||||
Revert the following commit:
|
|
||||||
|
|
||||||
commit 886c849ee96e3026d28d7615cdd5af9628a2e5c8
|
|
||||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Date: Tue Feb 20 18:18:04 2024 +0000
|
|
||||||
|
|
||||||
[gc] Make UnicodeRangeSet gc'd.
|
|
||||||
|
|
||||||
There should be no user-visible behaviour change.
|
|
||||||
|
|
||||||
Bug: 41490008
|
|
||||||
Change-Id: I7f0003b7ff7c464d4ee36442bcff8c63da79b20c
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302778
|
|
||||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
|
||||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1262789}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/css_font_face.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/css_font_face.cc
|
|
||||||
@@ -291,7 +291,6 @@ bool CSSFontFace::UpdatePeriod() {
|
|
||||||
void CSSFontFace::Trace(Visitor* visitor) const {
|
|
||||||
visitor->Trace(segmented_font_faces_);
|
|
||||||
visitor->Trace(sources_);
|
|
||||||
- visitor->Trace(ranges_);
|
|
||||||
visitor->Trace(font_face_);
|
|
||||||
}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/css_font_face.h
|
|
||||||
+++ b/third_party/blink/renderer/core/css/css_font_face.h
|
|
||||||
@@ -47,8 +47,8 @@ class SimpleFontData;
|
|
||||||
|
|
||||||
class CORE_EXPORT CSSFontFace final : public GarbageCollected<CSSFontFace> {
|
|
||||||
public:
|
|
||||||
- CSSFontFace(FontFace* font_face, HeapVector<UnicodeRange>&& ranges)
|
|
||||||
- : ranges_(MakeGarbageCollected<UnicodeRangeSet>(std::move(ranges))),
|
|
||||||
+ CSSFontFace(FontFace* font_face, Vector<UnicodeRange>& ranges)
|
|
||||||
+ : ranges_(base::AdoptRef(new UnicodeRangeSet(ranges))),
|
|
||||||
font_face_(font_face) {
|
|
||||||
DCHECK(font_face_);
|
|
||||||
}
|
|
||||||
@@ -61,7 +61,7 @@ class CORE_EXPORT CSSFontFace final : pu
|
|
||||||
}
|
|
||||||
FontFace* GetFontFace() const { return font_face_.Get(); }
|
|
||||||
|
|
||||||
- const UnicodeRangeSet* Ranges() { return ranges_.Get(); }
|
|
||||||
+ scoped_refptr<UnicodeRangeSet> Ranges() { return ranges_; }
|
|
||||||
|
|
||||||
void AddSegmentedFontFace(CSSSegmentedFontFace*);
|
|
||||||
void RemoveSegmentedFontFace(CSSSegmentedFontFace*);
|
|
||||||
@@ -98,9 +98,9 @@ class CORE_EXPORT CSSFontFace final : pu
|
|
||||||
private:
|
|
||||||
void SetLoadStatus(FontFace::LoadStatusType);
|
|
||||||
|
|
||||||
+ scoped_refptr<UnicodeRangeSet> ranges_;
|
|
||||||
HeapHashSet<Member<CSSSegmentedFontFace>> segmented_font_faces_;
|
|
||||||
HeapDeque<Member<CSSFontFaceSource>> sources_;
|
|
||||||
- Member<const UnicodeRangeSet> ranges_;
|
|
||||||
Member<FontFace> font_face_;
|
|
||||||
};
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/font_face.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/font_face.cc
|
|
||||||
@@ -90,7 +90,7 @@ const CSSValue* ParseCSSValue(const Exec
|
|
||||||
|
|
||||||
CSSFontFace* CreateCSSFontFace(FontFace* font_face,
|
|
||||||
const CSSValue* unicode_range) {
|
|
||||||
- HeapVector<UnicodeRange> ranges;
|
|
||||||
+ Vector<UnicodeRange> ranges;
|
|
||||||
if (const auto* range_list = To<CSSValueList>(unicode_range)) {
|
|
||||||
unsigned num_ranges = range_list->length();
|
|
||||||
for (unsigned i = 0; i < num_ranges; i++) {
|
|
||||||
@@ -100,7 +100,7 @@ CSSFontFace* CreateCSSFontFace(FontFace*
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- return MakeGarbageCollected<CSSFontFace>(font_face, std::move(ranges));
|
|
||||||
+ return MakeGarbageCollected<CSSFontFace>(font_face, ranges);
|
|
||||||
}
|
|
||||||
|
|
||||||
const CSSValue* ConvertFontMetricOverrideValue(const CSSValue* parsed_value) {
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_data_for_range_set.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_data_for_range_set.h
|
|
||||||
@@ -39,18 +39,16 @@ class SimpleFontData;
|
|
||||||
class PLATFORM_EXPORT FontDataForRangeSet
|
|
||||||
: public GarbageCollected<FontDataForRangeSet> {
|
|
||||||
public:
|
|
||||||
- explicit FontDataForRangeSet(const SimpleFontData* font_data = nullptr,
|
|
||||||
- const UnicodeRangeSet* range_set = nullptr)
|
|
||||||
- : font_data_(font_data), range_set_(range_set) {}
|
|
||||||
+ explicit FontDataForRangeSet(
|
|
||||||
+ const SimpleFontData* font_data = nullptr,
|
|
||||||
+ scoped_refptr<UnicodeRangeSet> range_set = nullptr)
|
|
||||||
+ : font_data_(font_data), range_set_(std::move(range_set)) {}
|
|
||||||
|
|
||||||
FontDataForRangeSet(const FontDataForRangeSet& other);
|
|
||||||
|
|
||||||
virtual ~FontDataForRangeSet() = default;
|
|
||||||
|
|
||||||
- void Trace(Visitor* visitor) const {
|
|
||||||
- visitor->Trace(font_data_);
|
|
||||||
- visitor->Trace(range_set_);
|
|
||||||
- }
|
|
||||||
+ void Trace(Visitor* visitor) const { visitor->Trace(font_data_); }
|
|
||||||
|
|
||||||
bool Contains(UChar32 test_char) const {
|
|
||||||
return !range_set_ || range_set_->Contains(test_char);
|
|
||||||
@@ -58,7 +56,7 @@ class PLATFORM_EXPORT FontDataForRangeSe
|
|
||||||
bool IsEntireRange() const {
|
|
||||||
return !range_set_ || range_set_->IsEntireRange();
|
|
||||||
}
|
|
||||||
- const UnicodeRangeSet* Ranges() const { return range_set_.Get(); }
|
|
||||||
+ UnicodeRangeSet* Ranges() const { return range_set_.get(); }
|
|
||||||
bool HasFontData() const { return font_data_; }
|
|
||||||
const SimpleFontData* FontData() const { return font_data_.Get(); }
|
|
||||||
|
|
||||||
@@ -74,7 +72,7 @@ class PLATFORM_EXPORT FontDataForRangeSe
|
|
||||||
|
|
||||||
protected:
|
|
||||||
Member<const SimpleFontData> font_data_;
|
|
||||||
- Member<const UnicodeRangeSet> range_set_;
|
|
||||||
+ scoped_refptr<UnicodeRangeSet> range_set_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace blink
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
@@ -508,10 +508,10 @@ const OpenTypeVerticalData& HarfBuzzFace
|
|
||||||
return *harfbuzz_font_data_->VerticalData();
|
|
||||||
}
|
|
||||||
|
|
||||||
-hb_font_t* HarfBuzzFace::GetScaledFont(const UnicodeRangeSet* range_set,
|
|
||||||
+hb_font_t* HarfBuzzFace::GetScaledFont(scoped_refptr<UnicodeRangeSet> range_set,
|
|
||||||
VerticalLayoutCallbacks vertical_layout,
|
|
||||||
float specified_size) const {
|
|
||||||
- harfbuzz_font_data_->range_set_ = range_set;
|
|
||||||
+ harfbuzz_font_data_->range_set_ = std::move(range_set);
|
|
||||||
harfbuzz_font_data_->UpdateFallbackMetricsAndScale(*platform_data_,
|
|
||||||
vertical_layout);
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
|
||||||
@@ -66,7 +66,7 @@ class HarfBuzzFace final : public Garbag
|
|
||||||
// Passing in specified_size in order to control selecting the right value
|
|
||||||
// from the trak table. If not set, the size of the internal FontPlatformData
|
|
||||||
// object will be used.
|
|
||||||
- hb_font_t* GetScaledFont(const UnicodeRangeSet*,
|
|
||||||
+ hb_font_t* GetScaledFont(scoped_refptr<UnicodeRangeSet>,
|
|
||||||
VerticalLayoutCallbacks,
|
|
||||||
float specified_size) const;
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
@@ -32,7 +32,7 @@ struct HarfBuzzFontData final : public G
|
|
||||||
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
|
|
||||||
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
|
|
||||||
|
|
||||||
- void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
|
|
||||||
+ void Trace(Visitor*) const {}
|
|
||||||
|
|
||||||
// The vertical origin and vertical advance functions in HarfBuzzFace require
|
|
||||||
// the ascent and height metrics as fallback in case no specific vertical
|
|
||||||
@@ -98,7 +98,7 @@ struct HarfBuzzFontData final : public G
|
|
||||||
SpaceGlyphInOpenTypeTables::kUnknown;
|
|
||||||
|
|
||||||
scoped_refptr<OpenTypeVerticalData> vertical_data_;
|
|
||||||
- Member<const UnicodeRangeSet> range_set_;
|
|
||||||
+ scoped_refptr<UnicodeRangeSet> range_set_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace blink
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
|
||||||
@@ -289,7 +289,7 @@ void RoundHarfBuzzBufferPositions(hb_buf
|
|
||||||
inline bool ShapeRange(hb_buffer_t* buffer,
|
|
||||||
const FontFeatures& font_features,
|
|
||||||
const SimpleFontData* current_font,
|
|
||||||
- const UnicodeRangeSet* current_font_range_set,
|
|
||||||
+ scoped_refptr<UnicodeRangeSet> current_font_range_set,
|
|
||||||
UScriptCode current_run_script,
|
|
||||||
hb_direction_t direction,
|
|
||||||
hb_language_t language,
|
|
||||||
@@ -325,7 +325,7 @@ inline bool ShapeRange(hb_buffer_t* buff
|
|
||||||
hb_buffer_set_direction(buffer, direction);
|
|
||||||
|
|
||||||
hb_font_t* hb_font =
|
|
||||||
- face->GetScaledFont(current_font_range_set,
|
|
||||||
+ face->GetScaledFont(std::move(current_font_range_set),
|
|
||||||
HB_DIRECTION_IS_VERTICAL(direction)
|
|
||||||
? HarfBuzzFace::kPrepareForVerticalLayout
|
|
||||||
: HarfBuzzFace::kNoVerticalLayout,
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/unicode_range_set.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/unicode_range_set.cc
|
|
||||||
@@ -31,8 +31,8 @@
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
-UnicodeRangeSet::UnicodeRangeSet(HeapVector<UnicodeRange>&& ranges)
|
|
||||||
- : ranges_(std::move(ranges)) {
|
|
||||||
+UnicodeRangeSet::UnicodeRangeSet(const Vector<UnicodeRange>& ranges)
|
|
||||||
+ : ranges_(ranges) {
|
|
||||||
if (ranges_.empty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/unicode_range_set.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/unicode_range_set.h
|
|
||||||
@@ -26,12 +26,13 @@
|
|
||||||
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_UNICODE_RANGE_SET_H_
|
|
||||||
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_UNICODE_RANGE_SET_H_
|
|
||||||
|
|
||||||
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
|
|
||||||
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
|
||||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
|
||||||
+#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/text/wtf_uchar.h"
|
|
||||||
+#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
|
|
||||||
+#include "third_party/blink/renderer/platform/wtf/vector.h"
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
@@ -55,14 +56,13 @@ struct PLATFORM_EXPORT UnicodeRange fina
|
|
||||||
UChar32 to_;
|
|
||||||
};
|
|
||||||
|
|
||||||
-class PLATFORM_EXPORT UnicodeRangeSet
|
|
||||||
- : public GarbageCollected<UnicodeRangeSet> {
|
|
||||||
+class PLATFORM_EXPORT UnicodeRangeSet : public RefCounted<UnicodeRangeSet> {
|
|
||||||
+ USING_FAST_MALLOC(UnicodeRangeSet);
|
|
||||||
+
|
|
||||||
public:
|
|
||||||
- explicit UnicodeRangeSet(HeapVector<UnicodeRange>&&);
|
|
||||||
+ explicit UnicodeRangeSet(const Vector<UnicodeRange>&);
|
|
||||||
UnicodeRangeSet() = default;
|
|
||||||
|
|
||||||
- void Trace(Visitor* visitor) const { visitor->Trace(ranges_); }
|
|
||||||
-
|
|
||||||
bool Contains(UChar32) const;
|
|
||||||
bool IntersectsWith(const String&) const;
|
|
||||||
bool IsEntireRange() const { return ranges_.empty(); }
|
|
||||||
@@ -71,8 +71,7 @@ class PLATFORM_EXPORT UnicodeRangeSet
|
|
||||||
bool operator==(const UnicodeRangeSet& other) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
- HeapVector<UnicodeRange>
|
|
||||||
- ranges_; // If empty, represents the whole code space.
|
|
||||||
+ Vector<UnicodeRange> ranges_; // If empty, represents the whole code space.
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace blink
|
|
@@ -1,159 +0,0 @@
|
|||||||
Revert the following commit:
|
|
||||||
|
|
||||||
commit 59daae50fc3c47f7a8dbcc828446fdaa9f8c12c4
|
|
||||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Date: Tue Feb 20 18:35:11 2024 +0000
|
|
||||||
|
|
||||||
[gc] Make OpenTypeVerticalData gc'd.
|
|
||||||
|
|
||||||
There should be no user-visible behaviour change.
|
|
||||||
|
|
||||||
Bug: 41490008
|
|
||||||
Change-Id: Id93c85a7beb710944e07cff614cff2409c818436
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302893
|
|
||||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1262805}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.cc
|
|
||||||
@@ -308,6 +308,11 @@ SkFont FontPlatformData::CreateSkFont(co
|
|
||||||
}
|
|
||||||
#endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_IOS)
|
|
||||||
|
|
||||||
+scoped_refptr<OpenTypeVerticalData> FontPlatformData::CreateVerticalData()
|
|
||||||
+ const {
|
|
||||||
+ return OpenTypeVerticalData::CreateUnscaled(typeface_);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
IdentifiableToken FontPlatformData::ComputeTypefaceDigest() const {
|
|
||||||
DCHECK(typeface_);
|
|
||||||
int table_count = typeface_->countTables();
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.h
|
|
||||||
@@ -59,6 +59,7 @@ typedef const struct __CTFont* CTFontRef
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
class HarfBuzzFace;
|
|
||||||
+class OpenTypeVerticalData;
|
|
||||||
|
|
||||||
class PLATFORM_EXPORT FontPlatformData
|
|
||||||
: public GarbageCollected<FontPlatformData> {
|
|
||||||
@@ -137,6 +138,8 @@ class PLATFORM_EXPORT FontPlatformData
|
|
||||||
|
|
||||||
SkFont CreateSkFont(const FontDescription* = nullptr) const;
|
|
||||||
|
|
||||||
+ scoped_refptr<OpenTypeVerticalData> CreateVerticalData() const;
|
|
||||||
+
|
|
||||||
// Computes a digest from the typeface. The digest only depends on the
|
|
||||||
// underlying font itself, and does not vary by the style (size, weight,
|
|
||||||
// italics, etc). This is aimed at discovering the fingerprinting information
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
|
|
||||||
@@ -27,10 +27,10 @@
|
|
||||||
|
|
||||||
#include "base/memory/scoped_refptr.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/glyph.h"
|
|
||||||
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
|
||||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
|
|
||||||
+#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/vector.h"
|
|
||||||
#include "third_party/skia/include/core/SkRefCnt.h"
|
|
||||||
#include "third_party/skia/include/core/SkTypeface.h"
|
|
||||||
@@ -40,11 +40,14 @@ class SkFont;
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
class PLATFORM_EXPORT OpenTypeVerticalData
|
|
||||||
- : public GarbageCollected<OpenTypeVerticalData> {
|
|
||||||
- public:
|
|
||||||
- explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
|
|
||||||
+ : public RefCounted<OpenTypeVerticalData> {
|
|
||||||
+ USING_FAST_MALLOC(OpenTypeVerticalData);
|
|
||||||
|
|
||||||
- void Trace(Visitor*) const {}
|
|
||||||
+ public:
|
|
||||||
+ static scoped_refptr<OpenTypeVerticalData> CreateUnscaled(
|
|
||||||
+ sk_sp<SkTypeface> typeface) {
|
|
||||||
+ return base::AdoptRef(new OpenTypeVerticalData(typeface));
|
|
||||||
+ }
|
|
||||||
|
|
||||||
void SetScaleAndFallbackMetrics(float size_per_unit,
|
|
||||||
float ascent,
|
|
||||||
@@ -60,6 +63,8 @@ class PLATFORM_EXPORT OpenTypeVerticalDa
|
|
||||||
float* out_xy_array) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
+ explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
|
|
||||||
+
|
|
||||||
void LoadMetrics(sk_sp<SkTypeface>);
|
|
||||||
bool HasVORG() const { return !vert_origin_y_.empty(); }
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
@@ -202,7 +202,8 @@
|
|
||||||
void* user_data) {
|
|
||||||
HarfBuzzFontData* hb_font_data =
|
|
||||||
reinterpret_cast<HarfBuzzFontData*>(font_data);
|
|
||||||
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
|
|
||||||
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
|
|
||||||
+ hb_font_data->VerticalData();
|
|
||||||
if (!vertical_data) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@@ -223,7 +223,8 @@ static hb_position_t HarfBuzzGetGlyphVer
|
|
||||||
void* user_data) {
|
|
||||||
HarfBuzzFontData* hb_font_data =
|
|
||||||
reinterpret_cast<HarfBuzzFontData*>(font_data);
|
|
||||||
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
|
|
||||||
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
|
|
||||||
+ hb_font_data->VerticalData();
|
|
||||||
if (!vertical_data) {
|
|
||||||
return SkiaScalarToHarfBuzzPosition(hb_font_data->height_fallback_);
|
|
||||||
}
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
@@ -32,10 +32,7 @@ struct HarfBuzzFontData final : public G
|
|
||||||
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
|
|
||||||
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
|
|
||||||
|
|
||||||
- void Trace(Visitor* visitor) const {
|
|
||||||
- visitor->Trace(vertical_data_);
|
|
||||||
- visitor->Trace(range_set_);
|
|
||||||
- }
|
|
||||||
+ void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
|
|
||||||
|
|
||||||
// The vertical origin and vertical advance functions in HarfBuzzFace require
|
|
||||||
// the ascent and height metrics as fallback in case no specific vertical
|
|
||||||
@@ -70,18 +67,18 @@ struct HarfBuzzFontData final : public G
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- OpenTypeVerticalData* VerticalData() {
|
|
||||||
+ scoped_refptr<OpenTypeVerticalData> VerticalData() {
|
|
||||||
if (!vertical_data_) {
|
|
||||||
DCHECK_NE(ascent_fallback_, kInvalidFallbackMetricsValue);
|
|
||||||
DCHECK_NE(height_fallback_, kInvalidFallbackMetricsValue);
|
|
||||||
DCHECK_NE(size_per_unit_, kInvalidFallbackMetricsValue);
|
|
||||||
|
|
||||||
vertical_data_ =
|
|
||||||
- MakeGarbageCollected<OpenTypeVerticalData>(font_.refTypeface());
|
|
||||||
+ OpenTypeVerticalData::CreateUnscaled(font_.refTypeface());
|
|
||||||
}
|
|
||||||
vertical_data_->SetScaleAndFallbackMetrics(size_per_unit_, ascent_fallback_,
|
|
||||||
height_fallback_);
|
|
||||||
- return vertical_data_.Get();
|
|
||||||
+ return vertical_data_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const hb::unique_ptr<hb_font_t> unscaled_font_;
|
|
||||||
@@ -100,7 +97,7 @@ struct HarfBuzzFontData final : public G
|
|
||||||
SpaceGlyphInOpenTypeTables space_in_gsub_ =
|
|
||||||
SpaceGlyphInOpenTypeTables::kUnknown;
|
|
||||||
|
|
||||||
- Member<OpenTypeVerticalData> vertical_data_;
|
|
||||||
+ scoped_refptr<OpenTypeVerticalData> vertical_data_;
|
|
||||||
Member<const UnicodeRangeSet> range_set_;
|
|
||||||
};
|
|
||||||
|
|
@@ -1,107 +0,0 @@
|
|||||||
Revert the following commit:
|
|
||||||
|
|
||||||
commit 5ffa0446f51e34d06dc0539810a8a5d35ec9e3fc
|
|
||||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Date: Thu Feb 22 17:08:22 2024 +0000
|
|
||||||
|
|
||||||
[fonts][perf] Explicitly leak SimpleFontDatas via a LRU cache.
|
|
||||||
|
|
||||||
This adds a strong LRU cache to FontDataCache to retain the most
|
|
||||||
recently used fonts.
|
|
||||||
|
|
||||||
This covers the case where a large amount of DOM is destroyed, and
|
|
||||||
previously we'd release all the font related objects if the GC kicked
|
|
||||||
in.
|
|
||||||
|
|
||||||
Speedometer3 appears to peak at ~75 objects in the cache.
|
|
||||||
|
|
||||||
Results for different cache sizes:
|
|
||||||
|
|
||||||
Cache size: 64 | 32 | 16
|
|
||||||
Speedometer3: +0.9% | +0.5% | +0%
|
|
||||||
|
|
||||||
Bug: 41490008
|
|
||||||
Change-Id: I131b6a79f246e61e13a7d44dddbc1f9e625ed44a
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5314842
|
|
||||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
|
||||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1264027}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_data_cache.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_data_cache.cc
|
|
||||||
@@ -36,15 +36,6 @@
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
-namespace {
|
|
||||||
-
|
|
||||||
-// The maximum number of strong references to retain via the LRU.
|
|
||||||
-// This explicitly leaks fonts (and related objects) unless under extreme
|
|
||||||
-// memory pressure where it will be cleared. DO NOT increase unnecessarily.
|
|
||||||
-const wtf_size_t kMaxSize = 64;
|
|
||||||
-
|
|
||||||
-} // namespace
|
|
||||||
-
|
|
||||||
const SimpleFontData* FontDataCache::Get(const FontPlatformData* platform_data,
|
|
||||||
bool subpixel_ascent_descent) {
|
|
||||||
if (!platform_data)
|
|
||||||
@@ -64,16 +55,7 @@ const SimpleFontData* FontDataCache::Get
|
|
||||||
add_result.stored_value->value = MakeGarbageCollected<SimpleFontData>(
|
|
||||||
platform_data, nullptr, subpixel_ascent_descent);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- const SimpleFontData* result = add_result.stored_value->value;
|
|
||||||
-
|
|
||||||
- // Update our LRU to keep a strong reference to `result`.
|
|
||||||
- strong_reference_lru_.PrependOrMoveToFirst(result);
|
|
||||||
- while (strong_reference_lru_.size() > kMaxSize) {
|
|
||||||
- strong_reference_lru_.pop_back();
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return result;
|
|
||||||
+ return add_result.stored_value->value;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace blink
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_data_cache.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_data_cache.h
|
|
||||||
@@ -34,7 +34,6 @@
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/font_platform_data.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/simple_font_data.h"
|
|
||||||
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
|
|
||||||
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_linked_hash_set.h"
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
@@ -59,29 +58,17 @@ class FontDataCache final {
|
|
||||||
FontDataCache(const FontDataCache&) = delete;
|
|
||||||
FontDataCache& operator=(const FontDataCache&) = delete;
|
|
||||||
|
|
||||||
- void Trace(Visitor* visitor) const {
|
|
||||||
- visitor->Trace(cache_);
|
|
||||||
- visitor->Trace(strong_reference_lru_);
|
|
||||||
- }
|
|
||||||
+ void Trace(Visitor* visitor) const { visitor->Trace(cache_); }
|
|
||||||
|
|
||||||
const SimpleFontData* Get(const FontPlatformData*,
|
|
||||||
bool subpixel_ascent_descent = false);
|
|
||||||
- void Clear() {
|
|
||||||
- cache_.clear();
|
|
||||||
- strong_reference_lru_.clear();
|
|
||||||
- }
|
|
||||||
+ void Clear() { cache_.clear(); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
HeapHashMap<Member<const FontPlatformData>,
|
|
||||||
WeakMember<const SimpleFontData>,
|
|
||||||
FontDataCacheKeyHashTraits>
|
|
||||||
cache_;
|
|
||||||
-
|
|
||||||
- // The above `cache_` is weak, meaning its entries will potentially be
|
|
||||||
- // cleared if no other references exist.
|
|
||||||
- // This LRU keeps a small (limited) number of strong references alive so they
|
|
||||||
- // won't be cleared in the above cache for performance reasons.
|
|
||||||
- HeapLinkedHashSet<Member<const SimpleFontData>> strong_reference_lru_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace blink
|
|
@@ -1,425 +0,0 @@
|
|||||||
Revert the following commit:
|
|
||||||
|
|
||||||
|
|
||||||
commit cc6c0b2a9e1dbc96f3ebed713dc71960a29dc4f1
|
|
||||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Date: Tue Mar 5 20:27:13 2024 +0000
|
|
||||||
|
|
||||||
Reland "[gc] Make FontFamily immutable."
|
|
||||||
|
|
||||||
This reverts commit 748ed11510ec5bb09cc8b92f67f1f62964f023fa.
|
|
||||||
|
|
||||||
Reason for revert: Previous patch which caused MSAN issue was reapplied.
|
|
||||||
|
|
||||||
Original change's description:
|
|
||||||
> Revert "[gc] Make FontFamily immutable."
|
|
||||||
>
|
|
||||||
> This reverts commit ca3d3085d8b01fc74623d639c615fc57842cd26d.
|
|
||||||
>
|
|
||||||
> Reason for revert: crrev.com/c/5328767 is the reason for failure on some tests on MSAN. Please see crbug.com/327969288 for more details.
|
|
||||||
>
|
|
||||||
> Original change's description:
|
|
||||||
> > [gc] Make FontFamily immutable.
|
|
||||||
> >
|
|
||||||
> > Previously we'd build up font-family lists front to back, but would
|
|
||||||
> > need to mutate them to do so. Instead just build them backwards.
|
|
||||||
> >
|
|
||||||
> > This removes a bunch of problematic APIs (like AppendFamily - which
|
|
||||||
> > doesn't append), and simplifies the code.
|
|
||||||
> >
|
|
||||||
> > This will help avoid atomic write barriers once converted to oilpan.
|
|
||||||
> >
|
|
||||||
> > Bug: 41490008
|
|
||||||
> > Change-Id: Icfcec2d0a1716585cf42985616c02b42b6647943
|
|
||||||
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5322929
|
|
||||||
> > Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
> > Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
|
||||||
> > Cr-Commit-Position: refs/heads/main@{#1267168}
|
|
||||||
>
|
|
||||||
> Bug: 41490008, 327969288
|
|
||||||
> Change-Id: Ic69a5707d00cc98b97dcae3f4b8207b452ce5cbd
|
|
||||||
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5333950
|
|
||||||
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
||||||
> Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
|
|
||||||
> Owners-Override: Taiyo Mizuhashi <taiyo@chromium.org>
|
|
||||||
> Cr-Commit-Position: refs/heads/main@{#1267674}
|
|
||||||
|
|
||||||
Bug: 41490008, 327969288
|
|
||||||
Change-Id: If1d395e324b0be15488ef5410e9bcdb219bb19c6
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5344844
|
|
||||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1268654}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/css_font_face.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/css_font_face.cc
|
|
||||||
@@ -216,8 +216,9 @@ bool CSSFontFace::MaybeLoadFont(const Fo
|
|
||||||
|
|
||||||
void CSSFontFace::Load() {
|
|
||||||
FontDescription font_description;
|
|
||||||
- font_description.SetFamily(
|
|
||||||
- FontFamily(font_face_->family(), FontFamily::Type::kFamilyName));
|
|
||||||
+ FontFamily font_family;
|
|
||||||
+ font_family.SetFamily(font_face_->family(), FontFamily::Type::kFamilyName);
|
|
||||||
+ font_description.SetFamily(font_family);
|
|
||||||
Load(font_description);
|
|
||||||
}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/font_face_set_document.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/font_face_set_document.cc
|
|
||||||
@@ -195,10 +195,13 @@ bool FontFaceSetDocument::ResolveFontSty
|
|
||||||
ComputedStyleBuilder builder =
|
|
||||||
GetDocument()->GetStyleResolver().CreateComputedStyleBuilder();
|
|
||||||
|
|
||||||
- FontDescription default_font_description;
|
|
||||||
- default_font_description.SetFamily(FontFamily(
|
|
||||||
+ FontFamily font_family;
|
|
||||||
+ font_family.SetFamily(
|
|
||||||
FontFaceSet::DefaultFontFamily(),
|
|
||||||
- FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily())));
|
|
||||||
+ FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily()));
|
|
||||||
+
|
|
||||||
+ FontDescription default_font_description;
|
|
||||||
+ default_font_description.SetFamily(font_family);
|
|
||||||
default_font_description.SetSpecifiedSize(FontFaceSet::kDefaultFontSize);
|
|
||||||
default_font_description.SetComputedSize(FontFaceSet::kDefaultFontSize);
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/font_face_set_worker.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/font_face_set_worker.cc
|
|
||||||
@@ -84,10 +84,13 @@ bool FontFaceSetWorker::ResolveFontStyle
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
- FontDescription default_font_description;
|
|
||||||
- default_font_description.SetFamily(FontFamily(
|
|
||||||
+ FontFamily font_family;
|
|
||||||
+ font_family.SetFamily(
|
|
||||||
FontFaceSet::DefaultFontFamily(),
|
|
||||||
- FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily())));
|
|
||||||
+ FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily()));
|
|
||||||
+
|
|
||||||
+ FontDescription default_font_description;
|
|
||||||
+ default_font_description.SetFamily(font_family);
|
|
||||||
default_font_description.SetSpecifiedSize(FontFaceSet::kDefaultFontSize);
|
|
||||||
default_font_description.SetComputedSize(FontFaceSet::kDefaultFontSize);
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/resolver/font_builder.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/resolver/font_builder.cc
|
|
||||||
@@ -54,9 +54,11 @@ void FontBuilder::DidChangeWritingMode()
|
|
||||||
}
|
|
||||||
|
|
||||||
FontFamily FontBuilder::StandardFontFamily() const {
|
|
||||||
+ FontFamily family;
|
|
||||||
const AtomicString& standard_font_family = StandardFontFamilyName();
|
|
||||||
- return FontFamily(standard_font_family,
|
|
||||||
- FontFamily::InferredTypeFor(standard_font_family));
|
|
||||||
+ family.SetFamily(standard_font_family,
|
|
||||||
+ FontFamily::InferredTypeFor(standard_font_family));
|
|
||||||
+ return family;
|
|
||||||
}
|
|
||||||
|
|
||||||
AtomicString FontBuilder::StandardFontFamilyName() const {
|
|
||||||
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
|
|
||||||
@@ -379,8 +379,8 @@ FontDescription::FamilyDescription Style
|
|
||||||
|
|
||||||
if (const auto* system_font =
|
|
||||||
DynamicTo<cssvalue::CSSPendingSystemFontValue>(value)) {
|
|
||||||
- desc.family = FontFamily(system_font->ResolveFontFamily(),
|
|
||||||
- FontFamily::Type::kFamilyName);
|
|
||||||
+ desc.family.SetFamily(system_font->ResolveFontFamily(),
|
|
||||||
+ FontFamily::Type::kFamilyName);
|
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -410,8 +410,10 @@ FontDescription::FamilyDescription Style
|
|
||||||
// Take the previous value and wrap it in a `SharedFontFamily` adding to
|
|
||||||
// the linked list.
|
|
||||||
if (has_value) {
|
|
||||||
- next =
|
|
||||||
- SharedFontFamily::Create(family_name, family_type, std::move(next));
|
|
||||||
+ scoped_refptr<SharedFontFamily> shared = SharedFontFamily::Create();
|
|
||||||
+ shared->SetFamily(family_name, family_type);
|
|
||||||
+ shared->AppendFamily(next);
|
|
||||||
+ next = shared;
|
|
||||||
}
|
|
||||||
family_name = next_family_name;
|
|
||||||
family_type = is_generic ? FontFamily::Type::kGenericFamily
|
|
||||||
@@ -442,7 +444,8 @@ FontDescription::FamilyDescription Style
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- desc.family = FontFamily(family_name, family_type, std::move(next));
|
|
||||||
+ desc.family.SetFamily(family_name, family_type);
|
|
||||||
+ desc.family.AppendFamily(next);
|
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/html/canvas/canvas_font_cache.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/html/canvas/canvas_font_cache.cc
|
|
||||||
@@ -29,9 +29,11 @@ const int defaultFontSize = 10;
|
|
||||||
|
|
||||||
const ComputedStyle* CreateDefaultFontStyle(const Document& document) {
|
|
||||||
const AtomicString& default_font_family = font_family_names::kSansSerif;
|
|
||||||
+ FontFamily font_family;
|
|
||||||
+ font_family.SetFamily(default_font_family,
|
|
||||||
+ FontFamily::InferredTypeFor(default_font_family));
|
|
||||||
FontDescription default_font_description;
|
|
||||||
- default_font_description.SetFamily(FontFamily(
|
|
||||||
- default_font_family, FontFamily::InferredTypeFor(default_font_family)));
|
|
||||||
+ default_font_description.SetFamily(font_family);
|
|
||||||
default_font_description.SetSpecifiedSize(defaultFontSize);
|
|
||||||
default_font_description.SetComputedSize(defaultFontSize);
|
|
||||||
ComputedStyleBuilder builder =
|
|
||||||
--- a/third_party/blink/renderer/core/page/drag_image.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/page/drag_image.cc
|
|
||||||
@@ -127,9 +127,11 @@ static Font DeriveDragLabelFont(int size
|
|
||||||
const AtomicString& family =
|
|
||||||
LayoutThemeFontProvider::SystemFontFamily(CSSValueID::kNone);
|
|
||||||
|
|
||||||
+ FontFamily font_family;
|
|
||||||
+ font_family.SetFamily(family, FontFamily::InferredTypeFor(family));
|
|
||||||
+
|
|
||||||
FontDescription description;
|
|
||||||
- description.SetFamily(
|
|
||||||
- FontFamily(family, FontFamily::InferredTypeFor(family)));
|
|
||||||
+ description.SetFamily(font_family);
|
|
||||||
description.SetWeight(font_weight);
|
|
||||||
description.SetSpecifiedSize(size);
|
|
||||||
description.SetComputedSize(size);
|
|
||||||
--- a/third_party/blink/renderer/core/paint/embedded_object_painter.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/paint/embedded_object_painter.cc
|
|
||||||
@@ -32,9 +32,11 @@ static Font ReplacementTextFont(const Do
|
|
||||||
const float size = LayoutThemeFontProvider::SystemFontSize(
|
|
||||||
CSSValueID::kWebkitSmallControl, document);
|
|
||||||
|
|
||||||
+ FontFamily font_family;
|
|
||||||
+ font_family.SetFamily(family, FontFamily::InferredTypeFor(family));
|
|
||||||
+
|
|
||||||
FontDescription font_description;
|
|
||||||
- font_description.SetFamily(
|
|
||||||
- FontFamily(family, FontFamily::InferredTypeFor(family)));
|
|
||||||
+ font_description.SetFamily(font_family);
|
|
||||||
font_description.SetWeight(kBoldWeightValue);
|
|
||||||
font_description.SetSpecifiedSize(size);
|
|
||||||
font_description.SetComputedSize(size);
|
|
||||||
--- a/third_party/blink/renderer/platform/exported/web_font_description.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/exported/web_font_description.cc
|
|
||||||
@@ -49,10 +49,13 @@ WebFontDescription::WebFontDescription(c
|
|
||||||
}
|
|
||||||
|
|
||||||
WebFontDescription::operator FontDescription() const {
|
|
||||||
+ FontFamily font_family;
|
|
||||||
+ font_family.SetFamily(family, family_is_generic
|
|
||||||
+ ? FontFamily::Type::kGenericFamily
|
|
||||||
+ : FontFamily::Type::kFamilyName);
|
|
||||||
+
|
|
||||||
FontDescription desc;
|
|
||||||
- desc.SetFamily(FontFamily(family, family_is_generic
|
|
||||||
- ? FontFamily::Type::kGenericFamily
|
|
||||||
- : FontFamily::Type::kFamilyName));
|
|
||||||
+ desc.SetFamily(font_family);
|
|
||||||
desc.SetGenericFamily(
|
|
||||||
static_cast<FontDescription::GenericFamilyType>(generic_family));
|
|
||||||
desc.SetSpecifiedSize(size);
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_description.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_description.h
|
|
||||||
@@ -195,6 +195,7 @@ class PLATFORM_EXPORT FontDescription {
|
|
||||||
FamilyDescription GetFamilyDescription() const {
|
|
||||||
return FamilyDescription(GenericFamily(), Family());
|
|
||||||
}
|
|
||||||
+ FontFamily& FirstFamily() { return family_list_; }
|
|
||||||
const FontFamily& FirstFamily() const { return family_list_; }
|
|
||||||
Size GetSize() const {
|
|
||||||
return Size(KeywordSize(), SpecifiedSize(), IsAbsoluteSize());
|
|
||||||
@@ -450,6 +451,10 @@ class PLATFORM_EXPORT FontDescription {
|
|
||||||
return fields_.subpixel_ascent_descent_;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ void SetHashCategory(HashCategory category) {
|
|
||||||
+ fields_.hash_category_ = category;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
HashCategory GetHashCategory() const {
|
|
||||||
return static_cast<HashCategory>(fields_.hash_category_);
|
|
||||||
}
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_fallback_list.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_fallback_list.cc
|
|
||||||
@@ -178,8 +178,9 @@ const FontData* FontFallbackList::GetFon
|
|
||||||
|
|
||||||
if (font_selector_) {
|
|
||||||
// Try the user's preferred standard font.
|
|
||||||
- FontFamily font_family(font_family_names::kWebkitStandard,
|
|
||||||
- FontFamily::Type::kGenericFamily);
|
|
||||||
+ FontFamily font_family;
|
|
||||||
+ font_family.SetFamily(font_family_names::kWebkitStandard,
|
|
||||||
+ FontFamily::Type::kGenericFamily);
|
|
||||||
if (const FontData* data =
|
|
||||||
font_selector_->GetFontData(font_description, font_family)) {
|
|
||||||
return data;
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_family.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_family.cc
|
|
||||||
@@ -49,6 +49,20 @@ bool operator==(const FontFamily& a, con
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+wtf_size_t FontFamily::CountNames() const {
|
|
||||||
+ wtf_size_t count = 0;
|
|
||||||
+ for (const FontFamily* font_family = this; font_family;
|
|
||||||
+ font_family = font_family->Next())
|
|
||||||
+ ++count;
|
|
||||||
+ return count;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void FontFamily::AppendFamily(AtomicString family_name, Type family_type) {
|
|
||||||
+ scoped_refptr<SharedFontFamily> appended_family = SharedFontFamily::Create();
|
|
||||||
+ appended_family->SetFamily(family_name, family_type);
|
|
||||||
+ AppendFamily(appended_family);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
String FontFamily::ToString() const {
|
|
||||||
StringBuilder builder;
|
|
||||||
builder.Append(family_name_);
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_family.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_family.h
|
|
||||||
@@ -39,18 +39,16 @@ class PLATFORM_EXPORT FontFamily {
|
|
||||||
DISALLOW_NEW();
|
|
||||||
|
|
||||||
public:
|
|
||||||
- // https://drafts.csswg.org/css-fonts/#font-family-prop
|
|
||||||
- enum class Type : uint8_t { kFamilyName, kGenericFamily };
|
|
||||||
-
|
|
||||||
- FontFamily(const AtomicString& family_name,
|
|
||||||
- Type family_type,
|
|
||||||
- scoped_refptr<SharedFontFamily> next = nullptr)
|
|
||||||
- : family_name_(family_name),
|
|
||||||
- next_(std::move(next)),
|
|
||||||
- family_type_(family_type) {}
|
|
||||||
FontFamily() = default;
|
|
||||||
~FontFamily();
|
|
||||||
|
|
||||||
+ // https://drafts.csswg.org/css-fonts/#font-family-prop
|
|
||||||
+ enum class Type : uint8_t { kFamilyName, kGenericFamily };
|
|
||||||
+
|
|
||||||
+ void SetFamily(const AtomicString& family_name, Type family_type) {
|
|
||||||
+ family_name_ = family_name;
|
|
||||||
+ family_type_ = family_type;
|
|
||||||
+ }
|
|
||||||
// Return this font family's name. Note that it is never quoted nor escaped.
|
|
||||||
// For web-exposed serialization, please rely instead on the functions
|
|
||||||
// ComputedStyleUtils::ValueForFontFamily(const FontFamily&) and
|
|
||||||
@@ -59,8 +57,13 @@ class PLATFORM_EXPORT FontFamily {
|
|
||||||
const AtomicString& FamilyName() const { return family_name_; }
|
|
||||||
bool FamilyIsGeneric() const { return family_type_ == Type::kGenericFamily; }
|
|
||||||
|
|
||||||
+ // Returns number of linked `FontFamily` including `this`, so return value is
|
|
||||||
+ // greater than or equal to 1. When `Next()` is `nullptr`, return value is 1.
|
|
||||||
+ wtf_size_t CountNames() const;
|
|
||||||
const FontFamily* Next() const;
|
|
||||||
|
|
||||||
+ void AppendFamily(scoped_refptr<SharedFontFamily>);
|
|
||||||
+ void AppendFamily(AtomicString family_name, Type family_type);
|
|
||||||
scoped_refptr<SharedFontFamily> ReleaseNext();
|
|
||||||
|
|
||||||
bool IsPrewarmed() const { return is_prewarmed_; }
|
|
||||||
@@ -93,19 +96,12 @@ class PLATFORM_EXPORT SharedFontFamily :
|
|
||||||
SharedFontFamily(const SharedFontFamily&) = delete;
|
|
||||||
SharedFontFamily& operator=(const SharedFontFamily&) = delete;
|
|
||||||
|
|
||||||
- static scoped_refptr<SharedFontFamily> Create(
|
|
||||||
- const AtomicString& family_name,
|
|
||||||
- Type family_type,
|
|
||||||
- scoped_refptr<SharedFontFamily> next = nullptr) {
|
|
||||||
- return base::AdoptRef(
|
|
||||||
- new SharedFontFamily(family_name, family_type, std::move(next)));
|
|
||||||
+ static scoped_refptr<SharedFontFamily> Create() {
|
|
||||||
+ return base::AdoptRef(new SharedFontFamily);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
- SharedFontFamily(const AtomicString& family_name,
|
|
||||||
- Type family_type,
|
|
||||||
- scoped_refptr<SharedFontFamily> next)
|
|
||||||
- : FontFamily(family_name, family_type, std::move(next)) {}
|
|
||||||
+ SharedFontFamily() = default;
|
|
||||||
};
|
|
||||||
|
|
||||||
PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&);
|
|
||||||
@@ -125,6 +121,10 @@ inline const FontFamily* FontFamily::Nex
|
|
||||||
return next_.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
+inline void FontFamily::AppendFamily(scoped_refptr<SharedFontFamily> family) {
|
|
||||||
+ next_ = std::move(family);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
inline scoped_refptr<SharedFontFamily> FontFamily::ReleaseNext() {
|
|
||||||
return std::move(next_);
|
|
||||||
}
|
|
||||||
--- a/third_party/blink/renderer/platform/graphics/placeholder_image.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/graphics/placeholder_image.cc
|
|
||||||
@@ -85,18 +85,23 @@ void DrawCenteredIcon(cc::PaintCanvas* c
|
|
||||||
}
|
|
||||||
|
|
||||||
FontDescription CreatePlaceholderFontDescription(float scale_factor) {
|
|
||||||
- scoped_refptr<SharedFontFamily> arial = SharedFontFamily::Create(
|
|
||||||
- font_family_names::kArial, FontFamily::Type::kFamilyName);
|
|
||||||
- scoped_refptr<SharedFontFamily> helvetica = SharedFontFamily::Create(
|
|
||||||
- font_family_names::kHelvetica, FontFamily::Type::kFamilyName, arial);
|
|
||||||
- scoped_refptr<SharedFontFamily> helvetica_neue =
|
|
||||||
- SharedFontFamily::Create(font_family_names::kHelveticaNeue,
|
|
||||||
- FontFamily::Type::kFamilyName, helvetica);
|
|
||||||
- FontFamily roboto(font_family_names::kRoboto, FontFamily::Type::kFamilyName,
|
|
||||||
- helvetica_neue);
|
|
||||||
-
|
|
||||||
FontDescription description;
|
|
||||||
- description.SetFamily(roboto);
|
|
||||||
+ description.FirstFamily().SetFamily(font_family_names::kRoboto,
|
|
||||||
+ FontFamily::Type::kFamilyName);
|
|
||||||
+
|
|
||||||
+ scoped_refptr<SharedFontFamily> helvetica_neue = SharedFontFamily::Create();
|
|
||||||
+ helvetica_neue->SetFamily(font_family_names::kHelveticaNeue,
|
|
||||||
+ FontFamily::Type::kFamilyName);
|
|
||||||
+ scoped_refptr<SharedFontFamily> helvetica = SharedFontFamily::Create();
|
|
||||||
+ helvetica->SetFamily(font_family_names::kHelvetica,
|
|
||||||
+ FontFamily::Type::kFamilyName);
|
|
||||||
+ scoped_refptr<SharedFontFamily> arial = SharedFontFamily::Create();
|
|
||||||
+ arial->SetFamily(font_family_names::kArial, FontFamily::Type::kFamilyName);
|
|
||||||
+
|
|
||||||
+ helvetica->AppendFamily(std::move(arial));
|
|
||||||
+ helvetica_neue->AppendFamily(std::move(helvetica));
|
|
||||||
+ description.FirstFamily().AppendFamily(std::move(helvetica_neue));
|
|
||||||
+
|
|
||||||
description.SetGenericFamily(FontDescription::kSansSerifFamily);
|
|
||||||
description.SetComputedSize(scale_factor * kFontSize);
|
|
||||||
description.SetWeight(FontSelectionValue(500));
|
|
||||||
--- a/third_party/blink/renderer/platform/testing/font_test_helpers.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/testing/font_test_helpers.cc
|
|
||||||
@@ -127,9 +127,11 @@ Font CreateTestFont(const AtomicString&
|
|
||||||
size_t data_size,
|
|
||||||
float size,
|
|
||||||
const FontDescription::VariantLigatures* ligatures) {
|
|
||||||
+ FontFamily family;
|
|
||||||
+ family.SetFamily(family_name, FontFamily::Type::kFamilyName);
|
|
||||||
+
|
|
||||||
FontDescription font_description;
|
|
||||||
- font_description.SetFamily(
|
|
||||||
- FontFamily(family_name, FontFamily::Type::kFamilyName));
|
|
||||||
+ font_description.SetFamily(family);
|
|
||||||
font_description.SetSpecifiedSize(size);
|
|
||||||
font_description.SetComputedSize(size);
|
|
||||||
if (ligatures)
|
|
||||||
@@ -143,9 +145,11 @@ Font CreateTestFont(const AtomicString&
|
|
||||||
float size,
|
|
||||||
const FontDescription::VariantLigatures* ligatures,
|
|
||||||
void (*init_font_description)(FontDescription*)) {
|
|
||||||
+ FontFamily family;
|
|
||||||
+ family.SetFamily(family_name, FontFamily::Type::kFamilyName);
|
|
||||||
+
|
|
||||||
FontDescription font_description;
|
|
||||||
- font_description.SetFamily(
|
|
||||||
- FontFamily(family_name, FontFamily::Type::kFamilyName));
|
|
||||||
+ font_description.SetFamily(family);
|
|
||||||
font_description.SetSpecifiedSize(size);
|
|
||||||
font_description.SetComputedSize(size);
|
|
||||||
if (ligatures)
|
|
@@ -1,258 +0,0 @@
|
|||||||
This is a revert of the commit below. While it doesn't strictly fix any
|
|
||||||
bugs, it's needed to support bad-font-gc2.patch building.
|
|
||||||
|
|
||||||
commit 9a8fc2e22363c954af239c06798bf85a9c928295
|
|
||||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Date: Wed Feb 14 19:35:11 2024 +0000
|
|
||||||
|
|
||||||
[gc] Make FontCustomPlatformData gc'd.
|
|
||||||
|
|
||||||
There should be no user-visible behaviour change.
|
|
||||||
|
|
||||||
Bug: 41490008
|
|
||||||
Change-Id: I6364bf4c5b5dce9f99d8e2d7e1f84537c5493c33
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5293060
|
|
||||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1260637}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/binary_data_font_face_source.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/binary_data_font_face_source.cc
|
|
||||||
@@ -27,16 +27,13 @@ BinaryDataFontFaceSource::BinaryDataFont
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
probe::FontsUpdated(context, font_face, String(),
|
|
||||||
- custom_platform_data_.Get());
|
|
||||||
+ custom_platform_data_.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
-void BinaryDataFontFaceSource::Trace(Visitor* visitor) const {
|
|
||||||
- visitor->Trace(custom_platform_data_);
|
|
||||||
- CSSFontFaceSource::Trace(visitor);
|
|
||||||
-}
|
|
||||||
+BinaryDataFontFaceSource::~BinaryDataFontFaceSource() = default;
|
|
||||||
|
|
||||||
bool BinaryDataFontFaceSource::IsValid() const {
|
|
||||||
- return custom_platform_data_;
|
|
||||||
+ return custom_platform_data_.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
SimpleFontData* BinaryDataFontFaceSource::CreateFontData(
|
|
||||||
--- a/third_party/blink/renderer/core/css/binary_data_font_face_source.h
|
|
||||||
+++ b/third_party/blink/renderer/core/css/binary_data_font_face_source.h
|
|
||||||
@@ -16,14 +16,14 @@ class FontCustomPlatformData;
|
|
||||||
class BinaryDataFontFaceSource final : public CSSFontFaceSource {
|
|
||||||
public:
|
|
||||||
BinaryDataFontFaceSource(CSSFontFace*, SharedBuffer*, String&);
|
|
||||||
- void Trace(Visitor*) const override;
|
|
||||||
+ ~BinaryDataFontFaceSource() override;
|
|
||||||
bool IsValid() const override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
SimpleFontData* CreateFontData(const FontDescription&,
|
|
||||||
const FontSelectionCapabilities&) override;
|
|
||||||
|
|
||||||
- Member<const FontCustomPlatformData> custom_platform_data_;
|
|
||||||
+ scoped_refptr<FontCustomPlatformData> custom_platform_data_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace blink
|
|
||||||
--- a/third_party/blink/renderer/core/css/remote_font_face_source.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/css/remote_font_face_source.cc
|
|
||||||
@@ -262,7 +262,7 @@ void RemoteFontFaceSource::NotifyFinishe
|
|
||||||
FontInvalidationReason::kFontFaceLoaded);
|
|
||||||
if (custom_font_data_) {
|
|
||||||
probe::FontsUpdated(execution_context, face_->GetFontFace(),
|
|
||||||
- resource->Url().GetString(), custom_font_data_.Get());
|
|
||||||
+ resource->Url().GetString(), custom_font_data_.get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -456,7 +456,6 @@ void RemoteFontFaceSource::BeginLoadIfNe
|
|
||||||
void RemoteFontFaceSource::Trace(Visitor* visitor) const {
|
|
||||||
visitor->Trace(face_);
|
|
||||||
visitor->Trace(font_selector_);
|
|
||||||
- visitor->Trace(custom_font_data_);
|
|
||||||
CSSFontFaceSource::Trace(visitor);
|
|
||||||
FontResourceClient::Trace(visitor);
|
|
||||||
}
|
|
||||||
--- a/third_party/blink/renderer/core/css/remote_font_face_source.h
|
|
||||||
+++ b/third_party/blink/renderer/core/css/remote_font_face_source.h
|
|
||||||
@@ -43,7 +43,7 @@ class RemoteFontFaceSource final : publi
|
|
||||||
bool IsPendingDataUrl() const override;
|
|
||||||
|
|
||||||
const FontCustomPlatformData* GetCustomPlaftormData() const override {
|
|
||||||
- return custom_font_data_.Get();
|
|
||||||
+ return custom_font_data_.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BeginLoadIfNeeded() override;
|
|
||||||
@@ -157,7 +157,7 @@ class RemoteFontFaceSource final : publi
|
|
||||||
Member<FontSelector> font_selector_;
|
|
||||||
|
|
||||||
// |nullptr| if font is not loaded or failed to decode.
|
|
||||||
- Member<const FontCustomPlatformData> custom_font_data_;
|
|
||||||
+ scoped_refptr<FontCustomPlatformData> custom_font_data_;
|
|
||||||
// |nullptr| if font is not loaded or failed to decode.
|
|
||||||
String url_;
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/loader/resource/font_resource.cc
|
|
||||||
+++ b/third_party/blink/renderer/core/loader/resource/font_resource.cc
|
|
||||||
@@ -112,7 +112,7 @@ void FontResource::StartLoadLimitTimersI
|
|
||||||
kFontLoadWaitLong);
|
|
||||||
}
|
|
||||||
|
|
||||||
-const FontCustomPlatformData* FontResource::GetCustomFontData() {
|
|
||||||
+scoped_refptr<FontCustomPlatformData> FontResource::GetCustomFontData() {
|
|
||||||
if (!font_data_ && !ErrorOccurred() && !IsLoading()) {
|
|
||||||
if (Data()) {
|
|
||||||
auto decode_start_time = base::TimeTicks::Now();
|
|
||||||
@@ -225,7 +225,6 @@ void FontResource::AddClearDataObserver(
|
|
||||||
}
|
|
||||||
|
|
||||||
void FontResource::Trace(Visitor* visitor) const {
|
|
||||||
- visitor->Trace(font_data_);
|
|
||||||
visitor->Trace(clear_data_observers_);
|
|
||||||
Resource::Trace(visitor);
|
|
||||||
}
|
|
||||||
--- a/third_party/blink/renderer/core/loader/resource/font_resource.h
|
|
||||||
+++ b/third_party/blink/renderer/core/loader/resource/font_resource.h
|
|
||||||
@@ -72,7 +72,7 @@ class CORE_EXPORT FontResource final : p
|
|
||||||
|
|
||||||
String OtsParsingMessage() const { return ots_parsing_message_; }
|
|
||||||
|
|
||||||
- const FontCustomPlatformData* GetCustomFontData();
|
|
||||||
+ scoped_refptr<FontCustomPlatformData> GetCustomFontData();
|
|
||||||
|
|
||||||
// Returns true if the loading priority of the remote font resource can be
|
|
||||||
// lowered. The loading priority of the font can be lowered only if the
|
|
||||||
@@ -112,7 +112,7 @@ class CORE_EXPORT FontResource final : p
|
|
||||||
kMaxValue = kLongLimitExceeded,
|
|
||||||
};
|
|
||||||
|
|
||||||
- Member<FontCustomPlatformData> font_data_;
|
|
||||||
+ scoped_refptr<FontCustomPlatformData> font_data_;
|
|
||||||
String ots_parsing_message_;
|
|
||||||
LoadLimitState load_limit_state_;
|
|
||||||
bool cors_failed_;
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
|
|
||||||
@@ -115,7 +115,7 @@ const FontPlatformData* FontCustomPlatfo
|
|
||||||
const ResolvedFontFeatures& resolved_font_features,
|
|
||||||
FontOrientation orientation,
|
|
||||||
const FontVariationSettings* variation_settings,
|
|
||||||
- const FontPalette* palette) const {
|
|
||||||
+ const FontPalette* palette) {
|
|
||||||
DCHECK(base_typeface_);
|
|
||||||
|
|
||||||
sk_sp<SkTypeface> return_typeface = base_typeface_;
|
|
||||||
@@ -304,7 +304,7 @@ String FontCustomPlatformData::FamilyNam
|
|
||||||
localized_string.fString.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
-FontCustomPlatformData* FontCustomPlatformData::Create(
|
|
||||||
+scoped_refptr<FontCustomPlatformData> FontCustomPlatformData::Create(
|
|
||||||
SharedBuffer* buffer,
|
|
||||||
String& ots_parse_message) {
|
|
||||||
DCHECK(buffer);
|
|
||||||
@@ -321,8 +321,8 @@ FontCustomPlatformData* FontCustomPlatfo
|
|
||||||
if (v8::Isolate* isolate = v8::Isolate::TryGetCurrent()) {
|
|
||||||
isolate->AdjustAmountOfExternalAllocatedMemory(data_size);
|
|
||||||
}
|
|
||||||
- return MakeGarbageCollected<FontCustomPlatformData>(std::move(typeface),
|
|
||||||
- data_size);
|
|
||||||
+ return base::AdoptRef(
|
|
||||||
+ new FontCustomPlatformData(std::move(typeface), data_size));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FontCustomPlatformData::MayBeIconFont() const {
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.h
|
|
||||||
@@ -39,7 +39,6 @@
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/resolved_font_features.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/text_rendering_mode.h"
|
|
||||||
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
|
||||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/forward.h"
|
|
||||||
@@ -55,17 +54,16 @@ class FontPlatformData;
|
|
||||||
class FontVariationSettings;
|
|
||||||
|
|
||||||
class PLATFORM_EXPORT FontCustomPlatformData
|
|
||||||
- : public GarbageCollected<FontCustomPlatformData> {
|
|
||||||
+ : public RefCounted<FontCustomPlatformData> {
|
|
||||||
+ USING_FAST_MALLOC(FontCustomPlatformData);
|
|
||||||
+
|
|
||||||
public:
|
|
||||||
- static FontCustomPlatformData* Create(SharedBuffer*,
|
|
||||||
- String& ots_parse_message);
|
|
||||||
- FontCustomPlatformData(sk_sp<SkTypeface>, size_t data_size);
|
|
||||||
+ static scoped_refptr<FontCustomPlatformData> Create(SharedBuffer*,
|
|
||||||
+ String& ots_parse_message);
|
|
||||||
FontCustomPlatformData(const FontCustomPlatformData&) = delete;
|
|
||||||
FontCustomPlatformData& operator=(const FontCustomPlatformData&) = delete;
|
|
||||||
~FontCustomPlatformData();
|
|
||||||
|
|
||||||
- void Trace(Visitor*) const {}
|
|
||||||
-
|
|
||||||
// The size argument should come from EffectiveFontSize() and
|
|
||||||
// adjusted_specified_size should come from AdjustedSpecifiedSize() of
|
|
||||||
// FontDescription. The latter is needed for correctly applying
|
|
||||||
@@ -82,7 +80,7 @@ class PLATFORM_EXPORT FontCustomPlatform
|
|
||||||
const ResolvedFontFeatures& resolved_font_features,
|
|
||||||
FontOrientation = FontOrientation::kHorizontal,
|
|
||||||
const FontVariationSettings* = nullptr,
|
|
||||||
- const FontPalette* = nullptr) const;
|
|
||||||
+ const FontPalette* = nullptr);
|
|
||||||
|
|
||||||
String FamilyNameForInspector() const;
|
|
||||||
|
|
||||||
@@ -93,6 +91,7 @@ class PLATFORM_EXPORT FontCustomPlatform
|
|
||||||
bool MayBeIconFont() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
+ FontCustomPlatformData(sk_sp<SkTypeface>, size_t data_size);
|
|
||||||
sk_sp<SkTypeface> base_typeface_;
|
|
||||||
size_t data_size_;
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/platform/testing/font_test_helpers.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/testing/font_test_helpers.cc
|
|
||||||
@@ -29,7 +29,7 @@ class TestFontSelector : public FontSele
|
|
||||||
static TestFontSelector* Create(const uint8_t* data, size_t size) {
|
|
||||||
scoped_refptr<SharedBuffer> font_buffer = SharedBuffer::Create(data, size);
|
|
||||||
String ots_parse_message;
|
|
||||||
- FontCustomPlatformData* font_custom_platform_data =
|
|
||||||
+ scoped_refptr<FontCustomPlatformData> font_custom_platform_data =
|
|
||||||
FontCustomPlatformData::Create(font_buffer.get(), ots_parse_message);
|
|
||||||
if (!font_custom_platform_data)
|
|
||||||
return nullptr;
|
|
||||||
@@ -37,17 +37,12 @@ class TestFontSelector : public FontSele
|
|
||||||
std::move(font_custom_platform_data));
|
|
||||||
}
|
|
||||||
|
|
||||||
- TestFontSelector(FontCustomPlatformData* custom_platform_data)
|
|
||||||
- : custom_platform_data_(custom_platform_data) {
|
|
||||||
+ TestFontSelector(scoped_refptr<FontCustomPlatformData> custom_platform_data)
|
|
||||||
+ : custom_platform_data_(std::move(custom_platform_data)) {
|
|
||||||
DCHECK(custom_platform_data_);
|
|
||||||
}
|
|
||||||
~TestFontSelector() override = default;
|
|
||||||
|
|
||||||
- void Trace(Visitor* visitor) const override {
|
|
||||||
- visitor->Trace(custom_platform_data_);
|
|
||||||
- FontSelector::Trace(visitor);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
FontData* GetFontData(const FontDescription& font_description,
|
|
||||||
const FontFamily&) override {
|
|
||||||
FontSelectionCapabilities normal_capabilities(
|
|
||||||
@@ -117,7 +112,7 @@ class TestFontSelector : public FontSele
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
- Member<FontCustomPlatformData> custom_platform_data_;
|
|
||||||
+ scoped_refptr<FontCustomPlatformData> custom_platform_data_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace
|
|
@@ -1,434 +0,0 @@
|
|||||||
Revert the following commit:
|
|
||||||
|
|
||||||
commit 2eefeabb12fb7e92f2508116a5ed959c57659be1
|
|
||||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Date: Tue Feb 20 17:40:39 2024 +0000
|
|
||||||
|
|
||||||
[gc] Make HarfBuzzFontData & friends gc'd.
|
|
||||||
|
|
||||||
Previously we had a HbFontCacheEntry which was used to hold onto the
|
|
||||||
HarfBuzzFontData, and a hb_font_t.
|
|
||||||
|
|
||||||
HarfBuzzFontData is used for holding data specific for various
|
|
||||||
harfbuzz callbacks, but we can also hold onto the hb_font_t there.
|
|
||||||
|
|
||||||
There should be no user-visible behaviour change.
|
|
||||||
|
|
||||||
Bug: 41490008
|
|
||||||
Change-Id: Icaa7ad3b2f75e9807b88014a9a15406cb76eb52e
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302175
|
|
||||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
|
||||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1262752}
|
|
||||||
|
|
||||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/font_global_context.cc
|
|
||||||
===================================================================
|
|
||||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/font_global_context.cc
|
|
||||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/font_global_context.cc
|
|
||||||
@@ -8,6 +8,7 @@
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h"
|
|
||||||
+#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
|
|
||||||
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/thread_specific.h"
|
|
||||||
|
|
||||||
@@ -50,6 +51,15 @@ FontUniqueNameLookup* FontGlobalContext:
|
|
||||||
return Get().font_unique_name_lookup_.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
+HarfBuzzFontCache& FontGlobalContext::GetHarfBuzzFontCache() {
|
|
||||||
+ std::unique_ptr<HarfBuzzFontCache>& global_context_harfbuzz_font_cache =
|
|
||||||
+ Get().harfbuzz_font_cache_;
|
|
||||||
+ if (!global_context_harfbuzz_font_cache) {
|
|
||||||
+ global_context_harfbuzz_font_cache = std::make_unique<HarfBuzzFontCache>();
|
|
||||||
+ }
|
|
||||||
+ return *global_context_harfbuzz_font_cache;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
IdentifiableToken FontGlobalContext::GetOrComputeTypefaceDigest(
|
|
||||||
const FontPlatformData& source) {
|
|
||||||
SkTypeface* typeface = source.Typeface();
|
|
||||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/font_global_context.h
|
|
||||||
===================================================================
|
|
||||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/font_global_context.h
|
|
||||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/font_global_context.h
|
|
||||||
@@ -9,7 +9,6 @@
|
|
||||||
#include "base/types/pass_key.h"
|
|
||||||
#include "third_party/blink/public/common/privacy_budget/identifiable_token.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
|
|
||||||
-#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
|
|
||||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
|
||||||
#include "third_party/blink/renderer/platform/text/layout_locale.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
|
||||||
@@ -34,19 +33,14 @@ class PLATFORM_EXPORT FontGlobalContext
|
|
||||||
static FontGlobalContext& Get();
|
|
||||||
static FontGlobalContext* TryGet();
|
|
||||||
|
|
||||||
- void Trace(Visitor* visitor) const {
|
|
||||||
- visitor->Trace(font_cache_);
|
|
||||||
- visitor->Trace(harfbuzz_font_cache_);
|
|
||||||
- }
|
|
||||||
+ void Trace(Visitor* visitor) const { visitor->Trace(font_cache_); }
|
|
||||||
|
|
||||||
FontGlobalContext(const FontGlobalContext&) = delete;
|
|
||||||
FontGlobalContext& operator=(const FontGlobalContext&) = delete;
|
|
||||||
|
|
||||||
static inline FontCache& GetFontCache() { return Get().font_cache_; }
|
|
||||||
|
|
||||||
- static HarfBuzzFontCache& GetHarfBuzzFontCache() {
|
|
||||||
- return Get().harfbuzz_font_cache_;
|
|
||||||
- }
|
|
||||||
+ static HarfBuzzFontCache& GetHarfBuzzFontCache();
|
|
||||||
|
|
||||||
static FontUniqueNameLookup* GetFontUniqueNameLookup();
|
|
||||||
|
|
||||||
@@ -62,7 +56,7 @@ class PLATFORM_EXPORT FontGlobalContext
|
|
||||||
|
|
||||||
private:
|
|
||||||
FontCache font_cache_;
|
|
||||||
- HarfBuzzFontCache harfbuzz_font_cache_;
|
|
||||||
+ std::unique_ptr<HarfBuzzFontCache> harfbuzz_font_cache_;
|
|
||||||
std::unique_ptr<FontUniqueNameLookup> font_unique_name_lookup_;
|
|
||||||
base::HashingLRUCache<SkTypefaceID, IdentifiableToken> typeface_digest_cache_;
|
|
||||||
base::HashingLRUCache<SkTypefaceID, IdentifiableToken>
|
|
||||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
===================================================================
|
|
||||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
@@ -67,14 +67,20 @@ namespace blink {
|
|
||||||
|
|
||||||
HarfBuzzFace::HarfBuzzFace(const FontPlatformData* platform_data,
|
|
||||||
uint64_t unique_id)
|
|
||||||
- : platform_data_(platform_data),
|
|
||||||
- harfbuzz_font_data_(FontGlobalContext::GetHarfBuzzFontCache().GetOrCreate(
|
|
||||||
- unique_id,
|
|
||||||
- platform_data)) {}
|
|
||||||
+ : platform_data_(platform_data), unique_id_(unique_id) {
|
|
||||||
+ HbFontCacheEntry* const cache_entry =
|
|
||||||
+ FontGlobalContext::GetHarfBuzzFontCache().RefOrNew(unique_id_,
|
|
||||||
+ platform_data);
|
|
||||||
+ unscaled_font_ = cache_entry->HbFont();
|
|
||||||
+ harfbuzz_font_data_ = cache_entry->HbFontData();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+HarfBuzzFace::~HarfBuzzFace() {
|
|
||||||
+ FontGlobalContext::GetHarfBuzzFontCache().Remove(unique_id_);
|
|
||||||
+}
|
|
||||||
|
|
||||||
void HarfBuzzFace::Trace(Visitor* visitor) const {
|
|
||||||
visitor->Trace(platform_data_);
|
|
||||||
- visitor->Trace(harfbuzz_font_data_);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool& GetIgnoreVariationSelectors() {
|
|
||||||
@@ -287,17 +293,14 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
|
|
||||||
|
|
||||||
hb::unique_ptr<hb_set_t> glyphs(hb_set_create());
|
|
||||||
|
|
||||||
- hb_font_t* unscaled_font = harfbuzz_font_data_->unscaled_font_.get();
|
|
||||||
-
|
|
||||||
// Check whether computing is needed and compute for gpos/gsub.
|
|
||||||
if (features & kKerning &&
|
|
||||||
harfbuzz_font_data_->space_in_gpos_ ==
|
|
||||||
HarfBuzzFontData::SpaceGlyphInOpenTypeTables::kUnknown) {
|
|
||||||
- if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font, space)) {
|
|
||||||
+ if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font_, space))
|
|
||||||
return false;
|
|
||||||
- }
|
|
||||||
// Compute for gpos.
|
|
||||||
- hb_face_t* face = hb_font_get_face(unscaled_font);
|
|
||||||
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
|
|
||||||
DCHECK(face);
|
|
||||||
harfbuzz_font_data_->space_in_gpos_ =
|
|
||||||
hb_ot_layout_has_positioning(face) &&
|
|
||||||
@@ -311,11 +314,10 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
|
|
||||||
if (features & kLigatures &&
|
|
||||||
harfbuzz_font_data_->space_in_gsub_ ==
|
|
||||||
HarfBuzzFontData::SpaceGlyphInOpenTypeTables::kUnknown) {
|
|
||||||
- if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font, space)) {
|
|
||||||
+ if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font_, space))
|
|
||||||
return false;
|
|
||||||
- }
|
|
||||||
// Compute for gpos.
|
|
||||||
- hb_face_t* face = hb_font_get_face(unscaled_font);
|
|
||||||
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
|
|
||||||
DCHECK(face);
|
|
||||||
harfbuzz_font_data_->space_in_gsub_ =
|
|
||||||
hb_ot_layout_has_substitution(face) &&
|
|
||||||
@@ -333,14 +335,14 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned HarfBuzzFace::UnitsPerEmFromHeadTable() {
|
|
||||||
- hb_face_t* face = hb_font_get_face(harfbuzz_font_data_->unscaled_font_.get());
|
|
||||||
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
|
|
||||||
return hb_face_get_upem(face);
|
|
||||||
}
|
|
||||||
|
|
||||||
Glyph HarfBuzzFace::HbGlyphForCharacter(UChar32 character) {
|
|
||||||
hb_codepoint_t glyph = 0;
|
|
||||||
- HarfBuzzGetNominalGlyph(harfbuzz_font_data_->unscaled_font_.get(),
|
|
||||||
- harfbuzz_font_data_, character, &glyph, nullptr);
|
|
||||||
+ HarfBuzzGetNominalGlyph(unscaled_font_, harfbuzz_font_data_, character,
|
|
||||||
+ &glyph, nullptr);
|
|
||||||
return glyph;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -349,7 +351,7 @@ hb_codepoint_t HarfBuzzFace::HarfBuzzGet
|
|
||||||
UChar32 variation_selector) {
|
|
||||||
DCHECK(RuntimeEnabledFeatures::FontVariationSequencesEnabled());
|
|
||||||
hb_codepoint_t glyph = 0;
|
|
||||||
- HarfBuzzGetGlyph(harfbuzz_font_data_->unscaled_font_.get(),
|
|
||||||
+ HarfBuzzGetGlyph(unscaled_font_,
|
|
||||||
harfbuzz_font_data_, character, variation_selector, &glyph,
|
|
||||||
nullptr);
|
|
||||||
return glyph;
|
|
||||||
@@ -511,10 +513,9 @@ static hb::unique_ptr<hb_face_t> CreateF
|
|
||||||
return face;
|
|
||||||
}
|
|
||||||
|
|
||||||
-namespace {
|
|
||||||
-
|
|
||||||
-HarfBuzzFontData* CreateHarfBuzzFontData(hb_face_t* face,
|
|
||||||
- SkTypeface* typeface) {
|
|
||||||
+static scoped_refptr<HbFontCacheEntry> CreateHbFontCacheEntry(
|
|
||||||
+ hb_face_t* face,
|
|
||||||
+ SkTypeface* typeface) {
|
|
||||||
hb::unique_ptr<hb_font_t> ot_font(hb_font_create(face));
|
|
||||||
hb_ot_font_set_funcs(ot_font.get());
|
|
||||||
|
|
||||||
@@ -533,26 +534,25 @@ HarfBuzzFontData* CreateHarfBuzzFontData
|
|
||||||
// Creating a sub font means that non-available functions
|
|
||||||
// are found from the parent.
|
|
||||||
hb_font_t* const unscaled_font = hb_font_create_sub_font(ot_font.get());
|
|
||||||
- HarfBuzzFontData* data =
|
|
||||||
- MakeGarbageCollected<HarfBuzzFontData>(unscaled_font);
|
|
||||||
+ scoped_refptr<HbFontCacheEntry> cache_entry =
|
|
||||||
+ HbFontCacheEntry::Create(unscaled_font);
|
|
||||||
hb_font_set_funcs(unscaled_font,
|
|
||||||
- HarfBuzzSkiaFontFuncs::Get().GetFunctions(typeface), data,
|
|
||||||
- nullptr);
|
|
||||||
- return data;
|
|
||||||
+ HarfBuzzSkiaFontFuncs::Get().GetFunctions(typeface),
|
|
||||||
+ cache_entry->HbFontData(), nullptr);
|
|
||||||
+ return cache_entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
-} // namespace
|
|
||||||
-
|
|
||||||
-HarfBuzzFontData* HarfBuzzFontCache::GetOrCreate(
|
|
||||||
+HbFontCacheEntry* HarfBuzzFontCache::RefOrNew(
|
|
||||||
uint64_t unique_id,
|
|
||||||
const FontPlatformData* platform_data) {
|
|
||||||
const auto& result = font_map_.insert(unique_id, nullptr);
|
|
||||||
if (result.is_new_entry) {
|
|
||||||
hb::unique_ptr<hb_face_t> face = CreateFace(platform_data);
|
|
||||||
result.stored_value->value =
|
|
||||||
- CreateHarfBuzzFontData(face.get(), platform_data->Typeface());
|
|
||||||
+ CreateHbFontCacheEntry(face.get(), platform_data->Typeface());
|
|
||||||
}
|
|
||||||
- return result.stored_value->value.Get();
|
|
||||||
+ result.stored_value->value->AddRef();
|
|
||||||
+ return result.stored_value->value.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
static_assert(
|
|
||||||
@@ -583,18 +583,17 @@ hb_font_t* HarfBuzzFace::GetScaledFont(s
|
|
||||||
vertical_layout);
|
|
||||||
|
|
||||||
int scale = SkiaScalarToHarfBuzzPosition(platform_data_->size());
|
|
||||||
- hb_font_t* unscaled_font = harfbuzz_font_data_->unscaled_font_.get();
|
|
||||||
- hb_font_set_scale(unscaled_font, scale, scale);
|
|
||||||
+ hb_font_set_scale(unscaled_font_, scale, scale);
|
|
||||||
// See contended discussion in https://github.com/harfbuzz/harfbuzz/pull/1484
|
|
||||||
// Setting ptem here is critical for HarfBuzz to know where to lookup spacing
|
|
||||||
// offset in the AAT trak table, the unit pt in ptem here means "CoreText"
|
|
||||||
// points. After discussion on the pull request and with Apple developers, the
|
|
||||||
// meaning of HarfBuzz' hb_font_set_ptem API was changed to expect the
|
|
||||||
// equivalent of CSS pixels here.
|
|
||||||
- hb_font_set_ptem(unscaled_font, specified_size > 0 ? specified_size
|
|
||||||
- : platform_data_->size());
|
|
||||||
+ hb_font_set_ptem(unscaled_font_, specified_size > 0 ? specified_size
|
|
||||||
+ : platform_data_->size());
|
|
||||||
|
|
||||||
- return unscaled_font;
|
|
||||||
+ return unscaled_font_;
|
|
||||||
}
|
|
||||||
|
|
||||||
hb_font_t* HarfBuzzFace::GetScaledFont() const {
|
|
||||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
|
||||||
===================================================================
|
|
||||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
|
||||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
|
||||||
@@ -58,6 +58,7 @@ class PLATFORM_EXPORT HarfBuzzFace final
|
|
||||||
HarfBuzzFace(const FontPlatformData* platform_data, uint64_t);
|
|
||||||
HarfBuzzFace(const HarfBuzzFace&) = delete;
|
|
||||||
HarfBuzzFace& operator=(const HarfBuzzFace&) = delete;
|
|
||||||
+ ~HarfBuzzFace();
|
|
||||||
|
|
||||||
void Trace(Visitor*) const;
|
|
||||||
|
|
||||||
@@ -100,7 +101,11 @@ class PLATFORM_EXPORT HarfBuzzFace final
|
|
||||||
void PrepareHarfBuzzFontData();
|
|
||||||
|
|
||||||
Member<const FontPlatformData> platform_data_;
|
|
||||||
- Member<HarfBuzzFontData> harfbuzz_font_data_;
|
|
||||||
+ const uint64_t unique_id_;
|
|
||||||
+ // TODO(crbug.com/1489080): When briefly given MiraclePtr protection,
|
|
||||||
+ // these members were both found dangling.
|
|
||||||
+ hb_font_t* unscaled_font_;
|
|
||||||
+ HarfBuzzFontData* harfbuzz_font_data_;
|
|
||||||
};
|
|
||||||
|
|
||||||
inline constexpr hb_codepoint_t kUnmatchedVSGlyphId =
|
|
||||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
|
||||||
===================================================================
|
|
||||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
|
||||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
|
||||||
@@ -8,8 +8,38 @@
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
-void HarfBuzzFontCache::Trace(Visitor* visitor) const {
|
|
||||||
- visitor->Trace(font_map_);
|
|
||||||
+HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font)
|
|
||||||
+ : hb_font_(hb::unique_ptr<hb_font_t>(font)),
|
|
||||||
+ hb_font_data_(std::make_unique<HarfBuzzFontData>()) {}
|
|
||||||
+
|
|
||||||
+HbFontCacheEntry::~HbFontCacheEntry() = default;
|
|
||||||
+
|
|
||||||
+scoped_refptr<HbFontCacheEntry> HbFontCacheEntry::Create(hb_font_t* hb_font) {
|
|
||||||
+ DCHECK(hb_font);
|
|
||||||
+ return base::AdoptRef(new HbFontCacheEntry(hb_font));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+HarfBuzzFontCache::HarfBuzzFontCache() = default;
|
|
||||||
+HarfBuzzFontCache::~HarfBuzzFontCache() = default;
|
|
||||||
+
|
|
||||||
+// See "harfbuzz_face.cc" for |HarfBuzzFontCache::GetOrCreateFontData()|
|
|
||||||
+// implementation.
|
|
||||||
+
|
|
||||||
+void HarfBuzzFontCache::Remove(uint64_t unique_id) {
|
|
||||||
+ auto it = font_map_.find(unique_id);
|
|
||||||
+ // TODO(https://crbug.com/1417160): In tests such as FontObjectThreadedTest
|
|
||||||
+ // that test taking down FontGlobalContext an object may not be found due to
|
|
||||||
+ // existing issues with refcounting of font objects at thread destruction
|
|
||||||
+ // time.
|
|
||||||
+ if (it == font_map_.end()) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ DCHECK(!it.Get()->value->HasOneRef());
|
|
||||||
+ it.Get()->value->Release();
|
|
||||||
+ if (!it.Get()->value->HasOneRef()) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ font_map_.erase(it);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace blink
|
|
||||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
|
||||||
===================================================================
|
|
||||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
|
||||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
|
||||||
@@ -6,9 +6,12 @@
|
|
||||||
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_CACHE_H_
|
|
||||||
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/font_metrics.h"
|
|
||||||
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
|
|
||||||
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
|
||||||
-#include "third_party/blink/renderer/platform/heap/member.h"
|
|
||||||
+#include "third_party/blink/renderer/platform/fonts/unicode_range_set.h"
|
|
||||||
+
|
|
||||||
+#include <hb.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
+
|
|
||||||
+#include <memory>
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
@@ -22,21 +25,39 @@ struct HarfBuzzFontData;
|
|
||||||
// FIXME, crbug.com/609099: We should fix the FontCache to only keep one
|
|
||||||
// FontPlatformData object independent of size, then consider using this here.
|
|
||||||
|
|
||||||
-class HarfBuzzFontCache final {
|
|
||||||
- DISALLOW_NEW();
|
|
||||||
+class HbFontCacheEntry : public RefCounted<HbFontCacheEntry> {
|
|
||||||
+ USING_FAST_MALLOC(HbFontCacheEntry);
|
|
||||||
+
|
|
||||||
+ public:
|
|
||||||
+ static scoped_refptr<HbFontCacheEntry> Create(hb_font_t* hb_font);
|
|
||||||
+
|
|
||||||
+ hb_font_t* HbFont() { return hb_font_.get(); }
|
|
||||||
+ HarfBuzzFontData* HbFontData() { return hb_font_data_.get(); }
|
|
||||||
+
|
|
||||||
+ ~HbFontCacheEntry();
|
|
||||||
|
|
||||||
+ private:
|
|
||||||
+ explicit HbFontCacheEntry(hb_font_t* font);
|
|
||||||
+
|
|
||||||
+ hb::unique_ptr<hb_font_t> hb_font_;
|
|
||||||
+ std::unique_ptr<HarfBuzzFontData> hb_font_data_;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+class HarfBuzzFontCache final {
|
|
||||||
public:
|
|
||||||
- void Trace(Visitor* visitor) const;
|
|
||||||
- // See "harfbuzz_face.cc" for |HarfBuzzFontCache::GetOrCreateFontData()|
|
|
||||||
- // implementation.
|
|
||||||
- HarfBuzzFontData* GetOrCreate(uint64_t unique_id,
|
|
||||||
- const FontPlatformData* platform_data);
|
|
||||||
+ HarfBuzzFontCache();
|
|
||||||
+ ~HarfBuzzFontCache();
|
|
||||||
+
|
|
||||||
+ HbFontCacheEntry* RefOrNew(uint64_t unique_id,
|
|
||||||
+ const FontPlatformData* platform_data);
|
|
||||||
+ void Remove(uint64_t unique_id);
|
|
||||||
|
|
||||||
private:
|
|
||||||
- HeapHashMap<uint64_t,
|
|
||||||
- WeakMember<HarfBuzzFontData>,
|
|
||||||
- IntWithZeroKeyHashTraits<uint64_t>>
|
|
||||||
- font_map_;
|
|
||||||
+ using HbFontDataMap = HashMap<uint64_t,
|
|
||||||
+ scoped_refptr<HbFontCacheEntry>,
|
|
||||||
+ IntWithZeroKeyHashTraits<uint64_t>>;
|
|
||||||
+
|
|
||||||
+ HbFontDataMap font_map_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace blink
|
|
||||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
===================================================================
|
|
||||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
@@ -22,18 +22,15 @@ const unsigned kInvalidFallbackMetricsVa
|
|
||||||
// The HarfBuzzFontData struct carries user-pointer data for
|
|
||||||
// |hb_font_t| callback functions/operations. It contains metrics and OpenType
|
|
||||||
// layout information related to a font scaled to a particular size.
|
|
||||||
-struct HarfBuzzFontData final : public GarbageCollected<HarfBuzzFontData> {
|
|
||||||
+struct HarfBuzzFontData final {
|
|
||||||
+ USING_FAST_MALLOC(HarfBuzzFontData);
|
|
||||||
+
|
|
||||||
public:
|
|
||||||
- explicit HarfBuzzFontData(hb_font_t* unscaled_font)
|
|
||||||
- : unscaled_font_(hb::unique_ptr<hb_font_t>(unscaled_font)),
|
|
||||||
- vertical_data_(nullptr),
|
|
||||||
- range_set_(nullptr) {}
|
|
||||||
+ HarfBuzzFontData() : vertical_data_(nullptr), range_set_(nullptr) {}
|
|
||||||
|
|
||||||
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
|
|
||||||
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
|
|
||||||
|
|
||||||
- void Trace(Visitor*) const {}
|
|
||||||
-
|
|
||||||
// The vertical origin and vertical advance functions in HarfBuzzFace require
|
|
||||||
// the ascent and height metrics as fallback in case no specific vertical
|
|
||||||
// layout information is found from the font.
|
|
||||||
@@ -81,7 +78,6 @@ struct HarfBuzzFontData final : public G
|
|
||||||
return vertical_data_;
|
|
||||||
}
|
|
||||||
|
|
||||||
- const hb::unique_ptr<hb_font_t> unscaled_font_;
|
|
||||||
SkFont font_;
|
|
||||||
|
|
||||||
// Capture these scaled fallback metrics from FontPlatformData so that a
|
|
3725
bad-font-gc2.patch
3725
bad-font-gc2.patch
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
|||||||
Revert the following commit (to support bad-font-gc2.patch):
|
|
||||||
|
|
||||||
commit d4806d20fda56e9bac259fddf10b7439ce749add
|
|
||||||
Author: Hao Liu <haoliuk@chromium.org>
|
|
||||||
Date: Mon Mar 18 22:56:31 2024 +0000
|
|
||||||
|
|
||||||
Cleanup leftover non-used custom_font_data methods
|
|
||||||
|
|
||||||
This is to clean up non-used custom_font_data methods. Their usage has
|
|
||||||
been deleted in a previous CL.
|
|
||||||
https://chromium-review.googlesource.com/c/chromium/src/+/5262982/29/third_party/blink/renderer/core/css/css_font_face_source.cc#b95
|
|
||||||
|
|
||||||
Change-Id: I90c3ae794a6caf71526c81a56795e95c23cc3fb5
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368244
|
|
||||||
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1274525}
|
|
||||||
|
|
||||||
--- a/third_party/blink/renderer/core/css/css_custom_font_data.h
|
|
||||||
+++ b/third_party/blink/renderer/core/css/css_custom_font_data.h
|
|
||||||
@@ -55,6 +55,7 @@ class CSSCustomFontData final : public C
|
|
||||||
|
|
||||||
bool IsLoading() const override { return is_loading_; }
|
|
||||||
bool IsLoadingFallback() const override { return true; }
|
|
||||||
+ void ClearFontFaceSource() override { font_face_source_ = nullptr; }
|
|
||||||
|
|
||||||
bool IsPendingDataUrl() const override {
|
|
||||||
return font_face_source_ && font_face_source_->IsPendingDataUrl();
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/custom_font_data.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/custom_font_data.h
|
|
||||||
@@ -46,6 +46,7 @@ class PLATFORM_EXPORT CustomFontData : p
|
|
||||||
virtual bool IsLoading() const { return false; }
|
|
||||||
virtual bool IsLoadingFallback() const { return false; }
|
|
||||||
virtual bool ShouldSkipDrawing() const { return false; }
|
|
||||||
+ virtual void ClearFontFaceSource() {}
|
|
||||||
virtual bool IsPendingDataUrl() const { return false; }
|
|
||||||
|
|
||||||
protected:
|
|
@@ -9,8 +9,8 @@
|
|||||||
#include "base/time/time_override.h"
|
#include "base/time/time_override.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
|
|
||||||
--- a/base/BUILD.gn 2022-06-30 13:13:20.315537859 +0200
|
--- src/base/BUILD.gn.orig 2024-12-08 18:43:52.881356091 +0100
|
||||||
+++ b/base/BUILD.gn 2022-06-30 13:25:39.947410797 +0200
|
+++ src/base/BUILD.gn 2024-12-18 13:19:11.049201868 +0100
|
||||||
@@ -1,3 +1,8 @@
|
@@ -1,3 +1,8 @@
|
||||||
+import("//build/config/linux/pkg_config.gni")
|
+import("//build/config/linux/pkg_config.gni")
|
||||||
+
|
+
|
||||||
@@ -20,16 +20,16 @@
|
|||||||
# Copyright 2013 The Chromium Authors
|
# Copyright 2013 The Chromium Authors
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
@@ -826,8 +831,6 @@
|
@@ -809,8 +814,6 @@ component("base") {
|
||||||
"third_party/cityhash_v103/src/city_v103.cc",
|
"task/updateable_sequenced_task_runner.h",
|
||||||
"third_party/cityhash_v103/src/city_v103.h",
|
"test/scoped_logging_settings.h",
|
||||||
"third_party/icu/icu_utf.h",
|
"test/spin_wait.h",
|
||||||
- "third_party/nspr/prtime.cc",
|
- "third_party/nspr/prtime.cc",
|
||||||
- "third_party/nspr/prtime.h",
|
- "third_party/nspr/prtime.h",
|
||||||
"third_party/superfasthash/superfasthash.c",
|
|
||||||
"thread_annotations.h",
|
"thread_annotations.h",
|
||||||
"threading/hang_watcher.cc",
|
"threading/hang_watcher.cc",
|
||||||
@@ -1414,6 +1417,7 @@
|
"threading/hang_watcher.h",
|
||||||
|
@@ -1028,6 +1031,7 @@ component("base") {
|
||||||
"//build/config/compiler:wexit_time_destructors",
|
"//build/config/compiler:wexit_time_destructors",
|
||||||
"//build/config/compiler:wglobal_constructors",
|
"//build/config/compiler:wglobal_constructors",
|
||||||
"//electron/build/config:mas_build",
|
"//electron/build/config:mas_build",
|
||||||
|
422
bsc1224178-font-gc.patch
Normal file
422
bsc1224178-font-gc.patch
Normal file
@@ -0,0 +1,422 @@
|
|||||||
|
Example stack trace for this crash:
|
||||||
|
#0 0x000055f451cdf761 in partition_alloc::PartitionRoot::FreeNoHooksImmediate(void*, partition_alloc::internal::SlotSpanMetadata<(partition_alloc::internal::MetadataKind)1>*, unsigned long)::{lambda()#1}::operator()() const (__closure=<optimized out>,
|
||||||
|
__closure=<optimized out>) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1531
|
||||||
|
#1 partition_alloc::PartitionRoot::FreeNoHooksImmediate (this=<optimized out>, object=<optimized out>, slot_span=<optimized out>, slot_start=<optimized out>, this=<optimized out>, object=<optimized out>, slot_span=<optimized out>, slot_start=<optimized out>)
|
||||||
|
at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1531
|
||||||
|
#2 partition_alloc::PartitionRoot::FreeInline<(partition_alloc::internal::FreeFlags)2> (this=<optimized out>, object=<optimized out>, this=<optimized out>, object=<optimized out>) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1513
|
||||||
|
#3 partition_alloc::PartitionRoot::FreeInlineInUnknownRoot<(partition_alloc::internal::FreeFlags)2> (object=0x316400f16770) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1432
|
||||||
|
#4 allocator_shim::internal::PartitionFreeInternal<(partition_alloc::internal::FreeFlags)2> (object=0x316400f16770, context=0x0) at ../../base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc:407
|
||||||
|
#5 allocator_shim::internal::PartitionFree (object=0x316400f16770, context=0x0) at ../../base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc:411
|
||||||
|
#6 0x000055f44ef26567 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign (this=0x316401a361c8, __str="/usr/share/fonts/truetype/NimbusSans-Regular.otf") at /usr/include/c++/14/bits/basic_string.tcc:289
|
||||||
|
#7 0x000055f4563f3d34 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign (this=<optimized out>, __str=...) at /usr/include/c++/14/bits/basic_string.h:1619
|
||||||
|
#8 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator= (this=<optimized out>, __str=...) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:141021183
|
||||||
|
#9 blink::FontFaceCreationParams::operator= () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:141021183
|
||||||
|
#10 blink::FontCacheKey::operator=(blink::FontCacheKey const&) [clone .isra.0] () at ../../third_party/blink/renderer/platform/fonts/font_cache_key.h:55
|
||||||
|
#11 0x000055f4564c44d9 in WTF::HashMapTranslator<WTF::HashTraits<blink::FontCacheKey>, WTF::HashMapValueTraits<WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> > > >::Store<WTF::KeyValuePair<blink::FontCacheKey, cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> >, blink::FontCacheKey&, blink::FontPlatformData const*&> () at ../../third_party/blink/renderer/platform/wtf/hash_map.h:340
|
||||||
|
#12 WTF::HashTable<blink::FontCacheKey, WTF::KeyValuePair<blink::FontCacheKey, cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> >, WTF::KeyValuePairExtractor, WTF::HashMapValueTraits<WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> > >, WTF::HashTraits<blink::FontCacheKey>, blink::HeapAllocator>::insert<WTF::HashMapTranslator<WTF::HashTraits<blink::FontCacheKey>, WTF::HashMapValueTraits<WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> > > >, blink::FontCacheKey&, blink::FontPlatformData const*&>(blink::FontCacheKey&, blink::FontPlatformData const*&) [clone .isra.0] () at ../../third_party/blink/renderer/platform/wtf/hash_table.h:1291
|
||||||
|
#13 0x000055f4543111b1 in WTF::HashMap<blink::FontCacheKey, cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> >, blink::HeapAllocator>::InlineAdd<blink::FontCacheKey&, blink::FontPlatformData const*&> () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:141870345
|
||||||
|
#14 WTF::HashMap<blink::FontCacheKey, cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> >, blink::HeapAllocator>::insert<blink::FontCacheKey&, blink::FontPlatformData const*&> () at ../../third_party/blink/renderer/platform/wtf/hash_map.h:475
|
||||||
|
#15 blink::FontPlatformDataCache::GetOrCreateFontPlatformData (this=this@entry=0x316400141880, font_cache=font_cache@entry=0x316400141850, font_description=..., creation_params=..., alternate_font_name=alternate_font_name@entry=0)
|
||||||
|
at ../../third_party/blink/renderer/platform/fonts/font_platform_data_cache.cc:68
|
||||||
|
#16 0x000055f454311a0a in blink::FontCache::GetFontPlatformData (this=0x316400141850, font_description=..., creation_params=..., alternate_font_name=0) at ../../third_party/blink/renderer/platform/fonts/font_cache.cc:164
|
||||||
|
#17 0x000055f4564bbc7d in blink::FontCache::PlatformFallbackFontForCharacter () at ../../third_party/blink/renderer/platform/fonts/linux/font_cache_linux.cc:143
|
||||||
|
#18 0x000055f4564bcc2b in blink::FontCache::FallbackFontForCharacter(blink::FontDescription const&, int, blink::SimpleFontData const*, blink::FontFallbackPriority) [clone .isra.0] () at ../../third_party/blink/renderer/platform/fonts/font_cache.cc:251
|
||||||
|
#19 0x000055f45443653f in blink::FontFallbackIterator::UniqueSystemFontForHintList () at ../../third_party/blink/renderer/platform/fonts/font_fallback_iterator.cc:303
|
||||||
|
#20 blink::FontFallbackIterator::Next (this=0x7ffefa904bf0, hint_list=...) at ../../third_party/blink/renderer/platform/fonts/font_fallback_iterator.cc:152
|
||||||
|
#21 0x000055f45431a4b6 in blink::HarfBuzzShaper::ShapeSegment (this=<optimized out>, range_data=<optimized out>, segment=..., result=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158192637
|
||||||
|
#22 0x000055f453953f86 in blink::HarfBuzzShaper::Shape () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:145662151
|
||||||
|
#23 Reshape (this=0x7ffefa9050d0, start_item=..., font=..., start_offset=<optimized out>, end_offset=end_offset@entry=43) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:145662155
|
||||||
|
#24 0x000055f4539542f0 in ShapeWithoutCache (this=this@entry=0x7ffefa9050d0, start_item=..., font=..., end_offset=end_offset@entry=43) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:145662155
|
||||||
|
#25 0x000055f4539b5ab9 in operator() () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:147940603
|
||||||
|
#26 Shape () at ../../third_party/blink/renderer/core/layout/inline/inline_node.cc:177
|
||||||
|
#27 blink::InlineNode::ShapeText (this=this@entry=0x7ffefa9057a8, data=data@entry=0x316403e7e958, previous_text=previous_text@entry=0x0, previous_items=previous_items@entry=0x0, override_font=override_font@entry=0x0)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/inline/inline_node.cc:1512
|
||||||
|
#28 0x000055f4539b9692 in blink::InlineNode::ShapeTextIncludingFirstLine () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:147941159
|
||||||
|
#29 blink::InlineNode::PrepareLayout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:145662744
|
||||||
|
#30 blink::InlineNode::PrepareLayoutIfNeeded (this=<optimized out>) at ../../third_party/blink/renderer/core/layout/inline/inline_node.cc:598
|
||||||
|
#31 0x000055f45400a06d in blink::InlineNode::EnsureData () at ../../third_party/blink/renderer/core/layout/inline/inline_node.cc:978
|
||||||
|
#32 blink::InlineNode::IsBlockLevel () at ../../third_party/blink/renderer/core/layout/inline/inline_node.h:102
|
||||||
|
#33 blink::BlockNode::FirstChild (this=this@entry=0x7ffefa905860) at ../../third_party/blink/renderer/core/layout/block_node.cc:1121
|
||||||
|
#34 0x000055f45400a200 in blink::BlockNode::IsInlineFormattingContextRoot (this=0x7ffefa905860, first_child_out=0x7ffefa905830) at ../../third_party/blink/renderer/core/layout/block_node.cc:1466
|
||||||
|
#35 0x000055f45423975b in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa905860) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:546
|
||||||
|
#36 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#37 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#38 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#39 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#40 0x000055f454237e4f in LayoutBlockChild () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324341
|
||||||
|
#41 LayoutInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:129
|
||||||
|
#42 LayoutInflow () at gen/third_party/blink/public/mojom/frame/frame.mojom.cc:44270740
|
||||||
|
#43 blink::BlockLayoutAlgorithm::HandleInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:2139
|
||||||
|
#44 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa9063b0, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:993
|
||||||
|
#45 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa9063b0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#46 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#47 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#48 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#49 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#50 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector<blink::NGFlexLine, 0u>*, blink::HeapVector<cppgc::internal::BasicMember<blink::LayoutBox, cppgc::internal::StrongMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, 0u>*, bool) [clone .constprop.0] () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1253
|
||||||
|
#51 0x000055f45402e6c6 in blink::FlexLayoutAlgorithm::LayoutInternal () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1043
|
||||||
|
#52 blink::FlexLayoutAlgorithm::Layout (this=this@entry=0x7ffefa9070e0) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883768
|
||||||
|
#53 0x000055f454032076 in operator()<blink::FlexLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#54 CreateAlgorithmAndRun<blink::FlexLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#55 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#56 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#57 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector<blink::NGFlexLine, 0u>*, blink::HeapVector<cppgc::internal::BasicMember<blink::LayoutBox, cppgc::internal::StrongMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, 0u>*, bool) [clone .constprop.0] () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1253
|
||||||
|
#58 0x000055f45402e6c6 in blink::FlexLayoutAlgorithm::LayoutInternal () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1043
|
||||||
|
#59 blink::FlexLayoutAlgorithm::Layout (this=this@entry=0x7ffefa9081a0) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883768
|
||||||
|
#60 0x000055f454032076 in operator()<blink::FlexLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#61 CreateAlgorithmAndRun<blink::FlexLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#62 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#63 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#64 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector<blink::NGFlexLine, 0u>*, blink::HeapVector<cppgc::internal::BasicMember<blink::LayoutBox, cppgc::internal::StrongMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, 0u>*, bool) [clone .constprop.0] () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1253
|
||||||
|
#65 0x000055f45402e6c6 in blink::FlexLayoutAlgorithm::LayoutInternal () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1043
|
||||||
|
#66 blink::FlexLayoutAlgorithm::Layout (this=this@entry=0x7ffefa909260) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883768
|
||||||
|
#67 0x000055f454032076 in operator()<blink::FlexLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#68 CreateAlgorithmAndRun<blink::FlexLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#69 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#70 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#71 0x000055f454230b9a in LayoutBlockChild () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:114
|
||||||
|
#72 blink::BlockLayoutAlgorithm::LayoutNewFormattingContext (this=this@entry=0x7ffefa90a330, child=..., child_break_token=child_break_token@entry=0x0, child_data=..., origin_offset=..., abort_if_cleared=false, out_child_bfc_offset=0x7ffefa90a19c,
|
||||||
|
out_resolved_margins=0x7ffefa90a1d0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1953
|
||||||
|
#73 0x000055f454237063 in blink::BlockLayoutAlgorithm::HandleNewFormattingContext () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324366
|
||||||
|
#74 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90a330, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:988
|
||||||
|
#75 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90a330) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#76 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#77 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#78 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#79 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#80 0x000055f4540d6105 in blink::OutOfFlowLayoutPart::GenerateFragment () at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:2546
|
||||||
|
#81 blink::OutOfFlowLayoutPart::Layout (this=this@entry=0x7ffefa90b1b0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false)
|
||||||
|
at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917333
|
||||||
|
#82 0x000055f4540e5174 in blink::OutOfFlowLayoutPart::LayoutOOFNode (this=this@entry=0x7ffefa90b1b0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0,
|
||||||
|
is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917453
|
||||||
|
#83 0x000055f4540e5b85 in blink::OutOfFlowLayoutPart::LayoutCandidates (this=this@entry=0x7ffefa90b1b0, candidates=candidates@entry=0x7ffefa90b110) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:1111
|
||||||
|
#84 0x000055f4540f2b9e in blink::OutOfFlowLayoutPart::Run (this=0x7ffefa90b1b0) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:523
|
||||||
|
#85 0x000055f45423444d in blink::BoxFragmentBuilder::HandleOofsAndSpecialDescendants (this=this@entry=0x7ffefa90b550) at ../../third_party/blink/renderer/core/layout/box_fragment_builder.cc:547
|
||||||
|
#86 0x000055f4542367d0 in blink::BlockLayoutAlgorithm::FinishLayout () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1357
|
||||||
|
#87 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90b540, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:156517574
|
||||||
|
#88 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90b540) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#89 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#90 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#91 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#92 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#93 0x000055f454230b9a in LayoutBlockChild () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:114
|
||||||
|
#94 blink::BlockLayoutAlgorithm::LayoutNewFormattingContext (this=this@entry=0x7ffefa90c280, child=..., child_break_token=child_break_token@entry=0x0, child_data=..., origin_offset=..., abort_if_cleared=false, out_child_bfc_offset=0x7ffefa90c0ec,
|
||||||
|
out_resolved_margins=0x7ffefa90c120) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1953
|
||||||
|
#95 0x000055f454237063 in blink::BlockLayoutAlgorithm::HandleNewFormattingContext () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324366
|
||||||
|
#96 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90c280, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:988
|
||||||
|
#97 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90c280) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#98 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#99 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#100 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#101 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#102 0x000055f454230b9a in LayoutBlockChild () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:114
|
||||||
|
#103 blink::BlockLayoutAlgorithm::LayoutNewFormattingContext (this=this@entry=0x7ffefa90cfc0, child=..., child_break_token=child_break_token@entry=0x0, child_data=..., origin_offset=..., abort_if_cleared=false, out_child_bfc_offset=0x7ffefa90ce2c,
|
||||||
|
out_resolved_margins=0x7ffefa90ce60) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1953
|
||||||
|
#104 0x000055f454237063 in blink::BlockLayoutAlgorithm::HandleNewFormattingContext () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324366
|
||||||
|
#105 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90cfc0, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:988
|
||||||
|
#106 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90cfc0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#107 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#108 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#109 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#110 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#111 0x000055f454237e4f in LayoutBlockChild () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324341
|
||||||
|
#112 LayoutInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:129
|
||||||
|
#113 LayoutInflow () at gen/third_party/blink/public/mojom/frame/frame.mojom.cc:44270740
|
||||||
|
#114 blink::BlockLayoutAlgorithm::HandleInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:2139
|
||||||
|
#115 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90db10, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:993
|
||||||
|
#116 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90db10) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#117 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#118 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#119 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#120 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#121 0x000055f454237e4f in LayoutBlockChild () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324341
|
||||||
|
#122 LayoutInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:129
|
||||||
|
#123 LayoutInflow () at gen/third_party/blink/public/mojom/frame/frame.mojom.cc:44270740
|
||||||
|
#124 blink::BlockLayoutAlgorithm::HandleInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:2139
|
||||||
|
#125 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90e660, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:993
|
||||||
|
#126 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90e660) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#127 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#128 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#129 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#130 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#131 0x000055f454237e4f in LayoutBlockChild () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324341
|
||||||
|
#132 LayoutInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:129
|
||||||
|
#133 LayoutInflow () at gen/third_party/blink/public/mojom/frame/frame.mojom.cc:44270740
|
||||||
|
#134 blink::BlockLayoutAlgorithm::HandleInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:2139
|
||||||
|
#135 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90f1b0, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:993
|
||||||
|
#136 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90f1b0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#137 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#138 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#139 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#140 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#141 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector<blink::NGFlexLine, 0u>*, blink::HeapVector<cppgc::internal::BasicMember<blink::LayoutBox, cppgc::internal::StrongMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, 0u>*, bool) [clone .constprop.0] () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1253
|
||||||
|
#142 0x000055f45402e6c6 in blink::FlexLayoutAlgorithm::LayoutInternal () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1043
|
||||||
|
#143 blink::FlexLayoutAlgorithm::Layout (this=this@entry=0x7ffefa90fee0) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883768
|
||||||
|
#144 0x000055f454032076 in operator()<blink::FlexLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#145 CreateAlgorithmAndRun<blink::FlexLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#146 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#147 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#148 0x000055f454230b9a in LayoutBlockChild () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:114
|
||||||
|
#149 blink::BlockLayoutAlgorithm::LayoutNewFormattingContext (this=this@entry=0x7ffefa910fb0, child=..., child_break_token=child_break_token@entry=0x0, child_data=..., origin_offset=..., abort_if_cleared=false, out_child_bfc_offset=0x7ffefa910e1c,
|
||||||
|
out_resolved_margins=0x7ffefa910e50) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1953
|
||||||
|
#150 0x000055f454237063 in blink::BlockLayoutAlgorithm::HandleNewFormattingContext () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324366
|
||||||
|
#151 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa910fb0, inline_child_layout_context=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:988
|
||||||
|
#152 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa910fb0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549
|
||||||
|
#153 0x000055f45400cb43 in operator()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
|
||||||
|
#154 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...)
|
||||||
|
at ../../third_party/blink/renderer/core/layout/block_node.cc:120
|
||||||
|
#155 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212
|
||||||
|
#156 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
|
||||||
|
#157 0x000055f4540d6105 in blink::OutOfFlowLayoutPart::GenerateFragment () at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:2546
|
||||||
|
#158 blink::OutOfFlowLayoutPart::Layout (this=this@entry=0x7ffefa911e30, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false)
|
||||||
|
at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917333
|
||||||
|
#159 0x000055f4540e5174 in blink::OutOfFlowLayoutPart::LayoutOOFNode (this=this@entry=0x7ffefa911e30, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0,
|
||||||
|
is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917453
|
||||||
|
#160 0x000055f4540e5b85 in blink::OutOfFlowLayoutPart::LayoutCandidates (this=this@entry=0x7ffefa911e30, candidates=candidates@entry=0x7ffefa911d90) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:1111
|
||||||
|
#161 0x000055f4540f2b9e in blink::OutOfFlowLayoutPart::Run (this=0x7ffefa911e30) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:523
|
||||||
|
#162 0x000055f45423444d in blink::BoxFragmentBuilder::HandleOofsAndSpecialDescendants (this=0x7ffefa9121e0) at ../../third_party/blink/renderer/core/layout/box_fragment_builder.cc:547
|
||||||
|
#163 0x000055f4540f3540 in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:302
|
||||||
|
#164 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#165 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#166 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#167 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#168 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#169 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#170 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#171 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#172 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#173 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#174 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#175 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#176 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#177 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#178 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#179 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#180 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#181 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#182 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#183 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#184 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#185 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#186 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#187 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#188 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#189 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#190 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#191 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#192 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#193 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#194 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#195 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#196 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#197 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#198 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#199 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#200 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#201 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#202 0x000055f4540d6105 in blink::OutOfFlowLayoutPart::GenerateFragment () at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:2546
|
||||||
|
#203 blink::OutOfFlowLayoutPart::Layout (this=this@entry=0x7ffefa9154f0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false)
|
||||||
|
at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917333
|
||||||
|
#204 0x000055f4540e5174 in blink::OutOfFlowLayoutPart::LayoutOOFNode (this=this@entry=0x7ffefa9154f0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0,
|
||||||
|
is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917453
|
||||||
|
#205 0x000055f4540e5b85 in blink::OutOfFlowLayoutPart::LayoutCandidates (this=this@entry=0x7ffefa9154f0, candidates=candidates@entry=0x7ffefa915450) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:1111
|
||||||
|
#206 0x000055f4540f2b9e in blink::OutOfFlowLayoutPart::Run (this=0x7ffefa9154f0) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:523
|
||||||
|
#207 0x000055f45423444d in blink::BoxFragmentBuilder::HandleOofsAndSpecialDescendants (this=0x7ffefa9158a0) at ../../third_party/blink/renderer/core/layout/box_fragment_builder.cc:547
|
||||||
|
#208 0x000055f4540f3540 in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:302
|
||||||
|
#209 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#210 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#211 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#212 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#213 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#214 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#215 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#216 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#217 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#218 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#219 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#220 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#221 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#222 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#223 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#224 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#225 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#226 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#227 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#228 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#229 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#230 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#231 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#232 0x000055f4540d6105 in blink::OutOfFlowLayoutPart::GenerateFragment () at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:2546
|
||||||
|
#233 blink::OutOfFlowLayoutPart::Layout (this=this@entry=0x7ffefa9179b0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false)
|
||||||
|
at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917333
|
||||||
|
#234 0x000055f4540e5174 in blink::OutOfFlowLayoutPart::LayoutOOFNode (this=this@entry=0x7ffefa9179b0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0,
|
||||||
|
is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917453
|
||||||
|
#235 0x000055f4540e5b85 in blink::OutOfFlowLayoutPart::LayoutCandidates (this=this@entry=0x7ffefa9179b0, candidates=candidates@entry=0x7ffefa917910) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:1111
|
||||||
|
#236 0x000055f4540f2b9e in blink::OutOfFlowLayoutPart::Run (this=0x7ffefa9179b0) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:523
|
||||||
|
#237 0x000055f45423444d in blink::BoxFragmentBuilder::HandleOofsAndSpecialDescendants (this=0x7ffefa917d60) at ../../third_party/blink/renderer/core/layout/box_fragment_builder.cc:547
|
||||||
|
#238 0x000055f4540f3540 in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:302
|
||||||
|
#239 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#240 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#241 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#242 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#243 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#244 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#245 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#246 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#247 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#248 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#249 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#250 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#251 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#252 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#253 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#254 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#255 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#256 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#257 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#258 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#259 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#260 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#261 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#262 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653
|
||||||
|
#263 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237
|
||||||
|
#264 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584
|
||||||
|
#265 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705
|
||||||
|
#266 blink::BlockNode::Layout (this=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682
|
||||||
|
#267 0x000055f4537e965e in blink::LayoutBox::LayoutSubtreeRoot () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:143013582
|
||||||
|
#268 blink::LayoutBox::LayoutSubtreeRoot () at gen/third_party/blink/renderer/core/html_names.cc:85762220
|
||||||
|
#269 blink::LocalFrameView::LayoutFromRootObject () at ../../third_party/blink/renderer/core/frame/local_frame_view.cc:666
|
||||||
|
#270 blink::LocalFrameView::LayoutFromRootObject () at gen/third_party/blink/renderer/core/html_names.cc:85758991
|
||||||
|
#271 blink::LocalFrameView::PerformLayout (this=this@entry=0x316400158c00) at ../../third_party/blink/renderer/core/frame/local_frame_view.cc:761
|
||||||
|
#272 0x000055f4537eb0bb in blink::LocalFrameView::UpdateLayout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:143013984
|
||||||
|
#273 blink::LocalFrameView::UpdateStyleAndLayoutInternal (this=this@entry=0x316400158c00) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:143013762
|
||||||
|
#274 0x000055f4537ecb9b in blink::LocalFrameView::UpdateStyleAndLayout (this=0x316400158c00) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:143671655
|
||||||
|
#275 0x000055f4544b9cd2 in blink::Document::UpdateStyleAndLayout (this=0x3164001e2530, reason=26) at ../../third_party/blink/renderer/core/dom/document.cc:2784
|
||||||
|
#276 0x000055f455fc4492 in blink::FrameSelection::ComputeAbsoluteBounds(gfx::Rect&, gfx::Rect&) const [clone .constprop.0] () at ../../third_party/blink/renderer/core/editing/frame_selection.cc:656
|
||||||
|
#277 0x000055f453827206 in blink::WebFrameWidgetImpl::CalculateSelectionBounds (this=this@entry=0x316400156138, anchor_root_frame=..., focus_root_frame=..., bounding_box_in_root_frame=bounding_box_in_root_frame@entry=0x7ffefa91a820)
|
||||||
|
at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:132558908
|
||||||
|
#278 0x000055f4538296b2 in blink::WebFrameWidgetImpl::GetSelectionBoundsInWindow (this=0x316400156138, focus=0x4140017b980, anchor=0x4140017b990, bounding_box=0x4140017b9a0, focus_dir=0x7ffefa91a8d0, anchor_dir=0x7ffefa91a8c8, is_anchor_first=0x7ffefa91a8c7)
|
||||||
|
at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:78747162
|
||||||
|
#279 0x000055f454433e25 in blink::WidgetBase::UpdateSelectionBounds (this=this@entry=0x4140017b800) at ../../third_party/blink/renderer/platform/widget/widget_base.cc:1468
|
||||||
|
#280 0x000055f454433f8f in blink::WidgetBase::WillBeginMainFrame (this=0x4140017b800) at ../../third_party/blink/renderer/platform/widget/widget_base.cc:967
|
||||||
|
#281 0x000055f4529a093c in cc::LayerTreeHost::WillBeginMainFrame (this=0x414000ed500) at ../../cc/trees/layer_tree_host.cc:354
|
||||||
|
#282 0x000055f452a2f399 in cc::ProxyMain::BeginMainFrame (this=<optimized out>, begin_main_frame_state=std::unique_ptr<cc::BeginMainFrameAndCommitState> = {...}) at ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h:1002
|
||||||
|
#283 0x000055f452a8b781 in base::internal::DecayedFunctorTraits<void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >&&>::Invoke<void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain> const&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > > (method=<optimized out>, receiver_ptr=...) at /usr/include/c++/14/bits/unique_ptr.h:191
|
||||||
|
#284 base::internal::InvokeHelper<true, base::internal::FunctorTraits<void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >&&>, void, 0ul, 1ul>::MakeItSo<void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), std::tuple<base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >>(void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), std::tuple<base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >&&) (
|
||||||
|
functor=@0x41400589d30: (void (cc::ProxyMain::*)(cc::ProxyMain * const, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >)) 0x55f452a2ef80 <cc::ProxyMain::BeginMainFrame(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >)>, bound=...) at ../../base/functional/bind_internal.h:954
|
||||||
|
#285 base::internal::Invoker<base::internal::FunctorTraits<void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >&&>, base::internal::BindState<true, true, false, void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >, void ()>::RunImpl<void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), std::tuple<base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >, 0ul, 1ul>(void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), std::tuple<base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >&&, std::integer_sequence<unsigned long, 0ul, 1ul>) (
|
||||||
|
functor=@0x41400589d30: (void (cc::ProxyMain::*)(cc::ProxyMain * const, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >)) 0x55f452a2ef80 <cc::ProxyMain::BeginMainFrame(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >)>, bound=...) at ../../base/functional/bind_internal.h:1067
|
||||||
|
#286 base::internal::Invoker<base::internal::FunctorTraits<void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >&&>, base::internal::BindState<true, true, false, void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >, void ()>::RunOnce(base::internal::BindStateBase*) (base=0x41400589d10) at ../../base/functional/bind_internal.h:980
|
||||||
|
#287 0x000055f4565b518d in base::OnceCallback<void ()>::Run() && (this=0x41400018678) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:200122192
|
||||||
|
#288 base::TaskAnnotator::RunTaskImpl(base::PendingTask&) [clone .isra.0] (pending_task=..., this=<optimized out>) at ../../base/task/common/task_annotator.cc:203
|
||||||
|
#289 0x000055f451ca3130 in base::TaskAnnotator::RunTask<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::<lambda(perfetto::EventContext&)> > (this=0x4140004c200, event_name=..., pending_task=...)
|
||||||
|
at ../../base/task/common/task_annotator.h:90
|
||||||
|
#290 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl (this=<optimized out>, continuation_lazy_now=0x7ffefa91af40) at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:470
|
||||||
|
#291 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork (this=<optimized out>) at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:332
|
||||||
|
#292 0x000055f451ca5027 in base::MessagePumpDefault::Run (this=0x414000040c0, delegate=0x4140004c0f8) at ../../base/message_loop/message_pump_default.cc:40
|
||||||
|
#293 0x000055f451ca14e9 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run (this=0x4140004c000, application_tasks_allowed=true, timeout=...) at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:640
|
||||||
|
#294 0x000055f451ca18b2 in base::RunLoop::Run (this=0x7ffefa91b550, location=...) at ../../base/run_loop.cc:134
|
||||||
|
#295 base::RunLoop::Run (this=<optimized out>, location=...) at ../../base/run_loop.cc:106
|
||||||
|
#296 0x000055f4535391b5 in content::RendererMain (parameters=...) at ../../content/renderer/renderer_main.cc:361
|
||||||
|
#297 0x000055f44f2d48af in content::RunZygote (delegate=delegate@entry=0x7ffefa91c040) at /usr/include/c++/14/bits/unique_ptr.h:191
|
||||||
|
#298 0x000055f44f2d8b18 in content::RunOtherNamedProcessTypeMain (process_type="zygote", main_function_params=..., delegate=0x7ffefa91c040) at ../../content/app/content_main_runner_impl.cc:807
|
||||||
|
#299 content::ContentMainRunnerImpl::Run (this=<optimized out>) at ../../content/app/content_main_runner_impl.cc:1167
|
||||||
|
#300 0x000055f44eeb846c in content::RunContentProcess (params=..., content_main_runner=0x4100006d880) at ../../content/app/content_main.cc:354
|
||||||
|
#301 content::ContentMain (params=...) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:166189489
|
||||||
|
#302 main (argc=argc@entry=2, argv=argv@entry=0x7ffefa91c5d8) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:166189474
|
||||||
|
#303 0x00007ffa48c2a2ae in __libc_start_call_main (main=main@entry=0x55f44eeb80a0 <main(int, char**)>, argc=argc@entry=2, argv=argv@entry=0x7ffefa91c5d8) at ../sysdeps/nptl/libc_start_call_main.h:58
|
||||||
|
#304 0x00007ffa48c2a379 in __libc_start_main_impl (main=0x55f44eeb80a0 <main(int, char**)>, argc=2, argv=0x7ffefa91c5d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffefa91c5c8) at ../csu/libc-start.c:360
|
||||||
|
#305 0x000055f44eee5b45 in _start () at ../sysdeps/x86_64/start.S:115
|
||||||
|
|
||||||
|
From 3c55b5cb524b2f304a623bd0ddd8321f8fa2e37e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
|
||||||
|
Date: Thu, 19 Sep 2024 16:55:22 +0200
|
||||||
|
Subject: Fix UAF in FontCache
|
||||||
|
|
||||||
|
Fixes a rare crash related to font caching.
|
||||||
|
Upstream issue: https://issues.chromium.org/issues/342778288
|
||||||
|
Its been only fixed for ASAN builds for some reason.
|
||||||
|
|
||||||
|
This change backports the fix: https://crrev.com/c/5629253
|
||||||
|
and extends the ASAN guards with IS_QTWEBENGINE.
|
||||||
|
|
||||||
|
Change-Id: I0fb7348ef97882fed199d1432b3a2543804e8de5
|
||||||
|
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/592190
|
||||||
|
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
|
||||||
|
---
|
||||||
|
.../renderer/platform/fonts/font_face_creation_params.h | 12 +++++++-----
|
||||||
|
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/chromium/third_party/blink/renderer/platform/fonts/font_face_creation_params.h b/chromium/third_party/blink/renderer/platform/fonts/font_face_creation_params.h
|
||||||
|
index 8f0aa2f1c14..9d4c07637fc 100644
|
||||||
|
--- a/third_party/blink/renderer/platform/fonts/font_face_creation_params.h
|
||||||
|
+++ b/third_party/blink/renderer/platform/fonts/font_face_creation_params.h
|
||||||
|
@@ -38,6 +38,8 @@
|
||||||
|
#include "third_party/blink/renderer/platform/wtf/text/case_folding_hash.h"
|
||||||
|
#include "third_party/blink/renderer/platform/wtf/text/string_hasher.h"
|
||||||
|
|
||||||
|
+#include <optional>
|
||||||
|
+
|
||||||
|
namespace blink {
|
||||||
|
|
||||||
|
enum FontFaceCreationType {
|
||||||
|
@@ -79,7 +81,7 @@ class FontFaceCreationParams {
|
||||||
|
}
|
||||||
|
const std::string& Filename() const {
|
||||||
|
DCHECK_EQ(creation_type_, kCreateFontByFciIdAndTtcIndex);
|
||||||
|
-#if defined(ADDRESS_SANITIZER)
|
||||||
|
+#if 1
|
||||||
|
DCHECK(filename_.has_value());
|
||||||
|
return *filename_;
|
||||||
|
#else
|
||||||
|
@@ -126,7 +128,7 @@ class FontFaceCreationParams {
|
||||||
|
AtomicString family_;
|
||||||
|
|
||||||
|
void SetFilename(std::string& filename) {
|
||||||
|
-#if defined(ADDRESS_SANITIZER)
|
||||||
|
+#if 1
|
||||||
|
*filename_ = filename;
|
||||||
|
#else
|
||||||
|
filename_ = filename;
|
||||||
|
@@ -134,7 +136,7 @@ class FontFaceCreationParams {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FilenameEqual(const FontFaceCreationParams& other) const {
|
||||||
|
-#if defined(ADDRESS_SANITIZER)
|
||||||
|
+#if 1
|
||||||
|
if (!filename_.has_value() || !other.filename_.has_value()) {
|
||||||
|
return filename_.has_value() == other.filename_.has_value();
|
||||||
|
}
|
||||||
|
@@ -145,14 +147,14 @@ class FontFaceCreationParams {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HasFilename() const {
|
||||||
|
-#if defined(ADDRESS_SANITIZER)
|
||||||
|
+#if 1
|
||||||
|
return filename_.has_value();
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if defined(ADDRESS_SANITIZER)
|
||||||
|
+#if 1
|
||||||
|
// We put the `std::string` behind an optional as ASAN counter checks require
|
||||||
|
// that we properly call constructors and destructors for all strings. This is
|
||||||
|
// not the case when `FontFaceCreationParams` is used in `WTF::HashMap` as key
|
||||||
|
--
|
||||||
|
cgit v1.2.3
|
||||||
|
|
10
build-without-speech-service.patch
Normal file
10
build-without-speech-service.patch
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
--- src/chrome/test/BUILD.gn.orig 2024-12-08 18:44:32.671357320 +0100
|
||||||
|
+++ src/chrome/test/BUILD.gn 2025-01-01 21:35:00.776064485 +0100
|
||||||
|
@@ -8317,7 +8317,6 @@ test("unit_tests") {
|
||||||
|
"//chrome/browser/ui/zoom:unit_tests",
|
||||||
|
"//chrome/browser/web_applications:web_applications_test_support",
|
||||||
|
"//chrome/common/accessibility:mojo_bindings",
|
||||||
|
- "//chrome/services/speech:unit_tests",
|
||||||
|
"//components/app_constants",
|
||||||
|
"//components/color",
|
||||||
|
"//components/commerce/core:account_checker_test_support",
|
@@ -21,11 +21,9 @@ Subject: [PATCH] Disable various compiler configs
|
|||||||
build/config/compiler/BUILD.gn | 114 +++++----------------------------
|
build/config/compiler/BUILD.gn | 114 +++++----------------------------
|
||||||
1 file changed, 17 insertions(+), 97 deletions(-)
|
1 file changed, 17 insertions(+), 97 deletions(-)
|
||||||
|
|
||||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
--- src/build/config/compiler/BUILD.gn.orig 2024-12-08 18:34:51.744673228 +0100
|
||||||
index d40843b..b92f03b 100644
|
+++ src/build/config/compiler/BUILD.gn 2024-12-18 11:06:05.334038035 +0100
|
||||||
--- a/build/config/compiler/BUILD.gn
|
@@ -310,9 +310,7 @@ config("compiler") {
|
||||||
+++ b/build/config/compiler/BUILD.gn
|
|
||||||
@@ -305,9 +305,7 @@ config("compiler") {
|
|
||||||
|
|
||||||
configs += [
|
configs += [
|
||||||
# See the definitions below.
|
# See the definitions below.
|
||||||
@@ -35,7 +33,7 @@ index d40843b..b92f03b 100644
|
|||||||
":compiler_codegen",
|
":compiler_codegen",
|
||||||
":compiler_deterministic",
|
":compiler_deterministic",
|
||||||
]
|
]
|
||||||
@@ -337,7 +335,12 @@ config("compiler") {
|
@@ -342,7 +340,12 @@ config("compiler") {
|
||||||
if (!is_win) {
|
if (!is_win) {
|
||||||
# Common POSIX compiler flags setup.
|
# Common POSIX compiler flags setup.
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
@@ -49,7 +47,7 @@ index d40843b..b92f03b 100644
|
|||||||
|
|
||||||
# Stack protection. ShadowCallStack and Stack protector address the same
|
# Stack protection. ShadowCallStack and Stack protector address the same
|
||||||
# problems. Therefore, we only enable one or the other. Clang advertises SCS as
|
# problems. Therefore, we only enable one or the other. Clang advertises SCS as
|
||||||
@@ -478,10 +481,6 @@ config("compiler") {
|
@@ -487,10 +490,6 @@ config("compiler") {
|
||||||
# Linux/Android/Fuchsia common flags setup.
|
# Linux/Android/Fuchsia common flags setup.
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
if (is_linux || is_chromeos || is_android || is_fuchsia) {
|
if (is_linux || is_chromeos || is_android || is_fuchsia) {
|
||||||
@@ -60,64 +58,8 @@ index d40843b..b92f03b 100644
|
|||||||
|
|
||||||
if (!is_clang) {
|
if (!is_clang) {
|
||||||
# Use pipes for communicating between sub-processes. Faster.
|
# Use pipes for communicating between sub-processes. Faster.
|
||||||
@@ -545,55 +544,6 @@ config("compiler") {
|
@@ -1107,11 +1106,6 @@ config("libcxx_hardening") {
|
||||||
ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
|
defines = [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
|
||||||
}
|
|
||||||
|
|
||||||
- if (is_clang && !is_nacl && current_os != "zos") {
|
|
||||||
- cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
|
|
||||||
- if (save_reproducers_on_lld_crash && use_lld) {
|
|
||||||
- ldflags += [
|
|
||||||
- "-fcrash-diagnostics=all",
|
|
||||||
- "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
|
|
||||||
- ]
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- # TODO(hans): Remove this once Clang generates better optimized debug info
|
|
||||||
- # by default. https://crbug.com/765793
|
|
||||||
- cflags += [
|
|
||||||
- "-mllvm",
|
|
||||||
- "-instcombine-lower-dbg-declare=0",
|
|
||||||
- ]
|
|
||||||
- if (!is_debug && use_thin_lto && is_a_target_toolchain) {
|
|
||||||
- if (is_win) {
|
|
||||||
- ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
|
|
||||||
- } else {
|
|
||||||
- ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- # TODO(crbug.com/40283598): This causes binary size growth and potentially
|
|
||||||
- # other problems.
|
|
||||||
- # TODO(crbug.com/40284925): This isn't supported by Cronet's mainline llvm version.
|
|
||||||
- if (default_toolchain != "//build/toolchain/cros:target" &&
|
|
||||||
- !llvm_android_mainline) {
|
|
||||||
- cflags += [
|
|
||||||
- "-mllvm",
|
|
||||||
- "-split-threshold-for-reg-with-hint=0",
|
|
||||||
- ]
|
|
||||||
- if (use_thin_lto && is_a_target_toolchain) {
|
|
||||||
- if (is_win) {
|
|
||||||
- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
|
|
||||||
- } else {
|
|
||||||
- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- # TODO(crbug.com/40192287): Investigate why/if this should be needed.
|
|
||||||
- if (is_win) {
|
|
||||||
- cflags += [ "/clang:-ffp-contract=off" ]
|
|
||||||
- } else {
|
|
||||||
- cflags += [ "-ffp-contract=off" ]
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
# C11/C++11 compiler flags setup.
|
|
||||||
# ---------------------------
|
|
||||||
if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
|
|
||||||
@@ -1063,11 +1013,6 @@ config("compiler") {
|
|
||||||
defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- # Enable libstdc++ hardening lightweight assertions. Those have a low
|
- # Enable libstdc++ hardening lightweight assertions. Those have a low
|
||||||
@@ -128,7 +70,7 @@ index d40843b..b92f03b 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
# The BUILDCONFIG file sets this config on targets by default, which means when
|
# The BUILDCONFIG file sets this config on targets by default, which means when
|
||||||
@@ -1133,7 +1078,8 @@ config("thinlto_optimize_max") {
|
@@ -1177,7 +1171,8 @@ config("thinlto_optimize_max") {
|
||||||
# without using everything that "compiler" brings in. Options that
|
# without using everything that "compiler" brings in. Options that
|
||||||
# tweak code generation for a particular CPU do not belong here!
|
# tweak code generation for a particular CPU do not belong here!
|
||||||
# See "compiler_codegen", below.
|
# See "compiler_codegen", below.
|
||||||
@@ -138,54 +80,7 @@ index d40843b..b92f03b 100644
|
|||||||
cflags = []
|
cflags = []
|
||||||
ldflags = []
|
ldflags = []
|
||||||
defines = []
|
defines = []
|
||||||
@@ -1516,46 +1462,6 @@ config("compiler_deterministic") {
|
@@ -1811,7 +1806,8 @@ config("treat_warnings_as_errors") {
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- # Makes builds independent of absolute file path.
|
|
||||||
- if (is_clang && strip_absolute_paths_from_debug_symbols) {
|
|
||||||
- # If debug option is given, clang includes $cwd in debug info by default.
|
|
||||||
- # For such build, this flag generates reproducible obj files even we use
|
|
||||||
- # different build directory like "out/feature_a" and "out/feature_b" if
|
|
||||||
- # we build same files with same compile flag.
|
|
||||||
- # Other paths are already given in relative, no need to normalize them.
|
|
||||||
- if (is_nacl) {
|
|
||||||
- # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
|
|
||||||
- cflags += [
|
|
||||||
- "-Xclang",
|
|
||||||
- "-fdebug-compilation-dir",
|
|
||||||
- "-Xclang",
|
|
||||||
- ".",
|
|
||||||
- ]
|
|
||||||
- } else {
|
|
||||||
- # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
|
|
||||||
- # and -fcoverage-compilation-dir=.
|
|
||||||
- cflags += [ "-ffile-compilation-dir=." ]
|
|
||||||
- swiftflags += [ "-file-compilation-dir=." ]
|
|
||||||
- }
|
|
||||||
- if (!is_win) {
|
|
||||||
- # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
|
|
||||||
- asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (is_win && use_lld) {
|
|
||||||
- if (symbol_level == 2 || (is_clang && using_sanitizer)) {
|
|
||||||
- # Absolutize source file paths for PDB. Pass the real build directory
|
|
||||||
- # if the pdb contains source-level debug information and if linker
|
|
||||||
- # reproducibility is not critical.
|
|
||||||
- ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
|
|
||||||
- } else {
|
|
||||||
- # Use a fake fixed base directory for paths in the pdb to make the pdb
|
|
||||||
- # output fully deterministic and independent of the build directory.
|
|
||||||
- ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
# Tells the compiler not to use absolute paths when passing the default
|
|
||||||
# paths to the tools it invokes. We don't want this because we don't
|
|
||||||
# really need it and it can mess up the RBE cache entries.
|
|
||||||
@@ -1732,7 +1638,8 @@ config("treat_warnings_as_errors") {
|
|
||||||
# Collects all warning flags that are used by default. This is used as a
|
# Collects all warning flags that are used by default. This is used as a
|
||||||
# subconfig of both chromium_code and no_chromium_code. This way these
|
# subconfig of both chromium_code and no_chromium_code. This way these
|
||||||
# flags are guaranteed to appear on the compile command line after -Wall.
|
# flags are guaranteed to appear on the compile command line after -Wall.
|
||||||
@@ -195,7 +90,7 @@ index d40843b..b92f03b 100644
|
|||||||
cflags = []
|
cflags = []
|
||||||
cflags_c = []
|
cflags_c = []
|
||||||
cflags_cc = []
|
cflags_cc = []
|
||||||
@@ -1982,11 +1889,7 @@ config("chromium_code") {
|
@@ -2064,11 +2060,7 @@ config("chromium_code") {
|
||||||
defines = [ "_HAS_NODISCARD" ]
|
defines = [ "_HAS_NODISCARD" ]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -208,7 +103,7 @@ index d40843b..b92f03b 100644
|
|||||||
|
|
||||||
# In Chromium code, we define __STDC_foo_MACROS in order to get the
|
# In Chromium code, we define __STDC_foo_MACROS in order to get the
|
||||||
# C99 macros on Mac and Linux.
|
# C99 macros on Mac and Linux.
|
||||||
@@ -1995,24 +1898,6 @@ config("chromium_code") {
|
@@ -2077,24 +2069,6 @@ config("chromium_code") {
|
||||||
"__STDC_FORMAT_MACROS",
|
"__STDC_FORMAT_MACROS",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -233,7 +128,7 @@ index d40843b..b92f03b 100644
|
|||||||
if (is_apple) {
|
if (is_apple) {
|
||||||
cflags_objc = [ "-Wimplicit-retain-self" ]
|
cflags_objc = [ "-Wimplicit-retain-self" ]
|
||||||
cflags_objcc = [ "-Wimplicit-retain-self" ]
|
cflags_objcc = [ "-Wimplicit-retain-self" ]
|
||||||
@@ -2158,7 +2043,6 @@ config("no_rtti") {
|
@@ -2245,7 +2219,6 @@ config("no_rtti") {
|
||||||
config("export_dynamic") {
|
config("export_dynamic") {
|
||||||
# TODO(crbug.com/40118868): Revisit after target_os flip is completed.
|
# TODO(crbug.com/40118868): Revisit after target_os flip is completed.
|
||||||
if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
|
if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
|
||||||
@@ -241,7 +136,7 @@ index d40843b..b92f03b 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2246,7 +2130,8 @@ config("wexit_time_destructors") {
|
@@ -2333,7 +2306,8 @@ config("wexit_time_destructors") {
|
||||||
# gcc 4.9 and earlier had no way of suppressing this warning without
|
# gcc 4.9 and earlier had no way of suppressing this warning without
|
||||||
# suppressing the rest of them. Here we centralize the identification of
|
# suppressing the rest of them. Here we centralize the identification of
|
||||||
# the gcc 4.9 toolchains.
|
# the gcc 4.9 toolchains.
|
||||||
@@ -251,7 +146,7 @@ index d40843b..b92f03b 100644
|
|||||||
cflags = []
|
cflags = []
|
||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
cflags += [ "-Wno-incompatible-pointer-types" ]
|
cflags += [ "-Wno-incompatible-pointer-types" ]
|
||||||
@@ -2364,7 +2249,8 @@ if (is_win) {
|
@@ -2451,7 +2425,8 @@ if (is_win) {
|
||||||
common_optimize_on_cflags += [ "-fno-math-errno" ]
|
common_optimize_on_cflags += [ "-fno-math-errno" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,7 +156,7 @@ index d40843b..b92f03b 100644
|
|||||||
if (!is_win) {
|
if (!is_win) {
|
||||||
if (enable_frame_pointers) {
|
if (enable_frame_pointers) {
|
||||||
cflags = [ "-fno-omit-frame-pointer" ]
|
cflags = [ "-fno-omit-frame-pointer" ]
|
||||||
@@ -2405,7 +2291,8 @@ config("default_stack_frames") {
|
@@ -2492,7 +2467,8 @@ config("default_stack_frames") {
|
||||||
# [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000
|
# [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000
|
||||||
# [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000
|
# [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000
|
||||||
# [2]: https://crrev.com/c/5447532
|
# [2]: https://crrev.com/c/5447532
|
||||||
@@ -269,9 +164,9 @@ index d40843b..b92f03b 100644
|
|||||||
+config("optimize") { }
|
+config("optimize") { }
|
||||||
+config("xoptimize") {
|
+config("xoptimize") {
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
cflags = [ "/O2" ] + common_optimize_on_cflags
|
# clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for
|
||||||
|
# consistency with the other platforms.
|
||||||
@@ -2446,7 +2333,8 @@ config("optimize") {
|
@@ -2541,7 +2517,8 @@ config("optimize") {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Turn off optimizations.
|
# Turn off optimizations.
|
||||||
@@ -281,7 +176,7 @@ index d40843b..b92f03b 100644
|
|||||||
if (is_win) {
|
if (is_win) {
|
||||||
cflags = [
|
cflags = [
|
||||||
"/Od", # Disable optimization.
|
"/Od", # Disable optimization.
|
||||||
@@ -2486,7 +2374,8 @@ config("no_optimize") {
|
@@ -2581,7 +2558,8 @@ config("no_optimize") {
|
||||||
# Turns up the optimization level. Used to explicitly enable -O2 instead of
|
# Turns up the optimization level. Used to explicitly enable -O2 instead of
|
||||||
# -Os for select targets on platforms that use optimize_for_size. No-op
|
# -Os for select targets on platforms that use optimize_for_size. No-op
|
||||||
# elsewhere.
|
# elsewhere.
|
||||||
@@ -291,7 +186,7 @@ index d40843b..b92f03b 100644
|
|||||||
if (is_nacl && is_nacl_irt) {
|
if (is_nacl && is_nacl_irt) {
|
||||||
# The NaCl IRT is a special case and always wants its own config.
|
# The NaCl IRT is a special case and always wants its own config.
|
||||||
# Various components do:
|
# Various components do:
|
||||||
@@ -2519,7 +2408,8 @@ config("optimize_max") {
|
@@ -2614,7 +2592,8 @@ config("optimize_max") {
|
||||||
#
|
#
|
||||||
# TODO(crbug.com/41259697) - rework how all of these configs are related
|
# TODO(crbug.com/41259697) - rework how all of these configs are related
|
||||||
# so that we don't need this disclaimer.
|
# so that we don't need this disclaimer.
|
||||||
@@ -301,7 +196,7 @@ index d40843b..b92f03b 100644
|
|||||||
if (is_nacl && is_nacl_irt) {
|
if (is_nacl && is_nacl_irt) {
|
||||||
# The NaCl IRT is a special case and always wants its own config.
|
# The NaCl IRT is a special case and always wants its own config.
|
||||||
# Various components do:
|
# Various components do:
|
||||||
@@ -2548,7 +2438,8 @@ config("optimize_speed") {
|
@@ -2643,7 +2622,8 @@ config("optimize_speed") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,7 +206,7 @@ index d40843b..b92f03b 100644
|
|||||||
cflags = [ "-O1" ] + common_optimize_on_cflags
|
cflags = [ "-O1" ] + common_optimize_on_cflags
|
||||||
rustflags = [ "-Copt-level=1" ]
|
rustflags = [ "-Copt-level=1" ]
|
||||||
ldflags = common_optimize_on_ldflags
|
ldflags = common_optimize_on_ldflags
|
||||||
@@ -2681,7 +2572,8 @@ config("win_pdbaltpath") {
|
@@ -2774,7 +2754,8 @@ config("win_pdbaltpath") {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Full symbols.
|
# Full symbols.
|
||||||
@@ -319,9 +214,9 @@ index d40843b..b92f03b 100644
|
|||||||
+config("symbols") { cflags = ["-g2"] }
|
+config("symbols") { cflags = ["-g2"] }
|
||||||
+config("xsymbols") {
|
+config("xsymbols") {
|
||||||
rustflags = []
|
rustflags = []
|
||||||
|
configs = []
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
if (is_clang) {
|
@@ -2936,7 +2917,8 @@ config("symbols") {
|
||||||
@@ -2831,7 +2723,8 @@ config("symbols") {
|
|
||||||
# Minimal symbols.
|
# Minimal symbols.
|
||||||
# This config guarantees to hold symbol for stack trace which are shown to user
|
# This config guarantees to hold symbol for stack trace which are shown to user
|
||||||
# when crash happens in unittests running on buildbot.
|
# when crash happens in unittests running on buildbot.
|
||||||
@@ -331,7 +226,7 @@ index d40843b..b92f03b 100644
|
|||||||
rustflags = []
|
rustflags = []
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
# Functions, files, and line tables only.
|
# Functions, files, and line tables only.
|
||||||
@@ -2916,7 +2809,8 @@ config("minimal_symbols") {
|
@@ -3021,7 +3003,8 @@ config("minimal_symbols") {
|
||||||
# This configuration contains function names only. That is, the compiler is
|
# This configuration contains function names only. That is, the compiler is
|
||||||
# told to not generate debug information and the linker then just puts function
|
# told to not generate debug information and the linker then just puts function
|
||||||
# names in the final debug information.
|
# names in the final debug information.
|
||||||
|
68
chromium-123-qrcode.patch
Normal file
68
chromium-123-qrcode.patch
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
--- a/components/qr_code_generator/BUILD.gn
|
||||||
|
+++ b/components/qr_code_generator/BUILD.gn
|
||||||
|
@@ -38,24 +38,11 @@
|
||||||
|
"qr_code_generator.h",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
- ":qr_code_generator_ffi_glue",
|
||||||
|
"//base",
|
||||||
|
]
|
||||||
|
public_deps = [
|
||||||
|
":error",
|
||||||
|
"//base",
|
||||||
|
- ]
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-rust_static_library("qr_code_generator_ffi_glue") {
|
||||||
|
- allow_unsafe = true # Needed for FFI that underpins the `cxx` crate.
|
||||||
|
- crate_root = "qr_code_generator_ffi_glue.rs"
|
||||||
|
- sources = [ "qr_code_generator_ffi_glue.rs" ]
|
||||||
|
- cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ]
|
||||||
|
- visibility = [ ":qr_code_generator" ]
|
||||||
|
- deps = [
|
||||||
|
- ":error",
|
||||||
|
- "//third_party/rust/qr_code/v2:lib",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
--- a/components/qr_code_generator/qr_code_generator.cc
|
||||||
|
+++ b/components/qr_code_generator/qr_code_generator.cc
|
||||||
|
@@ -8,9 +8,7 @@
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "base/check_op.h"
|
||||||
|
-#include "base/containers/span_rust.h"
|
||||||
|
#include "base/numerics/safe_conversions.h"
|
||||||
|
-#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h"
|
||||||
|
|
||||||
|
namespace qr_code_generator {
|
||||||
|
|
||||||
|
@@ -22,27 +20,7 @@
|
||||||
|
base::expected<GeneratedCode, Error> GenerateCode(
|
||||||
|
base::span<const uint8_t> in,
|
||||||
|
std::optional<int> min_version) {
|
||||||
|
- rust::Slice<const uint8_t> rs_in = base::SpanToRustSlice(in);
|
||||||
|
-
|
||||||
|
- // `min_version` might come from a fuzzer and therefore we use a lenient
|
||||||
|
- // `saturated_cast` instead of a `checked_cast`.
|
||||||
|
- int16_t rs_min_version =
|
||||||
|
- base::saturated_cast<int16_t>(min_version.value_or(0));
|
||||||
|
-
|
||||||
|
- std::vector<uint8_t> result_pixels;
|
||||||
|
- size_t result_width = 0;
|
||||||
|
- Error result_error = Error::kUnknownError;
|
||||||
|
- bool result_is_success = generate_qr_code_using_rust(
|
||||||
|
- rs_in, rs_min_version, result_pixels, result_width, result_error);
|
||||||
|
-
|
||||||
|
- if (!result_is_success) {
|
||||||
|
- return base::unexpected(result_error);
|
||||||
|
- }
|
||||||
|
- GeneratedCode code;
|
||||||
|
- code.data = std::move(result_pixels);
|
||||||
|
- code.qr_size = base::checked_cast<int>(result_width);
|
||||||
|
- CHECK_EQ(code.data.size(), static_cast<size_t>(code.qr_size * code.qr_size));
|
||||||
|
- return code;
|
||||||
|
+ return base::unexpected(Error::kUnknownError);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace qr_code_generator
|
@@ -1,208 +0,0 @@
|
|||||||
diff '--color=auto' -urp src/build/linux/unbundle.orig/absl_flags.gn src/build/linux/unbundle/absl_flags.gn
|
|
||||||
--- src/build/linux/unbundle.orig/absl_flags.gn
|
|
||||||
+++ src/build/linux/unbundle/absl_flags.gn
|
|
||||||
@@ -5,14 +5,36 @@ pkg_config("system_absl_flags") {
|
|
||||||
packages = [ "absl_flags" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+pkg_config("absl_flags_config") {
|
|
||||||
+ packages = [ "absl_flags_config" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
pkg_config("system_absl_flags_parse") {
|
|
||||||
packages = [ "absl_flags_parse" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+pkg_config("system_absl_flags_reflection") {
|
|
||||||
+ packages = [ "absl_flags_reflection" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
pkg_config("system_absl_flags_usage") {
|
|
||||||
packages = [ "absl_flags_usage" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+shim_headers("flags_config_shim") {
|
|
||||||
+ root_path = "."
|
|
||||||
+ prefix = "absl/flags/"
|
|
||||||
+ headers = [
|
|
||||||
+ "config.h",
|
|
||||||
+ "usage_config.h",
|
|
||||||
+ ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("config") {
|
|
||||||
+ deps = [ ":flags_config_shim" ]
|
|
||||||
+ public_configs = [ ":absl_flags_config" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
shim_headers("flag_shim") {
|
|
||||||
root_path = "."
|
|
||||||
prefix = "absl/flags/"
|
|
||||||
@@ -38,6 +60,20 @@ source_set("parse") {
|
|
||||||
public_configs = [ ":system_absl_flags_parse" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+shim_headers("flags_reflection_shim") {
|
|
||||||
+ root_path = "."
|
|
||||||
+ prefix = "absl/flags/"
|
|
||||||
+ headers = [
|
|
||||||
+ "internal/registry.h",
|
|
||||||
+ "reflection.h",
|
|
||||||
+ ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("reflection") {
|
|
||||||
+ deps = [ ":flags_reflection_shim" ]
|
|
||||||
+ public_configs = [ ":system_absl_flags_reflection" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
shim_headers("usage_shim") {
|
|
||||||
root_path = "."
|
|
||||||
prefix = "absl/flags/"
|
|
||||||
diff '--color=auto' -urp src/build/linux/unbundle.orig/absl_log.gn src/build/linux/unbundle/absl_log.gn
|
|
||||||
--- src/build/linux/unbundle.orig/absl_log.gn
|
|
||||||
+++ src/build/linux/unbundle/absl_log.gn
|
|
||||||
@@ -13,9 +13,22 @@ pkg_config("system_absl_die_if_null") {
|
|
||||||
packages = [ "absl_die_if_null" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+pkg_config("system_absl_check") {
|
|
||||||
+ packages = [ "absl_check" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
pkg_config("system_absl_log") {
|
|
||||||
packages = [ "absl_log" ]
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+pkg_config("system_absl_log_globals") {
|
|
||||||
+ packages = [ "absl_log_globals" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+pkg_config("system_absl_log_initialize") {
|
|
||||||
+ packages = [ "absl_log_initialize" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
shim_headers("absl_check_shim") {
|
|
||||||
root_path = "."
|
|
||||||
prefix = "absl/log/"
|
|
||||||
@@ -49,6 +62,39 @@ source_set("die_if_null") {
|
|
||||||
public_configs = [ ":system_absl_die_if_null" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+shim_headers("check_shim") {
|
|
||||||
+ root_path = "."
|
|
||||||
+ prefix = "absl/log/"
|
|
||||||
+ headers = [ "check.h" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("check") {
|
|
||||||
+ deps = [ ":check_shim" ]
|
|
||||||
+ public_configs = [ ":system_absl_check" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+shim_headers("globals_shim") {
|
|
||||||
+ root_path = "."
|
|
||||||
+ prefix = "absl/log/"
|
|
||||||
+ headers = [ "globals.h" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("globals") {
|
|
||||||
+ deps = [ ":globals_shim" ]
|
|
||||||
+ public_configs = [ ":system_absl_log_globals" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+shim_headers("initialize_shim") {
|
|
||||||
+ root_path = "."
|
|
||||||
+ prefix = "absl/log/"
|
|
||||||
+ headers = [ "initialize.h" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("initialize") {
|
|
||||||
+ deps = [ ":initialize_shim" ]
|
|
||||||
+ public_configs = [ ":system_absl_log_initialize" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
shim_headers("log_shim") {
|
|
||||||
root_path = "."
|
|
||||||
prefix = "absl/log/"
|
|
||||||
diff '--color=auto' -urp src/build/linux/unbundle.orig/re2.gn src/build/linux/unbundle/re2.gn
|
|
||||||
--- src/build/linux/unbundle.orig/re2.gn
|
|
||||||
+++ src/build/linux/unbundle/re2.gn
|
|
||||||
@@ -3,6 +3,7 @@
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
import("//build/config/c++/c++.gni")
|
|
||||||
+import("//build/config/linux/pkg_config.gni")
|
|
||||||
import("//build/shim_headers.gni")
|
|
||||||
|
|
||||||
assert(!use_custom_libcxx,
|
|
||||||
@@ -10,6 +11,10 @@ assert(!use_custom_libcxx,
|
|
||||||
"use_custom_libcxx=true because the library's interface relies on " +
|
|
||||||
"libstdc++'s std::string and std::vector.")
|
|
||||||
|
|
||||||
+pkg_config("re2_config") {
|
|
||||||
+ packages = [ "re2" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
shim_headers("re2_shim") {
|
|
||||||
root_path = "src"
|
|
||||||
headers = [
|
|
||||||
@@ -23,5 +28,5 @@ shim_headers("re2_shim") {
|
|
||||||
|
|
||||||
source_set("re2") {
|
|
||||||
deps = [ ":re2_shim" ]
|
|
||||||
- libs = [ "re2" ]
|
|
||||||
+ public_configs = [ ":re2_config" ]
|
|
||||||
}
|
|
||||||
--- src/build/linux/unbundle/absl_container.gn.orig
|
|
||||||
+++ src/build/linux/unbundle/absl_container.gn
|
|
||||||
@@ -117,6 +117,8 @@ source_set("flat_hash_map_test") {
|
|
||||||
}
|
|
||||||
source_set("flat_hash_set_test") {
|
|
||||||
}
|
|
||||||
+source_set("hash_function_defaults_test") {
|
|
||||||
+}
|
|
||||||
source_set("inlined_vector_test") {
|
|
||||||
}
|
|
||||||
source_set("node_slot_policy_test") {
|
|
||||||
--- src/build/linux/unbundle/replace_gn_files.py.orig
|
|
||||||
+++ src/build/linux/unbundle/replace_gn_files.py
|
|
||||||
@@ -80,6 +80,7 @@ REPLACEMENTS = {
|
|
||||||
'vulkan_memory_allocator' : 'third_party/vulkan_memory_allocator/BUILD.gn',
|
|
||||||
'woff2': 'third_party/woff2/BUILD.gn',
|
|
||||||
'zlib': 'third_party/zlib/BUILD.gn',
|
|
||||||
+ 'zstd': 'third_party/zstd/BUILD.gn',
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
--- /dev/null
|
|
||||||
+++ src/build/linux/unbundle/zstd.gn
|
|
||||||
@@ -0,0 +1,28 @@
|
|
||||||
+import("//build/config/linux/pkg_config.gni")
|
|
||||||
+import("//build/shim_headers.gni")
|
|
||||||
+
|
|
||||||
+pkg_config("system_zstd") {
|
|
||||||
+ packages = [ "libzstd" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+shim_headers("zstd_shim") {
|
|
||||||
+ root_path = "src/lib"
|
|
||||||
+ headers = [
|
|
||||||
+ "zstd.h",
|
|
||||||
+ "zstd_errors.h",
|
|
||||||
+ ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("compress") {
|
|
||||||
+ deps = [ ":zstd_shim" ]
|
|
||||||
+ public_configs = [ ":system_zstd" ]
|
|
||||||
+}
|
|
||||||
+source_set("decompress") {
|
|
||||||
+ deps = [ ":zstd_shim" ]
|
|
||||||
+ public_configs = [ ":system_zstd" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("headers") {
|
|
||||||
+ deps = [ ":zstd_shim" ]
|
|
||||||
+ public_configs = [ ":system_zstd" ]
|
|
||||||
+}
|
|
9
chromium-125-cloud_authenticator.patch
Normal file
9
chromium-125-cloud_authenticator.patch
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
--- a/chrome/browser/webauthn/BUILD.gn
|
||||||
|
+++ b/chrome/browser/webauthn/BUILD.gn
|
||||||
|
@@ -26,6 +26,5 @@
|
||||||
|
"//url",
|
||||||
|
]
|
||||||
|
|
||||||
|
- data_deps = [ "//third_party/cloud_authenticator/test/local_service:cloud_authenticator_test_service" ]
|
||||||
|
}
|
||||||
|
}
|
12
chromium-127-cargo_crate.patch
Normal file
12
chromium-127-cargo_crate.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
--- a/build/rust/cargo_crate.gni
|
||||||
|
+++ b/build/rust/cargo_crate.gni
|
||||||
|
@@ -5,6 +5,8 @@
|
||||||
|
import("//build/rust/rust_executable.gni")
|
||||||
|
import("//build/rust/rust_macro.gni")
|
||||||
|
import("//build/rust/rust_static_library.gni")
|
||||||
|
+
|
||||||
|
+rust_sysroot=""
|
||||||
|
|
||||||
|
# This template allows for building Cargo crates within gn.
|
||||||
|
#
|
||||||
|
|
49
chromium-127-crabby.patch
Normal file
49
chromium-127-crabby.patch
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
--- a/third_party/blink/renderer/platform/image-decoders/BUILD.gn
|
||||||
|
+++ b/third_party/blink/renderer/platform/image-decoders/BUILD.gn
|
||||||
|
@@ -74,12 +74,9 @@
|
||||||
|
sources += [
|
||||||
|
"avif/avif_image_decoder.cc",
|
||||||
|
"avif/avif_image_decoder.h",
|
||||||
|
- "avif/crabbyavif_image_decoder.cc",
|
||||||
|
- "avif/crabbyavif_image_decoder.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
deps += [
|
||||||
|
- "//third_party/crabbyavif",
|
||||||
|
"//third_party/libavif",
|
||||||
|
"//third_party/libavifinfo",
|
||||||
|
]
|
||||||
|
--- a/third_party/blink/renderer/platform/image-decoders/image_decoder.cc
|
||||||
|
+++ b/third_party/blink/renderer/platform/image-decoders/image_decoder.cc
|
||||||
|
@@ -47,7 +47,6 @@
|
||||||
|
|
||||||
|
#if BUILDFLAG(ENABLE_AV1_DECODER)
|
||||||
|
#include "third_party/blink/renderer/platform/image-decoders/avif/avif_image_decoder.h"
|
||||||
|
-#include "third_party/blink/renderer/platform/image-decoders/avif/crabbyavif_image_decoder.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace blink {
|
||||||
|
@@ -192,9 +191,7 @@
|
||||||
|
return "image/bmp";
|
||||||
|
}
|
||||||
|
#if BUILDFLAG(ENABLE_AV1_DECODER)
|
||||||
|
- if (base::FeatureList::IsEnabled(blink::features::kCrabbyAvif)
|
||||||
|
- ? CrabbyAVIFImageDecoder::MatchesAVIFSignature(fast_reader)
|
||||||
|
- : AVIFImageDecoder::MatchesAVIFSignature(fast_reader)) {
|
||||||
|
+ if (AVIFImageDecoder::MatchesAVIFSignature(fast_reader)) {
|
||||||
|
return "image/avif";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@@ -300,11 +300,7 @@
|
||||||
|
max_decoded_bytes);
|
||||||
|
#if BUILDFLAG(ENABLE_AV1_DECODER)
|
||||||
|
} else if (mime_type == "image/avif") {
|
||||||
|
- if (base::FeatureList::IsEnabled(blink::features::kCrabbyAvif)) {
|
||||||
|
- decoder = std::make_unique<CrabbyAVIFImageDecoder>(
|
||||||
|
- alpha_option, high_bit_depth_decoding_option, color_behavior,
|
||||||
|
- max_decoded_bytes, animation_option);
|
||||||
|
- } else {
|
||||||
|
+ if (true) {
|
||||||
|
decoder = std::make_unique<AVIFImageDecoder>(
|
||||||
|
alpha_option, high_bit_depth_decoding_option, color_behavior,
|
||||||
|
max_decoded_bytes, animation_option);
|
@@ -0,0 +1,32 @@
|
|||||||
|
diff -up chromium-129.0.6668.42.old/media/filters/ffmpeg_glue.cc.me chromium-129.0.6668.42.old/media/filters/ffmpeg_glue.cc
|
||||||
|
--- chromium-129.0.6668.42.old/media/filters/ffmpeg_glue.cc.me 2024-09-15 22:12:33.945186323 +0200
|
||||||
|
+++ chromium-129.0.6668.42.old/media/filters/ffmpeg_glue.cc 2024-09-16 10:53:13.334970539 +0200
|
||||||
|
@@ -17,14 +17,11 @@
|
||||||
|
|
||||||
|
namespace media {
|
||||||
|
|
||||||
|
-// Kill switches in case things explode. Remove after M132.
|
||||||
|
+// Kill switch in case things explode. Remove after M132.
|
||||||
|
// TODO(crbug.com/355485812): Re-enable this flag.
|
||||||
|
BASE_FEATURE(kAllowOnlyAudioCodecsDuringDemuxing,
|
||||||
|
"AllowOnlyAudioCodecsDuringDemuxing",
|
||||||
|
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||||
|
-BASE_FEATURE(kForbidH264ParsingDuringDemuxing,
|
||||||
|
- "ForbidH264ParsingDuringDemuxing",
|
||||||
|
- base::FEATURE_ENABLED_BY_DEFAULT);
|
||||||
|
|
||||||
|
// Internal buffer size used by AVIO for reading.
|
||||||
|
// TODO(dalecurtis): Experiment with this buffer size and measure impact on
|
||||||
|
@@ -118,12 +115,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol
|
||||||
|
// Enable fast, but inaccurate seeks for MP3.
|
||||||
|
format_context_->flags |= AVFMT_FLAG_FAST_SEEK;
|
||||||
|
|
||||||
|
- // We don't allow H.264 parsing during demuxing since we have our own parser
|
||||||
|
- // and the ffmpeg one increases memory usage unnecessarily.
|
||||||
|
- if (base::FeatureList::IsEnabled(kForbidH264ParsingDuringDemuxing)) {
|
||||||
|
- format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
// Ensures format parsing errors will bail out. From an audit on 11/2017, all
|
||||||
|
// instances were real failures. Solves bugs like http://crbug.com/710791.
|
||||||
|
format_context_->error_recognition |= AV_EF_EXPLODE;
|
93
chromium-130-fontations.patch
Normal file
93
chromium-130-fontations.patch
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
--- a/skia/BUILD.gn
|
||||||
|
+++ b/skia/BUILD.gn
|
||||||
|
@@ -8,7 +8,6 @@
|
||||||
|
import("//build/config/freetype/freetype.gni")
|
||||||
|
import("//build/config/rust.gni")
|
||||||
|
import("//build/config/sanitizers/sanitizers.gni")
|
||||||
|
-import("//build/rust/rust_static_library.gni")
|
||||||
|
import("//gpu/vulkan/features.gni")
|
||||||
|
import("//testing/test.gni")
|
||||||
|
import("//third_party/skia/gn/shared_sources.gni")
|
||||||
|
@@ -47,27 +46,6 @@
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
-source_set("path_bridge") {
|
||||||
|
- sources = skia_fontations_path_bridge_sources
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-rust_static_library("bridge_rust_side") {
|
||||||
|
- allow_unsafe = true
|
||||||
|
- crate_root = skia_fontations_bridge_root
|
||||||
|
- sources = skia_fontations_bridge_sources
|
||||||
|
- cxx_bindings = skia_fontations_bridge_sources
|
||||||
|
- deps = [
|
||||||
|
- ":path_bridge",
|
||||||
|
- "//third_party/rust/font_types/v0_7:lib",
|
||||||
|
- "//third_party/rust/read_fonts/v0_22:lib",
|
||||||
|
- "//third_party/rust/skrifa/v0_22:lib",
|
||||||
|
- ]
|
||||||
|
- configs -= [ "//build/config/compiler:chromium_code" ]
|
||||||
|
- configs += [
|
||||||
|
- ":skia_config",
|
||||||
|
- "//build/config/compiler:no_chromium_code",
|
||||||
|
- ]
|
||||||
|
-}
|
||||||
|
|
||||||
|
# External-facing config for dependent code.
|
||||||
|
config("skia_config") {
|
||||||
|
@@ -394,15 +373,9 @@
|
||||||
|
# See SK_TYPEFACE_FACTORY_FREETYPE
|
||||||
|
sources += skia_ports_freetype_sources
|
||||||
|
sources += skia_ports_fontmgr_custom_sources
|
||||||
|
- sources += skia_ports_typeface_fontations_sources
|
||||||
|
sources += skia_ports_fontmgr_empty_sources
|
||||||
|
public += skia_ports_fontmgr_empty_public
|
||||||
|
|
||||||
|
- # Fontations Rust/C++ bridge interfaces.
|
||||||
|
- deps += [
|
||||||
|
- ":bridge_rust_side",
|
||||||
|
- ":path_bridge",
|
||||||
|
- ]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_win) {
|
||||||
|
--- a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc
|
||||||
|
+++ b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc
|
||||||
|
@@ -12,7 +12,6 @@
|
||||||
|
#include "third_party/blink/renderer/platform/fonts/opentype/font_format_check.h"
|
||||||
|
#include "third_party/skia/include/core/SkStream.h"
|
||||||
|
#include "third_party/skia/include/core/SkTypeface.h"
|
||||||
|
-#include "third_party/skia/include/ports/SkTypeface_fontations.h"
|
||||||
|
|
||||||
|
#if BUILDFLAG(IS_WIN)
|
||||||
|
#include "third_party/blink/renderer/platform/fonts/win/dwrite_font_format_support.h"
|
||||||
|
@@ -54,7 +53,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
sk_sp<SkTypeface> MakeTypefaceDefaultFontMgr(sk_sp<SkData> data) {
|
||||||
|
-#if !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE))
|
||||||
|
+#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE))
|
||||||
|
if (RuntimeEnabledFeatures::FontationsFontBackendEnabled()) {
|
||||||
|
std::unique_ptr<SkStreamAsset> stream(new SkMemoryStream(data));
|
||||||
|
return SkTypeface_Make_Fontations(std::move(stream), SkFontArguments());
|
||||||
|
@@ -82,10 +81,6 @@
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-sk_sp<SkTypeface> MakeTypefaceFontations(sk_sp<SkData> data) {
|
||||||
|
- std::unique_ptr<SkStreamAsset> stream(new SkMemoryStream(data));
|
||||||
|
- return SkTypeface_Make_Fontations(std::move(stream), SkFontArguments());
|
||||||
|
-}
|
||||||
|
|
||||||
|
sk_sp<SkTypeface> MakeVariationsTypeface(
|
||||||
|
sk_sp<SkData> data,
|
||||||
|
@@ -187,7 +182,6 @@
|
||||||
|
const FontFormatCheck format_check(data);
|
||||||
|
const FontInstantiator instantiator = {
|
||||||
|
MakeTypefaceDefaultFontMgr,
|
||||||
|
- MakeTypefaceFontations,
|
||||||
|
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE)
|
||||||
|
MakeTypefaceFallback,
|
||||||
|
#endif
|
||||||
|
|
@@ -18,11 +18,9 @@ Index: electron-17.1.0/chrome/browser/about_flags.cc
|
|||||||
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
|
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
|
||||||
flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop,
|
flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop,
|
||||||
FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)},
|
FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)},
|
||||||
Index: electron-17.1.0/chrome/browser/flag_descriptions.cc
|
--- src/chrome/browser/flag_descriptions.cc.orig 2024-12-08 18:34:53.268006605 +0100
|
||||||
===================================================================
|
+++ src/chrome/browser/flag_descriptions.cc 2025-01-01 20:24:47.007188847 +0100
|
||||||
--- electron-17.1.0.orig/chrome/browser/flag_descriptions.cc 2022-03-07 17:20:30.960813654 +0100
|
@@ -5838,12 +5838,24 @@ const char kUseAngleGL[] = "OpenGL";
|
||||||
+++ electron-17.1.0/chrome/browser/flag_descriptions.cc 2022-03-09 08:25:19.662417046 +0100
|
|
||||||
@@ -4031,12 +4031,24 @@ const char kUseAngleGL[] = "OpenGL";
|
|
||||||
|
|
||||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||||
|
|
||||||
@@ -44,14 +42,12 @@ Index: electron-17.1.0/chrome/browser/flag_descriptions.cc
|
|||||||
+
|
+
|
||||||
+#if BUILDFLAG(IS_CHROMEOS_ASH)
|
+#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||||
+
|
+
|
||||||
const char kAdaptiveChargingForTestingName[] =
|
const char kAccessibilityFilterKeysName[] = "Filter keys";
|
||||||
"Show adaptive charging notifications for testing";
|
const char kAccessibilityFilterKeysDescription[] =
|
||||||
const char kAdaptiveChargingForTestingDescription[] =
|
"Enables settings to filter key presses in various ways, such as slow keys "
|
||||||
Index: electron-17.1.0/chrome/browser/flag_descriptions.h
|
--- src/chrome/browser/flag_descriptions.h.orig 2024-12-08 18:34:53.268006605 +0100
|
||||||
===================================================================
|
+++ src/chrome/browser/flag_descriptions.h 2025-01-01 20:26:07.993071516 +0100
|
||||||
--- electron-17.1.0.orig/chrome/browser/flag_descriptions.h 2022-03-07 17:20:30.960813654 +0100
|
@@ -3375,9 +3375,21 @@ extern const char kUseAngleGL[];
|
||||||
+++ electron-17.1.0/chrome/browser/flag_descriptions.h 2022-03-09 08:25:19.666416981 +0100
|
|
||||||
@@ -2305,9 +2305,21 @@ extern const char kUseAngleGL[];
|
|
||||||
|
|
||||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||||
|
|
||||||
@@ -70,6 +66,6 @@ Index: electron-17.1.0/chrome/browser/flag_descriptions.h
|
|||||||
+
|
+
|
||||||
+// Chrome OS ------------------------------------------------------------------
|
+// Chrome OS ------------------------------------------------------------------
|
||||||
+
|
+
|
||||||
extern const char kAdaptiveChargingName[];
|
extern const char kAccessibilityFilterKeysName[];
|
||||||
extern const char kAdaptiveChargingDescription[];
|
extern const char kAccessibilityFilterKeysDescription[];
|
||||||
|
|
||||||
|
@@ -1,44 +0,0 @@
|
|||||||
From ef8e6beaebcfc3e143b249ba76c177fbabd3b4ea Mon Sep 17 00:00:00 2001
|
|
||||||
From: Yichen <yichenz@chromium.org>
|
|
||||||
Date: Thu, 23 May 2024 23:44:41 +0000
|
|
||||||
Subject: [PATCH] ui: fix gcc/libstdc++ build break
|
|
||||||
|
|
||||||
Bug: 340815321
|
|
||||||
Change-Id: Ibf443f9f16dfff164e1f4d49a58582fb7a6aca1d
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5565320
|
|
||||||
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
|
|
||||||
Commit-Queue: Yichen Zhou <yichenz@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1305426}
|
|
||||||
---
|
|
||||||
ui/color/color_provider.cc | 3 ++-
|
|
||||||
ui/color/color_provider.h | 3 +--
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/ui/color/color_provider.cc b/ui/color/color_provider.cc
|
|
||||||
index 1597715de1f63c..3e0ffed9f4d4c4 100644
|
|
||||||
--- a/ui/color/color_provider.cc
|
|
||||||
+++ b/ui/color/color_provider.cc
|
|
||||||
@@ -118,7 +118,8 @@ class ColorProvider::ColorProviderInternal {
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// ColorProvider:
|
|
||||||
|
|
||||||
-ColorProvider::ColorProvider() = default;
|
|
||||||
+ColorProvider::ColorProvider()
|
|
||||||
+ : internal_(std::make_unique<ColorProviderInternal>()) {}
|
|
||||||
|
|
||||||
ColorProvider::ColorProvider(ColorProvider&&) = default;
|
|
||||||
|
|
||||||
diff --git a/ui/color/color_provider.h b/ui/color/color_provider.h
|
|
||||||
index 50fff33ae6ab6d..6ac6ed6938cf24 100644
|
|
||||||
--- a/ui/color/color_provider.h
|
|
||||||
+++ b/ui/color/color_provider.h
|
|
||||||
@@ -65,8 +65,7 @@ class COMPONENT_EXPORT(COLOR) ColorProvider {
|
|
||||||
// bind to it.
|
|
||||||
class ColorProviderInternal;
|
|
||||||
|
|
||||||
- std::unique_ptr<ColorProviderInternal> internal_ =
|
|
||||||
- std::make_unique<ColorProviderInternal>();
|
|
||||||
+ std::unique_ptr<ColorProviderInternal> internal_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace ui
|
|
@@ -1,6 +1,6 @@
|
|||||||
--- src/third_party/electron_node/common.gypi.orig 2024-05-09 09:30:23.202414200 +0000
|
--- src/third_party/electron_node/common.gypi.orig 2024-12-08 18:45:44.261359453 +0100
|
||||||
+++ src/third_party/electron_node/common.gypi 2024-05-10 17:53:01.801592000 +0000
|
+++ src/third_party/electron_node/common.gypi 2024-12-18 11:12:53.414653184 +0100
|
||||||
@@ -428,10 +428,15 @@
|
@@ -487,10 +487,15 @@
|
||||||
'ldflags': [ '-pthread' ],
|
'ldflags': [ '-pthread' ],
|
||||||
}],
|
}],
|
||||||
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
|
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
|
||||||
@@ -11,14 +11,14 @@
|
|||||||
+ # `-fvisibility=hidden` is something we're adding to fix downstream overzealous exports.
|
+ # `-fvisibility=hidden` is something we're adding to fix downstream overzealous exports.
|
||||||
+ # The electron headers annotate their visibility correctly, but many third-party code does not which leads to bloated builds.
|
+ # The electron headers annotate their visibility correctly, but many third-party code does not which leads to bloated builds.
|
||||||
+ 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-fpic', '-fno-semantic-interposition', '-fvisibility=hidden' ],
|
+ 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-fpic', '-fno-semantic-interposition', '-fvisibility=hidden' ],
|
||||||
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
|
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++20' ],
|
||||||
'defines': [ '__STDC_FORMAT_MACROS' ],
|
'defines': [ '__STDC_FORMAT_MACROS' ],
|
||||||
- 'ldflags': [ '-rdynamic' ],
|
- 'ldflags': [ '-rdynamic' ],
|
||||||
+ #'ldflags': [ '-rdynamic' ], this is totally bogus — we are building a plugin, not a plugin host
|
+ #'ldflags': [ '-rdynamic' ], this is totally bogus — we are building a plugin, not a plugin host
|
||||||
'target_conditions': [
|
'target_conditions': [
|
||||||
# The 1990s toolchain on SmartOS can't handle thin archives.
|
# The 1990s toolchain on SmartOS can't handle thin archives.
|
||||||
['_type=="static_library" and OS=="solaris"', {
|
['_type=="static_library" and OS=="solaris"', {
|
||||||
@@ -608,29 +613,7 @@
|
@@ -670,29 +675,7 @@
|
||||||
'-Wl,--export-dynamic',
|
'-Wl,--export-dynamic',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
49
cr130-abseil-remove-unused-deps.patch
Normal file
49
cr130-abseil-remove-unused-deps.patch
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
--- src/third_party/abseil-cpp/BUILD.gn.orig 2024-12-08 18:35:00.641340155 +0100
|
||||||
|
+++ src/third_party/abseil-cpp/BUILD.gn 2025-01-01 21:58:32.559624434 +0100
|
||||||
|
@@ -84,13 +83,9 @@ group("absl_component_deps") {
|
||||||
|
"//third_party/abseil-cpp/absl/hash",
|
||||||
|
"//third_party/abseil-cpp/absl/log:absl_check",
|
||||||
|
"//third_party/abseil-cpp/absl/log:absl_log",
|
||||||
|
- "//third_party/abseil-cpp/absl/log:absl_vlog_is_on",
|
||||||
|
"//third_party/abseil-cpp/absl/log:die_if_null",
|
||||||
|
"//third_party/abseil-cpp/absl/log:globals",
|
||||||
|
"//third_party/abseil-cpp/absl/log:initialize",
|
||||||
|
- "//third_party/abseil-cpp/absl/log:log_entry",
|
||||||
|
- "//third_party/abseil-cpp/absl/log:log_sink",
|
||||||
|
- "//third_party/abseil-cpp/absl/log:log_sink_registry",
|
||||||
|
"//third_party/abseil-cpp/absl/memory",
|
||||||
|
"//third_party/abseil-cpp/absl/meta:type_traits",
|
||||||
|
"//third_party/abseil-cpp/absl/numeric:bits",
|
||||||
|
@@ -305,8 +288,6 @@ if (absl_build_tests) {
|
||||||
|
"absl/container:flat_hash_set_test",
|
||||||
|
"absl/container:hash_function_defaults_test",
|
||||||
|
"absl/container:inlined_vector_test",
|
||||||
|
- "absl/container:node_hash_map_test",
|
||||||
|
- "absl/container:node_hash_set_test",
|
||||||
|
"absl/container:node_slot_policy_test",
|
||||||
|
"absl/container:raw_hash_set_allocator_test",
|
||||||
|
"absl/container:raw_hash_set_test",
|
||||||
|
@@ -315,11 +296,8 @@ if (absl_build_tests) {
|
||||||
|
"absl/crc:crc_cord_state_test",
|
||||||
|
"absl/crc:crc_memcpy_test",
|
||||||
|
"absl/crc:non_temporal_memcpy_test",
|
||||||
|
- "absl/debugging:bounded_utf8_length_sequence_test",
|
||||||
|
- "absl/debugging:decode_rust_punycode_test",
|
||||||
|
"absl/debugging:demangle_rust_test",
|
||||||
|
"absl/debugging:stacktrace_test",
|
||||||
|
- "absl/debugging:utf8_for_code_point_test",
|
||||||
|
"absl/flags:flag_test",
|
||||||
|
"absl/functional:any_invocable_test",
|
||||||
|
"absl/functional:function_ref_test",
|
||||||
|
@@ -382,11 +360,7 @@ if (absl_build_tests) {
|
||||||
|
"absl/strings:str_format_test",
|
||||||
|
"absl/strings:str_replace_test",
|
||||||
|
"absl/strings:string_view_test",
|
||||||
|
- "absl/synchronization:barrier_test",
|
||||||
|
- "absl/synchronization:graphcycles_test",
|
||||||
|
"absl/synchronization:kernel_timeout_internal_test",
|
||||||
|
- "absl/synchronization:mutex_test",
|
||||||
|
- "absl/synchronization:per_thread_sem_test",
|
||||||
|
"absl/synchronization:waiter_test",
|
||||||
|
"absl/time:time_test",
|
||||||
|
"absl/types:optional_test",
|
99
cr130-absl-base.patch
Normal file
99
cr130-absl-base.patch
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
--- src/build/linux/unbundle/absl_base.gn.orig 2025-01-02 10:33:14.819582911 +0100
|
||||||
|
+++ src/build/linux/unbundle/absl_base.gn 2025-01-02 12:14:46.875133605 +0100
|
||||||
|
@@ -13,6 +13,14 @@ pkg_config("system_absl_core_headers") {
|
||||||
|
packages = [ "absl_core_headers" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
+pkg_config("system_absl_dynamic_annotations") {
|
||||||
|
+ packages = [ "absl_dynamic_annotations" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+pkg_config("system_absl_log_severity") {
|
||||||
|
+ packages = [ "absl_log_severity" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
pkg_config("system_absl_nullability") {
|
||||||
|
packages = [ "absl_nullability" ]
|
||||||
|
}
|
||||||
|
@@ -21,13 +29,16 @@ pkg_config("system_absl_prefetch") {
|
||||||
|
packages = [ "absl_prefetch" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
+pkg_config("system_absl_raw_logging_internal") {
|
||||||
|
+ packages = [ "absl_raw_logging_internal" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
shim_headers("base_shim") {
|
||||||
|
root_path = "."
|
||||||
|
prefix = "absl/base/"
|
||||||
|
headers = [
|
||||||
|
"call_once.h",
|
||||||
|
"casts.h",
|
||||||
|
- "dynamic_annotations.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -69,6 +80,28 @@ source_set("core_headers") {
|
||||||
|
public_configs = [ ":system_absl_core_headers" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
+shim_headers("dynamic_annotations_shim") {
|
||||||
|
+ root_path = "."
|
||||||
|
+ prefix = "absl/base/"
|
||||||
|
+ headers = [ "dynamic_annotations.h" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+source_set("dynamic_annotations") {
|
||||||
|
+ deps = [ ":dynamic_annotations_shim" ]
|
||||||
|
+ public_configs = [ ":system_absl_dynamic_annotations" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+shim_headers("log_severity_shim") {
|
||||||
|
+ root_path = "."
|
||||||
|
+ prefix = "absl/base/"
|
||||||
|
+ headers = [ "log_severity.h" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+source_set("log_severity") {
|
||||||
|
+ deps = [ ":log_severity_shim" ]
|
||||||
|
+ public_configs = [ ":system_absl_log_severity" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
shim_headers("nullability_shim") {
|
||||||
|
root_path = "."
|
||||||
|
prefix = "absl/base/"
|
||||||
|
@@ -91,6 +124,17 @@ source_set("prefetch") {
|
||||||
|
public_configs = [ ":system_absl_prefetch" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
+shim_headers("raw_logging_internal_shim") {
|
||||||
|
+ root_path = "."
|
||||||
|
+ prefix = "absl/base/"
|
||||||
|
+ headers = [ "internal/raw_logging.h" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+source_set("raw_logging_internal") {
|
||||||
|
+ deps = [ ":raw_logging_internal_shim" ]
|
||||||
|
+ public_configs = [ ":system_absl_raw_logging_internal" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
source_set("no_destructor") {
|
||||||
|
# Dummy — unavailable with abseil 202308 and chromium 122 does not use it
|
||||||
|
}
|
||||||
|
@@ -99,7 +143,15 @@ source_set("config_test") {
|
||||||
|
}
|
||||||
|
source_set("no_destructor_test") {
|
||||||
|
}
|
||||||
|
+source_set("nullability_default_nonnull_test") {
|
||||||
|
+}
|
||||||
|
source_set("nullability_test") {
|
||||||
|
}
|
||||||
|
+source_set("poison_test") {
|
||||||
|
+}
|
||||||
|
source_set("prefetch_test") {
|
||||||
|
}
|
||||||
|
+source_set("tracing_internal_strong_test") {
|
||||||
|
+}
|
||||||
|
+source_set("tracing_internal_weak_test") {
|
||||||
|
+}
|
||||||
|
\ Brak znaku nowej linii na końcu pliku
|
@@ -1,21 +0,0 @@
|
|||||||
--- a/components/crash/core/app/crashpad.cc
|
|
||||||
+++ b/components/crash/core/app/crashpad.cc
|
|
||||||
@@ -28,7 +28,7 @@
|
|
||||||
#include "build/chromeos_buildflags.h"
|
|
||||||
#include "components/crash/core/app/crash_reporter_client.h"
|
|
||||||
#include "components/crash/core/common/crash_key.h"
|
|
||||||
-#include "third_party/abseil-cpp/absl/base/internal/raw_logging.h"
|
|
||||||
+#include <absl/base/internal/raw_logging.h>
|
|
||||||
#include "third_party/crashpad/crashpad/client/annotation.h"
|
|
||||||
#include "third_party/crashpad/crashpad/client/annotation_list.h"
|
|
||||||
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
|
|
||||||
@@ -49,6 +49,9 @@
|
|
||||||
#include "components/crash/core/app/crash_export_thunks.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if ABSL_LTS_RELEASE_VERSION < 20230000
|
|
||||||
+#define raw_log_internal raw_logging_internal
|
|
||||||
+#endif
|
|
||||||
namespace crash_reporter {
|
|
||||||
|
|
||||||
#if BUILDFLAG(IS_IOS)
|
|
@@ -139,12 +139,20 @@ python3 src/tools/download_optimization_profile.py \
|
|||||||
# Needed to get typescript compiler
|
# Needed to get typescript compiler
|
||||||
echo ">>>>>> Download and unpack webui-node-modules tarball for third_party/node"
|
echo ">>>>>> Download and unpack webui-node-modules tarball for third_party/node"
|
||||||
python3 src/third_party/depot_tools/download_from_google_storage.py \
|
python3 src/third_party/depot_tools/download_from_google_storage.py \
|
||||||
--no_resume --extract --no_auth --bucket chromium-nodejs \
|
--no_resume --no_auth --bucket chromium-nodejs \
|
||||||
-s src/third_party/node/node_modules.tar.gz.sha1
|
-s src/third_party/node/node_modules.tar.gz.sha1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: download_from_google_storage failed"
|
echo "ERROR: download_from_google_storage failed"
|
||||||
cleanup_and_exit 1
|
cleanup_and_exit 1
|
||||||
fi
|
fi
|
||||||
|
mkdir -pv src/third_party/node/node_modules
|
||||||
|
pushd src/third_party/node/node_modules
|
||||||
|
tar -xvvf ../node_modules.tar.gz
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERROR: tar extract failed"
|
||||||
|
cleanup_and_exit 1
|
||||||
|
fi
|
||||||
|
popd
|
||||||
# we don't need the orig tarball
|
# we don't need the orig tarball
|
||||||
rm -v src/third_party/node/node_modules.tar.gz
|
rm -v src/third_party/node/node_modules.tar.gz
|
||||||
|
|
||||||
@@ -169,7 +177,6 @@ keeplibs=(
|
|||||||
base/third_party/icu #Derived code, not vendored dependency.
|
base/third_party/icu #Derived code, not vendored dependency.
|
||||||
base/third_party/superfasthash #Not a shared library.
|
base/third_party/superfasthash #Not a shared library.
|
||||||
base/third_party/symbolize #Derived code, not vendored dependency.
|
base/third_party/symbolize #Derived code, not vendored dependency.
|
||||||
base/third_party/valgrind #Copy of a private header.
|
|
||||||
base/third_party/xdg_user_dirs #Derived code, not vendored dependency.
|
base/third_party/xdg_user_dirs #Derived code, not vendored dependency.
|
||||||
chrome/third_party/mozilla_security_manager #Derived code, not vendored dependency.
|
chrome/third_party/mozilla_security_manager #Derived code, not vendored dependency.
|
||||||
net/third_party/mozilla_security_manager #Derived code, not vendored dependency.
|
net/third_party/mozilla_security_manager #Derived code, not vendored dependency.
|
||||||
@@ -179,7 +186,6 @@ keeplibs=(
|
|||||||
third_party/abseil-cpp #Leap and fc36 too old.
|
third_party/abseil-cpp #Leap and fc36 too old.
|
||||||
third_party/angle # ANGLE is an integral part of chrome and is not available as a shared library.
|
third_party/angle # ANGLE is an integral part of chrome and is not available as a shared library.
|
||||||
third_party/angle/src/third_party/ceval #not in any distro
|
third_party/angle/src/third_party/ceval #not in any distro
|
||||||
third_party/angle/src/third_party/volk #replacement vulkan loader. Drop it when Leap has new enough libvulkan
|
|
||||||
third_party/blink #Integral part of chrome
|
third_party/blink #Integral part of chrome
|
||||||
third_party/boringssl #Factory has an ancient version, but upstream seems to have gave up on making it a shared library
|
third_party/boringssl #Factory has an ancient version, but upstream seems to have gave up on making it a shared library
|
||||||
third_party/boringssl/src/third_party/fiat #Not in any distro
|
third_party/boringssl/src/third_party/fiat #Not in any distro
|
||||||
@@ -212,14 +218,15 @@ keeplibs=(
|
|||||||
third_party/devtools-frontend #Javascript code, integral part of chrome
|
third_party/devtools-frontend #Javascript code, integral part of chrome
|
||||||
third_party/devtools-frontend/src/front_end/third_party #various javascript code compiled into chrome, see README.md
|
third_party/devtools-frontend/src/front_end/third_party #various javascript code compiled into chrome, see README.md
|
||||||
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
|
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
|
||||||
|
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
|
||||||
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
|
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
|
||||||
third_party/devtools-frontend/src/third_party/i18n #javascript
|
third_party/devtools-frontend/src/third_party/i18n #javascript
|
||||||
third_party/devtools-frontend/src/third_party/typescript #Chromium added code
|
|
||||||
third_party/distributed_point_functions #not in any distro
|
third_party/distributed_point_functions #not in any distro
|
||||||
third_party/dom_distiller_js #javascript
|
third_party/dom_distiller_js #javascript
|
||||||
#third_party/eigen3 #Used only by tflite which is not used in electron
|
#third_party/eigen3 #Used only by tflite which is not used in electron
|
||||||
third_party/electron_node #Integral part of electron
|
third_party/electron_node #Integral part of electron
|
||||||
third_party/emoji-segmenter #not available as a shared library
|
third_party/emoji-segmenter #not available as a shared library
|
||||||
|
third_party/fast_float #Header-only library thus we're not debundling it rn.
|
||||||
third_party/fdlibm #derived code, not vendored dep
|
third_party/fdlibm #derived code, not vendored dep
|
||||||
third_party/fp16 #Fedora 41 has it (but an old version?) Not in openSUSE. Header-only library thus we're not debundling it rn.
|
third_party/fp16 #Fedora 41 has it (but an old version?) Not in openSUSE. Header-only library thus we're not debundling it rn.
|
||||||
third_party/hunspell #heavily forked version
|
third_party/hunspell #heavily forked version
|
||||||
@@ -228,16 +235,10 @@ keeplibs=(
|
|||||||
third_party/jstemplate #javascript
|
third_party/jstemplate #javascript
|
||||||
third_party/khronos #Modified to add ANGLE definitions
|
third_party/khronos #Modified to add ANGLE definitions
|
||||||
third_party/leveldatabase #use of private headers
|
third_party/leveldatabase #use of private headers
|
||||||
third_party/libaom #15.5 is too old
|
|
||||||
third_party/libaom/source/libaom/third_party/fastfeat
|
|
||||||
third_party/libaom/source/libaom/third_party/SVT-AV1
|
|
||||||
third_party/libaom/source/libaom/third_party/vector
|
|
||||||
third_party/libaom/source/libaom/third_party/x86inc
|
|
||||||
third_party/libavif #bleeding-edge nightly. try unbundling again when 1.1 gets released
|
third_party/libavif #bleeding-edge nightly. try unbundling again when 1.1 gets released
|
||||||
third_party/libgav1 #Usage of private headers (ObuFrameHeader from utils/types.h)
|
third_party/libgav1 #Usage of private headers (ObuFrameHeader from utils/types.h)
|
||||||
third_party/libsrtp #Needs to be built against boringssl, not openssl
|
third_party/libsrtp #Needs to be built against boringssl, not openssl
|
||||||
third_party/libsync #not yet in any distro
|
third_party/libsync #not yet in any distro
|
||||||
third_party/libudev #Headers for a optional delay-loaded dependency
|
|
||||||
third_party/liburlpattern #Derived code, not vendored dep.
|
third_party/liburlpattern #Derived code, not vendored dep.
|
||||||
third_party/libva_protected_content #ChromeOS header not available separately. needed for build.
|
third_party/libva_protected_content #ChromeOS header not available separately. needed for build.
|
||||||
third_party/libvpx #15.5/FC37 too old
|
third_party/libvpx #15.5/FC37 too old
|
||||||
@@ -268,27 +269,26 @@ keeplibs=(
|
|||||||
#third_party/pdfium/third_party/skia_shared #Skia is not available as a shared library yet.
|
#third_party/pdfium/third_party/skia_shared #Skia is not available as a shared library yet.
|
||||||
third_party/perfetto #Seems not to be available as a shared library, despite the presence of a `debian` directory.
|
third_party/perfetto #Seems not to be available as a shared library, despite the presence of a `debian` directory.
|
||||||
third_party/perfetto/protos/third_party/chromium #derived code, not vendored dep
|
third_party/perfetto/protos/third_party/chromium #derived code, not vendored dep
|
||||||
|
third_party/perfetto/protos/third_party/simpleperf #not available in any distro
|
||||||
third_party/pffft #not in any distro, also heavily patched
|
third_party/pffft #not in any distro, also heavily patched
|
||||||
third_party/polymer #javascript
|
third_party/polymer #javascript
|
||||||
third_party/protobuf #Heavily forked. Apparently was officially unbundlable back in the GYP days, and may be again in the future.
|
third_party/protobuf #Heavily forked. Apparently was officially unbundlable back in the GYP days, and may be again in the future.
|
||||||
|
third_party/rapidhash #Fork
|
||||||
third_party/re2 # fedora too old
|
third_party/re2 # fedora too old
|
||||||
third_party/rnnoise #use of private headers
|
third_party/rnnoise #use of private headers
|
||||||
third_party/skia #integral part of chrome
|
third_party/skia #integral part of chrome
|
||||||
third_party/speech-dispatcher #Headers for a delay-loaded optional dependency
|
third_party/speech-dispatcher #Headers for a delay-loaded optional dependency
|
||||||
|
third_party/spirv-headers
|
||||||
third_party/sqlite #heavily forked version
|
third_party/sqlite #heavily forked version
|
||||||
third_party/swiftshader #not available as a shared library
|
third_party/swiftshader #not available as a shared library
|
||||||
third_party/swiftshader/third_party/astc-encoder #not in rawhide or factory. Debian has it (astc-encoder)
|
third_party/swiftshader/third_party/astc-encoder #not in rawhide or factory. Debian has it (astc-encoder)
|
||||||
third_party/swiftshader/third_party/llvm-subzero #heavily forked version of libLLVM for use in subzero
|
third_party/swiftshader/third_party/llvm-subzero #heavily forked version of libLLVM for use in subzero
|
||||||
third_party/swiftshader/third_party/marl #not on any distro
|
third_party/swiftshader/third_party/marl #not on any distro
|
||||||
third_party/swiftshader/third_party/SPIRV-Headers #Leap too old
|
|
||||||
third_party/swiftshader/third_party/SPIRV-Tools #Leap too old
|
|
||||||
third_party/swiftshader/third_party/subzero #integral part of swiftshader
|
third_party/swiftshader/third_party/subzero #integral part of swiftshader
|
||||||
#third_party/tflite #Not used by electron, but chrome needs it.
|
#third_party/tflite #Not used by electron, but chrome needs it.
|
||||||
#third_party/tflite/src/third_party/eigen3
|
#third_party/tflite/src/third_party/eigen3
|
||||||
#third_party/tflite/src/third_party/fft2d
|
#third_party/tflite/src/third_party/fft2d
|
||||||
third_party/vulkan-deps/spirv-headers #15.5 too old
|
third_party/vulkan-headers #15.6 too old
|
||||||
third_party/vulkan-deps/spirv-tools #15.5 too old
|
|
||||||
third_party/vulkan-deps/vulkan-headers #15.5 too old. CONSIDER UNBUNDLING when all distros have new enough vulkan sdk
|
|
||||||
third_party/vulkan_memory_allocator #not in Factory
|
third_party/vulkan_memory_allocator #not in Factory
|
||||||
third_party/webgpu-cts #Javascript code. Needed even if you're building chrome without webgpu
|
third_party/webgpu-cts #Javascript code. Needed even if you're building chrome without webgpu
|
||||||
third_party/webrtc #Integral part of chrome
|
third_party/webrtc #Integral part of chrome
|
||||||
|
32
css_attr_value_tainting-missing-once_flag.patch
Normal file
32
css_attr_value_tainting-missing-once_flag.patch
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
From c502d310d8cb91f1c1098a7287e75114023e57f0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||||
|
Date: Thu, 19 Sep 2024 10:55:23 +0000
|
||||||
|
Subject: [PATCH] IWYU: missing include for usage of std::once_flag in
|
||||||
|
css_attr_value_tainting.cc
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Bug: 41455655
|
||||||
|
Change-Id: I8a8d486c1ee3b2a162accb41faaadaaa0664595f
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5872634
|
||||||
|
Reviewed-by: Steinar H Gunderson <sesse@chromium.org>
|
||||||
|
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1357539}
|
||||||
|
---
|
||||||
|
third_party/blink/renderer/core/css/css_attr_value_tainting.cc | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/third_party/blink/renderer/core/css/css_attr_value_tainting.cc b/third_party/blink/renderer/core/css/css_attr_value_tainting.cc
|
||||||
|
index 42525e92307f8b..a44ffc15be2335 100644
|
||||||
|
--- a/third_party/blink/renderer/core/css/css_attr_value_tainting.cc
|
||||||
|
+++ b/third_party/blink/renderer/core/css/css_attr_value_tainting.cc
|
||||||
|
@@ -4,6 +4,8 @@
|
||||||
|
|
||||||
|
#include "third_party/blink/renderer/core/css/css_attr_value_tainting.h"
|
||||||
|
|
||||||
|
+#include <mutex>
|
||||||
|
+
|
||||||
|
#include "base/containers/span.h"
|
||||||
|
#include "base/unguessable_token.h"
|
||||||
|
#include "third_party/blink/renderer/core/css/parser/css_parser_token_stream.h"
|
176
delete-old-language-detection-which-uses-tflite.patch
Normal file
176
delete-old-language-detection-which-uses-tflite.patch
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
From 12e89eee78a2dea41591fedc7937ca83e68c9168 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fergal Daly <fergal@chromium.org>
|
||||||
|
Date: Tue, 17 Dec 2024 22:06:08 -0800
|
||||||
|
Subject: [PATCH] Delete the old language detection API.
|
||||||
|
|
||||||
|
Bug: 349927087
|
||||||
|
Change-Id: I41458da3cf03e78ec9c25fe3fddea343c3e982d6
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054825
|
||||||
|
Reviewed-by: Jiacheng Guo <gjc@google.com>
|
||||||
|
Commit-Queue: Fergal Daly <fergal@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1397739}
|
||||||
|
---
|
||||||
|
.../bindings/generated_in_modules.gni | 2 -
|
||||||
|
.../renderer/bindings/idl_in_modules.gni | 1 -
|
||||||
|
.../ai_language_detector.idl | 5 ++
|
||||||
|
.../modules/on_device_translation/BUILD.gn | 2 -
|
||||||
|
.../language_detector.cc | 52 ----------------
|
||||||
|
.../on_device_translation/language_detector.h | 41 -------------
|
||||||
|
.../language_detector.idl | 23 --------
|
||||||
|
.../on_device_translation/translation.cc | 59 -------------------
|
||||||
|
.../on_device_translation/translation.h | 7 ---
|
||||||
|
.../on_device_translation/translation.idl | 16 -----
|
||||||
|
.../canDetect.tentative.window.js | 9 ---
|
||||||
|
.../detect-en.tentative.window.js | 14 -----
|
||||||
|
12 files changed, 5 insertions(+), 226 deletions(-)
|
||||||
|
delete mode 100644 third_party/blink/renderer/modules/on_device_translation/language_detector.cc
|
||||||
|
delete mode 100644 third_party/blink/renderer/modules/on_device_translation/language_detector.h
|
||||||
|
delete mode 100644 third_party/blink/renderer/modules/on_device_translation/language_detector.idl
|
||||||
|
delete mode 100644 third_party/blink/web_tests/external/wpt/ai/language_detection/canDetect.tentative.window.js
|
||||||
|
delete mode 100644 third_party/blink/web_tests/external/wpt/ai/language_detection/detect-en.tentative.window.js
|
||||||
|
|
||||||
|
diff --git a/third_party/blink/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni
|
||||||
|
index 05b8fe33432374..0fa149cc2101ac 100644
|
||||||
|
--- a/third_party/blink/renderer/bindings/generated_in_modules.gni
|
||||||
|
+++ b/third_party/blink/renderer/bindings/generated_in_modules.gni
|
||||||
|
@@ -2827,8 +2825,6 @@ generated_interface_sources_in_modules = [
|
||||||
|
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_track_default_list.cc",
|
||||||
|
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_track_default_list.h",
|
||||||
|
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translation.cc",
|
||||||
|
- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector.cc",
|
||||||
|
- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector.h",
|
||||||
|
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translation.h",
|
||||||
|
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_url.cc",
|
||||||
|
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_url.h",
|
||||||
|
diff --git a/third_party/blink/renderer/modules/on_device_translation/BUILD.gn b/third_party/blink/renderer/modules/on_device_translation/BUILD.gn
|
||||||
|
index 21470f0869cfda..21772fce07cc5e 100644
|
||||||
|
--- a/third_party/blink/renderer/modules/on_device_translation/BUILD.gn
|
||||||
|
+++ b/third_party/blink/renderer/modules/on_device_translation/BUILD.gn
|
||||||
|
@@ -8,8 +8,6 @@ blink_modules_sources("on_device_translation") {
|
||||||
|
sources = [
|
||||||
|
"dom_translation.cc",
|
||||||
|
"dom_translation.h",
|
||||||
|
- "language_detector.cc",
|
||||||
|
- "language_detector.h",
|
||||||
|
"language_translator.cc",
|
||||||
|
"language_translator.h",
|
||||||
|
"translation.cc",
|
||||||
|
diff --git a/third_party/blink/renderer/modules/on_device_translation/translation.h b/third_party/blink/renderer/modules/on_device_translation/translation.h
|
||||||
|
index 0a0f54be56787a..e19db842628997 100644
|
||||||
|
--- a/third_party/blink/renderer/modules/on_device_translation/translation.h
|
||||||
|
+++ b/third_party/blink/renderer/modules/on_device_translation/translation.h
|
||||||
|
@@ -18,7 +18,6 @@
|
||||||
|
#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"
|
||||||
|
|
||||||
|
namespace blink {
|
||||||
|
-class LanguageDetector;
|
||||||
|
class LanguageTranslator;
|
||||||
|
class V8TranslationAvailability;
|
||||||
|
|
||||||
|
@@ -43,12 +42,6 @@ class Translation final : public ScriptWrappable,
|
||||||
|
ScriptState* script_state,
|
||||||
|
TranslationLanguageOptions* options,
|
||||||
|
ExceptionState& exception_state);
|
||||||
|
- ScriptPromise<V8TranslationAvailability> canDetect(
|
||||||
|
- ScriptState* script_state,
|
||||||
|
- ExceptionState& exception_state);
|
||||||
|
- ScriptPromise<LanguageDetector> createDetector(
|
||||||
|
- ScriptState* script_state,
|
||||||
|
- ExceptionState& exception_state);
|
||||||
|
|
||||||
|
private:
|
||||||
|
HeapMojoRemote<mojom::blink::TranslationManager>&
|
||||||
|
diff --git a/third_party/blink/renderer/modules/on_device_translation/translation.idl b/third_party/blink/renderer/modules/on_device_translation/translation.idl
|
||||||
|
index a27472ece123df..b9c74c41d4c406 100644
|
||||||
|
--- a/third_party/blink/renderer/modules/on_device_translation/translation.idl
|
||||||
|
+++ b/third_party/blink/renderer/modules/on_device_translation/translation.idl
|
||||||
|
@@ -31,20 +31,4 @@ interface Translation {
|
||||||
|
Promise<LanguageTranslator> createTranslator(
|
||||||
|
TranslationLanguageOptions options
|
||||||
|
);
|
||||||
|
- [
|
||||||
|
- RuntimeEnabled=LanguageDetectionAPI,
|
||||||
|
- Exposed=Window,
|
||||||
|
- Measure,
|
||||||
|
- CallWith=ScriptState,
|
||||||
|
- RaisesException
|
||||||
|
- ]
|
||||||
|
- Promise<TranslationAvailability> canDetect();
|
||||||
|
- [
|
||||||
|
- RuntimeEnabled=LanguageDetectionAPI,
|
||||||
|
- Exposed=Window,
|
||||||
|
- Measure,
|
||||||
|
- CallWith=ScriptState,
|
||||||
|
- RaisesException
|
||||||
|
- ]
|
||||||
|
- Promise<LanguageDetector> createDetector();
|
||||||
|
};
|
||||||
|
--- src/third_party/blink/renderer/modules/on_device_translation/language_detector.idl.orig 2025-01-02 22:23:59.384885429 +0100
|
||||||
|
+++ src/third_party/blink/renderer/modules/on_device_translation/language_detector.idl 2025-01-03 22:57:39.104809606 +0100
|
||||||
|
@@ -8,16 +8,3 @@ dictionary LanguageDetectionResult {
|
||||||
|
DOMString? detectedLanguage;
|
||||||
|
double confidence;
|
||||||
|
};
|
||||||
|
-
|
||||||
|
-[
|
||||||
|
- RuntimeEnabled=LanguageDetectionAPI,
|
||||||
|
- Exposed=Window
|
||||||
|
-]
|
||||||
|
-interface LanguageDetector {
|
||||||
|
- [
|
||||||
|
- Measure,
|
||||||
|
- CallWith=ScriptState,
|
||||||
|
- RaisesException
|
||||||
|
- ]
|
||||||
|
- Promise<sequence<LanguageDetectionResult>> detect(DOMString input);
|
||||||
|
-};
|
||||||
|
--- src/third_party/blink/renderer/modules/on_device_translation/translation.cc.orig 2025-01-02 22:23:59.384885429 +0100
|
||||||
|
+++ src/third_party/blink/renderer/modules/on_device_translation/translation.cc 2025-01-03 23:11:15.414694080 +0100
|
||||||
|
@@ -10,7 +10,6 @@
|
||||||
|
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
|
||||||
|
#include "third_party/blink/renderer/bindings/modules/v8/v8_translation_language_options.h"
|
||||||
|
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
|
||||||
|
-#include "third_party/blink/renderer/modules/on_device_translation/language_detector.h"
|
||||||
|
#include "third_party/blink/renderer/modules/on_device_translation/language_translator.h"
|
||||||
|
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
|
||||||
|
#include "third_party/blink/renderer/platform/bindings/script_state.h"
|
||||||
|
@@ -116,39 +115,4 @@ ScriptPromise<LanguageTranslator> Transl
|
||||||
|
return promise;
|
||||||
|
}
|
||||||
|
|
||||||
|
-ScriptPromise<V8TranslationAvailability> Translation::canDetect(
|
||||||
|
- ScriptState* script_state,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
- if (!script_state->ContextIsValid()) {
|
||||||
|
- exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
|
||||||
|
- "The execution context is not valid.");
|
||||||
|
- return ScriptPromise<V8TranslationAvailability>();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- auto* resolver =
|
||||||
|
- MakeGarbageCollected<ScriptPromiseResolver<V8TranslationAvailability>>(
|
||||||
|
- script_state);
|
||||||
|
- auto promise = resolver->Promise();
|
||||||
|
-
|
||||||
|
- resolver->Resolve(
|
||||||
|
- V8TranslationAvailability(V8TranslationAvailability::Enum::kReadily));
|
||||||
|
-
|
||||||
|
- return promise;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-ScriptPromise<LanguageDetector> Translation::createDetector(
|
||||||
|
- ScriptState* script_state,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
- if (!script_state->ContextIsValid()) {
|
||||||
|
- exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
|
||||||
|
- "The execution context is not valid.");
|
||||||
|
- return ScriptPromise<LanguageDetector>();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- auto* resolver =
|
||||||
|
- MakeGarbageCollected<ScriptPromiseResolver<LanguageDetector>>(
|
||||||
|
- script_state);
|
||||||
|
- resolver->Resolve(MakeGarbageCollected<LanguageDetector>());
|
||||||
|
- return resolver->Promise();
|
||||||
|
-}
|
||||||
|
} // namespace blink
|
@@ -169,9 +169,9 @@ author: Michael Gilbert <mgilbert@debian.org>
|
|||||||
"//media/mojo/mojom:speech_recognition",
|
"//media/mojo/mojom:speech_recognition",
|
||||||
"//ui/base",
|
"//ui/base",
|
||||||
]
|
]
|
||||||
--- a/chrome/chrome_paks.gni
|
--- src/chrome/chrome_paks.gni.orig 2024-12-08 18:34:54.604673311 +0100
|
||||||
+++ b/chrome/chrome_paks.gni
|
+++ src/chrome/chrome_paks.gni 2024-12-18 12:15:07.247395616 +0100
|
||||||
@@ -190,8 +190,6 @@ template("chrome_extra_paks") {
|
@@ -202,8 +202,6 @@ template("chrome_extra_paks") {
|
||||||
"$root_gen_dir/chrome/webui_gallery_resources.pak",
|
"$root_gen_dir/chrome/webui_gallery_resources.pak",
|
||||||
"$root_gen_dir/chrome/whats_new_resources.pak",
|
"$root_gen_dir/chrome/whats_new_resources.pak",
|
||||||
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
|
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
|
||||||
@@ -180,8 +180,8 @@ author: Michael Gilbert <mgilbert@debian.org>
|
|||||||
]
|
]
|
||||||
deps += [
|
deps += [
|
||||||
"//chrome/browser/resources:component_extension_resources",
|
"//chrome/browser/resources:component_extension_resources",
|
||||||
@@ -199,7 +197,6 @@ template("chrome_extra_paks") {
|
@@ -215,7 +213,6 @@ template("chrome_extra_paks") {
|
||||||
"//chrome/browser/resources/lens/overlay/search_bubble:resources",
|
"//chrome/browser/resources/lens/shared:resources",
|
||||||
"//chrome/browser/resources/search_engine_choice:resources",
|
"//chrome/browser/resources/search_engine_choice:resources",
|
||||||
"//content/browser/devtools:devtools_resources",
|
"//content/browser/devtools:devtools_resources",
|
||||||
- "//content/browser/tracing:resources",
|
- "//content/browser/tracing:resources",
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
--- a/third_party/devtools-frontend/src/BUILD.gn
|
--- src/third_party/devtools-frontend/src/BUILD.gn.orig 2024-12-08 18:36:42.531343187 +0100
|
||||||
+++ b/third_party/devtools-frontend/src/BUILD.gn
|
+++ src/third_party/devtools-frontend/src/BUILD.gn 2024-12-18 12:29:53.036757634 +0100
|
||||||
@@ -13,7 +13,6 @@ import("./third_party/blink/public/publi
|
@@ -16,7 +16,6 @@ import("./third_party/blink/public/publi
|
||||||
|
|
||||||
devtools_frontend_resources_deps = [
|
devtools_frontend_resources_deps = [
|
||||||
|
":favicon",
|
||||||
"front_end",
|
"front_end",
|
||||||
- "test",
|
- "test",
|
||||||
]
|
]
|
||||||
|
@@ -22,11 +22,9 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|||||||
chromium/media/media_options.gni | 2 +
|
chromium/media/media_options.gni | 2 +
|
||||||
7 files changed, 52 insertions(+), 27 deletions(-)
|
7 files changed, 52 insertions(+), 27 deletions(-)
|
||||||
|
|
||||||
diff --git a/chromium/content/browser/BUILD.gn b/chromium/content/browser/BUILD.gn
|
--- src/content/browser/BUILD.gn.orig 2024-12-08 18:44:00.234689649 +0100
|
||||||
index 19b45dc1268..67dcd7752d0 100644
|
+++ src/content/browser/BUILD.gn 2024-12-18 12:20:19.753578327 +0100
|
||||||
--- a/content/browser/BUILD.gn
|
@@ -2134,13 +2134,6 @@ source_set("browser") {
|
||||||
+++ b/content/browser/BUILD.gn
|
|
||||||
@@ -1909,13 +1909,6 @@ source_set("browser") {
|
|
||||||
"sms/user_consent_handler.h",
|
"sms/user_consent_handler.h",
|
||||||
"sms/webotp_service.cc",
|
"sms/webotp_service.cc",
|
||||||
"sms/webotp_service.h",
|
"sms/webotp_service.h",
|
||||||
@@ -40,17 +38,11 @@ index 19b45dc1268..67dcd7752d0 100644
|
|||||||
"speech/speech_synthesis_impl.cc",
|
"speech/speech_synthesis_impl.cc",
|
||||||
"speech/speech_synthesis_impl.h",
|
"speech/speech_synthesis_impl.h",
|
||||||
"speech/tts_controller_impl.cc",
|
"speech/tts_controller_impl.cc",
|
||||||
@@ -2956,19 +2951,6 @@ source_set("browser") {
|
@@ -3340,13 +3333,6 @@ source_set("browser") {
|
||||||
"service_worker/service_worker_usb_delegate_observer.cc",
|
"service_worker/service_worker_usb_delegate_observer.cc",
|
||||||
"service_worker/service_worker_usb_delegate_observer.h",
|
"service_worker/service_worker_usb_delegate_observer.h",
|
||||||
|
|
||||||
- # Most speech code is non-Android.
|
- # Most speech code is non-Android.
|
||||||
- "speech/endpointer/endpointer.cc",
|
|
||||||
- "speech/endpointer/endpointer.h",
|
|
||||||
- "speech/endpointer/energy_endpointer.cc",
|
|
||||||
- "speech/endpointer/energy_endpointer.h",
|
|
||||||
- "speech/endpointer/energy_endpointer_params.cc",
|
|
||||||
- "speech/endpointer/energy_endpointer_params.h",
|
|
||||||
- "speech/network_speech_recognition_engine_impl.cc",
|
- "speech/network_speech_recognition_engine_impl.cc",
|
||||||
- "speech/network_speech_recognition_engine_impl.h",
|
- "speech/network_speech_recognition_engine_impl.h",
|
||||||
- "speech/speech_recognition_engine.cc",
|
- "speech/speech_recognition_engine.cc",
|
||||||
@@ -60,7 +52,7 @@ index 19b45dc1268..67dcd7752d0 100644
|
|||||||
"tracing/tracing_ui.cc",
|
"tracing/tracing_ui.cc",
|
||||||
"tracing/tracing_ui.h",
|
"tracing/tracing_ui.h",
|
||||||
|
|
||||||
@@ -2995,10 +2975,8 @@ source_set("browser") {
|
@@ -3397,10 +3383,8 @@ source_set("browser") {
|
||||||
"//components/soda:constants",
|
"//components/soda:constants",
|
||||||
"//components/soda:soda",
|
"//components/soda:soda",
|
||||||
"//components/soda:utils",
|
"//components/soda:utils",
|
||||||
@@ -71,7 +63,7 @@ index 19b45dc1268..67dcd7752d0 100644
|
|||||||
"//ui/base",
|
"//ui/base",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -3108,6 +3083,37 @@ source_set("browser") {
|
@@ -3471,6 +3455,37 @@ source_set("browser") {
|
||||||
deps += [ "//ui/compositor" ]
|
deps += [ "//ui/compositor" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,31 +101,29 @@ index 19b45dc1268..67dcd7752d0 100644
|
|||||||
if ((is_linux || is_chromeos) && use_dbus) {
|
if ((is_linux || is_chromeos) && use_dbus) {
|
||||||
deps += [ "//dbus" ]
|
deps += [ "//dbus" ]
|
||||||
}
|
}
|
||||||
diff --git a/chromium/content/browser/browser_interface_binders.cc b/chromium/content/browser/browser_interface_binders.cc
|
--- src/content/browser/browser_interface_binders.cc.orig 2024-12-08 18:34:57.541340064 +0100
|
||||||
index c5a6f0aea88..71d9bf41a71 100644
|
+++ src/content/browser/browser_interface_binders.cc 2024-12-18 12:22:33.827251622 +0100
|
||||||
--- a/content/browser/browser_interface_binders.cc
|
@@ -59,7 +59,9 @@
|
||||||
+++ b/content/browser/browser_interface_binders.cc
|
|
||||||
@@ -50,7 +50,9 @@
|
|
||||||
#include "content/browser/renderer_host/render_frame_host_impl.h"
|
|
||||||
#include "content/browser/renderer_host/render_process_host_impl.h"
|
#include "content/browser/renderer_host/render_process_host_impl.h"
|
||||||
#include "content/browser/service_worker/service_worker_host.h"
|
#include "content/browser/service_worker/service_worker_host.h"
|
||||||
|
#include "content/browser/shared_storage/shared_storage_worklet_host.h"
|
||||||
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
||||||
#include "content/browser/speech/speech_recognition_dispatcher_host.h"
|
#include "content/browser/speech/speech_recognition_dispatcher_host.h"
|
||||||
+#endif
|
+#endif
|
||||||
#include "content/browser/storage_access/storage_access_handle.h"
|
#include "content/browser/storage_access/storage_access_handle.h"
|
||||||
#include "content/browser/tracing/trace_report/trace_report.mojom.h"
|
#include "content/browser/tracing/trace_report/trace_report.mojom.h"
|
||||||
#include "content/browser/tracing/trace_report/trace_report_internals_ui.h"
|
#include "content/browser/tracing/trace_report/trace_report_internals_ui.h"
|
||||||
@@ -144,7 +146,9 @@
|
@@ -98,7 +100,9 @@
|
||||||
#include "third_party/blink/public/mojom/sensor/web_sensor_provider.mojom.h"
|
#include "media/mojo/mojom/media_metrics_provider.mojom.h"
|
||||||
#include "third_party/blink/public/mojom/sms/webotp_service.mojom.h"
|
#include "media/mojo/mojom/media_player.mojom.h"
|
||||||
#include "third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom.h"
|
#include "media/mojo/mojom/remoting.mojom.h"
|
||||||
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
||||||
#include "third_party/blink/public/mojom/speech/speech_recognizer.mojom.h"
|
#include "media/mojo/mojom/speech_recognizer.mojom.h"
|
||||||
+#endif
|
+#endif
|
||||||
#include "third_party/blink/public/mojom/speech/speech_synthesis.mojom.h"
|
#include "media/mojo/mojom/video_decode_perf_history.mojom.h"
|
||||||
#include "third_party/blink/public/mojom/storage_access/storage_access_handle.mojom.h"
|
#include "media/mojo/mojom/video_encoder_metrics_provider.mojom.h"
|
||||||
#include "third_party/blink/public/mojom/usb/web_usb_service.mojom.h"
|
#include "media/mojo/mojom/webrtc_video_perf.mojom.h"
|
||||||
@@ -168,7 +172,9 @@
|
@@ -203,7 +207,9 @@
|
||||||
#else // BUILDFLAG(IS_ANDROID)
|
#else // BUILDFLAG(IS_ANDROID)
|
||||||
#include "content/browser/direct_sockets/direct_sockets_service_impl.h"
|
#include "content/browser/direct_sockets/direct_sockets_service_impl.h"
|
||||||
#include "media/mojo/mojom/renderer_extensions.mojom.h"
|
#include "media/mojo/mojom/renderer_extensions.mojom.h"
|
||||||
@@ -143,12 +133,12 @@ index c5a6f0aea88..71d9bf41a71 100644
|
|||||||
#include "third_party/blink/public/mojom/hid/hid.mojom.h"
|
#include "third_party/blink/public/mojom/hid/hid.mojom.h"
|
||||||
#include "third_party/blink/public/mojom/installedapp/installed_app_provider.mojom.h"
|
#include "third_party/blink/public/mojom/installedapp/installed_app_provider.mojom.h"
|
||||||
#include "third_party/blink/public/mojom/serial/serial.mojom.h"
|
#include "third_party/blink/public/mojom/serial/serial.mojom.h"
|
||||||
@@ -830,10 +836,12 @@ void PopulateFrameBinders(RenderFrameHostImpl* host, mojo::BinderMap* map) {
|
@@ -860,10 +866,12 @@ void PopulateFrameBinders(RenderFrameHos
|
||||||
map->Add<blink::mojom::SharedWorkerConnector>(
|
map->Add<blink::mojom::SharedWorkerConnector>(
|
||||||
base::BindRepeating(&BindSharedWorkerConnector, base::Unretained(host)));
|
base::BindRepeating(&BindSharedWorkerConnector, base::Unretained(host)));
|
||||||
|
|
||||||
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
||||||
map->Add<blink::mojom::SpeechRecognizer>(
|
map->Add<media::mojom::SpeechRecognizer>(
|
||||||
base::BindRepeating(&SpeechRecognitionDispatcherHost::Create,
|
base::BindRepeating(&SpeechRecognitionDispatcherHost::Create,
|
||||||
host->GetProcess()->GetID(), host->GetRoutingID()),
|
host->GetProcess()->GetID(), host->GetRoutingID()),
|
||||||
GetIOThreadTaskRunner({}));
|
GetIOThreadTaskRunner({}));
|
||||||
@@ -156,7 +146,7 @@ index c5a6f0aea88..71d9bf41a71 100644
|
|||||||
|
|
||||||
map->Add<blink::mojom::SpeechSynthesis>(base::BindRepeating(
|
map->Add<blink::mojom::SpeechSynthesis>(base::BindRepeating(
|
||||||
&RenderFrameHostImpl::GetSpeechSynthesis, base::Unretained(host)));
|
&RenderFrameHostImpl::GetSpeechSynthesis, base::Unretained(host)));
|
||||||
@@ -1099,6 +1107,7 @@ void PopulateBinderMapWithContext(
|
@@ -1163,6 +1171,7 @@ void PopulateBinderMapWithContext(
|
||||||
#if !BUILDFLAG(IS_ANDROID)
|
#if !BUILDFLAG(IS_ANDROID)
|
||||||
map->Add<blink::mojom::DirectSocketsService>(
|
map->Add<blink::mojom::DirectSocketsService>(
|
||||||
base::BindRepeating(&DirectSocketsServiceImpl::CreateForFrame));
|
base::BindRepeating(&DirectSocketsServiceImpl::CreateForFrame));
|
||||||
@@ -164,7 +154,7 @@ index c5a6f0aea88..71d9bf41a71 100644
|
|||||||
map->Add<media::mojom::SpeechRecognitionContext>(base::BindRepeating(
|
map->Add<media::mojom::SpeechRecognitionContext>(base::BindRepeating(
|
||||||
&EmptyBinderForFrame<media::mojom::SpeechRecognitionContext>));
|
&EmptyBinderForFrame<media::mojom::SpeechRecognitionContext>));
|
||||||
map->Add<media::mojom::SpeechRecognitionClientBrowserInterface>(
|
map->Add<media::mojom::SpeechRecognitionClientBrowserInterface>(
|
||||||
@@ -1110,6 +1119,7 @@ void PopulateBinderMapWithContext(
|
@@ -1174,6 +1183,7 @@ void PopulateBinderMapWithContext(
|
||||||
map->Add<media::mojom::MediaPlayerObserverClient>(base::BindRepeating(
|
map->Add<media::mojom::MediaPlayerObserverClient>(base::BindRepeating(
|
||||||
&EmptyBinderForFrame<media::mojom::MediaPlayerObserverClient>));
|
&EmptyBinderForFrame<media::mojom::MediaPlayerObserverClient>));
|
||||||
#endif
|
#endif
|
||||||
@@ -273,9 +263,9 @@ index 5667cac61f3..48ea95a99a6 100644
|
|||||||
cgit v1.2.1
|
cgit v1.2.1
|
||||||
|
|
||||||
|
|
||||||
--- src/components/speech/BUILD.gn.old 2023-05-13 15:23:05.850506351 +0200
|
--- src/components/speech/BUILD.gn.orig 2024-12-08 18:34:57.021340049 +0100
|
||||||
+++ src/components/speech/BUILD.gn 2023-05-14 14:39:12.182694489 +0200
|
+++ src/components/speech/BUILD.gn 2024-12-18 12:18:14.187490208 +0100
|
||||||
@@ -4,12 +4,6 @@
|
@@ -6,12 +6,6 @@ import("//build/config/features.gni")
|
||||||
|
|
||||||
source_set("speech") {
|
source_set("speech") {
|
||||||
sources = [
|
sources = [
|
||||||
@@ -288,11 +278,11 @@ cgit v1.2.1
|
|||||||
"downstream_loader.cc",
|
"downstream_loader.cc",
|
||||||
"downstream_loader.h",
|
"downstream_loader.h",
|
||||||
"downstream_loader_client.h",
|
"downstream_loader_client.h",
|
||||||
@@ -24,7 +18,6 @@
|
@@ -27,7 +21,6 @@ source_set("speech") {
|
||||||
"//mojo/public/cpp/system",
|
"//mojo/public/cpp/system",
|
||||||
"//services/network/public/cpp",
|
"//services/network/public/cpp",
|
||||||
"//services/network/public/mojom",
|
"//services/network/public/mojom",
|
||||||
- "//third_party/flac",
|
- "//third_party/flac",
|
||||||
]
|
]
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!is_android) {
|
||||||
|
@@ -13,10 +13,10 @@ Do not try to build a private copy of a DLL which is already available on every
|
|||||||
binary = "$root_out_dir/libvulkan.so.1"
|
binary = "$root_out_dir/libvulkan.so.1"
|
||||||
|
|
||||||
if (current_cpu == "x86") {
|
if (current_cpu == "x86") {
|
||||||
--- a/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn
|
--- src/third_party/vulkan-loader/src/BUILD.gn.orig 2024-12-08 18:37:20.394677662 +0100
|
||||||
+++ b/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn
|
+++ src/third_party/vulkan-loader/src/BUILD.gn 2024-12-18 13:15:54.021404544 +0100
|
||||||
@@ -99,7 +99,18 @@
|
@@ -144,7 +144,18 @@ if (!is_android) {
|
||||||
library_type = "static_library"
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- target(library_type, "libvulkan") {
|
- target(library_type, "libvulkan") {
|
||||||
@@ -35,4 +35,3 @@ Do not try to build a private copy of a DLL which is already available on every
|
|||||||
sources = [
|
sources = [
|
||||||
"loader/adapters.h",
|
"loader/adapters.h",
|
||||||
"loader/allocation.c",
|
"loader/allocation.c",
|
||||||
|
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:4f4e50a8786181d6f0f246150f6c99cc988bea00c7978ae44c4c019fdf4add8b
|
|
||||||
size 604163877
|
|
3
electron-33.3.1.tar.zst
Normal file
3
electron-33.3.1.tar.zst
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d8e988db1b85ffee080e397cca60b4dd66758a1eb681ca1bf014d5401a3541f3
|
||||||
|
size 687262785
|
63
electron_usb_delegate-incomplete-UsbDeviceInfo.patch
Normal file
63
electron_usb_delegate-incomplete-UsbDeviceInfo.patch
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
In file included from ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h:13,
|
||||||
|
from ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h:50,
|
||||||
|
from ../../base/memory/raw_ptr.h:11,
|
||||||
|
from ../../base/memory/weak_ptr.h:82,
|
||||||
|
from ../../electron/shell/browser/usb/electron_usb_delegate.h:14,
|
||||||
|
from ../../electron/shell/browser/usb/electron_usb_delegate.cc:5:
|
||||||
|
../../base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h:279:3: warning: multi-line comment [-Wcomment]
|
||||||
|
279 | // \
|
||||||
|
| ^
|
||||||
|
../../base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h:281:3: warning: multi-line comment [-Wcomment]
|
||||||
|
281 | // \
|
||||||
|
| ^
|
||||||
|
In file included from /usr/include/c++/14/memory:78,
|
||||||
|
from ../../electron/shell/browser/usb/electron_usb_delegate.h:8:
|
||||||
|
/usr/include/c++/14/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = device::mojom::UsbDeviceInfo]’:
|
||||||
|
/usr/include/c++/14/bits/unique_ptr.h:399:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = device::mojom::UsbDeviceInfo; _Dp = std::default_delete<device::mojom::UsbDeviceInfo>]’
|
||||||
|
399 | get_deleter()(std::move(__ptr));
|
||||||
|
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
|
||||||
|
../../mojo/public/cpp/bindings/struct_ptr.h:48:3: required from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
|
||||||
|
48 | ~StructPtr() = default;
|
||||||
|
| ^
|
||||||
|
/usr/include/c++/14/bits/stl_construct.h:149:22: required from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
|
||||||
|
149 | std::destroy_at(__pointer);
|
||||||
|
| ~~~~~~~~~~~~~~~^~~~~~~~~~~
|
||||||
|
/usr/include/c++/14/bits/stl_construct.h:163:19: required from ‘static constexpr void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*; bool <anonymous> = false]’
|
||||||
|
163 | std::_Destroy(std::__addressof(*__first));
|
||||||
|
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
/usr/include/c++/14/bits/stl_construct.h:193:44: required from ‘constexpr void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*]’
|
||||||
|
193 | return std::_Destroy_aux<false>::__destroy(__first, __last);
|
||||||
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
||||||
|
/usr/include/c++/14/bits/alloc_traits.h:981:20: required from ‘constexpr void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*; _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
|
||||||
|
981 | std::_Destroy(__first, __last);
|
||||||
|
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
||||||
|
/usr/include/c++/14/bits/stl_vector.h:735:15: required from ‘constexpr std::vector<_Tp, _Alloc>::~vector() [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>; _Alloc = std::allocator<mojo::StructPtr<device::mojom::UsbDeviceInfo> >]’
|
||||||
|
735 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
|
||||||
|
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
736 | _M_get_Tp_allocator());
|
||||||
|
| ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
../../electron/shell/browser/usb/electron_usb_delegate.cc:231:74: required from here
|
||||||
|
231 | std::move(callback).Run(std::vector<device::mojom::UsbDeviceInfoPtr>());
|
||||||
|
| ^
|
||||||
|
/usr/include/c++/14/bits/unique_ptr.h:91:23: error: invalid application of ‘sizeof’ to incomplete type ‘device::mojom::UsbDeviceInfo’
|
||||||
|
91 | static_assert(sizeof(_Tp)>0,
|
||||||
|
| ^~~~~~~~~~~
|
||||||
|
|
||||||
|
--- src/electron/shell/browser/usb/electron_usb_delegate.cc.orig 2025-01-02 22:20:04.494886103 +0100
|
||||||
|
+++ src/electron/shell/browser/usb/electron_usb_delegate.cc 2025-01-03 23:05:03.664747897 +0100
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
#include "content/public/browser/render_frame_host.h"
|
||||||
|
#include "content/public/browser/web_contents.h"
|
||||||
|
#include "electron/buildflags/buildflags.h"
|
||||||
|
+#include "services/device/public/mojom/usb_device.mojom.h"
|
||||||
|
#include "services/device/public/mojom/usb_enumeration_options.mojom.h"
|
||||||
|
#include "shell/browser/electron_browser_context.h"
|
||||||
|
#include "shell/browser/electron_permission_manager.h"
|
||||||
|
@@ -28,7 +29,6 @@
|
||||||
|
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
|
||||||
|
#include "extensions/common/constants.h"
|
||||||
|
#include "extensions/common/extension.h"
|
||||||
|
-#include "services/device/public/mojom/usb_device.mojom.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace {
|
@@ -1,8 +1,8 @@
|
|||||||
Reducing symbol_level is a kludge and should have no effect on generated code.
|
Reducing symbol_level is a kludge and should have no effect on generated code.
|
||||||
|
|
||||||
--- src/base/BUILD.gn.orig
|
--- src/base/BUILD.gn.orig 2024-12-08 18:43:52.881356091 +0100
|
||||||
+++ src/base/BUILD.gn
|
+++ src/base/BUILD.gn 2024-12-18 12:11:47.597615650 +0100
|
||||||
@@ -2531,11 +2531,6 @@ buildflag_header("debugging_buildflags")
|
@@ -2510,11 +2510,6 @@ buildflag_header("debugging_buildflags")
|
||||||
enable_commandline_sequence_checks =
|
enable_commandline_sequence_checks =
|
||||||
(is_debug || dcheck_always_on) && !is_android
|
(is_debug || dcheck_always_on) && !is_android
|
||||||
|
|
||||||
@@ -11,15 +11,15 @@ Reducing symbol_level is a kludge and should have no effect on generated code.
|
|||||||
- symbol_level > 0,
|
- symbol_level > 0,
|
||||||
- "symbol_level must be set to greater than 0 for source line numbers.")
|
- "symbol_level must be set to greater than 0 for source line numbers.")
|
||||||
- }
|
- }
|
||||||
|
_enable_stack_trace_line_numbers =
|
||||||
|
!print_unsymbolized_stack_traces && enable_stack_trace_line_numbers
|
||||||
|
|
||||||
flags = [
|
--- src/build/config/logging.gni.orig 2024-12-08 18:34:51.748006561 +0100
|
||||||
"DCHECK_IS_CONFIGURABLE=$dcheck_is_configurable",
|
+++ src/build/config/logging.gni 2024-12-18 12:12:08.104531156 +0100
|
||||||
--- src/build/config/logging.gni.orig
|
@@ -20,5 +20,5 @@ declare_args() {
|
||||||
+++ src/build/config/logging.gni
|
|
||||||
@@ -11,5 +11,5 @@ declare_args() {
|
|
||||||
enable_log_error_not_reached =
|
|
||||||
is_chromeos_ash && !(is_debug || dcheck_always_on)
|
|
||||||
|
|
||||||
|
# Enables the DWARF line number reader on Linux. This only has an effect if
|
||||||
|
# print_unsymbolized_stack_traces is false.
|
||||||
- enable_stack_trace_line_numbers = symbol_level > 0
|
- enable_stack_trace_line_numbers = symbol_level > 0
|
||||||
+ enable_stack_trace_line_numbers = true
|
+ enable_stack_trace_line_numbers = true
|
||||||
}
|
}
|
||||||
|
32
exception_context-missing-variant.patch
Normal file
32
exception_context-missing-variant.patch
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
From 47fb59539e5744467eb6f7aae52f5a169910d56c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||||
|
Date: Thu, 19 Sep 2024 11:04:49 +0000
|
||||||
|
Subject: [PATCH] IWYU: missing include for usage of std::variant in
|
||||||
|
exception_context.h
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Bug: 41455655
|
||||||
|
Change-Id: I7c4a26c28481de40b22646f5a9f018235079dbca
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5872753
|
||||||
|
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||||
|
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1357540}
|
||||||
|
---
|
||||||
|
.../blink/renderer/platform/bindings/exception_context.h | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/third_party/blink/renderer/platform/bindings/exception_context.h b/third_party/blink/renderer/platform/bindings/exception_context.h
|
||||||
|
index 82d20a29326432..afa27f00d03924 100644
|
||||||
|
--- a/third_party/blink/renderer/platform/bindings/exception_context.h
|
||||||
|
+++ b/third_party/blink/renderer/platform/bindings/exception_context.h
|
||||||
|
@@ -5,6 +5,8 @@
|
||||||
|
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_EXCEPTION_CONTEXT_H_
|
||||||
|
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_EXCEPTION_CONTEXT_H_
|
||||||
|
|
||||||
|
+#include <variant>
|
||||||
|
+
|
||||||
|
#include "base/check_op.h"
|
||||||
|
#include "base/dcheck_is_on.h"
|
||||||
|
#include "base/notreached.h"
|
@@ -1,6 +1,6 @@
|
|||||||
--- src/chrome/browser/ui/exclusive_access/fullscreen_controller.cc.orig 2024-07-24 13:00:13.565994500 +0200
|
--- src/chrome/browser/ui/exclusive_access/fullscreen_controller.cc.orig 2024-12-08 18:44:40.908024234 +0100
|
||||||
+++ src/chrome/browser/ui/exclusive_access/fullscreen_controller.cc 2024-08-03 23:06:56.231653700 +0200
|
+++ src/chrome/browser/ui/exclusive_access/fullscreen_controller.cc 2024-12-18 13:07:47.764725866 +0100
|
||||||
@@ -19,7 +19,6 @@
|
@@ -20,7 +20,6 @@
|
||||||
#include "chrome/browser/browser_process.h"
|
#include "chrome/browser/browser_process.h"
|
||||||
#include "chrome/browser/history/history_service_factory.h"
|
#include "chrome/browser/history/history_service_factory.h"
|
||||||
#include "chrome/browser/profiles/profile.h"
|
#include "chrome/browser/profiles/profile.h"
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
#include "chrome/browser/ui/blocked_content/popunder_preventer.h"
|
#include "chrome/browser/ui/blocked_content/popunder_preventer.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -116,20 +115,6 @@ void RecordWebsiteStateAtApiRequest(hist
|
@@ -117,20 +116,6 @@ void RecordWebsiteStateAtApiRequest(hist
|
||||||
void CheckUrlForAllowlistAndRecordMetric(
|
void CheckUrlForAllowlistAndRecordMetric(
|
||||||
const GURL& url,
|
const GURL& url,
|
||||||
history::HistoryLastVisitResult result) {
|
history::HistoryLastVisitResult result) {
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
- g_browser_process->safe_browsing_service()
|
- g_browser_process->safe_browsing_service()
|
||||||
- ->database_manager()
|
- ->database_manager()
|
||||||
- ->CheckUrlForHighConfidenceAllowlist(
|
- ->CheckUrlForHighConfidenceAllowlist(
|
||||||
- url, "RT" /*realtime*/,
|
- url,
|
||||||
- base::BindOnce(
|
- base::BindOnce(
|
||||||
- [](history::HistoryLastVisitResult result, bool on_allowlist) {
|
- [](history::HistoryLastVisitResult result, bool on_allowlist) {
|
||||||
- RecordWebsiteStateAtApiRequest(result, on_allowlist);
|
- RecordWebsiteStateAtApiRequest(result, on_allowlist);
|
||||||
|
100
fix-build-without-screen-ai.patch
Normal file
100
fix-build-without-screen-ai.patch
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
--- src/chrome/test/BUILD.gn.orig 2024-12-08 18:44:32.671357320 +0100
|
||||||
|
+++ src/chrome/test/BUILD.gn 2025-01-01 20:54:36.278270275 +0100
|
||||||
|
@@ -1959,9 +1959,6 @@ if (!is_android) {
|
||||||
|
"//chrome/browser/resource_coordinator:tab_manager_features",
|
||||||
|
"//chrome/browser/safe_browsing:advanced_protection",
|
||||||
|
"//chrome/browser/safe_browsing:verdict_cache_manager_factory",
|
||||||
|
- "//chrome/browser/screen_ai:screen_ai_install_state",
|
||||||
|
- "//chrome/browser/screen_ai:screen_ai_service_router_factory",
|
||||||
|
- "//chrome/browser/screen_ai/public:test_support",
|
||||||
|
"//chrome/browser/search",
|
||||||
|
"//chrome/browser/search_engines",
|
||||||
|
"//chrome/browser/segmentation_platform:test_utils",
|
||||||
|
@@ -2334,9 +2331,6 @@ if (!is_android) {
|
||||||
|
"//services/network/public/proto:sct_audit_report_proto",
|
||||||
|
"//services/preferences/public/cpp",
|
||||||
|
"//services/preferences/public/cpp/tracked",
|
||||||
|
- "//services/screen_ai:test_support",
|
||||||
|
- "//services/screen_ai/public/cpp:utilities",
|
||||||
|
- "//services/screen_ai/public/mojom",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//services/strings",
|
||||||
|
"//services/test/echo/public/mojom",
|
||||||
|
@@ -8373,7 +8367,6 @@ test("unit_tests") {
|
||||||
|
"//services/device/public/cpp/bluetooth",
|
||||||
|
"//services/metrics/public/cpp:ukm_builders",
|
||||||
|
"//services/network:test_support",
|
||||||
|
- "//services/screen_ai:test_support",
|
||||||
|
"//services/video_effects/test:test_support",
|
||||||
|
"//third_party/crashpad/crashpad/util",
|
||||||
|
"//third_party/libaddressinput",
|
||||||
|
--- src/chrome/browser/BUILD.gn.orig 2024-12-08 18:44:32.671357320 +0100
|
||||||
|
+++ src/chrome/browser/BUILD.gn 2025-01-01 21:05:47.125477818 +0100
|
||||||
|
@@ -4343,9 +4343,6 @@ static_library("browser") {
|
||||||
|
"//components/webauthn/core/browser:passkey_model",
|
||||||
|
"//services/device/public/cpp/bluetooth",
|
||||||
|
"//services/device/public/cpp/hid",
|
||||||
|
- "//services/screen_ai",
|
||||||
|
- "//services/screen_ai/public/cpp:utilities",
|
||||||
|
- "//services/screen_ai/public/mojom",
|
||||||
|
"//third_party/crashpad/crashpad/client:common",
|
||||||
|
"//third_party/zxcvbn-cpp",
|
||||||
|
"//ui/views",
|
||||||
|
--- src/chrome/renderer/BUILD.gn.orig 2024-12-08 18:34:54.671339980 +0100
|
||||||
|
+++ src/chrome/renderer/BUILD.gn 2025-01-01 21:11:57.272282026 +0100
|
||||||
|
@@ -408,7 +408,6 @@ static_library("renderer") {
|
||||||
|
"//components/crx_file",
|
||||||
|
"//components/trusted_vault",
|
||||||
|
"//services/screen_ai/buildflags",
|
||||||
|
- "//services/screen_ai/public/mojom",
|
||||||
|
"//services/strings",
|
||||||
|
"//third_party/re2:re2",
|
||||||
|
]
|
||||||
|
--- src/chrome/utility/BUILD.gn.orig 2024-12-08 18:34:55.478006671 +0100
|
||||||
|
+++ src/chrome/utility/BUILD.gn 2025-01-01 21:14:46.902339035 +0100
|
||||||
|
@@ -67,7 +67,6 @@ static_library("utility") {
|
||||||
|
"//services/network:network_service",
|
||||||
|
"//services/passage_embeddings:passage_embeddings",
|
||||||
|
"//services/passage_embeddings/public/mojom",
|
||||||
|
- "//services/screen_ai/buildflags",
|
||||||
|
"//services/service_manager/public/cpp",
|
||||||
|
"//skia",
|
||||||
|
"//sql",
|
||||||
|
@@ -145,7 +144,6 @@ static_library("utility") {
|
||||||
|
"//chrome/common/importer:interfaces",
|
||||||
|
"//components/autofill/core/common",
|
||||||
|
"//services/proxy_resolver:lib",
|
||||||
|
- "//services/screen_ai",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
--- src/chrome/browser/screen_ai/BUILD.gn.orig 2024-12-08 18:34:53.871339956 +0100
|
||||||
|
+++ src/chrome/browser/screen_ai/BUILD.gn 2025-01-01 21:17:11.015719404 +0100
|
||||||
|
@@ -48,7 +48,6 @@ source_set("screen_ai_install_state") {
|
||||||
|
"//chrome/browser:browser_process",
|
||||||
|
"//components/prefs",
|
||||||
|
"//content/public/browser",
|
||||||
|
- "//services/screen_ai/public/cpp:utilities",
|
||||||
|
"//ui/accessibility:ax_base",
|
||||||
|
]
|
||||||
|
|
||||||
|
@@ -68,9 +67,6 @@ source_set("screen_ai_service_router_fac
|
||||||
|
"//chrome/browser/profiles:profile",
|
||||||
|
"//components/keyed_service/core",
|
||||||
|
"//content/public/browser",
|
||||||
|
- "//services/screen_ai/public/cpp:utilities",
|
||||||
|
- "//services/screen_ai/public/mojom:factory",
|
||||||
|
- "//services/screen_ai/public/mojom:mojom",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||||
|
--- src/chrome/browser/screen_ai/public/BUILD.gn.orig 2024-12-08 18:34:53.871339956 +0100
|
||||||
|
+++ src/chrome/browser/screen_ai/public/BUILD.gn 2025-01-01 21:18:43.609082510 +0100
|
||||||
|
@@ -12,7 +12,6 @@ source_set("optical_character_recognizer
|
||||||
|
"//chrome/browser/profiles:profile",
|
||||||
|
"//chrome/browser/screen_ai:screen_ai_service_router_factory",
|
||||||
|
"//content/public/browser",
|
||||||
|
- "//services/screen_ai/public/mojom",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
10
fix-build-without-service-discovery.patch
Normal file
10
fix-build-without-service-discovery.patch
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
--- src/chrome/browser/extensions/api/BUILD.gn.orig 2024-12-08 18:34:53.171339936 +0100
|
||||||
|
+++ src/chrome/browser/extensions/api/BUILD.gn 2025-01-01 21:24:35.512530556 +0100
|
||||||
|
@@ -34,7 +34,6 @@ group("api_implementations") {
|
||||||
|
"//chrome/browser/extensions/api/downloads_internal",
|
||||||
|
"//chrome/browser/extensions/api/experimental_ai_data",
|
||||||
|
"//chrome/browser/extensions/api/font_settings",
|
||||||
|
- "//chrome/browser/extensions/api/mdns",
|
||||||
|
"//chrome/browser/extensions/api/module",
|
||||||
|
"//chrome/browser/extensions/api/networking_private",
|
||||||
|
"//chrome/browser/extensions/api/omnibox",
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
import("//build/config/android/rules.gni")
|
import("//build/config/android/rules.gni")
|
||||||
--- src/chrome/common/BUILD.gn.orig 2024-09-12 13:46:51.785984196 +0200
|
--- src/chrome/common/BUILD.gn.orig 2024-12-08 18:34:54.604673311 +0100
|
||||||
+++ src/chrome/common/BUILD.gn 2024-09-12 15:27:58.398867501 +0200
|
+++ src/chrome/common/BUILD.gn 2024-12-18 13:09:33.621395162 +0100
|
||||||
@@ -22,7 +22,6 @@ import("//testing/libfuzzer/fuzzer_test.
|
@@ -22,7 +22,6 @@ import("//testing/libfuzzer/fuzzer_test.
|
||||||
import("//third_party/widevine/cdm/widevine.gni")
|
import("//third_party/widevine/cdm/widevine.gni")
|
||||||
import("//tools/grit/grit_rule.gni")
|
import("//tools/grit/grit_rule.gni")
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
-assert(enable_supervised_users)
|
-assert(enable_supervised_users)
|
||||||
assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome")
|
assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome")
|
||||||
|
|
||||||
fuzzer_test("ini_parser_fuzzer") {
|
declare_args() {
|
||||||
--- src/chrome/renderer/BUILD.gn.orig 2024-09-12 13:46:51.849317526 +0200
|
--- src/chrome/renderer/BUILD.gn.orig 2024-09-12 13:46:51.849317526 +0200
|
||||||
+++ src/chrome/renderer/BUILD.gn 2024-09-12 15:29:17.915843739 +0200
|
+++ src/chrome/renderer/BUILD.gn 2024-09-12 15:29:17.915843739 +0200
|
||||||
@@ -18,7 +18,6 @@ import("//testing/libfuzzer/fuzzer_test.
|
@@ -18,7 +18,6 @@ import("//testing/libfuzzer/fuzzer_test.
|
||||||
@@ -38,18 +38,18 @@
|
|||||||
|
|
||||||
# //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which
|
# //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which
|
||||||
# produces a conflict for the "grit" template so we have to only include one.
|
# produces a conflict for the "grit" template so we have to only include one.
|
||||||
--- src/chrome/browser/ui/BUILD.gn.orig 2024-09-12 13:46:51.212650894 +0200
|
--- src/chrome/browser/ui/BUILD.gn.orig 2024-12-08 18:34:54.011339960 +0100
|
||||||
+++ src/chrome/browser/ui/BUILD.gn 2024-09-12 15:32:36.489733448 +0200
|
+++ src/chrome/browser/ui/BUILD.gn 2024-12-18 13:09:34.948061857 +0100
|
||||||
@@ -32,7 +32,6 @@ import("//third_party/protobuf/proto_lib
|
@@ -30,7 +30,6 @@ import("//third_party/protobuf/proto_lib
|
||||||
import("//ui/base/ui_features.gni")
|
import("//ui/base/ui_features.gni")
|
||||||
import("//ui/views/features.gni")
|
import("//ui/views/features.gni")
|
||||||
|
|
||||||
-assert(enable_supervised_users)
|
-assert(enable_supervised_users)
|
||||||
assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome")
|
assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome")
|
||||||
|
|
||||||
generate_histograms_variants_allowlist("webui_name_variants") {
|
generate_allowlist_from_histograms_file("webui_name_variants") {
|
||||||
--- src/chrome/browser/extensions/BUILD.gn.orig 2024-09-12 13:46:50.369317607 +0200
|
--- src/chrome/browser/extensions/BUILD.gn.orig 2024-12-08 18:34:53.171339936 +0100
|
||||||
+++ src/chrome/browser/extensions/BUILD.gn 2024-09-12 15:33:39.046452725 +0200
|
+++ src/chrome/browser/extensions/BUILD.gn 2024-12-18 13:09:34.948061857 +0100
|
||||||
@@ -20,7 +20,6 @@ import("//testing/libfuzzer/fuzzer_test.
|
@@ -20,7 +20,6 @@ import("//testing/libfuzzer/fuzzer_test.
|
||||||
import("//third_party/protobuf/proto_library.gni")
|
import("//third_party/protobuf/proto_library.gni")
|
||||||
|
|
||||||
@@ -57,4 +57,4 @@
|
|||||||
-assert(enable_supervised_users)
|
-assert(enable_supervised_users)
|
||||||
assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome")
|
assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome")
|
||||||
|
|
||||||
static_library("extensions") {
|
source_set("extensions") {
|
||||||
|
12
fpic.patch
12
fpic.patch
@@ -45,18 +45,6 @@ Use -fpic for code which goes only in dlls (gives smaller code),
|
|||||||
":spvtools_include_gen_dirs",
|
":spvtools_include_gen_dirs",
|
||||||
]
|
]
|
||||||
|
|
||||||
- cflags = []
|
|
||||||
+ cflags = ["-fpic", "-fno-semantic-interposition"]
|
|
||||||
+ asmflags = ["-fpic", "-fno-semantic-interposition"]
|
|
||||||
if (is_clang) {
|
|
||||||
cflags += [
|
|
||||||
"-Wno-implicit-fallthrough",
|
|
||||||
--- a/third_party/vulkan-deps/spirv-tools/src/BUILD.gn
|
|
||||||
+++ b/third_party/vulkan-deps/spirv-tools/src/BUILD.gn
|
|
||||||
@@ -356,7 +356,8 @@
|
|
||||||
":spvtools_include_gen_dirs",
|
|
||||||
]
|
|
||||||
|
|
||||||
- cflags = []
|
- cflags = []
|
||||||
+ cflags = ["-fpic", "-fno-semantic-interposition"]
|
+ cflags = ["-fpic", "-fno-semantic-interposition"]
|
||||||
+ asmflags = ["-fpic", "-fno-semantic-interposition"]
|
+ asmflags = ["-fpic", "-fno-semantic-interposition"]
|
||||||
|
@@ -1,93 +0,0 @@
|
|||||||
From 5fcaeafcab5460ea65e4a7bdee6589002adf74d2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <drott@chromium.org>
|
|
||||||
Date: Mon, 13 Feb 2023 13:26:16 +0000
|
|
||||||
Subject: [PATCH] Use hb::unique_ptr instead of custom HbScopedPointer
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This was an earlier local RAII implementation that we no longer need now
|
|
||||||
that HarfBuzz provides helpers for this.
|
|
||||||
|
|
||||||
Change-Id: Idc47ce2717c75556acb03e2ccccb50ec87ed3cca
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4239980
|
|
||||||
Reviewed-by: Munira Tursunova <moonira@google.com>
|
|
||||||
Commit-Queue: Dominik Röttsches <drott@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1104453}
|
|
||||||
---
|
|
||||||
.../platform/fonts/shaping/harfbuzz_shaper.cc | 39 ++++---------------
|
|
||||||
1 file changed, 7 insertions(+), 32 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
|
||||||
index c165a1703395a..dc1377a90a9f7 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
|
||||||
@@ -35,6 +35,7 @@
|
|
||||||
#include <unicode/uchar.h>
|
|
||||||
#include <unicode/uscript.h>
|
|
||||||
#include <algorithm>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
#include <memory>
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
@@ -194,33 +195,6 @@ struct ReshapeQueueItem {
|
|
||||||
: action_(action), start_index_(start), num_characters_(num) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
-template <typename T>
|
|
||||||
-class HarfBuzzScopedPtr {
|
|
||||||
- STACK_ALLOCATED();
|
|
||||||
-
|
|
||||||
- public:
|
|
||||||
- typedef void (*DestroyFunction)(T*);
|
|
||||||
-
|
|
||||||
- HarfBuzzScopedPtr(T* ptr, DestroyFunction destroy)
|
|
||||||
- : ptr_(ptr), destroy_(destroy) {
|
|
||||||
- DCHECK(destroy_);
|
|
||||||
- }
|
|
||||||
- HarfBuzzScopedPtr(const HarfBuzzScopedPtr&) = delete;
|
|
||||||
- HarfBuzzScopedPtr& operator=(const HarfBuzzScopedPtr&) = delete;
|
|
||||||
- ~HarfBuzzScopedPtr() {
|
|
||||||
- if (ptr_)
|
|
||||||
- (*destroy_)(ptr_);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- T* Get() const{ return ptr_; }
|
|
||||||
- operator T *() const {return ptr_;}
|
|
||||||
- void Set(T* ptr) { ptr_ = ptr; }
|
|
||||||
-
|
|
||||||
- private:
|
|
||||||
- T* ptr_;
|
|
||||||
- DestroyFunction destroy_;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
//
|
|
||||||
// Represents a context while shaping a range.
|
|
||||||
//
|
|
||||||
@@ -239,7 +214,7 @@ struct RangeContext {
|
|
||||||
text_direction(direction),
|
|
||||||
start(start),
|
|
||||||
end(end),
|
|
||||||
- buffer(hb_buffer_create(), hb_buffer_destroy),
|
|
||||||
+ buffer(hb_buffer_create()),
|
|
||||||
options(options) {
|
|
||||||
DCHECK_GE(end, start);
|
|
||||||
font_features.Initialize(font->GetFontDescription());
|
|
||||||
@@ -249,7 +224,7 @@ struct RangeContext {
|
|
||||||
const TextDirection text_direction;
|
|
||||||
const unsigned start;
|
|
||||||
const unsigned end;
|
|
||||||
- const HarfBuzzScopedPtr<hb_buffer_t> buffer;
|
|
||||||
+ const hb::unique_ptr<hb_buffer_t> buffer;
|
|
||||||
FontFeatures font_features;
|
|
||||||
Deque<ReshapeQueueItem> reshape_queue;
|
|
||||||
const ShapeOptions options;
|
|
||||||
@@ -1032,7 +1007,7 @@ void HarfBuzzShaper::GetGlyphData(const
|
|
||||||
UScriptCode script,
|
|
||||||
bool is_horizontal,
|
|
||||||
GlyphDataList& glyphs) {
|
|
||||||
- HarfBuzzScopedPtr<hb_buffer_t> hb_buffer(hb_buffer_create(), hb_buffer_destroy);
|
|
||||||
+ hb::unique_ptr<hb_buffer_t> hb_buffer(hb_buffer_create());
|
|
||||||
hb_buffer_set_language(hb_buffer, locale.HarfbuzzLanguage());
|
|
||||||
hb_buffer_set_script(hb_buffer, ICUScriptToHBScript(script));
|
|
||||||
hb_buffer_set_direction(hb_buffer,
|
|
@@ -1,532 +0,0 @@
|
|||||||
From aa2ff2bee16776301bd840a4e18bdebdfb916822 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Munira Tursunova <moonira@google.com>
|
|
||||||
Date: Tue, 04 Oct 2022 14:20:04 +0000
|
|
||||||
Subject: [PATCH] Replacing Chromium scoped types with HarfBuzz custom types.
|
|
||||||
|
|
||||||
Removed the Chromium side type HbScoped and move to the
|
|
||||||
HarfBuzz custom type.
|
|
||||||
|
|
||||||
Bug: 1363228
|
|
||||||
Change-Id: I9d390808953e2c36651533cbf5f4958beff2e14d
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3927859
|
|
||||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
|
||||||
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
|
|
||||||
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
|
|
||||||
Commit-Queue: Munira Tursunova <moonira@google.com>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1054692}
|
|
||||||
---
|
|
||||||
|
|
||||||
diff --git a/components/paint_preview/common/BUILD.gn b/components/paint_preview/common/BUILD.gn
|
|
||||||
index 377dc92..c39757d 100644
|
|
||||||
--- a/components/paint_preview/common/BUILD.gn
|
|
||||||
+++ b/components/paint_preview/common/BUILD.gn
|
|
||||||
@@ -37,7 +37,6 @@
|
|
||||||
"//components/crash/core/common:crash_key_lib",
|
|
||||||
"//skia",
|
|
||||||
"//third_party:freetype_harfbuzz",
|
|
||||||
- "//third_party/harfbuzz-ng:hb_scoped_util",
|
|
||||||
"//ui/gfx/geometry",
|
|
||||||
"//url",
|
|
||||||
]
|
|
||||||
diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc
|
|
||||||
index 8298861d5..147dfc3 100644
|
|
||||||
--- a/components/paint_preview/common/subset_font.cc
|
|
||||||
+++ b/components/paint_preview/common/subset_font.cc
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
// clang-format off
|
|
||||||
#include <hb.h>
|
|
||||||
#include <hb-subset.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
@@ -17,7 +18,6 @@
|
|
||||||
#include "base/numerics/safe_conversions.h"
|
|
||||||
#include "components/crash/core/common/crash_key.h"
|
|
||||||
#include "skia/ext/font_utils.h"
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
#include "third_party/skia/include/core/SkFontMgr.h"
|
|
||||||
#include "third_party/skia/include/core/SkStream.h"
|
|
||||||
#include "third_party/skia/include/core/SkTypeface.h"
|
|
||||||
@@ -45,11 +45,11 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
// Converts SkData to a hb_blob_t.
|
|
||||||
-HbScoped<hb_blob_t> MakeBlob(sk_sp<SkData> data) {
|
|
||||||
+hb::unique_ptr<hb_blob_t> MakeBlob(sk_sp<SkData> data) {
|
|
||||||
if (!data ||
|
|
||||||
!base::IsValueInRangeForNumericType<unsigned int, size_t>(data->size()))
|
|
||||||
- return nullptr;
|
|
||||||
- return HbScoped<hb_blob_t>(
|
|
||||||
+ return hb::unique_ptr<hb_blob_t>(nullptr);
|
|
||||||
+ return hb::unique_ptr<hb_blob_t>(
|
|
||||||
hb_blob_create(static_cast<const char*>(data->data()),
|
|
||||||
static_cast<unsigned int>(data->size()),
|
|
||||||
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
|
|
||||||
@@ -72,8 +72,9 @@
|
|
||||||
family_name.c_str());
|
|
||||||
int ttc_index = 0;
|
|
||||||
sk_sp<SkData> data = StreamToData(typeface->openStream(&ttc_index));
|
|
||||||
- HbScoped<hb_face_t> face(hb_face_create(MakeBlob(data).get(), ttc_index));
|
|
||||||
- HbScoped<hb_subset_input_t> input(hb_subset_input_create_or_fail());
|
|
||||||
+ hb::unique_ptr<hb_face_t> face(
|
|
||||||
+ hb_face_create(MakeBlob(data).get(), ttc_index));
|
|
||||||
+ hb::unique_ptr<hb_subset_input_t> input(hb_subset_input_create_or_fail());
|
|
||||||
if (!face || !input) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
@@ -102,14 +103,16 @@
|
|
||||||
hb_set_add(skip_subset, HB_TAG('G', 'S', 'U', 'B'));
|
|
||||||
hb_set_add(skip_subset, HB_TAG('G', 'P', 'O', 'S'));
|
|
||||||
|
|
||||||
- HbScoped<hb_face_t> subset_face(hb_subset_or_fail(face.get(), input.get()));
|
|
||||||
+ hb::unique_ptr<hb_face_t> subset_face(
|
|
||||||
+ hb_subset_or_fail(face.get(), input.get()));
|
|
||||||
if (!subset_face) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
// Store the correct collection index for the subsetted font.
|
|
||||||
const int final_ttc_index = hb_face_get_index(subset_face.get());
|
|
||||||
|
|
||||||
- HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
|
|
||||||
+ hb::unique_ptr<hb_blob_t> subset_blob(
|
|
||||||
+ hb_face_reference_blob(subset_face.get()));
|
|
||||||
if (!subset_blob) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
|
|
||||||
index 88cef3c..ae88e5a 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
|
||||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
|
||||||
@@ -1683,7 +1683,6 @@
|
|
||||||
"//third_party/blink/renderer/platform/wtf",
|
|
||||||
"//third_party/ced",
|
|
||||||
"//third_party/emoji-segmenter",
|
|
||||||
- "//third_party/harfbuzz-ng:hb_scoped_util",
|
|
||||||
"//third_party/icu",
|
|
||||||
"//third_party/libyuv",
|
|
||||||
"//third_party/one_euro_filter",
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
|
|
||||||
index 7c7057b..d43668f1 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
|
|
||||||
@@ -7,11 +7,11 @@
|
|
||||||
// having to rely on the platform being able to instantiate this font format.
|
|
||||||
#include <hb.h>
|
|
||||||
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
|
|
||||||
#include "base/containers/span.h"
|
|
||||||
#include "base/numerics/byte_conversions.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/vector.h"
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
#include "third_party/skia/include/core/SkTypeface.h"
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
@@ -27,7 +27,8 @@
|
|
||||||
const unsigned int kMinCOLRHeaderSize = 14;
|
|
||||||
if (table_tags.size() && table_tags.Contains(kCOLRTag) &&
|
|
||||||
table_tags.Contains(HB_TAG('C', 'P', 'A', 'L'))) {
|
|
||||||
- HbScoped<hb_blob_t> table_blob(hb_face_reference_table(face, kCOLRTag));
|
|
||||||
+ hb::unique_ptr<hb_blob_t> table_blob(
|
|
||||||
+ hb_face_reference_table(face, kCOLRTag));
|
|
||||||
if (hb_blob_get_length(table_blob.get()) < kMinCOLRHeaderSize)
|
|
||||||
return FontFormatCheck::COLRVersion::kNoCOLR;
|
|
||||||
|
|
||||||
@@ -51,11 +52,11 @@
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
FontFormatCheck::FontFormatCheck(sk_sp<SkData> sk_data) {
|
|
||||||
- HbScoped<hb_blob_t> font_blob(
|
|
||||||
+ hb::unique_ptr<hb_blob_t> font_blob(
|
|
||||||
hb_blob_create(reinterpret_cast<const char*>(sk_data->bytes()),
|
|
||||||
base::checked_cast<unsigned>(sk_data->size()),
|
|
||||||
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
|
|
||||||
- HbScoped<hb_face_t> face(hb_face_create(font_blob.get(), 0));
|
|
||||||
+ hb::unique_ptr<hb_face_t> face(hb_face_create(font_blob.get(), 0));
|
|
||||||
|
|
||||||
unsigned table_count = 0;
|
|
||||||
table_count = hb_face_get_table_tags(face.get(), 0, nullptr, nullptr);
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc b/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc
|
|
||||||
index 5e6d1f2..73b984a 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc
|
|
||||||
@@ -5,10 +5,10 @@
|
|
||||||
// clang-format off
|
|
||||||
#include <hb.h>
|
|
||||||
#include <hb-aat.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.h"
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
@@ -146,9 +146,9 @@
|
|
||||||
hb_face_t* const hb_face =
|
|
||||||
hb_font_get_face(harfbuzz_face_->GetScaledFont());
|
|
||||||
|
|
||||||
- HbScoped<hb_blob_t> morx_blob(
|
|
||||||
+ hb::unique_ptr<hb_blob_t> morx_blob(
|
|
||||||
hb_face_reference_table(hb_face, HB_TAG('m', 'o', 'r', 'x')));
|
|
||||||
- HbScoped<hb_blob_t> mort_blob(
|
|
||||||
+ hb::unique_ptr<hb_blob_t> mort_blob(
|
|
||||||
hb_face_reference_table(hb_face, HB_TAG('m', 'o', 'r', 't')));
|
|
||||||
|
|
||||||
// TODO(crbug.com/911149): Use hb_aat_layout_has_substitution() for
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc b/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
|
|
||||||
index 86c289c..98cbd7a 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
|
|
||||||
@@ -6,11 +6,11 @@
|
|
||||||
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
#include "third_party/skia/include/core/SkStream.h"
|
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
#include <hb.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
#include <hb-ot.h>
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|
||||||
if (!typeface || !typeface->getTableSize(kCpalTag))
|
|
||||||
return absl::nullopt;
|
|
||||||
|
|
||||||
- HbScoped<hb_face_t> face(HbFaceFromSkTypeface(typeface));
|
|
||||||
+ hb::unique_ptr<hb_face_t> face(HbFaceFromSkTypeface(typeface));
|
|
||||||
|
|
||||||
if (!face || !hb_ot_color_has_palettes(face.get()))
|
|
||||||
return absl::nullopt;
|
|
||||||
@@ -49,7 +49,7 @@ absl::optional<uint16_t> OpenTypeCpalLoo
|
|
||||||
Vector<Color> OpenTypeCpalLookup::RetrieveColorRecords(
|
|
||||||
sk_sp<SkTypeface> typeface,
|
|
||||||
unsigned palette_index) {
|
|
||||||
- HbScoped<hb_face_t> face(HbFaceFromSkTypeface(typeface));
|
|
||||||
+ hb::unique_ptr<hb_face_t> face(HbFaceFromSkTypeface(typeface));
|
|
||||||
|
|
||||||
if (!face) {
|
|
||||||
return Vector<Color>();
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc b/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc
|
|
||||||
index ebab0fa8..4ecd886 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc
|
|
||||||
@@ -4,12 +4,12 @@
|
|
||||||
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.h"
|
|
||||||
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
#include "third_party/skia/include/core/SkStream.h"
|
|
||||||
#include "third_party/skia/include/core/SkTypeface.h"
|
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
#include <hb.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
#include <hb-ot.h>
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
@@ -23,11 +23,11 @@
|
|
||||||
return output;
|
|
||||||
sk_sp<SkData> sk_data =
|
|
||||||
SkData::MakeFromStream(stream.get(), stream->getLength());
|
|
||||||
- HbScoped<hb_blob_t> blob(
|
|
||||||
+ hb::unique_ptr<hb_blob_t> blob(
|
|
||||||
hb_blob_create(reinterpret_cast<const char*>(sk_data->bytes()),
|
|
||||||
base::checked_cast<unsigned>(sk_data->size()),
|
|
||||||
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
|
|
||||||
- HbScoped<hb_face_t> face(hb_face_create(blob.get(), 0));
|
|
||||||
+ hb::unique_ptr<hb_face_t> face(hb_face_create(blob.get(), 0));
|
|
||||||
unsigned axes_count = hb_ot_var_get_axis_count(face.get());
|
|
||||||
std::unique_ptr<hb_ot_var_axis_info_t[]> axes =
|
|
||||||
std::make_unique<hb_ot_var_axis_info_t[]>(axes_count);
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
index b4bb5a3..b6ee0a8f 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
#include <hb.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
#include <hb-ot.h>
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
@@ -52,7 +53,6 @@
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/thread_specific.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/wtf.h"
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
#include "third_party/skia/include/core/SkPaint.h"
|
|
||||||
#include "third_party/skia/include/core/SkPath.h"
|
|
||||||
#include "third_party/skia/include/core/SkPoint.h"
|
|
||||||
@@ -203,7 +203,7 @@
|
|
||||||
const hb_codepoint_t kInvalidCodepoint = static_cast<hb_codepoint_t>(-1);
|
|
||||||
hb_codepoint_t space = kInvalidCodepoint;
|
|
||||||
|
|
||||||
- HbScoped<hb_set_t> glyphs(hb_set_create());
|
|
||||||
+ hb::unique_ptr<hb_set_t> glyphs(hb_set_create());
|
|
||||||
|
|
||||||
// Check whether computing is needed and compute for gpos/gsub.
|
|
||||||
if (features & kKerning &&
|
|
||||||
@@ -391,8 +391,8 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(yosin): We should move |CreateFace()| to "harfbuzz_font_cache.cc".
|
|
||||||
-static HbScoped<hb_face_t> CreateFace(FontPlatformData* platform_data) {
|
|
||||||
- HbScoped<hb_face_t> face;
|
|
||||||
+static hb::unique_ptr<hb_face_t> CreateFace(FontPlatformData* platform_data) {
|
|
||||||
+ hb::unique_ptr<hb_face_t> face;
|
|
||||||
|
|
||||||
sk_sp<SkTypeface> typeface = sk_ref_sp(platform_data->Typeface());
|
|
||||||
CHECK(typeface);
|
|
||||||
@@ -402,8 +402,8 @@
|
|
||||||
|
|
||||||
// Fallback to table copies if there is no in-memory access.
|
|
||||||
if (!face) {
|
|
||||||
- face.reset(hb_face_create_for_tables(HarfBuzzSkiaGetTable, typeface.get(),
|
|
||||||
- nullptr));
|
|
||||||
+ face = hb::unique_ptr<hb_face_t>(hb_face_create_for_tables(
|
|
||||||
+ HarfBuzzSkiaGetTable, typeface.get(), nullptr));
|
|
||||||
}
|
|
||||||
|
|
||||||
DCHECK(face);
|
|
||||||
@@ -415,7 +415,7 @@
|
|
||||||
static scoped_refptr<HarfBuzzFontData> CreateHarfBuzzFontData(
|
|
||||||
hb_face_t* face,
|
|
||||||
SkTypeface* typeface) {
|
|
||||||
- HbScoped<hb_font_t> ot_font(hb_font_create(face));
|
|
||||||
+ hb::unique_ptr<hb_font_t> ot_font(hb_font_create(face));
|
|
||||||
hb_ot_font_set_funcs(ot_font.get());
|
|
||||||
|
|
||||||
int axis_count = typeface->getVariationDesignPosition(nullptr, 0);
|
|
||||||
@@ -445,7 +445,7 @@
|
|
||||||
FontPlatformData* platform_data) {
|
|
||||||
const auto& result = font_map_.insert(platform_data->UniqueID(), nullptr);
|
|
||||||
if (result.is_new_entry) {
|
|
||||||
- HbScoped<hb_face_t> face = CreateFace(platform_data);
|
|
||||||
+ hb::unique_ptr<hb_face_t> face = CreateFace(platform_data);
|
|
||||||
result.stored_value->value =
|
|
||||||
CreateHarfBuzzFontData(face.get(), platform_data->Typeface());
|
|
||||||
}
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
|
||||||
index cbfb1c15..eb0dcb75 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
|
||||||
@@ -38,9 +38,9 @@
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
|
|
||||||
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
|
|
||||||
#include <hb.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc
|
|
||||||
index 4561bc9..a2d2eb1d 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc
|
|
||||||
@@ -16,9 +16,8 @@
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
-
|
|
||||||
-HbScoped<hb_face_t> HbFaceFromSkTypeface(sk_sp<SkTypeface> typeface) {
|
|
||||||
- HbScoped<hb_face_t> return_face(nullptr);
|
|
||||||
+hb::unique_ptr<hb_face_t> HbFaceFromSkTypeface(sk_sp<SkTypeface> typeface) {
|
|
||||||
+ hb::unique_ptr<hb_face_t> return_face(nullptr);
|
|
||||||
int ttc_index = 0;
|
|
||||||
|
|
||||||
// Have openStream() write the ttc index of this typeface within the stream to
|
|
||||||
@@ -28,7 +27,7 @@
|
|
||||||
if (tf_stream && tf_stream->getMemoryBase()) {
|
|
||||||
const void* tf_memory = tf_stream->getMemoryBase();
|
|
||||||
size_t tf_size = tf_stream->getLength();
|
|
||||||
- HbScoped<hb_blob_t> face_blob(hb_blob_create(
|
|
||||||
+ hb::unique_ptr<hb_blob_t> face_blob(hb_blob_create(
|
|
||||||
reinterpret_cast<const char*>(tf_memory),
|
|
||||||
base::checked_cast<unsigned int>(tf_size), HB_MEMORY_MODE_READONLY,
|
|
||||||
tf_stream.release(), DeleteTypefaceStream));
|
|
||||||
@@ -38,7 +37,8 @@
|
|
||||||
// See https://github.com/harfbuzz/harfbuzz/issues/248 .
|
|
||||||
unsigned int num_hb_faces = hb_face_count(face_blob.get());
|
|
||||||
if (0 < num_hb_faces && static_cast<unsigned>(ttc_index) < num_hb_faces) {
|
|
||||||
- return_face.reset(hb_face_create(face_blob.get(), ttc_index));
|
|
||||||
+ return_face =
|
|
||||||
+ hb::unique_ptr<hb_face_t>(hb_face_create(face_blob.get(), ttc_index));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return return_face;
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h
|
|
||||||
index 8817f06..f00d6f2 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h
|
|
||||||
@@ -8,9 +8,8 @@
|
|
||||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
|
||||||
#include "third_party/skia/include/core/SkTypeface.h"
|
|
||||||
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
-
|
|
||||||
#include <hb.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
@@ -25,7 +24,7 @@
|
|
||||||
// from copying all font tables on Mac into newly allocated memory, causing a
|
|
||||||
// potentially quite large allocations (in the megabytes range). See the
|
|
||||||
// implementation of SkTypeface_Mac::onOpenStream.
|
|
||||||
-PLATFORM_EXPORT HbScoped<hb_face_t> HbFaceFromSkTypeface(
|
|
||||||
+PLATFORM_EXPORT hb::unique_ptr<hb_face_t> HbFaceFromSkTypeface(
|
|
||||||
sk_sp<SkTypeface> typeface);
|
|
||||||
} // namespace blink
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
|
||||||
index 763f3a3..c50910df 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
|
||||||
@@ -5,12 +5,11 @@
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h"
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
|
|
||||||
HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font)
|
|
||||||
- : hb_font_(HbScoped<hb_font_t>(font)),
|
|
||||||
+ : hb_font_(hb::unique_ptr<hb_font_t>(font)),
|
|
||||||
hb_font_data_(std::make_unique<HarfBuzzFontData>()) {}
|
|
||||||
|
|
||||||
HbFontCacheEntry::~HbFontCacheEntry() = default;
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
|
||||||
index 1b0accf..eaedd0b 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
|
||||||
@@ -7,9 +7,9 @@
|
|
||||||
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/font_metrics.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/unicode_range_set.h"
|
|
||||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
|
||||||
|
|
||||||
#include <hb.h>
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ class HbFontCacheEntry : public RefCount
|
|
||||||
private:
|
|
||||||
explicit HbFontCacheEntry(hb_font_t* font);
|
|
||||||
|
|
||||||
- HbScoped<hb_font_t> hb_font_;
|
|
||||||
+ hb::unique_ptr<hb_font_t> hb_font_;
|
|
||||||
std::unique_ptr<HarfBuzzFontData> hb_font_data_;
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
index caf5d49..0d4b6f9 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
||||||
@@ -5,6 +5,8 @@
|
|
||||||
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_DATA_H_
|
|
||||||
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_DATA_H_
|
|
||||||
|
|
||||||
+#include <hb-cplusplus.hh>
|
|
||||||
+
|
|
||||||
#include "base/check_op.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/font_platform_data.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h"
|
|
||||||
diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn
|
|
||||||
index 522e164d..4b64e1b 100644
|
|
||||||
--- a/third_party/harfbuzz-ng/BUILD.gn
|
|
||||||
+++ b/third_party/harfbuzz-ng/BUILD.gn
|
|
||||||
@@ -41,6 +41,7 @@
|
|
||||||
"src/src/hb-blob.h",
|
|
||||||
"src/src/hb-buffer.h",
|
|
||||||
"src/src/hb-common.h",
|
|
||||||
+ "src/src/hb-cplusplus.hh",
|
|
||||||
"src/src/hb-deprecated.h",
|
|
||||||
"src/src/hb-face.h",
|
|
||||||
"src/src/hb-font.h",
|
|
||||||
@@ -409,11 +410,6 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-source_set("hb_scoped_util") {
|
|
||||||
- sources = [ "utils/hb_scoped.h" ]
|
|
||||||
- deps = [ "//third_party:freetype_harfbuzz" ]
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
# Not all checkouts have a //base directory.
|
|
||||||
if (build_with_chromium) {
|
|
||||||
fuzzer_test("hb_shape_fuzzer") {
|
|
||||||
diff --git a/third_party/harfbuzz-ng/utils/hb_scoped.h b/third_party/harfbuzz-ng/utils/hb_scoped.h
|
|
||||||
deleted file mode 100644
|
|
||||||
index 887f6b90..0000000
|
|
||||||
--- a/third_party/harfbuzz-ng/utils/hb_scoped.h
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,60 +0,0 @@
|
|
||||||
-// Copyright 2020 The Chromium Authors. All rights reserved.
|
|
||||||
-// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
-// found in the LICENSE file.
|
|
||||||
-
|
|
||||||
-#ifndef THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_
|
|
||||||
-#define THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_
|
|
||||||
-
|
|
||||||
-// clang-format off
|
|
||||||
-#include <hb.h>
|
|
||||||
-#include <hb-subset.h>
|
|
||||||
-// clang-format on
|
|
||||||
-
|
|
||||||
-#include <memory>
|
|
||||||
-#include <type_traits>
|
|
||||||
-
|
|
||||||
-template <typename T>
|
|
||||||
-struct always_false : std::false_type {};
|
|
||||||
-
|
|
||||||
-template <class T>
|
|
||||||
-struct HbSpecializedDeleter {
|
|
||||||
- inline void operator()(T* obj) {
|
|
||||||
- static_assert(always_false<T>::value,
|
|
||||||
- "HbScoped is only allowed for HarfBuzz types that have a "
|
|
||||||
- "deleter specialization.");
|
|
||||||
- }
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-// Defines a scoped pointer type HbScoped based on std::unique_ptr, using the
|
|
||||||
-// corresponsing HarfBuzz destructors to commonly used public HarfBuzz types.
|
|
||||||
-// The interface of HbScoped is the same as that of std::unique_ptr.
|
|
||||||
-//
|
|
||||||
-// void MyFunction() {
|
|
||||||
-// HbScoped<hb_blob_t> scoped_harfbuzz_blob(
|
|
||||||
-// hb_blob_create(mydata, mylength));
|
|
||||||
-//
|
|
||||||
-// DoSomethingWithBlob(scoped_harfbuzz_blob.get());
|
|
||||||
-// }
|
|
||||||
-//
|
|
||||||
-// When |scoped_harfbuzz_buffer| goes out of scope, hb_blob_destroy() is called
|
|
||||||
-// for the hb_blob_t* created from hb_blob_create().
|
|
||||||
-template <class T>
|
|
||||||
-using HbScoped = std::unique_ptr<T, HbSpecializedDeleter<T>>;
|
|
||||||
-
|
|
||||||
-#define SPECIALIZED_DELETER_FOR_HARFBUZZ_TYPE(TYPE, DESTRUCTOR) \
|
|
||||||
- template <> \
|
|
||||||
- struct HbSpecializedDeleter<TYPE> { \
|
|
||||||
- inline void operator()(TYPE* obj) { DESTRUCTOR(obj); } \
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
-#define HB_TYPE_DESTRUCTOR_PAIRS_REPEAT(F) \
|
|
||||||
- F(hb_blob_t, hb_blob_destroy) \
|
|
||||||
- F(hb_buffer_t, hb_buffer_destroy) \
|
|
||||||
- F(hb_face_t, hb_face_destroy) \
|
|
||||||
- F(hb_font_t, hb_font_destroy) \
|
|
||||||
- F(hb_set_t, hb_set_destroy) \
|
|
||||||
- F(hb_subset_input_t, hb_subset_input_destroy)
|
|
||||||
-
|
|
||||||
-HB_TYPE_DESTRUCTOR_PAIRS_REPEAT(SPECIALIZED_DELETER_FOR_HARFBUZZ_TYPE)
|
|
||||||
-
|
|
||||||
-#endif // THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_
|
|
@@ -1,36 +0,0 @@
|
|||||||
From d8985805ba3c963d9aabbd2c77d15dbd8d7290c5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
|
||||||
Date: Wed, 15 May 2024 18:46:03 +0000
|
|
||||||
Subject: [PATCH] GCC: explicitly use base::span constructor in
|
|
||||||
HttpAuthNtlmMechanism
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
base::span requires explicit construction for several of the
|
|
||||||
constructors. Theoretically the constructor used here should not
|
|
||||||
require that but GCC complains.
|
|
||||||
|
|
||||||
Bug: 40565911
|
|
||||||
Change-Id: I452f31ee0862c3e986e15207f89baa043b016da8
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5540995
|
|
||||||
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
|
|
||||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1301466}
|
|
||||||
---
|
|
||||||
net/http/http_auth_ntlm_mechanism.cc | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/net/http/http_auth_ntlm_mechanism.cc b/net/http/http_auth_ntlm_mechanism.cc
|
|
||||||
index ddab00151cda9c..0b103303df56f7 100644
|
|
||||||
--- a/net/http/http_auth_ntlm_mechanism.cc
|
|
||||||
+++ b/net/http/http_auth_ntlm_mechanism.cc
|
|
||||||
@@ -149,7 +149,7 @@ int HttpAuthNtlmMechanism::GenerateAuthToken(
|
|
||||||
return ERR_UNEXPECTED;
|
|
||||||
|
|
||||||
uint8_t client_challenge[8];
|
|
||||||
- g_generate_random_proc(client_challenge);
|
|
||||||
+ g_generate_random_proc(base::span<uint8_t>(client_challenge));
|
|
||||||
|
|
||||||
auto next_token = ntlm_client_.GenerateAuthenticateMessage(
|
|
||||||
domain, user, credentials->password(), hostname, channel_bindings, spn,
|
|
32
ip_protection_data_types-missing-optional.patch
Normal file
32
ip_protection_data_types-missing-optional.patch
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
From 7e28832cd3320d2b603e6ef9468581e1c65c14f1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||||
|
Date: Thu, 19 Sep 2024 15:05:26 +0000
|
||||||
|
Subject: [PATCH] IWYU: missing include for usage of std::optional in
|
||||||
|
ip_protection_data_types.h
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Bug: 41455655
|
||||||
|
Change-Id: Id26fc5bc3a4bde79c2f9a3134d18eeaab68603ad
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5873261
|
||||||
|
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||||
|
Reviewed-by: Dustin Mitchell <djmitche@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1357601}
|
||||||
|
---
|
||||||
|
components/ip_protection/common/ip_protection_data_types.h | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/components/ip_protection/common/ip_protection_data_types.h b/components/ip_protection/common/ip_protection_data_types.h
|
||||||
|
index 35648110915fc4..978dfac4ac74a5 100644
|
||||||
|
--- a/components/ip_protection/common/ip_protection_data_types.h
|
||||||
|
+++ b/components/ip_protection/common/ip_protection_data_types.h
|
||||||
|
@@ -5,6 +5,8 @@
|
||||||
|
#ifndef COMPONENTS_IP_PROTECTION_COMMON_IP_PROTECTION_DATA_TYPES_H_
|
||||||
|
#define COMPONENTS_IP_PROTECTION_COMMON_IP_PROTECTION_DATA_TYPES_H_
|
||||||
|
|
||||||
|
+#include <optional>
|
||||||
|
+
|
||||||
|
#include "base/time/time.h"
|
||||||
|
|
||||||
|
namespace ip_protection {
|
@@ -1,13 +0,0 @@
|
|||||||
--- src/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc.orig 2024-05-29 12:13:50.205359130 +0200
|
|
||||||
+++ src/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc 2024-05-29 23:55:59.239008160 +0200
|
|
||||||
@@ -311,8 +311,10 @@ int LibaomAv1Encoder::InitEncode(const V
|
|
||||||
|
|
||||||
if (codec_settings->mode == VideoCodecMode::kRealtimeVideo &&
|
|
||||||
encoder_settings_.GetFrameDropEnabled() && max_consec_frame_drop_ > 0) {
|
|
||||||
+#ifdef AOM_CTRL_AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR
|
|
||||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR,
|
|
||||||
max_consec_frame_drop_);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cfg_.g_threads == 8) {
|
|
@@ -1,33 +0,0 @@
|
|||||||
[154/40125] python3 ../../tools/licenses/licenses.py --target-os=linux --depfile gen/components/resources/about_credits.d credits gen/components/resources/about_credits.html
|
|
||||||
FAILED: gen/components/resources/about_credits.html
|
|
||||||
python3 ../../tools/licenses/licenses.py --target-os=linux --depfile gen/components/resources/about_credits.d credits gen/components/resources/about_credits.html
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "/home/abuild/rpmbuild/BUILD/src/out/Release/../../tools/licenses/licenses.py", line 1445, in <module>
|
|
||||||
sys.exit(main())
|
|
||||||
^^^^^^
|
|
||||||
File "/home/abuild/rpmbuild/BUILD/src/out/Release/../../tools/licenses/licenses.py", line 1428, in main
|
|
||||||
if not GenerateCredits(
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
File "/home/abuild/rpmbuild/BUILD/src/out/Release/../../tools/licenses/licenses.py", line 1069, in GenerateCredits
|
|
||||||
directory_metadata, _ = ParseDir(path,
|
|
||||||
^^^^^^^^^^^^^^
|
|
||||||
File "/home/abuild/rpmbuild/BUILD/src/out/Release/../../tools/licenses/licenses.py", line 670, in ParseDir
|
|
||||||
if not os.listdir(os.path.join(root, path)):
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
FileNotFoundError: [Errno 2] No such file or directory: '/home/abuild/rpmbuild/BUILD/src/third_party/angle/src/common/third_party/xxhash'
|
|
||||||
|
|
||||||
|
|
||||||
--- src/tools/licenses/licenses.py.orig 2024-05-29 12:20:01.514877976 +0200
|
|
||||||
+++ src/tools/licenses/licenses.py 2024-05-29 22:54:04.691863557 +0200
|
|
||||||
@@ -667,7 +667,10 @@ def ParseDir(path,
|
|
||||||
return [], []
|
|
||||||
|
|
||||||
# gclient creates empty directories for conditionally downloaded submodules.
|
|
||||||
- if not os.listdir(os.path.join(root, path)):
|
|
||||||
+ try:
|
|
||||||
+ if not os.listdir(os.path.join(root, path)):
|
|
||||||
+ return [], []
|
|
||||||
+ except FileNotFoundError: #This gets thrown if directory is missing instead of empty.
|
|
||||||
return [], []
|
|
||||||
|
|
||||||
# Get the metadata values, from
|
|
@@ -1,37 +0,0 @@
|
|||||||
From bf5355ac24399cd37a7d210b1ce9586d70829ed5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
|
||||||
Date: Fri, 17 May 2024 09:39:14 +0000
|
|
||||||
Subject: [PATCH] GCC: do not add template parameter in constructor of
|
|
||||||
BaseKeyframe
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
GCC rejects adding redundantly the template parameter in the
|
|
||||||
constructor.
|
|
||||||
|
|
||||||
Bug: 40565911
|
|
||||||
Change-Id: Ie827f1dba5488893cb76e0e52e9c26866dff701c
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5539114
|
|
||||||
Reviewed-by: Jean-Philippe Gravel <jpgravel@chromium.org>
|
|
||||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1302481}
|
|
||||||
---
|
|
||||||
.../csspaint/nativepaint/native_css_paint_definition.h | 4 +---
|
|
||||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.h b/third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.h
|
|
||||||
index 34d37ea466c632..24a676543895ac 100644
|
|
||||||
--- a/third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.h
|
|
||||||
+++ b/third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.h
|
|
||||||
@@ -51,9 +51,7 @@ class MODULES_EXPORT NativeCssPaintDefinition : public NativePaintDefinition {
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
struct TypedKeyframe : public BaseKeyframe {
|
|
||||||
- TypedKeyframe<T>(double offset,
|
|
||||||
- std::unique_ptr<gfx::TimingFunction>& tf,
|
|
||||||
- T v)
|
|
||||||
+ TypedKeyframe(double offset, std::unique_ptr<gfx::TimingFunction>& tf, T v)
|
|
||||||
: BaseKeyframe(offset, tf), value(v) {}
|
|
||||||
T value;
|
|
||||||
};
|
|
@@ -1,3 +1,91 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jan 12 12:38:29 UTC 2025 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||||
|
|
||||||
|
- Update to 33.3.1
|
||||||
|
* Drop 32-bit support
|
||||||
|
* chromium 130.0.6723.170
|
||||||
|
* node 20.18.0
|
||||||
|
* v8 13.0
|
||||||
|
* Behavior Changed: frame properties may retrieve detached WebFrameMain instances or none at all
|
||||||
|
* Behavior Changed: webContents property on login on app
|
||||||
|
* Added a handler, app.setClientCertRequestPasswordHandler(handler), to help unlock cryptographic devices when a PIN is needed.
|
||||||
|
* Added View.setBorderRadius(radius) for customizing the border radius of views—with compatibility for WebContentsView.
|
||||||
|
* Extended navigationHistory API with 2 new functions for better history management. #42014
|
||||||
|
* see https://github.com/electron/electron/releases/tag/v33.0.0 and https://www.electronjs.org/blog/electron-33-0 for more
|
||||||
|
- Disable aarch64 builds due to OBS hardware limits. Sorry.
|
||||||
|
- Drop Leap 15.5 support
|
||||||
|
- Drop no longer needed patches
|
||||||
|
* absl-base-dynamic_annotations.patch
|
||||||
|
* angle-State-constexpr.patch
|
||||||
|
* chromium-124-shims.patch
|
||||||
|
* color_provider-incomplete-ColorProviderInternal.patch
|
||||||
|
* ConsumeRadii-linker-error.patch
|
||||||
|
* Cr126-abseil-shims.patch
|
||||||
|
* crashpad-use-system-abseil.patch
|
||||||
|
* DesktopNativeWidgetAura-HandleActivationChanged-crash.patch
|
||||||
|
* harfbuzz-replace-chromium-scoped-type.patch
|
||||||
|
* harfbuzz-replace-HbScopedPointer.patch
|
||||||
|
* http_auth_ntlm_mechanism-could-not-convert-to-base-span.patch
|
||||||
|
* licenses.py-FileNotFoundError.patch
|
||||||
|
* native_css_paint_definition-expected-unqualified-id.patch
|
||||||
|
* page_popup_controller-missing-optional.patch
|
||||||
|
* partition_alloc-no-lto.patch
|
||||||
|
* preview_cancel_reason-missing-string.patch
|
||||||
|
* quiche-QuicIntervalDeque-no-match-for-operator-mm.patch
|
||||||
|
* real_time_reporting_bindings-forward-declaration.patch
|
||||||
|
* run_segmenter-missing-optional.patch
|
||||||
|
* skia-system-vulkan-headers.patch
|
||||||
|
* system-zlib.patch
|
||||||
|
* text_decoder-missing-optional.patch
|
||||||
|
* wayland-proto-31-cursor-shape.patch
|
||||||
|
- Drop libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch and replace it with more fine-grained reverts:
|
||||||
|
* aom3.10-AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.patch
|
||||||
|
* aom3.10-AV1E_SET_AUTO_TILES.patch
|
||||||
|
* webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch
|
||||||
|
* webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR-2.patch
|
||||||
|
- Drop the following revert:
|
||||||
|
* bad-font-gc0000.patch
|
||||||
|
* bad-font-gc000.patch
|
||||||
|
* bad-font-gc00.patch
|
||||||
|
* bad-font-gc0.patch
|
||||||
|
* bad-font-gc11.patch
|
||||||
|
* bad-font-gc1.patch
|
||||||
|
* bad-font-gc2.patch
|
||||||
|
* bad-font-gc3.patch
|
||||||
|
- Add bsc1224178-font-gc.patch for a proper fix for bsc#1224178 deb#1067886
|
||||||
|
- Add backported or forwardable patches to fix build errors:
|
||||||
|
* account_id-missing-optional.patch
|
||||||
|
* css_attr_value_tainting-missing-once_flag.patch
|
||||||
|
* electron_usb_delegate-incomplete-UsbDeviceInfo.patch
|
||||||
|
* exception_context-missing-variant.patch
|
||||||
|
* fix-build-without-service-discovery.patch
|
||||||
|
* ip_protection_data_types-missing-optional.patch
|
||||||
|
* skia_image_decoder_base-missing-stack.patch
|
||||||
|
* vtt_scanner-missing-variant.patch
|
||||||
|
* wayland_connection-Wchanges-meaning.patch
|
||||||
|
- Add patches to fix build errors due to our changes:
|
||||||
|
* build-without-speech-service.patch
|
||||||
|
* chromium-123-qrcode.patch
|
||||||
|
* chromium-125-cloud_authenticator.patch
|
||||||
|
* chromium-127-crabby.patch
|
||||||
|
* chromium-129-disable-H.264-video-parser-during-demuxing.patch
|
||||||
|
* chromium-130-fontations.patch
|
||||||
|
* cr130-abseil-remove-unused-deps.patch
|
||||||
|
* cr130-absl-base.patch
|
||||||
|
* delete-old-language-detection-which-uses-tflite.patch
|
||||||
|
* fix-build-without-screen-ai.patch
|
||||||
|
* private_aggregation_host-uint128.patch
|
||||||
|
* remove-libphonenumber.patch
|
||||||
|
* system-absl_algorithm.patch
|
||||||
|
* wayland_version.patch
|
||||||
|
- 15.6: use bundled vulkan and spirv headers
|
||||||
|
- 15.6: revert upstream changes to build with old wayland
|
||||||
|
* wayland-protocol-toplevel-icon.patch
|
||||||
|
* wayland-protocol-toplevel-icon-2.patch
|
||||||
|
* wayland-protocol-toplevel-drag.patch
|
||||||
|
- Use bundled yuv everywhere due to system version being too old
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Nov 27 20:33:48 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
Wed Nov 27 20:33:48 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||||
|
|
||||||
|
@@ -20,20 +20,20 @@
|
|||||||
|
|
||||||
%define mod_name electron
|
%define mod_name electron
|
||||||
# https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
|
# https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
|
||||||
%define abi_version 125
|
%define abi_version 130
|
||||||
|
|
||||||
# Do not provide libEGL.so, etc…
|
# Do not provide libEGL.so, etc…
|
||||||
%define __provides_exclude ^lib.*\\.so.*$
|
%define __provides_exclude ^lib.*\\.so.*$
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#x86 requires SSE2
|
# Since https://github.com/chromium/chromium/commit/98742ca1b98b0598b1981671abb994c1a442ba6e blink no longer builds on ix86.
|
||||||
#see v8/src/codegen/ia32/assembler-ia32.cc
|
#(use of _mm_cvtsi128_si64)
|
||||||
%ifarch %ix86
|
ExcludeArch: %ix86
|
||||||
ExclusiveArch: i586 i686
|
|
||||||
BuildArch: i686
|
#private_aggregation_host-uint128.patch adds a int128 which is not supported by 32-bit gcc.
|
||||||
%{expand:%%global optflags %(echo "%optflags") -march=pentium4 -mtune=generic}
|
#If anyone still uses these platforms, have fun with fixing it.
|
||||||
%endif
|
ExcludeArch: %arm
|
||||||
|
|
||||||
|
|
||||||
%bcond_without pipewire
|
%bcond_without pipewire
|
||||||
@@ -50,10 +50,6 @@ BuildArch: i686
|
|||||||
#(all the widgets use Gtk unconditionally — not sure which of the changed codepaths are used in Electron)
|
#(all the widgets use Gtk unconditionally — not sure which of the changed codepaths are used in Electron)
|
||||||
%bcond_with qt
|
%bcond_with qt
|
||||||
|
|
||||||
%ifarch %ix86
|
|
||||||
#work around npm rebuild crashes on OBS
|
|
||||||
%global jitless NODE_OPTIONS=--jitless
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%ifarch aarch64 riscv64
|
%ifarch aarch64 riscv64
|
||||||
#Video acceleration API to support. Useful for e.g. signal messenger.
|
#Video acceleration API to support. Useful for e.g. signal messenger.
|
||||||
@@ -77,7 +73,7 @@ BuildArch: i686
|
|||||||
%bcond_without gdbjit
|
%bcond_without gdbjit
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifnarch %ix86 %arm aarch64
|
%ifnarch %ix86 %arm
|
||||||
%if (0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora})
|
%if (0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora})
|
||||||
%bcond_without lto
|
%bcond_without lto
|
||||||
%else
|
%else
|
||||||
@@ -90,18 +86,11 @@ BuildArch: i686
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch aarch64
|
%ifarch aarch64
|
||||||
%bcond_with lto
|
#Linker overflows without LTO.
|
||||||
|
%bcond_without lto
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch aarch64
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
%bcond_without mold
|
|
||||||
%else
|
|
||||||
%bcond_with mold
|
%bcond_with mold
|
||||||
%endif
|
|
||||||
%else
|
|
||||||
%bcond_with mold
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -112,35 +101,22 @@ BuildArch: i686
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora}
|
|
||||||
%bcond_without system_aom
|
|
||||||
%bcond_without system_spirv
|
|
||||||
%bcond_without harfbuzz_5
|
|
||||||
%bcond_without link_vulkan
|
|
||||||
%bcond_without wayland_32
|
|
||||||
%else
|
|
||||||
%bcond_with system_aom
|
|
||||||
%bcond_with system_spirv
|
|
||||||
%bcond_with harfbuzz_5
|
|
||||||
%bcond_with link_vulkan
|
|
||||||
%bcond_with wayland_32
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} >= 41
|
|
||||||
%bcond_without system_yuv
|
|
||||||
%else
|
|
||||||
%bcond_with system_yuv
|
%bcond_with system_yuv
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
|
||||||
%bcond_without system_vpx
|
%bcond_without system_vpx
|
||||||
%bcond_without bro_11
|
%bcond_without bro_11
|
||||||
%bcond_without ffmpeg_6
|
%bcond_without ffmpeg_6
|
||||||
|
%bcond_without wayland_34
|
||||||
|
%bcond_without system_vk_headers
|
||||||
%else
|
%else
|
||||||
%bcond_with system_vpx
|
%bcond_with system_vpx
|
||||||
%bcond_with bro_11
|
%bcond_with bro_11
|
||||||
%bcond_with ffmpeg_6
|
%bcond_with ffmpeg_6
|
||||||
|
%bcond_with wayland_34
|
||||||
|
%bcond_with system_vk_headers
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@@ -177,8 +153,10 @@ BuildArch: i686
|
|||||||
# Some chromium code assumes absl::string_view is a typedef for std::string_view. This is not true on GCC7 systems such as Leap.
|
# Some chromium code assumes absl::string_view is a typedef for std::string_view. This is not true on GCC7 systems such as Leap.
|
||||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
|
||||||
%bcond_without system_abseil
|
%bcond_without system_abseil
|
||||||
|
%bcond_without aom_38
|
||||||
%else
|
%else
|
||||||
%bcond_with system_abseil
|
%bcond_with system_abseil
|
||||||
|
%bcond_with aom_38
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >= 41
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >= 41
|
||||||
@@ -223,7 +201,7 @@ BuildArch: i686
|
|||||||
|
|
||||||
|
|
||||||
Name: nodejs-electron
|
Name: nodejs-electron
|
||||||
Version: 31.7.6
|
Version: 33.3.1
|
||||||
%global tag_version %version
|
%global tag_version %version
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS
|
Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS
|
||||||
@@ -241,11 +219,15 @@ Source400: ffmpeg-new-channel-layout.patch
|
|||||||
Source401: audio_file_reader-ffmpeg-AVFrame-duration.patch
|
Source401: audio_file_reader-ffmpeg-AVFrame-duration.patch
|
||||||
Source402: Cr122-ffmpeg-new-channel-layout.patch
|
Source402: Cr122-ffmpeg-new-channel-layout.patch
|
||||||
Source403: ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch
|
Source403: ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch
|
||||||
# and against harfbuzz 4
|
# and against aom 3.9
|
||||||
Source415: harfbuzz-replace-chromium-scoped-type.patch
|
Source410: aom3.10-AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.patch
|
||||||
Source416: harfbuzz-replace-HbScopedPointer.patch
|
Source411: aom3.10-AV1E_SET_AUTO_TILES.patch
|
||||||
# and wayland 1.31
|
Source412: webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch
|
||||||
Source450: wayland-proto-31-cursor-shape.patch
|
Source413: webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR-2.patch
|
||||||
|
# and wayland protocol 1.32
|
||||||
|
Source420: wayland-protocol-toplevel-icon.patch
|
||||||
|
Source421: wayland-protocol-toplevel-icon-2.patch
|
||||||
|
Source422: wayland-protocol-toplevel-drag.patch
|
||||||
# and abseil 2401
|
# and abseil 2401
|
||||||
Source460: quiche-absl-HexStringToBytes.patch
|
Source460: quiche-absl-HexStringToBytes.patch
|
||||||
|
|
||||||
@@ -271,6 +253,7 @@ Patch82: node-compiler.patch
|
|||||||
Patch84: aarch64-Xclang.patch
|
Patch84: aarch64-Xclang.patch
|
||||||
Patch85: devtools-frontend-compress_files-oom.patch
|
Patch85: devtools-frontend-compress_files-oom.patch
|
||||||
Patch86: enable_stack_trace_line_numbers-symbol_level.patch
|
Patch86: enable_stack_trace_line_numbers-symbol_level.patch
|
||||||
|
Patch97: chromium-127-cargo_crate.patch
|
||||||
|
|
||||||
|
|
||||||
# PATCHES that remove code we don't want. Most of them can be reused verbatim by other distributors,
|
# PATCHES that remove code we don't want. Most of them can be reused verbatim by other distributors,
|
||||||
@@ -292,7 +275,16 @@ Patch589: remove-puffin.patch
|
|||||||
Patch590: remove-sync.patch
|
Patch590: remove-sync.patch
|
||||||
Patch591: fix-build-without-safebrowsing.patch
|
Patch591: fix-build-without-safebrowsing.patch
|
||||||
Patch592: fix-build-without-supervised-users.patch
|
Patch592: fix-build-without-supervised-users.patch
|
||||||
|
Patch593: fix-build-without-screen-ai.patch
|
||||||
|
Patch594: build-without-speech-service.patch
|
||||||
|
#patches disabling rust features from Gentoo: https://data.gpo.zugaina.org/pf4public/dev-util/electron/files/
|
||||||
|
Patch595: chromium-123-qrcode.patch
|
||||||
|
Patch596: chromium-130-fontations.patch
|
||||||
|
Patch597: chromium-125-cloud_authenticator.patch
|
||||||
|
Patch598: chromium-127-crabby.patch
|
||||||
|
#End gentoo patches
|
||||||
|
Patch599: remove-libphonenumber.patch
|
||||||
|
Patch600: delete-old-language-detection-which-uses-tflite.patch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -301,8 +293,6 @@ Patch1000: do-not-build-libvulkan.so.patch
|
|||||||
Patch1017: system-libdrm.patch
|
Patch1017: system-libdrm.patch
|
||||||
# http://svnweb.mageia.org/packages/updates/7/chromium-browser-stable/current/SOURCES/chromium-74-pdfium-system-libopenjpeg2.patch?view=markup
|
# http://svnweb.mageia.org/packages/updates/7/chromium-browser-stable/current/SOURCES/chromium-74-pdfium-system-libopenjpeg2.patch?view=markup
|
||||||
Patch1038: pdfium-fix-system-libs.patch
|
Patch1038: pdfium-fix-system-libs.patch
|
||||||
# https://sources.debian.org/patches/chromium/102.0.5005.115-1/system/zlib.patch/
|
|
||||||
Patch1041: system-zlib.patch
|
|
||||||
Patch1045: angle-system-xxhash.patch
|
Patch1045: angle-system-xxhash.patch
|
||||||
Patch1047: cares_public_headers.patch
|
Patch1047: cares_public_headers.patch
|
||||||
Patch1048: chromium-remove-bundled-roboto-font.patch
|
Patch1048: chromium-remove-bundled-roboto-font.patch
|
||||||
@@ -312,21 +302,19 @@ Patch1065: base-system-nspr.patch
|
|||||||
Patch1066: system-gtest.patch
|
Patch1066: system-gtest.patch
|
||||||
Patch1068: system-six.patch
|
Patch1068: system-six.patch
|
||||||
Patch1069: system-usb_ids.patch
|
Patch1069: system-usb_ids.patch
|
||||||
Patch1070: skia-system-vulkan-headers.patch
|
|
||||||
Patch1071: system-pydeps.patch
|
Patch1071: system-pydeps.patch
|
||||||
Patch1072: node-system-icu.patch
|
Patch1072: node-system-icu.patch
|
||||||
Patch1073: system-nasm.patch
|
Patch1073: system-nasm.patch
|
||||||
Patch1074: no-zlib-headers.patch
|
Patch1074: no-zlib-headers.patch
|
||||||
Patch1076: crashpad-use-system-abseil.patch
|
|
||||||
Patch1077: system-wayland.patch
|
Patch1077: system-wayland.patch
|
||||||
Patch1078: system-simdutf.patch
|
Patch1078: system-simdutf.patch
|
||||||
Patch1079: system-libm.patch
|
Patch1079: system-libm.patch
|
||||||
Patch1082: chromium-124-shims.patch
|
|
||||||
Patch1083: Cr126-abseil-shims.patch
|
|
||||||
Patch1084: absl-base-dynamic_annotations.patch
|
|
||||||
Patch1085: webp-no-sharpyuv.patch
|
Patch1085: webp-no-sharpyuv.patch
|
||||||
Patch1086: zip_internal-missing-uLong-Z_DEFAULT_COMPRESSION.patch
|
Patch1086: zip_internal-missing-uLong-Z_DEFAULT_COMPRESSION.patch
|
||||||
Patch1087: system-ada-url.patch
|
Patch1087: system-ada-url.patch
|
||||||
|
Patch1088: cr130-abseil-remove-unused-deps.patch
|
||||||
|
Patch1089: system-absl_algorithm.patch
|
||||||
|
Patch1090: cr130-absl-base.patch
|
||||||
|
|
||||||
|
|
||||||
# PATCHES to fix interaction with third-party software
|
# PATCHES to fix interaction with third-party software
|
||||||
@@ -343,7 +331,6 @@ Patch2012: chromium-94-ffmpeg-roll.patch
|
|||||||
# 'nomerge' attribute cannot be applied to a declaration
|
# 'nomerge' attribute cannot be applied to a declaration
|
||||||
# See https://reviews.llvm.org/D92800
|
# See https://reviews.llvm.org/D92800
|
||||||
Patch2022: electron-13-fix-base-check-nomerge.patch
|
Patch2022: electron-13-fix-base-check-nomerge.patch
|
||||||
Patch2031: partition_alloc-no-lto.patch
|
|
||||||
Patch2032: seccomp_bpf-no-lto.patch
|
Patch2032: seccomp_bpf-no-lto.patch
|
||||||
Patch2034: swiftshader-LLVMJIT-AddressSanitizerPass-dead-code-remove.patch
|
Patch2034: swiftshader-LLVMJIT-AddressSanitizerPass-dead-code-remove.patch
|
||||||
Patch2035: RenderFrameHostImpl-use-after-free.patch
|
Patch2035: RenderFrameHostImpl-use-after-free.patch
|
||||||
@@ -362,20 +349,14 @@ Source2047: bundled-minizip.patch
|
|||||||
Patch2047: bundled-minizip.patch
|
Patch2047: bundled-minizip.patch
|
||||||
%endif
|
%endif
|
||||||
Patch2048: absl2023-encapsulated_web_transport-StrCat.patch
|
Patch2048: absl2023-encapsulated_web_transport-StrCat.patch
|
||||||
Patch2049: libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch
|
|
||||||
# bsc#1224178 deb#1067886
|
|
||||||
Patch2050: bad-font-gc0000.patch
|
|
||||||
Patch2051: bad-font-gc000.patch
|
|
||||||
Patch2052: bad-font-gc00.patch
|
|
||||||
Patch2053: bad-font-gc0.patch
|
|
||||||
Patch2054: bad-font-gc11.patch
|
|
||||||
Patch2055: bad-font-gc1.patch
|
|
||||||
Patch2056: bad-font-gc2.patch
|
|
||||||
Patch2057: bad-font-gc3.patch
|
|
||||||
#Work around gcc14 overly aggressive optimizer.
|
#Work around gcc14 overly aggressive optimizer.
|
||||||
Patch2058: v8-strict-aliasing.patch
|
Patch2058: v8-strict-aliasing.patch
|
||||||
#Fix opus audio not working (eg. Element voice messages)
|
#Fix opus audio not working (eg. Element voice messages)
|
||||||
Patch2059: disable-FFmpegAllowLists.patch
|
Patch2059: disable-FFmpegAllowLists.patch
|
||||||
|
# https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-129-disable-H.264-video-parser-during-demuxing.patch
|
||||||
|
Patch2060: chromium-129-disable-H.264-video-parser-during-demuxing.patch
|
||||||
|
Patch2061: private_aggregation_host-uint128.patch
|
||||||
|
Patch2062: wayland_version.patch
|
||||||
|
|
||||||
|
|
||||||
# PATCHES that should be submitted upstream verbatim or near-verbatim
|
# PATCHES that should be submitted upstream verbatim or near-verbatim
|
||||||
@@ -394,22 +375,19 @@ Patch3138: distributed_point_functions-aes_128_fixed_key_hash-missing-StrCa
|
|||||||
Patch3144: mt21_util-flax-vector-conversions.patch
|
Patch3144: mt21_util-flax-vector-conversions.patch
|
||||||
Patch3149: boringssl-internal-addc-cxx.patch
|
Patch3149: boringssl-internal-addc-cxx.patch
|
||||||
Patch3151: distributed_point_functions-evaluate_prg_hwy-signature.patch
|
Patch3151: distributed_point_functions-evaluate_prg_hwy-signature.patch
|
||||||
Patch3154: licenses.py-FileNotFoundError.patch
|
|
||||||
Patch3161: preview_cancel_reason-missing-string.patch
|
|
||||||
Patch3163: DesktopNativeWidgetAura-HandleActivationChanged-crash.patch
|
|
||||||
Patch3165: http_auth_ntlm_mechanism-could-not-convert-to-base-span.patch
|
|
||||||
Patch3166: angle-State-constexpr.patch
|
|
||||||
Patch3167: color_provider-incomplete-ColorProviderInternal.patch
|
|
||||||
Patch3168: run_segmenter-missing-optional.patch
|
|
||||||
Patch3169: page_popup_controller-missing-optional.patch
|
|
||||||
Patch3170: native_css_paint_definition-expected-unqualified-id.patch
|
|
||||||
Patch3171: text_decoder-missing-optional.patch
|
|
||||||
Patch3172: real_time_reporting_bindings-forward-declaration.patch
|
|
||||||
Patch3173: blink-platform-INSIDE_BLINK-Wodr.patch
|
Patch3173: blink-platform-INSIDE_BLINK-Wodr.patch
|
||||||
Patch3174: quiche-QuicIntervalDeque-no-match-for-operator-mm.patch
|
Patch3174: swiftshader-llvm19-LLVMJIT-getHostCPUFeatures.patch
|
||||||
Patch3175: ConsumeRadii-linker-error.patch
|
Patch3175: swiftshader-llvm19-LLVMReactor-incomplete-Module.patch
|
||||||
Patch3176: swiftshader-llvm19-LLVMJIT-getHostCPUFeatures.patch
|
Patch3176: fix-build-without-service-discovery.patch
|
||||||
Patch3177: swiftshader-llvm19-LLVMReactor-incomplete-Module.patch
|
Patch3177: wayland_connection-Wchanges-meaning.patch
|
||||||
|
Patch3178: ip_protection_data_types-missing-optional.patch
|
||||||
|
Patch3179: account_id-missing-optional.patch
|
||||||
|
Patch3180: skia_image_decoder_base-missing-stack.patch
|
||||||
|
Patch3181: exception_context-missing-variant.patch
|
||||||
|
Patch3182: css_attr_value_tainting-missing-once_flag.patch
|
||||||
|
Patch3183: vtt_scanner-missing-variant.patch
|
||||||
|
Patch3184: electron_usb_delegate-incomplete-UsbDeviceInfo.patch
|
||||||
|
Patch3185: bsc1224178-font-gc.patch
|
||||||
|
|
||||||
# Patches to re-enable upstream force disabled features.
|
# Patches to re-enable upstream force disabled features.
|
||||||
# There's no sense in submitting them but they may be reused as-is by other packagers.
|
# There's no sense in submitting them but they may be reused as-is by other packagers.
|
||||||
@@ -441,10 +419,11 @@ BuildRequires: libatomic
|
|||||||
%if %{with system_ada}
|
%if %{with system_ada}
|
||||||
BuildRequires: cmake(ada)
|
BuildRequires: cmake(ada)
|
||||||
%endif
|
%endif
|
||||||
%if %{with system_aom}
|
%if %{with aom_38}
|
||||||
|
BuildRequires: libaom-devel >= 3.8~
|
||||||
|
%endif
|
||||||
# requires AV1E_SET_QUANTIZER_ONE_PASS
|
# requires AV1E_SET_QUANTIZER_ONE_PASS
|
||||||
BuildRequires: libaom-devel >= 3.7~
|
BuildRequires: libaom-devel >= 3.7~
|
||||||
%endif
|
|
||||||
BuildRequires: libbsd-devel
|
BuildRequires: libbsd-devel
|
||||||
BuildRequires: libpng-devel
|
BuildRequires: libpng-devel
|
||||||
BuildRequires: libXNVCtrl-devel
|
BuildRequires: libXNVCtrl-devel
|
||||||
@@ -459,7 +438,7 @@ BuildRequires: memory-constraints
|
|||||||
BuildRequires: mold
|
BuildRequires: mold
|
||||||
%endif
|
%endif
|
||||||
%ifarch %ix86 x86_64 %x86_64
|
%ifarch %ix86 x86_64 %x86_64
|
||||||
%if %{without system_aom} || %{without system_vpx}
|
%if %{without system_vpx}
|
||||||
BuildRequires: nasm
|
BuildRequires: nasm
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@@ -495,7 +474,13 @@ BuildRequires: snappy-devel
|
|||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: util-linux
|
BuildRequires: util-linux
|
||||||
BuildRequires: vulkan-headers
|
%if %{with system_vk_headers}
|
||||||
|
# Actually we need also SpvFPEncoding from spirv-headers but Fedora version is non-indicative.
|
||||||
|
# Let's only specify the vulkan version because they are usually updated together.
|
||||||
|
BuildRequires: vulkan-headers >= 1.3.296
|
||||||
|
%endif
|
||||||
|
#For skia, needed anyway
|
||||||
|
BuildRequires: vulkan-headers >= 1.3
|
||||||
%if %{with system_vma}
|
%if %{with system_vma}
|
||||||
BuildRequires: VulkanMemoryAllocator-devel >= 3
|
BuildRequires: VulkanMemoryAllocator-devel >= 3
|
||||||
%endif
|
%endif
|
||||||
@@ -555,10 +540,7 @@ BuildRequires: pkgconfig(glib-2.0)
|
|||||||
BuildRequires: pkgconfig(glproto)
|
BuildRequires: pkgconfig(glproto)
|
||||||
BuildRequires: pkgconfig(gtest) >= 1.12
|
BuildRequires: pkgconfig(gtest) >= 1.12
|
||||||
BuildRequires: pkgconfig(gtk+-3.0)
|
BuildRequires: pkgconfig(gtk+-3.0)
|
||||||
BuildRequires: pkgconfig(harfbuzz) >= 3
|
|
||||||
%if %{with harfbuzz_5}
|
|
||||||
BuildRequires: pkgconfig(harfbuzz) >= 5
|
BuildRequires: pkgconfig(harfbuzz) >= 5
|
||||||
%endif
|
|
||||||
BuildRequires: pkgconfig(icu-i18n) >= 73
|
BuildRequires: pkgconfig(icu-i18n) >= 73
|
||||||
BuildRequires: pkgconfig(jsoncpp)
|
BuildRequires: pkgconfig(jsoncpp)
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
@@ -597,6 +579,7 @@ BuildRequires: pkgconfig(libnotify)
|
|||||||
BuildRequires: pkgconfig(libpci)
|
BuildRequires: pkgconfig(libpci)
|
||||||
BuildRequires: pkgconfig(libpulse)
|
BuildRequires: pkgconfig(libpulse)
|
||||||
BuildRequires: pkgconfig(libsecret-1)
|
BuildRequires: pkgconfig(libsecret-1)
|
||||||
|
BuildRequires: pkgconfig(libudev)
|
||||||
%if %{with vaapi}
|
%if %{with vaapi}
|
||||||
BuildRequires: pkgconfig(libva)
|
BuildRequires: pkgconfig(libva)
|
||||||
%endif
|
%endif
|
||||||
@@ -607,8 +590,8 @@ BuildRequires: pkgconfig(libxslt)
|
|||||||
BuildRequires: pkgconfig(libxxhash)
|
BuildRequires: pkgconfig(libxxhash)
|
||||||
%if %{with system_yuv}
|
%if %{with system_yuv}
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
# needs I410ToI420
|
# needs I010ToNV12
|
||||||
BuildRequires: pkgconfig(libyuv) >= 1855
|
BuildRequires: pkgconfig(libyuv) >= 1894
|
||||||
%endif
|
%endif
|
||||||
# Fedora does not provide meaningful versioning, sorry
|
# Fedora does not provide meaningful versioning, sorry
|
||||||
BuildRequires: pkgconfig(libyuv)
|
BuildRequires: pkgconfig(libyuv)
|
||||||
@@ -635,22 +618,17 @@ BuildRequires: pkgconfig(Qt6Widgets)
|
|||||||
#re2-11 has abseil as a public dependency. If you use system re2 you must use system abseil.
|
#re2-11 has abseil as a public dependency. If you use system re2 you must use system abseil.
|
||||||
BuildRequires: cmake(re2) >= 11
|
BuildRequires: cmake(re2) >= 11
|
||||||
%endif
|
%endif
|
||||||
%if %{with system_spirv}
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
BuildRequires: spirv-headers
|
BuildRequires: spirv-headers
|
||||||
%else
|
%else
|
||||||
BuildRequires: spirv-headers-devel
|
BuildRequires: spirv-headers-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig(SPIRV-Tools) >= 2022.2
|
BuildRequires: pkgconfig(SPIRV-Tools) >= 2022.2
|
||||||
BuildRequires: vulkan-headers >= 1.3
|
|
||||||
%endif
|
|
||||||
%if %{with link_vulkan}
|
|
||||||
BuildRequires: pkgconfig(vulkan) >= 1.3
|
BuildRequires: pkgconfig(vulkan) >= 1.3
|
||||||
|
%if %{with wayland_34}
|
||||||
|
BuildRequires: pkgconfig(wayland-protocols) >= 1.33
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig(wayland-protocols)
|
|
||||||
%if %{with wayland_32}
|
|
||||||
BuildRequires: pkgconfig(wayland-protocols) >= 1.32
|
BuildRequires: pkgconfig(wayland-protocols) >= 1.32
|
||||||
%endif
|
|
||||||
BuildRequires: pkgconfig(xkbcommon)
|
BuildRequires: pkgconfig(xkbcommon)
|
||||||
BuildRequires: pkgconfig(xshmfence)
|
BuildRequires: pkgconfig(xshmfence)
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
@@ -679,14 +657,6 @@ BuildRequires: pkgconfig(libspa-0.2)
|
|||||||
Requires: hicolor-icon-theme
|
Requires: hicolor-icon-theme
|
||||||
Requires: google-roboto-fonts
|
Requires: google-roboto-fonts
|
||||||
|
|
||||||
# This required library is dlopened
|
|
||||||
%if %{without link_vulkan}
|
|
||||||
%ifarch %ix86 %arm
|
|
||||||
Requires: libvulkan.so.1
|
|
||||||
%else
|
|
||||||
Requires: libvulkan.so.1()(64bit)
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with qt}
|
%if %{with qt}
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
@@ -762,10 +732,28 @@ providing better integration with desktop environments such as KDE.
|
|||||||
test $(grep ^node_module_version electron/build/args/all.gn | sed 's/.* = //') = %abi_version
|
test $(grep ^node_module_version electron/build/args/all.gn | sed 's/.* = //') = %abi_version
|
||||||
|
|
||||||
%if %{without system_abseil}
|
%if %{without system_abseil}
|
||||||
patch -R -p1 < %PATCH1076
|
#patch -R -p1 < %PATCH1076
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
#These ones depend on an aom nightly, reverting unconditionally
|
||||||
|
patch -R -p1 < %SOURCE411
|
||||||
|
patch -R -p1 < %SOURCE410
|
||||||
|
|
||||||
|
%if %{without aom_38}
|
||||||
|
patch -R -p1 < %SOURCE412
|
||||||
|
patch -R -p1 < %SOURCE413
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without wayland_34}
|
||||||
|
patch -R -p1 < %PATCH3177
|
||||||
|
patch -R -p1 < %SOURCE422
|
||||||
|
patch -R -p1 < %SOURCE421
|
||||||
|
patch -R -p1 < %SOURCE420
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with ffmpeg_6}
|
%if %{with ffmpeg_6}
|
||||||
patch -R -p1 < %PATCH2012
|
patch -R -p1 < %PATCH2012
|
||||||
%else
|
%else
|
||||||
@@ -777,15 +765,8 @@ patch -R -p1 < %SOURCE401
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
%if %{without harfbuzz_5}
|
|
||||||
patch -R -p1 < %SOURCE415
|
|
||||||
patch -R -p1 < %SOURCE416
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%if %{without wayland_32}
|
|
||||||
patch -R -p1 < %SOURCE450
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -793,6 +774,11 @@ patch -R -p1 < %SOURCE450
|
|||||||
# This one depends on an abseil nightly, reverting unconditionally.
|
# This one depends on an abseil nightly, reverting unconditionally.
|
||||||
patch -R -p1 < %SOURCE460
|
patch -R -p1 < %SOURCE460
|
||||||
|
|
||||||
|
#Replace non-free rollup 4.x with rollup 3.x. This probably won't last for long and we will have to figure out how to build rollup 4
|
||||||
|
rm -rf third_party/node/node_modules/@rollup/wasm-node/
|
||||||
|
ln -srvT third_party/devtools-frontend/src/node_modules/rollup third_party/node/node_modules/@rollup/wasm-node
|
||||||
|
|
||||||
|
|
||||||
# Link system wayland-protocols-devel into where chrome expects them
|
# Link system wayland-protocols-devel into where chrome expects them
|
||||||
mkdir -p third_party/wayland/src
|
mkdir -p third_party/wayland/src
|
||||||
mkdir -p third_party/wayland-protocols/kde/src
|
mkdir -p third_party/wayland-protocols/kde/src
|
||||||
@@ -830,6 +816,7 @@ gn_system_libraries=(
|
|||||||
highway
|
highway
|
||||||
icu
|
icu
|
||||||
jsoncpp
|
jsoncpp
|
||||||
|
libaom
|
||||||
libdrm
|
libdrm
|
||||||
libevent
|
libevent
|
||||||
libjpeg
|
libjpeg
|
||||||
@@ -845,6 +832,9 @@ gn_system_libraries=(
|
|||||||
woff2
|
woff2
|
||||||
zlib
|
zlib
|
||||||
zstd
|
zstd
|
||||||
|
swiftshader-SPIRV-Headers
|
||||||
|
swiftshader-SPIRV-Tools
|
||||||
|
vulkan-SPIRV-Tools
|
||||||
)
|
)
|
||||||
|
|
||||||
%if %{with system_abseil}
|
%if %{with system_abseil}
|
||||||
@@ -875,10 +865,6 @@ gn_system_libraries+=(
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with system_aom}
|
|
||||||
find third_party/libaom -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
|
||||||
gn_system_libraries+=( libaom )
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with system_avif}
|
%if %{with system_avif}
|
||||||
find third_party/libavif -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
find third_party/libavif -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
||||||
@@ -899,19 +885,10 @@ gn_system_libraries+=( re2 )
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with system_spirv}
|
%if %{with system_vk_headers}
|
||||||
find third_party/swiftshader/third_party/SPIRV-Headers/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
find third_party/vulkan-headers -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
||||||
find third_party/swiftshader/third_party/SPIRV-Tools/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
find third_party/spirv-headers -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
||||||
|
gn_system_libraries+=( vulkan-SPIRV-Headers )
|
||||||
find third_party/vulkan-deps/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
|
||||||
|
|
||||||
gn_system_libraries+=(
|
|
||||||
swiftshader-SPIRV-Headers
|
|
||||||
swiftshader-SPIRV-Tools
|
|
||||||
#The following can only be unbundled if you don't build DAWN (WebGPU)
|
|
||||||
vulkan-SPIRV-Headers
|
|
||||||
vulkan-SPIRV-Tools
|
|
||||||
)
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with system_vma}
|
%if %{with system_vma}
|
||||||
@@ -932,9 +909,6 @@ gn_system_libraries+=( libyuv )
|
|||||||
|
|
||||||
build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries[@]}
|
build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries[@]}
|
||||||
|
|
||||||
%if %{with link_vulkan}
|
|
||||||
find third_party/angle/src/third_party/volk -type f ! -name "*.gn" -a ! -name "*.gni" -delete
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with system_ada}
|
%if %{with system_ada}
|
||||||
find third_party/electron_node/deps/ada -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete
|
find third_party/electron_node/deps/ada -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete
|
||||||
@@ -1025,7 +999,8 @@ export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-g /-g1 /g' -e 's/-g$/-g1/g')"
|
|||||||
|
|
||||||
%ifarch aarch64
|
%ifarch aarch64
|
||||||
%if %{with lto}
|
%if %{with lto}
|
||||||
export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-g /-g1 /g' -e 's/-g$/-g1/g')"
|
# Out of memory: Killed process 4016 (lto1-wpa)
|
||||||
|
export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-g /-g0 /g' -e 's/-g$/-g0/g')"
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -1155,9 +1130,7 @@ myconf_gn+=" use_cups=false"
|
|||||||
|
|
||||||
# link libvulkan.so and libGLX.so instead of dlopening
|
# link libvulkan.so and libGLX.so instead of dlopening
|
||||||
myconf_gn+=" angle_use_custom_libvulkan=false"
|
myconf_gn+=" angle_use_custom_libvulkan=false"
|
||||||
%if %{with link_vulkan}
|
|
||||||
myconf_gn+=" angle_shared_libvulkan=false"
|
myconf_gn+=" angle_shared_libvulkan=false"
|
||||||
%endif
|
|
||||||
myconf_gn+=" angle_link_glx=true"
|
myconf_gn+=" angle_link_glx=true"
|
||||||
|
|
||||||
#Use faster flat_map instead of fallback std::unordered_map implementation in ANGLE.
|
#Use faster flat_map instead of fallback std::unordered_map implementation in ANGLE.
|
||||||
@@ -1175,6 +1148,7 @@ myconf_gn+=' angle_enable_swiftshader=true'
|
|||||||
|
|
||||||
# do not build PDF support
|
# do not build PDF support
|
||||||
myconf_gn+=" enable_pdf=false"
|
myconf_gn+=" enable_pdf=false"
|
||||||
|
myconf_gn+=' enable_pdf_ink2=false'
|
||||||
myconf_gn+=" enable_pdf_viewer=false"
|
myconf_gn+=" enable_pdf_viewer=false"
|
||||||
myconf_gn+=" enable_print_preview=false"
|
myconf_gn+=" enable_print_preview=false"
|
||||||
myconf_gn+=" enable_printing=false"
|
myconf_gn+=" enable_printing=false"
|
||||||
@@ -1203,8 +1177,12 @@ myconf_gn+=' enable_electron_extensions=false'
|
|||||||
# [10675s] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.cc:9244
|
# [10675s] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.cc:9244
|
||||||
myconf_gn+=' symbol_level=1'
|
myconf_gn+=' symbol_level=1'
|
||||||
%else
|
%else
|
||||||
|
%if %{without lto}
|
||||||
|
myconf_gn+=' symbol_level=1' # relocation truncated to fit
|
||||||
|
%else
|
||||||
myconf_gn+=' symbol_level=2'
|
myconf_gn+=' symbol_level=2'
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
myconf_gn+=' blink_symbol_level=1'
|
myconf_gn+=' blink_symbol_level=1'
|
||||||
myconf_gn+=' v8_symbol_level=1'
|
myconf_gn+=' v8_symbol_level=1'
|
||||||
%endif
|
%endif
|
||||||
@@ -1217,7 +1195,6 @@ myconf_gn+=" v8_symbol_level=0"
|
|||||||
%ifarch aarch64
|
%ifarch aarch64
|
||||||
%if %{with lto}
|
%if %{with lto}
|
||||||
# linker OOM, sorry.
|
# linker OOM, sorry.
|
||||||
# we still seem to get some debug generated during linking when LTO is enabled
|
|
||||||
myconf_gn+=' symbol_level=0'
|
myconf_gn+=' symbol_level=0'
|
||||||
myconf_gn+=' blink_symbol_level=0'
|
myconf_gn+=' blink_symbol_level=0'
|
||||||
myconf_gn+=' v8_symbol_level=0'
|
myconf_gn+=' v8_symbol_level=0'
|
||||||
@@ -1231,6 +1208,9 @@ myconf_gn+=' v8_symbol_level=1'
|
|||||||
#symbol_level should not affect generated code.
|
#symbol_level should not affect generated code.
|
||||||
myconf_gn+=' enable_stack_trace_line_numbers=true'
|
myconf_gn+=' enable_stack_trace_line_numbers=true'
|
||||||
|
|
||||||
|
#This does nothing since we patch the config out, but is needed to avoid an assert
|
||||||
|
myconf_gn+=' use_debug_fission=true'
|
||||||
|
|
||||||
|
|
||||||
# do not build some chrome features not used by electron
|
# do not build some chrome features not used by electron
|
||||||
# (some of these only go to buildflag_headers and are dead code rn, but disabling them preemptively as long as they're visible)
|
# (some of these only go to buildflag_headers and are dead code rn, but disabling them preemptively as long as they're visible)
|
||||||
@@ -1239,9 +1219,7 @@ myconf_gn+=" enable_reading_list=false"
|
|||||||
myconf_gn+=" enable_reporting=false"
|
myconf_gn+=" enable_reporting=false"
|
||||||
myconf_gn+=" build_with_tflite_lib=false"
|
myconf_gn+=" build_with_tflite_lib=false"
|
||||||
myconf_gn+=" build_tflite_with_xnnpack=false"
|
myconf_gn+=" build_tflite_with_xnnpack=false"
|
||||||
myconf_gn+=" build_webnn_with_xnnpack=false"
|
|
||||||
myconf_gn+=" safe_browsing_mode=0"
|
myconf_gn+=" safe_browsing_mode=0"
|
||||||
myconf_gn+=" enable_maldoca=false"
|
|
||||||
myconf_gn+=" enable_captive_portal_detection=false"
|
myconf_gn+=" enable_captive_portal_detection=false"
|
||||||
myconf_gn+=" enable_browser_speech_service=false"
|
myconf_gn+=" enable_browser_speech_service=false"
|
||||||
myconf_gn+=" enable_speech_service=false"
|
myconf_gn+=" enable_speech_service=false"
|
||||||
@@ -1256,17 +1234,14 @@ myconf_gn+=" enable_webui_tab_strip=false"
|
|||||||
myconf_gn+=" enable_webui_certificate_viewer=false"
|
myconf_gn+=" enable_webui_certificate_viewer=false"
|
||||||
myconf_gn+=" enable_background_contents=false"
|
myconf_gn+=" enable_background_contents=false"
|
||||||
myconf_gn+=" enable_extractors=false"
|
myconf_gn+=" enable_extractors=false"
|
||||||
myconf_gn+=" enable_feed_v2=false"
|
|
||||||
myconf_gn+=" ozone_platform_headless=false"
|
myconf_gn+=" ozone_platform_headless=false"
|
||||||
myconf_gn+=" angle_enable_gl_null=false"
|
myconf_gn+=" angle_enable_gl_null=false"
|
||||||
myconf_gn+=" enable_paint_preview=false"
|
myconf_gn+=" enable_paint_preview=false"
|
||||||
myconf_gn+=" use_bundled_weston=false"
|
myconf_gn+=" use_bundled_weston=false"
|
||||||
myconf_gn+=" enable_component_updater=false"
|
|
||||||
myconf_gn+=" enable_lens_desktop=false"
|
myconf_gn+=" enable_lens_desktop=false"
|
||||||
myconf_gn+=' enable_bound_session_credentials=false'
|
myconf_gn+=' enable_bound_session_credentials=false'
|
||||||
myconf_gn+=' enable_chrome_notifications=false'
|
myconf_gn+=' enable_chrome_notifications=false'
|
||||||
myconf_gn+=' enable_message_center=false'
|
myconf_gn+=' enable_message_center=false'
|
||||||
myconf_gn+=' enable_system_notifications=false'
|
|
||||||
myconf_gn+=' enable_supervised_users=false'
|
myconf_gn+=' enable_supervised_users=false'
|
||||||
myconf_gn+=' enable_compose=false'
|
myconf_gn+=' enable_compose=false'
|
||||||
myconf_gn+=' enterprise_cloud_content_analysis=false'
|
myconf_gn+=' enterprise_cloud_content_analysis=false'
|
||||||
@@ -1278,15 +1253,16 @@ myconf_gn+=' use_fake_screen_ai=true'
|
|||||||
myconf_gn+=' webnn_use_tflite=false'
|
myconf_gn+=' webnn_use_tflite=false'
|
||||||
myconf_gn+=' structured_metrics_enabled=false'
|
myconf_gn+=' structured_metrics_enabled=false'
|
||||||
myconf_gn+=' structured_metrics_debug_enabled=false'
|
myconf_gn+=' structured_metrics_debug_enabled=false'
|
||||||
|
myconf_gn+=' build_dawn_tests=false'
|
||||||
|
myconf_gn+=' enable_compute_pressure=false'
|
||||||
|
myconf_fn+=' enable_guest_view=false'
|
||||||
|
|
||||||
|
|
||||||
#FIXME: possibly enable this when skia gets built with rust code by default.
|
#FIXME: possibly enable this when skia gets built with rust code by default.
|
||||||
#Need to patch in optflags and possibly FFI LTO hacks (see signal-desktop package for how it's done)
|
#Need to patch in optflags and possibly FFI LTO hacks (see signal-desktop package for how it's done)
|
||||||
myconf_gn+=' enable_rust=false'
|
myconf_gn+=' enable_rust=false'
|
||||||
myconf_gn+=' enable_chromium_prelude=false'
|
myconf_gn+=' enable_chromium_prelude=false'
|
||||||
myconf_gn+=' enable_cxx=false'
|
|
||||||
|
|
||||||
myconf_gn+=' chrome_certificate_policies_supported=false'
|
|
||||||
myconf_gn+=' chrome_root_store_cert_management_ui=false'
|
myconf_gn+=' chrome_root_store_cert_management_ui=false'
|
||||||
myconf_gn+=' use_kerberos=false'
|
myconf_gn+=' use_kerberos=false'
|
||||||
|
|
||||||
@@ -1298,6 +1274,7 @@ myconf_gn+=' disable_histogram_support=true'
|
|||||||
myconf_gn+=" enable_remoting=false"
|
myconf_gn+=" enable_remoting=false"
|
||||||
myconf_gn+=" enable_media_remoting=false"
|
myconf_gn+=" enable_media_remoting=false"
|
||||||
myconf_gn+=" enable_service_discovery=false"
|
myconf_gn+=" enable_service_discovery=false"
|
||||||
|
myconf_gn+=' enable_mdns=false'
|
||||||
|
|
||||||
#disable some debug/tracing hooks, they increase size and we do not build chrome://tracing anyway (see disable-catapult.patch)
|
#disable some debug/tracing hooks, they increase size and we do not build chrome://tracing anyway (see disable-catapult.patch)
|
||||||
myconf_gn+=" enable_trace_logging=false"
|
myconf_gn+=" enable_trace_logging=false"
|
||||||
@@ -1348,6 +1325,7 @@ myconf_gn+=" v8_use_external_startup_data=true"
|
|||||||
myconf_gn+=" use_system_zlib=true"
|
myconf_gn+=" use_system_zlib=true"
|
||||||
myconf_gn+=" use_system_libjpeg=true"
|
myconf_gn+=" use_system_libjpeg=true"
|
||||||
myconf_gn+=" use_system_libpng=true"
|
myconf_gn+=" use_system_libpng=true"
|
||||||
|
myconf_gn+=' use_system_libwayland=true'
|
||||||
|
|
||||||
#we don't build PDF support, so disabling the below:
|
#we don't build PDF support, so disabling the below:
|
||||||
#myconf_gn+=" use_system_lcms2=true"
|
#myconf_gn+=" use_system_lcms2=true"
|
||||||
@@ -1370,7 +1348,6 @@ myconf_gn+=" use_system_histogram=true"
|
|||||||
myconf_gn+=' use_system_simdutf=true'
|
myconf_gn+=' use_system_simdutf=true'
|
||||||
%endif
|
%endif
|
||||||
myconf_gn+=" is_clang=false"
|
myconf_gn+=" is_clang=false"
|
||||||
myconf_gn+=" use_gold=false"
|
|
||||||
|
|
||||||
%if %{with lto}
|
%if %{with lto}
|
||||||
myconf_gn+=" gcc_lto=true"
|
myconf_gn+=" gcc_lto=true"
|
||||||
@@ -1405,6 +1382,8 @@ myconf_gn+=' skia_use_dawn=false'
|
|||||||
myconf_gn+=" proprietary_codecs=true"
|
myconf_gn+=" proprietary_codecs=true"
|
||||||
myconf_gn+=" ffmpeg_branding=\"Chrome\""
|
myconf_gn+=" ffmpeg_branding=\"Chrome\""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# GN does not support passing cflags:
|
# GN does not support passing cflags:
|
||||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=642016
|
# https://bugs.chromium.org/p/chromium/issues/detail?id=642016
|
||||||
gn gen out/Release --testonly=false --args="import(\"//electron/build/args/release.gn\") ${myconf_gn}"
|
gn gen out/Release --testonly=false --args="import(\"//electron/build/args/release.gn\") ${myconf_gn}"
|
||||||
|
@@ -1,42 +0,0 @@
|
|||||||
From f3fce92b27296068b4c304321b53bd1c7c4beb61 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "lauren n. liberda" <lauren@selfisekai.rocks>
|
|
||||||
Date: Tue, 28 May 2024 17:54:26 +0000
|
|
||||||
Subject: [PATCH] iwyu: missing <optional> in page_popup_controller.h
|
|
||||||
|
|
||||||
Bug: 41455655
|
|
||||||
Change-Id: I6483b9ec9d3c4acc08fb2bce8cac409c32a06dc4
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5569043
|
|
||||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
||||||
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
||||||
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1306871}
|
|
||||||
---
|
|
||||||
AUTHORS | 1 +
|
|
||||||
third_party/blink/renderer/core/page/page_popup_controller.h | 2 ++
|
|
||||||
2 files changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/AUTHORS b/AUTHORS
|
|
||||||
index eba1dc976d8fa0..715e108aca1c3d 100644
|
|
||||||
--- a/AUTHORS
|
|
||||||
+++ b/AUTHORS
|
|
||||||
@@ -818,6 +818,7 @@ Lalit Chandivade <lalit.chandivade@einfochips.com>
|
|
||||||
Lam Lu <lamlu@amazon.com>
|
|
||||||
Laszlo Gombos <l.gombos@samsung.com>
|
|
||||||
Laszlo Radanyi <bekkra@gmail.com>
|
|
||||||
+lauren n. liberda <lauren@selfisekai.rocks>
|
|
||||||
Lauren Yeun Kim <lauren.yeun.kim@gmail.com>
|
|
||||||
Lauri Oherd <lauri.oherd@gmail.com>
|
|
||||||
Lavar Askew <open.hyperion@gmail.com>
|
|
||||||
diff --git a/third_party/blink/renderer/core/page/page_popup_controller.h b/third_party/blink/renderer/core/page/page_popup_controller.h
|
|
||||||
index 5da38d0b9ab26f..c4e8e865fa96d3 100644
|
|
||||||
--- a/third_party/blink/renderer/core/page/page_popup_controller.h
|
|
||||||
+++ b/third_party/blink/renderer/core/page/page_popup_controller.h
|
|
||||||
@@ -31,6 +31,8 @@
|
|
||||||
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PAGE_POPUP_CONTROLLER_H_
|
|
||||||
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PAGE_POPUP_CONTROLLER_H_
|
|
||||||
|
|
||||||
+#include <optional>
|
|
||||||
+
|
|
||||||
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
|
|
||||||
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
|
|
||||||
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
|
@@ -1,72 +0,0 @@
|
|||||||
Compile files which declare functions in inline assembly without LTO due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57703
|
|
||||||
|
|
||||||
--- src/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-07-24 12:50:43.409128966 +0200
|
|
||||||
+++ src/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn 2024-07-26 13:37:20.891041131 +0200
|
|
||||||
@@ -107,6 +107,31 @@ source_set("build_config") {
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
+static_library("allocator_core_asm") {
|
|
||||||
+ if (gcc_lto) {
|
|
||||||
+ configs -= [ "//build/config/compiler:gcc_lto" ]
|
|
||||||
+ }
|
|
||||||
+ if (current_cpu == "x64") {
|
|
||||||
+ assert(stack_scan_supported)
|
|
||||||
+ sources = [ "stack/asm/x64/push_registers_asm.cc" ]
|
|
||||||
+ } else if (current_cpu == "x86") {
|
|
||||||
+ assert(stack_scan_supported)
|
|
||||||
+ sources = [ "stack/asm/x86/push_registers_asm.cc" ]
|
|
||||||
+ } else if (current_cpu == "arm") {
|
|
||||||
+ assert(stack_scan_supported)
|
|
||||||
+ sources = [ "stack/asm/arm/push_registers_asm.cc" ]
|
|
||||||
+ } else if (current_cpu == "arm64") {
|
|
||||||
+ assert(stack_scan_supported)
|
|
||||||
+ sources = [ "stack/asm/arm64/push_registers_asm.cc" ]
|
|
||||||
+ } else if (current_cpu == "riscv64") {
|
|
||||||
+ assert(stack_scan_supported)
|
|
||||||
+ sources = [ "stack/asm/riscv64/push_registers_asm.cc" ]
|
|
||||||
+ } else {
|
|
||||||
+ # To support a trampoline for another arch, please refer to v8/src/heap/base.
|
|
||||||
+ assert(!stack_scan_supported)
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
component("raw_ptr") {
|
|
||||||
# `gn check` is unhappy with most `#includes` when PA isn't
|
|
||||||
# actually built.
|
|
||||||
@@ -522,24 +547,9 @@ if (is_clang_or_gcc) {
|
|
||||||
# The Android NDK supports PR_MTE_* macros as of NDK r23.
|
|
||||||
defines += [ "HAS_PR_MTE_MACROS" ]
|
|
||||||
}
|
|
||||||
- if (current_cpu == "x64") {
|
|
||||||
- assert(stack_scan_supported)
|
|
||||||
- sources += [ "stack/asm/x64/push_registers_asm.cc" ]
|
|
||||||
- } else if (current_cpu == "x86") {
|
|
||||||
- assert(stack_scan_supported)
|
|
||||||
- sources += [ "stack/asm/x86/push_registers_asm.cc" ]
|
|
||||||
- } else if (current_cpu == "arm") {
|
|
||||||
- assert(stack_scan_supported)
|
|
||||||
- sources += [ "stack/asm/arm/push_registers_asm.cc" ]
|
|
||||||
- } else if (current_cpu == "arm64") {
|
|
||||||
- assert(stack_scan_supported)
|
|
||||||
- sources += [ "stack/asm/arm64/push_registers_asm.cc" ]
|
|
||||||
- } else if (current_cpu == "riscv64") {
|
|
||||||
- assert(stack_scan_supported)
|
|
||||||
- sources += [ "stack/asm/riscv64/push_registers_asm.cc" ]
|
|
||||||
- } else {
|
|
||||||
- # To support a trampoline for another arch, please refer to v8/src/heap/base.
|
|
||||||
- assert(!stack_scan_supported)
|
|
||||||
+ deps = [ ":allocator_base" ]
|
|
||||||
+ if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" || current_cpu == "arm64" || current_cpu == "riscv64") {
|
|
||||||
+ deps += [ ":allocator_core_asm" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO(crbug.com/40274683): once we evaluate pool offset freelists,
|
|
||||||
@@ -563,7 +573,6 @@ if (is_clang_or_gcc) {
|
|
||||||
":memory_tagging",
|
|
||||||
":wexit_time_destructors",
|
|
||||||
]
|
|
||||||
- deps = [ ":allocator_base" ]
|
|
||||||
public_configs = []
|
|
||||||
if (is_android) {
|
|
||||||
# tagging.cc requires __arm_mte_set_* functions.
|
|
@@ -1,11 +0,0 @@
|
|||||||
--- src/content/public/browser/preview_cancel_reason.h.orig 2024-05-30 22:55:47.180621500 +0000
|
|
||||||
+++ src/content/public/browser/preview_cancel_reason.h 2024-05-31 07:46:06.285116500 +0000
|
|
||||||
@@ -5,6 +5,8 @@
|
|
||||||
#ifndef CONTENT_PUBLIC_BROWSER_PREVIEW_CANCEL_REASON_H_
|
|
||||||
#define CONTENT_PUBLIC_BROWSER_PREVIEW_CANCEL_REASON_H_
|
|
||||||
|
|
||||||
+#include <string>
|
|
||||||
+
|
|
||||||
#include "content/common/content_export.h"
|
|
||||||
#include "third_party/abseil-cpp/absl/types/variant.h"
|
|
||||||
|
|
42
private_aggregation_host-uint128.patch
Normal file
42
private_aggregation_host-uint128.patch
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
Abseil's int128 hasd broken comparison under gcc:
|
||||||
|
|
||||||
|
In file included from /usr/include/c++/14/string:49,
|
||||||
|
from ../../content/browser/private_aggregation/private_aggregation_host.h:11:
|
||||||
|
/usr/include/c++/14/bits/stl_function.h: In instantiation of ‘constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = content::{anonymous}::ContributionMergeKey]’:
|
||||||
|
/usr/include/c++/14/bits/stl_map.h:599:37: required from ‘std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Val>, std::_Select1st<std::pair<const _Key, _Val> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::emplace(_Args&& ...) [with _Args = {content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution&}; _Key = content::{anonymous}::ContributionMergeKey; _Tp = blink::mojom::AggregatableReportHistogramContribution; _Compare = std::less<content::{anonymous}::ContributionMergeKey>; _Alloc = std::allocator<std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution> >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Val>, std::_Select1st<std::pair<const _Key, _Val> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other>::iterator = std::_Rb_tree<content::{anonymous}::ContributionMergeKey, std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution>, std::_Select1st<std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution> >, std::less<content::{anonymous}::ContributionMergeKey>, std::allocator<std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution> > >::iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other = std::allocator<std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution> >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> > = __gnu_cxx::__alloc_traits<std::allocator<std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution> >, std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution> >::rebind<std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution> >; typename _Allocator::value_type = std::pair<const content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution>]’
|
||||||
|
599 | if (__i == end() || key_comp()(__k, (*__i).first))
|
||||||
|
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
|
||||||
|
../../content/browser/private_aggregation/private_aggregation_host.cc:457:37: required from here
|
||||||
|
457 | accepted_contributions.emplace(std::move(merge_key),
|
||||||
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
458 | *std::move(contribution));
|
||||||
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
/usr/include/c++/14/bits/stl_function.h:405:20: error: use of deleted function ‘constexpr auto content::{anonymous}::ContributionMergeKey::operator<=>(const content::{anonymous}::ContributionMergeKey&) const’
|
||||||
|
405 | { return __x < __y; }
|
||||||
|
| ~~~~^~~~~
|
||||||
|
../../content/browser/private_aggregation/private_aggregation_host.cc:141:8: note: ‘constexpr auto content::{anonymous}::ContributionMergeKey::operator<=>(const content::{anonymous}::ContributionMergeKey&) const’ is implicitly deleted because the default definition would be ill-formed:
|
||||||
|
141 | auto operator<=>(const ContributionMergeKey& a) const = default;
|
||||||
|
| ^~~~~~~~
|
||||||
|
../../content/browser/private_aggregation/private_aggregation_host.cc:143:17: note: three-way comparison of ‘content::{anonymous}::ContributionMergeKey::bucket’ has type ‘absl::lts_20240722::strong_ordering’, not a comparison category type
|
||||||
|
143 | absl::uint128 bucket;
|
||||||
|
| ^~~~~~
|
||||||
|
|
||||||
|
--- src/content/browser/private_aggregation/private_aggregation_host.cc 2025-01-02 22:23:57.594885484 +0100
|
||||||
|
+++ /var/tmp/build-root/openSUSE_Tumbleweed-x86_64/home/abuild/rpmbuild/BUILD/src/content/browser/private_aggregation/private_aggregation_host.cc 2025-01-03 21:33:27.795544465 +0100
|
||||||
|
@@ -51,7 +51,6 @@
|
||||||
|
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||||
|
#include "mojo/public/cpp/bindings/receiver_set.h"
|
||||||
|
#include "services/network/public/cpp/is_potentially_trustworthy.h"
|
||||||
|
-#include "third_party/abseil-cpp/absl/numeric/int128.h"
|
||||||
|
#include "third_party/blink/public/common/features.h"
|
||||||
|
#include "third_party/blink/public/mojom/aggregation_service/aggregatable_report.mojom.h"
|
||||||
|
#include "third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom.h"
|
||||||
|
@@ -140,7 +139,7 @@ struct ContributionMergeKey {
|
||||||
|
|
||||||
|
auto operator<=>(const ContributionMergeKey& a) const = default;
|
||||||
|
|
||||||
|
- absl::uint128 bucket;
|
||||||
|
+ unsigned __int128 bucket;
|
||||||
|
uint64_t filtering_id;
|
||||||
|
};
|
||||||
|
|
@@ -1,67 +0,0 @@
|
|||||||
From d3bc5ffc929b0895ae9e16774069a04ae6fe3c58 Mon Sep 17 00:00:00 2001
|
|
||||||
From: bnc <bnc@google.com>
|
|
||||||
Date: Mon, 13 May 2024 12:28:35 -0700
|
|
||||||
Subject: [PATCH] Add some QuicIntervalDeque::Iterator methods.
|
|
||||||
|
|
||||||
GCC requires operator-=() and operator--() to be defined for std::advance for
|
|
||||||
random access iterators.
|
|
||||||
|
|
||||||
Also, `QUICHE_DCHECK_LE(0u, index_)` is always true as `index_` is unsigned,
|
|
||||||
causing a warning that is promoted to an error in some environments. This CL
|
|
||||||
verifies that the addition does not result in underflow before the it is
|
|
||||||
performed, not after.
|
|
||||||
|
|
||||||
PiperOrigin-RevId: 633296228
|
|
||||||
---
|
|
||||||
quiche/quic/core/quic_interval_deque.h | 19 +++++++++--
|
|
||||||
quiche/quic/core/quic_interval_deque_test.cc | 33 ++++++++++++++++++++
|
|
||||||
2 files changed, 50 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/quiche/quic/core/quic_interval_deque.h b/quiche/quic/core/quic_interval_deque.h
|
|
||||||
index db7b2b0ac..1c6cd71a5 100644
|
|
||||||
--- a/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h
|
|
||||||
+++ b/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h
|
|
||||||
@@ -158,7 +158,7 @@ class QUICHE_NO_EXPORT QuicIntervalDeque {
|
|
||||||
Iterator(std::size_t index, QuicIntervalDeque* deque)
|
|
||||||
: index_(index), deque_(deque) {}
|
|
||||||
// Only the ++ operator attempts to update the cached index. Other operators
|
|
||||||
- // are used by |lower_bound| to binary search and are thus private.
|
|
||||||
+ // are used by |lower_bound| to binary search.
|
|
||||||
Iterator& operator++() {
|
|
||||||
// Don't increment when we are at the end.
|
|
||||||
const std::size_t container_size = deque_->container_.size();
|
|
||||||
@@ -186,6 +186,19 @@ class QUICHE_NO_EXPORT QuicIntervalDeque {
|
|
||||||
++(*this);
|
|
||||||
return copy;
|
|
||||||
}
|
|
||||||
+ Iterator& operator--() {
|
|
||||||
+ if (index_ == 0) {
|
|
||||||
+ QUIC_BUG(quic_bug_10862_4) << "Iterator out of bounds.";
|
|
||||||
+ return *this;
|
|
||||||
+ }
|
|
||||||
+ index_--;
|
|
||||||
+ return *this;
|
|
||||||
+ }
|
|
||||||
+ Iterator operator--(int) {
|
|
||||||
+ Iterator copy = *this;
|
|
||||||
+ --(*this);
|
|
||||||
+ return copy;
|
|
||||||
+ }
|
|
||||||
reference operator*() { return deque_->container_[index_]; }
|
|
||||||
reference operator*() const { return deque_->container_[index_]; }
|
|
||||||
pointer operator->() { return &deque_->container_[index_]; }
|
|
||||||
@@ -194,11 +207,13 @@ class QUICHE_NO_EXPORT QuicIntervalDeque {
|
|
||||||
}
|
|
||||||
bool operator!=(const Iterator& rhs) const { return !(*this == rhs); }
|
|
||||||
Iterator& operator+=(difference_type amount) {
|
|
||||||
+ // `amount` might be negative, check for underflow.
|
|
||||||
+ QUICHE_DCHECK_GE(static_cast<difference_type>(index_), -amount);
|
|
||||||
index_ += amount;
|
|
||||||
- QUICHE_DCHECK_LE(0u, index_);
|
|
||||||
QUICHE_DCHECK_LT(index_, deque_->Size());
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
+ Iterator& operator-=(difference_type amount) { return operator+=(-amount); }
|
|
||||||
difference_type operator-(const Iterator& rhs) const {
|
|
||||||
return static_cast<difference_type>(index_) -
|
|
||||||
static_cast<difference_type>(rhs.index_);
|
|
@@ -22,15 +22,6 @@ diff --git a/quiche/quic/core/crypto/web_transport_fingerprint_proof_verifier.cc
|
|||||||
index 167e4efc4..fc8cffd40 100644
|
index 167e4efc4..fc8cffd40 100644
|
||||||
--- a/net/third_party/quiche/src/quiche/quic/core/crypto/web_transport_fingerprint_proof_verifier.cc
|
--- a/net/third_party/quiche/src/quiche/quic/core/crypto/web_transport_fingerprint_proof_verifier.cc
|
||||||
+++ b/net/third_party/quiche/src/quiche/quic/core/crypto/web_transport_fingerprint_proof_verifier.cc
|
+++ b/net/third_party/quiche/src/quiche/quic/core/crypto/web_transport_fingerprint_proof_verifier.cc
|
||||||
@@ -6,6 +6,8 @@
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <memory>
|
|
||||||
+#include <string>
|
|
||||||
+#include <utility>
|
|
||||||
|
|
||||||
#include "absl/strings/escaping.h"
|
|
||||||
#include "absl/strings/match.h"
|
|
||||||
@@ -18,6 +20,7 @@
|
@@ -18,6 +20,7 @@
|
||||||
#include "quiche/quic/core/quic_types.h"
|
#include "quiche/quic/core/quic_types.h"
|
||||||
#include "quiche/quic/core/quic_utils.h"
|
#include "quiche/quic/core/quic_utils.h"
|
||||||
@@ -60,34 +51,34 @@ index eefd002dc..06e6ed2b7 100644
|
|||||||
--- a/net/third_party/quiche/src/quiche/quic/masque/masque_client_bin.cc
|
--- a/net/third_party/quiche/src/quiche/quic/masque/masque_client_bin.cc
|
||||||
+++ b/net/third_party/quiche/src/quiche/quic/masque/masque_client_bin.cc
|
+++ b/net/third_party/quiche/src/quiche/quic/masque/masque_client_bin.cc
|
||||||
@@ -281,7 +281,12 @@ int RunMasqueClient(int argc, char* argv[]) {
|
@@ -281,7 +281,12 @@ int RunMasqueClient(int argc, char* argv[]) {
|
||||||
QUIC_LOG(ERROR) << "Signature authentication key ID cannot be empty";
|
QUIC_LOG(ERROR) << "Concealed authentication key ID cannot be empty";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
- private_key_seed = absl::HexStringToBytes(signature_auth_param_split[1]);
|
- private_key_seed = absl::HexStringToBytes(concealed_auth_param_split[1]);
|
||||||
+ if (!absl::HexStringToBytes(signature_auth_param_split[1],
|
+ if (!absl::HexStringToBytes(concealed_auth_param_split[1],
|
||||||
+ &private_key_seed)) {
|
+ &private_key_seed)) {
|
||||||
+ QUIC_LOG(ERROR) << "Signature authentication key hex value is invalid";
|
+ QUIC_LOG(ERROR) << "Concealed authentication key hex value is invalid";
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if (private_key_seed.size() != kEd25519Rfc8032PrivateKeySize) {
|
if (private_key_seed.size() != kEd25519Rfc8032PrivateKeySize) {
|
||||||
QUIC_LOG(ERROR)
|
QUIC_LOG(ERROR)
|
||||||
<< "Invalid signature authentication private key length "
|
<< "Invalid Concealed authentication private key length "
|
||||||
diff --git a/quiche/quic/masque/masque_server_backend.cc b/quiche/quic/masque/masque_server_backend.cc
|
diff --git a/quiche/quic/masque/masque_server_backend.cc b/quiche/quic/masque/masque_server_backend.cc
|
||||||
index f4ff2e0ed..66ca13c96 100644
|
index f4ff2e0ed..66ca13c96 100644
|
||||||
--- a/net/third_party/quiche/src/quiche/quic/masque/masque_server_backend.cc
|
--- a/net/third_party/quiche/src/quiche/quic/masque/masque_server_backend.cc
|
||||||
+++ b/net/third_party/quiche/src/quiche/quic/masque/masque_server_backend.cc
|
+++ b/net/third_party/quiche/src/quiche/quic/masque/masque_server_backend.cc
|
||||||
@@ -193,7 +193,10 @@ void MasqueServerBackend::SetSignatureAuth(absl::string_view signature_auth) {
|
@@ -193,7 +193,10 @@ void MasqueServerBackend::SetSignatureAuth(absl::string_view signature_auth) {
|
||||||
quiche::QuicheTextUtils::RemoveLeadingAndTrailingWhitespace(&kv[1]);
|
quiche::QuicheTextUtils::RemoveLeadingAndTrailingWhitespace(&kv[1]);
|
||||||
SignatureAuthCredential credential;
|
ConcealedAuthCredential credential;
|
||||||
credential.key_id = std::string(kv[0]);
|
credential.key_id = std::string(kv[0]);
|
||||||
- std::string public_key = absl::HexStringToBytes(kv[1]);
|
- std::string public_key = absl::HexStringToBytes(kv[1]);
|
||||||
+ std::string public_key;
|
+ std::string public_key;
|
||||||
+ if (!absl::HexStringToBytes(kv[1], &public_key)) {
|
+ if (!absl::HexStringToBytes(kv[1], &public_key)) {
|
||||||
+ QUIC_LOG(FATAL) << "Invalid signature auth public key hex " << kv[1];
|
+ QUIC_LOG(FATAL) << "Invalid concealed auth public key hex " << kv[1];
|
||||||
+ }
|
+ }
|
||||||
if (public_key.size() != sizeof(credential.public_key)) {
|
if (public_key.size() != sizeof(credential.public_key)) {
|
||||||
QUIC_LOG(FATAL) << "Invalid signature auth public key length "
|
QUIC_LOG(FATAL) << "Invalid concealed auth public key length "
|
||||||
<< public_key.size();
|
<< public_key.size();
|
||||||
diff --git a/quiche/quic/tools/crypto_message_printer_bin.cc b/quiche/quic/tools/crypto_message_printer_bin.cc
|
diff --git a/quiche/quic/tools/crypto_message_printer_bin.cc b/quiche/quic/tools/crypto_message_printer_bin.cc
|
||||||
index eb7393d54..82850d94a 100644
|
index eb7393d54..82850d94a 100644
|
||||||
|
@@ -1,37 +0,0 @@
|
|||||||
From fb3678b0d1084b49c5ca795200131a7c0ac01ffe Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
|
||||||
Date: Wed, 15 May 2024 13:59:56 +0000
|
|
||||||
Subject: [PATCH] libstdc++: real time reporting bindings vector requires full
|
|
||||||
declaration
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
libstdc++ implementation of std::vector requires the full declaration
|
|
||||||
of the type and not a forward declaration. This breaks compilation of
|
|
||||||
RealTimeReportingBindings, as it has an std::vector of
|
|
||||||
RealTimeReportingContributionPtr.
|
|
||||||
|
|
||||||
Bug: 41455655
|
|
||||||
Change-Id: I9ee70fbb58af36f4cfc43a5d4b1e99799f4c760c
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5541055
|
|
||||||
Reviewed-by: Russ Hamilton <behamilton@google.com>
|
|
||||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1301266}
|
|
||||||
---
|
|
||||||
content/services/auction_worklet/real_time_reporting_bindings.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/content/services/auction_worklet/real_time_reporting_bindings.h b/content/services/auction_worklet/real_time_reporting_bindings.h
|
|
||||||
index c755d5cab041ec..da4d05e96f788c 100644
|
|
||||||
--- a/content/services/auction_worklet/real_time_reporting_bindings.h
|
|
||||||
+++ b/content/services/auction_worklet/real_time_reporting_bindings.h
|
|
||||||
@@ -12,7 +12,7 @@
|
|
||||||
#include "content/common/content_export.h"
|
|
||||||
#include "content/services/auction_worklet/auction_v8_helper.h"
|
|
||||||
#include "content/services/auction_worklet/context_recycler.h"
|
|
||||||
-#include "content/services/auction_worklet/public/mojom/real_time_reporting.mojom-forward.h"
|
|
||||||
+#include "content/services/auction_worklet/public/mojom/real_time_reporting.mojom.h"
|
|
||||||
#include "v8/include/v8-forward.h"
|
|
||||||
|
|
||||||
namespace auction_worklet {
|
|
@@ -1,17 +1,17 @@
|
|||||||
--- a/tools/json_schema_compiler/cpp_util.py
|
--- src/tools/json_schema_compiler/cpp_util.py.orig 2024-12-08 18:35:12.604673841 +0100
|
||||||
+++ b/tools/json_schema_compiler/cpp_util.py
|
+++ src/tools/json_schema_compiler/cpp_util.py 2024-12-20 14:33:48.193965844 +0100
|
||||||
@@ -13,9 +13,9 @@
|
@@ -11,9 +11,9 @@ import os
|
||||||
|
import posixpath
|
||||||
import re
|
import re
|
||||||
|
|
||||||
CHROMIUM_LICENSE = (
|
-CHROMIUM_LICENSE = ("""// Copyright %d The Chromium Authors
|
||||||
-"""// Copyright %d The Chromium Authors
|
+CHROMIUM_LICENSE = ("""// Copyright 2022 The Chromium Authors
|
||||||
+"""// Copyright 2022 The Chromium Authors
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
-// found in the LICENSE file.""" % datetime.now().year
|
-// found in the LICENSE file.""" % datetime.now().year)
|
||||||
+// found in the LICENSE file."""
|
+// found in the LICENSE file.""")
|
||||||
)
|
|
||||||
GENERATED_FILE_MESSAGE = """// GENERATED FROM THE API DEFINITION IN
|
GENERATED_FILE_MESSAGE = """// GENERATED FROM THE API DEFINITION IN
|
||||||
// %s
|
// %s
|
||||||
|
// by tools/json_schema_compiler.
|
||||||
--- a/tools/json_to_struct/json_to_struct.py
|
--- a/tools/json_to_struct/json_to_struct.py
|
||||||
+++ b/tools/json_to_struct/json_to_struct.py
|
+++ b/tools/json_to_struct/json_to_struct.py
|
||||||
@@ -74,7 +74,7 @@
|
@@ -74,7 +74,7 @@
|
||||||
@@ -32,9 +32,9 @@
|
|||||||
_GenerateH(basepath, output_root, head, namespace, schema, description)
|
_GenerateH(basepath, output_root, head, namespace, schema, description)
|
||||||
_GenerateCC(basepath, output_root, head, namespace, schema, description)
|
_GenerateCC(basepath, output_root, head, namespace, schema, description)
|
||||||
|
|
||||||
--- src/tools/json_schema_compiler/feature_compiler.py.old 2022-12-02 23:49:17.031737400 +0100
|
--- src/tools/json_schema_compiler/feature_compiler.py.orig 2024-12-08 18:35:12.604673841 +0100
|
||||||
+++ src/tools/json_schema_compiler/feature_compiler.py 2023-01-04 06:47:07.764551600 +0100
|
+++ src/tools/json_schema_compiler/feature_compiler.py 2024-12-20 14:34:28.740897256 +0100
|
||||||
@@ -19,7 +19,7 @@
|
@@ -17,7 +17,7 @@ import json_parse
|
||||||
|
|
||||||
# The template for the header file of the generated FeatureProvider.
|
# The template for the header file of the generated FeatureProvider.
|
||||||
HEADER_FILE_TEMPLATE = """
|
HEADER_FILE_TEMPLATE = """
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@
|
@@ -41,7 +41,7 @@ void %(method_name)s(FeatureProvider* pr
|
||||||
|
|
||||||
# The beginning of the .cc file for the generated FeatureProvider.
|
# The beginning of the .cc file for the generated FeatureProvider.
|
||||||
CC_FILE_BEGIN = """
|
CC_FILE_BEGIN = """
|
||||||
@@ -52,11 +52,12 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
@@ -899,7 +899,6 @@
|
@@ -987,8 +987,6 @@ class FeatureCompiler(object):
|
||||||
replace('.', '_').upper()),
|
self._method_name,
|
||||||
'method_name': self._method_name,
|
'source_files':
|
||||||
'source_files': str([ToPosixPath(f) for f in self._source_files]),
|
str([ToPosixPath(f) for f in self._source_files]),
|
||||||
- 'year': str(datetime.now().year)
|
- 'year':
|
||||||
|
- str(datetime.now().year)
|
||||||
})
|
})
|
||||||
if not os.path.exists(self._out_root):
|
if not os.path.exists(self._out_root):
|
||||||
os.makedirs(self._out_root)
|
os.makedirs(self._out_root)
|
||||||
|
@@ -12,9 +12,9 @@ Remove this unused component which brings a huge dependency on //third_party/daw
|
|||||||
"//services/screen_ai/buildflags",
|
"//services/screen_ai/buildflags",
|
||||||
"//services/service_manager/public/cpp",
|
"//services/service_manager/public/cpp",
|
||||||
"//services/service_manager/public/mojom",
|
"//services/service_manager/public/mojom",
|
||||||
--- src/content/utility/services.cc.orig
|
--- src/content/utility/services.cc.orig 2024-12-08 18:34:58.184673416 +0100
|
||||||
+++ src/content/utility/services.cc
|
+++ src/content/utility/services.cc 2024-12-18 12:44:27.424691055 +0100
|
||||||
@@ -31,7 +31,6 @@
|
@@ -32,7 +32,6 @@
|
||||||
#include "services/audio/service_factory.h"
|
#include "services/audio/service_factory.h"
|
||||||
#include "services/data_decoder/data_decoder_service.h"
|
#include "services/data_decoder/data_decoder_service.h"
|
||||||
#include "services/network/network_service.h"
|
#include "services/network/network_service.h"
|
||||||
@@ -22,21 +22,20 @@ Remove this unused component which brings a huge dependency on //third_party/daw
|
|||||||
#include "services/tracing/public/mojom/tracing_service.mojom.h"
|
#include "services/tracing/public/mojom/tracing_service.mojom.h"
|
||||||
#include "services/tracing/tracing_service.h"
|
#include "services/tracing/tracing_service.h"
|
||||||
#include "services/video_capture/public/mojom/video_capture_service.mojom.h"
|
#include "services/video_capture/public/mojom/video_capture_service.mojom.h"
|
||||||
@@ -327,13 +326,6 @@ auto RunVideoCapture(
|
@@ -371,12 +370,6 @@ auto RunVideoEffects(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
-auto RunOnDeviceModel(
|
-auto RunOnDeviceModel(
|
||||||
- mojo::PendingReceiver<on_device_model::mojom::OnDeviceModelService>
|
- mojo::PendingReceiver<on_device_model::mojom::OnDeviceModelService>
|
||||||
- receiver) {
|
- receiver) {
|
||||||
- return std::make_unique<on_device_model::OnDeviceModelService>(
|
- return on_device_model::OnDeviceModelService::Create(std::move(receiver));
|
||||||
- std::move(receiver));
|
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
#if BUILDFLAG(ENABLE_VR) && !BUILDFLAG(IS_ANDROID)
|
#if BUILDFLAG(ENABLE_VR) && !BUILDFLAG(IS_ANDROID)
|
||||||
auto RunXrDeviceService(
|
auto RunXrDeviceService(
|
||||||
mojo::PendingReceiver<device::mojom::XRDeviceService> receiver) {
|
mojo::PendingReceiver<device::mojom::XRDeviceService> receiver) {
|
||||||
@@ -408,9 +400,6 @@ void RegisterMainThreadServices(mojo::Se
|
@@ -455,9 +448,6 @@ void RegisterMainThreadServices(mojo::Se
|
||||||
services.Add(RunVideoEffects);
|
services.Add(RunVideoEffects);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -46,8 +45,8 @@ Remove this unused component which brings a huge dependency on //third_party/daw
|
|||||||
|
|
||||||
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && BUILDFLAG(IS_CHROMEOS)
|
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && BUILDFLAG(IS_CHROMEOS)
|
||||||
services.Add(RunShapeDetectionService);
|
services.Add(RunShapeDetectionService);
|
||||||
--- src/content/utility/utility_main.cc.orig 2024-07-24 12:50:51.439131000 +0200
|
--- src/content/utility/utility_main.cc.orig 2024-12-08 18:34:58.184673416 +0100
|
||||||
+++ src/content/utility/utility_main.cc 2024-08-03 00:11:18.255682100 +0200
|
+++ src/content/utility/utility_main.cc 2024-12-18 12:43:43.314689968 +0100
|
||||||
@@ -32,7 +32,6 @@
|
@@ -32,7 +32,6 @@
|
||||||
#include "sandbox/policy/mojom/sandbox.mojom.h"
|
#include "sandbox/policy/mojom/sandbox.mojom.h"
|
||||||
#include "sandbox/policy/sandbox.h"
|
#include "sandbox/policy/sandbox.h"
|
||||||
@@ -55,8 +54,8 @@ Remove this unused component which brings a huge dependency on //third_party/daw
|
|||||||
-#include "services/on_device_model/on_device_model_service.h"
|
-#include "services/on_device_model/on_device_model_service.h"
|
||||||
#include "services/screen_ai/buildflags/buildflags.h"
|
#include "services/screen_ai/buildflags/buildflags.h"
|
||||||
#include "services/tracing/public/cpp/trace_startup.h"
|
#include "services/tracing/public/cpp/trace_startup.h"
|
||||||
#include "third_party/icu/source/common/unicode/unistr.h"
|
|
||||||
@@ -246,9 +245,6 @@ int UtilityMain(MainFunctionParams param
|
@@ -238,9 +237,6 @@ int UtilityMain(MainFunctionParams param
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +65,7 @@ Remove this unused component which brings a huge dependency on //third_party/daw
|
|||||||
|
|
||||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||||
// Thread type delegate of the process should be registered before first
|
// Thread type delegate of the process should be registered before first
|
||||||
@@ -283,11 +279,6 @@ int UtilityMain(MainFunctionParams param
|
@@ -275,11 +271,6 @@ int UtilityMain(MainFunctionParams param
|
||||||
case sandbox::mojom::Sandbox::kAudio:
|
case sandbox::mojom::Sandbox::kAudio:
|
||||||
pre_sandbox_hook = base::BindOnce(&audio::AudioPreSandboxHook);
|
pre_sandbox_hook = base::BindOnce(&audio::AudioPreSandboxHook);
|
||||||
break;
|
break;
|
||||||
@@ -78,7 +77,7 @@ Remove this unused component which brings a huge dependency on //third_party/daw
|
|||||||
case sandbox::mojom::Sandbox::kSpeechRecognition:
|
case sandbox::mojom::Sandbox::kSpeechRecognition:
|
||||||
pre_sandbox_hook =
|
pre_sandbox_hook =
|
||||||
base::BindOnce(&speech::SpeechRecognitionPreSandboxHook);
|
base::BindOnce(&speech::SpeechRecognitionPreSandboxHook);
|
||||||
@@ -437,9 +428,6 @@ int UtilityMain(MainFunctionParams param
|
@@ -440,9 +431,6 @@ int UtilityMain(MainFunctionParams param
|
||||||
|
|
||||||
run_loop.Run();
|
run_loop.Run();
|
||||||
|
|
||||||
|
22
remove-libphonenumber.patch
Normal file
22
remove-libphonenumber.patch
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
--- src/third_party/blink/renderer/platform/BUILD.gn.orig 2025-01-02 22:23:59.424885429 +0100
|
||||||
|
+++ src/third_party/blink/renderer/platform/BUILD.gn 2025-01-03 19:03:30.286845650 +0100
|
||||||
|
@@ -1243,8 +1243,6 @@ component("platform") {
|
||||||
|
"keyboard_codes.h",
|
||||||
|
"language.cc",
|
||||||
|
"language.h",
|
||||||
|
- "language_detection/detect.cc",
|
||||||
|
- "language_detection/detect.h",
|
||||||
|
"link_hash.cc",
|
||||||
|
"link_hash.h",
|
||||||
|
"media/web_audio_source_provider_client.h",
|
||||||
|
@@ -1754,10 +1752,8 @@ component("platform") {
|
||||||
|
"//cc",
|
||||||
|
"//cc/ipc",
|
||||||
|
"//cc/mojo_embedder",
|
||||||
|
- "//components/language_detection/core:language_detection",
|
||||||
|
"//components/paint_preview/common",
|
||||||
|
"//components/search_engines:search_engine_utils",
|
||||||
|
- "//components/translate/core/language_detection:language_detection",
|
||||||
|
"//components/viz/client",
|
||||||
|
"//components/viz/common",
|
||||||
|
"//components/webrtc:net_address_utils",
|
@@ -191,21 +191,21 @@ cgit v1.2.3
|
|||||||
"//device/vr/buildflags",
|
"//device/vr/buildflags",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
--- src/components/search_engines/BUILD.gn.orig
|
--- src/components/search_engines/BUILD.gn.orig 2024-12-08 18:34:56.928006713 +0100
|
||||||
+++ src/components/search_engines/BUILD.gn
|
+++ src/components/search_engines/BUILD.gn 2024-12-18 12:48:04.888029763 +0100
|
||||||
@@ -15,45 +15,23 @@ static_library("search_engines") {
|
@@ -16,45 +16,23 @@ static_library("search_engines") {
|
||||||
"choice_made_location.h",
|
|
||||||
"default_search_manager.cc",
|
"default_search_manager.cc",
|
||||||
"default_search_manager.h",
|
"default_search_manager.h",
|
||||||
- "default_search_policy_handler.cc",
|
|
||||||
- "default_search_policy_handler.h",
|
|
||||||
"eea_countries_ids.h",
|
"eea_countries_ids.h",
|
||||||
"enterprise_site_search_manager.cc",
|
- "enterprise/default_search_policy_handler.cc",
|
||||||
"enterprise_site_search_manager.h",
|
- "enterprise/default_search_policy_handler.h",
|
||||||
|
"enterprise/enterprise_site_search_manager.cc",
|
||||||
|
"enterprise/enterprise_site_search_manager.h",
|
||||||
- "keyword_table.cc",
|
- "keyword_table.cc",
|
||||||
- "keyword_table.h",
|
- "keyword_table.h",
|
||||||
"keyword_web_data_service.cc",
|
"keyword_web_data_service.cc",
|
||||||
"keyword_web_data_service.h",
|
"keyword_web_data_service.h",
|
||||||
|
"search_engine_choice/search_engine_choice_metrics_service_accessor.h",
|
||||||
- "search_engine_choice/search_engine_choice_service.cc",
|
- "search_engine_choice/search_engine_choice_service.cc",
|
||||||
- "search_engine_choice/search_engine_choice_service.h",
|
- "search_engine_choice/search_engine_choice_service.h",
|
||||||
- "search_engine_choice/search_engine_choice_utils.cc",
|
- "search_engine_choice/search_engine_choice_utils.cc",
|
||||||
@@ -239,7 +239,7 @@ cgit v1.2.3
|
|||||||
]
|
]
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
@@ -68,21 +46,14 @@ static_library("search_engines") {
|
@@ -69,7 +47,6 @@ static_library("search_engines") {
|
||||||
"//components/sync",
|
"//components/sync",
|
||||||
"//components/webdata/common",
|
"//components/webdata/common",
|
||||||
"//third_party/metrics_proto",
|
"//third_party/metrics_proto",
|
||||||
@@ -247,12 +247,14 @@ cgit v1.2.3
|
|||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"//base:i18n",
|
@@ -77,15 +54,9 @@ static_library("search_engines") {
|
||||||
"//components/country_codes",
|
"//components/country_codes",
|
||||||
|
"//components/crash/core/common:crash_key",
|
||||||
"//components/database_utils",
|
"//components/database_utils",
|
||||||
- "//components/infobars/core",
|
- "//components/infobars/core",
|
||||||
- "//components/lens:lens",
|
- "//components/lens:lens",
|
||||||
- "//components/lens/proto/server:proto",
|
- "//components/lens/proto/server:proto",
|
||||||
|
"//components/metrics",
|
||||||
"//components/omnibox/common",
|
"//components/omnibox/common",
|
||||||
- "//components/policy:generated",
|
- "//components/policy:generated",
|
||||||
- "//components/policy/core/browser",
|
- "//components/policy/core/browser",
|
||||||
@@ -261,7 +263,7 @@ cgit v1.2.3
|
|||||||
"//components/signin/public/base",
|
"//components/signin/public/base",
|
||||||
"//components/strings",
|
"//components/strings",
|
||||||
"//components/url_formatter",
|
"//components/url_formatter",
|
||||||
@@ -94,7 +65,6 @@ static_library("search_engines") {
|
@@ -97,7 +68,6 @@ static_library("search_engines") {
|
||||||
"//services/network/public/mojom",
|
"//services/network/public/mojom",
|
||||||
"//sql",
|
"//sql",
|
||||||
"//third_party/metrics_proto",
|
"//third_party/metrics_proto",
|
||||||
@@ -269,8 +271,8 @@ cgit v1.2.3
|
|||||||
"//ui/base",
|
"//ui/base",
|
||||||
"//ui/gfx",
|
"//ui/gfx",
|
||||||
"//ui/gfx/geometry",
|
"//ui/gfx/geometry",
|
||||||
@@ -112,7 +82,7 @@ static_library("search_engines") {
|
@@ -123,7 +93,7 @@ static_library("search_engines") {
|
||||||
deps += [ "//components/search_engines/android:jni_headers" ]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (!is_android) {
|
- if (!is_android) {
|
||||||
@@ -278,15 +280,15 @@ cgit v1.2.3
|
|||||||
sources += [ "search_engine_choice/generated_marketing_snippets.cc" ]
|
sources += [ "search_engine_choice/generated_marketing_snippets.cc" ]
|
||||||
deps += [
|
deps += [
|
||||||
":generate_search_engine_icons",
|
":generate_search_engine_icons",
|
||||||
@@ -121,7 +91,7 @@ static_library("search_engines") {
|
@@ -132,7 +102,7 @@ static_library("search_engines") {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (is_linux || is_win || is_mac || is_chromeos) {
|
- if (is_linux || is_win || is_mac || is_chromeos) {
|
||||||
+ if (false) {
|
+ if (false) {
|
||||||
sources += [
|
sources += [
|
||||||
"site_search_policy_handler.cc",
|
"enterprise/site_search_policy_handler.cc",
|
||||||
"site_search_policy_handler.h",
|
"enterprise/site_search_policy_handler.h",
|
||||||
--- src/components/search/BUILD.gn.old
|
--- src/components/search/BUILD.gn.old
|
||||||
+++ src/components/search/BUILD.gn
|
+++ src/components/search/BUILD.gn
|
||||||
@@ -6,10 +6,6 @@ static_library("search") {
|
@@ -6,10 +6,6 @@ static_library("search") {
|
||||||
@@ -320,8 +322,8 @@ cgit v1.2.3
|
|||||||
"//components/url_formatter",
|
"//components/url_formatter",
|
||||||
"//components/url_matcher",
|
"//components/url_matcher",
|
||||||
"//components/version_info",
|
"//components/version_info",
|
||||||
--- src/components/password_manager/core/browser/password_manager_switches.cc.orig 2024-07-24 12:50:49.362463800 +0200
|
--- src/components/password_manager/core/browser/password_manager_switches.cc.orig 2024-12-08 18:34:56.591340037 +0100
|
||||||
+++ src/components/password_manager/core/browser/password_manager_switches.cc 2024-08-04 16:04:17.829459300 +0200
|
+++ src/components/password_manager/core/browser/password_manager_switches.cc 2024-12-18 12:47:00.934694855 +0100
|
||||||
@@ -10,11 +10,9 @@ namespace password_manager {
|
@@ -10,11 +10,9 @@ namespace password_manager {
|
||||||
// Specifies which encryption storage backend to use. Possible values are
|
// Specifies which encryption storage backend to use. Possible values are
|
||||||
// kwallet, kwallet5, kwallet6, gnome-libsecret, basic.
|
// kwallet, kwallet5, kwallet6, gnome-libsecret, basic.
|
||||||
@@ -333,9 +335,9 @@ cgit v1.2.3
|
|||||||
-const char kEnableEncryptionSelection[] = "enable-encryption-selection";
|
-const char kEnableEncryptionSelection[] = "enable-encryption-selection";
|
||||||
#endif // BUILDFLAG(IS_LINUX)
|
#endif // BUILDFLAG(IS_LINUX)
|
||||||
|
|
||||||
} // namespace password_manager
|
// Enables Password Sharing button in password details UI in settings when
|
||||||
--- src/components/password_manager/core/browser/password_manager_switches.h.orig 2024-07-24 12:50:49.362463800 +0200
|
--- src/components/password_manager/core/browser/password_manager_switches.h.orig 2024-12-08 18:34:56.591340037 +0100
|
||||||
+++ src/components/password_manager/core/browser/password_manager_switches.h 2024-08-04 16:03:48.687376900 +0200
|
+++ src/components/password_manager/core/browser/password_manager_switches.h 2024-12-18 12:48:40.918030653 +0100
|
||||||
@@ -11,8 +11,8 @@
|
@@ -11,8 +11,8 @@
|
||||||
namespace password_manager {
|
namespace password_manager {
|
||||||
|
|
||||||
@@ -344,6 +346,16 @@ cgit v1.2.3
|
|||||||
-extern const char kEnableEncryptionSelection[];
|
-extern const char kEnableEncryptionSelection[];
|
||||||
+inline constexpr const char kPasswordStore[] = "password-store";
|
+inline constexpr const char kPasswordStore[] = "password-store";
|
||||||
+inline constexpr const char kEnableEncryptionSelection[] = "enable-encryption-selection";
|
+inline constexpr const char kEnableEncryptionSelection[] = "enable-encryption-selection";
|
||||||
#endif
|
#endif // BUILDFLAG(IS_LINUX)
|
||||||
|
|
||||||
} // namespace password_manager
|
extern const char kEnableShareButtonUnbranded[];
|
||||||
|
--- src/chrome/common/extensions/BUILD.gn.orig 2025-01-02 10:33:17.939583644 +0100
|
||||||
|
+++ src/chrome/common/extensions/BUILD.gn 2025-01-02 11:36:57.232099250 +0100
|
||||||
|
@@ -76,7 +76,6 @@ source_set("extensions") {
|
||||||
|
"//chrome/common/extensions/api:extensions_features",
|
||||||
|
"//components/app_constants",
|
||||||
|
"//components/device_signals/core/common:features",
|
||||||
|
- "//components/policy/core/common",
|
||||||
|
"//components/url_formatter",
|
||||||
|
"//components/version_info",
|
||||||
|
"//extensions:extensions_resources",
|
||||||
|
@@ -18,16 +18,3 @@
|
|||||||
"//components/content_settings/core/common",
|
"//components/content_settings/core/common",
|
||||||
"//components/crash/core/common",
|
"//components/crash/core/common",
|
||||||
"//components/device_signals/core/common:features",
|
"//components/device_signals/core/common:features",
|
||||||
--- src/content/utility/BUILD.gn.orig
|
|
||||||
+++ src/content/utility/BUILD.gn
|
|
||||||
@@ -144,10 +144,6 @@ source_set("utility") {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (is_linux || is_chromeos) {
|
|
||||||
- deps += [ "//services/screen_ai:screen_ai_sandbox_hook" ]
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
if (enable_accessibility_service) {
|
|
||||||
deps += [ "//services/accessibility:lib" ]
|
|
||||||
}
|
|
||||||
|
@@ -10,50 +10,50 @@ Remove this dead code which brings a dependency on rustc
|
|||||||
"//components/query_parser:unit_tests",
|
"//components/query_parser:unit_tests",
|
||||||
"//components/reading_list/core:unit_tests",
|
"//components/reading_list/core:unit_tests",
|
||||||
"//components/reporting/client:unit_tests",
|
"//components/reporting/client:unit_tests",
|
||||||
--- src/chrome/browser/BUILD.gn.orig
|
--- src/chrome/browser/BUILD.gn.orig 2024-12-08 18:44:32.671357320 +0100
|
||||||
+++ src/chrome/browser/BUILD.gn
|
+++ src/chrome/browser/BUILD.gn 2024-12-18 12:38:43.758015814 +0100
|
||||||
@@ -1972,7 +1972,6 @@ static_library("browser") {
|
@@ -1798,7 +1798,6 @@ static_library("browser") {
|
||||||
"//chrome/browser/profiling_host",
|
"//chrome/browser/profiling_host",
|
||||||
|
|
||||||
# TODO(crbug.com/40228447): break this dep when favicon is in its own target
|
# TODO(crbug.com/40228447): break this dep when favicon is in its own target
|
||||||
- "//chrome/browser/share",
|
- "//chrome/browser/share",
|
||||||
"//chrome/browser/ui",
|
"//chrome/browser/ui",
|
||||||
"//chrome/browser/storage_access_api",
|
|
||||||
"//chrome/browser/top_level_storage_access_api:permissions",
|
# TODO(358041220): There is a circular_dependency of `cookie_controls:impl` module
|
||||||
@@ -2106,7 +2105,6 @@ static_library("browser") {
|
@@ -1950,7 +1949,6 @@ static_library("browser") {
|
||||||
"//chrome/browser/safe_browsing:advanced_protection",
|
"//chrome/browser/search_engine_choice",
|
||||||
"//chrome/browser/safe_browsing:metrics_collector",
|
"//chrome/browser/search_engine_choice:impl",
|
||||||
"//chrome/browser/safe_browsing:verdict_cache_manager_factory",
|
"//chrome/browser/search_engines",
|
||||||
- "//chrome/browser/share",
|
- "//chrome/browser/share",
|
||||||
"//chrome/browser/sharing:buildflags",
|
"//chrome/browser/sharing:buildflags",
|
||||||
"//chrome/browser/sharing/proto",
|
"//chrome/browser/signin",
|
||||||
"//chrome/browser/signin:identity_manager_provider",
|
"//chrome/browser/signin:identity_manager_provider",
|
||||||
@@ -4598,7 +4596,6 @@ static_library("browser") {
|
@@ -8566,7 +8564,6 @@ static_library("browser_generated_files"
|
||||||
"//chrome/browser/policy:path_parser",
|
"//chrome/browser/new_tab_page/modules/v2/calendar:mojo_bindings",
|
||||||
|
"//chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption:mojo_bindings",
|
||||||
"//chrome/browser/profile_resetter:profile_reset_report_proto",
|
"//chrome/browser/profile_resetter:profile_reset_report_proto",
|
||||||
"//chrome/browser/resources:component_extension_resources",
|
|
||||||
- "//chrome/browser/share/proto:proto",
|
- "//chrome/browser/share/proto:proto",
|
||||||
"//chrome/browser/smart_card",
|
|
||||||
"//chrome/browser/support_tool:support_tool_proto",
|
"//chrome/browser/support_tool:support_tool_proto",
|
||||||
"//chrome/browser/themes",
|
"//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
|
||||||
@@ -8407,7 +8404,6 @@ static_library("test_support") {
|
"//chrome/browser/ui:webui_name_variants",
|
||||||
"//build:chromeos_buildflags",
|
@@ -9024,7 +9021,6 @@ static_library("test_support") {
|
||||||
"//chrome/app/theme:theme_resources",
|
|
||||||
"//chrome/browser/policy/messaging_layer/proto:crd_event_proto",
|
"//chrome/browser/policy/messaging_layer/proto:crd_event_proto",
|
||||||
|
"//chrome/browser/search_engine_choice",
|
||||||
|
"//chrome/browser/search_engines",
|
||||||
- "//chrome/browser/share:share",
|
- "//chrome/browser/share:share",
|
||||||
"//chrome/common",
|
"//chrome/common",
|
||||||
"//chrome/common/notifications",
|
"//chrome/common/notifications",
|
||||||
"//chrome/common/safe_browsing:proto",
|
"//chrome/common/safe_browsing:proto",
|
||||||
--- src/chrome/browser/ui/BUILD.gn.orig
|
--- src/chrome/browser/ui/BUILD.gn.orig 2024-12-08 18:34:54.011339960 +0100
|
||||||
+++ src/chrome/browser/ui/BUILD.gn
|
+++ src/chrome/browser/ui/BUILD.gn 2024-12-18 12:39:08.101349746 +0100
|
||||||
@@ -451,7 +451,6 @@ static_library("ui") {
|
@@ -425,7 +425,6 @@ static_library("ui") {
|
||||||
"//chrome/browser/resources:dev_ui_resources",
|
"//chrome/browser/search_engine_choice",
|
||||||
"//chrome/browser/resources:resources",
|
"//chrome/browser/search_engine_choice:impl",
|
||||||
"//chrome/browser/safe_browsing",
|
"//chrome/browser/search_engines",
|
||||||
- "//chrome/browser/share",
|
- "//chrome/browser/share",
|
||||||
"//chrome/browser/storage_access_api",
|
"//chrome/browser/signin",
|
||||||
"//chrome/browser/themes",
|
"//chrome/browser/signin:identity_manager_provider",
|
||||||
"//chrome/browser/ui/side_panel:side_panel_enums",
|
"//chrome/browser/signin:impl",
|
||||||
@@ -591,7 +590,6 @@ static_library("ui") {
|
@@ -591,7 +590,6 @@ static_library("ui") {
|
||||||
"//components/privacy_sandbox:tracking_protection_settings",
|
"//components/privacy_sandbox:tracking_protection_settings",
|
||||||
"//components/profile_metrics",
|
"//components/profile_metrics",
|
||||||
@@ -62,20 +62,17 @@ Remove this dead code which brings a dependency on rustc
|
|||||||
"//components/query_parser",
|
"//components/query_parser",
|
||||||
"//components/reading_list/core",
|
"//components/reading_list/core",
|
||||||
"//components/reading_list/features:flags",
|
"//components/reading_list/features:flags",
|
||||||
--- src/build/rust/rust_target.gni.orig
|
--- src/chrome/test/BUILD.gn.orig 2024-12-08 18:44:32.671357320 +0100
|
||||||
+++ src/build/rust/rust_target.gni
|
+++ src/chrome/test/BUILD.gn 2024-12-18 12:39:55.361350918 +0100
|
||||||
@@ -7,7 +7,7 @@ import("//build/rust/rust_unit_test.gni"
|
@@ -2013,7 +2013,6 @@ if (!is_android) {
|
||||||
|
"//chrome/browser/web_applications:prevent_close_test_support",
|
||||||
# The //build directory is re-used for non-Chromium products. We do not support
|
"//chrome/browser/web_applications:web_applications_test_support",
|
||||||
# cxx bindings in such contexts, because //third_party may be missing.
|
"//chrome/browser/webaudio:browser_tests",
|
||||||
-if (build_with_chromium) {
|
- "//chrome/browser/webauthn:test_support",
|
||||||
+if (false) {
|
"//chrome/common:version_header",
|
||||||
import("//third_party/rust/cxx/chromium_integration/rust_cxx.gni")
|
"//chrome/common/companion/visual_query:flags",
|
||||||
}
|
"//chrome/common/privacy_budget:test_support",
|
||||||
|
@@ -2186,7 +2185,6 @@ if (!is_android) {
|
||||||
--- src/chrome/test/BUILD.gn.orig
|
|
||||||
+++ src/chrome/test/BUILD.gn
|
|
||||||
@@ -1942,7 +1942,6 @@ if (!is_android) {
|
|
||||||
"//components/privacy_sandbox/privacy_sandbox_attestations:test_support",
|
"//components/privacy_sandbox/privacy_sandbox_attestations:test_support",
|
||||||
"//components/privacy_sandbox/privacy_sandbox_attestations/proto:proto",
|
"//components/privacy_sandbox/privacy_sandbox_attestations/proto:proto",
|
||||||
"//components/proxy_config",
|
"//components/proxy_config",
|
||||||
@@ -83,31 +80,15 @@ Remove this dead code which brings a dependency on rustc
|
|||||||
"//components/reading_list/core",
|
"//components/reading_list/core",
|
||||||
"//components/reading_list/features:flags",
|
"//components/reading_list/features:flags",
|
||||||
"//components/resources",
|
"//components/resources",
|
||||||
@@ -5593,7 +5592,6 @@ if (!is_android) {
|
@@ -6855,7 +6853,6 @@ test("unit_tests") {
|
||||||
if (!is_chromeos) {
|
|
||||||
sources += [ "../browser/webauthn/enclave_authenticator_browsertest.cc" ]
|
|
||||||
deps += [
|
|
||||||
- "//chrome/browser/webauthn:test_support",
|
|
||||||
"//components/os_crypt/sync:test_support",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -6867,7 +6865,6 @@ test("unit_tests") {
|
|
||||||
"//chrome/browser/safe_browsing:metrics_collector",
|
|
||||||
"//chrome/browser/safe_browsing:verdict_cache_manager_factory",
|
|
||||||
"//chrome/browser/segmentation_platform:test_utils",
|
|
||||||
- "//chrome/browser/share",
|
|
||||||
"//chrome/browser/sharing/proto",
|
|
||||||
"//chrome/browser/storage_access_api",
|
|
||||||
"//chrome/browser/supervised_user:test_support",
|
|
||||||
@@ -7028,7 +7025,6 @@ test("unit_tests") {
|
|
||||||
"//components/privacy_sandbox/privacy_sandbox_attestations:test_support",
|
"//components/privacy_sandbox/privacy_sandbox_attestations:test_support",
|
||||||
"//components/privacy_sandbox/privacy_sandbox_attestations/proto:proto",
|
"//components/privacy_sandbox/privacy_sandbox_attestations/proto:proto",
|
||||||
"//components/proxy_config",
|
"//components/proxy_config",
|
||||||
- "//components/qr_code_generator:bitmap_generator",
|
- "//components/qr_code_generator:bitmap_generator",
|
||||||
"//components/query_parser",
|
"//components/query_parser",
|
||||||
"//components/query_tiles:unit_tests",
|
|
||||||
"//components/reading_list/core",
|
"//components/reading_list/core",
|
||||||
@@ -7193,7 +7189,6 @@ test("unit_tests") {
|
"//components/reading_list/core:test_support",
|
||||||
|
@@ -7029,7 +7026,6 @@ test("unit_tests") {
|
||||||
"//third_party/metrics_proto",
|
"//third_party/metrics_proto",
|
||||||
"//third_party/microsoft_webauthn",
|
"//third_party/microsoft_webauthn",
|
||||||
"//third_party/re2",
|
"//third_party/re2",
|
||||||
@@ -115,12 +96,12 @@ Remove this dead code which brings a dependency on rustc
|
|||||||
"//third_party/webrtc_overrides:webrtc_component",
|
"//third_party/webrtc_overrides:webrtc_component",
|
||||||
"//third_party/widevine/cdm:headers",
|
"//third_party/widevine/cdm:headers",
|
||||||
"//third_party/zlib/google:compression_utils",
|
"//third_party/zlib/google:compression_utils",
|
||||||
@@ -8443,8 +8438,6 @@ test("unit_tests") {
|
@@ -8314,8 +8310,6 @@ test("unit_tests") {
|
||||||
"//chrome/browser/ui/webui/side_panel/performance_controls:mojo_bindings",
|
"//chrome/browser/ui/zoom",
|
||||||
"//chrome/browser/ui/webui/side_panel/user_notes:mojo_bindings",
|
"//chrome/browser/ui/zoom:unit_tests",
|
||||||
"//chrome/browser/web_applications:web_applications_test_support",
|
"//chrome/browser/web_applications:web_applications_test_support",
|
||||||
- "//chrome/browser/webauthn:test_support",
|
- "//chrome/browser/webauthn:test_support",
|
||||||
- "//chrome/browser/webauthn/proto",
|
- "//chrome/browser/webauthn/proto",
|
||||||
"//chrome/common/accessibility:mojo_bindings",
|
"//chrome/common/accessibility:mojo_bindings",
|
||||||
|
"//chrome/services/speech:unit_tests",
|
||||||
"//components/app_constants",
|
"//components/app_constants",
|
||||||
"//components/color",
|
|
||||||
|
@@ -178,9 +178,9 @@ Inspired by:
|
|||||||
|
|
||||||
// True if the dictionary has been loaded. Otherwise false.
|
// True if the dictionary has been loaded. Otherwise false.
|
||||||
bool is_loaded_;
|
bool is_loaded_;
|
||||||
--- src/device/fido/BUILD.gn.orig
|
--- src/device/fido/BUILD.gn.orig 2024-12-08 18:34:58.231340083 +0100
|
||||||
+++ src/device/fido/BUILD.gn
|
+++ src/device/fido/BUILD.gn 2024-12-18 12:59:49.294713941 +0100
|
||||||
@@ -163,33 +163,6 @@ component("fido") {
|
@@ -163,36 +163,6 @@ component("fido") {
|
||||||
"device_operation.h",
|
"device_operation.h",
|
||||||
"device_response_converter.cc",
|
"device_response_converter.cc",
|
||||||
"device_response_converter.h",
|
"device_response_converter.h",
|
||||||
@@ -200,48 +200,54 @@ Inspired by:
|
|||||||
- "enclave/transact.h",
|
- "enclave/transact.h",
|
||||||
- "enclave/types.cc",
|
- "enclave/types.cc",
|
||||||
- "enclave/types.h",
|
- "enclave/types.h",
|
||||||
|
- "enclave/verify/amd.cc",
|
||||||
|
- "enclave/verify/amd.h",
|
||||||
|
- "enclave/verify/attestation_report.cc",
|
||||||
|
- "enclave/verify/attestation_report.h",
|
||||||
- "enclave/verify/claim.cc",
|
- "enclave/verify/claim.cc",
|
||||||
- "enclave/verify/claim.h",
|
- "enclave/verify/claim.h",
|
||||||
- "enclave/verify/endorsement.cc",
|
- "enclave/verify/endorsement.cc",
|
||||||
- "enclave/verify/endorsement.h",
|
- "enclave/verify/endorsement.h",
|
||||||
- "enclave/verify/hash.cc",
|
|
||||||
- "enclave/verify/hash.h",
|
|
||||||
- "enclave/verify/rekor.cc",
|
- "enclave/verify/rekor.cc",
|
||||||
- "enclave/verify/rekor.h",
|
- "enclave/verify/rekor.h",
|
||||||
- "enclave/verify/utils.cc",
|
- "enclave/verify/utils.cc",
|
||||||
- "enclave/verify/utils.h",
|
- "enclave/verify/utils.h",
|
||||||
- "enclave/verify/verify.h",
|
- "enclave/verify/verifier.cc",
|
||||||
|
- "enclave/verify/verifier.h",
|
||||||
"fido_authenticator.cc",
|
"fido_authenticator.cc",
|
||||||
"fido_authenticator.h",
|
"fido_authenticator.h",
|
||||||
"fido_device.cc",
|
"fido_device.cc",
|
||||||
@@ -256,7 +229,6 @@ component("fido") {
|
@@ -257,7 +227,6 @@ component("fido") {
|
||||||
]
|
]
|
||||||
|
|
||||||
deps += [
|
deps += [
|
||||||
- "//components/sync/protocol:protocol",
|
- "//components/sync/protocol:protocol",
|
||||||
|
"//device/fido/enclave/verify/proto:proto",
|
||||||
"//services/device/public/cpp/hid",
|
"//services/device/public/cpp/hid",
|
||||||
"//services/device/public/cpp/usb",
|
"//services/device/public/cpp/usb",
|
||||||
"//services/device/public/mojom",
|
--- src/device/fido/fido_discovery_factory.cc.orig 2024-12-08 18:34:58.241340085 +0100
|
||||||
--- src/device/fido/fido_discovery_factory.cc.orig
|
+++ src/device/fido/fido_discovery_factory.cc 2024-12-18 13:01:00.958049095 +0100
|
||||||
+++ src/device/fido/fido_discovery_factory.cc
|
@@ -13,7 +13,6 @@
|
||||||
@@ -38,7 +38,7 @@
|
#include "device/fido/aoa/android_accessory_discovery.h"
|
||||||
#include "device/fido/cros/discovery.h"
|
#include "device/fido/cable/fido_cable_discovery.h"
|
||||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
#include "device/fido/cable/v2_discovery.h"
|
||||||
|
-#include "device/fido/enclave/enclave_discovery.h"
|
||||||
-#if !BUILDFLAG(IS_CHROMEOS)
|
#include "device/fido/features.h"
|
||||||
+#if 0
|
#include "device/fido/fido_discovery_base.h"
|
||||||
#include "device/fido/enclave/enclave_discovery.h"
|
#include "device/fido/hid/fido_hid_discovery.h"
|
||||||
#endif
|
@@ -124,12 +123,7 @@ std::vector<std::unique_ptr<FidoDiscover
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ std::vector<std::unique_ptr<FidoDiscover
|
|
||||||
|
|
||||||
std::optional<std::unique_ptr<FidoDiscoveryBase>>
|
std::optional<std::unique_ptr<FidoDiscoveryBase>>
|
||||||
FidoDiscoveryFactory::MaybeCreateEnclaveDiscovery() {
|
FidoDiscoveryFactory::MaybeCreateEnclaveDiscovery() {
|
||||||
-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
|
- if (!base::FeatureList::IsEnabled(kWebAuthnEnclaveAuthenticator) ||
|
||||||
+#if 0
|
- !enclave_ui_request_stream_ || !network_context_factory_) {
|
||||||
if (!base::FeatureList::IsEnabled(kWebAuthnEnclaveAuthenticator) ||
|
|
||||||
!enclave_ui_request_stream_ || !network_context_factory_) {
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
- }
|
||||||
|
- return std::make_unique<enclave::EnclaveAuthenticatorDiscovery>(
|
||||||
|
- std::move(enclave_ui_request_stream_), network_context_factory_);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FidoDiscoveryFactory::IsTestOverride() {
|
||||||
--- src/device/fido/fido_discovery_factory.h.orig
|
--- src/device/fido/fido_discovery_factory.h.orig
|
||||||
+++ src/device/fido/fido_discovery_factory.h
|
+++ src/device/fido/fido_discovery_factory.h
|
||||||
@@ -15,7 +15,6 @@
|
@@ -15,7 +15,6 @@
|
||||||
@@ -252,3 +258,13 @@ Inspired by:
|
|||||||
#include "device/fido/cable/cable_discovery_data.h"
|
#include "device/fido/cable/cable_discovery_data.h"
|
||||||
#include "device/fido/cable/v2_constants.h"
|
#include "device/fido/cable/v2_constants.h"
|
||||||
#include "device/fido/ctap_get_assertion_request.h"
|
#include "device/fido/ctap_get_assertion_request.h"
|
||||||
|
--- src/components/variations/service/BUILD.gn.orig 2024-12-08 18:34:57.401340060 +0100
|
||||||
|
+++ src/components/variations/service/BUILD.gn 2025-01-01 21:55:42.476247680 +0100
|
||||||
|
@@ -74,7 +74,6 @@ static_library("service") {
|
||||||
|
"//components/network_time",
|
||||||
|
"//components/pref_registry",
|
||||||
|
"//components/prefs",
|
||||||
|
- "//components/sync/service",
|
||||||
|
"//components/variations",
|
||||||
|
"//components/variations/field_trial_config",
|
||||||
|
"//components/variations/proto",
|
||||||
|
@@ -1,34 +0,0 @@
|
|||||||
From 42fc562599d784a8a646703ce3b7c158ce1a8466 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
|
||||||
Date: Wed, 15 May 2024 14:01:03 +0000
|
|
||||||
Subject: [PATCH] IWYU: missing include for usage of std::optional in
|
|
||||||
run_segmenter.h
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Bug: 41455655
|
|
||||||
Change-Id: If28c13730926447b1d362ecfe08ae0bc44112876
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5539811
|
|
||||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
|
||||||
Reviewed-by: Florin Malita <fmalita@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1301267}
|
|
||||||
---
|
|
||||||
.../blink/renderer/platform/fonts/shaping/run_segmenter.h | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h b/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h
|
|
||||||
index 406c4070e91489..116f17dae944a7 100644
|
|
||||||
--- a/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h
|
|
||||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h
|
|
||||||
@@ -6,7 +6,10 @@
|
|
||||||
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_RUN_SEGMENTER_H_
|
|
||||||
|
|
||||||
#include <unicode/uscript.h>
|
|
||||||
+
|
|
||||||
#include <memory>
|
|
||||||
+#include <optional>
|
|
||||||
+
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/font_orientation.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/orientation_iterator.h"
|
|
||||||
#include "third_party/blink/renderer/platform/fonts/script_run_iterator.h"
|
|
@@ -1,22 +0,0 @@
|
|||||||
Unbundle only Skia's vulkan headers. ANGLE needs the bleeding-edge ones in vulkan-deps
|
|
||||||
|
|
||||||
--- a/third_party/skia/include/private/gpu/vk/SkiaVulkan.h
|
|
||||||
+++ b/third_party/skia/include/private/gpu/vk/SkiaVulkan.h
|
|
||||||
@@ -11,7 +11,7 @@
|
|
||||||
// IWYU pragma: begin_exports
|
|
||||||
|
|
||||||
#if (SKIA_IMPLEMENTATION || !defined(SK_VULKAN)) && !defined(SK_USE_EXTERNAL_VULKAN_HEADERS)
|
|
||||||
-#include "include/third_party/vulkan/vulkan/vulkan_core.h"
|
|
||||||
+#include <vulkan/vulkan_core.h>
|
|
||||||
#else
|
|
||||||
// For google3 builds we don't set SKIA_IMPLEMENTATION so we need to make sure that the vulkan
|
|
||||||
// headers stay up to date for our needs
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
#ifdef SK_BUILD_FOR_ANDROID
|
|
||||||
// This is needed to get android extensions for external memory
|
|
||||||
#if (SKIA_IMPLEMENTATION || !defined(SK_VULKAN)) && !defined(SK_USE_EXTERNAL_VULKAN_HEADERS)
|
|
||||||
-#include "include/third_party/vulkan/vulkan/vulkan_android.h"
|
|
||||||
+#include <vulkan/vulkan_android.h>
|
|
||||||
#else
|
|
||||||
// For google3 builds we don't set SKIA_IMPLEMENTATION so we need to make sure that the vulkan
|
|
||||||
// headers stay up to date for our needs
|
|
28
skia_image_decoder_base-missing-stack.patch
Normal file
28
skia_image_decoder_base-missing-stack.patch
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
From 39583ff118920284de516d262979960e7159bcfc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||||
|
Date: Thu, 19 Sep 2024 15:44:36 +0000
|
||||||
|
Subject: [PATCH] IWYU: missing include for usage of std::stack in
|
||||||
|
skia_image_decoder_base.cc
|
||||||
|
|
||||||
|
Bug: 41455655
|
||||||
|
Change-Id: Id9c09f951dacc34d46aadc4badc6b3fd250ad38b
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5872492
|
||||||
|
Reviewed-by: Peter Kasting <pkasting@chromium.org>
|
||||||
|
Commit-Queue: Peter Kasting <pkasting@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1357626}
|
||||||
|
---
|
||||||
|
.../platform/image-decoders/skia/skia_image_decoder_base.cc | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/third_party/blink/renderer/platform/image-decoders/skia/skia_image_decoder_base.cc b/third_party/blink/renderer/platform/image-decoders/skia/skia_image_decoder_base.cc
|
||||||
|
index 1d002cc258ae8b..84fd71c1e46139 100644
|
||||||
|
--- a/third_party/blink/renderer/platform/image-decoders/skia/skia_image_decoder_base.cc
|
||||||
|
+++ b/third_party/blink/renderer/platform/image-decoders/skia/skia_image_decoder_base.cc
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
#include "third_party/blink/renderer/platform/image-decoders/skia/skia_image_decoder_base.h"
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
+#include <stack>
|
||||||
|
|
||||||
|
#include "third_party/blink/renderer/platform/image-decoders/segment_stream.h"
|
||||||
|
#include "third_party/skia/include/codec/SkCodec.h"
|
27
system-absl_algorithm.patch
Normal file
27
system-absl_algorithm.patch
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
Add absl_algorithm to shims
|
||||||
|
This library is used in chrome 130 therefore it should be now submitted upstream
|
||||||
|
|
||||||
|
--- webrtc-5845d/build/linux/unbundle/absl_algorithm.gn.orig 2023-09-21 19:43:13.163148940 +0200
|
||||||
|
+++ webrtc-5845d/build/linux/unbundle/absl_algorithm.gn 2023-09-21 21:24:11.594506276 +0200
|
||||||
|
@@ -1,6 +1,21 @@
|
||||||
|
import("//build/config/linux/pkg_config.gni")
|
||||||
|
import("//build/shim_headers.gni")
|
||||||
|
|
||||||
|
+pkg_config("system_absl_algorithm") {
|
||||||
|
+ packages = [ "absl_algorithm" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+shim_headers("algorithm_shim") {
|
||||||
|
+ root_path = "."
|
||||||
|
+ prefix = "absl/algorithm/"
|
||||||
|
+ headers = [ "algorithm.h" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+source_set("algorithm") {
|
||||||
|
+ deps = [ ":algorithm_shim" ]
|
||||||
|
+ public_configs = [ ":system_absl_algorithm" ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
pkg_config("system_absl_algorithm_container") {
|
||||||
|
packages = [ "absl_algorithm_container" ]
|
||||||
|
}
|
@@ -71,17 +71,6 @@ Unbundle assorted lexing/parsing/transpiling tools written in Python.
|
|||||||
../../build/scripts/blinkbuild/__init__.py
|
../../build/scripts/blinkbuild/__init__.py
|
||||||
../../build/scripts/blinkbuild/name_style_converter.py
|
../../build/scripts/blinkbuild/name_style_converter.py
|
||||||
bind_gen/__init__.py
|
bind_gen/__init__.py
|
||||||
--- a/third_party/blink/renderer/modules/sanitizer_api/builtins/generate_attribute_lists.py
|
|
||||||
+++ b/third_party/blink/renderer/modules/sanitizer_api/builtins/generate_attribute_lists.py
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
# found in the LICENSE file.
|
|
||||||
"""Generate list of attribute names known to this version of Chromium."""
|
|
||||||
|
|
||||||
-from pyjson5.src import json5
|
|
||||||
+import json5
|
|
||||||
import optparse
|
|
||||||
import sys
|
|
||||||
|
|
||||||
--- src/third_party/blink/renderer/bindings/scripts/check_generated_file_list.pydeps.old 2022-11-30 10:28:05.822183900 +0000
|
--- src/third_party/blink/renderer/bindings/scripts/check_generated_file_list.pydeps.old 2022-11-30 10:28:05.822183900 +0000
|
||||||
+++ src/third_party/blink/renderer/bindings/scripts/check_generated_file_list.pydeps 2022-11-30 19:51:45.562760400 +0000
|
+++ src/third_party/blink/renderer/bindings/scripts/check_generated_file_list.pydeps 2022-11-30 19:51:45.562760400 +0000
|
||||||
@@ -2,29 +2,6 @@
|
@@ -2,29 +2,6 @@
|
||||||
@@ -138,18 +127,19 @@ Unbundle assorted lexing/parsing/transpiling tools written in Python.
|
|||||||
sources = sources_list
|
sources = sources_list
|
||||||
public_deps = parser_deps
|
public_deps = parser_deps
|
||||||
outputs = []
|
outputs = []
|
||||||
--- src/third_party/blink/renderer/build/scripts/scripts.gni.old
|
--- src/third_party/blink/renderer/build/scripts/scripts.gni.orig 2024-12-08 18:35:01.138006834 +0100
|
||||||
+++ src/third_party/blink/renderer/build/scripts/scripts.gni
|
+++ src/third_party/blink/renderer/build/scripts/scripts.gni 2024-12-18 13:24:36.436191575 +0100
|
||||||
@@ -17,9 +17,6 @@ _scripts_dir = "//third_party/blink/rend
|
@@ -18,10 +18,6 @@ if (is_ios) {
|
||||||
scripts_for_json5_files = [
|
_scripts_dir = "//third_party/blink/renderer/build/scripts"
|
||||||
# jinja2/__init__.py contains version string, so sufficient as
|
|
||||||
# dependency for whole jinja2 package
|
scripts_for_json5_files = jinja2_sources + [
|
||||||
- "//third_party/jinja2/__init__.py",
|
|
||||||
- "//third_party/markupsafe/__init__.py", # jinja2 dep
|
|
||||||
- "//third_party/pyjson5/src/json5/__init__.py",
|
- "//third_party/pyjson5/src/json5/__init__.py",
|
||||||
|
- "//third_party/pyjson5/src/json5/lib.py",
|
||||||
|
- "//third_party/pyjson5/src/json5/parser.py",
|
||||||
|
- "//third_party/pyjson5/src/json5/version.py",
|
||||||
"$_scripts_dir/blinkbuild/name_style_converter.py",
|
"$_scripts_dir/blinkbuild/name_style_converter.py",
|
||||||
"$_scripts_dir/hasher.py",
|
|
||||||
"$_scripts_dir/json5_generator.py",
|
"$_scripts_dir/json5_generator.py",
|
||||||
|
"$_scripts_dir/license.py",
|
||||||
--- src/third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps.old
|
--- src/third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps.old
|
||||||
+++ src/third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps
|
+++ src/third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps
|
||||||
@@ -2,10 +2,6 @@
|
@@ -2,10 +2,6 @@
|
||||||
|
@@ -1,81 +1,6 @@
|
|||||||
--- src/third_party/wayland/BUILD.gn.old
|
--- src/third_party/wayland/BUILD.gn.orig 2024-12-08 18:35:12.381340501 +0100
|
||||||
+++ src/third_party/wayland/BUILD.gn
|
+++ src/third_party/wayland/BUILD.gn 2024-12-18 13:29:59.426062502 +0100
|
||||||
@@ -45,7 +45,14 @@
|
@@ -289,7 +289,11 @@ config("wayland_scanner_config") {
|
||||||
generator_type = "protocol-client"
|
|
||||||
}
|
|
||||||
|
|
||||||
+pkg_config("system_wayland_client") {
|
|
||||||
+ packages = [ "wayland-client" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
source_set("wayland_util") {
|
|
||||||
+ public_configs = [":system_wayland_client"]
|
|
||||||
+}
|
|
||||||
+source_set("xwayland_util") {
|
|
||||||
sources = [
|
|
||||||
"src/src/wayland-private.h",
|
|
||||||
"src/src/wayland-util.c",
|
|
||||||
@@ -77,7 +84,14 @@
|
|
||||||
public_configs = [ ":wayland_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
-static_library("wayland_server") {
|
|
||||||
+pkg_config("system_wayland_server") {
|
|
||||||
+ packages = [ "wayland-server" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("wayland_server") {
|
|
||||||
+ public_configs = [":system_wayland_server"]
|
|
||||||
+}
|
|
||||||
+static_library("xwayland_server") {
|
|
||||||
sources = [
|
|
||||||
"src/src/event-loop.c",
|
|
||||||
"src/src/wayland-server.c",
|
|
||||||
@@ -104,7 +118,10 @@
|
|
||||||
public_configs = [ ":wayland_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
-static_library("wayland_client") {
|
|
||||||
+source_set("wayland_client") {
|
|
||||||
+ public_configs = [":system_wayland_client"]
|
|
||||||
+}
|
|
||||||
+static_library("xwayland_client") {
|
|
||||||
sources = [ "src/src/wayland-client.c" ]
|
|
||||||
|
|
||||||
deps = [
|
|
||||||
@@ -124,7 +141,14 @@
|
|
||||||
public_configs = [ ":wayland_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
-static_library("wayland_egl") {
|
|
||||||
+pkg_config("system_wayland_egl") {
|
|
||||||
+ packages = [ "wayland-egl" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("wayland_egl") {
|
|
||||||
+ public_configs = [":system_wayland_egl"]
|
|
||||||
+}
|
|
||||||
+static_library("xwayland_egl") {
|
|
||||||
sources = [
|
|
||||||
"src/egl/wayland-egl-backend.h",
|
|
||||||
"src/egl/wayland-egl-core.h",
|
|
||||||
@@ -143,7 +167,14 @@
|
|
||||||
public_configs = [ ":wayland_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
-static_library("wayland_cursor") {
|
|
||||||
+pkg_config("system_wayland_cursor") {
|
|
||||||
+ packages = [ "wayland-cursor" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+source_set("wayland_cursor") {
|
|
||||||
+ public_configs = [":system_wayland_cursor"]
|
|
||||||
+}
|
|
||||||
+static_library("xwayland_cursor") {
|
|
||||||
sources = [
|
|
||||||
"src/cursor/cursor-data.h",
|
|
||||||
"src/cursor/os-compatibility.c",
|
|
||||||
@@ -173,7 +204,11 @@
|
|
||||||
include_dirs = [ "include/" ]
|
include_dirs = [ "include/" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,32 +0,0 @@
|
|||||||
description: use system zlib library instead of embedded lzma in courgette
|
|
||||||
author: Michael Gilbert <mgilbert@debian.org>
|
|
||||||
|
|
||||||
--- a/courgette/BUILD.gn
|
|
||||||
+++ b/courgette/BUILD.gn
|
|
||||||
@@ -58,7 +58,6 @@ static_library("courgette_lib") {
|
|
||||||
|
|
||||||
deps = [
|
|
||||||
"//base",
|
|
||||||
- "//third_party/lzma_sdk",
|
|
||||||
]
|
|
||||||
|
|
||||||
public_deps = [
|
|
||||||
@@ -79,7 +78,6 @@ source_set("courgette_common") {
|
|
||||||
]
|
|
||||||
deps = [
|
|
||||||
"//base",
|
|
||||||
- "//third_party/lzma_sdk",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
--- a/courgette/crc.cc
|
|
||||||
+++ b/courgette/crc.cc
|
|
||||||
@@ -7,6 +7,8 @@
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
+#define COURGETTE_USE_CRC_LIB
|
|
||||||
+
|
|
||||||
#ifdef COURGETTE_USE_CRC_LIB
|
|
||||||
# include "zlib.h"
|
|
||||||
#else
|
|
@@ -1,28 +0,0 @@
|
|||||||
From d852bf71654ae63d5e8e6624652584a9adf1df6f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
|
||||||
Date: Wed, 15 May 2024 17:35:08 +0000
|
|
||||||
Subject: [PATCH] IWYU: missing include for usage of std::optional in
|
|
||||||
text_decoder.h
|
|
||||||
|
|
||||||
Bug: 41455655
|
|
||||||
Change-Id: I8902831e823760d455ca274bfe45b44be9e947f5
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5541275
|
|
||||||
Reviewed-by: Joshua Bell <jsbell@chromium.org>
|
|
||||||
Commit-Queue: Joshua Bell <jsbell@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1301397}
|
|
||||||
---
|
|
||||||
third_party/blink/renderer/modules/encoding/text_decoder.h | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/modules/encoding/text_decoder.h b/third_party/blink/renderer/modules/encoding/text_decoder.h
|
|
||||||
index 02452acb7306b6..9a947aab21b255 100644
|
|
||||||
--- a/third_party/blink/renderer/modules/encoding/text_decoder.h
|
|
||||||
+++ b/third_party/blink/renderer/modules/encoding/text_decoder.h
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
#define THIRD_PARTY_BLINK_RENDERER_MODULES_ENCODING_TEXT_DECODER_H_
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
+#include <optional>
|
|
||||||
|
|
||||||
#include "third_party/blink/renderer/bindings/core/v8/v8_typedefs.h"
|
|
||||||
#include "third_party/blink/renderer/bindings/modules/v8/v8_text_decode_options.h"
|
|
39
vtt_scanner-missing-variant.patch
Normal file
39
vtt_scanner-missing-variant.patch
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
From 40c273b2c0f5f26e16e67428ceaafd8b339bb61f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ivan Murashov <ivan.murashov@lge.com>
|
||||||
|
Date: Fri, 20 Sep 2024 08:03:22 +0000
|
||||||
|
Subject: [PATCH] IWYU: Add missing include for std::variant usage in
|
||||||
|
vtt_scanner.h
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
In the CLs https://crrev.com/c/5832540 and https://crrev.com/c/5842227
|
||||||
|
used std::variant in the
|
||||||
|
third_party/blink/renderer/core/html/track/vtt/vtt_scanner.h, but
|
||||||
|
corresponding include was missed.
|
||||||
|
Added missing include for std::variant usage.
|
||||||
|
|
||||||
|
Bug: 41455655
|
||||||
|
Change-Id: I90d07b12239f8d58e32c8011c710b6c7ea31fb5b
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5872861
|
||||||
|
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
|
||||||
|
Reviewed-by: Fredrik Söderquist <fs@opera.com>
|
||||||
|
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1358046}
|
||||||
|
---
|
||||||
|
third_party/blink/renderer/core/html/track/vtt/vtt_scanner.h | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/third_party/blink/renderer/core/html/track/vtt/vtt_scanner.h b/third_party/blink/renderer/core/html/track/vtt/vtt_scanner.h
|
||||||
|
index 78fc6657e38824..1b466bc9c5f8c3 100644
|
||||||
|
--- a/third_party/blink/renderer/core/html/track/vtt/vtt_scanner.h
|
||||||
|
+++ b/third_party/blink/renderer/core/html/track/vtt/vtt_scanner.h
|
||||||
|
@@ -30,6 +30,8 @@
|
||||||
|
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRACK_VTT_VTT_SCANNER_H_
|
||||||
|
#define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRACK_VTT_VTT_SCANNER_H_
|
||||||
|
|
||||||
|
+#include <variant>
|
||||||
|
+
|
||||||
|
#include "base/check_op.h"
|
||||||
|
#include "third_party/blink/renderer/core/core_export.h"
|
||||||
|
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
@@ -1,446 +0,0 @@
|
|||||||
From 653716a6838676b6cf257e0d9756eccbf509fabb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ilya Bizyaev <ilyabiz@chromium.org>
|
|
||||||
Date: Fri, 19 Jan 2024 02:02:03 +0000
|
|
||||||
Subject: [PATCH] Implement cursor-shape-v1
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
This CL is largely based on the existing support for the custom
|
|
||||||
zcr-cursor-shapes-v1 protocol used by Lacros.
|
|
||||||
|
|
||||||
cursor-shape-v1 is the new upstream protocol for server-side cursor shapes
|
|
||||||
based on zcr-cursor-shapes-v1. Of compositors, it is currently
|
|
||||||
implemented in KDE's KWin (in Plasma 6.0) and Sway (not yet released).
|
|
||||||
|
|
||||||
The enum mapping is based on
|
|
||||||
https://source.chromium.org/chromium/chromium/src/+/main:ui/base/cursor/cursor_factory.cc;l=115;drc=67d90538f11c6b232dbfd716075db52aeb34fd15
|
|
||||||
— despite the seemingly fewer shapes in cursor-shape-v1's list, the
|
|
||||||
reduction is the same as in Chromium's own FreeDesktop cursor loading code,
|
|
||||||
so there's no downside in letting the compositor do the work for us
|
|
||||||
whenever it offers to. Since the compositor — and, by extension, the
|
|
||||||
desktop environment — are the source of truth for cursor display
|
|
||||||
settings, this simplifies complying with the user's preferences.
|
|
||||||
|
|
||||||
Unlike Lacros, we cannot be sure at compile time that the compositor has
|
|
||||||
support for this protocol, so the cursor loading code is changed to not
|
|
||||||
give up on a shape when is has no bitmap and instead let the update
|
|
||||||
code try the server-side approach.
|
|
||||||
|
|
||||||
Exo does not support cursor-shape-v1, so it will keep using the
|
|
||||||
zcr-cursor-shapes-v1 branch.
|
|
||||||
|
|
||||||
I have tested this CL in a Plasma 6 RC1 session with this CSS demo:
|
|
||||||
https://www.tutorialrepublic.com/codelab.php?topic=css&file=cursor-property
|
|
||||||
|
|
||||||
Low-Coverage-Reason: TRIVIAL_CHANGE Not tested are the enum conversion and getters/setters, which is boilerplate.
|
|
||||||
Bug: 1427111
|
|
||||||
Cq-Include-Trybots: luci.chromium.try:linux-lacros-rel,linux-wayland-rel
|
|
||||||
Change-Id: I50567021e6fd80a641bbc906370c517efe16ffb9
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5196950
|
|
||||||
Commit-Queue: Ilya Bizyaev <ilyabiz@chromium.org>
|
|
||||||
Reviewed-by: Henrique Ferreiro <hferreiro@igalia.com>
|
|
||||||
Reviewed-by: Kramer Ge <fangzhoug@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1249191}
|
|
||||||
---
|
|
||||||
third_party/wayland-protocols/BUILD.gn | 4 +
|
|
||||||
ui/ozone/common/bitmap_cursor_factory.cc | 90 +-------
|
|
||||||
.../common/bitmap_cursor_factory_unittest.cc | 12 +-
|
|
||||||
ui/ozone/platform/wayland/BUILD.gn | 5 +
|
|
||||||
.../platform/wayland/common/wayland_object.cc | 3 +
|
|
||||||
.../platform/wayland/common/wayland_object.h | 2 +
|
|
||||||
.../wayland/host/wayland_connection.cc | 3 +
|
|
||||||
.../wayland/host/wayland_connection.h | 7 +
|
|
||||||
.../host/wayland_connection_test_api.h | 5 +
|
|
||||||
.../wayland/host/wayland_cursor_shape.cc | 194 ++++++++++++++++++
|
|
||||||
.../wayland/host/wayland_cursor_shape.h | 53 +++++
|
|
||||||
.../platform/wayland/host/wayland_window.cc | 18 +-
|
|
||||||
.../wayland/host/wayland_window_unittest.cc | 76 +++++++
|
|
||||||
.../wayland/host/wayland_zcr_cursor_shapes.cc | 2 -
|
|
||||||
14 files changed, 371 insertions(+), 103 deletions(-)
|
|
||||||
create mode 100644 ui/ozone/platform/wayland/host/wayland_cursor_shape.cc
|
|
||||||
create mode 100644 ui/ozone/platform/wayland/host/wayland_cursor_shape.h
|
|
||||||
|
|
||||||
diff --git a/third_party/wayland-protocols/BUILD.gn b/third_party/wayland-protocols/BUILD.gn
|
|
||||||
index b0c0082769055..db15b95e41dd4 100644
|
|
||||||
--- a/third_party/wayland-protocols/BUILD.gn
|
|
||||||
+++ b/third_party/wayland-protocols/BUILD.gn
|
|
||||||
@@ -15,6 +15,10 @@ wayland_protocol("content_type_protocol") {
|
|
||||||
sources = [ "unstable/content-type/content-type-v1.xml" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
+wayland_protocol("cursor_shape_protocol") {
|
|
||||||
+ sources = [ "src/staging/cursor-shape/cursor-shape-v1.xml" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
wayland_protocol("cursor_shapes_protocol") {
|
|
||||||
sources = [ "unstable/cursor-shapes/cursor-shapes-unstable-v1.xml" ]
|
|
||||||
}
|
|
||||||
diff --git a/ui/ozone/common/bitmap_cursor_factory.cc b/ui/ozone/common/bitmap_cursor_factory.cc
|
|
||||||
index cf9bb8655a9cb..fd7274ccd28e4 100644
|
|
||||||
--- a/ui/ozone/common/bitmap_cursor_factory.cc
|
|
||||||
+++ b/ui/ozone/common/bitmap_cursor_factory.cc
|
|
||||||
@@ -8,84 +8,11 @@
|
|
||||||
|
|
||||||
#include "base/check_op.h"
|
|
||||||
#include "base/memory/scoped_refptr.h"
|
|
||||||
-#include "build/chromeos_buildflags.h"
|
|
||||||
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
|
|
||||||
#include "ui/ozone/common/bitmap_cursor.h"
|
|
||||||
|
|
||||||
namespace ui {
|
|
||||||
|
|
||||||
-namespace {
|
|
||||||
-
|
|
||||||
-#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
||||||
-// Returns true if ozone should use the default cursor for |type|, instead of
|
|
||||||
-// loading and storing bitmaps for it. Used on Lacros to skip client-side bitmap
|
|
||||||
-// loading for server-side cursors.
|
|
||||||
-bool UseDefaultCursorForType(mojom::CursorType type) {
|
|
||||||
- using mojom::CursorType;
|
|
||||||
- switch (type) {
|
|
||||||
- case CursorType::kNull:
|
|
||||||
- case CursorType::kPointer:
|
|
||||||
- case CursorType::kCross:
|
|
||||||
- case CursorType::kHand:
|
|
||||||
- case CursorType::kIBeam:
|
|
||||||
- case CursorType::kWait:
|
|
||||||
- case CursorType::kHelp:
|
|
||||||
- case CursorType::kEastResize:
|
|
||||||
- case CursorType::kNorthResize:
|
|
||||||
- case CursorType::kNorthEastResize:
|
|
||||||
- case CursorType::kNorthWestResize:
|
|
||||||
- case CursorType::kSouthResize:
|
|
||||||
- case CursorType::kSouthEastResize:
|
|
||||||
- case CursorType::kSouthWestResize:
|
|
||||||
- case CursorType::kWestResize:
|
|
||||||
- case CursorType::kNorthSouthResize:
|
|
||||||
- case CursorType::kEastWestResize:
|
|
||||||
- case CursorType::kNorthEastSouthWestResize:
|
|
||||||
- case CursorType::kNorthWestSouthEastResize:
|
|
||||||
- case CursorType::kColumnResize:
|
|
||||||
- case CursorType::kRowResize:
|
|
||||||
- case CursorType::kMiddlePanning:
|
|
||||||
- case CursorType::kEastPanning:
|
|
||||||
- case CursorType::kNorthPanning:
|
|
||||||
- case CursorType::kNorthEastPanning:
|
|
||||||
- case CursorType::kNorthWestPanning:
|
|
||||||
- case CursorType::kSouthPanning:
|
|
||||||
- case CursorType::kSouthEastPanning:
|
|
||||||
- case CursorType::kSouthWestPanning:
|
|
||||||
- case CursorType::kWestPanning:
|
|
||||||
- case CursorType::kMove:
|
|
||||||
- case CursorType::kVerticalText:
|
|
||||||
- case CursorType::kCell:
|
|
||||||
- case CursorType::kContextMenu:
|
|
||||||
- case CursorType::kAlias:
|
|
||||||
- case CursorType::kProgress:
|
|
||||||
- case CursorType::kNoDrop:
|
|
||||||
- case CursorType::kCopy:
|
|
||||||
- case CursorType::kNotAllowed:
|
|
||||||
- case CursorType::kZoomIn:
|
|
||||||
- case CursorType::kZoomOut:
|
|
||||||
- case CursorType::kGrab:
|
|
||||||
- case CursorType::kGrabbing:
|
|
||||||
- case CursorType::kDndNone:
|
|
||||||
- case CursorType::kDndMove:
|
|
||||||
- case CursorType::kDndCopy:
|
|
||||||
- case CursorType::kDndLink:
|
|
||||||
- return true;
|
|
||||||
- case CursorType::kNone:
|
|
||||||
- case CursorType::kMiddlePanningVertical:
|
|
||||||
- case CursorType::kMiddlePanningHorizontal:
|
|
||||||
- case CursorType::kCustom:
|
|
||||||
- case CursorType::kEastWestNoResize:
|
|
||||||
- case CursorType::kNorthEastSouthWestNoResize:
|
|
||||||
- case CursorType::kNorthSouthNoResize:
|
|
||||||
- case CursorType::kNorthWestSouthEastNoResize:
|
|
||||||
- return false;
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
-#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
||||||
-
|
|
||||||
-} // namespace
|
|
||||||
-
|
|
||||||
BitmapCursorFactory::BitmapCursorFactory() = default;
|
|
||||||
|
|
||||||
BitmapCursorFactory::~BitmapCursorFactory() = default;
|
|
||||||
@@ -93,18 +20,11 @@ BitmapCursorFactory::~BitmapCursorFactory() = default;
|
|
||||||
scoped_refptr<PlatformCursor> BitmapCursorFactory::GetDefaultCursor(
|
|
||||||
mojom::CursorType type) {
|
|
||||||
if (!default_cursors_.count(type)) {
|
|
||||||
- if (type == mojom::CursorType::kNone
|
|
||||||
-#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
||||||
- || UseDefaultCursorForType(type)
|
|
||||||
-#endif
|
|
||||||
- ) {
|
|
||||||
- // Lacros uses server-side cursors for most types. These cursors don't
|
|
||||||
- // need to load bitmap images on the client.
|
|
||||||
- // Similarly, the hidden cursor doesn't use any bitmap.
|
|
||||||
- default_cursors_[type] = base::MakeRefCounted<BitmapCursor>(type);
|
|
||||||
- } else {
|
|
||||||
- return nullptr;
|
|
||||||
- }
|
|
||||||
+ // Return a cursor not backed by a bitmap to preserve the type information.
|
|
||||||
+ // It can still be used to request the compositor to draw a server-side
|
|
||||||
+ // cursor for the given type.
|
|
||||||
+ // kNone is handled separately and does not need a bitmap.
|
|
||||||
+ default_cursors_[type] = base::MakeRefCounted<BitmapCursor>(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
return default_cursors_[type];
|
|
||||||
diff --git a/ui/ozone/common/bitmap_cursor_factory_unittest.cc b/ui/ozone/common/bitmap_cursor_factory_unittest.cc
|
|
||||||
index 905b721d66193..6428821d90c6b 100644
|
|
||||||
--- a/ui/ozone/common/bitmap_cursor_factory_unittest.cc
|
|
||||||
+++ b/ui/ozone/common/bitmap_cursor_factory_unittest.cc
|
|
||||||
@@ -4,7 +4,6 @@
|
|
||||||
|
|
||||||
#include "ui/ozone/common/bitmap_cursor_factory.h"
|
|
||||||
|
|
||||||
-#include "build/chromeos_buildflags.h"
|
|
||||||
#include "testing/gtest/include/gtest/gtest.h"
|
|
||||||
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
|
|
||||||
#include "ui/base/cursor/platform_cursor.h"
|
|
||||||
@@ -24,8 +23,7 @@ TEST(BitmapCursorFactoryTest, InvisibleCursor) {
|
|
||||||
CursorType::kNone);
|
|
||||||
}
|
|
||||||
|
|
||||||
-#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
||||||
-TEST(BitmapCursorFactoryTest, LacrosUsesDefaultCursorsForCommonTypes) {
|
|
||||||
+TEST(BitmapCursorFactoryTest, DefaultCursorsHaveTypeInformation) {
|
|
||||||
BitmapCursorFactory factory;
|
|
||||||
|
|
||||||
// Verify some common cursor types.
|
|
||||||
@@ -45,12 +43,4 @@ TEST(BitmapCursorFactoryTest, LacrosUsesDefaultCursorsForCommonTypes) {
|
|
||||||
CursorType::kIBeam);
|
|
||||||
}
|
|
||||||
|
|
||||||
-TEST(BitmapCursorFactoryTest, LacrosCustomCursor) {
|
|
||||||
- BitmapCursorFactory factory;
|
|
||||||
- auto cursor = factory.GetDefaultCursor(CursorType::kCustom);
|
|
||||||
- // Custom cursors don't have a default platform cursor.
|
|
||||||
- EXPECT_EQ(cursor, nullptr);
|
|
||||||
-}
|
|
||||||
-#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
||||||
-
|
|
||||||
} // namespace ui
|
|
||||||
diff --git a/ui/ozone/platform/wayland/BUILD.gn b/ui/ozone/platform/wayland/BUILD.gn
|
|
||||||
index 8ebc966e1e1c3..d3dc3c736aa3c 100644
|
|
||||||
--- a/ui/ozone/platform/wayland/BUILD.gn
|
|
||||||
+++ b/ui/ozone/platform/wayland/BUILD.gn
|
|
||||||
@@ -103,6 +103,8 @@ source_set("wayland") {
|
|
||||||
"host/wayland_cursor.h",
|
|
||||||
"host/wayland_cursor_position.cc",
|
|
||||||
"host/wayland_cursor_position.h",
|
|
||||||
+ "host/wayland_cursor_shape.cc",
|
|
||||||
+ "host/wayland_cursor_shape.h",
|
|
||||||
"host/wayland_data_device.cc",
|
|
||||||
"host/wayland_data_device.h",
|
|
||||||
"host/wayland_data_device_base.cc",
|
|
||||||
@@ -256,6 +258,7 @@ source_set("wayland") {
|
|
||||||
"//third_party/wayland:wayland_util",
|
|
||||||
"//third_party/wayland-protocols:alpha_compositing_protocol",
|
|
||||||
"//third_party/wayland-protocols:content_type_protocol",
|
|
||||||
+ "//third_party/wayland-protocols:cursor_shape_protocol",
|
|
||||||
"//third_party/wayland-protocols:cursor_shapes_protocol",
|
|
||||||
"//third_party/wayland-protocols:extended_drag",
|
|
||||||
"//third_party/wayland-protocols:fractional_scale_protocol",
|
|
||||||
@@ -274,6 +277,7 @@ source_set("wayland") {
|
|
||||||
"//third_party/wayland-protocols:relative_pointer_protocol",
|
|
||||||
"//third_party/wayland-protocols:single_pixel_buffer",
|
|
||||||
"//third_party/wayland-protocols:stylus_protocol",
|
|
||||||
+ "//third_party/wayland-protocols:tablet_protocol",
|
|
||||||
"//third_party/wayland-protocols:text_input_extension_protocol",
|
|
||||||
"//third_party/wayland-protocols:text_input_protocol",
|
|
||||||
"//third_party/wayland-protocols:touchpad_haptics_protocol",
|
|
||||||
@@ -623,6 +627,7 @@ source_set("wayland_unittests") {
|
|
||||||
"//testing/gmock",
|
|
||||||
"//testing/gtest",
|
|
||||||
"//third_party/wayland:wayland_server",
|
|
||||||
+ "//third_party/wayland-protocols:cursor_shape_protocol",
|
|
||||||
"//third_party/wayland-protocols:cursor_shapes_protocol",
|
|
||||||
"//third_party/wayland-protocols:keyboard_extension_protocol",
|
|
||||||
"//third_party/wayland-protocols:linux_dmabuf_protocol",
|
|
||||||
diff --git a/ui/ozone/platform/wayland/common/wayland_object.cc b/ui/ozone/platform/wayland/common/wayland_object.cc
|
|
||||||
index bcc48aaeb186e..7f09a9f4f67dd 100644
|
|
||||||
--- a/ui/ozone/platform/wayland/common/wayland_object.cc
|
|
||||||
+++ b/ui/ozone/platform/wayland/common/wayland_object.cc
|
|
||||||
@@ -8,6 +8,7 @@
|
|
||||||
#include <aura-shell-client-protocol.h>
|
|
||||||
#include <chrome-color-management-client-protocol.h>
|
|
||||||
#include <content-type-v1-client-protocol.h>
|
|
||||||
+#include <cursor-shape-v1-client-protocol.h>
|
|
||||||
#include <cursor-shapes-unstable-v1-client-protocol.h>
|
|
||||||
#include <extended-drag-unstable-v1-client-protocol.h>
|
|
||||||
#include <fractional-scale-v1-client-protocol.h>
|
|
||||||
@@ -228,6 +229,8 @@ IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_viewport)
|
|
||||||
IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_viewporter)
|
|
||||||
IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_content_type_v1)
|
|
||||||
IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_content_type_manager_v1)
|
|
||||||
+IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_cursor_shape_device_v1)
|
|
||||||
+IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_cursor_shape_manager_v1)
|
|
||||||
IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_fractional_scale_manager_v1)
|
|
||||||
IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_fractional_scale_v1)
|
|
||||||
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_activation_v1)
|
|
||||||
diff --git a/ui/ozone/platform/wayland/common/wayland_object.h b/ui/ozone/platform/wayland/common/wayland_object.h
|
|
||||||
index c84c084841ea9..436e7ff5f3910 100644
|
|
||||||
--- a/ui/ozone/platform/wayland/common/wayland_object.h
|
|
||||||
+++ b/ui/ozone/platform/wayland/common/wayland_object.h
|
|
||||||
@@ -146,6 +146,8 @@ DECLARE_WAYLAND_OBJECT_TRAITS(wp_viewport)
|
|
||||||
DECLARE_WAYLAND_OBJECT_TRAITS(wp_viewporter)
|
|
||||||
DECLARE_WAYLAND_OBJECT_TRAITS(wp_content_type_manager_v1)
|
|
||||||
DECLARE_WAYLAND_OBJECT_TRAITS(wp_content_type_v1)
|
|
||||||
+DECLARE_WAYLAND_OBJECT_TRAITS(wp_cursor_shape_device_v1)
|
|
||||||
+DECLARE_WAYLAND_OBJECT_TRAITS(wp_cursor_shape_manager_v1)
|
|
||||||
DECLARE_WAYLAND_OBJECT_TRAITS(wp_fractional_scale_manager_v1)
|
|
||||||
DECLARE_WAYLAND_OBJECT_TRAITS(wp_fractional_scale_v1)
|
|
||||||
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_activation_v1)
|
|
||||||
diff --git a/ui/ozone/platform/wayland/host/wayland_connection.cc b/ui/ozone/platform/wayland/host/wayland_connection.cc
|
|
||||||
index 5c62c0ead1497..944c9dd6904cd 100644
|
|
||||||
--- a/ui/ozone/platform/wayland/host/wayland_connection.cc
|
|
||||||
+++ b/ui/ozone/platform/wayland/host/wayland_connection.cc
|
|
||||||
@@ -41,6 +41,7 @@
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_buffer_manager_host.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_cursor.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_cursor_position.h"
|
|
||||||
+#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_data_device_manager.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_drm.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_event_source.h"
|
|
||||||
@@ -165,6 +166,8 @@ bool WaylandConnection::Initialize(bool use_threaded_polling) {
|
|
||||||
RegisterGlobalObjectFactory(WaylandZcrColorManager::kInterfaceName,
|
|
||||||
&WaylandZcrColorManager::Instantiate);
|
|
||||||
}
|
|
||||||
+ RegisterGlobalObjectFactory(WaylandCursorShape::kInterfaceName,
|
|
||||||
+ &WaylandCursorShape::Instantiate);
|
|
||||||
RegisterGlobalObjectFactory(WaylandZcrCursorShapes::kInterfaceName,
|
|
||||||
&WaylandZcrCursorShapes::Instantiate);
|
|
||||||
RegisterGlobalObjectFactory(WaylandZcrTouchpadHaptics::kInterfaceName,
|
|
||||||
diff --git a/ui/ozone/platform/wayland/host/wayland_connection.h b/ui/ozone/platform/wayland/host/wayland_connection.h
|
|
||||||
index b0bb930a3de99..13be193482721 100644
|
|
||||||
--- a/ui/ozone/platform/wayland/host/wayland_connection.h
|
|
||||||
+++ b/ui/ozone/platform/wayland/host/wayland_connection.h
|
|
||||||
@@ -62,6 +62,7 @@ class WaylandZwpPointerGestures;
|
|
||||||
class WaylandZwpRelativePointerManager;
|
|
||||||
class WaylandDataDeviceManager;
|
|
||||||
class WaylandCursorPosition;
|
|
||||||
+class WaylandCursorShape;
|
|
||||||
class WaylandWindowDragController;
|
|
||||||
class GtkPrimarySelectionDeviceManager;
|
|
||||||
class GtkShell1;
|
|
||||||
@@ -209,6 +210,10 @@ class WaylandConnection {
|
|
||||||
return zcr_color_manager_.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
+ WaylandCursorShape* wayland_cursor_shape() const {
|
|
||||||
+ return cursor_shape_.get();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
WaylandZcrCursorShapes* zcr_cursor_shapes() const {
|
|
||||||
return zcr_cursor_shapes_.get();
|
|
||||||
}
|
|
||||||
@@ -383,6 +388,7 @@ class WaylandConnection {
|
|
||||||
friend class WaylandZwpPointerGestures;
|
|
||||||
friend class WaylandZwpRelativePointerManager;
|
|
||||||
friend class WaylandZcrColorManager;
|
|
||||||
+ friend class WaylandCursorShape;
|
|
||||||
friend class WaylandZcrCursorShapes;
|
|
||||||
friend class XdgActivation;
|
|
||||||
friend class XdgForeignWrapper;
|
|
||||||
@@ -483,6 +489,7 @@ class WaylandConnection {
|
|
||||||
std::unique_ptr<WaylandZAuraOutputManager> zaura_output_manager_;
|
|
||||||
std::unique_ptr<WaylandZAuraShell> zaura_shell_;
|
|
||||||
std::unique_ptr<WaylandZcrColorManager> zcr_color_manager_;
|
|
||||||
+ std::unique_ptr<WaylandCursorShape> cursor_shape_;
|
|
||||||
std::unique_ptr<WaylandZcrCursorShapes> zcr_cursor_shapes_;
|
|
||||||
std::unique_ptr<WaylandZcrTouchpadHaptics> zcr_touchpad_haptics_;
|
|
||||||
std::unique_ptr<WaylandZwpPointerConstraints> zwp_pointer_constraints_;
|
|
||||||
diff --git a/ui/ozone/platform/wayland/host/wayland_connection_test_api.h b/ui/ozone/platform/wayland/host/wayland_connection_test_api.h
|
|
||||||
index 31e61aff6010b..419801f0257a3 100644
|
|
||||||
--- a/ui/ozone/platform/wayland/host/wayland_connection_test_api.h
|
|
||||||
+++ b/ui/ozone/platform/wayland/host/wayland_connection_test_api.h
|
|
||||||
@@ -10,6 +10,7 @@
|
|
||||||
|
|
||||||
#include "base/memory/raw_ptr.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
|
|
||||||
+#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.h"
|
|
||||||
|
|
||||||
namespace ui {
|
|
||||||
@@ -22,6 +23,10 @@ class WaylandConnectionTestApi {
|
|
||||||
WaylandConnectionTestApi& operator=(const WaylandConnectionTestApi&) = delete;
|
|
||||||
~WaylandConnectionTestApi() = default;
|
|
||||||
|
|
||||||
+ void SetCursorShape(std::unique_ptr<WaylandCursorShape> obj) {
|
|
||||||
+ impl_->cursor_shape_ = std::move(obj);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
void SetZcrCursorShapes(std::unique_ptr<WaylandZcrCursorShapes> obj) {
|
|
||||||
impl_->zcr_cursor_shapes_ = std::move(obj);
|
|
||||||
}
|
|
||||||
diff --git a/ui/ozone/platform/wayland/host/wayland_window.cc b/ui/ozone/platform/wayland/host/wayland_window.cc
|
|
||||||
index 68f87776ef4f0..f5c36964ad36d 100644
|
|
||||||
--- a/ui/ozone/platform/wayland/host/wayland_window.cc
|
|
||||||
+++ b/ui/ozone/platform/wayland/host/wayland_window.cc
|
|
||||||
@@ -41,6 +41,7 @@
|
|
||||||
#include "ui/ozone/platform/wayland/common/wayland_overlay_config.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/dump_util.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
|
|
||||||
+#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_data_drag_controller.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_event_source.h"
|
|
||||||
#include "ui/ozone/platform/wayland/host/wayland_frame_manager.h"
|
|
||||||
@@ -1110,7 +1111,9 @@ void WaylandWindow::UpdateCursorShape(scoped_refptr<BitmapCursor> cursor) {
|
|
||||||
base::IsValueInRangeForNumericType<int>(
|
|
||||||
cursor->cursor_image_scale_factor()));
|
|
||||||
|
|
||||||
- std::optional<int32_t> shape =
|
|
||||||
+ std::optional<uint32_t> shape =
|
|
||||||
+ WaylandCursorShape::ShapeFromType(cursor->type());
|
|
||||||
+ std::optional<int32_t> zcr_shape =
|
|
||||||
WaylandZcrCursorShapes::ShapeFromType(cursor->type());
|
|
||||||
|
|
||||||
// Round cursor scale factor to ceil as wl_surface.set_buffer_scale accepts
|
|
||||||
@@ -1118,20 +1121,25 @@ void WaylandWindow::UpdateCursorShape(scoped_refptr<BitmapCursor> cursor) {
|
|
||||||
if (cursor->type() == CursorType::kNone) { // Hide the cursor.
|
|
||||||
connection_->SetCursorBitmap(
|
|
||||||
{}, gfx::Point(), std::ceil(cursor->cursor_image_scale_factor()));
|
|
||||||
+ } else if (connection_->wayland_cursor_shape() && shape.has_value()) {
|
|
||||||
+ // Prefer Wayland server-side cursor support, as the compositor knows better
|
|
||||||
+ // how to draw the cursor.
|
|
||||||
+ connection_->wayland_cursor_shape()->SetCursorShape(shape.value());
|
|
||||||
} else if (cursor->platform_data()) { // Check for theme-provided cursor.
|
|
||||||
connection_->SetPlatformCursor(
|
|
||||||
reinterpret_cast<wl_cursor*>(cursor->platform_data()),
|
|
||||||
std::ceil(cursor->cursor_image_scale_factor()));
|
|
||||||
} else if (connection_->zcr_cursor_shapes() &&
|
|
||||||
- shape.has_value()) { // Check for Wayland server-side cursor
|
|
||||||
- // support (e.g. exo for lacros).
|
|
||||||
+ zcr_shape.has_value()) { // Check for Exo server-side cursor
|
|
||||||
+ // support.
|
|
||||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
||||||
// Lacros should not load image assets for default cursors. See
|
|
||||||
// `BitmapCursorFactory::GetDefaultCursor()`.
|
|
||||||
DCHECK(cursor->bitmaps().empty());
|
|
||||||
#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
|
|
||||||
- connection_->zcr_cursor_shapes()->SetCursorShape(shape.value());
|
|
||||||
- } else { // Use client-side bitmap cursors as fallback.
|
|
||||||
+ connection_->zcr_cursor_shapes()->SetCursorShape(zcr_shape.value());
|
|
||||||
+ } else if (!cursor->bitmaps()
|
|
||||||
+ .empty()) { // Use client-side bitmap cursors as fallback.
|
|
||||||
// Translate physical pixels to DIPs.
|
|
||||||
gfx::Point hotspot_in_dips = gfx::ScaleToRoundedPoint(
|
|
||||||
cursor->hotspot(), 1.0f / cursor->cursor_image_scale_factor());
|
|
||||||
diff --git a/ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.cc b/ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.cc
|
|
||||||
index 9e3243dceea20..297c48e614087 100644
|
|
||||||
--- a/ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.cc
|
|
||||||
+++ b/ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.cc
|
|
||||||
@@ -168,8 +168,6 @@ absl::optional<int32_t> WaylandZcrCursorShapes::ShapeFromType(CursorType type) {
|
|
||||||
return ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_COPY;
|
|
||||||
case CursorType::kDndLink:
|
|
||||||
return ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_LINK;
|
|
||||||
- // NOTE: If you add a new cursor shape, please also update
|
|
||||||
- // UseDefaultCursorForType() in bitmap_cursor_factory_ozone.cc.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
434
wayland-protocol-toplevel-drag.patch
Normal file
434
wayland-protocol-toplevel-drag.patch
Normal file
@@ -0,0 +1,434 @@
|
|||||||
|
From 8f45d25c2f8f4849b66136b14734b79e2b4fe9c1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Mader <robert.mader@collabora.com>
|
||||||
|
Date: Thu, 12 Sep 2024 19:11:15 +0000
|
||||||
|
Subject: [PATCH] ozone/wayland: Add support for xdg-toplevel-drag
|
||||||
|
|
||||||
|
Rebased and slighty updated version of https://chromium-review.googlesource.com/c/chromium/src/+/4400967
|
||||||
|
|
||||||
|
This implements a new protocol landed in wayland-protocols 1.34 that can
|
||||||
|
be found at
|
||||||
|
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-toplevel-drag/xdg-toplevel-drag-v1.xml
|
||||||
|
|
||||||
|
It is intended to be a drop-in replacement for extended-drag-unstable-v1
|
||||||
|
with some features removed that were never implemented in Exo/Chromium.
|
||||||
|
|
||||||
|
If both the `extended-drag` and `xdg-toplevel-drag` protocols are
|
||||||
|
supported by the compositor - i.e. in Exo - the former is kept being
|
||||||
|
used by default. The later can be enabled via the
|
||||||
|
`WaylandXdgToplevelDrag` feature.
|
||||||
|
|
||||||
|
Original author: David Redondo <kde@david-redondo.de>
|
||||||
|
|
||||||
|
Bug: b:315000518
|
||||||
|
Bug: b:324170129
|
||||||
|
Change-Id: If251ac9944ec4395f2d8630b7c4ac74ca56a662d
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5088752
|
||||||
|
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
||||||
|
Reviewed-by: Antonio Gomes <tonikitoo@igalia.com>
|
||||||
|
Commit-Queue: Nick Yamane <nickdiego@igalia.com>
|
||||||
|
Reviewed-by: Nick Yamane <nickdiego@igalia.com>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1354718}
|
||||||
|
---
|
||||||
|
AUTHORS | 1 +
|
||||||
|
ui/ozone/common/features.cc | 16 ++++
|
||||||
|
ui/ozone/common/features.h | 1 +
|
||||||
|
ui/ozone/platform/wayland/BUILD.gn | 1 +
|
||||||
|
.../platform/wayland/common/wayland_object.cc | 3 +
|
||||||
|
.../platform/wayland/common/wayland_object.h | 2 +
|
||||||
|
.../wayland/host/wayland_connection.cc | 10 +++
|
||||||
|
.../wayland/host/wayland_connection.h | 4 +
|
||||||
|
.../wayland/host/wayland_toplevel_window.cc | 13 +--
|
||||||
|
.../host/wayland_window_drag_controller.cc | 85 ++++++++++++++++---
|
||||||
|
.../host/wayland_window_drag_controller.h | 4 +
|
||||||
|
.../wayland/host/xdg_toplevel_wrapper_impl.h | 1 +
|
||||||
|
12 files changed, 121 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/AUTHORS b/AUTHORS
|
||||||
|
index 52d075125b8126..bd9327b5b477f2 100644
|
||||||
|
--- a/AUTHORS
|
||||||
|
+++ b/AUTHORS
|
||||||
|
@@ -337,6 +337,7 @@ David Leen <davileen@amazon.com>
|
||||||
|
David Manouchehri <david@davidmanouchehri.com>
|
||||||
|
David McAllister <mcdavid@amazon.com>
|
||||||
|
David Michael Barr <david.barr@samsung.com>
|
||||||
|
+David Redondo <kde@david-redondo.de>
|
||||||
|
David Sanders <dsanders11@ucsbalum.com>
|
||||||
|
David Spellman <dspell@amazon.com>
|
||||||
|
David Valachovic <adenflorian@gmail.com>
|
||||||
|
diff --git a/ui/ozone/common/features.cc b/ui/ozone/common/features.cc
|
||||||
|
index bd13d0e17f39a3..74ffde0cf5b85c 100644
|
||||||
|
--- a/ui/ozone/common/features.cc
|
||||||
|
+++ b/ui/ozone/common/features.cc
|
||||||
|
@@ -37,6 +37,18 @@ BASE_FEATURE(kWaylandFractionalScaleV1,
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
|
+// Controls whether support for the xdg-toplevel-drag protocol should be
|
||||||
|
+// enabled. On Lacros it will then be used even if the Exo-only extended-drag
|
||||||
|
+// protocol is supported.
|
||||||
|
+BASE_FEATURE(kWaylandXdgToplevelDrag,
|
||||||
|
+ "WaylandXdgToplevelDrag",
|
||||||
|
+#if BUILDFLAG(IS_LINUX)
|
||||||
|
+ base::FEATURE_ENABLED_BY_DEFAULT
|
||||||
|
+#else
|
||||||
|
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||||
|
+#endif
|
||||||
|
+);
|
||||||
|
+
|
||||||
|
// This debug/dev flag pretty-prints DRM modeset configuration logs for ease
|
||||||
|
// of reading. For more information, see: http://b/233006802
|
||||||
|
BASE_FEATURE(kPrettyPrintDrmModesetConfigLogs,
|
||||||
|
@@ -62,6 +74,10 @@ bool IsWaylandFractionalScaleV1Enabled() {
|
||||||
|
return base::FeatureList::IsEnabled(kWaylandFractionalScaleV1);
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool IsWaylandXdgToplevelDragEnabled() {
|
||||||
|
+ return base::FeatureList::IsEnabled(kWaylandXdgToplevelDrag);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool IsPrettyPrintDrmModesetConfigLogsEnabled() {
|
||||||
|
return base::FeatureList::IsEnabled(kPrettyPrintDrmModesetConfigLogs);
|
||||||
|
}
|
||||||
|
diff --git a/ui/ozone/common/features.h b/ui/ozone/common/features.h
|
||||||
|
index 5d4c3c42af9ca7..1f88055f8975bc 100644
|
||||||
|
--- a/ui/ozone/common/features.h
|
||||||
|
+++ b/ui/ozone/common/features.h
|
||||||
|
@@ -18,6 +18,7 @@ BASE_DECLARE_FEATURE(kUseDynamicCursorSize);
|
||||||
|
bool IsWaylandSurfaceSubmissionInPixelCoordinatesEnabled();
|
||||||
|
bool IsWaylandOverlayDelegationEnabled();
|
||||||
|
bool IsWaylandFractionalScaleV1Enabled();
|
||||||
|
+bool IsWaylandXdgToplevelDragEnabled();
|
||||||
|
bool IsPrettyPrintDrmModesetConfigLogsEnabled();
|
||||||
|
bool IsUseDynamicCursorSizeEnabled();
|
||||||
|
|
||||||
|
diff --git a/ui/ozone/platform/wayland/BUILD.gn b/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
index 6d3ec34101498d..b87a7b5d2903f0 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
+++ b/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
@@ -294,6 +294,7 @@ source_set("wayland") {
|
||||||
|
"//third_party/wayland-protocols:xdg_foreign",
|
||||||
|
"//third_party/wayland-protocols:xdg_output_protocol",
|
||||||
|
"//third_party/wayland-protocols:xdg_shell_protocol",
|
||||||
|
+ "//third_party/wayland-protocols:xdg_toplevel_drag_protocol",
|
||||||
|
"//third_party/wayland-protocols:xdg_toplevel_icon_protocol",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/base:buildflags",
|
||||||
|
diff --git a/ui/ozone/platform/wayland/common/wayland_object.cc b/ui/ozone/platform/wayland/common/wayland_object.cc
|
||||||
|
index e30367a19d7774..1534a735855dd3 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/common/wayland_object.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/common/wayland_object.cc
|
||||||
|
@@ -44,6 +44,7 @@
|
||||||
|
#include <xdg-foreign-unstable-v2-client-protocol.h>
|
||||||
|
#include <xdg-output-unstable-v1-client-protocol.h>
|
||||||
|
#include <xdg-shell-client-protocol.h>
|
||||||
|
+#include <xdg-toplevel-drag-v1-client-protocol.h>
|
||||||
|
#include <xdg-toplevel-icon-v1-client-protocol.h>
|
||||||
|
|
||||||
|
#include "base/logging.h"
|
||||||
|
@@ -257,6 +258,8 @@ IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_popup)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_positioner)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_surface)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_toplevel)
|
||||||
|
+IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_toplevel_drag_v1)
|
||||||
|
+IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_toplevel_drag_manager_v1)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_toplevel_icon_manager_v1)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_toplevel_icon_v1)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_wm_base)
|
||||||
|
diff --git a/ui/ozone/platform/wayland/common/wayland_object.h b/ui/ozone/platform/wayland/common/wayland_object.h
|
||||||
|
index 38213eff64de40..b279424d14784d 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/common/wayland_object.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/common/wayland_object.h
|
||||||
|
@@ -156,6 +156,8 @@ DECLARE_WAYLAND_OBJECT_TRAITS(xdg_popup)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_positioner)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_surface)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_toplevel)
|
||||||
|
+DECLARE_WAYLAND_OBJECT_TRAITS(xdg_toplevel_drag_v1)
|
||||||
|
+DECLARE_WAYLAND_OBJECT_TRAITS(xdg_toplevel_drag_manager_v1)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_toplevel_icon_manager_v1)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_toplevel_icon_v1)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_wm_base)
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_connection.cc b/ui/ozone/platform/wayland/host/wayland_connection.cc
|
||||||
|
index a1584eb682adf3..e595f500758492 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_connection.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_connection.cc
|
||||||
|
@@ -91,6 +91,7 @@ constexpr uint32_t kMaxExplicitSyncVersion = 2;
|
||||||
|
constexpr uint32_t kMaxAlphaCompositingVersion = 1;
|
||||||
|
constexpr uint32_t kMaxXdgDecorationVersion = 1;
|
||||||
|
constexpr uint32_t kMaxExtendedDragVersion = 1;
|
||||||
|
+constexpr uint32_t kMaxXdgToplevelDragVersion = 1;
|
||||||
|
constexpr uint32_t kMaxXdgOutputManagerVersion = 3;
|
||||||
|
constexpr uint32_t kMaxKeyboardShortcutsInhibitManagerVersion = 1;
|
||||||
|
constexpr uint32_t kMaxStylusVersion = 2;
|
||||||
|
@@ -745,6 +746,15 @@ void WaylandConnection::HandleGlobal(wl_registry* registry,
|
||||||
|
LOG(ERROR) << "Failed to bind to zcr_extended_drag_v1 global";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+ } else if (!xdg_toplevel_drag_manager_v1_ &&
|
||||||
|
+ strcmp(interface, "xdg_toplevel_drag_manager_v1") == 0 &&
|
||||||
|
+ IsWaylandXdgToplevelDragEnabled()) {
|
||||||
|
+ xdg_toplevel_drag_manager_v1_ = wl::Bind<::xdg_toplevel_drag_manager_v1>(
|
||||||
|
+ registry, name, std::min(version, kMaxXdgToplevelDragVersion));
|
||||||
|
+ if (!xdg_toplevel_drag_manager_v1_) {
|
||||||
|
+ LOG(ERROR) << "Failed to bind to xdg_toplevel_drag_manager_v1 global";
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
} else if (!xdg_output_manager_ &&
|
||||||
|
strcmp(interface, "zxdg_output_manager_v1") == 0) {
|
||||||
|
// Responsibilities of zxdg_output_manager_v1 have been subsumed into the
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_connection.h b/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
index b4633ad03c4508..79680db7189852 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
@@ -160,6 +160,9 @@ class WaylandConnection {
|
||||||
|
zcr_extended_drag_v1* extended_drag_v1() const {
|
||||||
|
return extended_drag_v1_.get();
|
||||||
|
}
|
||||||
|
+ xdg_toplevel_drag_manager_v1* xdg_toplevel_drag_manager_v1() const {
|
||||||
|
+ return xdg_toplevel_drag_manager_v1_.get();
|
||||||
|
+ }
|
||||||
|
|
||||||
|
zxdg_output_manager_v1* xdg_output_manager_v1() const {
|
||||||
|
return xdg_output_manager_.get();
|
||||||
|
@@ -500,6 +503,7 @@ class WaylandConnection {
|
||||||
|
linux_explicit_synchronization_;
|
||||||
|
wl::Object<zxdg_decoration_manager_v1> xdg_decoration_manager_;
|
||||||
|
wl::Object<zcr_extended_drag_v1> extended_drag_v1_;
|
||||||
|
+ wl::Object<::xdg_toplevel_drag_manager_v1> xdg_toplevel_drag_manager_v1_;
|
||||||
|
wl::Object<zxdg_output_manager_v1> xdg_output_manager_;
|
||||||
|
wl::Object<wp_fractional_scale_manager_v1> fractional_scale_manager_v1_;
|
||||||
|
wl::Object<xdg_toplevel_icon_manager_v1> toplevel_icon_manager_v1_;
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc b/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
|
||||||
|
index 204e65c90ec374..5af9efc0d8acbf 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
|
||||||
|
@@ -858,7 +858,8 @@ void WaylandToplevelWindow::HideTooltip() {
|
||||||
|
bool WaylandToplevelWindow::IsClientControlledWindowMovementSupported() const {
|
||||||
|
auto* window_drag_controller = connection()->window_drag_controller();
|
||||||
|
DCHECK(window_drag_controller);
|
||||||
|
- return window_drag_controller->IsExtendedDragAvailable();
|
||||||
|
+ return window_drag_controller->IsExtendedDragAvailable() ||
|
||||||
|
+ window_drag_controller->IsXdgToplevelDragAvailable();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WaylandToplevelWindow::ShouldReleaseCaptureForDrag(
|
||||||
|
@@ -882,11 +883,11 @@ void WaylandToplevelWindow::StartWindowDraggingSessionIfNeeded(
|
||||||
|
ui::mojom::DragEventSource event_source,
|
||||||
|
bool allow_system_drag) {
|
||||||
|
DCHECK(connection()->window_drag_controller());
|
||||||
|
- // If extended drag is not available and |allow_system_drag| is set, this is
|
||||||
|
- // no-op and WaylandDataDragController is assumed to be used instead. i.e:
|
||||||
|
- // Fallback to a simpler window drag UX based on regular system drag-and-drop.
|
||||||
|
- if (!connection()->window_drag_controller()->IsExtendedDragAvailable() &&
|
||||||
|
- allow_system_drag) {
|
||||||
|
+ // If extended-drag and xdg-toplevel-drag are not available and
|
||||||
|
+ // |allow_system_drag| is set, this is no-op and WaylandDataDragController is
|
||||||
|
+ // assumed to be used instead. i.e: Fallback to a simpler window drag UX based
|
||||||
|
+ // on regular system drag-and-drop.
|
||||||
|
+ if (!IsClientControlledWindowMovementSupported() && allow_system_drag) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
connection()->window_drag_controller()->StartDragSession(this, event_source);
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_window_drag_controller.cc b/ui/ozone/platform/wayland/host/wayland_window_drag_controller.cc
|
||||||
|
index 2e95a32417a4c1..6184684e308154 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_window_drag_controller.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_window_drag_controller.cc
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
|
||||||
|
#include <extended-drag-unstable-v1-client-protocol.h>
|
||||||
|
#include <wayland-client-protocol.h>
|
||||||
|
+#include <xdg-toplevel-drag-v1-client-protocol.h>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <memory>
|
||||||
|
@@ -36,8 +37,10 @@
|
||||||
|
#include "ui/gfx/geometry/point_conversions.h"
|
||||||
|
#include "ui/gfx/geometry/point_f.h"
|
||||||
|
#include "ui/gfx/geometry/vector2d.h"
|
||||||
|
+#include "ui/ozone/common/features.h"
|
||||||
|
#include "ui/ozone/platform/wayland/common/wayland_object.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/dump_util.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_cursor_position.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_data_device_manager.h"
|
||||||
|
@@ -51,6 +54,7 @@
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_surface.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_window.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_window_manager.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h"
|
||||||
|
#include "ui/platform_window/platform_window_init_properties.h"
|
||||||
|
|
||||||
|
namespace ui {
|
||||||
|
@@ -101,6 +105,39 @@ class WaylandWindowDragController::ExtendedDragSource {
|
||||||
|
const raw_ref<WaylandConnection> connection_;
|
||||||
|
};
|
||||||
|
|
||||||
|
+class WaylandWindowDragController::XdgToplevelDrag {
|
||||||
|
+ public:
|
||||||
|
+ XdgToplevelDrag(WaylandConnection& connection, wl_data_source* source)
|
||||||
|
+ : connection_(connection) {
|
||||||
|
+ DCHECK(connection.xdg_toplevel_drag_manager_v1());
|
||||||
|
+ drag_.reset(xdg_toplevel_drag_manager_v1_get_xdg_toplevel_drag(
|
||||||
|
+ connection.xdg_toplevel_drag_manager_v1(), source));
|
||||||
|
+ DCHECK(drag_);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ void SetDraggedWindow(WaylandToplevelWindow* window,
|
||||||
|
+ const gfx::Vector2d& offset) {
|
||||||
|
+ if (!window) {
|
||||||
|
+ // Detaching happens implicitly via wl_data_source.dnd_drop_performed (see
|
||||||
|
+ // OnDataSourceDropPerformed()) or when the toplevel gets unmapped.
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ DCHECK(window->shell_toplevel() &&
|
||||||
|
+ window->shell_toplevel()->AsXDGToplevelWrapper());
|
||||||
|
+
|
||||||
|
+ auto* toplevel =
|
||||||
|
+ window->shell_toplevel()->AsXDGToplevelWrapper()->xdg_toplevel_.get();
|
||||||
|
+ DCHECK(toplevel);
|
||||||
|
+
|
||||||
|
+ xdg_toplevel_drag_v1_attach(drag_.get(), toplevel, offset.x(), offset.y());
|
||||||
|
+ connection_->Flush();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private:
|
||||||
|
+ wl::Object<xdg_toplevel_drag_v1> drag_;
|
||||||
|
+ const raw_ref<WaylandConnection> connection_;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
WaylandWindowDragController::WaylandWindowDragController(
|
||||||
|
WaylandConnection* connection,
|
||||||
|
WaylandDataDeviceManager* device_manager,
|
||||||
|
@@ -165,12 +202,16 @@ bool WaylandWindowDragController::StartDragSession(
|
||||||
|
data_source_->Offer({kMimeTypeChromiumWindow});
|
||||||
|
data_source_->SetDndActions(kDndActionWindowDrag);
|
||||||
|
|
||||||
|
- if (IsExtendedDragAvailableInternal()) {
|
||||||
|
+ if (IsXdgToplevelDragAvailable()) {
|
||||||
|
+ xdg_toplevel_drag_ = std::make_unique<XdgToplevelDrag>(
|
||||||
|
+ *connection_, data_source_->data_source());
|
||||||
|
+ } else if (IsExtendedDragAvailableInternal()) {
|
||||||
|
extended_drag_source_ = std::make_unique<ExtendedDragSource>(
|
||||||
|
*connection_, data_source_->data_source());
|
||||||
|
} else {
|
||||||
|
- LOG(ERROR) << "zcr_extended_drag_v1 extension not available! "
|
||||||
|
- << "Window/Tab dragging won't be fully functional.";
|
||||||
|
+ LOG(ERROR)
|
||||||
|
+ << "zcr_extended_drag_v1 and xdg_toplevel_drag_v1 extensions "
|
||||||
|
+ "not available! Window/Tab dragging won't be fully functional.";
|
||||||
|
}
|
||||||
|
|
||||||
|
data_device_->StartDrag(*data_source_, *origin_window_, serial->value,
|
||||||
|
@@ -441,17 +482,24 @@ void WaylandWindowDragController::OnDataSourceFinish(WaylandDataSource* source,
|
||||||
|
data_offer_.reset();
|
||||||
|
data_source_.reset();
|
||||||
|
extended_drag_source_.reset();
|
||||||
|
+ xdg_toplevel_drag_.reset();
|
||||||
|
origin_surface_.reset();
|
||||||
|
origin_window_ = nullptr;
|
||||||
|
has_received_enter_ = false;
|
||||||
|
|
||||||
|
- // When extended-drag is available and the drop happens while a non-null
|
||||||
|
- // surface was being dragged (i.e: detached mode) which had pointer focus
|
||||||
|
- // before the drag session, we must reset focus to it, otherwise it would be
|
||||||
|
- // wrongly kept to the latest surface received through wl_data_device::enter
|
||||||
|
- // (see OnDragEnter function).
|
||||||
|
- // In case of touch, though, we simply reset the focus altogether.
|
||||||
|
- if (IsExtendedDragAvailableInternal() && dragged_window_) {
|
||||||
|
+ // When extended-drag or xdg-toplevel-drag is available and the drop happens
|
||||||
|
+ // while a non-null surface was being dragged (i.e: detached mode) which had
|
||||||
|
+ // pointer focus before the drag session, we must reset focus to it, otherwise
|
||||||
|
+ // it would be wrongly kept to the latest surface received through
|
||||||
|
+ // wl_data_device::enter (see OnDragEnter function). In case of touch, though,
|
||||||
|
+ // we simply reset the focus altogether.
|
||||||
|
+ //
|
||||||
|
+ // TODO(crbug.com/324170129): Move drop handling logic below into
|
||||||
|
+ // OnDataSourceDropPerformed instead, otherwise dropping outside target
|
||||||
|
+ // surfaces will results in drag cancellation when xdg-toplevel-drag is used.
|
||||||
|
+ bool is_protocol_available =
|
||||||
|
+ IsExtendedDragAvailableInternal() || IsXdgToplevelDragAvailable();
|
||||||
|
+ if (is_protocol_available && dragged_window_) {
|
||||||
|
if (*drag_source_ == DragEventSource::kMouse) {
|
||||||
|
// TODO: check if this usage is correct.
|
||||||
|
|
||||||
|
@@ -467,9 +515,11 @@ void WaylandWindowDragController::OnDataSourceFinish(WaylandDataSource* source,
|
||||||
|
// Transition to |kDropped| state and determine the next action to take. If
|
||||||
|
// drop happened while the move loop was running (i.e: kDetached), ask to quit
|
||||||
|
// the loop, otherwise notify session end and reset state right away.
|
||||||
|
+ is_protocol_available =
|
||||||
|
+ IsExtendedDragAvailable() || IsXdgToplevelDragAvailable();
|
||||||
|
State state_when_dropped = std::exchange(
|
||||||
|
- state_, completed || !IsExtendedDragAvailable() ? State::kDropped
|
||||||
|
- : State::kCancelled);
|
||||||
|
+ state_, completed || !is_protocol_available ? State::kDropped
|
||||||
|
+ : State::kCancelled);
|
||||||
|
if (state_when_dropped == State::kDetached) {
|
||||||
|
VLOG(1) << "Quiting Loop : Detached";
|
||||||
|
QuitLoop();
|
||||||
|
@@ -673,9 +723,12 @@ void WaylandWindowDragController::SetDraggedWindow(
|
||||||
|
dragged_window_ = window;
|
||||||
|
drag_offset_ = offset;
|
||||||
|
|
||||||
|
- // TODO(crbug.com/40598679): Fallback when extended-drag is not available.
|
||||||
|
- if (extended_drag_source_)
|
||||||
|
+ // TODO(crbug.com/40598679): Fallback when no window drag protocol available.
|
||||||
|
+ if (extended_drag_source_) {
|
||||||
|
extended_drag_source_->SetDraggedWindow(dragged_window_, drag_offset_);
|
||||||
|
+ } else if (xdg_toplevel_drag_) {
|
||||||
|
+ xdg_toplevel_drag_->SetDraggedWindow(dragged_window_, drag_offset_);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WaylandWindowDragController::IsExtendedDragAvailable() const {
|
||||||
|
@@ -683,6 +736,10 @@ bool WaylandWindowDragController::IsExtendedDragAvailable() const {
|
||||||
|
IsExtendedDragAvailableInternal();
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool WaylandWindowDragController::IsXdgToplevelDragAvailable() const {
|
||||||
|
+ return !!connection_->xdg_toplevel_drag_manager_v1();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool WaylandWindowDragController::IsActiveDragAndDropSession() const {
|
||||||
|
return !!data_source_;
|
||||||
|
}
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_window_drag_controller.h b/ui/ozone/platform/wayland/host/wayland_window_drag_controller.h
|
||||||
|
index de94ea22590990..fe523b85a2b340 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_window_drag_controller.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_window_drag_controller.h
|
||||||
|
@@ -88,6 +88,8 @@ class WaylandWindowDragController : public WaylandDataDevice::DragDelegate,
|
||||||
|
|
||||||
|
// Tells if "extended drag" extension is available.
|
||||||
|
bool IsExtendedDragAvailable() const;
|
||||||
|
+ // Tells if "xdg toplevel drag" extension is available.
|
||||||
|
+ bool IsXdgToplevelDragAvailable() const;
|
||||||
|
|
||||||
|
// Returns true if there there is currently an active drag-and-drop session.
|
||||||
|
// This is true if the `data_source_` exists (the session ends when this is
|
||||||
|
@@ -118,6 +120,7 @@ class WaylandWindowDragController : public WaylandDataDevice::DragDelegate,
|
||||||
|
|
||||||
|
private:
|
||||||
|
class ExtendedDragSource;
|
||||||
|
+ class XdgToplevelDrag;
|
||||||
|
|
||||||
|
friend class WaylandWindowDragControllerTest;
|
||||||
|
FRIEND_TEST_ALL_PREFIXES(WaylandWindowDragControllerTest,
|
||||||
|
@@ -204,6 +207,7 @@ class WaylandWindowDragController : public WaylandDataDevice::DragDelegate,
|
||||||
|
std::unique_ptr<WaylandDataOffer> data_offer_;
|
||||||
|
|
||||||
|
std::unique_ptr<ExtendedDragSource> extended_drag_source_;
|
||||||
|
+ std::unique_ptr<XdgToplevelDrag> xdg_toplevel_drag_;
|
||||||
|
|
||||||
|
// The current toplevel window being dragged, when in detached mode.
|
||||||
|
raw_ptr<WaylandToplevelWindow> dragged_window_ = nullptr;
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h
|
||||||
|
index f34cc782ffc82e..280efa771c3fe3 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h
|
||||||
|
@@ -88,6 +88,7 @@ class XDGToplevelWrapperImpl : public ShellToplevelWrapper {
|
||||||
|
XDGSurfaceWrapperImpl* xdg_surface_wrapper() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
+ friend class WaylandWindowDragController;
|
||||||
|
// xdg_toplevel_listener callbacks:
|
||||||
|
static void OnToplevelConfigure(void* data,
|
||||||
|
xdg_toplevel* toplevel,
|
545
wayland-protocol-toplevel-icon-2.patch
Normal file
545
wayland-protocol-toplevel-icon-2.patch
Normal file
@@ -0,0 +1,545 @@
|
|||||||
|
From 900160bc0e224746bd4b7c30c63433dad66b95f6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Anderson <thomasanderson@chromium.org>
|
||||||
|
Date: Thu, 8 Aug 2024 07:28:26 +0000
|
||||||
|
Subject: [PATCH] [Wayland] Implement setting icons with XDG toplevel icon
|
||||||
|
|
||||||
|
Note that this is untested since no compositors currently support
|
||||||
|
the protocol, though there is a merge request for server support in
|
||||||
|
KWin and merge requests for client support in QT, and SDL, and merged
|
||||||
|
client support in GameScope.
|
||||||
|
|
||||||
|
Once compositor support is added, this change can be tested by
|
||||||
|
installing the Youtube PWA and verifying that the icon changes
|
||||||
|
to the Youtube logo.
|
||||||
|
|
||||||
|
|
||||||
|
R=nickdiego
|
||||||
|
|
||||||
|
Change-Id: I6135d72879ecc025c26e7c65b68eb557dd72e854
|
||||||
|
Fixed: 356424077
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5755162
|
||||||
|
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
|
||||||
|
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
|
||||||
|
Reviewed-by: Maksim Sisov <msisov@igalia.com>
|
||||||
|
Commit-Queue: Maksim Sisov <msisov@igalia.com>
|
||||||
|
Reviewed-by: Nick Yamane <nickdiego@igalia.com>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1338910}
|
||||||
|
---
|
||||||
|
ui/ozone/platform/wayland/BUILD.gn | 4 +
|
||||||
|
.../wayland/host/shell_toplevel_wrapper.h | 3 +
|
||||||
|
.../wayland/host/wayland_toplevel_window.cc | 14 +++
|
||||||
|
.../wayland/host/wayland_toplevel_window.h | 2 +
|
||||||
|
.../host/xdg_toplevel_icon_unittest.cc | 47 +++++++++
|
||||||
|
.../wayland/host/xdg_toplevel_wrapper_impl.cc | 53 ++++++++++-
|
||||||
|
.../wayland/host/xdg_toplevel_wrapper_impl.h | 1 +
|
||||||
|
.../wayland/test/mock_xdg_toplevel_icon.cc | 95 +++++++++++++++++++
|
||||||
|
.../wayland/test/mock_xdg_toplevel_icon.h | 79 +++++++++++++++
|
||||||
|
.../test/test_wayland_server_thread.cc | 3 +
|
||||||
|
.../wayland/test/test_wayland_server_thread.h | 6 ++
|
||||||
|
11 files changed, 303 insertions(+), 4 deletions(-)
|
||||||
|
create mode 100644 ui/ozone/platform/wayland/host/xdg_toplevel_icon_unittest.cc
|
||||||
|
create mode 100644 ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.cc
|
||||||
|
create mode 100644 ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.h
|
||||||
|
|
||||||
|
diff --git a/ui/ozone/platform/wayland/BUILD.gn b/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
index 4ba36222f03906..4f22bf74dd8d34 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
+++ b/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
@@ -432,6 +432,8 @@ source_set("test_support") {
|
||||||
|
"test/mock_xdg_shell.h",
|
||||||
|
"test/mock_xdg_surface.cc",
|
||||||
|
"test/mock_xdg_surface.h",
|
||||||
|
+ "test/mock_xdg_toplevel_icon.cc",
|
||||||
|
+ "test/mock_xdg_toplevel_icon.h",
|
||||||
|
"test/mock_zcr_extended_text_input.cc",
|
||||||
|
"test/mock_zcr_extended_text_input.h",
|
||||||
|
"test/mock_zwp_linux_dmabuf.cc",
|
||||||
|
@@ -576,6 +578,7 @@ source_set("test_support") {
|
||||||
|
"//third_party/wayland-protocols:xdg_activation",
|
||||||
|
"//third_party/wayland-protocols:xdg_output_protocol",
|
||||||
|
"//third_party/wayland-protocols:xdg_shell_protocol",
|
||||||
|
+ "//third_party/wayland-protocols:xdg_toplevel_icon_protocol",
|
||||||
|
"//ui/display:test_support",
|
||||||
|
"//ui/gfx/geometry:geometry",
|
||||||
|
]
|
||||||
|
@@ -608,6 +611,7 @@ source_set("wayland_unittests") {
|
||||||
|
"host/wayland_zcr_color_manager_unittest.cc",
|
||||||
|
"host/wayland_zwp_pointer_gestures_unittest.cc",
|
||||||
|
"host/xdg_activation_unittest.cc",
|
||||||
|
+ "host/xdg_toplevel_icon_unittest.cc",
|
||||||
|
"host/zwp_text_input_wrapper_v1_unittest.cc",
|
||||||
|
"host/zwp_text_input_wrapper_v3_unittest.cc",
|
||||||
|
"mojom/wayland_overlay_config_mojom_traits_unittest.cc",
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h b/ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h
|
||||||
|
index 735a218e6b5667..63b68902a7addd 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/shell_toplevel_wrapper.h
|
||||||
|
@@ -12,6 +12,7 @@
|
||||||
|
#include "ui/platform_window/extensions/wayland_extension.h"
|
||||||
|
|
||||||
|
namespace gfx {
|
||||||
|
+class ImageSkia;
|
||||||
|
class Rect;
|
||||||
|
class RoundedCornersF;
|
||||||
|
}
|
||||||
|
@@ -210,6 +211,8 @@ class ShellToplevelWrapper {
|
||||||
|
|
||||||
|
virtual void AckRotateFocus(uint32_t serial, uint32_t handled) = 0;
|
||||||
|
|
||||||
|
+ virtual void SetIcon(const gfx::ImageSkia& icon) = 0;
|
||||||
|
+
|
||||||
|
// Casts `this` to XDGToplevelWrapperImpl, if it is of that type.
|
||||||
|
virtual XDGToplevelWrapperImpl* AsXDGToplevelWrapper();
|
||||||
|
};
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc b/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
|
||||||
|
index 7ba2d52b575a21..204e65c90ec374 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc
|
||||||
|
@@ -363,6 +363,20 @@ void WaylandToplevelWindow::Deactivate() {
|
||||||
|
WaylandWindow::Deactivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
+void WaylandToplevelWindow::SetWindowIcons(const gfx::ImageSkia& window_icon,
|
||||||
|
+ const gfx::ImageSkia& app_icon) {
|
||||||
|
+ if (!shell_toplevel_) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ // Let the app icon take precedence over the window icon.
|
||||||
|
+ if (!app_icon.isNull()) {
|
||||||
|
+ shell_toplevel_->SetIcon(app_icon);
|
||||||
|
+ } else {
|
||||||
|
+ shell_toplevel_->SetIcon(window_icon);
|
||||||
|
+ }
|
||||||
|
+ root_surface()->Commit(/*flush=*/true);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void WaylandToplevelWindow::SizeConstraintsChanged() {
|
||||||
|
// Size constraints only make sense for normal windows.
|
||||||
|
if (!shell_toplevel_)
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_toplevel_window.h b/ui/ozone/platform/wayland/host/wayland_toplevel_window.h
|
||||||
|
index 40e16fef05f985..3491798f4c19da 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_toplevel_window.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_toplevel_window.h
|
||||||
|
@@ -126,6 +126,8 @@ class WaylandToplevelWindow : public WaylandWindow,
|
||||||
|
void Restore() override;
|
||||||
|
void Activate() override;
|
||||||
|
void Deactivate() override;
|
||||||
|
+ void SetWindowIcons(const gfx::ImageSkia& window_icon,
|
||||||
|
+ const gfx::ImageSkia& app_icon) override;
|
||||||
|
void SizeConstraintsChanged() override;
|
||||||
|
// `SetZOrderLevel()` must be called on `z_order_` in
|
||||||
|
// `SetUpShellIntegration()`.
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/xdg_toplevel_icon_unittest.cc b/ui/ozone/platform/wayland/host/xdg_toplevel_icon_unittest.cc
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000000..bd91e0641a7395
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/xdg_toplevel_icon_unittest.cc
|
||||||
|
@@ -0,0 +1,47 @@
|
||||||
|
+// Copyright 2024 The Chromium Authors
|
||||||
|
+// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
+// found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#include "ui/ozone/platform/wayland/test/wayland_test.h"
|
||||||
|
+
|
||||||
|
+namespace ui {
|
||||||
|
+
|
||||||
|
+using XdgToplevelIconTest = WaylandTestSimple;
|
||||||
|
+
|
||||||
|
+TEST_F(XdgToplevelIconTest, Basic) {
|
||||||
|
+ SkBitmap bitmap;
|
||||||
|
+ bitmap.allocN32Pixels(128, 128);
|
||||||
|
+ gfx::ImageSkia icon = gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
|
||||||
|
+ window_->SetWindowIcons(gfx::ImageSkia(), icon);
|
||||||
|
+
|
||||||
|
+ PostToServerAndWait([&](wl::TestWaylandServerThread* server) {
|
||||||
|
+ auto* const manager = server->xdg_toplevel_icon_manager_v1();
|
||||||
|
+ ASSERT_TRUE(manager);
|
||||||
|
+ wl::XdgToplevelIconResources expected_resources = {
|
||||||
|
+ wl::XdgToplevelIconResource(gfx::Size(128, 128), 1)};
|
||||||
|
+ EXPECT_EQ(manager->resources(), expected_resources);
|
||||||
|
+ });
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+TEST_F(XdgToplevelIconTest, AppIconTakesPrecedence) {
|
||||||
|
+ SkBitmap app_bitmap;
|
||||||
|
+ app_bitmap.allocN32Pixels(128, 128);
|
||||||
|
+ gfx::ImageSkia app_icon = gfx::ImageSkia::CreateFrom1xBitmap(app_bitmap);
|
||||||
|
+
|
||||||
|
+ SkBitmap window_bitmap;
|
||||||
|
+ window_bitmap.allocN32Pixels(64, 64);
|
||||||
|
+ gfx::ImageSkia window_icon =
|
||||||
|
+ gfx::ImageSkia::CreateFrom1xBitmap(window_bitmap);
|
||||||
|
+
|
||||||
|
+ window_->SetWindowIcons(window_icon, app_icon);
|
||||||
|
+
|
||||||
|
+ PostToServerAndWait([&](wl::TestWaylandServerThread* server) {
|
||||||
|
+ auto* const manager = server->xdg_toplevel_icon_manager_v1();
|
||||||
|
+ ASSERT_TRUE(manager);
|
||||||
|
+ wl::XdgToplevelIconResources expected_resources = {
|
||||||
|
+ wl::XdgToplevelIconResource(gfx::Size(128, 128), 1)};
|
||||||
|
+ EXPECT_EQ(manager->resources(), expected_resources);
|
||||||
|
+ });
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+} // namespace ui
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc
|
||||||
|
index 78a81356a5f01e..a716b337518f8c 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
|
||||||
|
#include <aura-shell-client-protocol.h>
|
||||||
|
#include <xdg-decoration-unstable-v1-client-protocol.h>
|
||||||
|
+#include <xdg-toplevel-icon-v1-client-protocol.h>
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
|
@@ -15,6 +16,7 @@
|
||||||
|
#include "base/strings/utf_string_conversions.h"
|
||||||
|
#include "ui/base/hit_test.h"
|
||||||
|
#include "ui/base/ui_base_features.h"
|
||||||
|
+#include "ui/gfx/image/image_skia_rep_default.h"
|
||||||
|
#include "ui/ozone/common/features.h"
|
||||||
|
#include "ui/ozone/platform/wayland/common/wayland_object.h"
|
||||||
|
#include "ui/ozone/platform/wayland/common/wayland_util.h"
|
||||||
|
@@ -25,6 +27,7 @@
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_output_manager.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_seat.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_serial_tracker.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/host/wayland_shm_buffer.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_toplevel_window.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_window.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_zaura_shell.h"
|
||||||
|
@@ -104,8 +107,9 @@ bool XDGToplevelWrapperImpl::Initialize() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!xdg_surface_wrapper_)
|
||||||
|
+ if (!xdg_surface_wrapper_) {
|
||||||
|
return false;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
xdg_toplevel_.reset(
|
||||||
|
xdg_surface_get_toplevel(xdg_surface_wrapper_->xdg_surface()));
|
||||||
|
@@ -233,9 +237,10 @@ void XDGToplevelWrapperImpl::SetMinimized() {
|
||||||
|
|
||||||
|
void XDGToplevelWrapperImpl::SurfaceMove(WaylandConnection* connection) {
|
||||||
|
DCHECK(xdg_toplevel_);
|
||||||
|
- if (auto serial = GetSerialForMoveResize(connection))
|
||||||
|
+ if (auto serial = GetSerialForMoveResize(connection)) {
|
||||||
|
xdg_toplevel_move(xdg_toplevel_.get(), connection->seat()->wl_object(),
|
||||||
|
serial->value);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void XDGToplevelWrapperImpl::SurfaceResize(WaylandConnection* connection,
|
||||||
|
@@ -261,8 +266,9 @@ void XDGToplevelWrapperImpl::SetTitle(const std::u16string& title) {
|
||||||
|
// length of the string so it would fit the message with some margin.
|
||||||
|
const size_t kMaxLengh = 4000;
|
||||||
|
auto short_title = base::UTF16ToUTF8(title);
|
||||||
|
- if (short_title.size() > kMaxLengh)
|
||||||
|
+ if (short_title.size() > kMaxLengh) {
|
||||||
|
short_title.resize(kMaxLengh);
|
||||||
|
+ }
|
||||||
|
xdg_toplevel_set_title(xdg_toplevel_.get(), short_title.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -470,8 +476,9 @@ void XDGToplevelWrapperImpl::OnConfigureOcclusionState(
|
||||||
|
|
||||||
|
void XDGToplevelWrapperImpl::SetTopLevelDecorationMode(
|
||||||
|
DecorationMode requested_mode) {
|
||||||
|
- if (!zxdg_toplevel_decoration_ || requested_mode == decoration_mode_)
|
||||||
|
+ if (!zxdg_toplevel_decoration_ || requested_mode == decoration_mode_) {
|
||||||
|
return;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
zxdg_toplevel_decoration_v1_set_mode(zxdg_toplevel_decoration_.get(),
|
||||||
|
ToInt32(requested_mode));
|
||||||
|
@@ -769,6 +776,44 @@ void XDGToplevelWrapperImpl::AckRotateFocus(uint32_t serial, uint32_t handled) {
|
||||||
|
connection_->Flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
+void XDGToplevelWrapperImpl::SetIcon(const gfx::ImageSkia& icon) {
|
||||||
|
+ auto* manager = connection_->toplevel_icon_manager_v1();
|
||||||
|
+ if (!manager) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (icon.isNull()) {
|
||||||
|
+ xdg_toplevel_icon_manager_v1_set_icon(manager, xdg_toplevel_.get(),
|
||||||
|
+ nullptr);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ std::vector<std::pair<WaylandShmBuffer, float>> buffers;
|
||||||
|
+ auto* xdg_icon = xdg_toplevel_icon_manager_v1_create_icon(manager);
|
||||||
|
+ for (const auto& rep : icon.image_reps()) {
|
||||||
|
+ const auto& bitmap = rep.GetBitmap();
|
||||||
|
+ gfx::Size image_size = gfx::SkISizeToSize(bitmap.dimensions());
|
||||||
|
+ if (image_size.IsEmpty() || image_size.width() != image_size.height()) {
|
||||||
|
+ // The toplevel icon protocol requires square icons.
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ WaylandShmBuffer buffer(connection_->buffer_factory(), image_size);
|
||||||
|
+ if (!buffer.IsValid()) {
|
||||||
|
+ LOG(ERROR) << "Failed to create SHM buffer for icon Bitmap.";
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ wl::DrawBitmap(bitmap, &buffer);
|
||||||
|
+ buffers.emplace_back(std::move(buffer), rep.scale());
|
||||||
|
+ }
|
||||||
|
+ for (const auto& [buffer, scale] : buffers) {
|
||||||
|
+ xdg_toplevel_icon_v1_add_buffer(xdg_icon, buffer.get(), scale);
|
||||||
|
+ }
|
||||||
|
+ xdg_toplevel_icon_manager_v1_set_icon(manager, xdg_toplevel_.get(), xdg_icon);
|
||||||
|
+ xdg_toplevel_icon_v1_destroy(xdg_icon);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
XDGToplevelWrapperImpl* XDGToplevelWrapperImpl::AsXDGToplevelWrapper() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h
|
||||||
|
index 99db31788888b8..f34cc782ffc82e 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.h
|
||||||
|
@@ -81,6 +81,7 @@ class XDGToplevelWrapperImpl : public ShellToplevelWrapper {
|
||||||
|
void SetPersistable(bool persistable) const override;
|
||||||
|
void SetShape(std::unique_ptr<ShapeRects> shape_rects) override;
|
||||||
|
void AckRotateFocus(uint32_t serial, uint32_t handled) override;
|
||||||
|
+ void SetIcon(const gfx::ImageSkia& icon) override;
|
||||||
|
|
||||||
|
XDGToplevelWrapperImpl* AsXDGToplevelWrapper() override;
|
||||||
|
|
||||||
|
diff --git a/ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.cc b/ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.cc
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000000..464884e9e1124b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.cc
|
||||||
|
@@ -0,0 +1,95 @@
|
||||||
|
+// Copyright 2024 The Chromium Authors
|
||||||
|
+// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
+// found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#include "ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.h"
|
||||||
|
+
|
||||||
|
+#include <wayland-server-core.h>
|
||||||
|
+
|
||||||
|
+#include "base/check_op.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/host/wayland_shm_buffer.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/test/server_object.h"
|
||||||
|
+
|
||||||
|
+namespace wl {
|
||||||
|
+
|
||||||
|
+namespace {
|
||||||
|
+
|
||||||
|
+void DestroyManager(struct wl_client* client, struct wl_resource* resource) {}
|
||||||
|
+
|
||||||
|
+void CreateIcon(struct wl_client* client,
|
||||||
|
+ struct wl_resource* resource,
|
||||||
|
+ uint32_t id) {
|
||||||
|
+ auto* global = GetUserDataAs<MockXdgToplevelIconManagerV1>(resource);
|
||||||
|
+ wl_resource* icon = CreateResourceWithImpl<MockXdgToplevelIconV1>(
|
||||||
|
+ client, &xdg_toplevel_icon_v1_interface, 1, &kMockXdgToplevelIconImpl, id,
|
||||||
|
+ global);
|
||||||
|
+ global->set_icon(GetUserDataAs<MockXdgToplevelIconV1>(icon));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void SetIcon(struct wl_client* client,
|
||||||
|
+ struct wl_resource* resource,
|
||||||
|
+ struct wl_resource* toplevel,
|
||||||
|
+ struct wl_resource* icon) {
|
||||||
|
+ auto* manager = GetUserDataAs<MockXdgToplevelIconManagerV1>(resource);
|
||||||
|
+ ASSERT_TRUE(manager);
|
||||||
|
+ auto* toplevel_icon = GetUserDataAs<MockXdgToplevelIconV1>(icon);
|
||||||
|
+ ASSERT_TRUE(toplevel_icon);
|
||||||
|
+ manager->resources() = toplevel_icon->resources();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+} // namespace
|
||||||
|
+
|
||||||
|
+const struct xdg_toplevel_icon_manager_v1_interface
|
||||||
|
+ kMockXdgToplevelIconManagerImpl = {
|
||||||
|
+ .destroy = DestroyManager,
|
||||||
|
+ .create_icon = CreateIcon,
|
||||||
|
+ .set_icon = SetIcon,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+MockXdgToplevelIconManagerV1::MockXdgToplevelIconManagerV1()
|
||||||
|
+ : GlobalObject(&xdg_toplevel_icon_manager_v1_interface,
|
||||||
|
+ &kMockXdgToplevelIconManagerImpl,
|
||||||
|
+ 1) {}
|
||||||
|
+
|
||||||
|
+MockXdgToplevelIconManagerV1::~MockXdgToplevelIconManagerV1() = default;
|
||||||
|
+
|
||||||
|
+namespace {
|
||||||
|
+
|
||||||
|
+void DestroyIcon(struct wl_client* client, struct wl_resource* resource) {}
|
||||||
|
+
|
||||||
|
+void SetName(struct wl_client* client,
|
||||||
|
+ struct wl_resource* resource,
|
||||||
|
+ const char* icon_name) {}
|
||||||
|
+
|
||||||
|
+void AddBuffer(struct wl_client* client,
|
||||||
|
+ struct wl_resource* resource,
|
||||||
|
+ struct wl_resource* buffer,
|
||||||
|
+ int32_t scale) {
|
||||||
|
+ auto* icon = GetUserDataAs<MockXdgToplevelIconV1>(resource);
|
||||||
|
+ ASSERT_TRUE(icon);
|
||||||
|
+ wl_shm_buffer* shm_buffer = wl_shm_buffer_get(buffer);
|
||||||
|
+ ASSERT_TRUE(buffer);
|
||||||
|
+ auto width = wl_shm_buffer_get_width(shm_buffer);
|
||||||
|
+ auto height = wl_shm_buffer_get_height(shm_buffer);
|
||||||
|
+ icon->resources().emplace_back(gfx::Size(width, height), scale);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+} // namespace
|
||||||
|
+
|
||||||
|
+const struct xdg_toplevel_icon_v1_interface kMockXdgToplevelIconImpl = {
|
||||||
|
+ .destroy = DestroyIcon,
|
||||||
|
+ .set_name = SetName,
|
||||||
|
+ .add_buffer = AddBuffer,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+MockXdgToplevelIconV1::MockXdgToplevelIconV1(
|
||||||
|
+ wl_resource* resource,
|
||||||
|
+ MockXdgToplevelIconManagerV1* global)
|
||||||
|
+ : ServerObject(resource), global_(global) {}
|
||||||
|
+
|
||||||
|
+MockXdgToplevelIconV1::~MockXdgToplevelIconV1() {
|
||||||
|
+ CHECK_EQ(global_->icon(), this);
|
||||||
|
+ global_->set_icon(nullptr);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+} // namespace wl
|
||||||
|
diff --git a/ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.h b/ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.h
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000000..4272f362be0d18
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.h
|
||||||
|
@@ -0,0 +1,79 @@
|
||||||
|
+// Copyright 2024 The Chromium Authors
|
||||||
|
+// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
+// found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#ifndef UI_OZONE_PLATFORM_WAYLAND_TEST_MOCK_XDG_TOPLEVEL_ICON_H_
|
||||||
|
+#define UI_OZONE_PLATFORM_WAYLAND_TEST_MOCK_XDG_TOPLEVEL_ICON_H_
|
||||||
|
+
|
||||||
|
+#include <xdg-toplevel-icon-v1-server-protocol.h>
|
||||||
|
+
|
||||||
|
+#include <vector>
|
||||||
|
+
|
||||||
|
+#include "base/check.h"
|
||||||
|
+#include "base/memory/raw_ptr.h"
|
||||||
|
+#include "testing/gmock/include/gmock/gmock.h"
|
||||||
|
+#include "ui/gfx/geometry/size.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/test/global_object.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/test/server_object.h"
|
||||||
|
+
|
||||||
|
+namespace wl {
|
||||||
|
+
|
||||||
|
+class MockXdgToplevelIconV1;
|
||||||
|
+
|
||||||
|
+struct XdgToplevelIconResource {
|
||||||
|
+ gfx::Size size;
|
||||||
|
+ int32_t scale;
|
||||||
|
+
|
||||||
|
+ bool operator==(const XdgToplevelIconResource& other) const {
|
||||||
|
+ return size == other.size && scale == other.scale;
|
||||||
|
+ }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+using XdgToplevelIconResources = std::vector<XdgToplevelIconResource>;
|
||||||
|
+
|
||||||
|
+extern const struct xdg_toplevel_icon_manager_v1_interface
|
||||||
|
+ kMockXdgToplevelIconManagerImpl;
|
||||||
|
+extern const struct xdg_toplevel_icon_v1_interface kMockXdgToplevelIconImpl;
|
||||||
|
+
|
||||||
|
+class MockXdgToplevelIconManagerV1 : public GlobalObject {
|
||||||
|
+ public:
|
||||||
|
+ MockXdgToplevelIconManagerV1();
|
||||||
|
+
|
||||||
|
+ MockXdgToplevelIconManagerV1(const MockXdgToplevelIconManagerV1&) = delete;
|
||||||
|
+ MockXdgToplevelIconManagerV1& operator=(const MockXdgToplevelIconManagerV1&) =
|
||||||
|
+ delete;
|
||||||
|
+
|
||||||
|
+ ~MockXdgToplevelIconManagerV1() override;
|
||||||
|
+
|
||||||
|
+ void set_icon(MockXdgToplevelIconV1* icon) { icon_ = icon; }
|
||||||
|
+ MockXdgToplevelIconV1* icon() { return icon_; }
|
||||||
|
+
|
||||||
|
+ XdgToplevelIconResources& resources() { return resources_; }
|
||||||
|
+
|
||||||
|
+ private:
|
||||||
|
+ raw_ptr<MockXdgToplevelIconV1> icon_ = nullptr;
|
||||||
|
+
|
||||||
|
+ XdgToplevelIconResources resources_;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+class MockXdgToplevelIconV1 : public ServerObject {
|
||||||
|
+ public:
|
||||||
|
+ MockXdgToplevelIconV1(wl_resource* resource,
|
||||||
|
+ MockXdgToplevelIconManagerV1* global);
|
||||||
|
+
|
||||||
|
+ MockXdgToplevelIconV1(const MockXdgToplevelIconV1&) = delete;
|
||||||
|
+ MockXdgToplevelIconV1& operator=(const MockXdgToplevelIconV1&) = delete;
|
||||||
|
+
|
||||||
|
+ ~MockXdgToplevelIconV1() override;
|
||||||
|
+
|
||||||
|
+ XdgToplevelIconResources& resources() { return resources_; }
|
||||||
|
+
|
||||||
|
+ private:
|
||||||
|
+ raw_ptr<MockXdgToplevelIconManagerV1> global_ = nullptr;
|
||||||
|
+
|
||||||
|
+ XdgToplevelIconResources resources_;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+} // namespace wl
|
||||||
|
+
|
||||||
|
+#endif // UI_OZONE_PLATFORM_WAYLAND_TEST_MOCK_XDG_TOPLEVEL_ICON_H_
|
||||||
|
diff --git a/ui/ozone/platform/wayland/test/test_wayland_server_thread.cc b/ui/ozone/platform/wayland/test/test_wayland_server_thread.cc
|
||||||
|
index ab6f43e4a0cdb6..c925b27eb31cb4 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/test/test_wayland_server_thread.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/test/test_wayland_server_thread.cc
|
||||||
|
@@ -171,6 +171,9 @@ bool TestWaylandServerThread::Start() {
|
||||||
|
if (!xdg_activation_v1_.Initialize(display_.get())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
+ if (!xdg_toplevel_icon_manager_v1_.Initialize(display_.get())) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
client_ = wl_client_create(display_.get(), server_fd.release());
|
||||||
|
if (!client_)
|
||||||
|
diff --git a/ui/ozone/platform/wayland/test/test_wayland_server_thread.h b/ui/ozone/platform/wayland/test/test_wayland_server_thread.h
|
||||||
|
index d17deea735bc01..dd8f538ea23c18 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/test/test_wayland_server_thread.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/test/test_wayland_server_thread.h
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
#include "ui/ozone/platform/wayland/test/mock_wp_presentation.h"
|
||||||
|
#include "ui/ozone/platform/wayland/test/mock_xdg_activation_v1.h"
|
||||||
|
#include "ui/ozone/platform/wayland/test/mock_xdg_shell.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/test/mock_xdg_toplevel_icon.h"
|
||||||
|
#include "ui/ozone/platform/wayland/test/mock_zwp_linux_dmabuf.h"
|
||||||
|
#include "ui/ozone/platform/wayland/test/test_alpha_compositing.h"
|
||||||
|
#include "ui/ozone/platform/wayland/test/test_compositor.h"
|
||||||
|
@@ -187,6 +188,10 @@ class TestWaylandServerThread : public TestOutput::Delegate,
|
||||||
|
|
||||||
|
MockXdgActivationV1* xdg_activation_v1() { return &xdg_activation_v1_; }
|
||||||
|
|
||||||
|
+ MockXdgToplevelIconManagerV1* xdg_toplevel_icon_manager_v1() {
|
||||||
|
+ return &xdg_toplevel_icon_manager_v1_;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
void set_output_delegate(OutputDelegate* delegate) {
|
||||||
|
output_delegate_ = delegate;
|
||||||
|
}
|
||||||
|
@@ -260,6 +265,7 @@ class TestWaylandServerThread : public TestOutput::Delegate,
|
||||||
|
MockWpPresentation wp_presentation_;
|
||||||
|
TestWpPointerGestures wp_pointer_gestures_;
|
||||||
|
MockXdgActivationV1 xdg_activation_v1_;
|
||||||
|
+ MockXdgToplevelIconManagerV1 xdg_toplevel_icon_manager_v1_;
|
||||||
|
std::unique_ptr<TestSelectionDeviceManager> primary_selection_device_manager_;
|
||||||
|
|
||||||
|
std::vector<std::unique_ptr<GlobalObject>> globals_;
|
335
wayland-protocol-toplevel-icon.patch
Normal file
335
wayland-protocol-toplevel-icon.patch
Normal file
@@ -0,0 +1,335 @@
|
|||||||
|
From 6185a6e178fc236aad3502fbc969ddd38aabf020 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Anderson <thomasanderson@chromium.org>
|
||||||
|
Date: Tue, 6 Aug 2024 00:27:29 +0000
|
||||||
|
Subject: [PATCH] [Wayland] Add ToplevelIconManager
|
||||||
|
|
||||||
|
This CL is just the boilerplate. Actual implementation to follow.
|
||||||
|
|
||||||
|
R=nickdiego
|
||||||
|
|
||||||
|
Change-Id: I135d5366761fcbb132405d782738d6c09f52bdd8
|
||||||
|
Bug: 356424077
|
||||||
|
Low-Coverage-Reason: TESTS_IN_SEPARATE_CL: This CL adds the boilerplate. Tests will be added in a followup.
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5752291
|
||||||
|
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||||
|
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
|
||||||
|
Reviewed-by: Nick Yamane <nickdiego@igalia.com>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1337593}
|
||||||
|
---
|
||||||
|
third_party/wayland-protocols/BUILD.gn | 4 ++
|
||||||
|
ui/ozone/platform/wayland/BUILD.gn | 3 ++
|
||||||
|
.../platform/wayland/common/wayland_object.cc | 50 ++++++++++++-------
|
||||||
|
.../platform/wayland/common/wayland_object.h | 2 +
|
||||||
|
.../wayland/host/toplevel_icon_manager.cc | 44 ++++++++++++++++
|
||||||
|
.../wayland/host/toplevel_icon_manager.h | 29 +++++++++++
|
||||||
|
.../wayland/host/wayland_connection.cc | 3 ++
|
||||||
|
.../wayland/host/wayland_connection.h | 6 +++
|
||||||
|
8 files changed, 123 insertions(+), 18 deletions(-)
|
||||||
|
create mode 100644 ui/ozone/platform/wayland/host/toplevel_icon_manager.cc
|
||||||
|
create mode 100644 ui/ozone/platform/wayland/host/toplevel_icon_manager.h
|
||||||
|
|
||||||
|
diff --git a/third_party/wayland-protocols/BUILD.gn b/third_party/wayland-protocols/BUILD.gn
|
||||||
|
index 67941c2c90cf5e..0bd73c2f56c380 100644
|
||||||
|
--- a/third_party/wayland-protocols/BUILD.gn
|
||||||
|
+++ b/third_party/wayland-protocols/BUILD.gn
|
||||||
|
@@ -207,3 +207,7 @@ wayland_protocol("xdg_shell_protocol") {
|
||||||
|
wayland_protocol("xdg_toplevel_drag_protocol") {
|
||||||
|
sources = [ "src/staging/xdg-toplevel-drag/xdg-toplevel-drag-v1.xml" ]
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+wayland_protocol("xdg_toplevel_icon_protocol") {
|
||||||
|
+ sources = [ "src/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml" ]
|
||||||
|
+}
|
||||||
|
diff --git a/ui/ozone/platform/wayland/BUILD.gn b/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
index 0264365be7c6ce..4ba36222f03906 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
+++ b/ui/ozone/platform/wayland/BUILD.gn
|
||||||
|
@@ -77,6 +77,8 @@ source_set("wayland") {
|
||||||
|
"host/single_pixel_buffer.h",
|
||||||
|
"host/surface_augmenter.cc",
|
||||||
|
"host/surface_augmenter.h",
|
||||||
|
+ "host/toplevel_icon_manager.cc",
|
||||||
|
+ "host/toplevel_icon_manager.h",
|
||||||
|
"host/wayland_bubble.cc",
|
||||||
|
"host/wayland_bubble.h",
|
||||||
|
"host/wayland_buffer_backing.cc",
|
||||||
|
@@ -291,6 +293,7 @@ source_set("wayland") {
|
||||||
|
"//third_party/wayland-protocols:xdg_foreign",
|
||||||
|
"//third_party/wayland-protocols:xdg_output_protocol",
|
||||||
|
"//third_party/wayland-protocols:xdg_shell_protocol",
|
||||||
|
+ "//third_party/wayland-protocols:xdg_toplevel_icon_protocol",
|
||||||
|
"//ui/base",
|
||||||
|
"//ui/base:buildflags",
|
||||||
|
"//ui/base:data_exchange",
|
||||||
|
diff --git a/ui/ozone/platform/wayland/common/wayland_object.cc b/ui/ozone/platform/wayland/common/wayland_object.cc
|
||||||
|
index cab61aa4409ca5..e30367a19d7774 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/common/wayland_object.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/common/wayland_object.cc
|
||||||
|
@@ -44,6 +44,7 @@
|
||||||
|
#include <xdg-foreign-unstable-v2-client-protocol.h>
|
||||||
|
#include <xdg-output-unstable-v1-client-protocol.h>
|
||||||
|
#include <xdg-shell-client-protocol.h>
|
||||||
|
+#include <xdg-toplevel-icon-v1-client-protocol.h>
|
||||||
|
|
||||||
|
#include "base/logging.h"
|
||||||
|
|
||||||
|
@@ -77,31 +78,36 @@ void delete_output(wl_output* output) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_keyboard(wl_keyboard* keyboard) {
|
||||||
|
- if (wl::get_version_of_object(keyboard) >= WL_KEYBOARD_RELEASE_SINCE_VERSION)
|
||||||
|
+ if (wl::get_version_of_object(keyboard) >=
|
||||||
|
+ WL_KEYBOARD_RELEASE_SINCE_VERSION) {
|
||||||
|
wl_keyboard_release(keyboard);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
wl_keyboard_destroy(keyboard);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_pointer(wl_pointer* pointer) {
|
||||||
|
- if (wl::get_version_of_object(pointer) >= WL_POINTER_RELEASE_SINCE_VERSION)
|
||||||
|
+ if (wl::get_version_of_object(pointer) >= WL_POINTER_RELEASE_SINCE_VERSION) {
|
||||||
|
wl_pointer_release(pointer);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
wl_pointer_destroy(pointer);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_seat(wl_seat* seat) {
|
||||||
|
- if (wl::get_version_of_object(seat) >= WL_SEAT_RELEASE_SINCE_VERSION)
|
||||||
|
+ if (wl::get_version_of_object(seat) >= WL_SEAT_RELEASE_SINCE_VERSION) {
|
||||||
|
wl_seat_release(seat);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
wl_seat_destroy(seat);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_touch(wl_touch* touch) {
|
||||||
|
- if (wl::get_version_of_object(touch) >= WL_TOUCH_RELEASE_SINCE_VERSION)
|
||||||
|
+ if (wl::get_version_of_object(touch) >= WL_TOUCH_RELEASE_SINCE_VERSION) {
|
||||||
|
wl_touch_release(touch);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
wl_touch_destroy(touch);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_zaura_output_manager(zaura_output_manager* manager) {
|
||||||
|
@@ -113,39 +119,45 @@ void delete_zaura_output_manager_v2(zaura_output_manager_v2* manager) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_zaura_shell(zaura_shell* shell) {
|
||||||
|
- if (wl::get_version_of_object(shell) >= ZAURA_SHELL_RELEASE_SINCE_VERSION)
|
||||||
|
+ if (wl::get_version_of_object(shell) >= ZAURA_SHELL_RELEASE_SINCE_VERSION) {
|
||||||
|
zaura_shell_release(shell);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
zaura_shell_destroy(shell);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_zaura_surface(zaura_surface* surface) {
|
||||||
|
- if (wl::get_version_of_object(surface) >= ZAURA_SURFACE_RELEASE_SINCE_VERSION)
|
||||||
|
+ if (wl::get_version_of_object(surface) >=
|
||||||
|
+ ZAURA_SURFACE_RELEASE_SINCE_VERSION) {
|
||||||
|
zaura_surface_release(surface);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
zaura_surface_destroy(surface);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_zaura_output(zaura_output* output) {
|
||||||
|
- if (wl::get_version_of_object(output) >= ZAURA_OUTPUT_RELEASE_SINCE_VERSION)
|
||||||
|
+ if (wl::get_version_of_object(output) >= ZAURA_OUTPUT_RELEASE_SINCE_VERSION) {
|
||||||
|
zaura_output_release(output);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
zaura_output_destroy(output);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_zaura_toplevel(zaura_toplevel* toplevel) {
|
||||||
|
if (wl::get_version_of_object(toplevel) >=
|
||||||
|
- ZAURA_TOPLEVEL_RELEASE_SINCE_VERSION)
|
||||||
|
+ ZAURA_TOPLEVEL_RELEASE_SINCE_VERSION) {
|
||||||
|
zaura_toplevel_release(toplevel);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
zaura_toplevel_destroy(toplevel);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void delete_zaura_popup(zaura_popup* popup) {
|
||||||
|
- if (wl::get_version_of_object(popup) >= ZAURA_POPUP_RELEASE_SINCE_VERSION)
|
||||||
|
+ if (wl::get_version_of_object(popup) >= ZAURA_POPUP_RELEASE_SINCE_VERSION) {
|
||||||
|
zaura_popup_release(popup);
|
||||||
|
- else
|
||||||
|
+ } else {
|
||||||
|
zaura_popup_destroy(popup);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
@@ -245,6 +257,8 @@ IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_popup)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_positioner)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_surface)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_toplevel)
|
||||||
|
+IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_toplevel_icon_manager_v1)
|
||||||
|
+IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_toplevel_icon_v1)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_wm_base)
|
||||||
|
IMPLEMENT_WAYLAND_OBJECT_TRAITS_WITH_DELETER(zaura_output_manager,
|
||||||
|
delete_zaura_output_manager)
|
||||||
|
diff --git a/ui/ozone/platform/wayland/common/wayland_object.h b/ui/ozone/platform/wayland/common/wayland_object.h
|
||||||
|
index ed4902d29edb8f..38213eff64de40 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/common/wayland_object.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/common/wayland_object.h
|
||||||
|
@@ -156,6 +156,8 @@ DECLARE_WAYLAND_OBJECT_TRAITS(xdg_popup)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_positioner)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_surface)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_toplevel)
|
||||||
|
+DECLARE_WAYLAND_OBJECT_TRAITS(xdg_toplevel_icon_manager_v1)
|
||||||
|
+DECLARE_WAYLAND_OBJECT_TRAITS(xdg_toplevel_icon_v1)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(xdg_wm_base)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(zaura_output)
|
||||||
|
DECLARE_WAYLAND_OBJECT_TRAITS(zaura_output_manager)
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/toplevel_icon_manager.cc b/ui/ozone/platform/wayland/host/toplevel_icon_manager.cc
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000000..44478f56c88a97
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/toplevel_icon_manager.cc
|
||||||
|
@@ -0,0 +1,44 @@
|
||||||
|
+// Copyright 2024 The Chromium Authors
|
||||||
|
+// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
+// found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#include "ui/ozone/platform/wayland/host/toplevel_icon_manager.h"
|
||||||
|
+
|
||||||
|
+#include <xdg-toplevel-icon-v1-client-protocol.h>
|
||||||
|
+
|
||||||
|
+#include "base/check_op.h"
|
||||||
|
+#include "base/logging.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/common/wayland_object.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/host/wayland_connection.h"
|
||||||
|
+
|
||||||
|
+namespace ui {
|
||||||
|
+
|
||||||
|
+namespace {
|
||||||
|
+
|
||||||
|
+constexpr uint32_t kMaxVersion = 1;
|
||||||
|
+
|
||||||
|
+} // namespace
|
||||||
|
+
|
||||||
|
+// static
|
||||||
|
+void ToplevelIconManager::Instantiate(WaylandConnection* connection,
|
||||||
|
+ wl_registry* registry,
|
||||||
|
+ uint32_t name,
|
||||||
|
+ const std::string& interface,
|
||||||
|
+ uint32_t version) {
|
||||||
|
+ CHECK_EQ(interface, kInterfaceName) << "Expected \"" << kInterfaceName
|
||||||
|
+ << "\" but got \"" << interface << "\"";
|
||||||
|
+
|
||||||
|
+ if (connection->toplevel_icon_manager_v1_) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ auto instance = wl::Bind<::xdg_toplevel_icon_manager_v1>(
|
||||||
|
+ registry, name, std::min(version, kMaxVersion));
|
||||||
|
+ if (!instance) {
|
||||||
|
+ LOG(ERROR) << "Failed to bind " << kInterfaceName;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ connection->toplevel_icon_manager_v1_ = std::move(instance);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+} // namespace ui
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/toplevel_icon_manager.h b/ui/ozone/platform/wayland/host/toplevel_icon_manager.h
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000000..8525dd7cda62db
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/toplevel_icon_manager.h
|
||||||
|
@@ -0,0 +1,29 @@
|
||||||
|
+// Copyright 2024 The Chromium Authors
|
||||||
|
+// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
+// found in the LICENSE file.
|
||||||
|
+
|
||||||
|
+#ifndef UI_OZONE_PLATFORM_WAYLAND_HOST_TOPLEVEL_ICON_MANAGER_H_
|
||||||
|
+#define UI_OZONE_PLATFORM_WAYLAND_HOST_TOPLEVEL_ICON_MANAGER_H_
|
||||||
|
+
|
||||||
|
+#include "ui/ozone/platform/wayland/common/wayland_object.h"
|
||||||
|
+
|
||||||
|
+namespace ui {
|
||||||
|
+
|
||||||
|
+// Sets up the global xdg_toplevel_icon_manager_v1 instance.
|
||||||
|
+class ToplevelIconManager
|
||||||
|
+ : public wl::GlobalObjectRegistrar<ToplevelIconManager> {
|
||||||
|
+ public:
|
||||||
|
+ static constexpr char kInterfaceName[] = "xdg_toplevel_icon_manager_v1";
|
||||||
|
+
|
||||||
|
+ static void Instantiate(WaylandConnection* connection,
|
||||||
|
+ wl_registry* registry,
|
||||||
|
+ uint32_t name,
|
||||||
|
+ const std::string& interface,
|
||||||
|
+ uint32_t version);
|
||||||
|
+
|
||||||
|
+ ToplevelIconManager() = delete;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+} // namespace ui
|
||||||
|
+
|
||||||
|
+#endif // UI_OZONE_PLATFORM_WAYLAND_HOST_TOPLEVEL_ICON_MANAGER_H_
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_connection.cc b/ui/ozone/platform/wayland/host/wayland_connection.cc
|
||||||
|
index fe695e355e26b8..51ca168a198bda 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_connection.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_connection.cc
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
#include "ui/ozone/platform/wayland/host/proxy/wayland_proxy_impl.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/single_pixel_buffer.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/surface_augmenter.h"
|
||||||
|
+#include "ui/ozone/platform/wayland/host/toplevel_icon_manager.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_buffer_factory.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_buffer_manager_host.h"
|
||||||
|
#include "ui/ozone/platform/wayland/host/wayland_cursor.h"
|
||||||
|
@@ -152,6 +153,8 @@ bool WaylandConnection::Initialize(bool use_threaded_polling) {
|
||||||
|
&SinglePixelBuffer::Instantiate);
|
||||||
|
RegisterGlobalObjectFactory(SurfaceAugmenter::kInterfaceName,
|
||||||
|
&SurfaceAugmenter::Instantiate);
|
||||||
|
+ RegisterGlobalObjectFactory(ToplevelIconManager::kInterfaceName,
|
||||||
|
+ &ToplevelIconManager::Instantiate);
|
||||||
|
RegisterGlobalObjectFactory(WaylandZAuraOutputManagerV2::kInterfaceName,
|
||||||
|
&WaylandZAuraOutputManagerV2::Instantiate);
|
||||||
|
RegisterGlobalObjectFactory(WaylandDataDeviceManager::kInterfaceName,
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_connection.h b/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
index 54eb0c234a44fc..10fe500d24e33f 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
@@ -169,6 +169,10 @@ class WaylandConnection {
|
||||||
|
return fractional_scale_manager_v1_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ xdg_toplevel_icon_manager_v1* toplevel_icon_manager_v1() const {
|
||||||
|
+ return toplevel_icon_manager_v1_.get();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
void SetPlatformCursor(wl_cursor* cursor_data, int buffer_scale);
|
||||||
|
|
||||||
|
void SetCursorBufferListener(WaylandCursorBufferListener* listener);
|
||||||
|
@@ -384,6 +388,7 @@ class WaylandConnection {
|
||||||
|
friend class OverlayPrioritizer;
|
||||||
|
friend class SinglePixelBuffer;
|
||||||
|
friend class SurfaceAugmenter;
|
||||||
|
+ friend class ToplevelIconManager;
|
||||||
|
friend class WaylandDataDeviceManager;
|
||||||
|
friend class WaylandOutput;
|
||||||
|
friend class WaylandSeat;
|
||||||
|
@@ -489,6 +494,7 @@ class WaylandConnection {
|
||||||
|
wl::Object<zcr_extended_drag_v1> extended_drag_v1_;
|
||||||
|
wl::Object<zxdg_output_manager_v1> xdg_output_manager_;
|
||||||
|
wl::Object<wp_fractional_scale_manager_v1> fractional_scale_manager_v1_;
|
||||||
|
+ wl::Object<xdg_toplevel_icon_manager_v1> toplevel_icon_manager_v1_;
|
||||||
|
|
||||||
|
// Manages Wayland windows.
|
||||||
|
WaylandWindowManager window_manager_{this};
|
61
wayland_connection-Wchanges-meaning.patch
Normal file
61
wayland_connection-Wchanges-meaning.patch
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
From 04b25cdd531cf3826d7418141897492979d8f0fb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||||
|
Date: Thu, 19 Sep 2024 10:13:04 +0000
|
||||||
|
Subject: [PATCH] GCC: avoid clash between type and getter in WaylandConnection
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
WaylandConnection::xdg_toplevel_drag_manager_v1 getter clashes with
|
||||||
|
the xdg_toplevel_drag_manager_v1 type. Renamed getter to
|
||||||
|
toplevel_drag_manager_v1 following the decision with other types.
|
||||||
|
|
||||||
|
Bug: 40565911
|
||||||
|
Change-Id: I7331be4bcb00f47cd48a74b043067f044b40dcbc
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5875679
|
||||||
|
Reviewed-by: Nick Yamane <nickdiego@igalia.com>
|
||||||
|
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1357526}
|
||||||
|
---
|
||||||
|
ui/ozone/platform/wayland/host/wayland_connection.h | 2 +-
|
||||||
|
.../platform/wayland/host/wayland_window_drag_controller.cc | 6 +++---
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_connection.h b/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
index 79680db7189852..55a89735882ff7 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_connection.h
|
||||||
|
@@ -160,7 +160,7 @@ class WaylandConnection {
|
||||||
|
zcr_extended_drag_v1* extended_drag_v1() const {
|
||||||
|
return extended_drag_v1_.get();
|
||||||
|
}
|
||||||
|
- xdg_toplevel_drag_manager_v1* xdg_toplevel_drag_manager_v1() const {
|
||||||
|
+ xdg_toplevel_drag_manager_v1* toplevel_drag_manager_v1() const {
|
||||||
|
return xdg_toplevel_drag_manager_v1_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/ui/ozone/platform/wayland/host/wayland_window_drag_controller.cc b/ui/ozone/platform/wayland/host/wayland_window_drag_controller.cc
|
||||||
|
index 6184684e308154..6fbf3df07bfe68 100644
|
||||||
|
--- a/ui/ozone/platform/wayland/host/wayland_window_drag_controller.cc
|
||||||
|
+++ b/ui/ozone/platform/wayland/host/wayland_window_drag_controller.cc
|
||||||
|
@@ -109,9 +109,9 @@ class WaylandWindowDragController::XdgToplevelDrag {
|
||||||
|
public:
|
||||||
|
XdgToplevelDrag(WaylandConnection& connection, wl_data_source* source)
|
||||||
|
: connection_(connection) {
|
||||||
|
- DCHECK(connection.xdg_toplevel_drag_manager_v1());
|
||||||
|
+ DCHECK(connection.toplevel_drag_manager_v1());
|
||||||
|
drag_.reset(xdg_toplevel_drag_manager_v1_get_xdg_toplevel_drag(
|
||||||
|
- connection.xdg_toplevel_drag_manager_v1(), source));
|
||||||
|
+ connection.toplevel_drag_manager_v1(), source));
|
||||||
|
DCHECK(drag_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -737,7 +737,7 @@ bool WaylandWindowDragController::IsExtendedDragAvailable() const {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WaylandWindowDragController::IsXdgToplevelDragAvailable() const {
|
||||||
|
- return !!connection_->xdg_toplevel_drag_manager_v1();
|
||||||
|
+ return !!connection_->toplevel_drag_manager_v1();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WaylandWindowDragController::IsActiveDragAndDropSession() const {
|
9
wayland_version.patch
Normal file
9
wayland_version.patch
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
--- src/third_party/wayland/wayland_version.gni.orig 2025-01-02 22:24:04.094885287 +0100
|
||||||
|
+++ src/third_party/wayland/wayland_version.gni 2025-01-04 20:36:25.262834108 +0100
|
||||||
|
@@ -4,5 +4,5 @@
|
||||||
|
# is true to check system wayland package version meets
|
||||||
|
# at least the version of third-party/wayland so that it won't
|
||||||
|
# make any compile error with chromium
|
||||||
|
-wayland_version = "1.23.0"
|
||||||
|
+wayland_version = "1.22.0"
|
||||||
|
wayland_egl_version = "18.1.0"
|
36
webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR-2.patch
Normal file
36
webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR-2.patch
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
From 4860148c51cb673711a41bc26135659ad4e6cb9d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dan Tan <dwtan@google.com>
|
||||||
|
Date: Wed, 31 Jan 2024 09:11:18 -0800
|
||||||
|
Subject: [PATCH] Add WebRTC-LibaomAv1Encoder-MaxConsecFrameDrop parameter to
|
||||||
|
explicitly limit the maximum consecutive frame drop
|
||||||
|
|
||||||
|
Bug: webrtc:15821
|
||||||
|
Change-Id: Ib8be6827ea57e4e54269b94a0fc9ea81945af09f
|
||||||
|
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337020
|
||||||
|
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
|
||||||
|
Commit-Queue: Dan Tan <dwtan@google.com>
|
||||||
|
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#41648}
|
||||||
|
---
|
||||||
|
experiments/field_trials.py | 3 +++
|
||||||
|
.../codecs/av1/libaom_av1_encoder.cc | 18 ++++++++++++-
|
||||||
|
.../codecs/av1/libaom_av1_encoder_unittest.cc | 25 +++++++++++++++++++
|
||||||
|
3 files changed, 45 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
index 4ff22bfe34..03bb367fe0 100644
|
||||||
|
--- a/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
+++ b/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
@@ -297,6 +307,12 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||||
|
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_PALETTE, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (codec_settings->mode == VideoCodecMode::kRealtimeVideo &&
|
||||||
|
+ encoder_settings_.GetFrameDropEnabled() && max_consec_frame_drop_ > 0) {
|
||||||
|
+ SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR,
|
||||||
|
+ max_consec_frame_drop_);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (cfg_.g_threads == 8) {
|
||||||
|
// Values passed to AV1E_SET_TILE_ROWS and AV1E_SET_TILE_COLUMNS are log2()
|
||||||
|
// based.
|
250
webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch
Normal file
250
webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
From f7a15067031cae07b1dac031fa263a9f01902f1c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergey Silkin <ssilkin@webrtc.org>
|
||||||
|
Date: Tue, 9 Jul 2024 15:03:10 +0200
|
||||||
|
Subject: [PATCH] Adjust max consecutive drops depending on target frame rate
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Current thresholds were tuned to guarantee no buffer overshoot in an extreme scenario (encoding a high complexity video in a low bitrate).
|
||||||
|
|
||||||
|
Bug: b/337757868, webrtc:351644568
|
||||||
|
Change-Id: I832b2564af6f18f06550338cc9b3618f8acdf831
|
||||||
|
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356580
|
||||||
|
Reviewed-by: Dan Tan <dwtan@google.com>
|
||||||
|
Reviewed-by: Erik Språng <sprang@webrtc.org>
|
||||||
|
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#42620}
|
||||||
|
---
|
||||||
|
experiments/field_trials.py | 6 +--
|
||||||
|
modules/video_coding/codecs/av1/BUILD.gn | 2 +
|
||||||
|
.../codecs/av1/libaom_av1_encoder.cc | 42 +++++++++------
|
||||||
|
.../codecs/av1/libaom_av1_encoder_unittest.cc | 53 ++++++++++++++-----
|
||||||
|
4 files changed, 69 insertions(+), 34 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules/video_coding/codecs/av1/BUILD.gn b/modules/video_coding/codecs/av1/BUILD.gn
|
||||||
|
index 7d93de7a3a..197e1f3e19 100644
|
||||||
|
--- a/third_party/webrtc/modules/video_coding/codecs/av1/BUILD.gn
|
||||||
|
+++ b/third_party/webrtc/modules/video_coding/codecs/av1/BUILD.gn
|
||||||
|
@@ -60,6 +60,7 @@ rtc_library("libaom_av1_encoder") {
|
||||||
|
"../../../../api/video_codecs:scalability_mode",
|
||||||
|
"../../../../api/video_codecs:video_codecs_api",
|
||||||
|
"../../../../common_video",
|
||||||
|
+ "../../../../modules/rtp_rtcp:rtp_rtcp_format",
|
||||||
|
"../../../../rtc_base:checks",
|
||||||
|
"../../../../rtc_base:logging",
|
||||||
|
"../../../../rtc_base:rtc_numerics",
|
||||||
|
@@ -104,6 +105,7 @@ if (rtc_include_tests) {
|
||||||
|
"../../../../api/units:data_size",
|
||||||
|
"../../../../api/units:time_delta",
|
||||||
|
"../../../../api/video:video_frame",
|
||||||
|
+ "../../../../modules/rtp_rtcp:rtp_rtcp_format",
|
||||||
|
"../../../../test:scoped_key_value_config",
|
||||||
|
"../../svc:scalability_mode_util",
|
||||||
|
"../../svc:scalability_structures",
|
||||||
|
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
index 3a8830252d..258d3d3b88 100644
|
||||||
|
--- a/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
+++ b/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||||
|
@@ -30,6 +30,7 @@
|
||||||
|
#include "api/video_codecs/scalability_mode.h"
|
||||||
|
#include "api/video_codecs/video_codec.h"
|
||||||
|
#include "api/video_codecs/video_encoder.h"
|
||||||
|
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
||||||
|
#include "modules/video_coding/include/video_codec_interface.h"
|
||||||
|
#include "modules/video_coding/include/video_error_codes.h"
|
||||||
|
#include "modules/video_coding/svc/create_scalability_structure.h"
|
||||||
|
@@ -65,7 +66,6 @@ constexpr int kLowQindex = 145; // Low qindex threshold for QP scaling.
|
||||||
|
constexpr int kHighQindex = 205; // High qindex threshold for QP scaling.
|
||||||
|
constexpr int kBitDepth = 8;
|
||||||
|
constexpr int kLagInFrames = 0; // No look ahead.
|
||||||
|
-constexpr int kRtpTicksPerSecond = 90000;
|
||||||
|
constexpr double kMinFrameRateFps = 1.0;
|
||||||
|
|
||||||
|
aom_superblock_size_t GetSuperblockSize(int width, int height, int threads) {
|
||||||
|
@@ -133,7 +133,9 @@ class LibaomAv1Encoder final : public VideoEncoder {
|
||||||
|
double framerate_fps_; // Current target frame rate.
|
||||||
|
int64_t timestamp_;
|
||||||
|
const LibaomAv1EncoderInfoSettings encoder_info_override_;
|
||||||
|
- int max_consec_frame_drop_;
|
||||||
|
+ // TODO(webrtc:351644568): Remove this kill-switch after the feature is fully
|
||||||
|
+ // deployed.
|
||||||
|
+ bool adaptive_max_consec_drops_;
|
||||||
|
};
|
||||||
|
|
||||||
|
int32_t VerifyCodecSettings(const VideoCodec& codec_settings) {
|
||||||
|
@@ -164,12 +166,12 @@ int32_t VerifyCodecSettings(const VideoCodec& codec_settings) {
|
||||||
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
-int GetMaxConsecutiveFrameDrop(const FieldTrialsView& field_trials) {
|
||||||
|
- webrtc::FieldTrialParameter<int> maxdrop("maxdrop", 0);
|
||||||
|
- webrtc::ParseFieldTrial(
|
||||||
|
- {&maxdrop},
|
||||||
|
- field_trials.Lookup("WebRTC-LibaomAv1Encoder-MaxConsecFrameDrop"));
|
||||||
|
- return maxdrop;
|
||||||
|
+int GetMaxConsecDrops(double framerate_fps) {
|
||||||
|
+ // Consecutive frame drops result in a video freeze. We want to minimize the
|
||||||
|
+ // max number of consecutive drops and, at the same time, keep the value high
|
||||||
|
+ // enough to let encoder drain the buffer at overshoot.
|
||||||
|
+ constexpr double kMaxFreezeSeconds = 0.25;
|
||||||
|
+ return std::ceil(kMaxFreezeSeconds * framerate_fps);
|
||||||
|
}
|
||||||
|
|
||||||
|
LibaomAv1Encoder::LibaomAv1Encoder(const Environment& env,
|
||||||
|
@@ -182,7 +184,8 @@ LibaomAv1Encoder::LibaomAv1Encoder(const Environment& env,
|
||||||
|
framerate_fps_(0),
|
||||||
|
timestamp_(0),
|
||||||
|
encoder_info_override_(env.field_trials()),
|
||||||
|
- max_consec_frame_drop_(GetMaxConsecutiveFrameDrop(env.field_trials())) {}
|
||||||
|
+ adaptive_max_consec_drops_(!env.field_trials().IsDisabled(
|
||||||
|
+ "WebRTC-LibaomAv1Encoder-AdaptiveMaxConsecDrops")) {}
|
||||||
|
|
||||||
|
LibaomAv1Encoder::~LibaomAv1Encoder() {
|
||||||
|
Release();
|
||||||
|
@@ -242,7 +245,7 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||||
|
cfg_.g_threads =
|
||||||
|
NumberOfThreads(cfg_.g_w, cfg_.g_h, settings.number_of_cores);
|
||||||
|
cfg_.g_timebase.num = 1;
|
||||||
|
- cfg_.g_timebase.den = kRtpTicksPerSecond;
|
||||||
|
+ cfg_.g_timebase.den = kVideoPayloadTypeFrequency;
|
||||||
|
cfg_.rc_target_bitrate = encoder_settings_.startBitrate; // kilobits/sec.
|
||||||
|
cfg_.rc_dropframe_thresh = encoder_settings_.GetFrameDropEnabled() ? 30 : 0;
|
||||||
|
cfg_.g_input_bit_depth = kBitDepth;
|
||||||
|
@@ -304,12 +307,6 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||||
|
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_PALETTE, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (codec_settings->mode == VideoCodecMode::kRealtimeVideo &&
|
||||||
|
- encoder_settings_.GetFrameDropEnabled() && max_consec_frame_drop_ > 0) {
|
||||||
|
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR,
|
||||||
|
- max_consec_frame_drop_);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
if (cfg_.g_threads == 8) {
|
||||||
|
// Values passed to AV1E_SET_TILE_ROWS and AV1E_SET_TILE_COLUMNS are log2()
|
||||||
|
// based.
|
||||||
|
@@ -659,7 +656,7 @@ int32_t LibaomAv1Encoder::Encode(
|
||||||
|
return WEBRTC_VIDEO_CODEC_ENCODER_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
- const uint32_t duration = kRtpTicksPerSecond / framerate_fps_;
|
||||||
|
+ const uint32_t duration = kVideoPayloadTypeFrequency / framerate_fps_;
|
||||||
|
timestamp_ += duration;
|
||||||
|
|
||||||
|
const size_t num_spatial_layers =
|
||||||
|
@@ -836,6 +833,17 @@ void LibaomAv1Encoder::SetRates(const RateControlParameters& parameters) {
|
||||||
|
SetEncoderControlParameters(AV1E_SET_SVC_PARAMS, &*svc_params_);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (adaptive_max_consec_drops_ &&
|
||||||
|
+ (!rates_configured_ || framerate_fps_ != parameters.framerate_fps)) {
|
||||||
|
+ int max_consec_drops = GetMaxConsecDrops(parameters.framerate_fps);
|
||||||
|
+ if (!SetEncoderControlParameters(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR,
|
||||||
|
+ max_consec_drops)) {
|
||||||
|
+ RTC_LOG(LS_WARNING)
|
||||||
|
+ << "Failed to set AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR to "
|
||||||
|
+ << max_consec_drops;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
framerate_fps_ = parameters.framerate_fps;
|
||||||
|
|
||||||
|
rates_configured_ = true;
|
||||||
|
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder_unittest.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder_unittest.cc
|
||||||
|
index abb6fce0cf..a00b03aeda 100644
|
||||||
|
--- a/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_unittest.cc
|
||||||
|
+++ b/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_unittest.cc
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
|
||||||
|
#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h"
|
||||||
|
|
||||||
|
+#include <algorithm>
|
||||||
|
#include <limits>
|
||||||
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
@@ -22,6 +23,7 @@
|
||||||
|
#include "api/test/frame_generator_interface.h"
|
||||||
|
#include "api/video_codecs/video_codec.h"
|
||||||
|
#include "api/video_codecs/video_encoder.h"
|
||||||
|
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
||||||
|
#include "modules/video_coding/codecs/test/encoded_video_frame_producer.h"
|
||||||
|
#include "modules/video_coding/include/video_error_codes.h"
|
||||||
|
#include "test/gmock.h"
|
||||||
|
@@ -37,6 +39,7 @@ using ::testing::Eq;
|
||||||
|
using ::testing::Field;
|
||||||
|
using ::testing::IsEmpty;
|
||||||
|
using ::testing::SizeIs;
|
||||||
|
+using ::testing::Values;
|
||||||
|
|
||||||
|
VideoCodec DefaultCodecSettings() {
|
||||||
|
VideoCodec codec_settings;
|
||||||
|
@@ -199,32 +202,54 @@ TEST(LibaomAv1EncoderTest, CheckOddDimensionsWithSpatialLayers) {
|
||||||
|
ASSERT_THAT(encoded_frames, SizeIs(6));
|
||||||
|
}
|
||||||
|
|
||||||
|
-TEST(LibaomAv1EncoderTest, WithMaximumConsecutiveFrameDrop) {
|
||||||
|
- auto field_trials = std::make_unique<ScopedKeyValueConfig>(
|
||||||
|
- "WebRTC-LibaomAv1Encoder-MaxConsecFrameDrop/maxdrop:2/");
|
||||||
|
- const Environment env = CreateEnvironment(std::move(field_trials));
|
||||||
|
+class LibaomAv1EncoderMaxConsecDropTest
|
||||||
|
+ : public ::testing::TestWithParam</*framerate_fps=*/int> {};
|
||||||
|
+
|
||||||
|
+TEST_P(LibaomAv1EncoderMaxConsecDropTest, MaxConsecDrops) {
|
||||||
|
VideoBitrateAllocation allocation;
|
||||||
|
- allocation.SetBitrate(0, 0, 1000); // some very low bitrate
|
||||||
|
- std::unique_ptr<VideoEncoder> encoder = CreateLibaomAv1Encoder(env);
|
||||||
|
+ allocation.SetBitrate(0, 0,
|
||||||
|
+ 1000); // Very low bitrate to provoke frame drops.
|
||||||
|
+ std::unique_ptr<VideoEncoder> encoder =
|
||||||
|
+ CreateLibaomAv1Encoder(CreateEnvironment());
|
||||||
|
VideoCodec codec_settings = DefaultCodecSettings();
|
||||||
|
codec_settings.SetFrameDropEnabled(true);
|
||||||
|
codec_settings.SetScalabilityMode(ScalabilityMode::kL1T1);
|
||||||
|
codec_settings.startBitrate = allocation.get_sum_kbps();
|
||||||
|
+ codec_settings.maxFramerate = GetParam();
|
||||||
|
ASSERT_EQ(encoder->InitEncode(&codec_settings, DefaultEncoderSettings()),
|
||||||
|
WEBRTC_VIDEO_CODEC_OK);
|
||||||
|
encoder->SetRates(VideoEncoder::RateControlParameters(
|
||||||
|
allocation, codec_settings.maxFramerate));
|
||||||
|
- EncodedVideoFrameProducer evfp(*encoder);
|
||||||
|
- evfp.SetResolution(
|
||||||
|
- RenderResolution{codec_settings.width, codec_settings.height});
|
||||||
|
- // We should code the first frame, skip two, then code another frame.
|
||||||
|
std::vector<EncodedVideoFrameProducer::EncodedFrame> encoded_frames =
|
||||||
|
- evfp.SetNumInputFrames(4).Encode();
|
||||||
|
- ASSERT_THAT(encoded_frames, SizeIs(2));
|
||||||
|
- // The 4 frames have default Rtp-timestamps of 1000, 4000, 7000, 10000.
|
||||||
|
- ASSERT_THAT(encoded_frames[1].encoded_image.RtpTimestamp(), 10000);
|
||||||
|
+ EncodedVideoFrameProducer(*encoder)
|
||||||
|
+ .SetNumInputFrames(60)
|
||||||
|
+ .SetFramerateFps(codec_settings.maxFramerate)
|
||||||
|
+ .SetResolution(RenderResolution{320, 180})
|
||||||
|
+ .Encode();
|
||||||
|
+ ASSERT_GE(encoded_frames.size(), 2u);
|
||||||
|
+
|
||||||
|
+ int max_consec_drops = 0;
|
||||||
|
+ for (size_t i = 1; i < encoded_frames.size(); ++i) {
|
||||||
|
+ uint32_t frame_duration_rtp =
|
||||||
|
+ encoded_frames[i].encoded_image.RtpTimestamp() -
|
||||||
|
+ encoded_frames[i - 1].encoded_image.RtpTimestamp();
|
||||||
|
+ // X consecutive drops result in a freeze of (X + 1) frame duration.
|
||||||
|
+ // Subtract 1 to get pure number of drops.
|
||||||
|
+ int num_drops = frame_duration_rtp * codec_settings.maxFramerate /
|
||||||
|
+ kVideoPayloadTypeFrequency -
|
||||||
|
+ 1;
|
||||||
|
+ max_consec_drops = std::max(max_consec_drops, num_drops);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ const int expected_max_consec_drops =
|
||||||
|
+ std::ceil(0.25 * codec_settings.maxFramerate);
|
||||||
|
+ EXPECT_EQ(max_consec_drops, expected_max_consec_drops);
|
||||||
|
}
|
||||||
|
|
||||||
|
+INSTANTIATE_TEST_SUITE_P(LibaomAv1EncoderMaxConsecDropTests,
|
||||||
|
+ LibaomAv1EncoderMaxConsecDropTest,
|
||||||
|
+ Values(1, 2, 5, 15, 30, 60));
|
||||||
|
+
|
||||||
|
TEST(LibaomAv1EncoderTest, EncoderInfoWithoutResolutionBitrateLimits) {
|
||||||
|
std::unique_ptr<VideoEncoder> encoder =
|
||||||
|
CreateLibaomAv1Encoder(CreateEnvironment());
|
@@ -1,8 +1,8 @@
|
|||||||
--- src/third_party/zlib/google/zip_internal.cc.orig 2024-10-29 10:10:50.788206000 +0100
|
--- src/third_party/zlib/google/zip_internal.cc.orig 2025-01-06 22:04:22.495198404 +0100
|
||||||
+++ src/third_party/zlib/google/zip_internal.cc 2024-11-07 22:19:00.748569000 +0100
|
+++ src/third_party/zlib/google/zip_internal.cc 2025-01-12 19:16:36.143995598 +0100
|
||||||
@@ -9,6 +9,9 @@
|
@@ -10,6 +10,9 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
+#include <zconf.h>
|
+#include <zconf.h>
|
||||||
+#include <zlib.h>
|
+#include <zlib.h>
|
||||||
|
Reference in New Issue
Block a user