Accepting request 1194297 from home:oertel:branches:network:chromium
- Chromium 127.0.6533.119
* CVE-2024-7532: Out of bounds memory access in ANGLE
* CVE-2024-7533: Use after free in Sharing
* CVE-2024-7550: Type Confusion in V8
* CVE-2024-7534: Heap buffer overflow in Layout
* CVE-2024-7535: Inappropriate implementation in V8
* CVE-2024-7536: Use after free in WebAudio
- Chromium 127.0.6533.88
* CVE-2024-6988: Use after free in Downloads
* CVE-2024-6989: Use after free in Loader
* CVE-2024-6991: Use after free in Dawn
* CVE-2024-6992: Out of bounds memory access in ANGLE
* CVE-2024-6993: Inappropriate implementation in Canvas
* CVE-2024-6994: Heap buffer overflow in Layout
* CVE-2024-6995: Inappropriate implementation in Fullscreen
* CVE-2024-6996: Race in Frames
* CVE-2024-6997: Use after free in Tabs
* CVE-2024-6998: Use after free in User Education
* CVE-2024-6999: Inappropriate implementation in FedCM
* CVE-2024-7000: Use after free in CSS. Reported by Anonymous
* CVE-2024-7001: Inappropriate implementation in HTML
* CVE-2024-7003: Inappropriate implementation in FedCM
* CVE-2024-7004: Insufficient validation of untrusted input
in Safe Browsing
* CVE-2024-7005: Insufficient validation of untrusted input
in Safe Browsing
* CVE-2024-6990: Uninitialized Use in Dawn
* CVE-2024-7255: Out of bounds read in WebTransport
* CVE-2024-7256: Insufficient data validation in Dawn
OBS-URL: https://build.opensuse.org/request/show/1194297
OBS-URL: https://build.opensuse.org/package/show/network:chromium/chromium-beta?expand=0&rev=48
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
diff -up chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
|
||||
--- chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me 2023-06-24 10:38:11.011511463 +0200
|
||||
+++ chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc 2023-06-24 13:07:35.865375884 +0200
|
||||
@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
|
||||
|
||||
void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
|
||||
float global_alpha) const {
|
||||
+ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha};
|
||||
switch (type_) {
|
||||
case kColor:
|
||||
ApplyColorToFlags(flags, global_alpha);
|
||||
@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
|
||||
case kGradient:
|
||||
GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
|
||||
ImageDrawOptions());
|
||||
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
|
||||
+ flags.setColor(custom_color);
|
||||
break;
|
||||
case kImagePattern:
|
||||
GetCanvasPattern()->GetPattern()->ApplyToFlags(
|
||||
flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
|
||||
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
|
||||
+ flags.setColor(custom_color);
|
||||
break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
@@ -1,47 +0,0 @@
|
||||
From ae3ae3711784865bdc38bf119a6182a7b8dae91c Mon Sep 17 00:00:00 2001
|
||||
From: Matt Jolly <Matt.Jolly@footclan.ninja>
|
||||
Date: Sun, 17 Sep 2023 16:51:42 +1000
|
||||
Subject: [PATCH] Add system-zstd
|
||||
|
||||
Index: chromium-120.0.6099.18/build/linux/unbundle/replace_gn_files.py
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.18.orig/build/linux/unbundle/replace_gn_files.py
|
||||
+++ chromium-120.0.6099.18/build/linux/unbundle/replace_gn_files.py
|
||||
@@ -79,6 +79,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',
|
||||
}
|
||||
|
||||
|
||||
Index: chromium-120.0.6099.18/build/linux/unbundle/zstd.gn
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-120.0.6099.18/build/linux/unbundle/zstd.gn
|
||||
@@ -0,0 +1,25 @@
|
||||
+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 = [
|
||||
+ "zdict.h",
|
||||
+ "zstd.h",
|
||||
+ "zstd_errors.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("zstd") {
|
||||
+ deps = [ ":zstd_shim" ]
|
||||
+ public_configs = [ ":system_zstd" ]
|
||||
+}
|
||||
+
|
||||
+source_set("decompress") {
|
||||
+ deps = [ ":zstd_shim" ]
|
||||
+ public_configs = [ ":system_zstd" ]
|
||||
+}
|
||||
@@ -1,70 +0,0 @@
|
||||
Index: chromium-123.0.6312.46/media/base/cdm_promise_adapter.cc
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/media/base/cdm_promise_adapter.cc
|
||||
+++ chromium-123.0.6312.46/media/base/cdm_promise_adapter.cc
|
||||
@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
|
||||
void CdmPromiseAdapter::Clear(ClearReason reason) {
|
||||
// Reject all outstanding promises.
|
||||
DCHECK(thread_checker_.CalledOnValidThread());
|
||||
- for (auto& [promise_id, promise] : promises_) {
|
||||
+ for (auto& [p_i, p_e] : promises_) {
|
||||
+ auto& promise_id = p_i;
|
||||
+ auto& promise = p_e;
|
||||
TRACE_EVENT_NESTABLE_ASYNC_END1(
|
||||
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
|
||||
"status", "cleared");
|
||||
Index: chromium-123.0.6312.46/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ chromium-123.0.6312.46/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1474,7 +1474,8 @@ void ServiceWorkerContextWrapper::MaybeP
|
||||
return;
|
||||
}
|
||||
|
||||
- auto [document_url, key, callback] = std::move(*request);
|
||||
+ auto [d_u, key, callback] = std::move(*request);
|
||||
+ auto document_url = d_u;
|
||||
|
||||
DCHECK(document_url.is_valid());
|
||||
TRACE_EVENT1("ServiceWorker",
|
||||
Index: chromium-123.0.6312.46/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
|
||||
+++ chromium-123.0.6312.46/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
|
||||
@@ -3503,8 +3503,8 @@ void GridLayoutAlgorithm::PlaceGridItems
|
||||
DCHECK(out_row_break_between);
|
||||
|
||||
const auto& container_space = GetConstraintSpace();
|
||||
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
|
||||
-
|
||||
+ const auto& [grid_items, l_d, tree_size] = sizing_tree.TreeRootData();
|
||||
+ const auto& layout_data = l_d;
|
||||
const auto* cached_layout_subtree = container_space.GetGridLayoutSubtree();
|
||||
const auto container_writing_direction =
|
||||
container_space.GetWritingDirection();
|
||||
@@ -3666,8 +3666,9 @@ void GridLayoutAlgorithm::PlaceGridItems
|
||||
|
||||
// TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true.
|
||||
const auto& constraint_space = GetConstraintSpace();
|
||||
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
|
||||
-
|
||||
+ const auto& [g_i, l_d, tree_size] = sizing_tree.TreeRootData();
|
||||
+ const auto& grid_items = g_i;
|
||||
+ const auto& layout_data = l_d;
|
||||
const auto* cached_layout_subtree = constraint_space.GetGridLayoutSubtree();
|
||||
const auto container_writing_direction =
|
||||
constraint_space.GetWritingDirection();
|
||||
Index: chromium-123.0.6312.46/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc
|
||||
+++ chromium-123.0.6312.46/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc
|
||||
@@ -136,7 +136,8 @@ void PrewarmHttpDiskCacheManager::MaybeP
|
||||
std::pair<url::Origin, GURL> origin_and_url;
|
||||
std::swap(origin_and_url, queued_jobs_.front());
|
||||
queued_jobs_.pop();
|
||||
- const auto& [origin, url] = origin_and_url;
|
||||
+ const auto& [origin, u] = origin_and_url;
|
||||
+ const auto& url = u;
|
||||
TRACE_EVENT_WITH_FLOW1(
|
||||
"loading", "PrewarmHttpDiskCacheManager::MaybeProcessNextQueuedJob",
|
||||
TRACE_ID_LOCAL(this),
|
||||
@@ -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
|
||||
@@ -67,32 +67,6 @@ Index: chromium-123.0.6312.46/chrome/browser/download/bubble/download_bubble_upd
|
||||
SortedItems<Item>& cache,
|
||||
IterMap<Id, Item>& iter_map) {
|
||||
CHECK(iter != cache.end());
|
||||
Index: chromium-123.0.6312.46/components/optimization_guide/core/model_execution/model_execution_util.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/components/optimization_guide/core/model_execution/model_execution_util.h
|
||||
+++ chromium-123.0.6312.46/components/optimization_guide/core/model_execution/model_execution_util.h
|
||||
@@ -25,7 +25,7 @@ void SetExecutionRequestTemplate(
|
||||
|
||||
// Request is set by the feature and should always be typed.
|
||||
auto typed_request =
|
||||
- static_cast<const FeatureType::Request&>(request_metadata);
|
||||
+ static_cast<const typename FeatureType::Request&>(request_metadata);
|
||||
*(logging_data->mutable_request_data()) = typed_request;
|
||||
}
|
||||
|
||||
Index: chromium-123.0.6312.46/components/optimization_guide/core/model_quality/model_quality_log_entry.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/components/optimization_guide/core/model_quality/model_quality_log_entry.h
|
||||
+++ chromium-123.0.6312.46/components/optimization_guide/core/model_quality/model_quality_log_entry.h
|
||||
@@ -29,7 +29,7 @@ class ModelQualityLogEntry {
|
||||
}
|
||||
|
||||
template <typename FeatureType>
|
||||
- FeatureType::Quality* quality_data() {
|
||||
+ typename FeatureType::Quality* quality_data() {
|
||||
return FeatureType::GetLoggingData(*log_ai_data_request_)
|
||||
->mutable_quality_data();
|
||||
}
|
||||
Index: chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/components/optimization_guide/core/tflite_model_executor.h
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
commit 2958f58a84ebaacce716929f1cc4ba4a8076daee
|
||||
Author: Ivan Murashov <ivan.murashov@lge.com>
|
||||
Date: Wed May 15 19:30:45 2024 +0000
|
||||
|
||||
IWYU: Add missing include for std::variant usage in tab_strip_model.h
|
||||
|
||||
Bug: 41455655
|
||||
Change-Id: I1b028ee1340f0697f147b5d0bfef3c916e1a5729
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5537958
|
||||
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
|
||||
Reviewed-by: Dana Fried <dfried@chromium.org>
|
||||
Commit-Queue: Ivan Murashov <ivan.murashov@lge.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1301505}
|
||||
|
||||
diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
index 735c379a8cd1d..6711d565101ab 100644
|
||||
--- a/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
+#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
@@ -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,310 +0,0 @@
|
||||
Index: chromium-123.0.6312.46/base/check_op.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/base/check_op.h
|
||||
+++ chromium-123.0.6312.46/base/check_op.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef BASE_CHECK_OP_H_
|
||||
#define BASE_CHECK_OP_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
Index: chromium-123.0.6312.46/base/containers/flat_map.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/base/containers/flat_map.h
|
||||
+++ chromium-123.0.6312.46/base/containers/flat_map.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
|
||||
#define BASE_CONTAINERS_FLAT_MAP_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
Index: chromium-123.0.6312.46/chrome/browser/webauthn/authenticator_request_dialog_model.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/chrome/browser/webauthn/authenticator_request_dialog_model.h
|
||||
+++ chromium-123.0.6312.46/chrome/browser/webauthn/authenticator_request_dialog_model.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
+#include <variant>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/functional/callback_forward.h"
|
||||
Index: chromium-123.0.6312.46/components/feature_engagement/internal/never_event_storage_validator.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/components/feature_engagement/internal/never_event_storage_validator.h
|
||||
+++ chromium-123.0.6312.46/components/feature_engagement/internal/never_event_storage_validator.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
|
||||
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "components/feature_engagement/internal/event_storage_validator.h"
|
||||
Index: chromium-123.0.6312.46/gin/time_clamper.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/gin/time_clamper.h
|
||||
+++ chromium-123.0.6312.46/gin/time_clamper.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#define GIN_TIME_CLAMPER_H_
|
||||
|
||||
#include <algorithm>
|
||||
+#include <cstdlib>
|
||||
|
||||
#include "base/rand_util.h"
|
||||
#include "base/time/time.h"
|
||||
Index: chromium-123.0.6312.46/net/base/net_export.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/net/base/net_export.h
|
||||
+++ chromium-123.0.6312.46/net/base/net_export.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef NET_BASE_NET_EXPORT_H_
|
||||
#define NET_BASE_NET_EXPORT_H_
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
// Defines NET_EXPORT so that functionality implemented by the net module can
|
||||
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
|
||||
// access features not intended to be used directly by real consumers.
|
||||
Index: chromium-123.0.6312.46/third_party/abseil-cpp/absl/strings/string_view.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/abseil-cpp/absl/strings/string_view.h
|
||||
+++ chromium-123.0.6312.46/third_party/abseil-cpp/absl/strings/string_view.h
|
||||
@@ -27,6 +27,7 @@
|
||||
#ifndef ABSL_STRINGS_STRING_VIEW_H_
|
||||
#define ABSL_STRINGS_STRING_VIEW_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
Index: chromium-123.0.6312.46/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
|
||||
+++ chromium-123.0.6312.46/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#ifndef SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
|
||||
#define SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
Index: chromium-123.0.6312.46/third_party/material_color_utilities/src/cpp/palettes/tones.cc
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/material_color_utilities/src/cpp/palettes/tones.cc
|
||||
+++ chromium-123.0.6312.46/third_party/material_color_utilities/src/cpp/palettes/tones.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <cmath>
|
||||
#include "cpp/palettes/tones.h"
|
||||
|
||||
#include <cmath>
|
||||
Index: chromium-123.0.6312.46/third_party/ruy/src/ruy/profiler/instrumentation.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/ruy/src/ruy/profiler/instrumentation.h
|
||||
+++ chromium-123.0.6312.46/third_party/ruy/src/ruy/profiler/instrumentation.h
|
||||
@@ -17,6 +17,7 @@
|
||||
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
|
||||
|
||||
#ifdef RUY_PROFILER
|
||||
+#include <string>
|
||||
#include <cstdio>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
Index: chromium-123.0.6312.46/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
|
||||
+++ chromium-123.0.6312.46/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "llvm/Support/SaveAndRestore.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <sysexits.h>
|
||||
#ifdef HAVE_BACKTRACE
|
||||
Index: chromium-123.0.6312.46/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
|
||||
+++ chromium-123.0.6312.46/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
|
||||
@@ -31,6 +31,7 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
|
||||
#define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <complex>
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
Index: chromium-123.0.6312.46/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
|
||||
+++ chromium-123.0.6312.46/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
|
||||
@@ -2884,6 +2884,7 @@ static void vma_aligned_free(void* VMA_N
|
||||
|
||||
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
|
||||
#if VMA_STATS_STRING_ENABLED
|
||||
+#include <stdio.h>
|
||||
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
|
||||
{
|
||||
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
|
||||
Index: chromium-123.0.6312.46/third_party/webrtc/audio/utility/channel_mixer.cc
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/webrtc/audio/utility/channel_mixer.cc
|
||||
+++ chromium-123.0.6312.46/third_party/webrtc/audio/utility/channel_mixer.cc
|
||||
@@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
+
|
||||
#include "audio/utility/channel_mixer.h"
|
||||
|
||||
#include "audio/utility/channel_mixing_matrix.h"
|
||||
Index: chromium-123.0.6312.46/third_party/webrtc/modules/include/module_common_types_public.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/webrtc/modules/include/module_common_types_public.h
|
||||
+++ chromium-123.0.6312.46/third_party/webrtc/modules/include/module_common_types_public.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
||||
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
Index: chromium-123.0.6312.46/ui/gfx/linux/drm_util_linux.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/ui/gfx/linux/drm_util_linux.h
|
||||
+++ chromium-123.0.6312.46/ui/gfx/linux/drm_util_linux.h
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "ui/gfx/buffer_types.h"
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
namespace ui {
|
||||
|
||||
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
|
||||
Index: chromium-123.0.6312.46/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
|
||||
+++ chromium-123.0.6312.46/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include <bitset>
|
||||
|
||||
+#include <bitset>
|
||||
+
|
||||
#include "base/containers/span.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
Index: chromium-123.0.6312.46/components/search_engines/util.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/components/search_engines/util.h
|
||||
+++ chromium-123.0.6312.46/components/search_engines/util.h
|
||||
@@ -8,6 +8,7 @@
|
||||
// This file contains utility functions for search engine functionality.
|
||||
|
||||
#include <memory>
|
||||
+#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
Index: chromium-123.0.6312.46/content/common/service_worker/race_network_request_write_buffer_manager.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/content/common/service_worker/race_network_request_write_buffer_manager.h
|
||||
+++ chromium-123.0.6312.46/content/common/service_worker/race_network_request_write_buffer_manager.h
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
+#include <optional>
|
||||
+
|
||||
#include "base/containers/span.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "mojo/public/cpp/system/data_pipe.h"
|
||||
Index: chromium-123.0.6312.46/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
===================================================================
|
||||
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
+++ chromium-123.0.6312.46/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
+#include <optional>
|
||||
+
|
||||
#include "base/functional/callback.h"
|
||||
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
#include "third_party/blink/renderer/platform/heap/member.h"
|
||||
|
||||
Index: chromium-126.0.6478.126/gpu/config/webgpu_blocklist_impl.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.126.orig/gpu/config/webgpu_blocklist_impl.h
|
||||
+++ chromium-126.0.6478.126/gpu/config/webgpu_blocklist_impl.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#define GPU_CONFIG_WEBGPU_BLOCKLIST_IMPL_H_
|
||||
|
||||
#include <string>
|
||||
+#include <cstdint>
|
||||
|
||||
namespace wgpu {
|
||||
class Adapter;
|
||||
Index: chromium-126.0.6478.126/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.126.orig/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h
|
||||
+++ chromium-126.0.6478.126/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"
|
||||
Index: chromium-126.0.6478.126/third_party/blink/renderer/modules/encoding/text_decoder.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.126.orig/third_party/blink/renderer/modules/encoding/text_decoder.h
|
||||
+++ chromium-126.0.6478.126/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"
|
||||
Index: chromium-126.0.6478.126/third_party/blink/renderer/core/page/page_popup_controller.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.126.orig/third_party/blink/renderer/core/page/page_popup_controller.h
|
||||
+++ chromium-126.0.6478.126/third_party/blink/renderer/core/page/page_popup_controller.h
|
||||
@@ -31,6 +31,7 @@
|
||||
#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"
|
||||
diff --git a/components/visited_url_ranking/public/url_visit.h b/components/visited_url_ranking/public/url_visit.h
|
||||
index 8fa58c569f2411..8581be3068d81a 100644
|
||||
--- a/components/visited_url_ranking/public/url_visit.h
|
||||
+++ b/components/visited_url_ranking/public/url_visit.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
+#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include "base/functional/callback.h"
|
||||
@@ -1,52 +0,0 @@
|
||||
From 3a97a9b768a28e1d11fd9e86733a4179b5b2df15 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Wed, 22 May 2024 15:44:27 +0000
|
||||
Subject: [PATCH] Do not use std::format in ReadAnythingAppModel
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
std::format is still not allowed in Chrome (and this usage also broke
|
||||
libstdc++ build as it was missing the required include). Fix by
|
||||
using base::StringPrintf.
|
||||
|
||||
Bug: 41455655
|
||||
Change-Id: I9a99e350c6ebf5e99baf5f90c06be6bad9c2a106
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5513609
|
||||
Reviewed-by: Abigail Klein <abigailbklein@google.com>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1304460}
|
||||
---
|
||||
chrome/renderer/accessibility/read_anything_app_model.cc | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/renderer/accessibility/read_anything_app_model.cc b/chrome/renderer/accessibility/read_anything_app_model.cc
|
||||
index 57606844177a4a..c60794fe13c6fd 100644
|
||||
--- a/chrome/renderer/accessibility/read_anything_app_model.cc
|
||||
+++ b/chrome/renderer/accessibility/read_anything_app_model.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/check.h"
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
+#include "base/strings/stringprintf.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
#include "services/strings/grit/services_strings.h"
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
@@ -1088,7 +1089,7 @@ std::string ReadAnythingAppModel::GetHtmlTag(
|
||||
int32_t hierarchical_level =
|
||||
ax_node->GetIntAttribute(ax::mojom::IntAttribute::kHierarchicalLevel);
|
||||
if (hierarchical_level) {
|
||||
- return std::format("h{}", hierarchical_level);
|
||||
+ return base::StringPrintf("h%" PRId32, hierarchical_level);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1188,7 +1189,7 @@ std::string ReadAnythingAppModel::GetHeadingHtmlTagForPDF(
|
||||
int32_t hierarchical_level =
|
||||
ax_node->GetIntAttribute(ax::mojom::IntAttribute::kHierarchicalLevel);
|
||||
if (hierarchical_level) {
|
||||
- return std::format("h{}", hierarchical_level);
|
||||
+ return base::StringPrintf("h%" PRId32, hierarchical_level);
|
||||
}
|
||||
return html_tag;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
BIN
chromium-126.0.6478.182.tar.xz
(Stored with Git LFS)
BIN
chromium-126.0.6478.182.tar.xz
(Stored with Git LFS)
Binary file not shown.
@@ -1,6 +1,15 @@
|
||||
author: Andres Salomon <dilinger@debian.org>
|
||||
description: fix bindgen-related stuff
|
||||
|
||||
Two separate but related fixes:
|
||||
|
||||
Crabbyav1f is calling bindgen features which are not currently in
|
||||
bookworm or sid; --allowlist-item was added in bindgen 0.68. As far
|
||||
as I can tell the build.rs stuff calls allowlist_item from there as
|
||||
well, so these arguments may just be redundant? Hopefully I'm not
|
||||
breaking stuff.. Drop this for sid once bindgen gets upgraded.
|
||||
|
||||
|
||||
Also, the call to bindgen sets the path for libclang to
|
||||
rust_bindgen_root, which is wrong. We're already passing
|
||||
clang_base_path with the path to libclang, there's no reason that
|
||||
@@ -8,6 +17,84 @@ we'd expect libclang to be in the same directory as bindgen. That
|
||||
fix should probably go upstream.
|
||||
|
||||
|
||||
--- a/third_party/crabbyavif/BUILD.gn
|
||||
+++ b/third_party/crabbyavif/BUILD.gn
|
||||
@@ -12,15 +12,6 @@ rust_bindgen("crabbyavif_dav1d_bindings"
|
||||
bindgen_flags = [
|
||||
"no-doc-comments",
|
||||
"generate=functions,types,vars,methods,constructors,destructors",
|
||||
- "allowlist-item=dav1d_close",
|
||||
- "allowlist-item=dav1d_data_unref",
|
||||
- "allowlist-item=dav1d_data_wrap",
|
||||
- "allowlist-item=dav1d_default_settings",
|
||||
- "allowlist-item=dav1d_error",
|
||||
- "allowlist-item=dav1d_get_picture",
|
||||
- "allowlist-item=dav1d_open",
|
||||
- "allowlist-item=dav1d_picture_unref",
|
||||
- "allowlist-item=dav1d_send_data",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,59 +37,6 @@ rust_bindgen("crabbyavif_libyuv_bindings
|
||||
bindgen_flags = [
|
||||
"no-doc-comments",
|
||||
"generate=functions,types,vars,methods,constructors,destructors",
|
||||
- "allowlist-item=ARGBAttenuate",
|
||||
- "allowlist-item=ARGBUnattenuate",
|
||||
- "allowlist-item=Convert16To8Plane",
|
||||
- "allowlist-item=FilterMode",
|
||||
- "allowlist-item=FilterMode_kFilterBilinear",
|
||||
- "allowlist-item=FilterMode_kFilterBox",
|
||||
- "allowlist-item=FilterMode_kFilterNone",
|
||||
- "allowlist-item=HalfFloatPlane",
|
||||
- "allowlist-item=I010AlphaToARGBMatrix",
|
||||
- "allowlist-item=I010AlphaToARGBMatrixFilter",
|
||||
- "allowlist-item=I010ToARGBMatrix",
|
||||
- "allowlist-item=I010ToARGBMatrixFilter",
|
||||
- "allowlist-item=I012ToARGBMatrix",
|
||||
- "allowlist-item=I210AlphaToARGBMatrix",
|
||||
- "allowlist-item=I210AlphaToARGBMatrixFilter",
|
||||
- "allowlist-item=I210ToARGBMatrix",
|
||||
- "allowlist-item=I210ToARGBMatrixFilter",
|
||||
- "allowlist-item=I400ToARGBMatrix",
|
||||
- "allowlist-item=I410AlphaToARGBMatrix",
|
||||
- "allowlist-item=I410ToARGBMatrix",
|
||||
- "allowlist-item=I420AlphaToARGBMatrix",
|
||||
- "allowlist-item=I420AlphaToARGBMatrixFilter",
|
||||
- "allowlist-item=I420ToARGBMatrix",
|
||||
- "allowlist-item=I420ToARGBMatrixFilter",
|
||||
- "allowlist-item=I420ToRGB24Matrix",
|
||||
- "allowlist-item=I420ToRGB24MatrixFilter",
|
||||
- "allowlist-item=I420ToRGB565Matrix",
|
||||
- "allowlist-item=I420ToRGBAMatrix",
|
||||
- "allowlist-item=I422AlphaToARGBMatrix",
|
||||
- "allowlist-item=I422AlphaToARGBMatrixFilter",
|
||||
- "allowlist-item=I422ToARGBMatrix",
|
||||
- "allowlist-item=I422ToARGBMatrixFilter",
|
||||
- "allowlist-item=I422ToRGB24MatrixFilter",
|
||||
- "allowlist-item=I422ToRGB565Matrix",
|
||||
- "allowlist-item=I422ToRGBAMatrix",
|
||||
- "allowlist-item=I444AlphaToARGBMatrix",
|
||||
- "allowlist-item=I444ToARGBMatrix",
|
||||
- "allowlist-item=I444ToRGB24Matrix",
|
||||
- "allowlist-item=ScalePlane",
|
||||
- "allowlist-item=ScalePlane_12",
|
||||
- "allowlist-item=YuvConstants",
|
||||
- "allowlist-item=kYuv2020Constants",
|
||||
- "allowlist-item=kYuvF709Constants",
|
||||
- "allowlist-item=kYuvH709Constants",
|
||||
- "allowlist-item=kYuvI601Constants",
|
||||
- "allowlist-item=kYuvJPEGConstants",
|
||||
- "allowlist-item=kYuvV2020Constants",
|
||||
- "allowlist-item=kYvu2020Constants",
|
||||
- "allowlist-item=kYvuF709Constants",
|
||||
- "allowlist-item=kYvuH709Constants",
|
||||
- "allowlist-item=kYvuI601Constants",
|
||||
- "allowlist-item=kYvuJPEGConstants",
|
||||
- "allowlist-item=kYvuV2020Constants",
|
||||
]
|
||||
}
|
||||
|
||||
--- a/build/rust/rust_bindgen.gni
|
||||
+++ b/build/rust/rust_bindgen.gni
|
||||
@@ -18,7 +18,7 @@ if (host_os == "win") {
|
||||
|
||||
285
chromium-127-clang17-traitors.patch
Normal file
285
chromium-127-clang17-traitors.patch
Normal file
@@ -0,0 +1,285 @@
|
||||
author: Andres Salomon <dilinger@debian.org>
|
||||
|
||||
Work around the following:
|
||||
|
||||
In file included from ../../mojo/public/cpp/bindings/lib/native_s:32
|
||||
truct_serialization.cc:5:
|
||||
In file included from ../../mojo/public/cpp/bindings/lib/native_struct_serialization.h:13:
|
||||
In file included from ../../base/check_op.h:9:
|
||||
In file included from /usr/bin/../include/c++/v1/string:545:
|
||||
In file included from /usr/bin/../include/c++/v1/__functional/hash.h:24:
|
||||
In file included from /usr/bin/../include/c++/v1/__utility/pair.h:16:
|
||||
In file included from /usr/bin/../include/c++/v1/__fwd/get.h:16:
|
||||
In file included from /usr/bin/../include/c++/v1/__fwd/subrange.h:20:
|
||||
In file included from /usr/bin/../include/c++/v1/__iterator/concepts.h:34:
|
||||
/usr/bin/../include/c++/v1/__memory/pointer_traits.h:118:22: error: implicit instantiation of undefined template 'std::__pointer_traits_element_type<IPC::MessageAttachment::Type, false>'
|
||||
typedef typename __pointer_traits_element_type<pointer>::type element_type;
|
||||
^
|
||||
../../base/types/to_address.h:32:40: note: in instantiation of template class 'std::pointer_traits<IPC::MessageAttachment::Type>' requested here
|
||||
requires requires(const P& p) { std::pointer_traits<P>::to_address(p); } ||
|
||||
^
|
||||
../../base/types/to_address.h:32:35: note: in instantiation of requirement here
|
||||
../../mojo/public/cpp/bindings/lib/native_struct_serialization.cc requires requires(const P& p) { std::pointer_traits<P>::to_address(p); } ||
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
../../base/types/to_address.h:32:12: note: while substituting template arguments into constraint expression here
|
||||
requires requires(const P& p) { std::pointer_traits<P>::to_address(p); } ||
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
../../mojo/public/cpp/bindings/type_converter.h:103:26: note: while checking constraint satisfaction for template 'to_address<IPC::MessageAttachment::Type>' required here
|
||||
{ mojo::ConvertTo<T>(base::to_address(obj)) } -> std::same_as<T>;
|
||||
^~~~
|
||||
|
||||
|
||||
This turns out to be a clang-16 bug, fixed in clang-18:
|
||||
https://github.com/llvm/llvm-project/issues/67449
|
||||
|
||||
This is just the pointer_traits.h header from libc++-18-dev,
|
||||
with a minor tweak to get things building.
|
||||
|
||||
--- /dev/null
|
||||
+++ b/__memory/pointer_traits.h
|
||||
@@ -0,0 +1,245 @@
|
||||
+// -*- C++ -*-
|
||||
+//===----------------------------------------------------------------------===//
|
||||
+//
|
||||
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
+// See https://llvm.org/LICENSE.txt for license information.
|
||||
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
+//
|
||||
+//===----------------------------------------------------------------------===//
|
||||
+
|
||||
+#ifndef _LIBCPP___MEMORY_POINTER_TRAITS_H
|
||||
+#define _LIBCPP___MEMORY_POINTER_TRAITS_H
|
||||
+
|
||||
+#include <__config>
|
||||
+#include <__memory/addressof.h>
|
||||
+#include <__type_traits/conditional.h>
|
||||
+#include <__type_traits/conjunction.h>
|
||||
+#include <__type_traits/decay.h>
|
||||
+#include <__type_traits/is_class.h>
|
||||
+#include <__type_traits/is_function.h>
|
||||
+#include <__type_traits/is_void.h>
|
||||
+#include <__type_traits/void_t.h>
|
||||
+#include <__utility/declval.h>
|
||||
+#include <cstddef>
|
||||
+
|
||||
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
+# pragma GCC system_header
|
||||
+#endif
|
||||
+
|
||||
+_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
+
|
||||
+template <class _Tp, class = void>
|
||||
+struct __has_element_type : false_type {};
|
||||
+
|
||||
+template <class _Tp>
|
||||
+struct __has_element_type<_Tp, __void_t<typename _Tp::element_type> > : true_type {};
|
||||
+
|
||||
+template <class _Ptr, bool = __has_element_type<_Ptr>::value>
|
||||
+struct __pointer_traits_element_type {};
|
||||
+
|
||||
+template <class _Ptr>
|
||||
+struct __pointer_traits_element_type<_Ptr, true> {
|
||||
+ typedef _LIBCPP_NODEBUG typename _Ptr::element_type type;
|
||||
+};
|
||||
+
|
||||
+template <template <class, class...> class _Sp, class _Tp, class... _Args>
|
||||
+struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, true> {
|
||||
+ typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::element_type type;
|
||||
+};
|
||||
+
|
||||
+template <template <class, class...> class _Sp, class _Tp, class... _Args>
|
||||
+struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, false> {
|
||||
+ typedef _LIBCPP_NODEBUG _Tp type;
|
||||
+};
|
||||
+
|
||||
+template <class _Tp, class = void>
|
||||
+struct __has_difference_type : false_type {};
|
||||
+
|
||||
+template <class _Tp>
|
||||
+struct __has_difference_type<_Tp, __void_t<typename _Tp::difference_type> > : true_type {};
|
||||
+
|
||||
+template <class _Ptr, bool = __has_difference_type<_Ptr>::value>
|
||||
+struct __pointer_traits_difference_type {
|
||||
+ typedef _LIBCPP_NODEBUG ptrdiff_t type;
|
||||
+};
|
||||
+
|
||||
+template <class _Ptr>
|
||||
+struct __pointer_traits_difference_type<_Ptr, true> {
|
||||
+ typedef _LIBCPP_NODEBUG typename _Ptr::difference_type type;
|
||||
+};
|
||||
+
|
||||
+template <class _Tp, class _Up>
|
||||
+struct __has_rebind {
|
||||
+private:
|
||||
+ template <class _Xp>
|
||||
+ static false_type __test(...);
|
||||
+ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
||||
+ template <class _Xp>
|
||||
+ static true_type __test(typename _Xp::template rebind<_Up>* = 0);
|
||||
+ _LIBCPP_SUPPRESS_DEPRECATED_POP
|
||||
+
|
||||
+public:
|
||||
+ static const bool value = decltype(__test<_Tp>(0))::value;
|
||||
+};
|
||||
+
|
||||
+template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value>
|
||||
+struct __pointer_traits_rebind {
|
||||
+#ifndef _LIBCPP_CXX03_LANG
|
||||
+ typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up> type;
|
||||
+#else
|
||||
+ typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up>::other type;
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+template <template <class, class...> class _Sp, class _Tp, class... _Args, class _Up>
|
||||
+struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, true> {
|
||||
+#ifndef _LIBCPP_CXX03_LANG
|
||||
+ typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up> type;
|
||||
+#else
|
||||
+ typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up>::other type;
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+template <template <class, class...> class _Sp, class _Tp, class... _Args, class _Up>
|
||||
+struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, false> {
|
||||
+ typedef _Sp<_Up, _Args...> type;
|
||||
+};
|
||||
+
|
||||
+template <class _Ptr, class = void>
|
||||
+struct __pointer_traits_impl {};
|
||||
+
|
||||
+template <class _Ptr>
|
||||
+struct __pointer_traits_impl<_Ptr, __void_t<typename __pointer_traits_element_type<_Ptr>::type> > {
|
||||
+ typedef _Ptr pointer;
|
||||
+ typedef typename __pointer_traits_element_type<pointer>::type element_type;
|
||||
+ typedef typename __pointer_traits_difference_type<pointer>::type difference_type;
|
||||
+
|
||||
+#ifndef _LIBCPP_CXX03_LANG
|
||||
+ template <class _Up>
|
||||
+ using rebind = typename __pointer_traits_rebind<pointer, _Up>::type;
|
||||
+#else
|
||||
+ template <class _Up>
|
||||
+ struct rebind {
|
||||
+ typedef typename __pointer_traits_rebind<pointer, _Up>::type other;
|
||||
+ };
|
||||
+#endif // _LIBCPP_CXX03_LANG
|
||||
+
|
||||
+private:
|
||||
+ struct __nat {};
|
||||
+
|
||||
+public:
|
||||
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
|
||||
+ pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) {
|
||||
+ return pointer::pointer_to(__r);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+template <class _Ptr>
|
||||
+struct _LIBCPP_TEMPLATE_VIS pointer_traits : __pointer_traits_impl<_Ptr> {};
|
||||
+
|
||||
+template <class _Tp>
|
||||
+struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> {
|
||||
+ typedef _Tp* pointer;
|
||||
+ typedef _Tp element_type;
|
||||
+ typedef ptrdiff_t difference_type;
|
||||
+
|
||||
+#ifndef _LIBCPP_CXX03_LANG
|
||||
+ template <class _Up>
|
||||
+ using rebind = _Up*;
|
||||
+#else
|
||||
+ template <class _Up>
|
||||
+ struct rebind {
|
||||
+ typedef _Up* other;
|
||||
+ };
|
||||
+#endif
|
||||
+
|
||||
+private:
|
||||
+ struct __nat {};
|
||||
+
|
||||
+public:
|
||||
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
|
||||
+ pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) _NOEXCEPT {
|
||||
+ return std::addressof(__r);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+#ifndef _LIBCPP_CXX03_LANG
|
||||
+template <class _From, class _To>
|
||||
+using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>;
|
||||
+#else
|
||||
+template <class _From, class _To>
|
||||
+using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>::other;
|
||||
+#endif
|
||||
+
|
||||
+// to_address
|
||||
+
|
||||
+template <class _Pointer, class = void>
|
||||
+struct __to_address_helper;
|
||||
+
|
||||
+template <class _Tp>
|
||||
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __to_address(_Tp* __p) _NOEXCEPT {
|
||||
+ static_assert(!is_function<_Tp>::value, "_Tp is a function type");
|
||||
+ return __p;
|
||||
+}
|
||||
+
|
||||
+template <class _Pointer, class = void>
|
||||
+struct _HasToAddress : false_type {};
|
||||
+
|
||||
+template <class _Pointer>
|
||||
+struct _HasToAddress<_Pointer, decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>())) >
|
||||
+ : true_type {};
|
||||
+
|
||||
+template <class _Pointer, class = void>
|
||||
+struct _HasArrow : false_type {};
|
||||
+
|
||||
+template <class _Pointer>
|
||||
+struct _HasArrow<_Pointer, decltype((void)std::declval<const _Pointer&>().operator->()) > : true_type {};
|
||||
+
|
||||
+template <class _Pointer>
|
||||
+struct _IsFancyPointer {
|
||||
+ static const bool value = _HasArrow<_Pointer>::value || _HasToAddress<_Pointer>::value;
|
||||
+};
|
||||
+
|
||||
+// enable_if is needed here to avoid instantiating checks for fancy pointers on raw pointers
|
||||
+template <class _Pointer, class = __enable_if_t< _And<is_class<_Pointer>, _IsFancyPointer<_Pointer> >::value > >
|
||||
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
|
||||
+ decay_t<decltype(__to_address_helper<_Pointer>::__call(std::declval<const _Pointer&>()))>
|
||||
+ __to_address(const _Pointer& __p) _NOEXCEPT {
|
||||
+ return __to_address_helper<_Pointer>::__call(__p);
|
||||
+}
|
||||
+
|
||||
+template <class _Pointer, class>
|
||||
+struct __to_address_helper {
|
||||
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static decltype(std::__to_address(
|
||||
+ std::declval<const _Pointer&>().operator->()))
|
||||
+ __call(const _Pointer& __p) _NOEXCEPT {
|
||||
+ return std::__to_address(__p.operator->());
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+template <class _Pointer>
|
||||
+struct __to_address_helper<_Pointer,
|
||||
+ decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))> {
|
||||
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static decltype(pointer_traits<_Pointer>::to_address(
|
||||
+ std::declval<const _Pointer&>()))
|
||||
+ __call(const _Pointer& __p) _NOEXCEPT {
|
||||
+ return pointer_traits<_Pointer>::to_address(__p);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+#if _LIBCPP_STD_VER >= 20
|
||||
+template <class _Tp>
|
||||
+inline _LIBCPP_HIDE_FROM_ABI constexpr auto to_address(_Tp* __p) noexcept {
|
||||
+ return std::__to_address(__p);
|
||||
+}
|
||||
+
|
||||
+template <class _Pointer>
|
||||
+inline _LIBCPP_HIDE_FROM_ABI constexpr auto to_address(const _Pointer& __p) noexcept
|
||||
+ -> decltype(std::__to_address(__p)) {
|
||||
+ return std::__to_address(__p);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+_LIBCPP_END_NAMESPACE_STD
|
||||
+
|
||||
+#endif // _LIBCPP___MEMORY_POINTER_TRAITS_H
|
||||
@@ -33,76 +33,49 @@ author: Andres Salomon <dilinger@debian.org>
|
||||
.prefix_list = "/",
|
||||
.sensitive = true,
|
||||
.strict = true};
|
||||
--- a/components/autofill/core/browser/data_model/addresses/autofill_i18n_api.h
|
||||
+++ b/components/autofill/core/browser/data_model/addresses/autofill_i18n_api.h
|
||||
--- a/components/autofill/core/browser/data_model/autofill_i18n_api.h
|
||||
+++ b/components/autofill/core/browser/data_model/autofill_i18n_api.h
|
||||
@@ -16,8 +16,8 @@ namespace autofill::i18n_model_definitio
|
||||
// Country code that represents autofill's legacy address hierarchy model as
|
||||
// stored `kAutofillModelRules`. As a workaround for GCC we declare the
|
||||
// std::string constexpr first.
|
||||
-constexpr inline std::string kLegacyHierarchyCountryCodeString{"XX"};
|
||||
-constexpr AddressCountryCode kLegacyHierarchyCountryCode =
|
||||
+[[clang::no_destroy]] const inline std::string kLegacyHierarchyCountryCodeString{"XX"};
|
||||
+[[clang::no_destroy]] const AddressCountryCode kLegacyHierarchyCountryCode =
|
||||
+const inline std::string kLegacyHierarchyCountryCodeString{"XX"};
|
||||
+const AddressCountryCode kLegacyHierarchyCountryCode =
|
||||
AddressCountryCode(kLegacyHierarchyCountryCodeString);
|
||||
|
||||
// Creates an instance of the address hierarchy model corresponding to the
|
||||
--- a/components/omnibox/browser/on_device_tail_model_service.cc
|
||||
+++ b/components/omnibox/browser/on_device_tail_model_service.cc
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
namespace {
|
||||
@@ -30,7 +30,7 @@ namespace {
|
||||
// The maximum idle time before the model executor is unloaded from memory.
|
||||
constexpr base::TimeDelta kMaxExecutorIdleSeconds = base::Seconds(60);
|
||||
// Constants for TFlite model validation.
|
||||
-constexpr std::string kTestPrefix = "google m";
|
||||
+const std::string kTestPrefix = "google m";
|
||||
-constexpr std::string kTestPrefix = "face";
|
||||
+const std::string kTestPrefix = "face";
|
||||
constexpr std::string_view kModelValidationSwitchName =
|
||||
"omnibox-on-device-tail-model-validation";
|
||||
|
||||
--- a/chrome/browser/ui/lens/lens_overlay_url_builder.cc
|
||||
+++ b/chrome/browser/ui/lens/lens_overlay_url_builder.cc
|
||||
@@ -80,7 +80,7 @@
|
||||
@@ -78,7 +78,7 @@ inline constexpr char kXSRFTokenQueryPar
|
||||
inline constexpr char kSecActQueryParamKey[] = "sec_act";
|
||||
|
||||
// The list of query parameters to ignore when comparing search URLs.
|
||||
-inline constexpr std::string kIgnoredSearchUrlQueryParameters[] = {
|
||||
+inline const std::string kIgnoredSearchUrlQueryParameters[] = {
|
||||
kViewportWidthQueryParamKey, kViewportHeightQueryParamKey,
|
||||
kXSRFTokenQueryParamKey, kSecActQueryParamKey,
|
||||
kModeParameterKey, kToolbeltModeParameterKey};
|
||||
--- a/content/public/test/prefetch_test_util.h
|
||||
+++ b/content/public/test/prefetch_test_util.h
|
||||
kXSRFTokenQueryParamKey, kSecActQueryParamKey};
|
||||
|
||||
--- a/content/browser/preloading/prefetch/prefetch_test_util.h
|
||||
+++ b/content/browser/preloading/prefetch/prefetch_test_util.h
|
||||
@@ -15,7 +15,7 @@ namespace content::test {
|
||||
|
||||
using PrefetchContainerIdForTesting =
|
||||
base::StrongAlias<class PrefetchContainerIdForTestingTag, std::string>;
|
||||
-inline constexpr PrefetchContainerIdForTesting
|
||||
+inline const PrefetchContainerIdForTesting
|
||||
-static constexpr PrefetchContainerIdForTesting
|
||||
+static const PrefetchContainerIdForTesting
|
||||
InvalidPrefetchContainerIdForTesting = PrefetchContainerIdForTesting("");
|
||||
|
||||
class TestPrefetchWatcherImpl;
|
||||
--- a/components/history_embeddings/ml_answerer.cc
|
||||
+++ b/components/history_embeddings/ml_answerer.cc
|
||||
@@ -24,7 +24,7 @@ using optimization_guide::proto::Passage
|
||||
|
||||
namespace {
|
||||
|
||||
-static constexpr std::string kPassageIdToken = "ID";
|
||||
+static const std::string kPassageIdToken = "ID";
|
||||
// Estimated token count of the preamble text in prompt.
|
||||
static constexpr size_t kPreambleTokenBufferSize = 100u;
|
||||
// Estimated token count of overhead text per passage.
|
||||
--- a/components/compose/core/browser/config.cc
|
||||
+++ b/components/compose/core/browser/config.cc
|
||||
@@ -46,11 +46,11 @@
|
||||
}
|
||||
|
||||
constexpr auto DEFAULT_COMPOSE_ENABLED_COUNTRIES =
|
||||
- base::MakeFixedFlatSet<std::string>({"bd", "ca", "gh", "in", "ke", "my",
|
||||
+ base::MakeFixedFlatSet<std::string_view>({"bd", "ca", "gh", "in", "ke", "my",
|
||||
"ng", "ph", "pk", "sg", "tz", "ug",
|
||||
"us", "zm", "zw"});
|
||||
constexpr auto DEFAULT_PROACTIVE_NUDGE_ENABLED_COUNTRIES =
|
||||
- base::MakeFixedFlatSet<std::string>({"us"});
|
||||
+ base::MakeFixedFlatSet<std::string_view>({"us"});
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
44
chromium-127-ninja-1.21.1-deps-part0.patch
Normal file
44
chromium-127-ninja-1.21.1-deps-part0.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
commit 4ca70656fde83d2db6ed5a8ac9ec9e7443846924
|
||||
Author: Lei Zhang <thestig@chromium.org>
|
||||
Date: Wed Jun 26 16:35:34 2024 +0000
|
||||
|
||||
Move chrome/browser/ui:webui_name_variants to public_deps
|
||||
|
||||
The chrome/browser/ui build target contains webui_contents_wrapper.h,
|
||||
which included the generated webui_name_variants.h header. For this to
|
||||
work correctly, the build system must process the webui_name_variants
|
||||
target first and generate webui_name_variants.h. To do this reliably,
|
||||
without having to depend on webui_name_variants in all targets that
|
||||
transitively include webui_contents_wrapper.h, make it a public_deps.
|
||||
|
||||
Bug: 40253918, 346711540, 346699817, 345645751
|
||||
Change-Id: I6e0b573427cda1b2b408702f139b2c9e83f05045
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5646245
|
||||
Reviewed-by: Anthony Vallée-Dubois <anthonyvd@chromium.org>
|
||||
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1319828}
|
||||
|
||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
index 46648a4c2194e..0883714163a31 100644
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -6436,7 +6436,6 @@ static_library("ui") {
|
||||
sources += get_target_outputs(":webui_name_variants")
|
||||
|
||||
deps += [
|
||||
- ":webui_name_variants",
|
||||
"side_search:side_search_tab_data_proto",
|
||||
"//base",
|
||||
"//chrome/browser:main_extra_parts",
|
||||
@@ -6495,7 +6494,10 @@ static_library("ui") {
|
||||
"//ui/lottie",
|
||||
"//ui/views:buildflags",
|
||||
]
|
||||
- public_deps += [ "//ui/base/dragdrop/mojom:mojom_headers" ]
|
||||
+ public_deps += [
|
||||
+ ":webui_name_variants",
|
||||
+ "//ui/base/dragdrop/mojom:mojom_headers",
|
||||
+ ]
|
||||
|
||||
allow_circular_includes_from += [ "//chrome/browser/ui/views" ]
|
||||
|
||||
62
chromium-127-ninja-1.21.1-deps-part1.patch
Normal file
62
chromium-127-ninja-1.21.1-deps-part1.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
commit 50d63ffee3f7f1b1b9303363742ad8ebbfec31fa
|
||||
Author: Lei Zhang <thestig@chromium.org>
|
||||
Date: Wed Jun 26 21:27:51 2024 +0000
|
||||
|
||||
Make more deps entries public_deps in chrome/browser/ui/BUILD.gn
|
||||
|
||||
The chrome/browser/ui build target includes several buildflag headers.
|
||||
For this to work correctly, the build system must be able to generate
|
||||
the buildflag headers first. To do this reliably, without having to
|
||||
depend on buildflag targets in all targets that transitively include the
|
||||
headers that includes buildflag heaers, make these dependencies
|
||||
public_deps.
|
||||
|
||||
For //components/paint_preview/buildflags, remove the deps entry, as it
|
||||
is already in public_deps.
|
||||
|
||||
Bug: 40253918, 346711540, 346699817, 345645751
|
||||
Change-Id: I00e78a430f2e99aa3732406882b352d31e3d7da7
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5647662
|
||||
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
||||
Reviewed-by: Peter Kasting <pkasting@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1320033}
|
||||
|
||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
index bc6a7c03ecd1c..74f92f0431494 100644
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -415,8 +415,10 @@ static_library("ui") {
|
||||
"//chrome/browser/ui/tabs:tab_enums",
|
||||
"//components/cross_device/logging",
|
||||
"//components/dom_distiller/core",
|
||||
+ "//components/enterprise/buildflags",
|
||||
"//components/paint_preview/buildflags",
|
||||
"//components/safe_browsing:buildflags",
|
||||
+ "//components/segmentation_platform/public",
|
||||
"//components/sync",
|
||||
"//components/sync_user_events",
|
||||
"//components/translate/content/browser",
|
||||
@@ -533,7 +535,6 @@ static_library("ui") {
|
||||
"//components/embedder_support:browser_util",
|
||||
"//components/encrypted_messages:encrypted_message_proto",
|
||||
"//components/enterprise",
|
||||
- "//components/enterprise/buildflags:buildflags",
|
||||
"//components/error_page/content/browser",
|
||||
"//components/facilitated_payments/core/features",
|
||||
"//components/favicon/content",
|
||||
@@ -644,7 +645,6 @@ static_library("ui") {
|
||||
"//components/security_interstitials/core:unsafe_resource",
|
||||
"//components/security_state/content",
|
||||
"//components/security_state/core",
|
||||
- "//components/segmentation_platform/public",
|
||||
"//components/send_tab_to_self",
|
||||
"//components/sessions",
|
||||
"//components/signin/core/browser",
|
||||
@@ -2119,7 +2119,6 @@ static_library("ui") {
|
||||
"//components/omnibox/browser:mojo_bindings",
|
||||
"//components/page_load_metrics/browser",
|
||||
"//components/paint_preview/browser",
|
||||
- "//components/paint_preview/buildflags",
|
||||
"//components/paint_preview/common",
|
||||
"//components/paint_preview/public",
|
||||
"//components/password_manager/content/common",
|
||||
37
chromium-127-ninja-1.21.1-deps-part2.patch
Normal file
37
chromium-127-ninja-1.21.1-deps-part2.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
commit 2c101186b60ed50f2ba4feaa2e963bd841bcca47
|
||||
Author: Takuto Ikuta <tikuta@chromium.org>
|
||||
Date: Fri Jun 21 06:23:27 2024 +0000
|
||||
|
||||
chrome/browser: add missing dependency
|
||||
|
||||
This is to fix build error due to missing dependency when we update
|
||||
ninja to 1.12.
|
||||
e.g. https://ci.chromium.org/ui/p/chromium/builders/build/linux-build-perf-no-rbe/1690/overview
|
||||
|
||||
Bug: 346711540, 346699817, 345645751, 40253918
|
||||
Change-Id: Ife0a4e09969a4ad2e61dfc1598c9a63ac0b2abd5
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5641516
|
||||
Reviewed-by: Anthony Vallée-Dubois <anthonyvd@chromium.org>
|
||||
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
|
||||
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1317790}
|
||||
|
||||
diff --git a/chrome/browser/ui/views/side_panel/BUILD.gn b/chrome/browser/ui/views/side_panel/BUILD.gn
|
||||
index 96f2c30a6dd22..2957730277a29 100644
|
||||
--- a/chrome/browser/ui/views/side_panel/BUILD.gn
|
||||
+++ b/chrome/browser/ui/views/side_panel/BUILD.gn
|
||||
@@ -201,5 +201,13 @@ source_set("side_panel") {
|
||||
"//ui/gfx:color_utils",
|
||||
"//ui/gfx/geometry:geometry_skia",
|
||||
"//ui/webui",
|
||||
+
|
||||
+ # TODO(crbug.com/346711540,crbug.com/346699817,crbug.com/345645751):
|
||||
+ # Use //chrome/browser/ui instead after fixing cyclic dependency.
|
||||
+ "//chrome/browser/ui:webui_name_variants",
|
||||
+ "//components/enterprise/buildflags",
|
||||
+ "//components/paint_preview/buildflags",
|
||||
+ "//components/segmentation_platform/public/proto",
|
||||
+ "//components/webapps/common:mojo_bindings",
|
||||
]
|
||||
}
|
||||
49
chromium-127-ninja-1.21.1-deps-part3.patch
Normal file
49
chromium-127-ninja-1.21.1-deps-part3.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
commit f2b43c18b8ecfc3ddc49c42c062d796c8b563984
|
||||
Author: Takuto Ikuta <tikuta@chromium.org>
|
||||
Date: Wed Jul 3 09:00:47 2024 +0000
|
||||
|
||||
chrome/browser/ui: add missing dependency
|
||||
|
||||
This is to fix build error due to missing dependency when we update
|
||||
ninja to 1.12.
|
||||
e.g. https://ci.chromium.org/ui/p/chromium/builders/build.shadow/win-build-perf-developer/1/overview
|
||||
|
||||
Bug: 40253918, 345645751, 346694160, 346709958, 346707816
|
||||
Change-Id: I3ede8e345aef5d6d2d8bf5b155601650828bc817
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5644627
|
||||
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
|
||||
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
|
||||
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1322655}
|
||||
|
||||
diff --git a/chrome/browser/ui/views/side_panel/BUILD.gn b/chrome/browser/ui/views/side_panel/BUILD.gn
|
||||
index 2957730277a29..2680a77d855d5 100644
|
||||
--- a/chrome/browser/ui/views/side_panel/BUILD.gn
|
||||
+++ b/chrome/browser/ui/views/side_panel/BUILD.gn
|
||||
@@ -202,12 +202,24 @@ source_set("side_panel") {
|
||||
"//ui/gfx/geometry:geometry_skia",
|
||||
"//ui/webui",
|
||||
|
||||
- # TODO(crbug.com/346711540,crbug.com/346699817,crbug.com/345645751):
|
||||
+ # TODO(crbug.com/345645751): Use //chrome/browser instead after fixing cyclic dependency.
|
||||
+ "//components/enterprise/common/proto:connectors_proto",
|
||||
+
|
||||
+ # TODO(crbug.com/346711540,crbug.com/346699817,crbug.com/345645751,
|
||||
+ # crbug.com/346694160,crbug.com/346709958,crbug.com/346707816):
|
||||
# Use //chrome/browser/ui instead after fixing cyclic dependency.
|
||||
+ "//chrome/browser/cart:mojo_bindings",
|
||||
+ "//chrome/browser/companion/visual_query",
|
||||
"//chrome/browser/ui:webui_name_variants",
|
||||
+ "//chrome/browser/ui/webui/side_panel/bookmarks:mojo_bindings",
|
||||
+ "//chrome/browser/ui/webui/side_panel/customize_chrome:mojo_bindings",
|
||||
+ "//chrome/browser/ui/webui/side_panel/reading_list:mojo_bindings",
|
||||
"//components/enterprise/buildflags",
|
||||
+ "//components/page_image_service/mojom:mojo_bindings",
|
||||
"//components/paint_preview/buildflags",
|
||||
"//components/segmentation_platform/public/proto",
|
||||
+ "//components/user_education/webui",
|
||||
"//components/webapps/common:mojo_bindings",
|
||||
+ "//ui/webui/resources/cr_components/commerce:mojo_bindings",
|
||||
]
|
||||
}
|
||||
26
chromium-127-paint-layer-header.patch
Normal file
26
chromium-127-paint-layer-header.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
commit 5b37e76c6f3ac85117eb4f25afdcaa4559042ae3
|
||||
Author: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Tue Jun 11 10:49:24 2024 +0000
|
||||
|
||||
IWYU: missing include for usage of std::optional in paint_layer_resource_info.h
|
||||
|
||||
Bug: 41455655
|
||||
Change-Id: Ic82a1d03623f2ad892571c63eabff49ad1fe3644
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5616451
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1313284}
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/paint/paint_layer_resource_info.h b/third_party/blink/renderer/core/paint/paint_layer_resource_info.h
|
||||
index c8fa2190078c4..a241b7f64d2fe 100644
|
||||
--- a/third_party/blink/renderer/core/paint/paint_layer_resource_info.h
|
||||
+++ b/third_party/blink/renderer/core/paint/paint_layer_resource_info.h
|
||||
@@ -30,6 +30,8 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_PAINT_LAYER_RESOURCE_INFO_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_PAINT_LAYER_RESOURCE_INFO_H_
|
||||
|
||||
+#include <optional>
|
||||
+
|
||||
#include "third_party/blink/renderer/core/svg/svg_resource_client.h"
|
||||
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
#include "third_party/blink/renderer/platform/heap/member.h"
|
||||
@@ -10,33 +10,7 @@ diff -up chromium-127.0.6533.72/build/rust/rust_bindgen.gni.me chromium-127.0.65
|
||||
}
|
||||
|
||||
# Template to build Rust/C bindings with bindgen.
|
||||
@@ -105,6 +105,14 @@
|
||||
# it's declared.
|
||||
deps = [ ":${_rust_bindgen_generator_name}_static_fns" ]
|
||||
}
|
||||
+
|
||||
+ # Default configs include "-fvisibility=hidden", and for some reason this
|
||||
+ # causes bindgen not to emit function bindings. Override it.
|
||||
+ args = []
|
||||
+ if (!is_win) {
|
||||
+ args += [ "-fvisibility=default" ]
|
||||
+ }
|
||||
+
|
||||
if (defined(cpp) && cpp) {
|
||||
# This cfg is used to control the bindings public export.
|
||||
rustflags = [
|
||||
--- chromium-132.0.6811.2/build/rust/rust_bindgen_generator.gni 2024/11/07 11:34:54 1.1
|
||||
+++ chromium-132.0.6811.2/build/rust/rust_bindgen_generator.gni 2024/11/07 11:35:41
|
||||
@@ -22,7 +22,7 @@
|
||||
if (host_os == "win") {
|
||||
_libclang_path += "/bin"
|
||||
} else {
|
||||
- _libclang_path += "/lib"
|
||||
+ _libclang_path += "/lib64"
|
||||
}
|
||||
|
||||
# Template to build Rust/C bindings with bindgen.
|
||||
@@ -266,6 +266,8 @@
|
||||
@@ -195,6 +195,8 @@
|
||||
# causes bindgen not to emit function bindings. Override it.
|
||||
if (!is_win) {
|
||||
args += [ "-fvisibility=default" ]
|
||||
@@ -45,13 +19,4 @@ diff -up chromium-127.0.6533.72/build/rust/rust_bindgen.gni.me chromium-127.0.65
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
--- chromium-132.0.6811.2/build/config/gcc/BUILD.gn 2024/11/07 14:13:22 1.1
|
||||
+++ chromium-132.0.6811.2/build/config/gcc/BUILD.gn 2024/11/07 14:13:45
|
||||
@@ -32,7 +32,6 @@
|
||||
# See http://gcc.gnu.org/wiki/Visibility
|
||||
config("symbol_visibility_hidden") {
|
||||
cflags = [ "-fvisibility=hidden" ]
|
||||
- rustflags = [ "-Zdefault-visibility=hidden" ]
|
||||
|
||||
# Visibility attribute is not supported on AIX.
|
||||
if (current_os != "aix") {
|
||||
|
||||
|
||||
3
chromium-127.0.6533.119.tar.xz
Normal file
3
chromium-127.0.6533.119.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:acc9e3f9fd2d180b8831865a1ac4f5cdd9ffe6211f47f467296d9ee1be2a577e
|
||||
size 6621220264
|
||||
@@ -1,3 +1,86 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 15 15:35:42 CEST 2024 - ro@suse.de
|
||||
|
||||
- Chromium 127.0.6533.119
|
||||
* CVE-2024-7532: Out of bounds memory access in ANGLE
|
||||
* CVE-2024-7533: Use after free in Sharing
|
||||
* CVE-2024-7550: Type Confusion in V8
|
||||
* CVE-2024-7534: Heap buffer overflow in Layout
|
||||
* CVE-2024-7535: Inappropriate implementation in V8
|
||||
* CVE-2024-7536: Use after free in WebAudio
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 1 18:40:59 CEST 2024 - ro@suse.de
|
||||
|
||||
- Chromium 127.0.6533.88
|
||||
* CVE-2024-6988: Use after free in Downloads
|
||||
* CVE-2024-6989: Use after free in Loader
|
||||
* CVE-2024-6991: Use after free in Dawn
|
||||
* CVE-2024-6992: Out of bounds memory access in ANGLE
|
||||
* CVE-2024-6993: Inappropriate implementation in Canvas
|
||||
* CVE-2024-6994: Heap buffer overflow in Layout
|
||||
* CVE-2024-6995: Inappropriate implementation in Fullscreen
|
||||
* CVE-2024-6996: Race in Frames
|
||||
* CVE-2024-6997: Use after free in Tabs
|
||||
* CVE-2024-6998: Use after free in User Education
|
||||
* CVE-2024-6999: Inappropriate implementation in FedCM
|
||||
* CVE-2024-7000: Use after free in CSS. Reported by Anonymous
|
||||
* CVE-2024-7001: Inappropriate implementation in HTML
|
||||
* CVE-2024-7003: Inappropriate implementation in FedCM
|
||||
* CVE-2024-7004: Insufficient validation of untrusted input
|
||||
in Safe Browsing
|
||||
* CVE-2024-7005: Insufficient validation of untrusted input
|
||||
in Safe Browsing
|
||||
* CVE-2024-6990: Uninitialized Use in Dawn
|
||||
* CVE-2024-7255: Out of bounds read in WebTransport
|
||||
* CVE-2024-7256: Insufficient data validation in Dawn
|
||||
- drop patches:
|
||||
* chromium-115-compiler-SkColor4f.patch only for llvm < 16
|
||||
* chromium-117-system-zstd.patch upstreamed
|
||||
* chromium-122-workaround_clang_bug-structured_binding.patch
|
||||
* chromium-125-tabstrip-include.patch upstreamed
|
||||
* chromium-126-missing-header-files.patch
|
||||
* chromium-126-RealTimeReportingBindings-missing-decl.patch
|
||||
upstreamed
|
||||
* chromium-126-no_matching_constructor.patch
|
||||
* chromium-126-no-format.patch upstreamed
|
||||
- switch from libstdc++ to libc++
|
||||
- drop patches obsolete when using libc++
|
||||
* chromium-126-debian-bad-font-gc00000.patch
|
||||
* chromium-126-debian-bad-font-gc2.patch
|
||||
* chromium-126-debian-bad-font-gc1.patch
|
||||
* chromium-126-debian-bad-font-gc00.patch
|
||||
* chromium-126-debian-bad-font-gc000.patch
|
||||
* chromium-126-debian-bad-font-gc11.patch
|
||||
* chromium-126-debian-bad-font-gc0.patch
|
||||
* chromium-126-debian-bad-font-gc0000.patch
|
||||
* chromium-126-debian-bad-font-gc3.patch
|
||||
- modify patches:
|
||||
* chromium-125-lp155-typename.patch
|
||||
- drop hunk in model_execution_util.h
|
||||
- drop hunk in model_quality_log_entry.h
|
||||
- dropping from keeplibs: (does not exist)
|
||||
base/third_party/valgrind
|
||||
third_party/maldoca
|
||||
third_party/maldoca/src/third_party
|
||||
- requires updated gn to build (newer than Feb 14 2024)
|
||||
- add patches:
|
||||
* chromium-127-bindgen.patch (from debian/patches/fixes))
|
||||
* chromium-127-rust-clanglib.patch (just first hunk from fedora)
|
||||
* chromium-127-clang17-traitors.patch
|
||||
workaround for clang < 18 from debiana (only used on 15.6)
|
||||
* chromium-127-constexpr.patch (from debian/patches/bookworm)
|
||||
* chromium-127-paint-layer-header.patch (from debian/patches/upstream)
|
||||
* chromium-127-ninja-1.21.1-deps-part0.patch (from fedora)
|
||||
* chromium-127-ninja-1.21.1-deps-part1.patch (from fedora)
|
||||
* chromium-127-ninja-1.21.1-deps-part2.patch (from fedora)
|
||||
* chromium-127-ninja-1.21.1-deps-part3.patch (from fedora)
|
||||
- buildrequire rust-bindgen to get proper binaries per arch
|
||||
- use qt5 for factory as well, qt6 fails with:
|
||||
ld.lld: error: undefined symbol: QByteArray::toStdString() const
|
||||
referenced by qt_shim.cc
|
||||
obj/ui/qt/qt6_shim/libqt6_shim.so.lto.qt_shim.o:(qt::QtShim::GetFontDescription() const)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 17 16:11:41 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
|
||||
@@ -38,9 +38,12 @@
|
||||
%bcond_without system_harfbuzz
|
||||
%bcond_without system_freetype
|
||||
%bcond_without arm_bti
|
||||
%bcond_without system_icu
|
||||
# ERROR Unresolved dependencies.
|
||||
# //chrome/browser/ui/lens:unit_tests(//build/toolchain/linux/unbundle:default)
|
||||
# needs //third_party/icu:icuuc_public(//build/toolchain/linux/unbundle:default)
|
||||
#bcond_without system_icu
|
||||
%bcond_without ffmpeg_51
|
||||
%bcond_without qt6
|
||||
%bcond_with qt6
|
||||
%else
|
||||
%bcond_with system_harfbuzz
|
||||
%bcond_with system_freetype
|
||||
@@ -65,6 +68,8 @@
|
||||
%bcond_with system_avif
|
||||
# Compiler
|
||||
%bcond_without clang
|
||||
# libstdc++ or libc++
|
||||
%bcond_with libstdcpp
|
||||
# Chromium built with GCC 11 and LTO enabled crashes (boo#1194055)
|
||||
%bcond_without lto
|
||||
%bcond_without pipewire
|
||||
@@ -91,7 +96,7 @@
|
||||
%define n_suffix %{nil}
|
||||
%endif
|
||||
Name: chromium%{n_suffix}
|
||||
Version: 126.0.6478.182
|
||||
Version: 127.0.6533.119
|
||||
Release: 0
|
||||
Summary: Google's open source browser project
|
||||
License: BSD-3-Clause AND LGPL-2.1-or-later
|
||||
@@ -131,9 +136,7 @@ Patch98: chromium-102-regex_pattern-array.patch
|
||||
Patch202: chromium-prop-codecs.patch
|
||||
Patch203: chromium-106-ffmpeg-duration.patch
|
||||
Patch205: chromium-disable-GlobalMediaControlsCastStartStop.patch
|
||||
Patch224: chromium-115-compiler-SkColor4f.patch
|
||||
Patch240: chromium-117-string-convert.patch
|
||||
Patch244: chromium-117-system-zstd.patch
|
||||
Patch248: chromium-119-assert.patch
|
||||
Patch250: chromium-120-emplace.patch
|
||||
Patch254: chromium-125-emplace-struct.patch
|
||||
@@ -142,22 +145,19 @@ Patch258: chromium-121-nullptr_t-without-namespace-std.patch
|
||||
Patch261: chromium-121-rust-clang_lib.patch
|
||||
Patch311: chromium-125-disable-FFmpegAllowLists.patch
|
||||
Patch322: chromium-125-lp155-typename.patch
|
||||
Patch324: chromium-122-workaround_clang_bug-structured_binding.patch
|
||||
Patch326: chromium-123-stats-collector.patch
|
||||
Patch336: chromium-124-system-libxml.patch
|
||||
Patch337: chromium-123-missing-QtGui.patch
|
||||
Patch346: chromium-125-tabstrip-include.patch
|
||||
Patch350: chromium-125-debian-bad-font-gc0000.patch
|
||||
Patch351: chromium-125-debian-bad-font-gc000.patch
|
||||
Patch352: chromium-125-debian-bad-font-gc00.patch
|
||||
Patch353: chromium-125-debian-bad-font-gc0.patch
|
||||
Patch354: chromium-125-debian-bad-font-gc11.patch
|
||||
Patch355: chromium-125-debian-bad-font-gc1.patch
|
||||
Patch358: chromium-126-missing-header-files.patch
|
||||
Patch359: chromium-126-quiche-interator.patch
|
||||
Patch360: chromium-126-RealTimeReportingBindings-missing-decl.patch
|
||||
Patch361: chromium-126-no_matching_constructor.patch
|
||||
Patch362: chromium-126-no-format.patch
|
||||
Patch360: chromium-127-bindgen.patch
|
||||
Patch361: chromium-127-rust-clanglib.patch
|
||||
Patch362: chromium-127-clang17-traitors.patch
|
||||
Patch363: chromium-127-constexpr.patch
|
||||
Patch365: chromium-127-paint-layer-header.patch
|
||||
Patch366: chromium-127-ninja-1.21.1-deps-part0.patch
|
||||
Patch367: chromium-127-ninja-1.21.1-deps-part1.patch
|
||||
Patch368: chromium-127-ninja-1.21.1-deps-part2.patch
|
||||
Patch369: chromium-127-ninja-1.21.1-deps-part3.patch
|
||||
BuildRequires: SDL-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: cups-devel
|
||||
@@ -281,6 +281,7 @@ BuildRequires: pkgconfig(xtst)
|
||||
BuildRequires: cargo
|
||||
BuildRequires: rust >= 1.47
|
||||
# END add rust BR
|
||||
BuildRequires: rust-bindgen
|
||||
Requires: xdg-utils
|
||||
Requires(pre): permissions
|
||||
Recommends: noto-coloremoji-fonts
|
||||
@@ -362,13 +363,23 @@ BuildRequires: pkgconfig(libzstd) >= 1.5.5
|
||||
%if 0%{?suse_version} < 1570
|
||||
BuildRequires: clang%{llvm_version}
|
||||
BuildRequires: gcc%{gcc_version}
|
||||
%if %{with libstdcpp}
|
||||
BuildRequires: libstdc++6-devel-gcc%{gcc_version}
|
||||
%else
|
||||
BuildRequires: clang%{llvm_version}-devel
|
||||
#BuildRequires: libc++-devel
|
||||
BuildRequires: libc++.so >= %{llvm_version}
|
||||
%endif
|
||||
BuildRequires: lld%{llvm_version}
|
||||
BuildRequires: llvm%{llvm_version}
|
||||
#!BuildIgnore: gcc
|
||||
%else
|
||||
BuildRequires: clang
|
||||
%if %{with libstdcpp}
|
||||
BuildRequires: libstdc++-devel
|
||||
%else
|
||||
BuildRequires: libc++-devel
|
||||
%endif
|
||||
BuildRequires: lld
|
||||
BuildRequires: llvm
|
||||
%endif
|
||||
@@ -383,6 +394,7 @@ BuildRequires: gcc%{gcc_version}
|
||||
BuildRequires: gcc%{gcc_version}-c++
|
||||
%endif
|
||||
%endif
|
||||
#!BuildIgnore: rpmlint rpmlint-Factory rpmlint-mini
|
||||
|
||||
%description
|
||||
Chromium is the open-source project behind Google Chrome. We invite you to join us in our effort to help build a safer, faster, and more stable way for all Internet users to experience the web, and to create a powerful platform for developing a new generation of web applications.
|
||||
@@ -412,6 +424,13 @@ patch -R -p1 < %{SOURCE4}
|
||||
%if %{with libxml2_2_12}
|
||||
patch -R -p1 < %{PATCH336}
|
||||
%endif
|
||||
# apply only on 15.5 and 15.6, revert for the others
|
||||
%if 0%{?sle_version} != 150600 && 0%{?sle_version} != 150500
|
||||
# chromium-106-ffmpeg-duration.patch not needed in factory/tw
|
||||
patch -R -p1 < %{PATCH203}
|
||||
# chromium-127-clang17-traitors.patch only needed for older clang
|
||||
patch -R -p1 < %{PATCH362}
|
||||
%endif
|
||||
|
||||
%build
|
||||
# esbuild
|
||||
@@ -428,6 +447,7 @@ popd
|
||||
|
||||
# Fix the path to nodejs binary
|
||||
mkdir -p third_party/node/linux/node-linux-x64/bin
|
||||
rm -f third_party/node/linux/node-linux-x64/bin/node
|
||||
ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node
|
||||
|
||||
rm buildtools/third_party/eu-strip/bin/eu-strip
|
||||
@@ -465,7 +485,6 @@ keeplibs=(
|
||||
base/third_party/nspr
|
||||
base/third_party/superfasthash
|
||||
base/third_party/symbolize
|
||||
base/third_party/valgrind
|
||||
base/third_party/xdg_user_dirs
|
||||
buildtools/third_party/eu-strip
|
||||
buildtools/third_party/libc++
|
||||
@@ -478,6 +497,13 @@ keeplibs=(
|
||||
net/third_party/quic
|
||||
net/third_party/uri_template
|
||||
third_party/abseil-cpp
|
||||
third_party/abseil-cpp/absl
|
||||
third_party/abseil-cpp/absl/algorithm
|
||||
third_party/abseil-cpp/absl/base
|
||||
third_party/abseil-cpp/absl/flags
|
||||
third_party/abseil-cpp/absl/functional
|
||||
third_party/abseil-cpp/absl/strings
|
||||
third_party/abseil-cpp/absl/types
|
||||
third_party/angle
|
||||
third_party/angle/src/common/third_party/xxhash
|
||||
third_party/angle/src/third_party/ceval
|
||||
@@ -516,6 +542,7 @@ keeplibs=(
|
||||
third_party/crashpad
|
||||
third_party/crashpad/crashpad/third_party/lss
|
||||
third_party/crashpad/crashpad/third_party/zlib
|
||||
third_party/crabbyavif
|
||||
third_party/crc32c
|
||||
third_party/cros_system_api
|
||||
third_party/d3
|
||||
@@ -593,8 +620,6 @@ keeplibs=(
|
||||
third_party/lss
|
||||
third_party/lzma_sdk
|
||||
third_party/mako
|
||||
third_party/maldoca
|
||||
third_party/maldoca/src/third_party
|
||||
third_party/markupsafe
|
||||
third_party/material_color_utilities
|
||||
third_party/mesa
|
||||
@@ -618,6 +643,7 @@ keeplibs=(
|
||||
third_party/pdfium/third_party/libtiff
|
||||
third_party/perfetto
|
||||
third_party/perfetto/protos/third_party/chromium
|
||||
third_party/perfetto/protos/third_party/simpleperf
|
||||
third_party/pffft
|
||||
third_party/ply
|
||||
third_party/polymer
|
||||
@@ -643,6 +669,8 @@ keeplibs=(
|
||||
third_party/skia/include/third_party/vulkan/
|
||||
third_party/skia/third_party/vulkan
|
||||
third_party/smhasher
|
||||
third_party/spirv-headers
|
||||
third_party/spirv-tools
|
||||
third_party/sqlite
|
||||
third_party/swiftshader
|
||||
third_party/swiftshader/third_party/astc-encoder
|
||||
@@ -673,6 +701,7 @@ keeplibs=(
|
||||
third_party/webrtc/modules/third_party/g722
|
||||
third_party/webrtc/rtc_base/third_party/base64
|
||||
third_party/webrtc/rtc_base/third_party/sigslot
|
||||
third_party/webrtc/rtc_tools
|
||||
third_party/widevine
|
||||
third_party/woff2
|
||||
third_party/wuffs
|
||||
@@ -738,6 +767,10 @@ keeplibs+=( third_party/zstd )
|
||||
keeplibs+=( third_party/lit )
|
||||
keeplibs+=( third_party/rust/chromium_crates_io )
|
||||
keeplibs+=( third_party/rust/cxx )
|
||||
|
||||
%if %{without libstdcpp}
|
||||
keeplibs+=( third_party/snappy )
|
||||
%endif
|
||||
build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove
|
||||
|
||||
# GN sets lto on its own and we need just ldflag options, not cflags
|
||||
@@ -783,6 +816,11 @@ export CXXFLAGS="${CXXFLAGS} -I/usr/include/wayland -I/usr/include/libxkbcommon
|
||||
export LDFLAGS="${LDFLAGS} -Wl,--build-id=sha1"
|
||||
export CXXFLAGS="${CXXFLAGS} -Wno-unused-command-line-argument -Wno-unknown-warning-option"
|
||||
%endif
|
||||
%if %{without libstdcpp}
|
||||
export LDFLAGS="${LDFLAGS} -stdlib=libc++"
|
||||
export CXXFLAGS="${CXXFLAGS} -stdlib=libc++ -I/usr/include/c++/v1"
|
||||
%endif
|
||||
|
||||
%ifarch aarch64
|
||||
%if %{without clang}
|
||||
export CXXFLAGS="${CXXFLAGS} -flax-vector-conversions -fno-omit-frame-pointer"
|
||||
@@ -829,8 +867,12 @@ gn_system_libraries=(
|
||||
libxml
|
||||
libxslt
|
||||
opus
|
||||
)
|
||||
%if %{with libstdcpp}
|
||||
gn_system_libraries+=(
|
||||
snappy
|
||||
)
|
||||
%endif
|
||||
%if %{with system_harfbuzz}
|
||||
gn_system_libraries+=(
|
||||
harfbuzz-ng
|
||||
@@ -915,6 +957,7 @@ myconf_gn+=" rtc_use_h264=false"
|
||||
myconf_gn+=" use_v8_context_snapshot=true"
|
||||
myconf_gn+=" v8_use_external_startup_data=true"
|
||||
myconf_gn+=" rust_sysroot_absolute=\"%{_prefix}\""
|
||||
myconf_gn+=" rust_bindgen_root=\"%{_prefix}\""
|
||||
myconf_gn+=" rustc_version=\"$rustc_version\""
|
||||
myconf_gn+=" clang_base_path=\"$clang_base_path\""
|
||||
myconf_gn+=" clang_version=\"$clang_version\""
|
||||
|
||||
Reference in New Issue
Block a user