Compare commits
383 Commits
Author | SHA256 | Date | |
---|---|---|---|
803927fd7e | |||
21fbf325a3 | |||
758de39aea | |||
5765681808 | |||
79679f2fbb | |||
5be0f9e35b | |||
f9c189847a | |||
2745d52c99 | |||
ba3164c8d0 | |||
129bd48c75 | |||
548e8271ab | |||
1984683d0d | |||
bf60c1d946 | |||
91145a4481 | |||
73230888f5 | |||
94acae6908 | |||
50e8fd7f3b | |||
0d91dac45f | |||
931ac75573 | |||
458cdabcf4 | |||
69cee08715 | |||
ea2eedcf83 | |||
c5d79bee92 | |||
dda2df6317 | |||
a286c5952f | |||
4ee39d9a79 | |||
d7c173aa77 | |||
a64c9dccb1 | |||
5b1a8bff84 | |||
afba4501f7 | |||
a21a1d5e35 | |||
6f63c0c7a8 | |||
0787ba5819 | |||
3dec7518f7 | |||
427a7ecf09 | |||
556fe0315b | |||
b9aacd37d0 | |||
3a7275536e | |||
8078bc9f30 | |||
ef514a274b | |||
bccb2862ff | |||
ec5c89c800 | |||
f686ef214c | |||
28b2a84276 | |||
714ee0c2c3 | |||
9dd5c001df | |||
45415355cd | |||
afa046e091 | |||
9bfe301528 | |||
6af2fa5dd7 | |||
66f3d96e7c | |||
5c76ed5673 | |||
eb6dac6692 | |||
3b8ebff83d | |||
87f6a13a0f | |||
eb24077881 | |||
560de9fbdb | |||
e54ecfcc6e | |||
5d49f4bb5d | |||
05376051f9 | |||
03f55644ac | |||
3a639489c9 | |||
549434a4a4 | |||
018e517651 | |||
1ca327f854 | |||
8bf1b849b9 | |||
cce6e8874f | |||
b30830e0d9 | |||
4a149839f2 | |||
85817b21f0 | |||
9b9610448b | |||
af67ce2f09 | |||
86384ec4da | |||
9a1f6d7223 | |||
0c53dad61e | |||
bbed01e29d | |||
7f454e27db | |||
d85174bd2b | |||
b8e615560c | |||
59940d3268 | |||
2a47134200 | |||
0ace04eabb | |||
77ddcdc72b | |||
3892c1cab0 | |||
f133d522b8 | |||
641041af0c | |||
9e69378e9a | |||
0f89da960d | |||
2713ef1712 | |||
ec5006ea2e | |||
260ba0122d | |||
f6dde4469c | |||
e8dda073d6 | |||
85d8cae8fd | |||
fff53f3c2e | |||
9dda8dd120 | |||
d74ae9ab23 | |||
805ede6b84 | |||
26d96f1da7 | |||
b817b0df97 | |||
4c06b33c6b | |||
754f344fe0 | |||
a03e893c19 | |||
26d8b6ddb5 | |||
29251bbf34 | |||
73c6162442 | |||
94ec34be6b | |||
e95bf3c296 | |||
d83e41ea5c | |||
8fdf2bc55f | |||
8a7b712932 | |||
9d30973976 | |||
669e2448d0 | |||
b798aa04c9 | |||
c2c18aa4ea | |||
042a08719d | |||
82c926a786 | |||
ef5e272069 | |||
1a1f18fcee | |||
d2030dc315 | |||
406ba87a0f | |||
b751b12230 | |||
80bce23334 | |||
e635b1b78b | |||
542e43e0b8 | |||
75c9f1de89 | |||
aea5648173 | |||
cfa7ba0c34 | |||
1445e658ba | |||
be629b734d | |||
eb3b37261d | |||
70f067cacc | |||
2a429b3ee5 | |||
026fa6c008 | |||
5b61c80cd8 | |||
91bf85bb5c | |||
2440798081 | |||
65af71ce49 | |||
e8bc9d9f1b | |||
745a3d0d67 | |||
aacdf47b74 | |||
ee8e43b84d | |||
8109463bcc | |||
813e001eb6 | |||
29e8310f36 | |||
c1d2f1fc97 | |||
790e0d969d | |||
a86f6d501c | |||
bc83f3c133 | |||
7566a988dc | |||
13a7d58d32 | |||
e2f510b254 | |||
efd16e3d7c | |||
108b012e87 | |||
73e2d507c4 | |||
1ef9755d4e | |||
3849245283 | |||
3948c045e7 | |||
680ed95ecc | |||
d2352147a4 | |||
dccc537bdf | |||
49b83f55af | |||
eccff4a6fb | |||
7572262433 | |||
22f147201a | |||
c8d2bd2b98 | |||
eb54f04ac4 | |||
1115f8ef5b | |||
32e191bbca | |||
7a6c2ab836 | |||
42e6345ca8 | |||
a1e40c1b19 | |||
09f0b10444 | |||
95dd27cb71 | |||
daacca7243 | |||
3500c44eab | |||
90dc965674 | |||
65bda7d06e | |||
5f0c39625e | |||
4bb9075f6e | |||
b9226c4203 | |||
c5be2e53a3 | |||
9ba5597e83 | |||
81623b9fe4 | |||
70eadb9337 | |||
fd457c8222 | |||
5b6cc34f72 | |||
e0033247b8 | |||
12ee6c9f4b | |||
7edd73f22b | |||
3ab58995f0 | |||
c55d82c229 | |||
7aa978b464 | |||
c8db8b05cd | |||
b8de22e7d6 | |||
7d2ea15c69 | |||
3a09d484f7 | |||
7bfa69403a | |||
2c263b12ca | |||
1933231e97 | |||
267719b9ea | |||
5481d9819d | |||
cef1ee1e83 | |||
2a74265430 | |||
b74799856e | |||
755f0b9d0c | |||
fd9e2b5519 | |||
efb4960e0f | |||
3a6c804cdb | |||
e2678d3698 | |||
89a5337a99 | |||
ebe5ceaa3c | |||
186e1cbc0d | |||
f7afbac4ea | |||
ae7d830a89 | |||
4553380709 | |||
afe3489454 | |||
b3a99a75c7 | |||
4f8915679b | |||
46ead24b74 | |||
7b259750d2 | |||
df11a7ab2b | |||
225eb7cb74 | |||
0c2baa41b0 | |||
ad7c1f6ef8 | |||
0d8fe13690 | |||
feb0b011a6 | |||
3e923870ec | |||
c69a421668 | |||
37300b8b33 | |||
87b6cc8a4e | |||
4c5373e958 | |||
87e3ce1f0a | |||
c3cb083fac | |||
4e42e601e4 | |||
1f9dd53ca1 | |||
6f65188611 | |||
ba3df18479 | |||
c993a8a9c5 | |||
927e8f5953 | |||
a41f549df1 | |||
fa2f53afee | |||
e0e5abe1a7 | |||
7c283382da | |||
f0080a89d4 | |||
1096bbe706 | |||
0c99c13e61 | |||
67c50d89c5 | |||
c07c336240 | |||
7ea953712c | |||
83b865b88d | |||
54e7d0e8ce | |||
597027e7ca | |||
64170b0340 | |||
c49ea03c29 | |||
4005129651 | |||
c3b29f18a0 | |||
30c1f7518c | |||
c0c29ae089 | |||
efd35844fa | |||
820e507eaf | |||
e988b8f6a1 | |||
82bc3670f8 | |||
8dbe484b4b | |||
a9279f958b | |||
2b00d0feee | |||
f542cb4c47 | |||
9de9c110ff | |||
9c8e9fa36d | |||
23d036eca0 | |||
21f03c114f | |||
05c15db0db | |||
14942f1fd5 | |||
9eacfcb3e1 | |||
2a16fb7732 | |||
323add7636 | |||
ac21aa6231 | |||
f023bdd117 | |||
7f10e9ee96 | |||
0b61227024 | |||
27bbbd6d17 | |||
5816b4bacb | |||
17808cfb12 | |||
146c428ae0 | |||
1f3d84ef44 | |||
ed31429226 | |||
29abc82366 | |||
fba193030d | |||
83e3511436 | |||
a2ce5a1df1 | |||
64efbefb2c | |||
d9c4e81c5d | |||
56f0973865 | |||
1587d3bd0b | |||
3472ce9a18 | |||
bf88c724a1 | |||
ec046abfc3 | |||
393091b152 | |||
f14840cd6d | |||
7beda6c89c | |||
a511e89fff | |||
8dd9ce1537 | |||
136f8f9049 | |||
24a159f305 | |||
7c0d60fca1 | |||
02197119a7 | |||
d43d7ad921 | |||
a53de4fa08 | |||
e5ff004c6f | |||
6040cde70f | |||
afb8eb7cf7 | |||
f44dd6395d | |||
728e94feac | |||
1d849e57e6 | |||
51e10085b9 | |||
bc592fb532 | |||
bca00a8259 | |||
20c23b1b0e | |||
f72727c85e | |||
52df3eda55 | |||
b9fd1ba996 | |||
dbace1a89c | |||
08717d1bdc | |||
4d8761af4a | |||
f0f4ef8928 | |||
f9b667973e | |||
97cbe94070 | |||
4530eb8513 | |||
450e1b36b3 | |||
d0b66d92f1 | |||
7ff6c5973f | |||
4ac813e451 | |||
e44b0c7f29 | |||
3c6d26d688 | |||
b135887a5a | |||
d9dba2628c | |||
cc51990a5c | |||
12238d66dd | |||
6209b7ee56 | |||
0e00e8b94d | |||
19d45e1790 | |||
8565b90830 | |||
95d088d38f | |||
36fa6f0eaa | |||
8de0d2bd2a | |||
79fd34cb6c | |||
4d85197ca1 | |||
dd0c5d2145 | |||
a4f643f70c | |||
7bbec93be9 | |||
41790d0878 | |||
e083359149 | |||
6ff303675b | |||
d493b30806 | |||
71a8f1327e | |||
a662e74942 | |||
d1d531363b | |||
ab40df849c | |||
ed7f82d7da | |||
611d4b7c2f | |||
2e628127f2 | |||
55ec2537d0 | |||
63bd25a51d | |||
612fa607f8 | |||
6cccd06c3d | |||
921966cbcc | |||
714881bdba | |||
49ed28a0a7 | |||
d94dec1e89 | |||
21be061193 | |||
3c314764c1 | |||
06b9e5cfc5 | |||
37985423c5 | |||
d51b5b9a83 | |||
fd50b8872c | |||
a75aa8b925 | |||
69fef88324 | |||
f1c9037323 | |||
|
8456acadf2 | ||
5a2caf8e59 | |||
f43046211b | |||
14acc2eb19 | |||
4a7868ca52 |
229
ANNOTATE_CONTIGUOUS_CONTAINER-Wodr.patch
Normal file
229
ANNOTATE_CONTIGUOUS_CONTAINER-Wodr.patch
Normal file
@@ -0,0 +1,229 @@
|
||||
This collides with an abseil macro causing ODR miscompiles
|
||||
|
||||
diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/heap/collection_support/heap_vector_backing.h src/third_party/blink/renderer/platform/heap/collection_support/heap_vector_backing.h
|
||||
--- src.old/third_party/blink/renderer/platform/heap/collection_support/heap_vector_backing.h 2025-08-15 17:32:29.517405064 +0200
|
||||
+++ src/third_party/blink/renderer/platform/heap/collection_support/heap_vector_backing.h 2025-08-17 14:47:13.834152160 +0200
|
||||
@@ -100,9 +100,9 @@ HeapVectorBacking<T, Traits>::~HeapVecto
|
||||
const size_t length = object_size / sizeof(T);
|
||||
using ByteBuffer = uint8_t*;
|
||||
ByteBuffer payload = reinterpret_cast<ByteBuffer>(this);
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
ANNOTATE_CHANGE_SIZE(payload, length * sizeof(T), 0, length * sizeof(T));
|
||||
-#endif // ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#endif // WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
// HeapVectorBacking calls finalizers for unused slots and expects them to be
|
||||
// no-ops.
|
||||
if (std::is_polymorphic<T>::value) {
|
||||
@@ -176,11 +176,11 @@ struct TraceInCollectionTrait<kNoWeakHan
|
||||
cppgc::subtle::ObjectSizeTrait<const Backing>::GetSize(
|
||||
*reinterpret_cast<const Backing*>(self)) /
|
||||
sizeof(T);
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
// As commented above, HeapVectorBacking can trace unused slots (which are
|
||||
// already zeroed out).
|
||||
ANNOTATE_CHANGE_SIZE(array, length, 0, length);
|
||||
-#endif // ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#endif // WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
if constexpr (IsTraceable<T>::value) {
|
||||
for (unsigned i = 0; i < length; ++i) {
|
||||
if (!std::is_polymorphic_v<T> ||
|
||||
diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/heap/test/heap_test.cc src/third_party/blink/renderer/platform/heap/test/heap_test.cc
|
||||
--- src.old/third_party/blink/renderer/platform/heap/test/heap_test.cc 2025-08-15 17:32:29.517405064 +0200
|
||||
+++ src/third_party/blink/renderer/platform/heap/test/heap_test.cc 2025-08-17 14:47:13.834152160 +0200
|
||||
@@ -854,7 +854,7 @@ TEST_F(HeapTest, HeapVectorShrinkInlineC
|
||||
// Vector inline buffers are disabled; that constraint should be attempted
|
||||
// removed, but until that time, disable testing handling of capacities
|
||||
// of inline buffers.
|
||||
-#if !defined(ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
+#if !defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
// Shrinking switches the buffer from the external one to the inline one.
|
||||
vector1.Shrink(kInlineCapacity - 1);
|
||||
vector1.shrink_to_fit();
|
||||
@@ -2446,7 +2446,7 @@ class InlinedVectorObjectWithVtableWrapp
|
||||
|
||||
// TODO(Oilpan): when Vector.h's contiguous container support no longer disables
|
||||
// Vector<>s with inline capacity, enable this test.
|
||||
-#if !defined(ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
+#if !defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
TEST_F(HeapTest, VectorDestructorsWithVtable) {
|
||||
ClearOutOldGarbage();
|
||||
InlinedVectorObjectWithVtable::destructor_calls_ = 0;
|
||||
diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/sparse_vector_test.cc src/third_party/blink/renderer/platform/sparse_vector_test.cc
|
||||
--- src.old/third_party/blink/renderer/platform/sparse_vector_test.cc 2025-08-15 17:32:29.549405057 +0200
|
||||
+++ src/third_party/blink/renderer/platform/sparse_vector_test.cc 2025-08-17 14:47:13.846152160 +0200
|
||||
@@ -240,9 +240,9 @@ TEST(SparseVectorPtrTest, SettingToNullp
|
||||
EXPECT_FALSE(sparse_vector.HasField(FieldId::kFoo));
|
||||
}
|
||||
|
||||
-// WTF::Vector always uses 0 inline capacity when ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+// WTF::Vector always uses 0 inline capacity when WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
// is defined.
|
||||
-#ifndef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifndef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
TEST(SparseVectorInlineCapacityTest, Basic) {
|
||||
SparseVector<FieldId, int, 16> sparse_vector;
|
||||
EXPECT_EQ(16u, sparse_vector.capacity());
|
||||
diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/wtf/container_annotations.h src/third_party/blink/renderer/platform/wtf/container_annotations.h
|
||||
--- src.old/third_party/blink/renderer/platform/wtf/container_annotations.h 2025-08-15 17:32:29.573405052 +0200
|
||||
+++ src/third_party/blink/renderer/platform/wtf/container_annotations.h 2025-08-17 14:47:13.842152160 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
// documentation:
|
||||
// https://github.com/llvm-mirror/compiler-rt/blob/master/include/sanitizer/common_interface_defs.h#L154
|
||||
|
||||
-#define ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#define WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
|
||||
#define ANNOTATE_NEW_BUFFER(buffer, capacity, newSize) \
|
||||
if (buffer) { \
|
||||
diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/wtf/size_assertions.cc src/third_party/blink/renderer/platform/wtf/size_assertions.cc
|
||||
--- src.old/third_party/blink/renderer/platform/wtf/size_assertions.cc 2025-08-15 17:32:29.577405052 +0200
|
||||
+++ src/third_party/blink/renderer/platform/wtf/size_assertions.cc 2025-08-17 14:47:13.838152160 +0200
|
||||
@@ -61,7 +61,7 @@ struct SameSizeAsVectorWithInlineCapacit
|
||||
template <typename T, unsigned inlineCapacity>
|
||||
struct SameSizeAsVectorWithInlineCapacity {
|
||||
SameSizeAsVectorWithInlineCapacity<T, 0> base_capacity;
|
||||
-#if !defined(ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
+#if !defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
T inline_buffer[inlineCapacity];
|
||||
#endif
|
||||
};
|
||||
diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/wtf/vector.h src/third_party/blink/renderer/platform/wtf/vector.h
|
||||
--- src.old/third_party/blink/renderer/platform/wtf/vector.h 2025-08-15 17:32:29.581405051 +0200
|
||||
+++ src/third_party/blink/renderer/platform/wtf/vector.h 2025-08-17 14:47:13.842152160 +0200
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
// For ASAN builds, disable inline buffers completely as they cause various
|
||||
// issues.
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
#define INLINE_CAPACITY 0
|
||||
#else
|
||||
#define INLINE_CAPACITY InlineCapacity
|
||||
@@ -471,7 +471,7 @@ class VectorBufferBase {
|
||||
}
|
||||
|
||||
void CheckUnusedSlots(const T* from, const T* to) {
|
||||
-#if DCHECK_IS_ON() && !defined(ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
+#if DCHECK_IS_ON() && !defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
if constexpr (NeedsToClearUnusedSlots()) {
|
||||
const unsigned char* unused_area =
|
||||
reinterpret_cast<const unsigned char*>(from);
|
||||
@@ -606,7 +606,7 @@ class VectorBuffer<T, 0, Allocator> : pr
|
||||
DCHECK(buffer_);
|
||||
DCHECK_LT(new_capacity, capacity());
|
||||
size_t size_to_allocate = AllocationSize(new_capacity);
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
ANNOTATE_DELETE_BUFFER(buffer_, capacity_, size_);
|
||||
#endif
|
||||
bool succeeded = false;
|
||||
@@ -615,7 +615,7 @@ class VectorBuffer<T, 0, Allocator> : pr
|
||||
capacity_ = static_cast<wtf_size_t>(size_to_allocate / sizeof(T));
|
||||
succeeded = true;
|
||||
}
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
MARKING_AWARE_ANNOTATE_NEW_BUFFER(Allocator, buffer_, capacity_, size_);
|
||||
#endif
|
||||
return succeeded;
|
||||
@@ -740,7 +740,7 @@ class VectorBuffer : protected VectorBuf
|
||||
DCHECK_NE(buffer_, InlineBuffer());
|
||||
size_t new_size = AllocationSize(new_capacity);
|
||||
bool succeeded = false;
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
ANNOTATE_DELETE_BUFFER(buffer_, capacity_, size_);
|
||||
#endif
|
||||
if (Allocator::ShrinkVectorBacking(buffer_, AllocationSize(capacity()),
|
||||
@@ -748,7 +748,7 @@ class VectorBuffer : protected VectorBuf
|
||||
capacity_ = static_cast<wtf_size_t>(new_size / sizeof(T));
|
||||
succeeded = true;
|
||||
}
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
MARKING_AWARE_ANNOTATE_NEW_BUFFER(Allocator, buffer_, capacity_, size_);
|
||||
#endif
|
||||
return succeeded;
|
||||
@@ -2145,7 +2145,7 @@ void Vector<T, InlineCapacity, Allocator
|
||||
Shrink(new_capacity);
|
||||
|
||||
T* old_buffer = data();
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
wtf_size_t old_capacity = capacity();
|
||||
#endif
|
||||
if (new_capacity > 0) {
|
||||
@@ -2160,7 +2160,7 @@ void Vector<T, InlineCapacity, Allocator
|
||||
return;
|
||||
}
|
||||
Base::ResetBufferPointer();
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
if (old_buffer != data()) {
|
||||
MARKING_AWARE_ANNOTATE_NEW_BUFFER(Allocator, data(), capacity(), size_);
|
||||
ANNOTATE_DELETE_BUFFER(old_buffer, old_capacity, size_);
|
||||
@@ -2270,7 +2270,7 @@ template <typename T, wtf_size_t InlineC
|
||||
template <typename U>
|
||||
ALWAYS_INLINE void Vector<T, InlineCapacity, Allocator>::UncheckedAppend(
|
||||
U&& val) {
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
// Vectors in ASAN builds don't have InlineCapacity.
|
||||
push_back(std::forward<U>(val));
|
||||
#else
|
||||
@@ -2460,10 +2460,10 @@ void TraceInlinedBuffer(VisitorDispatche
|
||||
const T* buffer_begin,
|
||||
size_t capacity) {
|
||||
const T* buffer_end = buffer_begin + capacity;
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
// Vector can trace unused slots (which are already zeroed out).
|
||||
ANNOTATE_CHANGE_SIZE(buffer_begin, capacity, 0, capacity);
|
||||
-#endif // ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#endif // WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
for (const T* buffer_entry = buffer_begin; buffer_entry != buffer_end;
|
||||
buffer_entry++) {
|
||||
Allocator::template Trace<T, VectorTraits<T>>(visitor, *buffer_entry);
|
||||
@@ -2542,7 +2542,7 @@ void Vector<T, InlineCapacity, Allocator
|
||||
}
|
||||
// Shrinking to inline buffer from out-of-line one.
|
||||
T *old_begin = data(), *old_end = DataEnd();
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
const wtf_size_t old_capacity = capacity();
|
||||
#endif
|
||||
Base::ResetBufferPointer();
|
||||
diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/wtf/vector_test.cc src/third_party/blink/renderer/platform/wtf/vector_test.cc
|
||||
--- src.old/third_party/blink/renderer/platform/wtf/vector_test.cc 2025-08-15 17:32:29.581405051 +0200
|
||||
+++ src/third_party/blink/renderer/platform/wtf/vector_test.cc 2025-08-17 14:47:13.846152160 +0200
|
||||
@@ -377,7 +377,7 @@ TEST(VectorTest, SwapWithInlineCapacity)
|
||||
vector_b.swap(vector_a);
|
||||
}
|
||||
|
||||
-#if defined(ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
+#if defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
TEST(VectorTest, ContainerAnnotations) {
|
||||
Vector<int> vector_a;
|
||||
vector_a.push_back(10);
|
||||
@@ -415,7 +415,7 @@ TEST(VectorTest, ContainerAnnotations) {
|
||||
volatile int* int_pointer_b3 = vector_b.data();
|
||||
EXPECT_DEATH((void)int_pointer_b3[2], "container-overflow");
|
||||
}
|
||||
-#endif // defined(ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
+#endif // defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER)
|
||||
|
||||
class Comparable {};
|
||||
bool operator==(const Comparable& a, const Comparable& b) {
|
||||
--- src/third_party/blink/renderer/core/html/parser/literal_buffer.h.orig 2025-08-15 17:32:29.197405123 +0200
|
||||
+++ src/third_party/blink/renderer/core/html/parser/literal_buffer.h 2025-08-17 16:56:06.586499195 +0200
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
// For ASAN builds, disable inline buffers completely as they cause various
|
||||
// issues.
|
||||
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
|
||||
#define BUFFER_INLINE_CAPACITY 0
|
||||
#else
|
||||
#define BUFFER_INLINE_CAPACITY kInlineSize
|
@@ -1,25 +0,0 @@
|
||||
Manual backport of https://github.com/nodejs/undici/commit/6805746680d27a5369d7fb67bc05f95a28247d75
|
||||
|
||||
--- src/third_party/electron_node/deps/undici/src/lib/handler/RedirectHandler.js.old 2024-04-04 09:55:39.696980900 +0000
|
||||
+++ src/third_party/electron_node/deps/undici/src/lib/handler/RedirectHandler.js 2024-04-09 16:52:37.888616200 +0000
|
||||
@@ -188,7 +188,8 @@ function shouldRemoveHeader (header, rem
|
||||
(header.length === 4 && header.toString().toLowerCase() === 'host') ||
|
||||
(removeContent && header.toString().toLowerCase().indexOf('content-') === 0) ||
|
||||
(unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') ||
|
||||
- (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie')
|
||||
+ (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie') ||
|
||||
+ (unknownOrigin && header.length === 19 && header.toString().toLowerCase() === 'proxy-authorization')
|
||||
)
|
||||
}
|
||||
|
||||
--- src/third_party/electron_node/deps/undici/undici.js.old 2024-04-04 10:02:38.059765300 +0000
|
||||
+++ src/third_party/electron_node/deps/undici/undici.js 2024-04-09 16:51:15.754041100 +0000
|
||||
@@ -7902,7 +7902,7 @@ var require_RedirectHandler = __commonJS
|
||||
}
|
||||
__name(parseLocation, "parseLocation");
|
||||
function shouldRemoveHeader(header, removeContent, unknownOrigin) {
|
||||
- return header.length === 4 && header.toString().toLowerCase() === "host" || removeContent && header.toString().toLowerCase().indexOf("content-") === 0 || unknownOrigin && header.length === 13 && header.toString().toLowerCase() === "authorization" || unknownOrigin && header.length === 6 && header.toString().toLowerCase() === "cookie";
|
||||
+ return header.length === 4 && header.toString().toLowerCase() === "host" || removeContent && header.toString().toLowerCase().indexOf("content-") === 0 || unknownOrigin && header.length === 13 && header.toString().toLowerCase() === "authorization" || unknownOrigin && header.length === 6 && header.toString().toLowerCase() === "cookie" || unknownOrigin && header.length === 19 && header.toString().toLowerCase() === "proxy-authorization"
|
||||
}
|
||||
__name(shouldRemoveHeader, "shouldRemoveHeader");
|
||||
function cleanRequestHeaders(headers, removeContent, unknownOrigin) {
|
@@ -1,136 +0,0 @@
|
||||
Port https://github.com/nodejs/undici/commit/d542b8c to apply to amalgamated undici code in nodejs (the original copy in deps/undici/src is not used and i'm not bothering with patching it)
|
||||
|
||||
These chunks were manually cherry-picked from upstream nodejs commit https://github.com/nodejs/node/commit/60d24938 to match the undici changes.
|
||||
|
||||
|
||||
--- a/third_party/electron_node/deps/undici/undici.js
|
||||
+++ b/third_party/electron_node/deps/undici/undici.js
|
||||
@@ -992,9 +992,12 @@ var require_util2 = __commonJS({
|
||||
var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util();
|
||||
var assert = require("assert");
|
||||
var { isUint8Array } = require("util/types");
|
||||
+ var supportedHashes = [];
|
||||
var crypto;
|
||||
try {
|
||||
crypto = require("crypto");
|
||||
+ const possibleRelevantHashes = ["sha256", "sha384", "sha512"];
|
||||
+ supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash));
|
||||
} catch {
|
||||
}
|
||||
function responseURL(response) {
|
||||
@@ -1277,46 +1280,38 @@ var require_util2 = __commonJS({
|
||||
if (parsedMetadata.length === 0) {
|
||||
return true;
|
||||
}
|
||||
- const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo));
|
||||
- const strongest = list[0].algo;
|
||||
- const metadata = list.filter((item) => item.algo === strongest);
|
||||
+ const strongest = getStrongestMetadata(parsedMetadata);
|
||||
+ const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest);
|
||||
for (const item of metadata) {
|
||||
const algorithm = item.algo;
|
||||
- let expectedValue = item.hash;
|
||||
- if (expectedValue.endsWith("==")) {
|
||||
- expectedValue = expectedValue.slice(0, -2);
|
||||
- }
|
||||
+ const expectedValue = item.hash;
|
||||
let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64");
|
||||
- if (actualValue.endsWith("==")) {
|
||||
- actualValue = actualValue.slice(0, -2);
|
||||
- }
|
||||
- if (actualValue === expectedValue) {
|
||||
- return true;
|
||||
- }
|
||||
- let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest("base64url");
|
||||
- if (actualBase64URL.endsWith("==")) {
|
||||
- actualBase64URL = actualBase64URL.slice(0, -2);
|
||||
+ if (actualValue[actualValue.length - 1] === "=") {
|
||||
+ if (actualValue[actualValue.length - 2] === "=") {
|
||||
+ actualValue = actualValue.slice(0, -2);
|
||||
+ } else {
|
||||
+ actualValue = actualValue.slice(0, -1);
|
||||
+ }
|
||||
}
|
||||
- if (actualBase64URL === expectedValue) {
|
||||
+ if (compareBase64Mixed(actualValue, expectedValue)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
__name(bytesMatch, "bytesMatch");
|
||||
- var parseHashWithOptions = /((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;
|
||||
+ var parseHashWithOptions = /(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;
|
||||
function parseMetadata(metadata) {
|
||||
const result = [];
|
||||
let empty = true;
|
||||
- const supportedHashes = crypto.getHashes();
|
||||
for (const token of metadata.split(" ")) {
|
||||
empty = false;
|
||||
const parsedToken = parseHashWithOptions.exec(token);
|
||||
- if (parsedToken === null || parsedToken.groups === void 0) {
|
||||
+ if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) {
|
||||
continue;
|
||||
}
|
||||
- const algorithm = parsedToken.groups.algo;
|
||||
- if (supportedHashes.includes(algorithm.toLowerCase())) {
|
||||
+ const algorithm = parsedToken.groups.algo.toLowerCase();
|
||||
+ if (supportedHashes.includes(algorithm)) {
|
||||
result.push(parsedToken.groups);
|
||||
}
|
||||
}
|
||||
@@ -1326,6 +1321,54 @@ var require_util2 = __commonJS({
|
||||
return result;
|
||||
}
|
||||
__name(parseMetadata, "parseMetadata");
|
||||
+ function getStrongestMetadata(metadataList) {
|
||||
+ let algorithm = metadataList[0].algo;
|
||||
+ if (algorithm[3] === "5") {
|
||||
+ return algorithm;
|
||||
+ }
|
||||
+ for (let i = 1; i < metadataList.length; ++i) {
|
||||
+ const metadata = metadataList[i];
|
||||
+ if (metadata.algo[3] === "5") {
|
||||
+ algorithm = "sha512";
|
||||
+ break;
|
||||
+ } else if (algorithm[3] === "3") {
|
||||
+ continue;
|
||||
+ } else if (metadata.algo[3] === "3") {
|
||||
+ algorithm = "sha384";
|
||||
+ }
|
||||
+ }
|
||||
+ return algorithm;
|
||||
+ }
|
||||
+ __name(getStrongestMetadata, "getStrongestMetadata");
|
||||
+ function filterMetadataListByAlgorithm(metadataList, algorithm) {
|
||||
+ if (metadataList.length === 1) {
|
||||
+ return metadataList;
|
||||
+ }
|
||||
+ let pos = 0;
|
||||
+ for (let i = 0; i < metadataList.length; ++i) {
|
||||
+ if (metadataList[i].algo === algorithm) {
|
||||
+ metadataList[pos++] = metadataList[i];
|
||||
+ }
|
||||
+ }
|
||||
+ metadataList.length = pos;
|
||||
+ return metadataList;
|
||||
+ }
|
||||
+ __name(filterMetadataListByAlgorithm, "filterMetadataListByAlgorithm");
|
||||
+ function compareBase64Mixed(actualValue, expectedValue) {
|
||||
+ if (actualValue.length !== expectedValue.length) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ for (let i = 0; i < actualValue.length; ++i) {
|
||||
+ if (actualValue[i] !== expectedValue[i]) {
|
||||
+ if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") {
|
||||
+ continue;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+ __name(compareBase64Mixed, "compareBase64Mixed");
|
||||
function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {
|
||||
}
|
||||
__name(tryUpgradeRequestToAPotentiallyTrustworthyURL, "tryUpgradeRequestToAPotentiallyTrustworthyURL");
|
@@ -1,24 +0,0 @@
|
||||
From 41cfb13e3fd199108130e4b29ccb54b52ae82bbb Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Fri, 9 May 2025 01:07:04 +0900
|
||||
Subject: [PATCH] fix: use-after-move of bus connection in xdg portal detection
|
||||
|
||||
---
|
||||
shell/browser/ui/file_dialog_linux_portal.cc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/shell/browser/ui/file_dialog_linux_portal.cc b/shell/browser/ui/file_dialog_linux_portal.cc
|
||||
index 298ee25caffb4..7dd520d92bdfa 100644
|
||||
--- a/electron/shell/browser/ui/file_dialog_linux_portal.cc
|
||||
+++ b/electron/shell/browser/ui/file_dialog_linux_portal.cc
|
||||
@@ -86,8 +86,9 @@ void CheckPortalAvailabilityOnBusThread() {
|
||||
<< (g_portal_available ? "yes" : "no");
|
||||
flag->Set();
|
||||
bus->ShutdownAndBlock();
|
||||
+ bus.reset();
|
||||
},
|
||||
- std::move(bus), flag));
|
||||
+ bus, flag));
|
||||
}
|
||||
|
||||
} // namespace
|
@@ -1,15 +0,0 @@
|
||||
--- src/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc.orig
|
||||
+++ src/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
|
||||
@@ -7654,6 +7654,12 @@ template bool ConsumeRadii(CSSValue* hor
|
||||
const CSSParserContext& context,
|
||||
bool use_legacy_parsing);
|
||||
|
||||
+template bool ConsumeRadii(CSSValue* horizontal_radii[4],
|
||||
+ CSSValue* vertical_radii[4],
|
||||
+ CSSParserTokenRange& stream,
|
||||
+ const CSSParserContext& context,
|
||||
+ bool use_legacy_parsing);
|
||||
+
|
||||
template <class T = CSSParserTokenRange>
|
||||
requires std::is_same_v<T, CSSParserTokenStream> ||
|
||||
std::is_same_v<T, CSSParserTokenRange>
|
@@ -1,65 +0,0 @@
|
||||
From b90d7410221d30c40a0d5ac1ff0041667fd8db0e Mon Sep 17 00:00:00 2001
|
||||
From: "lauren n. liberda" <lauren@selfisekai.rocks>
|
||||
Date: Wed, 26 Jun 2024 00:56:57 +0000
|
||||
Subject: [PATCH] unbundle: update absl shims
|
||||
|
||||
Change-Id: I6fca3a8fd333c027fe48d8871073c79e7d8c3cd6
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5657110
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1319524}
|
||||
---
|
||||
build/linux/unbundle/absl_debugging.gn | 2 ++
|
||||
build/linux/unbundle/absl_random.gn | 5 +++++
|
||||
build/linux/unbundle/absl_status.gn | 2 ++
|
||||
build/linux/unbundle/absl_types.gn | 2 ++
|
||||
4 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/build/linux/unbundle/absl_debugging.gn b/build/linux/unbundle/absl_debugging.gn
|
||||
index 5fbd34abbc96ae..b59a45b0913116 100644
|
||||
--- a/build/linux/unbundle/absl_debugging.gn
|
||||
+++ b/build/linux/unbundle/absl_debugging.gn
|
||||
@@ -46,5 +46,7 @@ source_set("symbolize") {
|
||||
public_configs = [ ":system_absl_symbolize" ]
|
||||
}
|
||||
|
||||
+source_set("demangle_rust_test") {
|
||||
+}
|
||||
source_set("stacktrace_test") {
|
||||
}
|
||||
diff --git a/build/linux/unbundle/absl_random.gn b/build/linux/unbundle/absl_random.gn
|
||||
index 7bb70241ad1f8d..eae95345e491d1 100644
|
||||
--- a/build/linux/unbundle/absl_random.gn
|
||||
+++ b/build/linux/unbundle/absl_random.gn
|
||||
@@ -57,3 +57,8 @@ source_set("random") {
|
||||
deps = [ ":random_shim" ]
|
||||
public_configs = [ ":system_absl_random_random" ]
|
||||
}
|
||||
+
|
||||
+group("distributions_test") {
|
||||
+}
|
||||
+group("mock_distributions_test") {
|
||||
+}
|
||||
diff --git a/build/linux/unbundle/absl_status.gn b/build/linux/unbundle/absl_status.gn
|
||||
index 5f1e73a6d4d133..1905485814986e 100644
|
||||
--- a/build/linux/unbundle/absl_status.gn
|
||||
+++ b/build/linux/unbundle/absl_status.gn
|
||||
@@ -38,3 +38,5 @@ source_set("status_test") {
|
||||
}
|
||||
source_set("statusor_test") {
|
||||
}
|
||||
+source_set("status_matchers_test") {
|
||||
+}
|
||||
diff --git a/build/linux/unbundle/absl_types.gn b/build/linux/unbundle/absl_types.gn
|
||||
index 4bb77f1b631cbd..8d2b1314558f2c 100644
|
||||
--- a/build/linux/unbundle/absl_types.gn
|
||||
+++ b/build/linux/unbundle/absl_types.gn
|
||||
@@ -93,5 +93,7 @@ source_set("variant") {
|
||||
|
||||
source_set("optional_test") {
|
||||
}
|
||||
+source_set("span_test") {
|
||||
+}
|
||||
source_set("variant_test") {
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
From f9819bb70b413c8310cd209c75cc555495e28564 Mon Sep 17 00:00:00 2001
|
||||
From: Allen Bauer <kylixrd@chromium.org>
|
||||
Date: Fri, 31 May 2024 15:55:13 +0000
|
||||
Subject: [PATCH] Harden DesktopNativeWidgetAura against a destroyed Widget.
|
||||
|
||||
Under CLIENT_OWNS_WIDGET ownership mode, it is possible for the Widget to have already been destroyed. This hardens the NativeWidget to handle this case without crashing.
|
||||
|
||||
Bug: 40242079, 40232479
|
||||
Change-Id: I455e1690b49ff50e4eac3b9a085d9f15ccb6adec
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5585758
|
||||
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
|
||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1308668}
|
||||
---
|
||||
ui/views/widget/desktop_aura/desktop_native_widget_aura.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
||||
index 9ae19505357c6b..1974865e8c8a8f 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
||||
@@ -431,8 +431,8 @@ DesktopNativeWidgetAura::tooltip_controller() {
|
||||
}
|
||||
|
||||
void DesktopNativeWidgetAura::HandleActivationChanged(bool active) {
|
||||
- DCHECK(native_widget_delegate_);
|
||||
- if (!native_widget_delegate_->ShouldHandleNativeWidgetActivationChanged(
|
||||
+ if (!native_widget_delegate_ ||
|
||||
+ !native_widget_delegate_->ShouldHandleNativeWidgetActivationChanged(
|
||||
active)) {
|
||||
return;
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
From e9eda8f8456c98e3c3a438bfd2ff41d90f59a8ec Mon Sep 17 00:00:00 2001
|
||||
From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com>
|
||||
Date: Tue, 14 May 2024 21:26:51 +0000
|
||||
Subject: [PATCH] Fix cast in ElectronDesktopWindowTreeHostLinux
|
||||
|
||||
The frame view of the widget is an `ClientFrameViewLinux` instance only
|
||||
when both `frame` and `client_frame` booleans are set to `true`.
|
||||
Otherwise it is an instance of a different class and thus casting to
|
||||
`ClientFrameViewLinux` is incorrect and leads to crashes.
|
||||
|
||||
Fix: #41839
|
||||
|
||||
Co-authored-by: Fedor Indutny <indutny@signal.org>
|
||||
---
|
||||
.../ui/electron_desktop_window_tree_host_linux.cc | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc
|
||||
index cfc87f6fb7efd..17936ba352a1c 100644
|
||||
--- a/electron/shell/browser/ui/electron_desktop_window_tree_host_linux.cc
|
||||
+++ b/electron/shell/browser/ui/electron_desktop_window_tree_host_linux.cc
|
||||
@@ -71,9 +71,15 @@ void ElectronDesktopWindowTreeHostLinux::OnWindowStateChanged(
|
||||
|
||||
void ElectronDesktopWindowTreeHostLinux::OnWindowTiledStateChanged(
|
||||
ui::WindowTiledEdges new_tiled_edges) {
|
||||
- static_cast<ClientFrameViewLinux*>(
|
||||
- native_window_view_->widget()->non_client_view()->frame_view())
|
||||
- ->set_tiled_edges(new_tiled_edges);
|
||||
+ // CreateNonClientFrameView creates `ClientFrameViewLinux` only when both
|
||||
+ // frame and client_frame booleans are set, otherwise it is a different type
|
||||
+ // of view.
|
||||
+ if (native_window_view_->has_frame() &&
|
||||
+ native_window_view_->has_client_frame()) {
|
||||
+ static_cast<ClientFrameViewLinux*>(
|
||||
+ native_window_view_->widget()->non_client_view()->frame_view())
|
||||
+ ->set_tiled_edges(new_tiled_edges);
|
||||
+ }
|
||||
UpdateFrameHints();
|
||||
}
|
||||
|
@@ -1,55 +0,0 @@
|
||||
From ee6e6d3e45af1f7210e144a17f14fb21a7e86588 Mon Sep 17 00:00:00 2001
|
||||
From: mikt <mikt@google.com>
|
||||
Date: Tue, 30 Jan 2024 03:09:24 +0000
|
||||
Subject: [PATCH] [PA] Fix InternalAllocator for GCC builds
|
||||
|
||||
Internal Allocator has a few missing member functions, that are required
|
||||
as a part of named requirement Allocator.
|
||||
https://en.cppreference.com/w/cpp/named_req/Allocator
|
||||
|
||||
It broke builds on GCC, so adding these to fix.
|
||||
https://crrev.com/c/5196856/comments/0c4bbfd9_6433016b
|
||||
|
||||
Change-Id: Ifce5f3e47c94c7bb1e298ac4cd7d0d1e4c6de59c
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5231905
|
||||
Commit-Queue: Mikihito Matsuura <mikt@google.com>
|
||||
Reviewed-by: Kalvin Lee <kdlee@chromium.org>
|
||||
Reviewed-by: Takashi Sakamoto <tasak@google.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1253709}
|
||||
---
|
||||
.../internal_allocator_forward.h | 21 +++++++++++++++----
|
||||
1 file changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h
|
||||
index 45fec29f8cc93..b31a145ff6e99 100644
|
||||
--- a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h
|
||||
+++ b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h
|
||||
@@ -27,11 +27,24 @@ PartitionRoot& InternalAllocatorRoot();
|
||||
template <typename T>
|
||||
class InternalAllocator {
|
||||
public:
|
||||
- // Member types required by allocator completeness requirements.
|
||||
using value_type = T;
|
||||
- using size_type = std::size_t;
|
||||
- using difference_type = std::ptrdiff_t;
|
||||
- using propagate_on_container_move_assignment = std::true_type;
|
||||
+ using is_always_equal = std::true_type;
|
||||
+
|
||||
+ InternalAllocator() = default;
|
||||
+
|
||||
+ template <typename U>
|
||||
+ InternalAllocator(const InternalAllocator<U>&) {} // NOLINT
|
||||
+
|
||||
+ template <typename U>
|
||||
+ InternalAllocator& operator=(const InternalAllocator<U>&) {
|
||||
+ return *this;
|
||||
+ }
|
||||
+
|
||||
+ template <typename U>
|
||||
+ bool operator==(const InternalAllocator<U>&) {
|
||||
+ // InternalAllocator<T> can free allocations made by InternalAllocator<U>.
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
value_type* allocate(std::size_t count);
|
||||
|
@@ -1,16 +0,0 @@
|
||||
Actually disable the fontations code flag since we don't build that library. Otherwise chromium crashes with a null dereference
|
||||
|
||||
--- src/third_party/blink/renderer/platform/runtime_enabled_features.json5.orig 2025-04-21 18:29:28.190307211 +0200
|
||||
+++ src/third_party/blink/renderer/platform/runtime_enabled_features.json5 2025-04-21 23:33:49.257769003 +0200
|
||||
@@ -2165,11 +2165,9 @@
|
||||
},
|
||||
{
|
||||
name: "FontationsFontBackend",
|
||||
- status: "stable",
|
||||
},
|
||||
{
|
||||
name: "FontationsForSelectedFormats",
|
||||
- status: "stable",
|
||||
},
|
||||
{
|
||||
name: "FontFamilyPostscriptMatchingCTMigration",
|
@@ -1,27 +0,0 @@
|
||||
From 91a8dd6bff0c3965ab324b5c2a3c19c0a2931831 Mon Sep 17 00:00:00 2001
|
||||
From: "lauren n. liberda" <lauren@selfisekai.rocks>
|
||||
Date: Sat, 29 Jun 2024 00:26:40 +0000
|
||||
Subject: [PATCH] unbundle: add missing absl_base header
|
||||
|
||||
Change-Id: Ie4edda0ec8661437652b2c4c324ac82137bfcfed
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5659519
|
||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1321266}
|
||||
---
|
||||
build/linux/unbundle/absl_base.gn | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/build/linux/unbundle/absl_base.gn b/build/linux/unbundle/absl_base.gn
|
||||
index 7da86e46147bdd..b5ce0863e6fde7 100644
|
||||
--- a/build/linux/unbundle/absl_base.gn
|
||||
+++ b/build/linux/unbundle/absl_base.gn
|
||||
@@ -27,6 +27,7 @@ shim_headers("base_shim") {
|
||||
headers = [
|
||||
"call_once.h",
|
||||
"casts.h",
|
||||
+ "dynamic_annotations.h",
|
||||
]
|
||||
}
|
||||
|
14
angle-BlobCache-Success.patch
Normal file
14
angle-BlobCache-Success.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- src/third_party/angle/src/common/vulkan/vk_headers.h.orig 2025-08-15 17:33:15.429396781 +0200
|
||||
+++ src/third_party/angle/src/common/vulkan/vk_headers.h 2025-08-15 21:50:06.831979165 +0200
|
||||
@@ -16,6 +16,11 @@
|
||||
# include <vulkan/vulkan.h>
|
||||
#endif
|
||||
|
||||
+// braindead change https://chromium-review.googlesource.com/c/angle/angle/+/5273491
|
||||
+#undef Success
|
||||
+#undef None
|
||||
+#undef Always
|
||||
+
|
||||
#if !defined(ANGLE_SHARED_LIBVULKAN)
|
||||
|
||||
namespace rx
|
@@ -1,39 +0,0 @@
|
||||
From 2f934a47e9709cac9ce04d312b7aa496948bced6 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Mon, 18 Mar 2024 12:53:27 +0100
|
||||
Subject: [PATCH] libstdc++: replace std::powf with std:pow
|
||||
|
||||
libstdc++ before GCC 14 does not provide std::powf. So replace the
|
||||
call with std::pow, that provides an overload for floats.
|
||||
|
||||
For reference of the bug tracking the missing methods in libstdc++:
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700
|
||||
|
||||
Bug: chromium:41455655
|
||||
Change-Id: Idfb53fe3c71f4dc0198cf6ba3e26c07895f65bc6
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5379670
|
||||
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
||||
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
||||
---
|
||||
src/libANGLE/renderer/vulkan/FramebufferVk.cpp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
|
||||
index 98831436adb..e88339521e6 100644
|
||||
--- a/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
|
||||
+++ b/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
|
||||
@@ -1726,10 +1726,10 @@ angle::Result FramebufferVk::generateFragmentShadingRateWithCPU(
|
||||
for (uint32_t point = 0; point < activeFocalPoints.size(); point++)
|
||||
{
|
||||
float density =
|
||||
- 1.0f / std::max(std::powf(activeFocalPoints[point].focalX - px, 2) *
|
||||
- std::powf(activeFocalPoints[point].gainX, 2) +
|
||||
- std::powf(activeFocalPoints[point].focalY - py, 2) *
|
||||
- std::powf(activeFocalPoints[point].gainY, 2) -
|
||||
+ 1.0f / std::max(std::pow(activeFocalPoints[point].focalX - px, 2.0f) *
|
||||
+ std::pow(activeFocalPoints[point].gainX, 2.0f) +
|
||||
+ std::pow(activeFocalPoints[point].focalY - py, 2.0f) *
|
||||
+ std::pow(activeFocalPoints[point].gainY, 2.0f) -
|
||||
activeFocalPoints[point].foveaArea,
|
||||
1.0f);
|
||||
|
@@ -1,134 +0,0 @@
|
||||
From 0508fc9b920b001115f80790e4942ff69d3f5de1 Mon Sep 17 00:00:00 2001
|
||||
From: Roman Lavrov <romanl@google.com>
|
||||
Date: Tue, 23 Apr 2024 15:32:52 -0400
|
||||
Subject: [PATCH] Reland "Cleanup: replace DirtyObjectType check with constexpr
|
||||
generator"
|
||||
|
||||
Avoid using lambdas with member function pointers which caused issues
|
||||
on MSVC C++17.
|
||||
|
||||
This is a reland of commit 89caa0e1d99e45f3d6f355f6e14c147f8de3e0e5
|
||||
|
||||
Original change's description:
|
||||
> Cleanup: replace DirtyObjectType check with constexpr generator
|
||||
>
|
||||
> Static assert was meant to avoid kDirtyObjectHandlers getting out of
|
||||
> sync, but it doesn't achieve that goal as it's just comparing values
|
||||
> with ints which is confusing.
|
||||
>
|
||||
> Replacing with constexpr generated std::array. C++20 allows to easily
|
||||
> validate that all values are set by _not_ default-initializing
|
||||
> `handlers`. C++17 makes it trickier, addeded static_assert on an
|
||||
> additional static constexpr bool (silly but I can't find a more concise
|
||||
> way)
|
||||
>
|
||||
> Bug: angleproject:8666
|
||||
> Bug: b/335295728
|
||||
> Change-Id: Idf9bbd087d09d5ba253a7587ce0503cae3fcf3a7
|
||||
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5478231
|
||||
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
||||
> Commit-Queue: Roman Lavrov <romanl@google.com>
|
||||
|
||||
Bug: angleproject:8666
|
||||
Bug: b/335295728
|
||||
Change-Id: I62e66b700512e072ef10cc57a17e8837a534c0d5
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5589285
|
||||
Commit-Queue: Roman Lavrov <romanl@google.com>
|
||||
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
||||
---
|
||||
src/libANGLE/State.cpp | 2 --
|
||||
src/libANGLE/State.h | 67 +++++++++++++++++++++++++-----------------
|
||||
2 files changed, 40 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/src/libANGLE/State.h b/src/libANGLE/State.h
|
||||
index b2aa6749060..38a219f489d 100644
|
||||
--- src/third_party/angle/src/libANGLE/State.h.orig 2024-07-24 12:51:20.205804675 +0200
|
||||
+++ src/third_party/angle/src/libANGLE/State.h 2024-07-26 14:11:54.188991370 +0200
|
||||
@@ -1447,41 +1447,46 @@ class State : angle::NonCopyable
|
||||
angle::Result syncProgramPipelineObject(const Context *context, Command command);
|
||||
|
||||
using DirtyObjectHandler = angle::Result (State::*)(const Context *context, Command command);
|
||||
+ using DirtyObjectHandlerArray = std::array<DirtyObjectHandler, state::DIRTY_OBJECT_MAX>;
|
||||
|
||||
- static constexpr std::array<DirtyObjectHandler, state::DIRTY_OBJECT_MAX> kDirtyObjectHandlers =
|
||||
- []() {
|
||||
- // Work around C++'s lack of array element support in designated initializers
|
||||
- std::array<DirtyObjectHandler, state::DIRTY_OBJECT_MAX> handlers{};
|
||||
-
|
||||
- handlers[state::DIRTY_OBJECT_ACTIVE_TEXTURES] = &State::syncActiveTextures;
|
||||
- handlers[state::DIRTY_OBJECT_TEXTURES_INIT] = &State::syncTexturesInit;
|
||||
- handlers[state::DIRTY_OBJECT_IMAGES_INIT] = &State::syncImagesInit;
|
||||
- handlers[state::DIRTY_OBJECT_READ_ATTACHMENTS] = &State::syncReadAttachments;
|
||||
- handlers[state::DIRTY_OBJECT_DRAW_ATTACHMENTS] = &State::syncDrawAttachments;
|
||||
- handlers[state::DIRTY_OBJECT_READ_FRAMEBUFFER] = &State::syncReadFramebuffer;
|
||||
- handlers[state::DIRTY_OBJECT_DRAW_FRAMEBUFFER] = &State::syncDrawFramebuffer;
|
||||
- handlers[state::DIRTY_OBJECT_VERTEX_ARRAY] = &State::syncVertexArray;
|
||||
- handlers[state::DIRTY_OBJECT_TEXTURES] = &State::syncTextures;
|
||||
- handlers[state::DIRTY_OBJECT_IMAGES] = &State::syncImages;
|
||||
- handlers[state::DIRTY_OBJECT_SAMPLERS] = &State::syncSamplers;
|
||||
- handlers[state::DIRTY_OBJECT_PROGRAM_PIPELINE_OBJECT] =
|
||||
- &State::syncProgramPipelineObject;
|
||||
-
|
||||
- return handlers;
|
||||
- }();
|
||||
-
|
||||
- static_assert(
|
||||
- []() {
|
||||
- for (auto handler : kDirtyObjectHandlers)
|
||||
+ static constexpr DirtyObjectHandlerArray MakeDirtyObjectHandlers()
|
||||
+ {
|
||||
+ // Work around C++'s lack of array element support in designated initializers
|
||||
+ // This function cannot be a lambda due to MSVC C++17 limitations b/330910097#comment5
|
||||
+ DirtyObjectHandlerArray handlers{};
|
||||
+
|
||||
+ handlers[state::DIRTY_OBJECT_ACTIVE_TEXTURES] = &State::syncActiveTextures;
|
||||
+ handlers[state::DIRTY_OBJECT_TEXTURES_INIT] = &State::syncTexturesInit;
|
||||
+ handlers[state::DIRTY_OBJECT_IMAGES_INIT] = &State::syncImagesInit;
|
||||
+ handlers[state::DIRTY_OBJECT_READ_ATTACHMENTS] = &State::syncReadAttachments;
|
||||
+ handlers[state::DIRTY_OBJECT_DRAW_ATTACHMENTS] = &State::syncDrawAttachments;
|
||||
+ handlers[state::DIRTY_OBJECT_READ_FRAMEBUFFER] = &State::syncReadFramebuffer;
|
||||
+ handlers[state::DIRTY_OBJECT_DRAW_FRAMEBUFFER] = &State::syncDrawFramebuffer;
|
||||
+ handlers[state::DIRTY_OBJECT_VERTEX_ARRAY] = &State::syncVertexArray;
|
||||
+ handlers[state::DIRTY_OBJECT_TEXTURES] = &State::syncTextures;
|
||||
+ handlers[state::DIRTY_OBJECT_IMAGES] = &State::syncImages;
|
||||
+ handlers[state::DIRTY_OBJECT_SAMPLERS] = &State::syncSamplers;
|
||||
+ handlers[state::DIRTY_OBJECT_PROGRAM_PIPELINE_OBJECT] = &State::syncProgramPipelineObject;
|
||||
+
|
||||
+ // If a handler is missing, reset everything for ease of static_assert
|
||||
+ for (auto handler : handlers)
|
||||
+ {
|
||||
+ if (handler == nullptr)
|
||||
{
|
||||
- if (handler == nullptr)
|
||||
- {
|
||||
- return false;
|
||||
- }
|
||||
+ return DirtyObjectHandlerArray();
|
||||
}
|
||||
- return true;
|
||||
- }(),
|
||||
- "kDirtyObjectHandlers missing a handler");
|
||||
+ }
|
||||
+
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ angle::Result dirtyObjectHandler(size_t dirtyObject, const Context *context, Command command)
|
||||
+ {
|
||||
+ static constexpr DirtyObjectHandlerArray handlers = MakeDirtyObjectHandlers();
|
||||
+ static_assert(handlers[0] != nullptr, "MakeDirtyObjectHandlers missing a handler");
|
||||
+
|
||||
+ return (this->*handlers[dirtyObject])(context, command);
|
||||
+ }
|
||||
|
||||
// Robust init must happen before Framebuffer init for the Vulkan back-end.
|
||||
static_assert(state::DIRTY_OBJECT_ACTIVE_TEXTURES < state::DIRTY_OBJECT_TEXTURES_INIT,
|
||||
@@ -1606,7 +1611,7 @@ ANGLE_INLINE angle::Result State::syncDi
|
||||
|
||||
for (size_t dirtyObject : dirtyObjects)
|
||||
{
|
||||
- ANGLE_TRY((this->*kDirtyObjectHandlers[dirtyObject])(context, command));
|
||||
+ ANGLE_TRY(dirtyObjectHandler(dirtyObject, context, command));
|
||||
}
|
||||
|
||||
mDirtyObjects &= ~dirtyObjects;
|
@@ -1,44 +0,0 @@
|
||||
From 0b4b5b0ae81dca83d3d602e905732e2c82bd340d Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Silkin <ssilkin@webrtc.org>
|
||||
Date: Fri, 30 Aug 2024 13:37:32 +0200
|
||||
Subject: [PATCH] Use AV1E_SET_AUTO_TILES
|
||||
|
||||
Delegate control over number of times to encoder using AV1E_SET_AUTO_TILES that was added in https://aomedia-review.googlesource.com/c/aom/+/191102.
|
||||
|
||||
Bug: webrtc:351644568
|
||||
Change-Id: I87ed11734e907c7f6c6508ac7389c84ececf5b21
|
||||
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361140
|
||||
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
|
||||
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#42903}
|
||||
---
|
||||
.../codecs/av1/libaom_av1_encoder.cc | 16 +---------------
|
||||
1 file changed, 1 insertion(+), 15 deletions(-)
|
||||
|
||||
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||
index db9238477d..c06792207e 100644
|
||||
--- a/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||
+++ b/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||
@@ -307,21 +307,7 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_PALETTE, 0);
|
||||
}
|
||||
|
||||
- if (cfg_.g_threads == 8) {
|
||||
- // Values passed to AV1E_SET_TILE_ROWS and AV1E_SET_TILE_COLUMNS are log2()
|
||||
- // based.
|
||||
- // Use 4 tile columns x 2 tile rows for 8 threads.
|
||||
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_ROWS, 1);
|
||||
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS, 2);
|
||||
- } else if (cfg_.g_threads == 4) {
|
||||
- // Use 2 tile columns x 2 tile rows for 4 threads.
|
||||
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_ROWS, 1);
|
||||
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS, 1);
|
||||
- } else {
|
||||
- SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS,
|
||||
- static_cast<int>(log2(cfg_.g_threads)));
|
||||
- }
|
||||
-
|
||||
+ SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_AUTO_TILES, 1);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ROW_MT, 1);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_OBMC, 0);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_NOISE_SENSITIVITY, 0);
|
@@ -1,66 +0,0 @@
|
||||
From 84273f56d92953f15269cdb1d95d1851f83a8fe9 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Silkin <ssilkin@webrtc.org>
|
||||
Date: Fri, 30 Aug 2024 12:32:52 +0200
|
||||
Subject: [PATCH] Specify max number of consecutive drops using time units
|
||||
|
||||
AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR was added in https://aomedia-review.googlesource.com/c/aom/+/192402. It allows to configure max number of consecutive frame drops using time units. Use it instead of AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.
|
||||
|
||||
Bug: webrtc:351644568
|
||||
Change-Id: I73265d5258d681926eb5b65e32c2a61b26c310ba
|
||||
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360842
|
||||
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
|
||||
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#42995}
|
||||
---
|
||||
.../codecs/av1/libaom_av1_encoder.cc | 24 ++++---------------
|
||||
1 file changed, 5 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/modules/video_coding/codecs/av1/libaom_av1_encoder.cc b/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||
index 6b71874c3f..262cb9d36b 100644
|
||||
--- a/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||
+++ b/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc
|
||||
@@ -166,14 +166,6 @@ int32_t VerifyCodecSettings(const VideoCodec& codec_settings) {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
-int GetMaxConsecDrops(double framerate_fps) {
|
||||
- // Consecutive frame drops result in a video freeze. We want to minimize the
|
||||
- // max number of consecutive drops and, at the same time, keep the value high
|
||||
- // enough to let encoder drain the buffer at overshoot.
|
||||
- constexpr double kMaxFreezeSeconds = 0.25;
|
||||
- return std::ceil(kMaxFreezeSeconds * framerate_fps);
|
||||
-}
|
||||
-
|
||||
LibaomAv1Encoder::LibaomAv1Encoder(const Environment& env,
|
||||
LibaomAv1EncoderSettings settings)
|
||||
: inited_(false),
|
||||
@@ -339,6 +331,11 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_TX64, 0);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_REFERENCE_FRAMES, 3);
|
||||
|
||||
+ if (adaptive_max_consec_drops_) {
|
||||
+ SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR,
|
||||
+ 250);
|
||||
+ }
|
||||
+
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
@@ -815,17 +812,6 @@ void LibaomAv1Encoder::SetRates(const RateControlParameters& parameters) {
|
||||
SetEncoderControlParameters(AV1E_SET_SVC_PARAMS, &*svc_params_);
|
||||
}
|
||||
|
||||
- if (adaptive_max_consec_drops_ &&
|
||||
- (!rates_configured_ || framerate_fps_ != parameters.framerate_fps)) {
|
||||
- int max_consec_drops = GetMaxConsecDrops(parameters.framerate_fps);
|
||||
- if (!SetEncoderControlParameters(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR,
|
||||
- max_consec_drops)) {
|
||||
- RTC_LOG(LS_WARNING)
|
||||
- << "Failed to set AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR to "
|
||||
- << max_consec_drops;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
framerate_fps_ = parameters.framerate_fps;
|
||||
|
||||
rates_configured_ = true;
|
@@ -1,98 +0,0 @@
|
||||
From e4d212302ed2e71c224ae67bdaf2a2816be34f21 Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Buelens <mattias.buelens@gmail.com>
|
||||
Date: Tue, 26 Mar 2024 19:25:54 +0000
|
||||
Subject: [PATCH] streams: Fix gcc compatibility for
|
||||
ReadableStream::valuesForBinding()
|
||||
|
||||
The perfect forwarding technique we used turned out to be incompatible
|
||||
with gcc. Revert to something simpler.
|
||||
|
||||
Bug: 40612900
|
||||
Change-Id: I45f3588354fe96159c7f84d969ac222a935b1c1a
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372645
|
||||
Reviewed-by: Adam Rice <ricea@chromium.org>
|
||||
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
|
||||
Commit-Queue: Adam Rice <ricea@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1278534}
|
||||
---
|
||||
.../bindings/core/v8/async_iterable.h | 32 +++++++++----------
|
||||
1 file changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/async_iterable.h b/third_party/blink/renderer/bindings/core/v8/async_iterable.h
|
||||
index 115ee5303414c..8a0d085b8174e 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/async_iterable.h
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/async_iterable.h
|
||||
@@ -200,42 +200,42 @@ class PairAsyncIterable {
|
||||
PairAsyncIterable(const PairAsyncIterable&) = delete;
|
||||
PairAsyncIterable& operator=(const PairAsyncIterable&) = delete;
|
||||
|
||||
+ template <typename... ArgsAndExceptionState>
|
||||
AsyncIteratorType* keysForBinding(
|
||||
ScriptState* script_state,
|
||||
- std::convertible_to<InitArgs> auto&&... args,
|
||||
- ExceptionState& exception_state) {
|
||||
+ ArgsAndExceptionState&&... args_and_exception_state) {
|
||||
const auto kind = IterationSource::Kind::kKey;
|
||||
IterationSource* source = CreateIterationSource(
|
||||
- script_state, kind, std::forward<decltype(args)>(args)...,
|
||||
- exception_state);
|
||||
+ script_state, kind,
|
||||
+ std::forward<ArgsAndExceptionState>(args_and_exception_state)...);
|
||||
if (!source) {
|
||||
return nullptr;
|
||||
}
|
||||
return MakeGarbageCollected<AsyncIteratorType>(source);
|
||||
}
|
||||
|
||||
+ template <typename... ArgsAndExceptionState>
|
||||
AsyncIteratorType* valuesForBinding(
|
||||
ScriptState* script_state,
|
||||
- std::convertible_to<InitArgs> auto&&... args,
|
||||
- ExceptionState& exception_state) {
|
||||
+ ArgsAndExceptionState&&... args_and_exception_state) {
|
||||
const auto kind = IterationSource::Kind::kValue;
|
||||
IterationSource* source = CreateIterationSource(
|
||||
- script_state, kind, std::forward<decltype(args)>(args)...,
|
||||
- exception_state);
|
||||
+ script_state, kind,
|
||||
+ std::forward<ArgsAndExceptionState>(args_and_exception_state)...);
|
||||
if (!source) {
|
||||
return nullptr;
|
||||
}
|
||||
return MakeGarbageCollected<AsyncIteratorType>(source);
|
||||
}
|
||||
|
||||
+ template <typename... ArgsAndExceptionState>
|
||||
AsyncIteratorType* entriesForBinding(
|
||||
ScriptState* script_state,
|
||||
- std::convertible_to<InitArgs> auto&&... args,
|
||||
- ExceptionState& exception_state) {
|
||||
+ ArgsAndExceptionState&&... args_and_exception_state) {
|
||||
const auto kind = IterationSource::Kind::kKeyValue;
|
||||
IterationSource* source = CreateIterationSource(
|
||||
- script_state, kind, std::forward<decltype(args)>(args)...,
|
||||
- exception_state);
|
||||
+ script_state, kind,
|
||||
+ std::forward<ArgsAndExceptionState>(args_and_exception_state)...);
|
||||
if (!source) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -274,14 +274,14 @@ class ValueAsyncIterable {
|
||||
ValueAsyncIterable(const ValueAsyncIterable&) = delete;
|
||||
ValueAsyncIterable& operator=(const ValueAsyncIterable&) = delete;
|
||||
|
||||
+ template <typename... ArgsAndExceptionState>
|
||||
AsyncIteratorType* valuesForBinding(
|
||||
ScriptState* script_state,
|
||||
- std::convertible_to<InitArgs> auto&&... args,
|
||||
- ExceptionState& exception_state) {
|
||||
+ ArgsAndExceptionState&&... args_and_exception_state) {
|
||||
const auto kind = IterationSource::Kind::kValue;
|
||||
IterationSource* source = CreateIterationSource(
|
||||
- script_state, kind, std::forward<decltype(args)>(args)...,
|
||||
- exception_state);
|
||||
+ script_state, kind,
|
||||
+ std::forward<ArgsAndExceptionState>(args_and_exception_state)...);
|
||||
if (!source) {
|
||||
return nullptr;
|
||||
}
|
@@ -1,250 +0,0 @@
|
||||
Revert the following commit:
|
||||
|
||||
commit 886c849ee96e3026d28d7615cdd5af9628a2e5c8
|
||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Date: Tue Feb 20 18:18:04 2024 +0000
|
||||
|
||||
[gc] Make UnicodeRangeSet gc'd.
|
||||
|
||||
There should be no user-visible behaviour change.
|
||||
|
||||
Bug: 41490008
|
||||
Change-Id: I7f0003b7ff7c464d4ee36442bcff8c63da79b20c
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302778
|
||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1262789}
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/css_font_face.cc
|
||||
+++ b/third_party/blink/renderer/core/css/css_font_face.cc
|
||||
@@ -291,7 +291,6 @@ bool CSSFontFace::UpdatePeriod() {
|
||||
void CSSFontFace::Trace(Visitor* visitor) const {
|
||||
visitor->Trace(segmented_font_faces_);
|
||||
visitor->Trace(sources_);
|
||||
- visitor->Trace(ranges_);
|
||||
visitor->Trace(font_face_);
|
||||
}
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/css_font_face.h
|
||||
+++ b/third_party/blink/renderer/core/css/css_font_face.h
|
||||
@@ -47,8 +47,8 @@ class SimpleFontData;
|
||||
|
||||
class CORE_EXPORT CSSFontFace final : public GarbageCollected<CSSFontFace> {
|
||||
public:
|
||||
- CSSFontFace(FontFace* font_face, HeapVector<UnicodeRange>&& ranges)
|
||||
- : ranges_(MakeGarbageCollected<UnicodeRangeSet>(std::move(ranges))),
|
||||
+ CSSFontFace(FontFace* font_face, Vector<UnicodeRange>& ranges)
|
||||
+ : ranges_(base::AdoptRef(new UnicodeRangeSet(ranges))),
|
||||
font_face_(font_face) {
|
||||
DCHECK(font_face_);
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class CORE_EXPORT CSSFontFace final : pu
|
||||
}
|
||||
FontFace* GetFontFace() const { return font_face_.Get(); }
|
||||
|
||||
- const UnicodeRangeSet* Ranges() { return ranges_.Get(); }
|
||||
+ scoped_refptr<UnicodeRangeSet> Ranges() { return ranges_; }
|
||||
|
||||
void AddSegmentedFontFace(CSSSegmentedFontFace*);
|
||||
void RemoveSegmentedFontFace(CSSSegmentedFontFace*);
|
||||
@@ -98,9 +98,9 @@ class CORE_EXPORT CSSFontFace final : pu
|
||||
private:
|
||||
void SetLoadStatus(FontFace::LoadStatusType);
|
||||
|
||||
+ scoped_refptr<UnicodeRangeSet> ranges_;
|
||||
HeapHashSet<Member<CSSSegmentedFontFace>> segmented_font_faces_;
|
||||
HeapDeque<Member<CSSFontFaceSource>> sources_;
|
||||
- Member<const UnicodeRangeSet> ranges_;
|
||||
Member<FontFace> font_face_;
|
||||
};
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/font_face.cc
|
||||
+++ b/third_party/blink/renderer/core/css/font_face.cc
|
||||
@@ -90,7 +90,7 @@ const CSSValue* ParseCSSValue(const Exec
|
||||
|
||||
CSSFontFace* CreateCSSFontFace(FontFace* font_face,
|
||||
const CSSValue* unicode_range) {
|
||||
- HeapVector<UnicodeRange> ranges;
|
||||
+ Vector<UnicodeRange> ranges;
|
||||
if (const auto* range_list = To<CSSValueList>(unicode_range)) {
|
||||
unsigned num_ranges = range_list->length();
|
||||
for (unsigned i = 0; i < num_ranges; i++) {
|
||||
@@ -100,7 +100,7 @@ CSSFontFace* CreateCSSFontFace(FontFace*
|
||||
}
|
||||
}
|
||||
|
||||
- return MakeGarbageCollected<CSSFontFace>(font_face, std::move(ranges));
|
||||
+ return MakeGarbageCollected<CSSFontFace>(font_face, ranges);
|
||||
}
|
||||
|
||||
const CSSValue* ConvertFontMetricOverrideValue(const CSSValue* parsed_value) {
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_data_for_range_set.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_data_for_range_set.h
|
||||
@@ -39,18 +39,16 @@ class SimpleFontData;
|
||||
class PLATFORM_EXPORT FontDataForRangeSet
|
||||
: public GarbageCollected<FontDataForRangeSet> {
|
||||
public:
|
||||
- explicit FontDataForRangeSet(const SimpleFontData* font_data = nullptr,
|
||||
- const UnicodeRangeSet* range_set = nullptr)
|
||||
- : font_data_(font_data), range_set_(range_set) {}
|
||||
+ explicit FontDataForRangeSet(
|
||||
+ const SimpleFontData* font_data = nullptr,
|
||||
+ scoped_refptr<UnicodeRangeSet> range_set = nullptr)
|
||||
+ : font_data_(font_data), range_set_(std::move(range_set)) {}
|
||||
|
||||
FontDataForRangeSet(const FontDataForRangeSet& other);
|
||||
|
||||
virtual ~FontDataForRangeSet() = default;
|
||||
|
||||
- void Trace(Visitor* visitor) const {
|
||||
- visitor->Trace(font_data_);
|
||||
- visitor->Trace(range_set_);
|
||||
- }
|
||||
+ void Trace(Visitor* visitor) const { visitor->Trace(font_data_); }
|
||||
|
||||
bool Contains(UChar32 test_char) const {
|
||||
return !range_set_ || range_set_->Contains(test_char);
|
||||
@@ -58,7 +56,7 @@ class PLATFORM_EXPORT FontDataForRangeSe
|
||||
bool IsEntireRange() const {
|
||||
return !range_set_ || range_set_->IsEntireRange();
|
||||
}
|
||||
- const UnicodeRangeSet* Ranges() const { return range_set_.Get(); }
|
||||
+ UnicodeRangeSet* Ranges() const { return range_set_.get(); }
|
||||
bool HasFontData() const { return font_data_; }
|
||||
const SimpleFontData* FontData() const { return font_data_.Get(); }
|
||||
|
||||
@@ -74,7 +72,7 @@ class PLATFORM_EXPORT FontDataForRangeSe
|
||||
|
||||
protected:
|
||||
Member<const SimpleFontData> font_data_;
|
||||
- Member<const UnicodeRangeSet> range_set_;
|
||||
+ scoped_refptr<UnicodeRangeSet> range_set_;
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
@@ -508,10 +508,10 @@ const OpenTypeVerticalData& HarfBuzzFace
|
||||
return *harfbuzz_font_data_->VerticalData();
|
||||
}
|
||||
|
||||
-hb_font_t* HarfBuzzFace::GetScaledFont(const UnicodeRangeSet* range_set,
|
||||
+hb_font_t* HarfBuzzFace::GetScaledFont(scoped_refptr<UnicodeRangeSet> range_set,
|
||||
VerticalLayoutCallbacks vertical_layout,
|
||||
float specified_size) const {
|
||||
- harfbuzz_font_data_->range_set_ = range_set;
|
||||
+ harfbuzz_font_data_->range_set_ = std::move(range_set);
|
||||
harfbuzz_font_data_->UpdateFallbackMetricsAndScale(*platform_data_,
|
||||
vertical_layout);
|
||||
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
||||
@@ -66,7 +66,7 @@ class HarfBuzzFace final : public Garbag
|
||||
// Passing in specified_size in order to control selecting the right value
|
||||
// from the trak table. If not set, the size of the internal FontPlatformData
|
||||
// object will be used.
|
||||
- hb_font_t* GetScaledFont(const UnicodeRangeSet*,
|
||||
+ hb_font_t* GetScaledFont(scoped_refptr<UnicodeRangeSet>,
|
||||
VerticalLayoutCallbacks,
|
||||
float specified_size) const;
|
||||
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
@@ -32,7 +32,7 @@ struct HarfBuzzFontData final : public G
|
||||
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
|
||||
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
|
||||
|
||||
- void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
|
||||
+ void Trace(Visitor*) const {}
|
||||
|
||||
// The vertical origin and vertical advance functions in HarfBuzzFace require
|
||||
// the ascent and height metrics as fallback in case no specific vertical
|
||||
@@ -98,7 +98,7 @@ struct HarfBuzzFontData final : public G
|
||||
SpaceGlyphInOpenTypeTables::kUnknown;
|
||||
|
||||
scoped_refptr<OpenTypeVerticalData> vertical_data_;
|
||||
- Member<const UnicodeRangeSet> range_set_;
|
||||
+ scoped_refptr<UnicodeRangeSet> range_set_;
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
||||
@@ -289,7 +289,7 @@ void RoundHarfBuzzBufferPositions(hb_buf
|
||||
inline bool ShapeRange(hb_buffer_t* buffer,
|
||||
const FontFeatures& font_features,
|
||||
const SimpleFontData* current_font,
|
||||
- const UnicodeRangeSet* current_font_range_set,
|
||||
+ scoped_refptr<UnicodeRangeSet> current_font_range_set,
|
||||
UScriptCode current_run_script,
|
||||
hb_direction_t direction,
|
||||
hb_language_t language,
|
||||
@@ -325,7 +325,7 @@ inline bool ShapeRange(hb_buffer_t* buff
|
||||
hb_buffer_set_direction(buffer, direction);
|
||||
|
||||
hb_font_t* hb_font =
|
||||
- face->GetScaledFont(current_font_range_set,
|
||||
+ face->GetScaledFont(std::move(current_font_range_set),
|
||||
HB_DIRECTION_IS_VERTICAL(direction)
|
||||
? HarfBuzzFace::kPrepareForVerticalLayout
|
||||
: HarfBuzzFace::kNoVerticalLayout,
|
||||
--- a/third_party/blink/renderer/platform/fonts/unicode_range_set.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/unicode_range_set.cc
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
namespace blink {
|
||||
|
||||
-UnicodeRangeSet::UnicodeRangeSet(HeapVector<UnicodeRange>&& ranges)
|
||||
- : ranges_(std::move(ranges)) {
|
||||
+UnicodeRangeSet::UnicodeRangeSet(const Vector<UnicodeRange>& ranges)
|
||||
+ : ranges_(ranges) {
|
||||
if (ranges_.empty())
|
||||
return;
|
||||
|
||||
--- a/third_party/blink/renderer/platform/fonts/unicode_range_set.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/unicode_range_set.h
|
||||
@@ -26,12 +26,13 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_UNICODE_RANGE_SET_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_UNICODE_RANGE_SET_H_
|
||||
|
||||
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
|
||||
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
||||
+#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/wtf_uchar.h"
|
||||
+#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
|
||||
+#include "third_party/blink/renderer/platform/wtf/vector.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@@ -55,14 +56,13 @@ struct PLATFORM_EXPORT UnicodeRange fina
|
||||
UChar32 to_;
|
||||
};
|
||||
|
||||
-class PLATFORM_EXPORT UnicodeRangeSet
|
||||
- : public GarbageCollected<UnicodeRangeSet> {
|
||||
+class PLATFORM_EXPORT UnicodeRangeSet : public RefCounted<UnicodeRangeSet> {
|
||||
+ USING_FAST_MALLOC(UnicodeRangeSet);
|
||||
+
|
||||
public:
|
||||
- explicit UnicodeRangeSet(HeapVector<UnicodeRange>&&);
|
||||
+ explicit UnicodeRangeSet(const Vector<UnicodeRange>&);
|
||||
UnicodeRangeSet() = default;
|
||||
|
||||
- void Trace(Visitor* visitor) const { visitor->Trace(ranges_); }
|
||||
-
|
||||
bool Contains(UChar32) const;
|
||||
bool IntersectsWith(const String&) const;
|
||||
bool IsEntireRange() const { return ranges_.empty(); }
|
||||
@@ -71,8 +71,7 @@ class PLATFORM_EXPORT UnicodeRangeSet
|
||||
bool operator==(const UnicodeRangeSet& other) const;
|
||||
|
||||
private:
|
||||
- HeapVector<UnicodeRange>
|
||||
- ranges_; // If empty, represents the whole code space.
|
||||
+ Vector<UnicodeRange> ranges_; // If empty, represents the whole code space.
|
||||
};
|
||||
|
||||
} // namespace blink
|
@@ -1,159 +0,0 @@
|
||||
Revert the following commit:
|
||||
|
||||
commit 59daae50fc3c47f7a8dbcc828446fdaa9f8c12c4
|
||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Date: Tue Feb 20 18:35:11 2024 +0000
|
||||
|
||||
[gc] Make OpenTypeVerticalData gc'd.
|
||||
|
||||
There should be no user-visible behaviour change.
|
||||
|
||||
Bug: 41490008
|
||||
Change-Id: Id93c85a7beb710944e07cff614cff2409c818436
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302893
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1262805}
|
||||
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.cc
|
||||
@@ -308,6 +308,11 @@ SkFont FontPlatformData::CreateSkFont(co
|
||||
}
|
||||
#endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_IOS)
|
||||
|
||||
+scoped_refptr<OpenTypeVerticalData> FontPlatformData::CreateVerticalData()
|
||||
+ const {
|
||||
+ return OpenTypeVerticalData::CreateUnscaled(typeface_);
|
||||
+}
|
||||
+
|
||||
IdentifiableToken FontPlatformData::ComputeTypefaceDigest() const {
|
||||
DCHECK(typeface_);
|
||||
int table_count = typeface_->countTables();
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.h
|
||||
@@ -59,6 +59,7 @@ typedef const struct __CTFont* CTFontRef
|
||||
namespace blink {
|
||||
|
||||
class HarfBuzzFace;
|
||||
+class OpenTypeVerticalData;
|
||||
|
||||
class PLATFORM_EXPORT FontPlatformData
|
||||
: public GarbageCollected<FontPlatformData> {
|
||||
@@ -137,6 +138,8 @@ class PLATFORM_EXPORT FontPlatformData
|
||||
|
||||
SkFont CreateSkFont(const FontDescription* = nullptr) const;
|
||||
|
||||
+ scoped_refptr<OpenTypeVerticalData> CreateVerticalData() const;
|
||||
+
|
||||
// Computes a digest from the typeface. The digest only depends on the
|
||||
// underlying font itself, and does not vary by the style (size, weight,
|
||||
// italics, etc). This is aimed at discovering the fingerprinting information
|
||||
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
|
||||
@@ -27,10 +27,10 @@
|
||||
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/glyph.h"
|
||||
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
|
||||
+#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/vector.h"
|
||||
#include "third_party/skia/include/core/SkRefCnt.h"
|
||||
#include "third_party/skia/include/core/SkTypeface.h"
|
||||
@@ -40,11 +40,14 @@ class SkFont;
|
||||
namespace blink {
|
||||
|
||||
class PLATFORM_EXPORT OpenTypeVerticalData
|
||||
- : public GarbageCollected<OpenTypeVerticalData> {
|
||||
- public:
|
||||
- explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
|
||||
+ : public RefCounted<OpenTypeVerticalData> {
|
||||
+ USING_FAST_MALLOC(OpenTypeVerticalData);
|
||||
|
||||
- void Trace(Visitor*) const {}
|
||||
+ public:
|
||||
+ static scoped_refptr<OpenTypeVerticalData> CreateUnscaled(
|
||||
+ sk_sp<SkTypeface> typeface) {
|
||||
+ return base::AdoptRef(new OpenTypeVerticalData(typeface));
|
||||
+ }
|
||||
|
||||
void SetScaleAndFallbackMetrics(float size_per_unit,
|
||||
float ascent,
|
||||
@@ -60,6 +63,8 @@ class PLATFORM_EXPORT OpenTypeVerticalDa
|
||||
float* out_xy_array) const;
|
||||
|
||||
private:
|
||||
+ explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
|
||||
+
|
||||
void LoadMetrics(sk_sp<SkTypeface>);
|
||||
bool HasVORG() const { return !vert_origin_y_.empty(); }
|
||||
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
@@ -202,7 +202,8 @@
|
||||
void* user_data) {
|
||||
HarfBuzzFontData* hb_font_data =
|
||||
reinterpret_cast<HarfBuzzFontData*>(font_data);
|
||||
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
|
||||
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
|
||||
+ hb_font_data->VerticalData();
|
||||
if (!vertical_data) {
|
||||
return false;
|
||||
}
|
||||
@@ -223,7 +223,8 @@ static hb_position_t HarfBuzzGetGlyphVer
|
||||
void* user_data) {
|
||||
HarfBuzzFontData* hb_font_data =
|
||||
reinterpret_cast<HarfBuzzFontData*>(font_data);
|
||||
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
|
||||
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
|
||||
+ hb_font_data->VerticalData();
|
||||
if (!vertical_data) {
|
||||
return SkiaScalarToHarfBuzzPosition(hb_font_data->height_fallback_);
|
||||
}
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
@@ -32,10 +32,7 @@ struct HarfBuzzFontData final : public G
|
||||
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
|
||||
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
|
||||
|
||||
- void Trace(Visitor* visitor) const {
|
||||
- visitor->Trace(vertical_data_);
|
||||
- visitor->Trace(range_set_);
|
||||
- }
|
||||
+ void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
|
||||
|
||||
// The vertical origin and vertical advance functions in HarfBuzzFace require
|
||||
// the ascent and height metrics as fallback in case no specific vertical
|
||||
@@ -70,18 +67,18 @@ struct HarfBuzzFontData final : public G
|
||||
}
|
||||
}
|
||||
|
||||
- OpenTypeVerticalData* VerticalData() {
|
||||
+ scoped_refptr<OpenTypeVerticalData> VerticalData() {
|
||||
if (!vertical_data_) {
|
||||
DCHECK_NE(ascent_fallback_, kInvalidFallbackMetricsValue);
|
||||
DCHECK_NE(height_fallback_, kInvalidFallbackMetricsValue);
|
||||
DCHECK_NE(size_per_unit_, kInvalidFallbackMetricsValue);
|
||||
|
||||
vertical_data_ =
|
||||
- MakeGarbageCollected<OpenTypeVerticalData>(font_.refTypeface());
|
||||
+ OpenTypeVerticalData::CreateUnscaled(font_.refTypeface());
|
||||
}
|
||||
vertical_data_->SetScaleAndFallbackMetrics(size_per_unit_, ascent_fallback_,
|
||||
height_fallback_);
|
||||
- return vertical_data_.Get();
|
||||
+ return vertical_data_;
|
||||
}
|
||||
|
||||
const hb::unique_ptr<hb_font_t> unscaled_font_;
|
||||
@@ -100,7 +97,7 @@ struct HarfBuzzFontData final : public G
|
||||
SpaceGlyphInOpenTypeTables space_in_gsub_ =
|
||||
SpaceGlyphInOpenTypeTables::kUnknown;
|
||||
|
||||
- Member<OpenTypeVerticalData> vertical_data_;
|
||||
+ scoped_refptr<OpenTypeVerticalData> vertical_data_;
|
||||
Member<const UnicodeRangeSet> range_set_;
|
||||
};
|
||||
|
@@ -1,107 +0,0 @@
|
||||
Revert the following commit:
|
||||
|
||||
commit 5ffa0446f51e34d06dc0539810a8a5d35ec9e3fc
|
||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Date: Thu Feb 22 17:08:22 2024 +0000
|
||||
|
||||
[fonts][perf] Explicitly leak SimpleFontDatas via a LRU cache.
|
||||
|
||||
This adds a strong LRU cache to FontDataCache to retain the most
|
||||
recently used fonts.
|
||||
|
||||
This covers the case where a large amount of DOM is destroyed, and
|
||||
previously we'd release all the font related objects if the GC kicked
|
||||
in.
|
||||
|
||||
Speedometer3 appears to peak at ~75 objects in the cache.
|
||||
|
||||
Results for different cache sizes:
|
||||
|
||||
Cache size: 64 | 32 | 16
|
||||
Speedometer3: +0.9% | +0.5% | +0%
|
||||
|
||||
Bug: 41490008
|
||||
Change-Id: I131b6a79f246e61e13a7d44dddbc1f9e625ed44a
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5314842
|
||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1264027}
|
||||
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_data_cache.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_data_cache.cc
|
||||
@@ -36,15 +36,6 @@
|
||||
|
||||
namespace blink {
|
||||
|
||||
-namespace {
|
||||
-
|
||||
-// The maximum number of strong references to retain via the LRU.
|
||||
-// This explicitly leaks fonts (and related objects) unless under extreme
|
||||
-// memory pressure where it will be cleared. DO NOT increase unnecessarily.
|
||||
-const wtf_size_t kMaxSize = 64;
|
||||
-
|
||||
-} // namespace
|
||||
-
|
||||
const SimpleFontData* FontDataCache::Get(const FontPlatformData* platform_data,
|
||||
bool subpixel_ascent_descent) {
|
||||
if (!platform_data)
|
||||
@@ -64,16 +55,7 @@ const SimpleFontData* FontDataCache::Get
|
||||
add_result.stored_value->value = MakeGarbageCollected<SimpleFontData>(
|
||||
platform_data, nullptr, subpixel_ascent_descent);
|
||||
}
|
||||
-
|
||||
- const SimpleFontData* result = add_result.stored_value->value;
|
||||
-
|
||||
- // Update our LRU to keep a strong reference to `result`.
|
||||
- strong_reference_lru_.PrependOrMoveToFirst(result);
|
||||
- while (strong_reference_lru_.size() > kMaxSize) {
|
||||
- strong_reference_lru_.pop_back();
|
||||
- }
|
||||
-
|
||||
- return result;
|
||||
+ return add_result.stored_value->value;
|
||||
}
|
||||
|
||||
} // namespace blink
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_data_cache.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_data_cache.h
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "third_party/blink/renderer/platform/fonts/font_platform_data.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/simple_font_data.h"
|
||||
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
|
||||
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_linked_hash_set.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@@ -59,29 +58,17 @@ class FontDataCache final {
|
||||
FontDataCache(const FontDataCache&) = delete;
|
||||
FontDataCache& operator=(const FontDataCache&) = delete;
|
||||
|
||||
- void Trace(Visitor* visitor) const {
|
||||
- visitor->Trace(cache_);
|
||||
- visitor->Trace(strong_reference_lru_);
|
||||
- }
|
||||
+ void Trace(Visitor* visitor) const { visitor->Trace(cache_); }
|
||||
|
||||
const SimpleFontData* Get(const FontPlatformData*,
|
||||
bool subpixel_ascent_descent = false);
|
||||
- void Clear() {
|
||||
- cache_.clear();
|
||||
- strong_reference_lru_.clear();
|
||||
- }
|
||||
+ void Clear() { cache_.clear(); }
|
||||
|
||||
private:
|
||||
HeapHashMap<Member<const FontPlatformData>,
|
||||
WeakMember<const SimpleFontData>,
|
||||
FontDataCacheKeyHashTraits>
|
||||
cache_;
|
||||
-
|
||||
- // The above `cache_` is weak, meaning its entries will potentially be
|
||||
- // cleared if no other references exist.
|
||||
- // This LRU keeps a small (limited) number of strong references alive so they
|
||||
- // won't be cleared in the above cache for performance reasons.
|
||||
- HeapLinkedHashSet<Member<const SimpleFontData>> strong_reference_lru_;
|
||||
};
|
||||
|
||||
} // namespace blink
|
@@ -1,425 +0,0 @@
|
||||
Revert the following commit:
|
||||
|
||||
|
||||
commit cc6c0b2a9e1dbc96f3ebed713dc71960a29dc4f1
|
||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Date: Tue Mar 5 20:27:13 2024 +0000
|
||||
|
||||
Reland "[gc] Make FontFamily immutable."
|
||||
|
||||
This reverts commit 748ed11510ec5bb09cc8b92f67f1f62964f023fa.
|
||||
|
||||
Reason for revert: Previous patch which caused MSAN issue was reapplied.
|
||||
|
||||
Original change's description:
|
||||
> Revert "[gc] Make FontFamily immutable."
|
||||
>
|
||||
> This reverts commit ca3d3085d8b01fc74623d639c615fc57842cd26d.
|
||||
>
|
||||
> Reason for revert: crrev.com/c/5328767 is the reason for failure on some tests on MSAN. Please see crbug.com/327969288 for more details.
|
||||
>
|
||||
> Original change's description:
|
||||
> > [gc] Make FontFamily immutable.
|
||||
> >
|
||||
> > Previously we'd build up font-family lists front to back, but would
|
||||
> > need to mutate them to do so. Instead just build them backwards.
|
||||
> >
|
||||
> > This removes a bunch of problematic APIs (like AppendFamily - which
|
||||
> > doesn't append), and simplifies the code.
|
||||
> >
|
||||
> > This will help avoid atomic write barriers once converted to oilpan.
|
||||
> >
|
||||
> > Bug: 41490008
|
||||
> > Change-Id: Icfcec2d0a1716585cf42985616c02b42b6647943
|
||||
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5322929
|
||||
> > Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
> > Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
||||
> > Cr-Commit-Position: refs/heads/main@{#1267168}
|
||||
>
|
||||
> Bug: 41490008, 327969288
|
||||
> Change-Id: Ic69a5707d00cc98b97dcae3f4b8207b452ce5cbd
|
||||
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5333950
|
||||
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
||||
> Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
|
||||
> Owners-Override: Taiyo Mizuhashi <taiyo@chromium.org>
|
||||
> Cr-Commit-Position: refs/heads/main@{#1267674}
|
||||
|
||||
Bug: 41490008, 327969288
|
||||
Change-Id: If1d395e324b0be15488ef5410e9bcdb219bb19c6
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5344844
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1268654}
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/css_font_face.cc
|
||||
+++ b/third_party/blink/renderer/core/css/css_font_face.cc
|
||||
@@ -216,8 +216,9 @@ bool CSSFontFace::MaybeLoadFont(const Fo
|
||||
|
||||
void CSSFontFace::Load() {
|
||||
FontDescription font_description;
|
||||
- font_description.SetFamily(
|
||||
- FontFamily(font_face_->family(), FontFamily::Type::kFamilyName));
|
||||
+ FontFamily font_family;
|
||||
+ font_family.SetFamily(font_face_->family(), FontFamily::Type::kFamilyName);
|
||||
+ font_description.SetFamily(font_family);
|
||||
Load(font_description);
|
||||
}
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/font_face_set_document.cc
|
||||
+++ b/third_party/blink/renderer/core/css/font_face_set_document.cc
|
||||
@@ -195,10 +195,13 @@ bool FontFaceSetDocument::ResolveFontSty
|
||||
ComputedStyleBuilder builder =
|
||||
GetDocument()->GetStyleResolver().CreateComputedStyleBuilder();
|
||||
|
||||
- FontDescription default_font_description;
|
||||
- default_font_description.SetFamily(FontFamily(
|
||||
+ FontFamily font_family;
|
||||
+ font_family.SetFamily(
|
||||
FontFaceSet::DefaultFontFamily(),
|
||||
- FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily())));
|
||||
+ FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily()));
|
||||
+
|
||||
+ FontDescription default_font_description;
|
||||
+ default_font_description.SetFamily(font_family);
|
||||
default_font_description.SetSpecifiedSize(FontFaceSet::kDefaultFontSize);
|
||||
default_font_description.SetComputedSize(FontFaceSet::kDefaultFontSize);
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/font_face_set_worker.cc
|
||||
+++ b/third_party/blink/renderer/core/css/font_face_set_worker.cc
|
||||
@@ -84,10 +84,13 @@ bool FontFaceSetWorker::ResolveFontStyle
|
||||
return false;
|
||||
}
|
||||
|
||||
- FontDescription default_font_description;
|
||||
- default_font_description.SetFamily(FontFamily(
|
||||
+ FontFamily font_family;
|
||||
+ font_family.SetFamily(
|
||||
FontFaceSet::DefaultFontFamily(),
|
||||
- FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily())));
|
||||
+ FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily()));
|
||||
+
|
||||
+ FontDescription default_font_description;
|
||||
+ default_font_description.SetFamily(font_family);
|
||||
default_font_description.SetSpecifiedSize(FontFaceSet::kDefaultFontSize);
|
||||
default_font_description.SetComputedSize(FontFaceSet::kDefaultFontSize);
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/resolver/font_builder.cc
|
||||
+++ b/third_party/blink/renderer/core/css/resolver/font_builder.cc
|
||||
@@ -54,9 +54,11 @@ void FontBuilder::DidChangeWritingMode()
|
||||
}
|
||||
|
||||
FontFamily FontBuilder::StandardFontFamily() const {
|
||||
+ FontFamily family;
|
||||
const AtomicString& standard_font_family = StandardFontFamilyName();
|
||||
- return FontFamily(standard_font_family,
|
||||
- FontFamily::InferredTypeFor(standard_font_family));
|
||||
+ family.SetFamily(standard_font_family,
|
||||
+ FontFamily::InferredTypeFor(standard_font_family));
|
||||
+ return family;
|
||||
}
|
||||
|
||||
AtomicString FontBuilder::StandardFontFamilyName() const {
|
||||
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
|
||||
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
|
||||
@@ -379,8 +379,8 @@ FontDescription::FamilyDescription Style
|
||||
|
||||
if (const auto* system_font =
|
||||
DynamicTo<cssvalue::CSSPendingSystemFontValue>(value)) {
|
||||
- desc.family = FontFamily(system_font->ResolveFontFamily(),
|
||||
- FontFamily::Type::kFamilyName);
|
||||
+ desc.family.SetFamily(system_font->ResolveFontFamily(),
|
||||
+ FontFamily::Type::kFamilyName);
|
||||
return desc;
|
||||
}
|
||||
|
||||
@@ -410,8 +410,10 @@ FontDescription::FamilyDescription Style
|
||||
// Take the previous value and wrap it in a `SharedFontFamily` adding to
|
||||
// the linked list.
|
||||
if (has_value) {
|
||||
- next =
|
||||
- SharedFontFamily::Create(family_name, family_type, std::move(next));
|
||||
+ scoped_refptr<SharedFontFamily> shared = SharedFontFamily::Create();
|
||||
+ shared->SetFamily(family_name, family_type);
|
||||
+ shared->AppendFamily(next);
|
||||
+ next = shared;
|
||||
}
|
||||
family_name = next_family_name;
|
||||
family_type = is_generic ? FontFamily::Type::kGenericFamily
|
||||
@@ -442,7 +444,8 @@ FontDescription::FamilyDescription Style
|
||||
}
|
||||
#endif
|
||||
|
||||
- desc.family = FontFamily(family_name, family_type, std::move(next));
|
||||
+ desc.family.SetFamily(family_name, family_type);
|
||||
+ desc.family.AppendFamily(next);
|
||||
return desc;
|
||||
}
|
||||
|
||||
--- a/third_party/blink/renderer/core/html/canvas/canvas_font_cache.cc
|
||||
+++ b/third_party/blink/renderer/core/html/canvas/canvas_font_cache.cc
|
||||
@@ -29,9 +29,11 @@ const int defaultFontSize = 10;
|
||||
|
||||
const ComputedStyle* CreateDefaultFontStyle(const Document& document) {
|
||||
const AtomicString& default_font_family = font_family_names::kSansSerif;
|
||||
+ FontFamily font_family;
|
||||
+ font_family.SetFamily(default_font_family,
|
||||
+ FontFamily::InferredTypeFor(default_font_family));
|
||||
FontDescription default_font_description;
|
||||
- default_font_description.SetFamily(FontFamily(
|
||||
- default_font_family, FontFamily::InferredTypeFor(default_font_family)));
|
||||
+ default_font_description.SetFamily(font_family);
|
||||
default_font_description.SetSpecifiedSize(defaultFontSize);
|
||||
default_font_description.SetComputedSize(defaultFontSize);
|
||||
ComputedStyleBuilder builder =
|
||||
--- a/third_party/blink/renderer/core/page/drag_image.cc
|
||||
+++ b/third_party/blink/renderer/core/page/drag_image.cc
|
||||
@@ -127,9 +127,11 @@ static Font DeriveDragLabelFont(int size
|
||||
const AtomicString& family =
|
||||
LayoutThemeFontProvider::SystemFontFamily(CSSValueID::kNone);
|
||||
|
||||
+ FontFamily font_family;
|
||||
+ font_family.SetFamily(family, FontFamily::InferredTypeFor(family));
|
||||
+
|
||||
FontDescription description;
|
||||
- description.SetFamily(
|
||||
- FontFamily(family, FontFamily::InferredTypeFor(family)));
|
||||
+ description.SetFamily(font_family);
|
||||
description.SetWeight(font_weight);
|
||||
description.SetSpecifiedSize(size);
|
||||
description.SetComputedSize(size);
|
||||
--- a/third_party/blink/renderer/core/paint/embedded_object_painter.cc
|
||||
+++ b/third_party/blink/renderer/core/paint/embedded_object_painter.cc
|
||||
@@ -32,9 +32,11 @@ static Font ReplacementTextFont(const Do
|
||||
const float size = LayoutThemeFontProvider::SystemFontSize(
|
||||
CSSValueID::kWebkitSmallControl, document);
|
||||
|
||||
+ FontFamily font_family;
|
||||
+ font_family.SetFamily(family, FontFamily::InferredTypeFor(family));
|
||||
+
|
||||
FontDescription font_description;
|
||||
- font_description.SetFamily(
|
||||
- FontFamily(family, FontFamily::InferredTypeFor(family)));
|
||||
+ font_description.SetFamily(font_family);
|
||||
font_description.SetWeight(kBoldWeightValue);
|
||||
font_description.SetSpecifiedSize(size);
|
||||
font_description.SetComputedSize(size);
|
||||
--- a/third_party/blink/renderer/platform/exported/web_font_description.cc
|
||||
+++ b/third_party/blink/renderer/platform/exported/web_font_description.cc
|
||||
@@ -49,10 +49,13 @@ WebFontDescription::WebFontDescription(c
|
||||
}
|
||||
|
||||
WebFontDescription::operator FontDescription() const {
|
||||
+ FontFamily font_family;
|
||||
+ font_family.SetFamily(family, family_is_generic
|
||||
+ ? FontFamily::Type::kGenericFamily
|
||||
+ : FontFamily::Type::kFamilyName);
|
||||
+
|
||||
FontDescription desc;
|
||||
- desc.SetFamily(FontFamily(family, family_is_generic
|
||||
- ? FontFamily::Type::kGenericFamily
|
||||
- : FontFamily::Type::kFamilyName));
|
||||
+ desc.SetFamily(font_family);
|
||||
desc.SetGenericFamily(
|
||||
static_cast<FontDescription::GenericFamilyType>(generic_family));
|
||||
desc.SetSpecifiedSize(size);
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_description.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_description.h
|
||||
@@ -195,6 +195,7 @@ class PLATFORM_EXPORT FontDescription {
|
||||
FamilyDescription GetFamilyDescription() const {
|
||||
return FamilyDescription(GenericFamily(), Family());
|
||||
}
|
||||
+ FontFamily& FirstFamily() { return family_list_; }
|
||||
const FontFamily& FirstFamily() const { return family_list_; }
|
||||
Size GetSize() const {
|
||||
return Size(KeywordSize(), SpecifiedSize(), IsAbsoluteSize());
|
||||
@@ -450,6 +451,10 @@ class PLATFORM_EXPORT FontDescription {
|
||||
return fields_.subpixel_ascent_descent_;
|
||||
}
|
||||
|
||||
+ void SetHashCategory(HashCategory category) {
|
||||
+ fields_.hash_category_ = category;
|
||||
+ }
|
||||
+
|
||||
HashCategory GetHashCategory() const {
|
||||
return static_cast<HashCategory>(fields_.hash_category_);
|
||||
}
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_fallback_list.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_fallback_list.cc
|
||||
@@ -178,8 +178,9 @@ const FontData* FontFallbackList::GetFon
|
||||
|
||||
if (font_selector_) {
|
||||
// Try the user's preferred standard font.
|
||||
- FontFamily font_family(font_family_names::kWebkitStandard,
|
||||
- FontFamily::Type::kGenericFamily);
|
||||
+ FontFamily font_family;
|
||||
+ font_family.SetFamily(font_family_names::kWebkitStandard,
|
||||
+ FontFamily::Type::kGenericFamily);
|
||||
if (const FontData* data =
|
||||
font_selector_->GetFontData(font_description, font_family)) {
|
||||
return data;
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_family.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_family.cc
|
||||
@@ -49,6 +49,20 @@ bool operator==(const FontFamily& a, con
|
||||
return true;
|
||||
}
|
||||
|
||||
+wtf_size_t FontFamily::CountNames() const {
|
||||
+ wtf_size_t count = 0;
|
||||
+ for (const FontFamily* font_family = this; font_family;
|
||||
+ font_family = font_family->Next())
|
||||
+ ++count;
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
+void FontFamily::AppendFamily(AtomicString family_name, Type family_type) {
|
||||
+ scoped_refptr<SharedFontFamily> appended_family = SharedFontFamily::Create();
|
||||
+ appended_family->SetFamily(family_name, family_type);
|
||||
+ AppendFamily(appended_family);
|
||||
+}
|
||||
+
|
||||
String FontFamily::ToString() const {
|
||||
StringBuilder builder;
|
||||
builder.Append(family_name_);
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_family.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_family.h
|
||||
@@ -39,18 +39,16 @@ class PLATFORM_EXPORT FontFamily {
|
||||
DISALLOW_NEW();
|
||||
|
||||
public:
|
||||
- // https://drafts.csswg.org/css-fonts/#font-family-prop
|
||||
- enum class Type : uint8_t { kFamilyName, kGenericFamily };
|
||||
-
|
||||
- FontFamily(const AtomicString& family_name,
|
||||
- Type family_type,
|
||||
- scoped_refptr<SharedFontFamily> next = nullptr)
|
||||
- : family_name_(family_name),
|
||||
- next_(std::move(next)),
|
||||
- family_type_(family_type) {}
|
||||
FontFamily() = default;
|
||||
~FontFamily();
|
||||
|
||||
+ // https://drafts.csswg.org/css-fonts/#font-family-prop
|
||||
+ enum class Type : uint8_t { kFamilyName, kGenericFamily };
|
||||
+
|
||||
+ void SetFamily(const AtomicString& family_name, Type family_type) {
|
||||
+ family_name_ = family_name;
|
||||
+ family_type_ = family_type;
|
||||
+ }
|
||||
// Return this font family's name. Note that it is never quoted nor escaped.
|
||||
// For web-exposed serialization, please rely instead on the functions
|
||||
// ComputedStyleUtils::ValueForFontFamily(const FontFamily&) and
|
||||
@@ -59,8 +57,13 @@ class PLATFORM_EXPORT FontFamily {
|
||||
const AtomicString& FamilyName() const { return family_name_; }
|
||||
bool FamilyIsGeneric() const { return family_type_ == Type::kGenericFamily; }
|
||||
|
||||
+ // Returns number of linked `FontFamily` including `this`, so return value is
|
||||
+ // greater than or equal to 1. When `Next()` is `nullptr`, return value is 1.
|
||||
+ wtf_size_t CountNames() const;
|
||||
const FontFamily* Next() const;
|
||||
|
||||
+ void AppendFamily(scoped_refptr<SharedFontFamily>);
|
||||
+ void AppendFamily(AtomicString family_name, Type family_type);
|
||||
scoped_refptr<SharedFontFamily> ReleaseNext();
|
||||
|
||||
bool IsPrewarmed() const { return is_prewarmed_; }
|
||||
@@ -93,19 +96,12 @@ class PLATFORM_EXPORT SharedFontFamily :
|
||||
SharedFontFamily(const SharedFontFamily&) = delete;
|
||||
SharedFontFamily& operator=(const SharedFontFamily&) = delete;
|
||||
|
||||
- static scoped_refptr<SharedFontFamily> Create(
|
||||
- const AtomicString& family_name,
|
||||
- Type family_type,
|
||||
- scoped_refptr<SharedFontFamily> next = nullptr) {
|
||||
- return base::AdoptRef(
|
||||
- new SharedFontFamily(family_name, family_type, std::move(next)));
|
||||
+ static scoped_refptr<SharedFontFamily> Create() {
|
||||
+ return base::AdoptRef(new SharedFontFamily);
|
||||
}
|
||||
|
||||
private:
|
||||
- SharedFontFamily(const AtomicString& family_name,
|
||||
- Type family_type,
|
||||
- scoped_refptr<SharedFontFamily> next)
|
||||
- : FontFamily(family_name, family_type, std::move(next)) {}
|
||||
+ SharedFontFamily() = default;
|
||||
};
|
||||
|
||||
PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&);
|
||||
@@ -125,6 +121,10 @@ inline const FontFamily* FontFamily::Nex
|
||||
return next_.get();
|
||||
}
|
||||
|
||||
+inline void FontFamily::AppendFamily(scoped_refptr<SharedFontFamily> family) {
|
||||
+ next_ = std::move(family);
|
||||
+}
|
||||
+
|
||||
inline scoped_refptr<SharedFontFamily> FontFamily::ReleaseNext() {
|
||||
return std::move(next_);
|
||||
}
|
||||
--- a/third_party/blink/renderer/platform/graphics/placeholder_image.cc
|
||||
+++ b/third_party/blink/renderer/platform/graphics/placeholder_image.cc
|
||||
@@ -85,18 +85,23 @@ void DrawCenteredIcon(cc::PaintCanvas* c
|
||||
}
|
||||
|
||||
FontDescription CreatePlaceholderFontDescription(float scale_factor) {
|
||||
- scoped_refptr<SharedFontFamily> arial = SharedFontFamily::Create(
|
||||
- font_family_names::kArial, FontFamily::Type::kFamilyName);
|
||||
- scoped_refptr<SharedFontFamily> helvetica = SharedFontFamily::Create(
|
||||
- font_family_names::kHelvetica, FontFamily::Type::kFamilyName, arial);
|
||||
- scoped_refptr<SharedFontFamily> helvetica_neue =
|
||||
- SharedFontFamily::Create(font_family_names::kHelveticaNeue,
|
||||
- FontFamily::Type::kFamilyName, helvetica);
|
||||
- FontFamily roboto(font_family_names::kRoboto, FontFamily::Type::kFamilyName,
|
||||
- helvetica_neue);
|
||||
-
|
||||
FontDescription description;
|
||||
- description.SetFamily(roboto);
|
||||
+ description.FirstFamily().SetFamily(font_family_names::kRoboto,
|
||||
+ FontFamily::Type::kFamilyName);
|
||||
+
|
||||
+ scoped_refptr<SharedFontFamily> helvetica_neue = SharedFontFamily::Create();
|
||||
+ helvetica_neue->SetFamily(font_family_names::kHelveticaNeue,
|
||||
+ FontFamily::Type::kFamilyName);
|
||||
+ scoped_refptr<SharedFontFamily> helvetica = SharedFontFamily::Create();
|
||||
+ helvetica->SetFamily(font_family_names::kHelvetica,
|
||||
+ FontFamily::Type::kFamilyName);
|
||||
+ scoped_refptr<SharedFontFamily> arial = SharedFontFamily::Create();
|
||||
+ arial->SetFamily(font_family_names::kArial, FontFamily::Type::kFamilyName);
|
||||
+
|
||||
+ helvetica->AppendFamily(std::move(arial));
|
||||
+ helvetica_neue->AppendFamily(std::move(helvetica));
|
||||
+ description.FirstFamily().AppendFamily(std::move(helvetica_neue));
|
||||
+
|
||||
description.SetGenericFamily(FontDescription::kSansSerifFamily);
|
||||
description.SetComputedSize(scale_factor * kFontSize);
|
||||
description.SetWeight(FontSelectionValue(500));
|
||||
--- a/third_party/blink/renderer/platform/testing/font_test_helpers.cc
|
||||
+++ b/third_party/blink/renderer/platform/testing/font_test_helpers.cc
|
||||
@@ -127,9 +127,11 @@ Font CreateTestFont(const AtomicString&
|
||||
size_t data_size,
|
||||
float size,
|
||||
const FontDescription::VariantLigatures* ligatures) {
|
||||
+ FontFamily family;
|
||||
+ family.SetFamily(family_name, FontFamily::Type::kFamilyName);
|
||||
+
|
||||
FontDescription font_description;
|
||||
- font_description.SetFamily(
|
||||
- FontFamily(family_name, FontFamily::Type::kFamilyName));
|
||||
+ font_description.SetFamily(family);
|
||||
font_description.SetSpecifiedSize(size);
|
||||
font_description.SetComputedSize(size);
|
||||
if (ligatures)
|
||||
@@ -143,9 +145,11 @@ Font CreateTestFont(const AtomicString&
|
||||
float size,
|
||||
const FontDescription::VariantLigatures* ligatures,
|
||||
void (*init_font_description)(FontDescription*)) {
|
||||
+ FontFamily family;
|
||||
+ family.SetFamily(family_name, FontFamily::Type::kFamilyName);
|
||||
+
|
||||
FontDescription font_description;
|
||||
- font_description.SetFamily(
|
||||
- FontFamily(family_name, FontFamily::Type::kFamilyName));
|
||||
+ font_description.SetFamily(family);
|
||||
font_description.SetSpecifiedSize(size);
|
||||
font_description.SetComputedSize(size);
|
||||
if (ligatures)
|
@@ -1,258 +0,0 @@
|
||||
This is a revert of the commit below. While it doesn't strictly fix any
|
||||
bugs, it's needed to support bad-font-gc2.patch building.
|
||||
|
||||
commit 9a8fc2e22363c954af239c06798bf85a9c928295
|
||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Date: Wed Feb 14 19:35:11 2024 +0000
|
||||
|
||||
[gc] Make FontCustomPlatformData gc'd.
|
||||
|
||||
There should be no user-visible behaviour change.
|
||||
|
||||
Bug: 41490008
|
||||
Change-Id: I6364bf4c5b5dce9f99d8e2d7e1f84537c5493c33
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5293060
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1260637}
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/binary_data_font_face_source.cc
|
||||
+++ b/third_party/blink/renderer/core/css/binary_data_font_face_source.cc
|
||||
@@ -27,16 +27,13 @@ BinaryDataFontFaceSource::BinaryDataFont
|
||||
return;
|
||||
}
|
||||
probe::FontsUpdated(context, font_face, String(),
|
||||
- custom_platform_data_.Get());
|
||||
+ custom_platform_data_.get());
|
||||
}
|
||||
|
||||
-void BinaryDataFontFaceSource::Trace(Visitor* visitor) const {
|
||||
- visitor->Trace(custom_platform_data_);
|
||||
- CSSFontFaceSource::Trace(visitor);
|
||||
-}
|
||||
+BinaryDataFontFaceSource::~BinaryDataFontFaceSource() = default;
|
||||
|
||||
bool BinaryDataFontFaceSource::IsValid() const {
|
||||
- return custom_platform_data_;
|
||||
+ return custom_platform_data_.get();
|
||||
}
|
||||
|
||||
SimpleFontData* BinaryDataFontFaceSource::CreateFontData(
|
||||
--- a/third_party/blink/renderer/core/css/binary_data_font_face_source.h
|
||||
+++ b/third_party/blink/renderer/core/css/binary_data_font_face_source.h
|
||||
@@ -16,14 +16,14 @@ class FontCustomPlatformData;
|
||||
class BinaryDataFontFaceSource final : public CSSFontFaceSource {
|
||||
public:
|
||||
BinaryDataFontFaceSource(CSSFontFace*, SharedBuffer*, String&);
|
||||
- void Trace(Visitor*) const override;
|
||||
+ ~BinaryDataFontFaceSource() override;
|
||||
bool IsValid() const override;
|
||||
|
||||
private:
|
||||
SimpleFontData* CreateFontData(const FontDescription&,
|
||||
const FontSelectionCapabilities&) override;
|
||||
|
||||
- Member<const FontCustomPlatformData> custom_platform_data_;
|
||||
+ scoped_refptr<FontCustomPlatformData> custom_platform_data_;
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
--- a/third_party/blink/renderer/core/css/remote_font_face_source.cc
|
||||
+++ b/third_party/blink/renderer/core/css/remote_font_face_source.cc
|
||||
@@ -262,7 +262,7 @@ void RemoteFontFaceSource::NotifyFinishe
|
||||
FontInvalidationReason::kFontFaceLoaded);
|
||||
if (custom_font_data_) {
|
||||
probe::FontsUpdated(execution_context, face_->GetFontFace(),
|
||||
- resource->Url().GetString(), custom_font_data_.Get());
|
||||
+ resource->Url().GetString(), custom_font_data_.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -456,7 +456,6 @@ void RemoteFontFaceSource::BeginLoadIfNe
|
||||
void RemoteFontFaceSource::Trace(Visitor* visitor) const {
|
||||
visitor->Trace(face_);
|
||||
visitor->Trace(font_selector_);
|
||||
- visitor->Trace(custom_font_data_);
|
||||
CSSFontFaceSource::Trace(visitor);
|
||||
FontResourceClient::Trace(visitor);
|
||||
}
|
||||
--- a/third_party/blink/renderer/core/css/remote_font_face_source.h
|
||||
+++ b/third_party/blink/renderer/core/css/remote_font_face_source.h
|
||||
@@ -43,7 +43,7 @@ class RemoteFontFaceSource final : publi
|
||||
bool IsPendingDataUrl() const override;
|
||||
|
||||
const FontCustomPlatformData* GetCustomPlaftormData() const override {
|
||||
- return custom_font_data_.Get();
|
||||
+ return custom_font_data_.get();
|
||||
}
|
||||
|
||||
void BeginLoadIfNeeded() override;
|
||||
@@ -157,7 +157,7 @@ class RemoteFontFaceSource final : publi
|
||||
Member<FontSelector> font_selector_;
|
||||
|
||||
// |nullptr| if font is not loaded or failed to decode.
|
||||
- Member<const FontCustomPlatformData> custom_font_data_;
|
||||
+ scoped_refptr<FontCustomPlatformData> custom_font_data_;
|
||||
// |nullptr| if font is not loaded or failed to decode.
|
||||
String url_;
|
||||
|
||||
--- a/third_party/blink/renderer/core/loader/resource/font_resource.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/resource/font_resource.cc
|
||||
@@ -112,7 +112,7 @@ void FontResource::StartLoadLimitTimersI
|
||||
kFontLoadWaitLong);
|
||||
}
|
||||
|
||||
-const FontCustomPlatformData* FontResource::GetCustomFontData() {
|
||||
+scoped_refptr<FontCustomPlatformData> FontResource::GetCustomFontData() {
|
||||
if (!font_data_ && !ErrorOccurred() && !IsLoading()) {
|
||||
if (Data()) {
|
||||
auto decode_start_time = base::TimeTicks::Now();
|
||||
@@ -225,7 +225,6 @@ void FontResource::AddClearDataObserver(
|
||||
}
|
||||
|
||||
void FontResource::Trace(Visitor* visitor) const {
|
||||
- visitor->Trace(font_data_);
|
||||
visitor->Trace(clear_data_observers_);
|
||||
Resource::Trace(visitor);
|
||||
}
|
||||
--- a/third_party/blink/renderer/core/loader/resource/font_resource.h
|
||||
+++ b/third_party/blink/renderer/core/loader/resource/font_resource.h
|
||||
@@ -72,7 +72,7 @@ class CORE_EXPORT FontResource final : p
|
||||
|
||||
String OtsParsingMessage() const { return ots_parsing_message_; }
|
||||
|
||||
- const FontCustomPlatformData* GetCustomFontData();
|
||||
+ scoped_refptr<FontCustomPlatformData> GetCustomFontData();
|
||||
|
||||
// Returns true if the loading priority of the remote font resource can be
|
||||
// lowered. The loading priority of the font can be lowered only if the
|
||||
@@ -112,7 +112,7 @@ class CORE_EXPORT FontResource final : p
|
||||
kMaxValue = kLongLimitExceeded,
|
||||
};
|
||||
|
||||
- Member<FontCustomPlatformData> font_data_;
|
||||
+ scoped_refptr<FontCustomPlatformData> font_data_;
|
||||
String ots_parsing_message_;
|
||||
LoadLimitState load_limit_state_;
|
||||
bool cors_failed_;
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
|
||||
@@ -115,7 +115,7 @@ const FontPlatformData* FontCustomPlatfo
|
||||
const ResolvedFontFeatures& resolved_font_features,
|
||||
FontOrientation orientation,
|
||||
const FontVariationSettings* variation_settings,
|
||||
- const FontPalette* palette) const {
|
||||
+ const FontPalette* palette) {
|
||||
DCHECK(base_typeface_);
|
||||
|
||||
sk_sp<SkTypeface> return_typeface = base_typeface_;
|
||||
@@ -304,7 +304,7 @@ String FontCustomPlatformData::FamilyNam
|
||||
localized_string.fString.size());
|
||||
}
|
||||
|
||||
-FontCustomPlatformData* FontCustomPlatformData::Create(
|
||||
+scoped_refptr<FontCustomPlatformData> FontCustomPlatformData::Create(
|
||||
SharedBuffer* buffer,
|
||||
String& ots_parse_message) {
|
||||
DCHECK(buffer);
|
||||
@@ -321,8 +321,8 @@ FontCustomPlatformData* FontCustomPlatfo
|
||||
if (v8::Isolate* isolate = v8::Isolate::TryGetCurrent()) {
|
||||
isolate->AdjustAmountOfExternalAllocatedMemory(data_size);
|
||||
}
|
||||
- return MakeGarbageCollected<FontCustomPlatformData>(std::move(typeface),
|
||||
- data_size);
|
||||
+ return base::AdoptRef(
|
||||
+ new FontCustomPlatformData(std::move(typeface), data_size));
|
||||
}
|
||||
|
||||
bool FontCustomPlatformData::MayBeIconFont() const {
|
||||
--- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.h
|
||||
@@ -39,7 +39,6 @@
|
||||
#include "third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/resolved_font_features.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/text_rendering_mode.h"
|
||||
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/forward.h"
|
||||
@@ -55,17 +54,16 @@ class FontPlatformData;
|
||||
class FontVariationSettings;
|
||||
|
||||
class PLATFORM_EXPORT FontCustomPlatformData
|
||||
- : public GarbageCollected<FontCustomPlatformData> {
|
||||
+ : public RefCounted<FontCustomPlatformData> {
|
||||
+ USING_FAST_MALLOC(FontCustomPlatformData);
|
||||
+
|
||||
public:
|
||||
- static FontCustomPlatformData* Create(SharedBuffer*,
|
||||
- String& ots_parse_message);
|
||||
- FontCustomPlatformData(sk_sp<SkTypeface>, size_t data_size);
|
||||
+ static scoped_refptr<FontCustomPlatformData> Create(SharedBuffer*,
|
||||
+ String& ots_parse_message);
|
||||
FontCustomPlatformData(const FontCustomPlatformData&) = delete;
|
||||
FontCustomPlatformData& operator=(const FontCustomPlatformData&) = delete;
|
||||
~FontCustomPlatformData();
|
||||
|
||||
- void Trace(Visitor*) const {}
|
||||
-
|
||||
// The size argument should come from EffectiveFontSize() and
|
||||
// adjusted_specified_size should come from AdjustedSpecifiedSize() of
|
||||
// FontDescription. The latter is needed for correctly applying
|
||||
@@ -82,7 +80,7 @@ class PLATFORM_EXPORT FontCustomPlatform
|
||||
const ResolvedFontFeatures& resolved_font_features,
|
||||
FontOrientation = FontOrientation::kHorizontal,
|
||||
const FontVariationSettings* = nullptr,
|
||||
- const FontPalette* = nullptr) const;
|
||||
+ const FontPalette* = nullptr);
|
||||
|
||||
String FamilyNameForInspector() const;
|
||||
|
||||
@@ -93,6 +91,7 @@ class PLATFORM_EXPORT FontCustomPlatform
|
||||
bool MayBeIconFont() const;
|
||||
|
||||
private:
|
||||
+ FontCustomPlatformData(sk_sp<SkTypeface>, size_t data_size);
|
||||
sk_sp<SkTypeface> base_typeface_;
|
||||
size_t data_size_;
|
||||
|
||||
--- a/third_party/blink/renderer/platform/testing/font_test_helpers.cc
|
||||
+++ b/third_party/blink/renderer/platform/testing/font_test_helpers.cc
|
||||
@@ -29,7 +29,7 @@ class TestFontSelector : public FontSele
|
||||
static TestFontSelector* Create(const uint8_t* data, size_t size) {
|
||||
scoped_refptr<SharedBuffer> font_buffer = SharedBuffer::Create(data, size);
|
||||
String ots_parse_message;
|
||||
- FontCustomPlatformData* font_custom_platform_data =
|
||||
+ scoped_refptr<FontCustomPlatformData> font_custom_platform_data =
|
||||
FontCustomPlatformData::Create(font_buffer.get(), ots_parse_message);
|
||||
if (!font_custom_platform_data)
|
||||
return nullptr;
|
||||
@@ -37,17 +37,12 @@ class TestFontSelector : public FontSele
|
||||
std::move(font_custom_platform_data));
|
||||
}
|
||||
|
||||
- TestFontSelector(FontCustomPlatformData* custom_platform_data)
|
||||
- : custom_platform_data_(custom_platform_data) {
|
||||
+ TestFontSelector(scoped_refptr<FontCustomPlatformData> custom_platform_data)
|
||||
+ : custom_platform_data_(std::move(custom_platform_data)) {
|
||||
DCHECK(custom_platform_data_);
|
||||
}
|
||||
~TestFontSelector() override = default;
|
||||
|
||||
- void Trace(Visitor* visitor) const override {
|
||||
- visitor->Trace(custom_platform_data_);
|
||||
- FontSelector::Trace(visitor);
|
||||
- }
|
||||
-
|
||||
FontData* GetFontData(const FontDescription& font_description,
|
||||
const FontFamily&) override {
|
||||
FontSelectionCapabilities normal_capabilities(
|
||||
@@ -117,7 +112,7 @@ class TestFontSelector : public FontSele
|
||||
}
|
||||
|
||||
private:
|
||||
- Member<FontCustomPlatformData> custom_platform_data_;
|
||||
+ scoped_refptr<FontCustomPlatformData> custom_platform_data_;
|
||||
};
|
||||
|
||||
} // namespace
|
@@ -1,434 +0,0 @@
|
||||
Revert the following commit:
|
||||
|
||||
commit 2eefeabb12fb7e92f2508116a5ed959c57659be1
|
||||
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Date: Tue Feb 20 17:40:39 2024 +0000
|
||||
|
||||
[gc] Make HarfBuzzFontData & friends gc'd.
|
||||
|
||||
Previously we had a HbFontCacheEntry which was used to hold onto the
|
||||
HarfBuzzFontData, and a hb_font_t.
|
||||
|
||||
HarfBuzzFontData is used for holding data specific for various
|
||||
harfbuzz callbacks, but we can also hold onto the hb_font_t there.
|
||||
|
||||
There should be no user-visible behaviour change.
|
||||
|
||||
Bug: 41490008
|
||||
Change-Id: Icaa7ad3b2f75e9807b88014a9a15406cb76eb52e
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302175
|
||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1262752}
|
||||
|
||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/font_global_context.cc
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/font_global_context.cc
|
||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/font_global_context.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h"
|
||||
+#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
|
||||
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/thread_specific.h"
|
||||
|
||||
@@ -50,6 +51,15 @@ FontUniqueNameLookup* FontGlobalContext:
|
||||
return Get().font_unique_name_lookup_.get();
|
||||
}
|
||||
|
||||
+HarfBuzzFontCache& FontGlobalContext::GetHarfBuzzFontCache() {
|
||||
+ std::unique_ptr<HarfBuzzFontCache>& global_context_harfbuzz_font_cache =
|
||||
+ Get().harfbuzz_font_cache_;
|
||||
+ if (!global_context_harfbuzz_font_cache) {
|
||||
+ global_context_harfbuzz_font_cache = std::make_unique<HarfBuzzFontCache>();
|
||||
+ }
|
||||
+ return *global_context_harfbuzz_font_cache;
|
||||
+}
|
||||
+
|
||||
IdentifiableToken FontGlobalContext::GetOrComputeTypefaceDigest(
|
||||
const FontPlatformData& source) {
|
||||
SkTypeface* typeface = source.Typeface();
|
||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/font_global_context.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/font_global_context.h
|
||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/font_global_context.h
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "base/types/pass_key.h"
|
||||
#include "third_party/blink/public/common/privacy_budget/identifiable_token.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
|
||||
-#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
|
||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
||||
#include "third_party/blink/renderer/platform/text/layout_locale.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
||||
@@ -34,19 +33,14 @@ class PLATFORM_EXPORT FontGlobalContext
|
||||
static FontGlobalContext& Get();
|
||||
static FontGlobalContext* TryGet();
|
||||
|
||||
- void Trace(Visitor* visitor) const {
|
||||
- visitor->Trace(font_cache_);
|
||||
- visitor->Trace(harfbuzz_font_cache_);
|
||||
- }
|
||||
+ void Trace(Visitor* visitor) const { visitor->Trace(font_cache_); }
|
||||
|
||||
FontGlobalContext(const FontGlobalContext&) = delete;
|
||||
FontGlobalContext& operator=(const FontGlobalContext&) = delete;
|
||||
|
||||
static inline FontCache& GetFontCache() { return Get().font_cache_; }
|
||||
|
||||
- static HarfBuzzFontCache& GetHarfBuzzFontCache() {
|
||||
- return Get().harfbuzz_font_cache_;
|
||||
- }
|
||||
+ static HarfBuzzFontCache& GetHarfBuzzFontCache();
|
||||
|
||||
static FontUniqueNameLookup* GetFontUniqueNameLookup();
|
||||
|
||||
@@ -62,7 +56,7 @@ class PLATFORM_EXPORT FontGlobalContext
|
||||
|
||||
private:
|
||||
FontCache font_cache_;
|
||||
- HarfBuzzFontCache harfbuzz_font_cache_;
|
||||
+ std::unique_ptr<HarfBuzzFontCache> harfbuzz_font_cache_;
|
||||
std::unique_ptr<FontUniqueNameLookup> font_unique_name_lookup_;
|
||||
base::HashingLRUCache<SkTypefaceID, IdentifiableToken> typeface_digest_cache_;
|
||||
base::HashingLRUCache<SkTypefaceID, IdentifiableToken>
|
||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
@@ -67,14 +67,20 @@ namespace blink {
|
||||
|
||||
HarfBuzzFace::HarfBuzzFace(const FontPlatformData* platform_data,
|
||||
uint64_t unique_id)
|
||||
- : platform_data_(platform_data),
|
||||
- harfbuzz_font_data_(FontGlobalContext::GetHarfBuzzFontCache().GetOrCreate(
|
||||
- unique_id,
|
||||
- platform_data)) {}
|
||||
+ : platform_data_(platform_data), unique_id_(unique_id) {
|
||||
+ HbFontCacheEntry* const cache_entry =
|
||||
+ FontGlobalContext::GetHarfBuzzFontCache().RefOrNew(unique_id_,
|
||||
+ platform_data);
|
||||
+ unscaled_font_ = cache_entry->HbFont();
|
||||
+ harfbuzz_font_data_ = cache_entry->HbFontData();
|
||||
+}
|
||||
+
|
||||
+HarfBuzzFace::~HarfBuzzFace() {
|
||||
+ FontGlobalContext::GetHarfBuzzFontCache().Remove(unique_id_);
|
||||
+}
|
||||
|
||||
void HarfBuzzFace::Trace(Visitor* visitor) const {
|
||||
visitor->Trace(platform_data_);
|
||||
- visitor->Trace(harfbuzz_font_data_);
|
||||
}
|
||||
|
||||
bool& GetIgnoreVariationSelectors() {
|
||||
@@ -287,17 +293,14 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
|
||||
|
||||
hb::unique_ptr<hb_set_t> glyphs(hb_set_create());
|
||||
|
||||
- hb_font_t* unscaled_font = harfbuzz_font_data_->unscaled_font_.get();
|
||||
-
|
||||
// Check whether computing is needed and compute for gpos/gsub.
|
||||
if (features & kKerning &&
|
||||
harfbuzz_font_data_->space_in_gpos_ ==
|
||||
HarfBuzzFontData::SpaceGlyphInOpenTypeTables::kUnknown) {
|
||||
- if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font, space)) {
|
||||
+ if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font_, space))
|
||||
return false;
|
||||
- }
|
||||
// Compute for gpos.
|
||||
- hb_face_t* face = hb_font_get_face(unscaled_font);
|
||||
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
|
||||
DCHECK(face);
|
||||
harfbuzz_font_data_->space_in_gpos_ =
|
||||
hb_ot_layout_has_positioning(face) &&
|
||||
@@ -311,11 +314,10 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
|
||||
if (features & kLigatures &&
|
||||
harfbuzz_font_data_->space_in_gsub_ ==
|
||||
HarfBuzzFontData::SpaceGlyphInOpenTypeTables::kUnknown) {
|
||||
- if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font, space)) {
|
||||
+ if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font_, space))
|
||||
return false;
|
||||
- }
|
||||
// Compute for gpos.
|
||||
- hb_face_t* face = hb_font_get_face(unscaled_font);
|
||||
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
|
||||
DCHECK(face);
|
||||
harfbuzz_font_data_->space_in_gsub_ =
|
||||
hb_ot_layout_has_substitution(face) &&
|
||||
@@ -333,14 +335,14 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
|
||||
}
|
||||
|
||||
unsigned HarfBuzzFace::UnitsPerEmFromHeadTable() {
|
||||
- hb_face_t* face = hb_font_get_face(harfbuzz_font_data_->unscaled_font_.get());
|
||||
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
|
||||
return hb_face_get_upem(face);
|
||||
}
|
||||
|
||||
Glyph HarfBuzzFace::HbGlyphForCharacter(UChar32 character) {
|
||||
hb_codepoint_t glyph = 0;
|
||||
- HarfBuzzGetNominalGlyph(harfbuzz_font_data_->unscaled_font_.get(),
|
||||
- harfbuzz_font_data_, character, &glyph, nullptr);
|
||||
+ HarfBuzzGetNominalGlyph(unscaled_font_, harfbuzz_font_data_, character,
|
||||
+ &glyph, nullptr);
|
||||
return glyph;
|
||||
}
|
||||
|
||||
@@ -349,7 +351,7 @@ hb_codepoint_t HarfBuzzFace::HarfBuzzGet
|
||||
UChar32 variation_selector) {
|
||||
DCHECK(RuntimeEnabledFeatures::FontVariationSequencesEnabled());
|
||||
hb_codepoint_t glyph = 0;
|
||||
- HarfBuzzGetGlyph(harfbuzz_font_data_->unscaled_font_.get(),
|
||||
+ HarfBuzzGetGlyph(unscaled_font_,
|
||||
harfbuzz_font_data_, character, variation_selector, &glyph,
|
||||
nullptr);
|
||||
return glyph;
|
||||
@@ -511,10 +513,9 @@ static hb::unique_ptr<hb_face_t> CreateF
|
||||
return face;
|
||||
}
|
||||
|
||||
-namespace {
|
||||
-
|
||||
-HarfBuzzFontData* CreateHarfBuzzFontData(hb_face_t* face,
|
||||
- SkTypeface* typeface) {
|
||||
+static scoped_refptr<HbFontCacheEntry> CreateHbFontCacheEntry(
|
||||
+ hb_face_t* face,
|
||||
+ SkTypeface* typeface) {
|
||||
hb::unique_ptr<hb_font_t> ot_font(hb_font_create(face));
|
||||
hb_ot_font_set_funcs(ot_font.get());
|
||||
|
||||
@@ -533,26 +534,25 @@ HarfBuzzFontData* CreateHarfBuzzFontData
|
||||
// Creating a sub font means that non-available functions
|
||||
// are found from the parent.
|
||||
hb_font_t* const unscaled_font = hb_font_create_sub_font(ot_font.get());
|
||||
- HarfBuzzFontData* data =
|
||||
- MakeGarbageCollected<HarfBuzzFontData>(unscaled_font);
|
||||
+ scoped_refptr<HbFontCacheEntry> cache_entry =
|
||||
+ HbFontCacheEntry::Create(unscaled_font);
|
||||
hb_font_set_funcs(unscaled_font,
|
||||
- HarfBuzzSkiaFontFuncs::Get().GetFunctions(typeface), data,
|
||||
- nullptr);
|
||||
- return data;
|
||||
+ HarfBuzzSkiaFontFuncs::Get().GetFunctions(typeface),
|
||||
+ cache_entry->HbFontData(), nullptr);
|
||||
+ return cache_entry;
|
||||
}
|
||||
|
||||
-} // namespace
|
||||
-
|
||||
-HarfBuzzFontData* HarfBuzzFontCache::GetOrCreate(
|
||||
+HbFontCacheEntry* HarfBuzzFontCache::RefOrNew(
|
||||
uint64_t unique_id,
|
||||
const FontPlatformData* platform_data) {
|
||||
const auto& result = font_map_.insert(unique_id, nullptr);
|
||||
if (result.is_new_entry) {
|
||||
hb::unique_ptr<hb_face_t> face = CreateFace(platform_data);
|
||||
result.stored_value->value =
|
||||
- CreateHarfBuzzFontData(face.get(), platform_data->Typeface());
|
||||
+ CreateHbFontCacheEntry(face.get(), platform_data->Typeface());
|
||||
}
|
||||
- return result.stored_value->value.Get();
|
||||
+ result.stored_value->value->AddRef();
|
||||
+ return result.stored_value->value.get();
|
||||
}
|
||||
|
||||
static_assert(
|
||||
@@ -583,18 +583,17 @@ hb_font_t* HarfBuzzFace::GetScaledFont(s
|
||||
vertical_layout);
|
||||
|
||||
int scale = SkiaScalarToHarfBuzzPosition(platform_data_->size());
|
||||
- hb_font_t* unscaled_font = harfbuzz_font_data_->unscaled_font_.get();
|
||||
- hb_font_set_scale(unscaled_font, scale, scale);
|
||||
+ hb_font_set_scale(unscaled_font_, scale, scale);
|
||||
// See contended discussion in https://github.com/harfbuzz/harfbuzz/pull/1484
|
||||
// Setting ptem here is critical for HarfBuzz to know where to lookup spacing
|
||||
// offset in the AAT trak table, the unit pt in ptem here means "CoreText"
|
||||
// points. After discussion on the pull request and with Apple developers, the
|
||||
// meaning of HarfBuzz' hb_font_set_ptem API was changed to expect the
|
||||
// equivalent of CSS pixels here.
|
||||
- hb_font_set_ptem(unscaled_font, specified_size > 0 ? specified_size
|
||||
- : platform_data_->size());
|
||||
+ hb_font_set_ptem(unscaled_font_, specified_size > 0 ? specified_size
|
||||
+ : platform_data_->size());
|
||||
|
||||
- return unscaled_font;
|
||||
+ return unscaled_font_;
|
||||
}
|
||||
|
||||
hb_font_t* HarfBuzzFace::GetScaledFont() const {
|
||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
||||
@@ -58,6 +58,7 @@ class PLATFORM_EXPORT HarfBuzzFace final
|
||||
HarfBuzzFace(const FontPlatformData* platform_data, uint64_t);
|
||||
HarfBuzzFace(const HarfBuzzFace&) = delete;
|
||||
HarfBuzzFace& operator=(const HarfBuzzFace&) = delete;
|
||||
+ ~HarfBuzzFace();
|
||||
|
||||
void Trace(Visitor*) const;
|
||||
|
||||
@@ -100,7 +101,11 @@ class PLATFORM_EXPORT HarfBuzzFace final
|
||||
void PrepareHarfBuzzFontData();
|
||||
|
||||
Member<const FontPlatformData> platform_data_;
|
||||
- Member<HarfBuzzFontData> harfbuzz_font_data_;
|
||||
+ const uint64_t unique_id_;
|
||||
+ // TODO(crbug.com/1489080): When briefly given MiraclePtr protection,
|
||||
+ // these members were both found dangling.
|
||||
+ hb_font_t* unscaled_font_;
|
||||
+ HarfBuzzFontData* harfbuzz_font_data_;
|
||||
};
|
||||
|
||||
inline constexpr hb_codepoint_t kUnmatchedVSGlyphId =
|
||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
||||
@@ -8,8 +8,38 @@
|
||||
|
||||
namespace blink {
|
||||
|
||||
-void HarfBuzzFontCache::Trace(Visitor* visitor) const {
|
||||
- visitor->Trace(font_map_);
|
||||
+HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font)
|
||||
+ : hb_font_(hb::unique_ptr<hb_font_t>(font)),
|
||||
+ hb_font_data_(std::make_unique<HarfBuzzFontData>()) {}
|
||||
+
|
||||
+HbFontCacheEntry::~HbFontCacheEntry() = default;
|
||||
+
|
||||
+scoped_refptr<HbFontCacheEntry> HbFontCacheEntry::Create(hb_font_t* hb_font) {
|
||||
+ DCHECK(hb_font);
|
||||
+ return base::AdoptRef(new HbFontCacheEntry(hb_font));
|
||||
+}
|
||||
+
|
||||
+HarfBuzzFontCache::HarfBuzzFontCache() = default;
|
||||
+HarfBuzzFontCache::~HarfBuzzFontCache() = default;
|
||||
+
|
||||
+// See "harfbuzz_face.cc" for |HarfBuzzFontCache::GetOrCreateFontData()|
|
||||
+// implementation.
|
||||
+
|
||||
+void HarfBuzzFontCache::Remove(uint64_t unique_id) {
|
||||
+ auto it = font_map_.find(unique_id);
|
||||
+ // TODO(https://crbug.com/1417160): In tests such as FontObjectThreadedTest
|
||||
+ // that test taking down FontGlobalContext an object may not be found due to
|
||||
+ // existing issues with refcounting of font objects at thread destruction
|
||||
+ // time.
|
||||
+ if (it == font_map_.end()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ DCHECK(!it.Get()->value->HasOneRef());
|
||||
+ it.Get()->value->Release();
|
||||
+ if (!it.Get()->value->HasOneRef()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ font_map_.erase(it);
|
||||
}
|
||||
|
||||
} // namespace blink
|
||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
||||
@@ -6,9 +6,12 @@
|
||||
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_CACHE_H_
|
||||
|
||||
#include "third_party/blink/renderer/platform/fonts/font_metrics.h"
|
||||
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
|
||||
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
-#include "third_party/blink/renderer/platform/heap/member.h"
|
||||
+#include "third_party/blink/renderer/platform/fonts/unicode_range_set.h"
|
||||
+
|
||||
+#include <hb.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
+
|
||||
+#include <memory>
|
||||
|
||||
namespace blink {
|
||||
|
||||
@@ -22,21 +25,39 @@ struct HarfBuzzFontData;
|
||||
// FIXME, crbug.com/609099: We should fix the FontCache to only keep one
|
||||
// FontPlatformData object independent of size, then consider using this here.
|
||||
|
||||
-class HarfBuzzFontCache final {
|
||||
- DISALLOW_NEW();
|
||||
+class HbFontCacheEntry : public RefCounted<HbFontCacheEntry> {
|
||||
+ USING_FAST_MALLOC(HbFontCacheEntry);
|
||||
+
|
||||
+ public:
|
||||
+ static scoped_refptr<HbFontCacheEntry> Create(hb_font_t* hb_font);
|
||||
+
|
||||
+ hb_font_t* HbFont() { return hb_font_.get(); }
|
||||
+ HarfBuzzFontData* HbFontData() { return hb_font_data_.get(); }
|
||||
+
|
||||
+ ~HbFontCacheEntry();
|
||||
|
||||
+ private:
|
||||
+ explicit HbFontCacheEntry(hb_font_t* font);
|
||||
+
|
||||
+ hb::unique_ptr<hb_font_t> hb_font_;
|
||||
+ std::unique_ptr<HarfBuzzFontData> hb_font_data_;
|
||||
+};
|
||||
+
|
||||
+class HarfBuzzFontCache final {
|
||||
public:
|
||||
- void Trace(Visitor* visitor) const;
|
||||
- // See "harfbuzz_face.cc" for |HarfBuzzFontCache::GetOrCreateFontData()|
|
||||
- // implementation.
|
||||
- HarfBuzzFontData* GetOrCreate(uint64_t unique_id,
|
||||
- const FontPlatformData* platform_data);
|
||||
+ HarfBuzzFontCache();
|
||||
+ ~HarfBuzzFontCache();
|
||||
+
|
||||
+ HbFontCacheEntry* RefOrNew(uint64_t unique_id,
|
||||
+ const FontPlatformData* platform_data);
|
||||
+ void Remove(uint64_t unique_id);
|
||||
|
||||
private:
|
||||
- HeapHashMap<uint64_t,
|
||||
- WeakMember<HarfBuzzFontData>,
|
||||
- IntWithZeroKeyHashTraits<uint64_t>>
|
||||
- font_map_;
|
||||
+ using HbFontDataMap = HashMap<uint64_t,
|
||||
+ scoped_refptr<HbFontCacheEntry>,
|
||||
+ IntWithZeroKeyHashTraits<uint64_t>>;
|
||||
+
|
||||
+ HbFontDataMap font_map_;
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
Index: chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.8.orig/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
+++ chromium-126.0.6478.8/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
@@ -22,18 +22,15 @@ const unsigned kInvalidFallbackMetricsVa
|
||||
// The HarfBuzzFontData struct carries user-pointer data for
|
||||
// |hb_font_t| callback functions/operations. It contains metrics and OpenType
|
||||
// layout information related to a font scaled to a particular size.
|
||||
-struct HarfBuzzFontData final : public GarbageCollected<HarfBuzzFontData> {
|
||||
+struct HarfBuzzFontData final {
|
||||
+ USING_FAST_MALLOC(HarfBuzzFontData);
|
||||
+
|
||||
public:
|
||||
- explicit HarfBuzzFontData(hb_font_t* unscaled_font)
|
||||
- : unscaled_font_(hb::unique_ptr<hb_font_t>(unscaled_font)),
|
||||
- vertical_data_(nullptr),
|
||||
- range_set_(nullptr) {}
|
||||
+ HarfBuzzFontData() : vertical_data_(nullptr), range_set_(nullptr) {}
|
||||
|
||||
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
|
||||
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
|
||||
|
||||
- void Trace(Visitor*) const {}
|
||||
-
|
||||
// The vertical origin and vertical advance functions in HarfBuzzFace require
|
||||
// the ascent and height metrics as fallback in case no specific vertical
|
||||
// layout information is found from the font.
|
||||
@@ -81,7 +78,6 @@ struct HarfBuzzFontData final : public G
|
||||
return vertical_data_;
|
||||
}
|
||||
|
||||
- const hb::unique_ptr<hb_font_t> unscaled_font_;
|
||||
SkFont font_;
|
||||
|
||||
// Capture these scaled fallback metrics from FontPlatformData so that a
|
3725
bad-font-gc2.patch
3725
bad-font-gc2.patch
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
||||
Revert the following commit (to support bad-font-gc2.patch):
|
||||
|
||||
commit d4806d20fda56e9bac259fddf10b7439ce749add
|
||||
Author: Hao Liu <haoliuk@chromium.org>
|
||||
Date: Mon Mar 18 22:56:31 2024 +0000
|
||||
|
||||
Cleanup leftover non-used custom_font_data methods
|
||||
|
||||
This is to clean up non-used custom_font_data methods. Their usage has
|
||||
been deleted in a previous CL.
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/5262982/29/third_party/blink/renderer/core/css/css_font_face_source.cc#b95
|
||||
|
||||
Change-Id: I90c3ae794a6caf71526c81a56795e95c23cc3fb5
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368244
|
||||
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1274525}
|
||||
|
||||
--- a/third_party/blink/renderer/core/css/css_custom_font_data.h
|
||||
+++ b/third_party/blink/renderer/core/css/css_custom_font_data.h
|
||||
@@ -55,6 +55,7 @@ class CSSCustomFontData final : public C
|
||||
|
||||
bool IsLoading() const override { return is_loading_; }
|
||||
bool IsLoadingFallback() const override { return true; }
|
||||
+ void ClearFontFaceSource() override { font_face_source_ = nullptr; }
|
||||
|
||||
bool IsPendingDataUrl() const override {
|
||||
return font_face_source_ && font_face_source_->IsPendingDataUrl();
|
||||
--- a/third_party/blink/renderer/platform/fonts/custom_font_data.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/custom_font_data.h
|
||||
@@ -46,6 +46,7 @@ class PLATFORM_EXPORT CustomFontData : p
|
||||
virtual bool IsLoading() const { return false; }
|
||||
virtual bool IsLoadingFallback() const { return false; }
|
||||
virtual bool ShouldSkipDrawing() const { return false; }
|
||||
+ virtual void ClearFontFaceSource() {}
|
||||
virtual bool IsPendingDataUrl() const { return false; }
|
||||
|
||||
protected:
|
@@ -1,46 +0,0 @@
|
||||
From df291ec5472fa14e828633378b8c97a8c7a2e7de Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Wed, 20 Mar 2024 12:38:04 +0000
|
||||
Subject: [PATCH] IWYU: missing includes in ukm::BitSet
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Usage of uint8_t and std::memcpy require includes.
|
||||
|
||||
Bug: 41455655
|
||||
Change-Id: Ib96b3c3595660fc05d37d61ba9ec36add18eba57
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5370063
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Reviewed-by: Cait Phillips <caitkp@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1275509}
|
||||
---
|
||||
components/ukm/bitset.cc | 2 ++
|
||||
components/ukm/bitset.h | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/components/ukm/bitset.cc b/components/ukm/bitset.cc
|
||||
index 0c4faff95ed29..da83c35aa5c58 100644
|
||||
--- a/components/ukm/bitset.cc
|
||||
+++ b/components/ukm/bitset.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "components/ukm/bitset.h"
|
||||
|
||||
+#include <cstring>
|
||||
+
|
||||
#include "base/check_op.h"
|
||||
|
||||
namespace ukm {
|
||||
diff --git a/components/ukm/bitset.h b/components/ukm/bitset.h
|
||||
index 9b1f88c844ef6..005ce6e329db2 100644
|
||||
--- a/components/ukm/bitset.h
|
||||
+++ b/components/ukm/bitset.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_UKM_BITSET_H_
|
||||
#define COMPONENTS_UKM_BITSET_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@@ -2,28 +2,28 @@ Partially revert https://github.com/chromium/chromium/commit/c1dc375391403442935
|
||||
and disable dependent code. This removes `brs` from Accept-Encoding list.
|
||||
This feature does not build with brotli < 1.1
|
||||
|
||||
--- src/net/filter/brotli_source_stream.cc.orig 2024-07-24 12:50:53.542464800 +0200
|
||||
+++ src/net/filter/brotli_source_stream.cc 2024-08-04 21:07:52.674333900 +0200
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
--- src/net/filter/brotli_source_stream.cc.orig 2025-08-21 17:44:48.616409315 +0200
|
||||
+++ src/net/filter/brotli_source_stream.cc 2025-08-22 18:23:03.535047458 +0200
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "net/base/io_buffer.h"
|
||||
#include "net/filter/source_stream_type.h"
|
||||
#include "third_party/brotli/include/brotli/decode.h"
|
||||
-#include "third_party/brotli/include/brotli/shared_dictionary.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
@@ -24,21 +23,11 @@ const char kBrotli[] = "BROTLI";
|
||||
@@ -30,21 +29,11 @@ const char kBrotli[] = "BROTLI";
|
||||
// Brotli format specification: http://www.ietf.org/id/draft-alakuijala-brotli.
|
||||
class BrotliSourceStream : public FilterSourceStream {
|
||||
public:
|
||||
- explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream,
|
||||
- scoped_refptr<IOBuffer> dictionary = nullptr,
|
||||
- size_t dictionary_size = 0u)
|
||||
- : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)),
|
||||
- : FilterSourceStream(SourceStreamType::kBrotli, std::move(upstream)),
|
||||
- dictionary_(std::move(dictionary)),
|
||||
- dictionary_size_(dictionary_size) {
|
||||
+ explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream)
|
||||
+ : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)) {
|
||||
+ : FilterSourceStream(SourceStreamType::kBrotli, std::move(upstream)) {
|
||||
brotli_state_ =
|
||||
BrotliDecoderCreateInstance(AllocateMemory, FreeMemory, this);
|
||||
CHECK(brotli_state_);
|
||||
@@ -36,7 +36,7 @@ This feature does not build with brotli < 1.1
|
||||
}
|
||||
|
||||
BrotliSourceStream(const BrotliSourceStream&) = delete;
|
||||
@@ -174,9 +163,6 @@ class BrotliSourceStream : public Filter
|
||||
@@ -180,9 +169,6 @@ class BrotliSourceStream : public Filter
|
||||
free(&array[-1]);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ This feature does not build with brotli < 1.1
|
||||
raw_ptr<BrotliDecoderState> brotli_state_;
|
||||
|
||||
DecodingStatus decoding_status_ = DecodingStatus::DECODING_IN_PROGRESS;
|
||||
@@ -198,8 +184,7 @@ std::unique_ptr<FilterSourceStream> Crea
|
||||
@@ -204,8 +190,7 @@ std::unique_ptr<FilterSourceStream> Crea
|
||||
std::unique_ptr<SourceStream> previous,
|
||||
scoped_refptr<IOBuffer> dictionary,
|
||||
size_t dictionary_size) {
|
||||
|
@@ -50,7 +50,7 @@
|
||||
"manifest_handlers/webview_info.h",
|
||||
"manifest_url_handlers.cc",
|
||||
@@ -481,8 +467,6 @@ static_library("common") {
|
||||
"user_script.h",
|
||||
"user_scripts_availability.h",
|
||||
"utils/base_string.cc",
|
||||
"utils/base_string.h",
|
||||
- "utils/content_script_utils.cc",
|
||||
|
@@ -1,10 +0,0 @@
|
||||
--- src/chrome/test/BUILD.gn.orig 2024-12-08 18:44:32.671357320 +0100
|
||||
+++ src/chrome/test/BUILD.gn 2025-01-01 21:35:00.776064485 +0100
|
||||
@@ -8317,7 +8317,6 @@ test("unit_tests") {
|
||||
"//chrome/browser/user_annotations",
|
||||
"//chrome/browser/web_applications:web_applications_test_support",
|
||||
"//chrome/common/read_anything:mojo_bindings",
|
||||
- "//chrome/services/speech:unit_tests",
|
||||
"//components/app_constants",
|
||||
"//components/color",
|
||||
"//components/commerce/core:account_checker_test_support",
|
@@ -21,9 +21,9 @@ Subject: [PATCH] Disable various compiler configs
|
||||
build/config/compiler/BUILD.gn | 114 +++++----------------------------
|
||||
1 file changed, 17 insertions(+), 97 deletions(-)
|
||||
|
||||
--- src/build/config/compiler/BUILD.gn.orig 2025-04-21 18:29:05.106306929 +0200
|
||||
+++ src/build/config/compiler/BUILD.gn 2025-04-22 20:59:45.689108303 +0200
|
||||
@@ -308,9 +308,7 @@ config("compiler") {
|
||||
--- src/build/config/compiler/BUILD.gn.orig 2025-07-19 11:32:29.581980058 +0200
|
||||
+++ src/build/config/compiler/BUILD.gn 2025-07-19 16:12:37.505818698 +0200
|
||||
@@ -310,9 +310,7 @@ config("compiler") {
|
||||
|
||||
configs += [
|
||||
# See the definitions below.
|
||||
@@ -32,8 +32,8 @@ Subject: [PATCH] Disable various compiler configs
|
||||
- ":compiler_cpu_abi",
|
||||
":compiler_codegen",
|
||||
":compiler_deterministic",
|
||||
]
|
||||
@@ -325,7 +323,6 @@ config("compiler") {
|
||||
":clang_warning_suppression",
|
||||
@@ -338,7 +336,6 @@ config("compiler") {
|
||||
# See: https://gcc.gnu.org/PR97913
|
||||
# TODO(mpdenton): remove is_clang once GCC bug is fixed.
|
||||
if ((!is_nacl || is_nacl_saigo) && !is_ubsan && is_clang) {
|
||||
@@ -41,15 +41,15 @@ Subject: [PATCH] Disable various compiler configs
|
||||
}
|
||||
|
||||
# Make signed overflow and pointer overflowdefined to wrap.
|
||||
@@ -335,7 +332,6 @@ config("compiler") {
|
||||
@@ -348,7 +345,6 @@ config("compiler") {
|
||||
if (is_win) {
|
||||
cflags += [ "/clang:-fwrapv" ]
|
||||
cflags += [ "/clang:-fno-strict-overflow" ]
|
||||
} else {
|
||||
- cflags += [ "-fwrapv" ]
|
||||
- cflags += [ "-fno-strict-overflow" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,7 +347,12 @@ config("compiler") {
|
||||
@@ -364,7 +360,12 @@ config("compiler") {
|
||||
if (!is_win) {
|
||||
# Common POSIX compiler flags setup.
|
||||
# --------------------------------
|
||||
@@ -63,7 +63,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
|
||||
# Stack protection. ShadowCallStack and Stack protector address the same
|
||||
# problems. Therefore, we only enable one or the other. Clang advertises SCS as
|
||||
@@ -498,10 +499,6 @@ config("compiler") {
|
||||
@@ -500,10 +501,6 @@ config("compiler") {
|
||||
# Linux/Android/Fuchsia common flags setup.
|
||||
# ---------------------------------
|
||||
if (is_linux || is_chromeos || is_android || is_fuchsia) {
|
||||
@@ -74,7 +74,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
|
||||
if (!is_clang) {
|
||||
# Use pipes for communicating between sub-processes. Faster.
|
||||
@@ -1124,11 +1121,6 @@ config("libcxx_hardening") {
|
||||
@@ -1148,11 +1145,6 @@ config("libcxx_hardening") {
|
||||
defines = [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
}
|
||||
|
||||
# The BUILDCONFIG file sets this config on targets by default, which means when
|
||||
@@ -1194,7 +1186,8 @@ config("thinlto_optimize_max") {
|
||||
@@ -1218,7 +1210,8 @@ config("thinlto_optimize_max") {
|
||||
# without using everything that "compiler" brings in. Options that
|
||||
# tweak code generation for a particular CPU do not belong here!
|
||||
# See "compiler_codegen", below.
|
||||
@@ -96,17 +96,17 @@ Subject: [PATCH] Disable various compiler configs
|
||||
cflags = []
|
||||
ldflags = []
|
||||
defines = []
|
||||
@@ -1824,7 +1817,8 @@ config("treat_warnings_as_errors") {
|
||||
# Collects all warning flags that are used by default. This is used as a
|
||||
# subconfig of both chromium_code and no_chromium_code. This way these
|
||||
@@ -1994,7 +1987,8 @@ config("tot_warnings") {
|
||||
# Collects all warning flags that are used by default. This is used as a
|
||||
# subconfig of both chromium_code and no_chromium_code. This way these
|
||||
# flags are guaranteed to appear on the compile command line after -Wall.
|
||||
-config("default_warnings") {
|
||||
+config("default_warnings") { }
|
||||
+config("xdefault_warnings") {
|
||||
cflags = []
|
||||
cflags_c = []
|
||||
cflags_cc = []
|
||||
@@ -2071,11 +2065,7 @@ config("chromium_code") {
|
||||
ldflags = []
|
||||
@@ -2262,11 +2256,7 @@ config("chromium_code") {
|
||||
defines = [ "_HAS_NODISCARD" ]
|
||||
}
|
||||
} else {
|
||||
@@ -119,7 +119,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
|
||||
# In Chromium code, we define __STDC_foo_MACROS in order to get the
|
||||
# C99 macros on Mac and Linux.
|
||||
@@ -2084,24 +2074,6 @@ config("chromium_code") {
|
||||
@@ -2275,24 +2265,6 @@ config("chromium_code") {
|
||||
"__STDC_FORMAT_MACROS",
|
||||
]
|
||||
|
||||
@@ -144,15 +144,15 @@ Subject: [PATCH] Disable various compiler configs
|
||||
if (is_apple) {
|
||||
cflags_objc = [ "-Wimplicit-retain-self" ]
|
||||
cflags_objcc = [ "-Wimplicit-retain-self" ]
|
||||
@@ -2268,7 +2240,6 @@ config("no_rtti") {
|
||||
@@ -2451,7 +2423,6 @@ config("no_rtti") {
|
||||
# to heap-allocated memory are passed over shared library boundaries.
|
||||
config("export_dynamic") {
|
||||
# TODO(crbug.com/40118868): Revisit after target_os flip is completed.
|
||||
if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
|
||||
if (is_linux || export_libcxxabi_from_executables) {
|
||||
- ldflags = [ "-rdynamic" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2366,7 +2337,8 @@ config("wexit_time_destructors") {
|
||||
@@ -2550,7 +2521,8 @@ config("wexit_time_destructors") {
|
||||
# gcc 4.9 and earlier had no way of suppressing this warning without
|
||||
# suppressing the rest of them. Here we centralize the identification of
|
||||
# the gcc 4.9 toolchains.
|
||||
@@ -162,7 +162,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
cflags = []
|
||||
if (is_clang) {
|
||||
cflags += [ "-Wno-incompatible-pointer-types" ]
|
||||
@@ -2483,7 +2455,8 @@ if (is_win) {
|
||||
@@ -2667,7 +2639,8 @@ if (is_win) {
|
||||
common_optimize_on_cflags += [ "-fno-math-errno" ]
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
if (!is_win) {
|
||||
if (enable_frame_pointers) {
|
||||
cflags = [ "-fno-omit-frame-pointer" ]
|
||||
@@ -2524,7 +2497,8 @@ config("default_stack_frames") {
|
||||
@@ -2708,7 +2681,8 @@ config("default_stack_frames") {
|
||||
# [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000
|
||||
# [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000
|
||||
# [2]: https://crrev.com/c/5447532
|
||||
@@ -182,7 +182,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
if (is_win) {
|
||||
# clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for
|
||||
# consistency with the other platforms.
|
||||
@@ -2573,7 +2547,8 @@ config("optimize") {
|
||||
@@ -2757,7 +2731,8 @@ config("optimize") {
|
||||
}
|
||||
|
||||
# Turn off optimizations.
|
||||
@@ -192,7 +192,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
if (is_win) {
|
||||
cflags = [
|
||||
"/Od", # Disable optimization.
|
||||
@@ -2613,7 +2588,8 @@ config("no_optimize") {
|
||||
@@ -2792,7 +2767,8 @@ config("no_optimize") {
|
||||
# Turns up the optimization level. Used to explicitly enable -O2 instead of
|
||||
# -Os for select targets on platforms that use optimize_for_size. No-op
|
||||
# elsewhere.
|
||||
@@ -202,7 +202,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
if (is_nacl && is_nacl_irt) {
|
||||
# The NaCl IRT is a special case and always wants its own config.
|
||||
# Various components do:
|
||||
@@ -2646,7 +2622,8 @@ config("optimize_max") {
|
||||
@@ -2825,7 +2801,8 @@ config("optimize_max") {
|
||||
#
|
||||
# TODO(crbug.com/41259697) - rework how all of these configs are related
|
||||
# so that we don't need this disclaimer.
|
||||
@@ -212,7 +212,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
if (is_nacl && is_nacl_irt) {
|
||||
# The NaCl IRT is a special case and always wants its own config.
|
||||
# Various components do:
|
||||
@@ -2675,7 +2652,8 @@ config("optimize_speed") {
|
||||
@@ -2854,7 +2831,8 @@ config("optimize_speed") {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
cflags = [ "-O1" ] + common_optimize_on_cflags
|
||||
rustflags = [ "-Copt-level=1" ]
|
||||
ldflags = common_optimize_on_ldflags
|
||||
@@ -2806,7 +2784,8 @@ config("win_pdbaltpath") {
|
||||
@@ -2985,7 +2963,8 @@ config("win_pdbaltpath") {
|
||||
}
|
||||
|
||||
# Full symbols.
|
||||
@@ -232,7 +232,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
rustflags = []
|
||||
configs = []
|
||||
if (is_win) {
|
||||
@@ -2968,7 +2947,8 @@ config("symbols") {
|
||||
@@ -3159,7 +3138,8 @@ config("symbols") {
|
||||
# Minimal symbols.
|
||||
# This config guarantees to hold symbol for stack trace which are shown to user
|
||||
# when crash happens in unittests running on buildbot.
|
||||
@@ -242,7 +242,7 @@ Subject: [PATCH] Disable various compiler configs
|
||||
rustflags = []
|
||||
if (is_win) {
|
||||
# Functions, files, and line tables only.
|
||||
@@ -3053,7 +3033,8 @@ config("minimal_symbols") {
|
||||
@@ -3244,7 +3224,8 @@ config("minimal_symbols") {
|
||||
# This configuration contains function names only. That is, the compiler is
|
||||
# told to not generate debug information and the linker then just puts function
|
||||
# names in the final debug information.
|
||||
|
@@ -1,32 +0,0 @@
|
||||
commit 04866680f4f9a8475ae3795ad6ed59649ba478d7
|
||||
Author: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Tue Jan 23 12:04:05 2024 +0000
|
||||
|
||||
libstdc++: fix static assertion in NodeUuidEquality
|
||||
|
||||
libstdc++ equality checks in static assertion that it is possible to
|
||||
compare for equality base::Uuid to BookmarkNode*. This was a missing
|
||||
operator in NodeUuidEquality that this changeset adds.
|
||||
|
||||
Bug: 957519
|
||||
Change-Id: Icc9809cb43d321f0b3e3394ef27ab55672aec5e7
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5227686
|
||||
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1250753}
|
||||
|
||||
diff --git a/components/bookmarks/browser/uuid_index.h b/components/bookmarks/browser/uuid_index.h
|
||||
index 77cb1a1a54dd9..639d6fefcd831 100644
|
||||
--- a/components/bookmarks/browser/uuid_index.h
|
||||
+++ b/components/bookmarks/browser/uuid_index.h
|
||||
@@ -23,6 +23,10 @@ class NodeUuidEquality {
|
||||
bool operator()(const BookmarkNode* n1, const base::Uuid& uuid2) const {
|
||||
return n1->uuid() == uuid2;
|
||||
}
|
||||
+
|
||||
+ bool operator()(const base::Uuid& uuid1, const BookmarkNode* n2) const {
|
||||
+ return uuid1 == n2->uuid();
|
||||
+ }
|
||||
};
|
||||
|
||||
// Used to hash BookmarkNode instances by UUID.
|
@@ -1,408 +0,0 @@
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_base.gn src/build/linux/unbundle/absl_base.gn
|
||||
--- src/build/linux/unbundle.old/absl_base.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_base.gn 2024-04-07 17:46:37.658214100 +0000
|
||||
@@ -13,6 +13,14 @@ pkg_config("system_absl_core_headers") {
|
||||
packages = [ "absl_core_headers" ]
|
||||
}
|
||||
|
||||
+pkg_config("system_absl_nullability") {
|
||||
+ packages = [ "absl_nullability" ]
|
||||
+}
|
||||
+
|
||||
+pkg_config("system_absl_prefetch") {
|
||||
+ packages = [ "absl_prefetch" ]
|
||||
+}
|
||||
+
|
||||
shim_headers("base_shim") {
|
||||
root_path = "."
|
||||
prefix = "absl/base/"
|
||||
@@ -60,8 +68,41 @@ source_set("core_headers") {
|
||||
public_configs = [ ":system_absl_core_headers" ]
|
||||
}
|
||||
|
||||
-source_set("config_test") {
|
||||
+shim_headers("nullability_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/base/"
|
||||
+ headers = [
|
||||
+ "nullability.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("nullability") {
|
||||
+ deps = [ ":nullability_shim" ]
|
||||
+ public_configs = [ ":system_absl_nullability" ]
|
||||
}
|
||||
|
||||
+shim_headers("prefetch_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/base/"
|
||||
+ headers = [
|
||||
+ "prefetch.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("prefetch") {
|
||||
+ deps = [ ":prefetch_shim" ]
|
||||
+ public_configs = [ ":system_absl_prefetch" ]
|
||||
+}
|
||||
+
|
||||
+source_set("no_destructor") {
|
||||
+ # Dummy — unavailable with abseil 202308 aand chromium 122 does not use it
|
||||
+}
|
||||
+
|
||||
+source_set("config_test") {
|
||||
+}
|
||||
+source_set("no_destructor_test") {
|
||||
+}
|
||||
+source_set("nullability_test") {
|
||||
+}
|
||||
source_set("prefetch_test") {
|
||||
}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_container.gn src/build/linux/unbundle/absl_container.gn
|
||||
--- src/build/linux/unbundle.old/absl_container.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_container.gn 2024-04-07 17:12:25.979311400 +0000
|
||||
@@ -111,9 +111,19 @@ source_set("node_hash_set") {
|
||||
|
||||
source_set("common_policy_traits_test") {
|
||||
}
|
||||
+source_set("fixed_array_test") {
|
||||
+}
|
||||
+source_set("flat_hash_map_test") {
|
||||
+}
|
||||
+source_set("flat_hash_set_test") {
|
||||
+}
|
||||
source_set("inlined_vector_test") {
|
||||
}
|
||||
source_set("node_slot_policy_test") {
|
||||
}
|
||||
+source_set("raw_hash_set_allocator_test") {
|
||||
+}
|
||||
+source_set("raw_hash_set_test") {
|
||||
+}
|
||||
source_set("sample_element_size_test") {
|
||||
}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_crc.gn src/build/linux/unbundle/absl_crc.gn
|
||||
--- src/build/linux/unbundle.old/absl_crc.gn 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ src/build/linux/unbundle/absl_crc.gn 2024-04-07 17:29:23.349823700 +0000
|
||||
@@ -0,0 +1,4 @@
|
||||
+source_set("crc32c_test") {}
|
||||
+source_set("crc_cord_state_test") {}
|
||||
+source_set("crc_memcpy_test") {}
|
||||
+source_set("non_temporal_memcpy_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_debugging.gn src/build/linux/unbundle/absl_debugging.gn
|
||||
--- src/build/linux/unbundle.old/absl_debugging.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_debugging.gn 2024-04-07 17:12:54.682550100 +0000
|
||||
@@ -45,3 +45,6 @@ source_set("symbolize") {
|
||||
deps = [ ":symbolize_shim" ]
|
||||
public_configs = [ ":system_absl_symbolize" ]
|
||||
}
|
||||
+
|
||||
+source_set("stacktrace_test") {
|
||||
+}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_flags.gn src/build/linux/unbundle/absl_flags.gn
|
||||
--- src/build/linux/unbundle.old/absl_flags.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_flags.gn 2024-04-07 17:14:21.789944600 +0000
|
||||
@@ -48,3 +48,5 @@ source_set("usage") {
|
||||
deps = [ ":usage_shim" ]
|
||||
public_configs = [ ":system_absl_flags_usage" ]
|
||||
}
|
||||
+
|
||||
+source_set("flag_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_functional.gn src/build/linux/unbundle/absl_functional.gn
|
||||
--- src/build/linux/unbundle.old/absl_functional.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_functional.gn 2024-04-07 17:14:18.081948700 +0000
|
||||
@@ -46,4 +46,10 @@ source_set("function_ref") {
|
||||
public_configs = [ ":system_absl_function_ref" ]
|
||||
}
|
||||
|
||||
+source_set("overload") {
|
||||
+ # Dummy — unavailable with abseil 202308 aand chromium 122 does not use it
|
||||
+}
|
||||
+
|
||||
source_set("any_invocable_test") {}
|
||||
+source_set("function_ref_test") {}
|
||||
+source_set("overload_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_hash.gn src/build/linux/unbundle/absl_hash.gn
|
||||
--- src/build/linux/unbundle.old/absl_hash.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_hash.gn 2024-04-07 17:19:44.496916100 +0000
|
||||
@@ -16,6 +16,8 @@ source_set("hash") {
|
||||
public_configs = [ ":system_absl_hash" ]
|
||||
}
|
||||
|
||||
+source_set("hash_instantiated_test") {
|
||||
+}
|
||||
source_set("hash_test") {
|
||||
}
|
||||
source_set("low_level_hash_test") {
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_log.gn src/build/linux/unbundle/absl_log.gn
|
||||
--- src/build/linux/unbundle.old/absl_log.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_log.gn 2024-04-07 17:45:56.568886800 +0000
|
||||
@@ -1,3 +1,67 @@
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+
|
||||
+pkg_config("system_absl_absl_check") {
|
||||
+ packages = [ "absl_absl_check" ]
|
||||
+}
|
||||
+
|
||||
+pkg_config("system_absl_absl_log") {
|
||||
+ packages = [ "absl_absl_log" ]
|
||||
+}
|
||||
+
|
||||
+pkg_config("system_absl_die_if_null") {
|
||||
+ packages = [ "absl_die_if_null" ]
|
||||
+}
|
||||
+
|
||||
+pkg_config("system_absl_log") {
|
||||
+ packages = [ "absl_log" ]
|
||||
+}
|
||||
+shim_headers("absl_check_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/log/"
|
||||
+ headers = [ "absl_check.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("absl_check") {
|
||||
+ deps = [ ":absl_check_shim" ]
|
||||
+ public_configs = [ ":system_absl_absl_check" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("absl_log_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/log/"
|
||||
+ headers = [ "absl_log.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("absl_log") {
|
||||
+ deps = [ ":absl_log_shim" ]
|
||||
+ public_configs = [ ":system_absl_absl_log" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("die_if_null_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/log/"
|
||||
+ headers = [ "die_if_null.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("die_if_null") {
|
||||
+ deps = [ ":die_if_null_shim" ]
|
||||
+ public_configs = [ ":system_absl_die_if_null" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("log_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/log/"
|
||||
+ headers = [ "log.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("log") {
|
||||
+ deps = [ ":log_shim" ]
|
||||
+ public_configs = [ ":system_absl_log" ]
|
||||
+}
|
||||
+
|
||||
+source_set("absl_check_test") {}
|
||||
+source_set("absl_log_basic_test") {}
|
||||
source_set("basic_log_test") {}
|
||||
source_set("check_test") {}
|
||||
source_set("die_if_null_test") {}
|
||||
@@ -11,3 +75,4 @@ source_set("log_sink_test") {}
|
||||
source_set("log_streamer_test") {}
|
||||
source_set("scoped_mock_log_test") {}
|
||||
source_set("stripping_test") {}
|
||||
+source_set("vlog_is_on_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_log_internal.gn src/build/linux/unbundle/absl_log_internal.gn
|
||||
--- src/build/linux/unbundle.old/absl_log_internal.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_log_internal.gn 2024-04-07 17:19:34.195045600 +0000
|
||||
@@ -1 +1,2 @@
|
||||
+source_set("fnmatch_test") {}
|
||||
source_set("stderr_log_sink_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_numeric.gn src/build/linux/unbundle/absl_numeric.gn
|
||||
--- src/build/linux/unbundle.old/absl_numeric.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_numeric.gn 2024-04-07 17:20:05.380981000 +0000
|
||||
@@ -30,3 +30,5 @@ source_set("int128") {
|
||||
deps = [ ":int128_shim" ]
|
||||
public_configs = [ ":system_absl_int128" ]
|
||||
}
|
||||
+
|
||||
+source_set("int128_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_random.gn src/build/linux/unbundle/absl_random.gn
|
||||
--- src/build/linux/unbundle.old/absl_random.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_random.gn 2024-04-07 17:36:36.041139000 +0000
|
||||
@@ -1,6 +1,48 @@
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
import("//build/shim_headers.gni")
|
||||
|
||||
+pkg_config("system_absl_random_bit_gen_ref") {
|
||||
+ packages = [ "absl_random_bit_gen_ref" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("bit_gen_ref_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/random/"
|
||||
+ headers = [ "bit_gen_ref.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("bit_gen_ref") {
|
||||
+ deps = [ ":bit_gen_ref_shim" ]
|
||||
+ public_configs = [ ":system_absl_random_bit_gen_ref" ]
|
||||
+}
|
||||
+
|
||||
+pkg_config("system_absl_random_distributions") {
|
||||
+ packages = [ "absl_random_distributions" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("distributions_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/random/"
|
||||
+ headers = [
|
||||
+ "bernoulli_distribution.h",
|
||||
+ "beta_distribution.h",
|
||||
+ "discrete_distribution.h",
|
||||
+ "distributions.h",
|
||||
+ "exponential_distribution.h",
|
||||
+ "gaussian_distribution.h",
|
||||
+ "log_uniform_int_distribution.h",
|
||||
+ "poisson_distribution.h",
|
||||
+ "uniform_int_distribution.h",
|
||||
+ "uniform_real_distribution.h",
|
||||
+ "zipf_distribution.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("distributions") {
|
||||
+ deps = [ ":distributions_shim" ]
|
||||
+ public_configs = [ ":system_absl_random_distributions" ]
|
||||
+}
|
||||
+
|
||||
pkg_config("system_absl_random_random") {
|
||||
packages = [ "absl_random_random" ]
|
||||
}
|
||||
@@ -15,3 +57,4 @@ source_set("random") {
|
||||
deps = [ ":random_shim" ]
|
||||
public_configs = [ ":system_absl_random_random" ]
|
||||
}
|
||||
+
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_status.gn src/build/linux/unbundle/absl_status.gn
|
||||
--- src/build/linux/unbundle.old/absl_status.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_status.gn 2024-04-07 17:20:21.398873800 +0000
|
||||
@@ -34,5 +34,7 @@ source_set("statusor") {
|
||||
public_configs = [ ":system_absl_statusor" ]
|
||||
}
|
||||
|
||||
+source_set("status_test") {
|
||||
+}
|
||||
source_set("statusor_test") {
|
||||
}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_strings.gn src/build/linux/unbundle/absl_strings.gn
|
||||
--- src/build/linux/unbundle.old/absl_strings.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_strings.gn 2024-04-07 17:52:10.775957800 +0000
|
||||
@@ -9,6 +9,10 @@ pkg_config("system_absl_strings") {
|
||||
packages = [ "absl_strings" ]
|
||||
}
|
||||
|
||||
+pkg_config("system_absl_string_view") {
|
||||
+ packages = [ "absl_string_view" ]
|
||||
+}
|
||||
+
|
||||
pkg_config("system_absl_str_format") {
|
||||
packages = [ "absl_str_format" ]
|
||||
}
|
||||
@@ -59,8 +63,27 @@ source_set("str_format") {
|
||||
public_configs = [ ":system_absl_str_format" ]
|
||||
}
|
||||
|
||||
+shim_headers("string_view_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/strings/"
|
||||
+ headers = [ "string_view.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("string_view") {
|
||||
+ deps = [ ":string_view_shim" ]
|
||||
+ public_configs = [ ":system_absl_string_view" ]
|
||||
+}
|
||||
+
|
||||
+source_set("has_ostream_operator") {
|
||||
+ # Dummy — unavailable with abseil 202308 aand chromium 122 does not use it
|
||||
+}
|
||||
+
|
||||
source_set("ascii_test") {
|
||||
}
|
||||
+source_set("char_formatting_test") {
|
||||
+}
|
||||
+source_set("charset_test") {
|
||||
+}
|
||||
source_set("cord_buffer_test") {
|
||||
}
|
||||
source_set("cord_data_edge_test") {
|
||||
@@ -85,8 +108,30 @@ source_set("cordz_update_scope_test") {
|
||||
}
|
||||
source_set("cordz_update_tracker_test") {
|
||||
}
|
||||
+source_set("damerau_levenshtein_distance_test") {
|
||||
+}
|
||||
+source_set("has_absl_stringify_test") {
|
||||
+}
|
||||
+source_set("has_ostream_operator_test") {
|
||||
+}
|
||||
source_set("match_test") {
|
||||
}
|
||||
+source_set("str_format_arg_test") {
|
||||
+}
|
||||
+source_set("str_format_bind_test") {
|
||||
+}
|
||||
+source_set("str_format_checker_test") {
|
||||
+}
|
||||
+source_set("str_format_convert_test") {
|
||||
+}
|
||||
+source_set("str_format_extension_test") {
|
||||
+}
|
||||
+source_set("str_format_output_test") {
|
||||
+}
|
||||
+source_set("str_format_parser_test") {
|
||||
+}
|
||||
+source_set("str_format_test") {
|
||||
+}
|
||||
source_set("str_replace_test") {
|
||||
}
|
||||
source_set("string_view_test") {
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_synchronization.gn src/build/linux/unbundle/absl_synchronization.gn
|
||||
--- src/build/linux/unbundle.old/absl_synchronization.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_synchronization.gn 2024-04-07 17:26:28.412783500 +0000
|
||||
@@ -20,3 +20,6 @@ source_set("synchronization") {
|
||||
deps = [ ":synchronization_shim" ]
|
||||
public_configs = [ ":system_absl_synchronization" ]
|
||||
}
|
||||
+
|
||||
+source_set("kernel_timeout_internal_test") {}
|
||||
+source_set("waiter_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_time.gn src/build/linux/unbundle/absl_time.gn
|
||||
--- src/build/linux/unbundle.old/absl_time.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_time.gn 2024-04-07 17:26:42.305628700 +0000
|
||||
@@ -19,3 +19,5 @@ source_set("time") {
|
||||
deps = [ ":time_shim" ]
|
||||
public_configs = [ ":system_absl_time" ]
|
||||
}
|
||||
+
|
||||
+source_set("time_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_utility.gn src/build/linux/unbundle/absl_utility.gn
|
||||
--- src/build/linux/unbundle.old/absl_utility.gn 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/absl_utility.gn 2024-04-07 17:26:54.834405600 +0000
|
||||
@@ -15,3 +15,5 @@ source_set("utility") {
|
||||
deps = [ ":utility_shim" ]
|
||||
public_configs = [ ":system_absl_utility" ]
|
||||
}
|
||||
+
|
||||
+source_set("if_constexpr_test") {}
|
||||
diff '--color=auto' -uprN src/build/linux/unbundle.old/replace_gn_files.py src/build/linux/unbundle/replace_gn_files.py
|
||||
--- src/build/linux/unbundle.old/replace_gn_files.py 2024-04-02 09:53:10.734295000 +0000
|
||||
+++ src/build/linux/unbundle/replace_gn_files.py 2024-04-07 17:29:53.274515100 +0000
|
||||
@@ -20,6 +20,7 @@ REPLACEMENTS = {
|
||||
'absl_base': 'third_party/abseil-cpp/absl/base/BUILD.gn',
|
||||
'absl_cleanup': 'third_party/abseil-cpp/absl/cleanup/BUILD.gn',
|
||||
'absl_container': 'third_party/abseil-cpp/absl/container/BUILD.gn',
|
||||
+ 'absl_crc': 'third_party/abseil-cpp/absl/crc/BUILD.gn',
|
||||
'absl_debugging': 'third_party/abseil-cpp/absl/debugging/BUILD.gn',
|
||||
'absl_flags': 'third_party/abseil-cpp/absl/flags/BUILD.gn',
|
||||
'absl_functional': 'third_party/abseil-cpp/absl/functional/BUILD.gn',
|
@@ -1,80 +0,0 @@
|
||||
diff --git a/base/types/to_address.h.new b/base/types/to_address.h.new
|
||||
new file mode 100644
|
||||
index 0000000..ac71b01
|
||||
--- /dev/null
|
||||
+++ b/base/types/to_address.h
|
||||
@@ -0,0 +1,40 @@
|
||||
+// Copyright 2024 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef BASE_TYPES_TO_ADDRESS_H_
|
||||
+#define BASE_TYPES_TO_ADDRESS_H_
|
||||
+
|
||||
+#include <memory>
|
||||
+#include <type_traits>
|
||||
+
|
||||
+// SFINAE-compatible wrapper for `std::to_address()`.
|
||||
+//
|
||||
+// The standard does not require `std::to_address()` to be SFINAE-compatible
|
||||
+// when code attempts instantiation with non-pointer-like types, and libstdc++'s
|
||||
+// implementation hard errors. For the sake of templated code that wants simple,
|
||||
+// unified handling, Chromium instead uses this wrapper, which provides that
|
||||
+// guarantee. This allows code to use "`to_address()` would be valid here" as a
|
||||
+// constraint to detect pointer-like types.
|
||||
+namespace base {
|
||||
+
|
||||
+// Note that calling `std::to_address()` with a function pointer renders the
|
||||
+// program ill-formed.
|
||||
+template <typename T>
|
||||
+ requires(!std::is_function_v<T>)
|
||||
+constexpr T* to_address(T* p) noexcept {
|
||||
+ return p;
|
||||
+}
|
||||
+
|
||||
+// These constraints cover the cases where `std::to_address()`'s fancy pointer
|
||||
+// overload is well-specified.
|
||||
+template <typename P>
|
||||
+ requires requires(const P& p) { std::pointer_traits<P>::to_address(p); } ||
|
||||
+ requires(const P& p) { p.operator->(); }
|
||||
+constexpr auto to_address(const P& p) noexcept {
|
||||
+ return std::to_address(p);
|
||||
+}
|
||||
+
|
||||
+} // namespace base
|
||||
+
|
||||
+#endif // BASE_TYPES_TO_ADDRESS_H_
|
||||
diff --git a/mojo/public/cpp/bindings/type_converter.h b/mojo/public/cpp/bindings/type_converter.h.new
|
||||
index 2eddbb0..317245f 100644
|
||||
--- a/mojo/public/cpp/bindings/type_converter.h
|
||||
+++ b/mojo/public/cpp/bindings/type_converter.h
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
+#include "base/types/to_address.h"
|
||||
+
|
||||
namespace mojo {
|
||||
|
||||
// NOTE: When possible, please consider using StructTraits / UnionTraits /
|
||||
@@ -99,16 +99,16 @@
|
||||
|
||||
template <typename T, typename U>
|
||||
requires requires(const U& obj) {
|
||||
- not std::is_pointer_v<U>;
|
||||
- { mojo::ConvertTo<T>(std::to_address(obj)) } -> std::same_as<T>;
|
||||
+ !std::is_pointer_v<U>;
|
||||
+ { mojo::ConvertTo<T>(base::to_address(obj)) } -> std::same_as<T>;
|
||||
}
|
||||
inline T ConvertTo(const U& obj) {
|
||||
- return mojo::ConvertTo<T>(std::to_address(obj));
|
||||
+ return mojo::ConvertTo<T>(base::to_address(obj));
|
||||
}
|
||||
|
||||
template <typename T, typename U>
|
||||
requires requires(const U& obj) {
|
||||
- not std::is_pointer_v<U>;
|
||||
+ !std::is_pointer_v<U>;
|
||||
TypeConverter<T, U>::Convert(obj);
|
||||
}
|
||||
inline T ConvertTo(const U& obj) {
|
@@ -1,208 +0,0 @@
|
||||
diff '--color=auto' -urp src/build/linux/unbundle.orig/absl_flags.gn src/build/linux/unbundle/absl_flags.gn
|
||||
--- src/build/linux/unbundle.orig/absl_flags.gn
|
||||
+++ src/build/linux/unbundle/absl_flags.gn
|
||||
@@ -5,14 +5,36 @@ pkg_config("system_absl_flags") {
|
||||
packages = [ "absl_flags" ]
|
||||
}
|
||||
|
||||
+pkg_config("absl_flags_config") {
|
||||
+ packages = [ "absl_flags_config" ]
|
||||
+}
|
||||
+
|
||||
pkg_config("system_absl_flags_parse") {
|
||||
packages = [ "absl_flags_parse" ]
|
||||
}
|
||||
|
||||
+pkg_config("system_absl_flags_reflection") {
|
||||
+ packages = [ "absl_flags_reflection" ]
|
||||
+}
|
||||
+
|
||||
pkg_config("system_absl_flags_usage") {
|
||||
packages = [ "absl_flags_usage" ]
|
||||
}
|
||||
|
||||
+shim_headers("flags_config_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/flags/"
|
||||
+ headers = [
|
||||
+ "config.h",
|
||||
+ "usage_config.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("config") {
|
||||
+ deps = [ ":flags_config_shim" ]
|
||||
+ public_configs = [ ":absl_flags_config" ]
|
||||
+}
|
||||
+
|
||||
shim_headers("flag_shim") {
|
||||
root_path = "."
|
||||
prefix = "absl/flags/"
|
||||
@@ -38,6 +60,20 @@ source_set("parse") {
|
||||
public_configs = [ ":system_absl_flags_parse" ]
|
||||
}
|
||||
|
||||
+shim_headers("flags_reflection_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/flags/"
|
||||
+ headers = [
|
||||
+ "internal/registry.h",
|
||||
+ "reflection.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("reflection") {
|
||||
+ deps = [ ":flags_reflection_shim" ]
|
||||
+ public_configs = [ ":system_absl_flags_reflection" ]
|
||||
+}
|
||||
+
|
||||
shim_headers("usage_shim") {
|
||||
root_path = "."
|
||||
prefix = "absl/flags/"
|
||||
diff '--color=auto' -urp src/build/linux/unbundle.orig/absl_log.gn src/build/linux/unbundle/absl_log.gn
|
||||
--- src/build/linux/unbundle.orig/absl_log.gn
|
||||
+++ src/build/linux/unbundle/absl_log.gn
|
||||
@@ -13,9 +13,22 @@ pkg_config("system_absl_die_if_null") {
|
||||
packages = [ "absl_die_if_null" ]
|
||||
}
|
||||
|
||||
+pkg_config("system_absl_check") {
|
||||
+ packages = [ "absl_check" ]
|
||||
+}
|
||||
+
|
||||
pkg_config("system_absl_log") {
|
||||
packages = [ "absl_log" ]
|
||||
}
|
||||
+
|
||||
+pkg_config("system_absl_log_globals") {
|
||||
+ packages = [ "absl_log_globals" ]
|
||||
+}
|
||||
+
|
||||
+pkg_config("system_absl_log_initialize") {
|
||||
+ packages = [ "absl_log_initialize" ]
|
||||
+}
|
||||
+
|
||||
shim_headers("absl_check_shim") {
|
||||
root_path = "."
|
||||
prefix = "absl/log/"
|
||||
@@ -49,6 +62,39 @@ source_set("die_if_null") {
|
||||
public_configs = [ ":system_absl_die_if_null" ]
|
||||
}
|
||||
|
||||
+shim_headers("check_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/log/"
|
||||
+ headers = [ "check.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("check") {
|
||||
+ deps = [ ":check_shim" ]
|
||||
+ public_configs = [ ":system_absl_check" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("globals_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/log/"
|
||||
+ headers = [ "globals.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("globals") {
|
||||
+ deps = [ ":globals_shim" ]
|
||||
+ public_configs = [ ":system_absl_log_globals" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("initialize_shim") {
|
||||
+ root_path = "."
|
||||
+ prefix = "absl/log/"
|
||||
+ headers = [ "initialize.h" ]
|
||||
+}
|
||||
+
|
||||
+source_set("initialize") {
|
||||
+ deps = [ ":initialize_shim" ]
|
||||
+ public_configs = [ ":system_absl_log_initialize" ]
|
||||
+}
|
||||
+
|
||||
shim_headers("log_shim") {
|
||||
root_path = "."
|
||||
prefix = "absl/log/"
|
||||
diff '--color=auto' -urp src/build/linux/unbundle.orig/re2.gn src/build/linux/unbundle/re2.gn
|
||||
--- src/build/linux/unbundle.orig/re2.gn
|
||||
+++ src/build/linux/unbundle/re2.gn
|
||||
@@ -3,6 +3,7 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/c++/c++.gni")
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
import("//build/shim_headers.gni")
|
||||
|
||||
assert(!use_custom_libcxx,
|
||||
@@ -10,6 +11,10 @@ assert(!use_custom_libcxx,
|
||||
"use_custom_libcxx=true because the library's interface relies on " +
|
||||
"libstdc++'s std::string and std::vector.")
|
||||
|
||||
+pkg_config("re2_config") {
|
||||
+ packages = [ "re2" ]
|
||||
+}
|
||||
+
|
||||
shim_headers("re2_shim") {
|
||||
root_path = "src"
|
||||
headers = [
|
||||
@@ -23,5 +28,5 @@ shim_headers("re2_shim") {
|
||||
|
||||
source_set("re2") {
|
||||
deps = [ ":re2_shim" ]
|
||||
- libs = [ "re2" ]
|
||||
+ public_configs = [ ":re2_config" ]
|
||||
}
|
||||
--- src/build/linux/unbundle/absl_container.gn.orig
|
||||
+++ src/build/linux/unbundle/absl_container.gn
|
||||
@@ -117,6 +117,8 @@ source_set("flat_hash_map_test") {
|
||||
}
|
||||
source_set("flat_hash_set_test") {
|
||||
}
|
||||
+source_set("hash_function_defaults_test") {
|
||||
+}
|
||||
source_set("inlined_vector_test") {
|
||||
}
|
||||
source_set("node_slot_policy_test") {
|
||||
--- src/build/linux/unbundle/replace_gn_files.py.orig
|
||||
+++ src/build/linux/unbundle/replace_gn_files.py
|
||||
@@ -80,6 +80,7 @@ REPLACEMENTS = {
|
||||
'vulkan_memory_allocator' : 'third_party/vulkan_memory_allocator/BUILD.gn',
|
||||
'woff2': 'third_party/woff2/BUILD.gn',
|
||||
'zlib': 'third_party/zlib/BUILD.gn',
|
||||
+ 'zstd': 'third_party/zstd/BUILD.gn',
|
||||
}
|
||||
|
||||
|
||||
--- /dev/null
|
||||
+++ src/build/linux/unbundle/zstd.gn
|
||||
@@ -0,0 +1,28 @@
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+
|
||||
+pkg_config("system_zstd") {
|
||||
+ packages = [ "libzstd" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("zstd_shim") {
|
||||
+ root_path = "src/lib"
|
||||
+ headers = [
|
||||
+ "zstd.h",
|
||||
+ "zstd_errors.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("compress") {
|
||||
+ deps = [ ":zstd_shim" ]
|
||||
+ public_configs = [ ":system_zstd" ]
|
||||
+}
|
||||
+source_set("decompress") {
|
||||
+ deps = [ ":zstd_shim" ]
|
||||
+ public_configs = [ ":system_zstd" ]
|
||||
+}
|
||||
+
|
||||
+source_set("headers") {
|
||||
+ deps = [ ":zstd_shim" ]
|
||||
+ public_configs = [ ":system_zstd" ]
|
||||
+}
|
@@ -1,5 +1,5 @@
|
||||
--- src/skia/BUILD.gn.orig 2025-04-11 12:05:22.085153891 +0200
|
||||
+++ src/skia/BUILD.gn 2025-04-11 20:35:59.999827501 +0200
|
||||
--- a/skia/BUILD.gn
|
||||
+++ b/skia/BUILD.gn
|
||||
@@ -8,7 +8,6 @@ import("//build/config/features.gni")
|
||||
import("//build/config/freetype/freetype.gni")
|
||||
import("//build/config/rust.gni")
|
||||
@@ -19,13 +19,13 @@
|
||||
-rust_static_library("bridge_rust_side") {
|
||||
- allow_unsafe = true
|
||||
- crate_root = skia_fontations_bridge_root
|
||||
- sources = skia_fontations_bridge_sources
|
||||
- cxx_bindings = skia_fontations_bridge_sources
|
||||
- sources = skia_ports_fontations_bridge_rust_side_sources
|
||||
- cxx_bindings = [ skia_fontations_bridge_root ]
|
||||
- deps = [
|
||||
- ":path_bridge",
|
||||
- "//third_party/rust/font_types/v0_8:lib",
|
||||
- "//third_party/rust/read_fonts/v0_25:lib",
|
||||
- "//third_party/rust/skrifa/v0_26:lib",
|
||||
- "//third_party/rust/read_fonts/v0_27:lib",
|
||||
- "//third_party/rust/skrifa/v0_29:lib",
|
||||
- ]
|
||||
- configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
- configs += [
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
# External-facing config for dependent code.
|
||||
config("skia_config") {
|
||||
@@ -182,7 +160,6 @@ config("skia_library_config") {
|
||||
@@ -190,7 +168,6 @@ config("skia_library_config") {
|
||||
if (use_blink && enable_freetype) {
|
||||
defines += [
|
||||
"SK_TYPEFACE_FACTORY_FREETYPE",
|
||||
@@ -44,7 +44,7 @@
|
||||
"SK_FONTMGR_FREETYPE_EMPTY_AVAILABLE",
|
||||
]
|
||||
}
|
||||
@@ -417,14 +394,6 @@ component("skia") {
|
||||
@@ -428,14 +405,6 @@ component("skia") {
|
||||
public += skia_ports_fontmgr_empty_public
|
||||
}
|
||||
sources += skia_ports_typeface_proxy_sources
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -719,13 +688,7 @@ skia_source_set("skia_core_and_effects")
|
||||
@@ -730,13 +699,7 @@ skia_source_set("skia_core_and_effects")
|
||||
# skia_core_and_effects rather than the other way around.
|
||||
public_deps = [ "//third_party/dawn/include/dawn:cpp_headers" ]
|
||||
}
|
||||
@@ -74,37 +74,139 @@
|
||||
visibility = [ ":skia" ]
|
||||
}
|
||||
|
||||
--- src/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc.orig 2025-04-11 12:05:22.929220697 +0200
|
||||
+++ src/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc 2025-04-11 20:35:59.999827501 +0200
|
||||
@@ -13,7 +13,6 @@
|
||||
--- a/skia/ext/font_utils.cc
|
||||
+++ b/skia/ext/font_utils.cc
|
||||
@@ -69,13 +69,7 @@ static sk_sp<SkFontMgr> fontmgr_factory(
|
||||
return SkFontMgr_New_CoreText(nullptr);
|
||||
#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
|
||||
sk_sp<SkFontConfigInterface> fci(SkFontConfigInterface::RefGlobal());
|
||||
- if (base::FeatureList::IsEnabled(skia::kFontationsLinuxSystemFonts)) {
|
||||
- return fci ? SkFontMgr_New_FCI(std::move(fci),
|
||||
- SkFontScanner_Make_Fontations())
|
||||
- : nullptr;
|
||||
- } else {
|
||||
- return fci ? SkFontMgr_New_FCI(std::move(fci)) : nullptr;
|
||||
- }
|
||||
+ return fci ? SkFontMgr_New_FCI(std::move(fci)) : nullptr;
|
||||
#elif BUILDFLAG(IS_FUCHSIA)
|
||||
fuchsia::fonts::ProviderSyncPtr provider;
|
||||
base::ComponentContextForProcess()->svc()->Connect(provider.NewRequest());
|
||||
--- a/third_party/blink/renderer/platform/fonts/skia/sktypeface_factory.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/skia/sktypeface_factory.cc
|
||||
@@ -29,11 +29,7 @@ sk_sp<SkTypeface> SkTypeface_Factory::Fr
|
||||
font_identity.fID = config_id;
|
||||
font_identity.fTTCIndex = ttc_index;
|
||||
|
||||
- if (base::FeatureList::IsEnabled(skia::kFontationsLinuxSystemFonts)) {
|
||||
- return fci->makeTypeface(font_identity, SkFontMgr_New_Fontations_Empty());
|
||||
- } else {
|
||||
return fci->makeTypeface(font_identity, skia::DefaultFontMgr());
|
||||
- }
|
||||
#else
|
||||
NOTREACHED();
|
||||
#endif
|
||||
@@ -46,12 +42,7 @@ sk_sp<SkTypeface> SkTypeface_Factory::Fr
|
||||
#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) && \
|
||||
!BUILDFLAG(IS_APPLE)
|
||||
|
||||
- if (base::FeatureList::IsEnabled(skia::kFontationsLinuxSystemFonts)) {
|
||||
- return SkFontMgr_New_Fontations_Empty()->makeFromFile(filename.c_str(),
|
||||
- ttc_index);
|
||||
- } else {
|
||||
return skia::DefaultFontMgr()->makeFromFile(filename.c_str(), ttc_index);
|
||||
- }
|
||||
#else
|
||||
NOTREACHED();
|
||||
#endif
|
||||
--- a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "third_party/blink/renderer/platform/fonts/opentype/font_format_check.h"
|
||||
#include "third_party/freetype_buildflags.h"
|
||||
#include "third_party/skia/include/core/SkStream.h"
|
||||
#include "third_party/skia/include/core/SkTypeface.h"
|
||||
-#include "third_party/skia/include/ports/SkTypeface_fontations.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "third_party/blink/renderer/platform/fonts/win/dwrite_font_format_support.h"
|
||||
@@ -55,7 +54,7 @@ bool IsFreeTypeSystemRasterizer() {
|
||||
@@ -38,11 +37,7 @@ bool IsWin() {
|
||||
}
|
||||
|
||||
bool IsFreeTypeSystemRasterizer() {
|
||||
-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_APPLE)
|
||||
return true;
|
||||
-#else
|
||||
- return false;
|
||||
-#endif
|
||||
}
|
||||
|
||||
sk_sp<SkTypeface> MakeTypefaceDefaultFontMgr(sk_sp<SkData> data) {
|
||||
@@ -50,13 +45,7 @@ sk_sp<SkTypeface> MakeTypefaceDefaultFon
|
||||
return FontCache::Get().FontManager()->makeFromData(data, 0);
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(IS_APPLE)
|
||||
return skia::DefaultFontMgr()->makeFromData(data, 0);
|
||||
-#endif
|
||||
-
|
||||
-#if !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE))
|
||||
+#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE))
|
||||
if (RuntimeEnabledFeatures::FontationsFontBackendEnabled()) {
|
||||
std::unique_ptr<SkStreamAsset> stream(new SkMemoryStream(data));
|
||||
return SkTypeface_Make_Fontations(std::move(stream), SkFontArguments());
|
||||
@@ -83,10 +82,6 @@ sk_sp<SkTypeface> MakeTypefaceFallback(s
|
||||
- return SkTypeface_Make_Fontations(data, SkFontArguments());
|
||||
-#endif
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE)
|
||||
@@ -65,10 +54,6 @@ sk_sp<SkTypeface> MakeTypefaceFallback(s
|
||||
}
|
||||
#endif
|
||||
|
||||
-sk_sp<SkTypeface> MakeTypefaceFontations(sk_sp<SkData> data) {
|
||||
- std::unique_ptr<SkStreamAsset> stream(new SkMemoryStream(data));
|
||||
- return SkTypeface_Make_Fontations(std::move(stream), SkFontArguments());
|
||||
- return SkTypeface_Make_Fontations(data, SkFontArguments());
|
||||
-}
|
||||
|
||||
-
|
||||
sk_sp<SkTypeface> MakeVariationsTypeface(
|
||||
sk_sp<SkData> data,
|
||||
@@ -188,7 +183,6 @@ bool WebFontTypefaceFactory::CreateTypef
|
||||
const WebFontTypefaceFactory::FontInstantiator& instantiator) {
|
||||
@@ -88,9 +73,6 @@ sk_sp<SkTypeface> MakeSbixTypeface(
|
||||
const WebFontTypefaceFactory::FontInstantiator& instantiator) {
|
||||
// If we're on a OS with FreeType as backend, or on Windows, where we used to
|
||||
// use FreeType for SBIX, switch to Fontations for SBIX.
|
||||
- if (IsFreeTypeSystemRasterizer() || IsWin()) {
|
||||
- return instantiator.make_fontations(data);
|
||||
- }
|
||||
|
||||
// Remaining case, on Mac, CoreText can handle creating SBIX fonts.
|
||||
return instantiator.make_system(data);
|
||||
@@ -99,29 +81,21 @@ sk_sp<SkTypeface> MakeSbixTypeface(
|
||||
sk_sp<SkTypeface> MakeColrV0Typeface(
|
||||
sk_sp<SkData> data,
|
||||
const WebFontTypefaceFactory::FontInstantiator& instantiator) {
|
||||
- if (IsWin()) {
|
||||
// On Windows Skia's DirectWrite
|
||||
// backend handles COLRv0.
|
||||
return instantiator.make_system(data);
|
||||
- }
|
||||
- return instantiator.make_fontations(data);
|
||||
}
|
||||
|
||||
sk_sp<SkTypeface> MakeColrV0VariationsTypeface(
|
||||
sk_sp<SkData> data,
|
||||
const WebFontTypefaceFactory::FontInstantiator& instantiator) {
|
||||
-#if BUILDFLAG(IS_WIN)
|
||||
- if (DWriteVersionSupportsVariations()) {
|
||||
return instantiator.make_system(data);
|
||||
- }
|
||||
-#endif
|
||||
- return instantiator.make_fontations(data);
|
||||
}
|
||||
|
||||
sk_sp<SkTypeface> MakeFontationsFallbackPreferred(
|
||||
sk_sp<SkData> data,
|
||||
const WebFontTypefaceFactory::FontInstantiator& instantiator) {
|
||||
- return instantiator.make_fontations(data);
|
||||
+ return instantiator.make_system(data);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -131,7 +105,6 @@ bool WebFontTypefaceFactory::CreateTypef
|
||||
const FontFormatCheck format_check(data);
|
||||
const FontInstantiator instantiator = {
|
||||
MakeTypefaceDefaultFontMgr,
|
||||
|
@@ -1,15 +1,44 @@
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -27,7 +27,6 @@ import("//extensions/buildflags/buildfla
|
||||
import("//gpu/vulkan/features.gni")
|
||||
import("//media/gpu/args.gni")
|
||||
import("//media/media_options.gni")
|
||||
-import("//mojo/public/rust/rust.gni")
|
||||
import("//pdf/features.gni")
|
||||
import("//ppapi/buildflags/buildflags.gni")
|
||||
import("//printing/buildflags/buildflags.gni")
|
||||
@@ -885,17 +884,10 @@ group("all_rust") {
|
||||
|
||||
deps = [
|
||||
":rust_build_tests",
|
||||
- "//base:base_unittests", # There is rust stuff in here.
|
||||
- "//third_party/cloud_authenticator/processor",
|
||||
]
|
||||
|
||||
- # TODO(https://crbug.com/405379314): This fails to build on some iOS ASAN
|
||||
- # builders.
|
||||
- if (!is_ios || !is_asan) {
|
||||
- deps += [ "//testing/rust_gtest_interop:rust_gtest_interop_unittests" ]
|
||||
- }
|
||||
|
||||
- if (enable_rust_mojo) {
|
||||
+ if (false) {
|
||||
deps += [
|
||||
"//mojo/public/rust:mojo_rust",
|
||||
"//mojo/public/rust:mojo_rust_integration_unittests",
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -38,8 +38,6 @@
|
||||
@@ -36,8 +36,6 @@ import("//build/config/sanitizers/saniti
|
||||
import("//build/config/sysroot.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//build/nocompile.gni")
|
||||
-import("//build/rust/rust_bindgen.gni")
|
||||
-import("//build/rust/rust_static_library.gni")
|
||||
import("//build/timestamp.gni")
|
||||
import("//build/util/process_version.gni")
|
||||
import("//build_overrides/build.gni")
|
||||
@@ -1022,11 +1020,6 @@
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
@@ -1053,11 +1051,6 @@ component("base") {
|
||||
# Used by metrics/crc32, except on NaCl builds.
|
||||
deps += [ "//third_party/zlib" ]
|
||||
|
||||
@@ -21,7 +50,7 @@
|
||||
}
|
||||
|
||||
# `raw_ptr` cannot be made a component due to CRT symbol issues.
|
||||
@@ -1063,7 +1056,7 @@
|
||||
@@ -1093,7 +1086,7 @@ component("base") {
|
||||
"//third_party/abseil-cpp:absl",
|
||||
]
|
||||
|
||||
@@ -30,7 +59,7 @@
|
||||
sources += [
|
||||
"containers/span_rust.h",
|
||||
"strings/string_view_rust.h",
|
||||
@@ -1543,8 +1536,6 @@
|
||||
@@ -1598,8 +1591,6 @@ component("base") {
|
||||
"files/scoped_temp_file.h",
|
||||
"json/json_file_value_serializer.cc",
|
||||
"json/json_file_value_serializer.h",
|
||||
@@ -39,7 +68,7 @@
|
||||
"memory/discardable_memory.cc",
|
||||
"memory/discardable_memory.h",
|
||||
"memory/discardable_memory_allocator.cc",
|
||||
@@ -2447,40 +2438,6 @@
|
||||
@@ -2542,62 +2533,6 @@ component("base") {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,21 +84,43 @@
|
||||
- deps = [ ":debugging_buildflags" ]
|
||||
-}
|
||||
-
|
||||
-rust_bindgen("logging_rust_log_integration_bindgen") {
|
||||
- header = "logging/rust_log_integration.h"
|
||||
- cpp = true
|
||||
- visibility = [ ":*" ]
|
||||
-
|
||||
- # Transitive generated header dependency.
|
||||
- deps = [ ":debugging_buildflags" ]
|
||||
-}
|
||||
-
|
||||
-rust_static_library("rust_logger") {
|
||||
- allow_unsafe = true # Unsafe needed for FFI.
|
||||
- deps = [
|
||||
- ":logging_log_severity_bindgen",
|
||||
- ":logging_rust_log_integration_bindgen",
|
||||
- ":tracing_buildflags",
|
||||
- "//build:chromeos_buildflags",
|
||||
- "//third_party/rust/log/v0_4:lib",
|
||||
-
|
||||
- # Needed because of circular dependency: base depends on this target and by
|
||||
- # extension the cxx-generated C++ code, but the cxx-generated code includes
|
||||
- # base headers and calls base code. This seems to generally not cause
|
||||
- # issues, except for partition_alloc which applies configs when depended on.
|
||||
- #
|
||||
- # This allows the generated C++ code to transitively include partition alloc
|
||||
- # headers without issue.
|
||||
- #
|
||||
- # TODO(collinbaker): determine how to handle these cxx bindings-induced
|
||||
- # circular dependencies more robustly.
|
||||
- "//base/allocator/partition_allocator:raw_ptr",
|
||||
-
|
||||
- # Needed because logging/rust_logger.rs contains:
|
||||
- # include!("base/logging/rust_log_integration.h");
|
||||
- # rust_log_integration.h ends up transitively #including
|
||||
- # debug/debugging_buildflags.h, which is a generated header that needs to
|
||||
- # be written first.
|
||||
- #
|
||||
- # Technically it would be more correct to depend on :base, which is the
|
||||
- # target for rust_log_integration.h, but that's not possible due to circular
|
||||
- # dependencies.
|
||||
- #
|
||||
- # Note if this is removed the build may still work by accident because
|
||||
- # debug/debugging_buildflags.h still ends up being generated through a
|
||||
- # dependency chain via :logging_log_severity_bindgen. But we should not
|
||||
- # rely on that.
|
||||
- #
|
||||
- # See also https://crbug.com/406267472.
|
||||
- ":debugging_buildflags",
|
||||
- ]
|
||||
- visibility = [ ":base" ]
|
||||
- sources = [ "logging/rust_logger.rs" ]
|
||||
@@ -80,7 +131,7 @@
|
||||
|
||||
if (is_linux || is_chromeos) {
|
||||
# Split out as a separate target for two reasons:
|
||||
@@ -3564,7 +3521,7 @@
|
||||
@@ -3736,7 +3671,7 @@ test("base_unittests") {
|
||||
sources += [ "location_unittest.cc" ]
|
||||
}
|
||||
|
||||
@@ -89,7 +140,7 @@
|
||||
sources += [
|
||||
"containers/span_rust_unittest.cc",
|
||||
"strings/string_piece_rust_unittest.cc",
|
||||
@@ -3617,7 +3574,7 @@
|
||||
@@ -3791,7 +3726,7 @@ test("base_unittests") {
|
||||
deps += [ "allocator/partition_allocator/src/partition_alloc:unittests" ]
|
||||
}
|
||||
|
||||
@@ -98,33 +149,67 @@
|
||||
deps += [ "//build/rust:cxx_cppdeps" ]
|
||||
}
|
||||
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -28,7 +28,6 @@
|
||||
import("//gpu/vulkan/features.gni")
|
||||
import("//media/gpu/args.gni")
|
||||
import("//media/media_options.gni")
|
||||
-import("//mojo/public/rust/rust.gni")
|
||||
import("//pdf/features.gni")
|
||||
import("//ppapi/buildflags/buildflags.gni")
|
||||
import("//printing/buildflags/buildflags.gni")
|
||||
@@ -888,12 +887,9 @@
|
||||
--- a/base/json/json_reader.cc
|
||||
+++ b/base/json/json_reader.cc
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
deps = [
|
||||
":rust_build_tests",
|
||||
- "//base:base_unittests", # There is rust stuff in here.
|
||||
- "//testing/rust_gtest_interop:rust_gtest_interop_unittests",
|
||||
- "//third_party/cloud_authenticator/processor",
|
||||
]
|
||||
-#if BUILDFLAG(IS_NACL)
|
||||
+#if !BUILDFLAG(IS_NACL)
|
||||
#include "base/json/json_parser.h"
|
||||
#else
|
||||
#include "base/strings/string_view_rust.h"
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
- if (enable_rust_mojo) {
|
||||
+ if (false) {
|
||||
deps += [
|
||||
"//mojo/public/rust:mojo_rust",
|
||||
"//mojo/public/rust:mojo_rust_integration_unittests",
|
||||
// TODO(crbug.com/40811643): Move the C++ parser into components/nacl to just
|
||||
// run in-process there. Don't compile base::JSONReader on NaCL at all.
|
||||
-#if !BUILDFLAG(IS_NACL)
|
||||
+#if BUILDFLAG(IS_NACL)
|
||||
|
||||
namespace {
|
||||
const char kSecurityJsonParsingTime[] = "Security.JSONParser.ParsingTime";
|
||||
@@ -144,7 +144,7 @@ std::string JSONReader::Error::ToString(
|
||||
std::optional<Value> JSONReader::Read(std::string_view json,
|
||||
int options,
|
||||
size_t max_depth) {
|
||||
-#if BUILDFLAG(IS_NACL)
|
||||
+#if !BUILDFLAG(IS_NACL)
|
||||
internal::JSONParser parser(options, max_depth);
|
||||
return parser.Parse(json);
|
||||
#else // BUILDFLAG(IS_NACL)
|
||||
@@ -185,7 +185,7 @@ std::optional<Value::List> JSONReader::R
|
||||
JSONReader::Result JSONReader::ReadAndReturnValueWithError(
|
||||
std::string_view json,
|
||||
int options) {
|
||||
-#if BUILDFLAG(IS_NACL)
|
||||
+#if !BUILDFLAG(IS_NACL)
|
||||
internal::JSONParser parser(options);
|
||||
auto value = parser.Parse(json);
|
||||
if (!value) {
|
||||
--- a/base/logging.cc
|
||||
+++ b/base/logging.cc
|
||||
@@ -117,7 +117,7 @@ typedef FILE* FileHandle;
|
||||
#include "base/fuchsia/scoped_fx_logger.h"
|
||||
#endif
|
||||
|
||||
-#if !BUILDFLAG(IS_NACL)
|
||||
+#if BUILDFLAG(IS_NACL)
|
||||
#include "base/logging/rust_logger.rs.h"
|
||||
#endif
|
||||
|
||||
@@ -529,7 +529,7 @@ bool BaseInitLoggingImpl(const LoggingSe
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if !BUILDFLAG(IS_NACL)
|
||||
+#if BUILDFLAG(IS_NACL)
|
||||
// Connects Rust logging with the //base logging functionality.
|
||||
internal::init_rust_log_crate();
|
||||
#endif
|
||||
--- a/base/test/BUILD.gn
|
||||
+++ b/base/test/BUILD.gn
|
||||
@@ -7,7 +7,6 @@
|
||||
@@ -6,7 +6,6 @@ import("//build/compiled_action.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/nacl/config.gni")
|
||||
import("//build/config/ui.gni")
|
||||
@@ -132,7 +217,7 @@
|
||||
import("//build_overrides/build.gni")
|
||||
import("//third_party/protobuf/proto_library.gni")
|
||||
|
||||
@@ -39,16 +38,6 @@
|
||||
@@ -38,16 +37,6 @@ static_library("test_config") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -149,7 +234,7 @@
|
||||
|
||||
static_library("test_support") {
|
||||
testonly = true
|
||||
@@ -189,7 +178,6 @@
|
||||
@@ -192,7 +181,6 @@ static_library("test_support") {
|
||||
|
||||
public_deps = [
|
||||
":test_config",
|
||||
@@ -157,109 +242,36 @@
|
||||
"//base",
|
||||
"//base:base_static",
|
||||
"//base:i18n",
|
||||
--- a/services/on_device_model/ml/BUILD.gn
|
||||
+++ b/services/on_device_model/ml/BUILD.gn
|
||||
@@ -71,7 +71,6 @@ if (use_blink || (is_ios && build_with_i
|
||||
]
|
||||
if (enable_constraints) {
|
||||
defines += [ "ENABLE_ON_DEVICE_CONSTRAINTS" ]
|
||||
- deps += [ "//third_party/rust/llguidance/v0_7:lib" ]
|
||||
}
|
||||
if (use_blink) {
|
||||
deps += [ "//gpu/config" ]
|
||||
--- a/services/on_device_model/ml/chrome_ml.cc
|
||||
+++ b/services/on_device_model/ml/chrome_ml.cc
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "third_party/dawn/include/dawn/dawn_proc.h"
|
||||
#include "third_party/dawn/include/dawn/native/DawnNative.h"
|
||||
#include "third_party/dawn/include/dawn/webgpu_cpp.h"
|
||||
-#include "third_party/rust/chromium_crates_io/vendor/llguidance-v0_7/llguidance.h"
|
||||
|
||||
#if !BUILDFLAG(IS_IOS)
|
||||
#include "gpu/config/gpu_info_collector.h"
|
||||
--- a/third_party/blink/common/BUILD.gn
|
||||
+++ b/third_party/blink/common/BUILD.gn
|
||||
@@ -341,7 +341,6 @@
|
||||
"//services/metrics/public/cpp:ukm_builders",
|
||||
@@ -311,7 +311,6 @@ source_set("common") {
|
||||
"//services/metrics/public/mojom:mojom",
|
||||
"//services/network/public/cpp:cpp",
|
||||
"//services/network/public/mojom:mojom_permissions_policy",
|
||||
- "//third_party/blink/common/rust_crash",
|
||||
"//third_party/blink/public/common:buildflags",
|
||||
"//third_party/re2",
|
||||
"//ui/base:base",
|
||||
--- a/third_party/breakpad/BUILD.gn
|
||||
+++ b/third_party/breakpad/BUILD.gn
|
||||
@@ -494,11 +494,6 @@
|
||||
# For breakpad/src/common/stabs_reader.h.
|
||||
defines = [ "HAVE_MACH_O_NLIST_H" ]
|
||||
|
||||
- # Rust demangle support.
|
||||
- deps = [ "//third_party/rust/rustc_demangle_capi/v0_1:lib" ]
|
||||
- defines += [ "HAVE_RUSTC_DEMANGLE" ]
|
||||
- include_dirs += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include" ]
|
||||
- sources += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include/rustc_demangle.h" ]
|
||||
}
|
||||
test("breakpad_unittests") {
|
||||
sources = [ "breakpad/src/common/module_unittest.cc" ]
|
||||
@@ -742,11 +737,6 @@
|
||||
|
||||
include_dirs = [ "breakpad/src" ]
|
||||
|
||||
- # Rust demangle support.
|
||||
- deps = [ "//third_party/rust/rustc_demangle_capi/v0_1:lib" ]
|
||||
- defines += [ "HAVE_RUSTC_DEMANGLE" ]
|
||||
- include_dirs += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include" ]
|
||||
- sources += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-0.1.0/include/rustc_demangle.h" ]
|
||||
|
||||
libs = [ "z" ]
|
||||
}
|
||||
--- a/base/json/json_reader.cc
|
||||
+++ b/base/json/json_reader.cc
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
-#if !BUILDFLAG(IS_NACL)
|
||||
+#if BUILDFLAG(IS_NACL)
|
||||
#include "base/strings/string_view_rust.h"
|
||||
#include "third_party/rust/serde_json_lenient/v0_2/wrapper/functions.h"
|
||||
#include "third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs.h"
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
// TODO(crbug.com/40811643): Move the C++ parser into components/nacl to just
|
||||
// run in-process there. Don't compile base::JSONReader on NaCL at all.
|
||||
-#if !BUILDFLAG(IS_NACL)
|
||||
+#if BUILDFLAG(IS_NACL)
|
||||
|
||||
namespace {
|
||||
using serde_json_lenient::ContextPointer;
|
||||
@@ -140,7 +140,7 @@
|
||||
std::optional<Value> JSONReader::Read(std::string_view json,
|
||||
int options,
|
||||
size_t max_depth) {
|
||||
-#if BUILDFLAG(IS_NACL)
|
||||
+#if !BUILDFLAG(IS_NACL)
|
||||
internal::JSONParser parser(options, max_depth);
|
||||
return parser.Parse(json);
|
||||
#else // BUILDFLAG(IS_NACL)
|
||||
@@ -173,7 +173,7 @@
|
||||
JSONReader::Result JSONReader::ReadAndReturnValueWithError(
|
||||
std::string_view json,
|
||||
int options) {
|
||||
-#if BUILDFLAG(IS_NACL)
|
||||
+#if !BUILDFLAG(IS_NACL)
|
||||
internal::JSONParser parser(options);
|
||||
auto value = parser.Parse(json);
|
||||
if (!value) {
|
||||
@@ -213,7 +213,7 @@
|
||||
if (!base::FeatureList::GetInstance()) {
|
||||
return false;
|
||||
}
|
||||
-#if BUILDFLAG(IS_NACL)
|
||||
+#if !BUILDFLAG(IS_NACL)
|
||||
return false;
|
||||
#else
|
||||
return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser);
|
||||
--- a/base/logging.cc
|
||||
+++ b/base/logging.cc
|
||||
@@ -126,7 +126,7 @@
|
||||
#include "base/fuchsia/scoped_fx_logger.h"
|
||||
#endif
|
||||
|
||||
-#if !BUILDFLAG(IS_NACL)
|
||||
+#if BUILDFLAG(IS_NACL)
|
||||
#include "base/logging/rust_logger.rs.h"
|
||||
#endif
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if !BUILDFLAG(IS_NACL)
|
||||
+#if BUILDFLAG(IS_NACL)
|
||||
// Connects Rust logging with the //base logging functionality.
|
||||
internal::init_rust_log_crate();
|
||||
#endif
|
||||
--- a/third_party/blink/common/chrome_debug_urls.cc
|
||||
+++ b/third_party/blink/common/chrome_debug_urls.cc
|
||||
@@ -11,7 +11,6 @@
|
||||
@@ -270,7 +282,7 @@
|
||||
#include "url/gurl.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -117,7 +116,7 @@
|
||||
@@ -117,7 +116,7 @@ NOINLINE void MaybeTriggerAsanError(cons
|
||||
// Ensure that ASAN works even in Rust code.
|
||||
LOG(ERROR) << "Intentionally causing ASAN heap overflow in Rust"
|
||||
<< " because user navigated to " << url.spec();
|
||||
@@ -279,7 +291,7 @@
|
||||
}
|
||||
}
|
||||
#endif // ADDRESS_SANITIZER
|
||||
@@ -137,7 +136,7 @@
|
||||
@@ -137,7 +136,7 @@ void HandleChromeDebugURL(const GURL& ur
|
||||
} else if (url == kChromeUICrashRustURL) {
|
||||
// Cause a typical crash in Rust code, so we can test that call stack
|
||||
// collection and symbol mangling work across the language boundary.
|
||||
@@ -288,3 +300,32 @@
|
||||
} else if (url == kChromeUIDumpURL) {
|
||||
// This URL will only correctly create a crash dump file if content is
|
||||
// hosted in a process that has correctly called
|
||||
--- a/third_party/breakpad/BUILD.gn
|
||||
+++ b/third_party/breakpad/BUILD.gn
|
||||
@@ -494,12 +494,7 @@ if (is_mac) {
|
||||
# For breakpad/src/common/stabs_reader.h.
|
||||
defines = [ "HAVE_MACH_O_NLIST_H" ]
|
||||
|
||||
- # Rust demangle support.
|
||||
- deps = [ "//third_party/rust/rustc_demangle_capi/v0_1:lib" ]
|
||||
- defines += [ "HAVE_RUSTC_DEMANGLE" ]
|
||||
- include_dirs += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-v0_1/include" ]
|
||||
- sources += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-v0_1/include/rustc_demangle.h" ]
|
||||
- }
|
||||
+ }
|
||||
test("breakpad_unittests") {
|
||||
sources = [ "breakpad/src/common/module_unittest.cc" ]
|
||||
deps = [
|
||||
@@ -742,12 +737,6 @@ if (is_linux || is_chromeos || is_androi
|
||||
|
||||
include_dirs = [ "breakpad/src" ]
|
||||
|
||||
- # Rust demangle support.
|
||||
- deps = [ "//third_party/rust/rustc_demangle_capi/v0_1:lib" ]
|
||||
- defines += [ "HAVE_RUSTC_DEMANGLE" ]
|
||||
- include_dirs += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-v0_1/include" ]
|
||||
- sources += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-v0_1/include/rustc_demangle.h" ]
|
||||
-
|
||||
libs = [ "z" ]
|
||||
}
|
||||
} else if (current_toolchain == default_toolchain) {
|
||||
|
@@ -1,76 +0,0 @@
|
||||
diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h
|
||||
index 842553a..89de703 100644
|
||||
--- a/components/media_router/common/providers/cast/channel/enum_table.h
|
||||
+++ b/components/media_router/common/providers/cast/channel/enum_table.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <ostream>
|
||||
+#include <vector>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/notreached.h"
|
||||
@@ -187,7 +188,6 @@ class
|
||||
inline constexpr GenericEnumTableEntry(int32_t value);
|
||||
inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
|
||||
|
||||
- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
|
||||
GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
|
||||
|
||||
private:
|
||||
@@ -253,7 +253,6 @@ class EnumTable {
|
||||
constexpr Entry(E value, base::StringPiece str)
|
||||
: GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
|
||||
|
||||
- Entry(const Entry&) = delete;
|
||||
Entry& operator=(const Entry&) = delete;
|
||||
};
|
||||
|
||||
@@ -312,15 +311,14 @@ class EnumTable {
|
||||
if (is_sorted_) {
|
||||
const std::size_t index = static_cast<std::size_t>(value);
|
||||
if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
|
||||
- const auto& entry = data_.begin()[index];
|
||||
+ const auto& entry = data_[index];
|
||||
if (ANALYZER_ASSUME_TRUE(entry.has_str()))
|
||||
return entry.str();
|
||||
}
|
||||
return absl::nullopt;
|
||||
}
|
||||
return GenericEnumTableEntry::FindByValue(
|
||||
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
|
||||
- data_.size(), static_cast<int32_t>(value));
|
||||
+ &data_[0], data_.size(), static_cast<int32_t>(value));
|
||||
}
|
||||
|
||||
// This overload of GetString is designed for cases where the argument is a
|
||||
@@ -348,8 +346,7 @@ class EnumTable {
|
||||
// enum value directly.
|
||||
absl::optional<E> GetEnum(base::StringPiece str) const {
|
||||
auto* entry = GenericEnumTableEntry::FindByString(
|
||||
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
|
||||
- data_.size(), str);
|
||||
+ &data_[0], data_.size(), str);
|
||||
return entry ? static_cast<E>(entry->value) : absl::optional<E>();
|
||||
}
|
||||
|
||||
@@ -364,7 +361,7 @@ class EnumTable {
|
||||
// Align the data on a cache line boundary.
|
||||
alignas(64)
|
||||
#endif
|
||||
- std::initializer_list<Entry> data_;
|
||||
+ const std::vector<Entry> data_;
|
||||
bool is_sorted_;
|
||||
|
||||
constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
|
||||
@@ -376,8 +373,8 @@ class EnumTable {
|
||||
|
||||
for (std::size_t i = 0; i < data.size(); i++) {
|
||||
for (std::size_t j = i + 1; j < data.size(); j++) {
|
||||
- const Entry& ei = data.begin()[i];
|
||||
- const Entry& ej = data.begin()[j];
|
||||
+ const Entry& ei = data[i];
|
||||
+ const Entry& ej = data[j];
|
||||
DCHECK(ei.value != ej.value)
|
||||
<< "Found duplicate enum values at indices " << i << " and " << j;
|
||||
DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))
|
@@ -1,37 +0,0 @@
|
||||
Index: electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc
|
||||
===================================================================
|
||||
--- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-07 17:28:24.814737660 +0100
|
||||
+++ electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-09 08:25:10.346569313 +0100
|
||||
@@ -14,6 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
+#include <limits>
|
||||
#include "src/trace_processor/db/column.h"
|
||||
|
||||
#include "perfetto/base/logging.h"
|
||||
Index: electron-17.1.0/ui/gtk/gtk_key_bindings_handler.cc
|
||||
===================================================================
|
||||
--- electron-17.1.0.orig/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-07 17:20:31.788817015 +0100
|
||||
+++ electron-17.1.0/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-09 08:25:10.346569313 +0100
|
||||
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include <cstddef>
|
||||
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
|
||||
|
||||
#include "base/observer_list.h"
|
||||
Index: electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc
|
||||
===================================================================
|
||||
--- electron-17.1.0.orig/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-07 17:20:33.308823187 +0100
|
||||
+++ electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-09 08:25:10.346569313 +0100
|
||||
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include <cstddef>
|
||||
+
|
||||
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
|
||||
|
||||
namespace bookmarks {
|
@@ -1,69 +0,0 @@
|
||||
--- src/chrome/browser/about_flags.cc.orig 2025-04-11 12:05:16.388151477 +0200
|
||||
+++ src/chrome/browser/about_flags.cc 2025-04-12 12:45:36.431775614 +0200
|
||||
@@ -5590,12 +5590,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
#endif
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
#endif // ENABLE_VR
|
||||
-#if BUILDFLAG(IS_CHROMEOS)
|
||||
+#if BUILDFLAG(IS_CHROMEOS_) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
{"disable-accelerated-mjpeg-decode",
|
||||
flag_descriptions::kAcceleratedMjpegDecodeName,
|
||||
- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
|
||||
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
|
||||
-#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
+#endif // BUILDFLAG(IS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
|
||||
flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)},
|
||||
--- src/chrome/browser/flag_descriptions.cc.orig 2025-04-11 12:05:16.849151673 +0200
|
||||
+++ src/chrome/browser/flag_descriptions.cc 2025-04-12 12:46:16.943776292 +0200
|
||||
@@ -5708,12 +5708,24 @@ const char kUseAngleDefault[] = "Default
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
+#endif
|
||||
+
|
||||
+// Chrome OS and Linux --------------------------------------------------------
|
||||
+
|
||||
+#if BUILDFLAG(IS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
+
|
||||
const char kAcceleratedMjpegDecodeName[] =
|
||||
"Hardware-accelerated mjpeg decode for captured frame";
|
||||
const char kAcceleratedMjpegDecodeDescription[] =
|
||||
"Enable hardware-accelerated MJPEG decode for captured frame where "
|
||||
"available.";
|
||||
|
||||
+#endif
|
||||
+
|
||||
+// Chrome OS ------------------------------------------------------------------
|
||||
+
|
||||
+#if BUILDFLAG(IS_CHROMEOS)
|
||||
+
|
||||
const char kAccessibilityBounceKeysName[] = "Bounce keys";
|
||||
const char kAccessibilityBounceKeysDescription[] =
|
||||
"Enables accessibility settings for bounce keys, which ignores quickly "
|
||||
--- src/chrome/browser/flag_descriptions.h.orig 2025-04-11 12:05:16.850151673 +0200
|
||||
+++ src/chrome/browser/flag_descriptions.h 2025-04-12 12:47:00.923776530 +0200
|
||||
@@ -3340,9 +3340,21 @@ extern const char kUseAngleDefault[];
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
+#endif
|
||||
+
|
||||
+// Chrome OS and Linux --------------------------------------------------------
|
||||
+
|
||||
+#if BUILDFLAG(IS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
+
|
||||
extern const char kAcceleratedMjpegDecodeName[];
|
||||
extern const char kAcceleratedMjpegDecodeDescription[];
|
||||
|
||||
+#endif
|
||||
+
|
||||
+#if BUILDFLAG(IS_CHROMEOS)
|
||||
+
|
||||
+// Chrome OS ------------------------------------------------------------------
|
||||
+
|
||||
extern const char kAccessibilityBounceKeysName[];
|
||||
extern const char kAccessibilityBounceKeysDescription[];
|
||||
|
@@ -1,44 +0,0 @@
|
||||
From ef8e6beaebcfc3e143b249ba76c177fbabd3b4ea Mon Sep 17 00:00:00 2001
|
||||
From: Yichen <yichenz@chromium.org>
|
||||
Date: Thu, 23 May 2024 23:44:41 +0000
|
||||
Subject: [PATCH] ui: fix gcc/libstdc++ build break
|
||||
|
||||
Bug: 340815321
|
||||
Change-Id: Ibf443f9f16dfff164e1f4d49a58582fb7a6aca1d
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5565320
|
||||
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
|
||||
Commit-Queue: Yichen Zhou <yichenz@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1305426}
|
||||
---
|
||||
ui/color/color_provider.cc | 3 ++-
|
||||
ui/color/color_provider.h | 3 +--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ui/color/color_provider.cc b/ui/color/color_provider.cc
|
||||
index 1597715de1f63c..3e0ffed9f4d4c4 100644
|
||||
--- a/ui/color/color_provider.cc
|
||||
+++ b/ui/color/color_provider.cc
|
||||
@@ -118,7 +118,8 @@ class ColorProvider::ColorProviderInternal {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ColorProvider:
|
||||
|
||||
-ColorProvider::ColorProvider() = default;
|
||||
+ColorProvider::ColorProvider()
|
||||
+ : internal_(std::make_unique<ColorProviderInternal>()) {}
|
||||
|
||||
ColorProvider::ColorProvider(ColorProvider&&) = default;
|
||||
|
||||
diff --git a/ui/color/color_provider.h b/ui/color/color_provider.h
|
||||
index 50fff33ae6ab6d..6ac6ed6938cf24 100644
|
||||
--- a/ui/color/color_provider.h
|
||||
+++ b/ui/color/color_provider.h
|
||||
@@ -65,8 +65,7 @@ class COMPONENT_EXPORT(COLOR) ColorProvider {
|
||||
// bind to it.
|
||||
class ColorProviderInternal;
|
||||
|
||||
- std::unique_ptr<ColorProviderInternal> internal_ =
|
||||
- std::make_unique<ColorProviderInternal>();
|
||||
+ std::unique_ptr<ColorProviderInternal> internal_;
|
||||
};
|
||||
|
||||
} // namespace ui
|
@@ -1,9 +1,9 @@
|
||||
--- src/third_party/electron_node/common.gypi.orig 2025-04-10 20:07:02.154742467 +0200
|
||||
+++ src/third_party/electron_node/common.gypi 2025-04-11 11:45:57.996110023 +0200
|
||||
@@ -514,15 +514,19 @@
|
||||
--- src/third_party/electron_node/common.gypi.orig 2025-07-19 11:44:59.181882205 +0200
|
||||
+++ src/third_party/electron_node/common.gypi 2025-07-19 16:21:44.297731896 +0200
|
||||
@@ -534,15 +534,19 @@
|
||||
'ldflags': [ '-pthread' ],
|
||||
}],
|
||||
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
|
||||
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi openharmony"', {
|
||||
- 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
|
||||
+ # Add some useful flags which need to be specified on all modules anyway.
|
||||
+ # `-fpic -fno-semantic-interposition` is the best relocation model for code that will live in a dlopened library
|
||||
@@ -23,7 +23,7 @@
|
||||
'target_conditions': [
|
||||
# The 1990s toolchain on SmartOS can't handle thin archives.
|
||||
['_type=="static_library" and OS=="solaris"', {
|
||||
@@ -700,29 +704,7 @@
|
||||
@@ -720,29 +724,7 @@
|
||||
'-Wl,--export-dynamic',
|
||||
],
|
||||
}],
|
||||
|
@@ -14,6 +14,6 @@ since we compile everything with -fasynchronous-unwind-tables anyway.
|
||||
- # frames otherwise, even with --call-graph dwarf.
|
||||
- 'cflags': [ '-fno-omit-frame-pointer' ],
|
||||
- }],
|
||||
['OS=="linux"', {
|
||||
['OS=="linux" or OS=="openharmony"', {
|
||||
'conditions': [
|
||||
['enable_pgo_generate=="true"', {
|
||||
|
@@ -1,10 +0,0 @@
|
||||
--- src/content/public/browser/content_browser_client.cc.orig 2025-04-16 14:45:09.657704679 +0200
|
||||
+++ src/content/public/browser/content_browser_client.cc 2025-04-17 16:18:19.395831947 +0200
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "content/public/browser/vpn_service_proxy.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_contents_view_delegate.h"
|
||||
+#include "content/public/browser/web_ui_controller.h"
|
||||
#include "content/public/common/alternative_error_page_override_info.mojom.h"
|
||||
#include "content/public/common/content_features.h"
|
||||
#include "content/public/common/url_utils.h"
|
@@ -1,6 +1,14 @@
|
||||
--- src/third_party/abseil-cpp/BUILD.gn.orig 2025-04-11 12:05:22.125274194 +0200
|
||||
+++ src/third_party/abseil-cpp/BUILD.gn 2025-04-12 14:23:17.763743696 +0200
|
||||
@@ -84,13 +84,9 @@ group("absl_component_deps") {
|
||||
--- src/third_party/abseil-cpp/BUILD.gn.orig 2025-07-19 11:32:36.617980004 +0200
|
||||
+++ src/third_party/abseil-cpp/BUILD.gn 2025-08-15 17:20:46.305540851 +0200
|
||||
@@ -62,7 +62,6 @@ group("absl_component_deps") {
|
||||
"//third_party/abseil-cpp/absl/base",
|
||||
"//third_party/abseil-cpp/absl/base:config",
|
||||
"//third_party/abseil-cpp/absl/base:core_headers",
|
||||
- "//third_party/abseil-cpp/absl/base:fast_type_id",
|
||||
"//third_party/abseil-cpp/absl/base:log_severity",
|
||||
"//third_party/abseil-cpp/absl/base:no_destructor",
|
||||
"//third_party/abseil-cpp/absl/base:nullability",
|
||||
@@ -85,13 +84,9 @@ group("absl_component_deps") {
|
||||
"//third_party/abseil-cpp/absl/hash",
|
||||
"//third_party/abseil-cpp/absl/log:absl_check",
|
||||
"//third_party/abseil-cpp/absl/log:absl_log",
|
||||
@@ -14,7 +22,23 @@
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/meta:type_traits",
|
||||
"//third_party/abseil-cpp/absl/numeric:bits",
|
||||
@@ -290,8 +286,6 @@ if (absl_build_tests) {
|
||||
@@ -102,7 +97,6 @@ group("absl_component_deps") {
|
||||
"//third_party/abseil-cpp/absl/status",
|
||||
"//third_party/abseil-cpp/absl/status:statusor",
|
||||
"//third_party/abseil-cpp/absl/strings",
|
||||
- "//third_party/abseil-cpp/absl/strings:charset",
|
||||
"//third_party/abseil-cpp/absl/strings:cord",
|
||||
"//third_party/abseil-cpp/absl/strings:has_ostream_operator",
|
||||
"//third_party/abseil-cpp/absl/strings:str_format",
|
||||
@@ -125,7 +119,6 @@ group("absl_component_deps") {
|
||||
"//third_party/abseil-cpp/absl/base:raw_logging_internal",
|
||||
|
||||
# absl internal utilities used by protobuf.
|
||||
- "//third_party/abseil-cpp/absl/container:layout",
|
||||
]
|
||||
|
||||
if (is_component_build) {
|
||||
@@ -295,8 +288,6 @@ if (absl_build_tests) {
|
||||
"absl/container:flat_hash_set_test",
|
||||
"absl/container:hash_function_defaults_test",
|
||||
"absl/container:inlined_vector_test",
|
||||
@@ -22,8 +46,8 @@
|
||||
- "absl/container:node_hash_set_test",
|
||||
"absl/container:node_slot_policy_test",
|
||||
"absl/container:raw_hash_set_allocator_test",
|
||||
"absl/container:raw_hash_set_test",
|
||||
@@ -300,11 +294,8 @@ if (absl_build_tests) {
|
||||
"absl/container:raw_hash_set_resize_impl_test",
|
||||
@@ -305,11 +296,8 @@ if (absl_build_tests) {
|
||||
"absl/crc:crc_cord_state_test",
|
||||
"absl/crc:crc_memcpy_test",
|
||||
"absl/crc:non_temporal_memcpy_test",
|
||||
@@ -35,7 +59,7 @@
|
||||
"absl/flags:flag_test",
|
||||
"absl/functional:any_invocable_test",
|
||||
"absl/functional:function_ref_test",
|
||||
@@ -328,7 +319,6 @@ if (absl_build_tests) {
|
||||
@@ -333,7 +321,6 @@ if (absl_build_tests) {
|
||||
"absl/log:vlog_is_on_test",
|
||||
"absl/log/internal:fnmatch_test",
|
||||
"absl/log/internal:stderr_log_sink_test",
|
||||
@@ -43,7 +67,7 @@
|
||||
"absl/memory:memory_test",
|
||||
"absl/meta:type_traits_test",
|
||||
"absl/numeric:int128_test",
|
||||
@@ -336,7 +326,6 @@ if (absl_build_tests) {
|
||||
@@ -341,7 +328,6 @@ if (absl_build_tests) {
|
||||
"absl/profiling:periodic_sampler_test",
|
||||
"absl/random:distributions_test",
|
||||
"absl/random:mock_distributions_test",
|
||||
@@ -51,7 +75,7 @@
|
||||
"absl/status:status_matchers_test",
|
||||
"absl/status:status_test",
|
||||
"absl/status:statusor_test",
|
||||
@@ -359,7 +348,6 @@ if (absl_build_tests) {
|
||||
@@ -367,7 +353,6 @@ if (absl_build_tests) {
|
||||
"absl/strings:has_absl_stringify_test",
|
||||
"absl/strings:has_ostream_operator_test",
|
||||
"absl/strings:match_test",
|
||||
@@ -59,7 +83,7 @@
|
||||
"absl/strings:str_format_arg_test",
|
||||
"absl/strings:str_format_bind_test",
|
||||
"absl/strings:str_format_checker_test",
|
||||
@@ -370,11 +358,7 @@ if (absl_build_tests) {
|
||||
@@ -378,11 +363,7 @@ if (absl_build_tests) {
|
||||
"absl/strings:str_format_test",
|
||||
"absl/strings:str_replace_test",
|
||||
"absl/strings:string_view_test",
|
||||
@@ -70,4 +94,4 @@
|
||||
- "absl/synchronization:per_thread_sem_test",
|
||||
"absl/synchronization:waiter_test",
|
||||
"absl/time:time_test",
|
||||
"absl/types:optional_test",
|
||||
"absl/types:span_test",
|
||||
|
@@ -1,21 +0,0 @@
|
||||
--- a/components/crash/core/app/crashpad.cc
|
||||
+++ b/components/crash/core/app/crashpad.cc
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "components/crash/core/app/crash_reporter_client.h"
|
||||
#include "components/crash/core/common/crash_key.h"
|
||||
-#include "third_party/abseil-cpp/absl/base/internal/raw_logging.h"
|
||||
+#include <absl/base/internal/raw_logging.h>
|
||||
#include "third_party/crashpad/crashpad/client/annotation.h"
|
||||
#include "third_party/crashpad/crashpad/client/annotation_list.h"
|
||||
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
|
||||
@@ -49,6 +49,9 @@
|
||||
#include "components/crash/core/app/crash_export_thunks.h"
|
||||
#endif
|
||||
|
||||
+#if ABSL_LTS_RELEASE_VERSION < 20230000
|
||||
+#define raw_log_internal raw_logging_internal
|
||||
+#endif
|
||||
namespace crash_reporter {
|
||||
|
||||
#if BUILDFLAG(IS_IOS)
|
@@ -221,7 +221,6 @@ keeplibs=(
|
||||
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
|
||||
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
|
||||
third_party/devtools-frontend/src/third_party/i18n #javascript
|
||||
third_party/distributed_point_functions #not in any distro
|
||||
third_party/dom_distiller_js #javascript
|
||||
#third_party/eigen3 #Used only by tflite which is not used in electron
|
||||
third_party/electron_node #Integral part of electron
|
||||
@@ -234,6 +233,11 @@ keeplibs=(
|
||||
third_party/ipcz #not in any distro
|
||||
third_party/khronos #Modified to add ANGLE definitions
|
||||
third_party/leveldatabase #use of private headers
|
||||
third_party/libaom #15.6 too old
|
||||
third_party/libaom/source/libaom/third_party/fastfeat
|
||||
third_party/libaom/source/libaom/third_party/SVT-AV1
|
||||
third_party/libaom/source/libaom/third_party/vector
|
||||
third_party/libaom/source/libaom/third_party/x86inc
|
||||
third_party/libgav1 #Usage of private headers (ObuFrameHeader from utils/types.h)
|
||||
third_party/libsrtp #Needs to be built against boringssl, not openssl
|
||||
third_party/libsync #not yet in any distro
|
||||
@@ -271,6 +275,7 @@ keeplibs=(
|
||||
third_party/pffft #not in any distro, also heavily patched
|
||||
third_party/polymer #javascript
|
||||
third_party/protobuf #Heavily forked. Apparently was officially unbundlable back in the GYP days, and may be again in the future.
|
||||
third_party/protobuf/third_party/utf8_range # Integral part of protobuf
|
||||
third_party/rapidhash #Fork
|
||||
third_party/re2 # fedora too old
|
||||
third_party/rnnoise #use of private headers
|
||||
@@ -297,7 +302,6 @@ keeplibs=(
|
||||
third_party/webrtc/modules/third_party/fft #derived code, not vendored dep
|
||||
third_party/webrtc/modules/third_party/g711 #Fork. Original is from spandsp. Might be debundled if upstream ever accepts WebRTC's patches.
|
||||
third_party/webrtc/modules/third_party/g722 #Fork. Original is from spandsp.
|
||||
third_party/webrtc/rtc_base/third_party/base64 #derived code, not vendored dep
|
||||
third_party/webrtc/rtc_base/third_party/sigslot #derived code, not vendored dep
|
||||
third_party/webrtc_overrides #Integral part of chrome
|
||||
third_party/widevine #Integral part of chrome. Needed.
|
||||
|
@@ -1,11 +0,0 @@
|
||||
--- src/third_party/blink/renderer/core/css/css_shape_value.h.orig 2025-04-16 14:36:32.392070147 +0200
|
||||
+++ src/third_party/blink/renderer/core/css/css_shape_value.h 2025-04-16 22:22:56.896578913 +0200
|
||||
@@ -96,7 +96,7 @@ using CSSShapeControlPoint = std::pair<C
|
||||
template <wtf_size_t NumControlPoints>
|
||||
class CSSShapeCurveCommand : public CSSShapeCommand {
|
||||
public:
|
||||
- CSSShapeCurveCommand<1>(Type type,
|
||||
+ CSSShapeCurveCommand(Type type,
|
||||
const CSSValuePair& end_point,
|
||||
const CSSShapeControlPoint control_point)
|
||||
: CSSShapeCommand(type, end_point), control_points_{control_point} {}
|
@@ -167,21 +167,21 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
"//media/mojo/mojom:speech_recognition",
|
||||
"//ui/base",
|
||||
]
|
||||
--- src/chrome/chrome_paks.gni.orig 2024-12-08 18:34:54.604673311 +0100
|
||||
+++ src/chrome/chrome_paks.gni 2024-12-18 12:15:07.247395616 +0100
|
||||
@@ -202,8 +202,6 @@ template("chrome_extra_paks") {
|
||||
--- src/chrome/chrome_paks.gni.orig 2025-07-19 11:32:31.785979797 +0200
|
||||
+++ src/chrome/chrome_paks.gni 2025-07-19 16:32:46.337623073 +0200
|
||||
@@ -230,8 +230,6 @@ template("chrome_extra_paks") {
|
||||
"$root_gen_dir/chrome/web_app_internals_resources.pak",
|
||||
"$root_gen_dir/chrome/webui_gallery_resources.pak",
|
||||
"$root_gen_dir/chrome/whats_new_resources.pak",
|
||||
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
|
||||
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
|
||||
- "$root_gen_dir/content/traces_internals_resources.pak",
|
||||
]
|
||||
deps += [
|
||||
"//chrome/browser/resources:component_extension_resources",
|
||||
@@ -215,7 +213,6 @@ template("chrome_extra_paks") {
|
||||
"//chrome/browser/resources:dev_ui_paks",
|
||||
@@ -241,7 +239,6 @@ template("chrome_extra_paks") {
|
||||
"//chrome/browser/resources/lens/shared:resources",
|
||||
"//chrome/browser/resources/search_engine_choice:resources",
|
||||
"//content/browser/devtools:devtools_resources",
|
||||
"//chrome/browser/resources/tabs/tab_group_home:resources",
|
||||
- "//content/browser/tracing:resources",
|
||||
]
|
||||
if (is_chrome_branded) {
|
||||
@@ -313,8 +313,8 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
"//third_party/perfetto/src/trace_processor:trace_processor_shell",
|
||||
]
|
||||
data = [
|
||||
--- src/electron/electron_paks.gni.orig 2025-04-11 12:02:41.243100651 +0200
|
||||
+++ src/electron/electron_paks.gni 2025-04-11 12:28:19.897748625 +0200
|
||||
--- src/electron/build/electron_paks.gni.orig 2025-04-11 12:02:41.243100651 +0200
|
||||
+++ src/electron/build/electron_paks.gni 2025-04-11 12:28:19.897748625 +0200
|
||||
@@ -57,7 +57,6 @@ template("electron_extra_paks") {
|
||||
"$root_gen_dir/chrome/common_resources.pak",
|
||||
"$root_gen_dir/components/components_resources.pak",
|
||||
|
@@ -1,10 +0,0 @@
|
||||
--- src/third_party/devtools-frontend/src/BUILD.gn.orig 2024-12-08 18:36:42.531343187 +0100
|
||||
+++ src/third_party/devtools-frontend/src/BUILD.gn 2024-12-18 12:29:53.036757634 +0100
|
||||
@@ -16,7 +16,6 @@ import("./third_party/blink/public/publi
|
||||
devtools_frontend_resources_deps = [
|
||||
":favicon",
|
||||
"front_end",
|
||||
- "test",
|
||||
]
|
||||
|
||||
group("devtools_all_files") {
|
@@ -101,9 +101,9 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
if ((is_linux || is_chromeos) && use_dbus) {
|
||||
deps += [ "//dbus" ]
|
||||
}
|
||||
-- src/content/browser/browser_interface_binders.cc.orig 2025-04-11 12:05:19.980351905 +0200
|
||||
+++ src/content/browser/browser_interface_binders.cc 2025-04-11 19:48:15.944587282 +0200
|
||||
@@ -61,7 +61,9 @@
|
||||
--- src/content/browser/browser_interface_binders.cc.orig 2025-07-19 11:32:34.193979827 +0200
|
||||
+++ src/content/browser/browser_interface_binders.cc 2025-07-20 14:51:05.789212478 +0200
|
||||
@@ -62,7 +62,9 @@
|
||||
#include "content/browser/renderer_host/render_process_host_impl.h"
|
||||
#include "content/browser/service_worker/service_worker_host.h"
|
||||
#include "content/browser/shared_storage/shared_storage_worklet_host.h"
|
||||
@@ -113,7 +113,7 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
#include "content/browser/storage_access/storage_access_handle.h"
|
||||
#include "content/browser/tracing/trace_report/trace_report.mojom.h"
|
||||
#include "content/browser/tracing/trace_report/trace_report_internals_ui.h"
|
||||
@@ -100,7 +102,9 @@
|
||||
@@ -101,7 +103,9 @@
|
||||
#include "media/mojo/mojom/media_metrics_provider.mojom.h"
|
||||
#include "media/mojo/mojom/media_player.mojom.h"
|
||||
#include "media/mojo/mojom/remoting.mojom.h"
|
||||
@@ -123,7 +123,7 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
#include "media/mojo/mojom/video_decode_perf_history.mojom.h"
|
||||
#include "media/mojo/mojom/video_encoder_metrics_provider.mojom.h"
|
||||
#include "media/mojo/mojom/webrtc_video_perf.mojom.h"
|
||||
@@ -206,7 +210,9 @@
|
||||
@@ -209,7 +213,9 @@
|
||||
#else // BUILDFLAG(IS_ANDROID)
|
||||
#include "content/browser/direct_sockets/direct_sockets_service_impl.h"
|
||||
#include "media/mojo/mojom/renderer_extensions.mojom.h"
|
||||
@@ -132,7 +132,7 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
+#endif
|
||||
#include "third_party/blink/public/mojom/hid/hid.mojom.h"
|
||||
#include "third_party/blink/public/mojom/installedapp/installed_app_provider.mojom.h"
|
||||
#include "third_party/blink/public/mojom/serial/serial.mojom.h"
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
@@ -865,11 +871,13 @@ void PopulateFrameBinders(RenderFrameHos
|
||||
map->Add<blink::mojom::SharedWorkerConnector>(
|
||||
base::BindRepeating(&BindSharedWorkerConnector, base::Unretained(host)));
|
||||
@@ -147,7 +147,7 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
|
||||
map->Add<blink::mojom::SpeechSynthesis>(base::BindRepeating(
|
||||
&RenderFrameHostImpl::GetSpeechSynthesis, base::Unretained(host)));
|
||||
@@ -1197,6 +1205,7 @@ void PopulateBinderMapWithContext(
|
||||
@@ -1194,6 +1202,7 @@ void PopulateBinderMapWithContext(
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
map->Add<blink::mojom::DirectSocketsService>(
|
||||
base::BindRepeating(&DirectSocketsServiceImpl::CreateForFrame));
|
||||
@@ -155,7 +155,7 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
map->Add<media::mojom::SpeechRecognitionContext>(base::BindRepeating(
|
||||
&EmptyBinderForFrame<media::mojom::SpeechRecognitionContext>));
|
||||
map->Add<media::mojom::SpeechRecognitionClientBrowserInterface>(
|
||||
@@ -1208,6 +1217,7 @@ void PopulateBinderMapWithContext(
|
||||
@@ -1205,6 +1214,7 @@ void PopulateBinderMapWithContext(
|
||||
map->Add<media::mojom::MediaPlayerObserverClient>(base::BindRepeating(
|
||||
&EmptyBinderForFrame<media::mojom::MediaPlayerObserverClient>));
|
||||
#endif
|
||||
@@ -163,13 +163,11 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
#if BUILDFLAG(ENABLE_UNHANDLED_TAP)
|
||||
map->Add<blink::mojom::UnhandledTapNotifier>(base::BindRepeating(
|
||||
&EmptyBinderForFrame<blink::mojom::UnhandledTapNotifier>));
|
||||
diff --git a/chromium/content/browser/browser_main_loop.cc b/chromium/content/browser/browser_main_loop.cc
|
||||
index aaa752bec61..b3a1ed50d20 100644
|
||||
--- a/content/browser/browser_main_loop.cc
|
||||
+++ b/content/browser/browser_main_loop.cc
|
||||
@@ -87,7 +87,9 @@
|
||||
#include "content/browser/screenlock_monitor/screenlock_monitor.h"
|
||||
--- src/content/browser/browser_main_loop.cc.orig 2025-07-19 11:32:34.193979827 +0200
|
||||
+++ src/content/browser/browser_main_loop.cc 2025-07-20 14:51:05.789212478 +0200
|
||||
@@ -91,7 +91,9 @@
|
||||
#include "content/browser/screenlock_monitor/screenlock_monitor_device_source.h"
|
||||
#include "content/browser/service_host/utility_process_host.h"
|
||||
#include "content/browser/sms/sms_provider.h"
|
||||
+#if BUILDFLAG(ENABLE_WEB_SPEECH)
|
||||
#include "content/browser/speech/speech_recognition_manager_impl.h"
|
||||
@@ -177,7 +175,7 @@ index aaa752bec61..b3a1ed50d20 100644
|
||||
#include "content/browser/speech/tts_controller_impl.h"
|
||||
#include "content/browser/startup_data_impl.h"
|
||||
#include "content/browser/startup_task_runner.h"
|
||||
@@ -1114,12 +1116,14 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
|
||||
@@ -1162,12 +1164,14 @@ void BrowserMainLoop::ShutdownThreadsAnd
|
||||
midi_service_->Shutdown();
|
||||
}
|
||||
|
||||
@@ -192,7 +190,7 @@ index aaa752bec61..b3a1ed50d20 100644
|
||||
|
||||
TtsControllerImpl::GetInstance()->Shutdown();
|
||||
|
||||
@@ -1364,13 +1368,14 @@ void BrowserMainLoop::PostCreateThreadsImpl() {
|
||||
@@ -1405,13 +1409,14 @@ void BrowserMainLoop::PostCreateThreadsI
|
||||
media_stream_manager_ =
|
||||
std::make_unique<MediaStreamManager>(audio_system_.get());
|
||||
}
|
||||
@@ -235,18 +233,16 @@ index 3a2e713ccc3..6af5afde20e 100644
|
||||
{wrf::EnableScriptedSpeechSynthesis, switches::kDisableSpeechSynthesisAPI,
|
||||
false},
|
||||
{wrf::EnableSharedWorker, switches::kDisableSharedWorkers, false},
|
||||
diff --git a/chromium/media/BUILD.gn b/chromium/media/BUILD.gn
|
||||
index 01e0910666e..6ce78127e3f 100644
|
||||
--- src/media/BUILD.gn 2025-04-11 12:05:21.244153535 +0200
|
||||
+++ src/media/BUILD.gn 2025-04-11 19:48:51.764578046 +0200
|
||||
--- src/media/BUILD.gn.orig 2025-07-19 11:32:35.633979930 +0200
|
||||
+++ src/media/BUILD.gn 2025-07-20 14:51:07.213212462 +0200
|
||||
@@ -61,6 +61,7 @@ buildflag_header("media_buildflags") {
|
||||
"ENABLE_MSE_MPEG2TS_STREAM_PARSER=$enable_mse_mpeg2ts_stream_parser",
|
||||
"PLATFORM_HAS_OPTIONAL_HEVC_DECODE_SUPPORT=$platform_has_optional_hevc_decode_support",
|
||||
"PLATFORM_HAS_OPTIONAL_HEVC_ENCODE_SUPPORT=$platform_has_optional_hevc_encode_support",
|
||||
+ "ENABLE_WEB_SPEECH=$enable_web_speech",
|
||||
"USE_ARC_PROTECTED_MEDIA=$use_arc_protected_media",
|
||||
"USE_CHROMEOS_MEDIA_ACCELERATION=$use_vaapi||$use_v4l2_codec",
|
||||
"USE_CHROMEOS_PROTECTED_AV1=$use_chromeos_protected_av1",
|
||||
"USE_CHROMEOS_PROTECTED_MEDIA=$use_chromeos_protected_media",
|
||||
diff --git a/chromium/media/media_options.gni b/chromium/media/media_options.gni
|
||||
index 5667cac61f3..48ea95a99a6 100644
|
||||
--- a/media/media_options.gni
|
||||
|
@@ -1,10 +0,0 @@
|
||||
--- src/third_party/distributed_point_functions/code/dpf/aes_128_fixed_key_hash.cc.old 2024-04-02 11:53:27.644284500 +0200
|
||||
+++ src/third_party/distributed_point_functions/code/dpf/aes_128_fixed_key_hash.cc 2024-04-02 22:24:29.350771600 +0200
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "absl/numeric/int128.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/status/statusor.h"
|
||||
+#include "absl/strings/str_cat.h"
|
||||
#include "absl/types/span.h"
|
||||
#include "openssl/err.h"
|
||||
|
@@ -1,27 +0,0 @@
|
||||
--- src/third_party/distributed_point_functions/code/dpf/internal/evaluate_prg_hwy.cc.old 2024-04-02 11:53:27.644284500 +0200
|
||||
+++ src/third_party/distributed_point_functions/code/dpf/internal/evaluate_prg_hwy.cc 2024-04-02 22:35:43.377586600 +0200
|
||||
@@ -50,16 +50,18 @@ namespace hn = hwy::HWY_NAMESPACE;
|
||||
#if HWY_TARGET == HWY_SCALAR
|
||||
|
||||
absl::Status EvaluateSeedsHwy(
|
||||
- int64_t num_seeds, int num_levels, const absl::uint128* seeds_in,
|
||||
- const bool* control_bits_in, const absl::uint128* paths,
|
||||
+ int64_t num_seeds, int num_levels, int num_correction_words,
|
||||
+ const absl::uint128* seeds_in, const bool* control_bits_in,
|
||||
+ const absl::uint128* paths, int paths_rightshift,
|
||||
const absl::uint128* correction_seeds, const bool* correction_controls_left,
|
||||
const bool* correction_controls_right, const Aes128FixedKeyHash& prg_left,
|
||||
const Aes128FixedKeyHash& prg_right, absl::uint128* seeds_out,
|
||||
bool* control_bits_out) {
|
||||
- return EvaluateSeedsNoHwy(num_seeds, num_levels, seeds_in, control_bits_in,
|
||||
- paths, correction_seeds, correction_controls_left,
|
||||
- correction_controls_right, prg_left, prg_right,
|
||||
- seeds_out, control_bits_out);
|
||||
+ return EvaluateSeedsNoHwy(
|
||||
+ num_seeds, num_levels, num_correction_words, seeds_in, control_bits_in,
|
||||
+ paths, paths_rightshift, correction_seeds, correction_controls_left,
|
||||
+ correction_controls_right, prg_left, prg_right, seeds_out,
|
||||
+ control_bits_out);
|
||||
}
|
||||
|
||||
#else
|
@@ -3,10 +3,10 @@ Do not try to build a private copy of a DLL which is already available on every
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1789,8 +1790,9 @@
|
||||
|
||||
deps = [ "//third_party/angle:libGLESv2" ]
|
||||
deps = [ "//third_party/angle:libGLESv2" ]
|
||||
}
|
||||
}
|
||||
- if (!is_chromeos) {
|
||||
- if (!is_chromeos && angle_shared_libvulkan) {
|
||||
+ source_set("angle_libvulkan_symbols") {}
|
||||
+ if (false) {
|
||||
extract_symbols("angle_libvulkan_symbols") {
|
||||
|
@@ -1,17 +0,0 @@
|
||||
Index: electron-16.0.6/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
===================================================================
|
||||
--- electron-16.0.6.orig/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc 2022-01-10 16:24:28.724461941 +0100
|
||||
+++ electron-16.0.6/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc 2022-01-13 16:04:50.310112542 +0100
|
||||
@@ -63,10 +63,10 @@ const int kUpdateBufferSizeFrequency = 3
|
||||
constexpr base::TimeDelta kSeekDelay = base::Milliseconds(20);
|
||||
|
||||
std::vector<std::string>* GetStreamingSchemes() {
|
||||
- static base::NoDestructor<std::vector<std::string>> streaming_schemes({
|
||||
+ static base::NoDestructor<std::vector<std::string>> streaming_schemes{{
|
||||
url::kHttpsScheme,
|
||||
url::kHttpScheme
|
||||
- });
|
||||
+ }};
|
||||
return streaming_schemes.get();
|
||||
}
|
||||
|
@@ -1,18 +0,0 @@
|
||||
Index: electron-17.1.0/build/config/compiler/compiler.gni
|
||||
===================================================================
|
||||
--- electron-17.1.0.orig/build/config/compiler/compiler.gni 2022-03-09 08:27:56.719840060 +0100
|
||||
+++ electron-17.1.0/build/config/compiler/compiler.gni 2022-03-09 13:07:58.709063960 +0100
|
||||
@@ -71,12 +71,7 @@ declare_args() {
|
||||
# Disabled in iOS cronet builds since build step cronet_static_complete
|
||||
# wants to build a .a file consumable by external clients, and they won't
|
||||
# have the same LLVM revisions as us, making bitcode useless to them.
|
||||
- use_thin_lto =
|
||||
- is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&
|
||||
- (is_linux || is_win || is_mac ||
|
||||
- (is_ios && use_lld && !is_cronet_build) ||
|
||||
- (is_android && target_os != "chromeos") ||
|
||||
- (is_chromeos && is_chromeos_device)))
|
||||
+ use_thin_lto = false
|
||||
|
||||
# If true, use Goma for ThinLTO code generation where applicable.
|
||||
use_goma_thin_lto = false
|
@@ -10,6 +10,6 @@ Index: electron-17.1.0/third_party/electron_node/common.gypi
|
||||
+ 'cflags': [ '-I/usr/include/electron' ],
|
||||
+ 'libraries': [ '-lz' ],
|
||||
+ }],
|
||||
[ 'OS in "linux freebsd openbsd solaris aix os400"', {
|
||||
[ 'OS in "linux freebsd openbsd solaris aix os400 openharmony"', {
|
||||
'cflags': [ '-pthread' ],
|
||||
'ldflags': [ '-pthread' ],
|
||||
|
@@ -1,17 +0,0 @@
|
||||
Index: electron-16.0.9/electron/build/webpack/webpack.config.base.js
|
||||
===================================================================
|
||||
--- electron-16.0.9.orig/electron/build/webpack/webpack.config.base.js 2022-02-16 16:41:24.767092075 +0100
|
||||
+++ electron-16.0.9/electron/build/webpack/webpack.config.base.js 2022-02-17 11:10:51.379512377 +0100
|
||||
@@ -1,5 +1,12 @@
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
+
|
||||
+// HACK: OpenSSL 3 does not support md4 any more, but webpack hardcodes it all
|
||||
+// over the place: https://github.com/webpack/webpack/issues/13572
|
||||
+const crypto = require("crypto");
|
||||
+const crypto_orig_createHash = crypto.createHash;
|
||||
+crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);
|
||||
+
|
||||
const webpack = require('webpack');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const WrapperPlugin = require('wrapper-webpack-plugin');
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4f98d6f6f8f513591eb22f8afbc191b496059ce2c56b957fc50e769d6fbb0c84
|
||||
size 573606884
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ba3666e3a877784714ae41bb53e1d9eecaa29e3a6c13999ead81f26c47487083
|
||||
size 588501104
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:85fa505a8c6b0d13e0af3dc2932a99bc556d0172fc1ef73d8fc2f40c80356270
|
||||
size 588034335
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f63fac2464ee585707d9fccdfb7e6392a05ea5b823a8386f322cfc6ebed6d78d
|
||||
size 587969424
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6e188fe49c43ec91c53261b38212c042951c2d2e246dd24cc3c8725f46609e35
|
||||
size 603436922
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f0afd353d5cab3ef8fb7ae759c15a5a68024edeb6c1684969d89bbf2cf774565
|
||||
size 604107245
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:55246cda85d073ed5a5ef10600bc1db99f4e181ec84733f84a9db6eb8d8cc128
|
||||
size 604038083
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:012fb4d7fb93125e29bf0633f1dfe0b8fe152d2a8df559addc737968cd45ebbf
|
||||
size 603389316
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1aedd2bdbf6a9832fee9557e9ce0e29e442f3cb3400e83da544572c80b48ad97
|
||||
size 603507753
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4f4e50a8786181d6f0f246150f6c99cc988bea00c7978ae44c4c019fdf4add8b
|
||||
size 604163877
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8af19b329b51fff55ac4ff61bbc4ad7c8413d1285296341a2cdb5d21def78e38
|
||||
size 687653317
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cea37fe7429268baea5169fde8341775d510c1a2450d924fe85315d58b14cfb7
|
||||
size 691226562
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:81305945689d6851d6c1c254306bdccd08b5785d1ebf4946c9570afe5bfaddb1
|
||||
size 687306018
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:968d88a4b326e51ad509e4fde91a8c4ffee1c0e84ca8a0c3b58c2e51d2f4ede0
|
||||
size 691743471
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:29a6b2d95c93127b8b339c05bc0777e073384e894a21795fcddd615aa99f8431
|
||||
size 688246617
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:88c862afb7258a3c9b2ca823f4d6077e59065ba830d0edf974a8b7ecfceaf022
|
||||
size 753660040
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b388e0da5ed13e0fc0a84b12584ddccdc52fc64faf48e5794fb9257a16185b09
|
||||
size 752065773
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e446c272aba7da2ae28bd752a26f891df0f81eb2edd1628f0d23abadf9a7a9cc
|
||||
size 753856573
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:65b2084f481003d367ca536d8fb27592503b9f828b5754ae83942410143f7b2c
|
||||
size 752288636
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ad4c8f4276ffce80db7317206ea75a846d66b6e3aab7c00220a4cd771b0b448f
|
||||
size 749643533
|
3
electron-37.4.0.tar.zst
Normal file
3
electron-37.4.0.tar.zst
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:085b6bc731179f06dd327f7594b962457a51b75155cefd02769e13d836c55aee
|
||||
size 1070535466
|
@@ -1,63 +0,0 @@
|
||||
In file included from ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h:13,
|
||||
from ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h:50,
|
||||
from ../../base/memory/raw_ptr.h:11,
|
||||
from ../../base/memory/weak_ptr.h:82,
|
||||
from ../../electron/shell/browser/usb/electron_usb_delegate.h:14,
|
||||
from ../../electron/shell/browser/usb/electron_usb_delegate.cc:5:
|
||||
../../base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h:279:3: warning: multi-line comment [-Wcomment]
|
||||
279 | // \
|
||||
| ^
|
||||
../../base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h:281:3: warning: multi-line comment [-Wcomment]
|
||||
281 | // \
|
||||
| ^
|
||||
In file included from /usr/include/c++/14/memory:78,
|
||||
from ../../electron/shell/browser/usb/electron_usb_delegate.h:8:
|
||||
/usr/include/c++/14/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = device::mojom::UsbDeviceInfo]’:
|
||||
/usr/include/c++/14/bits/unique_ptr.h:399:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = device::mojom::UsbDeviceInfo; _Dp = std::default_delete<device::mojom::UsbDeviceInfo>]’
|
||||
399 | get_deleter()(std::move(__ptr));
|
||||
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
|
||||
../../mojo/public/cpp/bindings/struct_ptr.h:48:3: required from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
|
||||
48 | ~StructPtr() = default;
|
||||
| ^
|
||||
/usr/include/c++/14/bits/stl_construct.h:149:22: required from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
|
||||
149 | std::destroy_at(__pointer);
|
||||
| ~~~~~~~~~~~~~~~^~~~~~~~~~~
|
||||
/usr/include/c++/14/bits/stl_construct.h:163:19: required from ‘static constexpr void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*; bool <anonymous> = false]’
|
||||
163 | std::_Destroy(std::__addressof(*__first));
|
||||
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/usr/include/c++/14/bits/stl_construct.h:193:44: required from ‘constexpr void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*]’
|
||||
193 | return std::_Destroy_aux<false>::__destroy(__first, __last);
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
||||
/usr/include/c++/14/bits/alloc_traits.h:981:20: required from ‘constexpr void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*; _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
|
||||
981 | std::_Destroy(__first, __last);
|
||||
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
||||
/usr/include/c++/14/bits/stl_vector.h:735:15: required from ‘constexpr std::vector<_Tp, _Alloc>::~vector() [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>; _Alloc = std::allocator<mojo::StructPtr<device::mojom::UsbDeviceInfo> >]’
|
||||
735 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
|
||||
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
736 | _M_get_Tp_allocator());
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~
|
||||
../../electron/shell/browser/usb/electron_usb_delegate.cc:231:74: required from here
|
||||
231 | std::move(callback).Run(std::vector<device::mojom::UsbDeviceInfoPtr>());
|
||||
| ^
|
||||
/usr/include/c++/14/bits/unique_ptr.h:91:23: error: invalid application of ‘sizeof’ to incomplete type ‘device::mojom::UsbDeviceInfo’
|
||||
91 | static_assert(sizeof(_Tp)>0,
|
||||
| ^~~~~~~~~~~
|
||||
|
||||
--- src/electron/shell/browser/usb/electron_usb_delegate.cc.orig 2025-01-02 22:20:04.494886103 +0100
|
||||
+++ src/electron/shell/browser/usb/electron_usb_delegate.cc 2025-01-03 23:05:03.664747897 +0100
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
+#include "services/device/public/mojom/usb_device.mojom.h"
|
||||
#include "services/device/public/mojom/usb_enumeration_options.mojom.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/electron_permission_manager.h"
|
||||
@@ -28,7 +29,6 @@
|
||||
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/extension.h"
|
||||
-#include "services/device/public/mojom/usb_device.mojom.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
11
event_record-optional-initializer.patch
Normal file
11
event_record-optional-initializer.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- src/services/network/public/cpp/ad_auction/event_record.cc.orig 2025-08-15 17:32:28.601405234 +0200
|
||||
+++ src/services/network/public/cpp/ad_auction/event_record.cc 2025-08-16 10:18:19.106421517 +0200
|
||||
@@ -49,7 +49,7 @@ std::optional<std::vector<url::Origin>>
|
||||
const auto it = dict.find("eligible-origins");
|
||||
if (it == dict.end()) {
|
||||
// "eligible-origins" is optional, so just return an empty list.
|
||||
- return {{}};
|
||||
+ return std::optional<std::vector<url::Origin>>(std::in_place);
|
||||
}
|
||||
const net::structured_headers::ParameterizedMember& parameterized_member =
|
||||
it->second;
|
@@ -1,15 +0,0 @@
|
||||
In file included from ../../third_party/blink/renderer/platform/bindings/bigint.cc:7:
|
||||
../../third_party/blink/renderer/platform/bindings/exception_state.h:136:37: error: ‘constexpr’ static data member ‘kEmptyContext’ must have an initializer
|
||||
136 | static constexpr ExceptionContext kEmptyContext;
|
||||
|
||||
--- src/third_party/blink/renderer/platform/bindings/exception_state.h.orig 2025-04-16 14:36:33.017070028 +0200
|
||||
+++ src/third_party/blink/renderer/platform/bindings/exception_state.h 2025-04-16 20:05:07.925331205 +0200
|
||||
@@ -133,7 +133,7 @@ class PLATFORM_EXPORT ExceptionState {
|
||||
// Delegated constructor for DummyExceptionStateForTesting
|
||||
explicit ExceptionState(DummyExceptionStateForTesting& dummy_derived);
|
||||
|
||||
- static constexpr ExceptionContext kEmptyContext;
|
||||
+ static constexpr ExceptionContext kEmptyContext{};
|
||||
|
||||
private:
|
||||
void SetExceptionInfo(ExceptionCode, const String&);
|
@@ -1,134 +0,0 @@
|
||||
From cf0e064ce3b7c6b809861a6d299165b74cce109e Mon Sep 17 00:00:00 2001
|
||||
From: James Cook <jamescook@chromium.org>
|
||||
Date: Thu, 22 May 2025 10:23:47 -0700
|
||||
Subject: [PATCH] extensions: Clean up ENABLE_EXTENSIONS in //extensions
|
||||
|
||||
TestRuntimeApiDelegate can be safely added to the build now.
|
||||
Also, replace ENABLE_EXTENSIONS || ENABLE_DESKTOP_ANDROID_EXTENSIONS
|
||||
with ENABLE_EXTENSIONS_CORE, to be consistent with the rest of the
|
||||
codebase.
|
||||
|
||||
Bug: 356905053
|
||||
Change-Id: I616391c2843c6c5e20188803f2a51c6f83165927
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6576511
|
||||
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
|
||||
Commit-Queue: James Cook <jamescook@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1464202}
|
||||
---
|
||||
extensions/BUILD.gn | 12 ++----------
|
||||
extensions/browser/extension_registry.h | 3 +--
|
||||
extensions/browser/extension_system.h | 3 +--
|
||||
extensions/browser/test_extensions_browser_client.cc | 12 +-----------
|
||||
extensions/common/extension.h | 3 +--
|
||||
5 files changed, 6 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/extensions/BUILD.gn b/extensions/BUILD.gn
|
||||
index 0ea291f16ba70b..586fd7461e4cd9 100644
|
||||
--- a/extensions/BUILD.gn
|
||||
+++ b/extensions/BUILD.gn
|
||||
@@ -111,6 +111,8 @@ static_library("test_support") {
|
||||
"browser/test_image_loader.h",
|
||||
"browser/test_management_policy.cc",
|
||||
"browser/test_management_policy.h",
|
||||
+ "browser/test_runtime_api_delegate.cc",
|
||||
+ "browser/test_runtime_api_delegate.h",
|
||||
"common/extension_builder.cc",
|
||||
"common/extension_builder.h",
|
||||
"common/manifest_test.cc",
|
||||
@@ -198,16 +200,6 @@ static_library("test_support") {
|
||||
deps += [ "//components/guest_view/browser:test_support" ]
|
||||
}
|
||||
|
||||
- # TODO(https://crbug.com/356905053): The following files don't compile cleanly
|
||||
- # with desktop-android. Either make them compile, or determine they should
|
||||
- # not be included and place them under a more appropriate if-block.
|
||||
- if (enable_extensions) {
|
||||
- sources += [
|
||||
- "browser/test_runtime_api_delegate.cc",
|
||||
- "browser/test_runtime_api_delegate.h",
|
||||
- ]
|
||||
- }
|
||||
-
|
||||
# Generally, //extensions should not depend on //chromeos. However, a number
|
||||
# of the APIs and the extensions shell already do. We should try to avoid
|
||||
# expanding these dependencies.
|
||||
diff --git a/extensions/browser/extension_registry.h b/extensions/browser/extension_registry.h
|
||||
index 4ed65fdce8af21..1ee1b70458a068 100644
|
||||
--- a/extensions/browser/extension_registry.h
|
||||
+++ b/extensions/browser/extension_registry.h
|
||||
@@ -19,8 +19,7 @@
|
||||
#include "extensions/common/extension_id.h"
|
||||
#include "extensions/common/extension_set.h"
|
||||
|
||||
-static_assert(BUILDFLAG(ENABLE_EXTENSIONS) ||
|
||||
- BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS));
|
||||
+static_assert(BUILDFLAG(ENABLE_EXTENSIONS_CORE));
|
||||
|
||||
namespace content {
|
||||
class BrowserContext;
|
||||
diff --git a/extensions/browser/extension_system.h b/extensions/browser/extension_system.h
|
||||
index 369dad723495a4..eccf3b2d331724 100644
|
||||
--- a/extensions/browser/extension_system.h
|
||||
+++ b/extensions/browser/extension_system.h
|
||||
@@ -17,8 +17,7 @@
|
||||
#include "extensions/common/extension.h"
|
||||
#include "extensions/common/extension_id.h"
|
||||
|
||||
-static_assert(BUILDFLAG(ENABLE_EXTENSIONS) ||
|
||||
- BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS));
|
||||
+static_assert(BUILDFLAG(ENABLE_EXTENSIONS_CORE));
|
||||
|
||||
namespace base {
|
||||
class OneShotEvent;
|
||||
diff --git a/extensions/browser/test_extensions_browser_client.cc b/extensions/browser/test_extensions_browser_client.cc
|
||||
index 88ce18dd343016..f914fae7205f88 100644
|
||||
--- a/extensions/browser/test_extensions_browser_client.cc
|
||||
+++ b/extensions/browser/test_extensions_browser_client.cc
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "extensions/browser/extension_host_delegate.h"
|
||||
+#include "extensions/browser/test_runtime_api_delegate.h"
|
||||
#include "extensions/browser/updater/null_extension_cache.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "extensions/common/extension_id.h"
|
||||
@@ -17,13 +18,6 @@
|
||||
#include "services/network/public/mojom/url_loader.mojom.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
|
||||
-// TODO(https://crbug.com/356905053): The following files don't compile cleanly
|
||||
-// with desktop-android. Either make them compile, or determine they should
|
||||
-// not be included and place them under a more appropriate if-block.
|
||||
-#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
-#include "extensions/browser/test_runtime_api_delegate.h"
|
||||
-#endif
|
||||
-
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "chromeos/ash/components/login/login_state/login_state.h"
|
||||
#endif
|
||||
@@ -260,11 +254,7 @@ void TestExtensionsBrowserClient::RegisterBrowserInterfaceBindersForFrame(
|
||||
std::unique_ptr<RuntimeAPIDelegate>
|
||||
TestExtensionsBrowserClient::CreateRuntimeAPIDelegate(
|
||||
content::BrowserContext* context) const {
|
||||
-#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
return std::unique_ptr<RuntimeAPIDelegate>(new TestRuntimeAPIDelegate());
|
||||
-#else
|
||||
- return nullptr;
|
||||
-#endif
|
||||
}
|
||||
|
||||
const ComponentExtensionResourceManager*
|
||||
diff --git a/extensions/common/extension.h b/extensions/common/extension.h
|
||||
index ec776e6207057b..33a196f11a519a 100644
|
||||
--- a/extensions/common/extension.h
|
||||
+++ b/extensions/common/extension.h
|
||||
@@ -29,8 +29,7 @@
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
|
||||
-static_assert(BUILDFLAG(ENABLE_EXTENSIONS) ||
|
||||
- BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS));
|
||||
+static_assert(BUILDFLAG(ENABLE_EXTENSIONS_CORE));
|
||||
|
||||
namespace extensions {
|
||||
class HashedExtensionId;
|
@@ -1,20 +0,0 @@
|
||||
Correct ODR violation due to ambiguous name.
|
||||
|
||||
When this header is compiled by itself, `scoped_refptr` refers to the type declared in `base/memory/scoped_refptr.h`.
|
||||
When `third_party/webrtc/api/scoped_refptr.h` is included before, the name changes to refer to `::webrtc::scoped_refptr` instead,
|
||||
leading to mismatch across translation units. This is detected and reported by GCC.
|
||||
|
||||
--- src/components/webrtc/fake_ssl_client_socket.h.old
|
||||
+++ src/components/webrtc/fake_ssl_client_socket.h
|
||||
|
||||
@@ -111,8 +111,8 @@ class FakeSSLClientSocket : public net::
|
||||
// The callback passed to Connect().
|
||||
net::CompletionOnceCallback user_connect_callback_;
|
||||
|
||||
- scoped_refptr<net::DrainableIOBuffer> write_buf_;
|
||||
- scoped_refptr<net::DrainableIOBuffer> read_buf_;
|
||||
+ ::scoped_refptr<net::DrainableIOBuffer> write_buf_;
|
||||
+ ::scoped_refptr<net::DrainableIOBuffer> read_buf_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
215
ffmpeg-4-AV_PROFILE.patch
Normal file
215
ffmpeg-4-AV_PROFILE.patch
Normal file
@@ -0,0 +1,215 @@
|
||||
From 129f48501a7c3fa4236234f2fa0aee490a845b59 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Guilbert <tguilbert@chromium.org>
|
||||
Date: Fri, 2 May 2025 08:58:47 -0700
|
||||
Subject: [PATCH] Roll src/third_party/ffmpeg/ 01f23648c..dcdd0fa51 (552
|
||||
commits)
|
||||
|
||||
This CL rolls ffmpeg for M138.
|
||||
|
||||
This roll includes the removal of many deprecated APIs: some FF_*
|
||||
macros were consolidated as equivalent AV_* macros under
|
||||
libavcodec/def.h
|
||||
|
||||
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/01f23648c6b8..dcdd0fa51b65
|
||||
|
||||
$ git log 01f23648c..dcdd0fa51 --date=short --no-merges --format='%ad %ae %s'
|
||||
2025-05-01 tguilbert Remove deprecated av_stream_get_side_data()
|
||||
2025-05-01 tguilbert README.chromium file
|
||||
2025-05-01 tguilbert GN Configuration
|
||||
2025-04-29 jamrial avcodec/cbs_apv: don't return an error when reading empty buffers
|
||||
2025-04-27 sw fate: Add test for APV 422-10 profile
|
||||
(...)
|
||||
2025-03-18 andreas.rheinhardt avcodec/Makefile: Only compile executor when VVC decoder is enabled
|
||||
2025-03-18 andreas.rheinhardt avcodec/vvc/Makefile: Move VVC decoder->h2645data dep to lavc/Makefile
|
||||
2025-03-17 ffmpeg ffbuild: use response files only if ar accepts them
|
||||
2025-03-18 timo avcodec/tableprint_vlc: fix build with --enable-hardcoded-tables
|
||||
2025-03-18 timo avcodec/Makefile: fix build of exr decoder in odd configs
|
||||
|
||||
Created with:
|
||||
roll-dep src/third_party/ffmpeg
|
||||
|
||||
Bug: 415118707
|
||||
Change-Id: Iae943ce996031d5a6f7dbbd2915ad9cfabadf4d6
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6506529
|
||||
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
|
||||
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
|
||||
Auto-Submit: Thomas Guilbert <tguilbert@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1455010}
|
||||
---
|
||||
DEPS | 2 +-
|
||||
media/ffmpeg/ffmpeg_common.cc | 44 +++++++++----------
|
||||
.../filters/ffmpeg_aac_bitstream_converter.cc | 12 ++---
|
||||
...ffmpeg_aac_bitstream_converter_unittest.cc | 6 +--
|
||||
third_party/ffmpeg | 2 +-
|
||||
5 files changed, 33 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/DEPS b/DEPS
|
||||
index b80ab0a6d81811..9b247c02d2a202 100644
|
||||
--- a/DEPS
|
||||
+++ b/DEPS
|
||||
@@ -515,7 +515,7 @@ vars = {
|
||||
# Three lines of non-changing comments so that
|
||||
# the commit queue can handle CLs rolling ffmpeg
|
||||
# and whatever else without interference from each other.
|
||||
- 'ffmpeg_revision': '01f23648c6b84de6c0f717fa4e1816f53b9ee72e',
|
||||
+ 'ffmpeg_revision': 'dcdd0fa51b65a0b1688ff6b8f0cc81908f09ded2',
|
||||
# Three lines of non-changing comments so that
|
||||
# the commit queue can handle CLs rolling webpagereplay
|
||||
# and whatever else without interference from each other.
|
||||
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
|
||||
index cfd0552ee31088..610be2d37b351f 100644
|
||||
--- a/media/ffmpeg/ffmpeg_common.cc
|
||||
+++ b/media/ffmpeg/ffmpeg_common.cc
|
||||
@@ -263,22 +263,22 @@ AVCodecID VideoCodecToCodecID(VideoCodec video_codec) {
|
||||
static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) {
|
||||
// Clear out the CONSTRAINED & INTRA flags which are strict subsets of the
|
||||
// corresponding profiles with which they're used.
|
||||
- profile &= ~FF_PROFILE_H264_CONSTRAINED;
|
||||
- profile &= ~FF_PROFILE_H264_INTRA;
|
||||
+ profile &= ~AV_PROFILE_H264_CONSTRAINED;
|
||||
+ profile &= ~AV_PROFILE_H264_INTRA;
|
||||
switch (profile) {
|
||||
- case FF_PROFILE_H264_BASELINE:
|
||||
+ case AV_PROFILE_H264_BASELINE:
|
||||
return H264PROFILE_BASELINE;
|
||||
- case FF_PROFILE_H264_MAIN:
|
||||
+ case AV_PROFILE_H264_MAIN:
|
||||
return H264PROFILE_MAIN;
|
||||
- case FF_PROFILE_H264_EXTENDED:
|
||||
+ case AV_PROFILE_H264_EXTENDED:
|
||||
return H264PROFILE_EXTENDED;
|
||||
- case FF_PROFILE_H264_HIGH:
|
||||
+ case AV_PROFILE_H264_HIGH:
|
||||
return H264PROFILE_HIGH;
|
||||
- case FF_PROFILE_H264_HIGH_10:
|
||||
+ case AV_PROFILE_H264_HIGH_10:
|
||||
return H264PROFILE_HIGH10PROFILE;
|
||||
- case FF_PROFILE_H264_HIGH_422:
|
||||
+ case AV_PROFILE_H264_HIGH_422:
|
||||
return H264PROFILE_HIGH422PROFILE;
|
||||
- case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
|
||||
+ case AV_PROFILE_H264_HIGH_444_PREDICTIVE:
|
||||
return H264PROFILE_HIGH444PREDICTIVEPROFILE;
|
||||
default:
|
||||
DVLOG(1) << "Unknown profile id: " << profile;
|
||||
@@ -289,23 +289,23 @@ static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) {
|
||||
static int VideoCodecProfileToProfileID(VideoCodecProfile profile) {
|
||||
switch (profile) {
|
||||
case H264PROFILE_BASELINE:
|
||||
- return FF_PROFILE_H264_BASELINE;
|
||||
+ return AV_PROFILE_H264_BASELINE;
|
||||
case H264PROFILE_MAIN:
|
||||
- return FF_PROFILE_H264_MAIN;
|
||||
+ return AV_PROFILE_H264_MAIN;
|
||||
case H264PROFILE_EXTENDED:
|
||||
- return FF_PROFILE_H264_EXTENDED;
|
||||
+ return AV_PROFILE_H264_EXTENDED;
|
||||
case H264PROFILE_HIGH:
|
||||
- return FF_PROFILE_H264_HIGH;
|
||||
+ return AV_PROFILE_H264_HIGH;
|
||||
case H264PROFILE_HIGH10PROFILE:
|
||||
- return FF_PROFILE_H264_HIGH_10;
|
||||
+ return AV_PROFILE_H264_HIGH_10;
|
||||
case H264PROFILE_HIGH422PROFILE:
|
||||
- return FF_PROFILE_H264_HIGH_422;
|
||||
+ return AV_PROFILE_H264_HIGH_422;
|
||||
case H264PROFILE_HIGH444PREDICTIVEPROFILE:
|
||||
- return FF_PROFILE_H264_HIGH_444_PREDICTIVE;
|
||||
+ return AV_PROFILE_H264_HIGH_444_PREDICTIVE;
|
||||
default:
|
||||
DVLOG(1) << "Unknown VideoCodecProfile: " << profile;
|
||||
}
|
||||
- return FF_PROFILE_UNKNOWN;
|
||||
+ return AV_PROFILE_UNKNOWN;
|
||||
}
|
||||
|
||||
SampleFormat AVSampleFormatToSampleFormat(AVSampleFormat sample_format,
|
||||
@@ -443,7 +443,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
|
||||
// TODO(dalecurtis): Just use the profile from the codec context if ffmpeg
|
||||
// ever starts supporting xHE-AAC.
|
||||
// FFmpeg provides the (defined_profile - 1) for AVCodecContext::profile
|
||||
- if (codec_context->profile == FF_PROFILE_UNKNOWN ||
|
||||
+ if (codec_context->profile == AV_PROFILE_UNKNOWN ||
|
||||
codec_context->profile == mp4::AAC::kXHeAAcType - 1) {
|
||||
// Errors aren't fatal here, so just drop any MediaLog messages.
|
||||
NullMediaLog media_log;
|
||||
@@ -661,16 +661,16 @@ bool AVStreamToVideoDecoderConfig(const AVStream* stream,
|
||||
break;
|
||||
case VideoCodec::kVP9:
|
||||
switch (codec_context->profile) {
|
||||
- case FF_PROFILE_VP9_0:
|
||||
+ case AV_PROFILE_VP9_0:
|
||||
profile = VP9PROFILE_PROFILE0;
|
||||
break;
|
||||
- case FF_PROFILE_VP9_1:
|
||||
+ case AV_PROFILE_VP9_1:
|
||||
profile = VP9PROFILE_PROFILE1;
|
||||
break;
|
||||
- case FF_PROFILE_VP9_2:
|
||||
+ case AV_PROFILE_VP9_2:
|
||||
profile = VP9PROFILE_PROFILE2;
|
||||
break;
|
||||
- case FF_PROFILE_VP9_3:
|
||||
+ case AV_PROFILE_VP9_3:
|
||||
profile = VP9PROFILE_PROFILE3;
|
||||
break;
|
||||
default:
|
||||
diff --git a/media/filters/ffmpeg_aac_bitstream_converter.cc b/media/filters/ffmpeg_aac_bitstream_converter.cc
|
||||
index 7fd37e90b7e475..c00ac262dabb19 100644
|
||||
--- a/media/filters/ffmpeg_aac_bitstream_converter.cc
|
||||
+++ b/media/filters/ffmpeg_aac_bitstream_converter.cc
|
||||
@@ -68,17 +68,17 @@ bool GenerateAdtsHeader(int codec,
|
||||
hdr[1] |= 1;
|
||||
|
||||
switch (audio_profile) {
|
||||
- case FF_PROFILE_AAC_MAIN:
|
||||
+ case AV_PROFILE_AAC_MAIN:
|
||||
break;
|
||||
- case FF_PROFILE_AAC_HE:
|
||||
- case FF_PROFILE_AAC_HE_V2:
|
||||
- case FF_PROFILE_AAC_LOW:
|
||||
+ case AV_PROFILE_AAC_HE:
|
||||
+ case AV_PROFILE_AAC_HE_V2:
|
||||
+ case AV_PROFILE_AAC_LOW:
|
||||
hdr[2] |= (1 << 6);
|
||||
break;
|
||||
- case FF_PROFILE_AAC_SSR:
|
||||
+ case AV_PROFILE_AAC_SSR:
|
||||
hdr[2] |= (2 << 6);
|
||||
break;
|
||||
- case FF_PROFILE_AAC_LTP:
|
||||
+ case AV_PROFILE_AAC_LTP:
|
||||
hdr[2] |= (3 << 6);
|
||||
break;
|
||||
default:
|
||||
diff --git a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
index 0e56a6ea5b5cb4..2a6ccb8c910f6c 100644
|
||||
--- a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
+++ b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
@@ -41,7 +41,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test {
|
||||
// Set up reasonable aac parameters
|
||||
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
|
||||
test_parameters_.codec_id = AV_CODEC_ID_AAC;
|
||||
- test_parameters_.profile = FF_PROFILE_AAC_MAIN;
|
||||
+ test_parameters_.profile = AV_PROFILE_AAC_MAIN;
|
||||
test_parameters_.ch_layout.nb_channels = 2;
|
||||
test_parameters_.extradata = extradata_header_;
|
||||
test_parameters_.extradata_size = sizeof(extradata_header_);
|
||||
@@ -131,7 +131,7 @@ TEST_F(FFmpegAACBitstreamConverterTest, Conversion_AudioProfileType) {
|
||||
|
||||
EXPECT_EQ(profile, kAacMainProfile);
|
||||
|
||||
- test_parameters_.profile = FF_PROFILE_AAC_HE;
|
||||
+ test_parameters_.profile = AV_PROFILE_AAC_HE;
|
||||
FFmpegAACBitstreamConverter converter_he(&test_parameters_);
|
||||
|
||||
test_packet = ScopedAVPacket::Allocate();
|
||||
@@ -143,7 +143,7 @@ TEST_F(FFmpegAACBitstreamConverterTest, Conversion_AudioProfileType) {
|
||||
|
||||
EXPECT_EQ(profile, kAacLowComplexityProfile);
|
||||
|
||||
- test_parameters_.profile = FF_PROFILE_AAC_ELD;
|
||||
+ test_parameters_.profile = AV_PROFILE_AAC_ELD;
|
||||
FFmpegAACBitstreamConverter converter_eld(&test_parameters_);
|
||||
|
||||
test_packet = ScopedAVPacket::Allocate();
|
@@ -236,19 +236,6 @@ index 6f231c85729..ca5e5fb927d 100644
|
||||
frame_length_ = header_plus_packet_size;
|
||||
}
|
||||
|
||||
diff --git a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
index 1fd4c5ccd7d..f59bcd8fdaf 100644
|
||||
--- a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
+++ b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
@@ -34,7 +34,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test {
|
||||
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
|
||||
test_parameters_.codec_id = AV_CODEC_ID_AAC;
|
||||
test_parameters_.profile = FF_PROFILE_AAC_MAIN;
|
||||
- test_parameters_.channels = 2;
|
||||
+ test_parameters_.ch_layout.nb_channels = 2;
|
||||
test_parameters_.extradata = extradata_header_;
|
||||
test_parameters_.extradata_size = sizeof(extradata_header_);
|
||||
}
|
||||
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
|
||||
index 6a56c675f7d..4615fdeb3fb 100644
|
||||
--- a/media/filters/ffmpeg_audio_decoder.cc
|
||||
@@ -271,20 +258,6 @@ index 6a56c675f7d..4615fdeb3fb 100644
|
||||
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
|
||||
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
|
||||
channel_layout = CHANNEL_LAYOUT_DISCRETE;
|
||||
@@ -348,11 +348,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
|
||||
// Success!
|
||||
av_sample_format_ = codec_context_->sample_fmt;
|
||||
|
||||
- if (codec_context_->channels != config.channels()) {
|
||||
+ if (codec_context_->ch_layout.nb_channels != config.channels()) {
|
||||
MEDIA_LOG(ERROR, media_log_)
|
||||
<< "Audio configuration specified " << config.channels()
|
||||
<< " channels, but FFmpeg thinks the file contains "
|
||||
- << codec_context_->channels << " channels";
|
||||
+ << codec_context_->ch_layout.nb_channels << " channels";
|
||||
ReleaseFFmpegResources();
|
||||
state_ = DecoderState::kUninitialized;
|
||||
return false;
|
||||
@@ -403,7 +403,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
|
||||
if (frame->nb_samples <= 0)
|
||||
return AVERROR(EINVAL);
|
||||
|
@@ -1,31 +0,0 @@
|
||||
From 072b9f3bc340020325cf3dd7bff1991cd22de171 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Tue, 19 Mar 2024 16:27:55 +0000
|
||||
Subject: [PATCH] IWYU: missing include for std::optional usage in
|
||||
first_party_sets_handler_database_helper.h
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bug: 41455655
|
||||
Change-Id: Ia644d2e6baa904190d162575dd16264e66ea227e
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5377063
|
||||
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1274977}
|
||||
---
|
||||
.../first_party_sets/first_party_sets_handler_database_helper.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/content/browser/first_party_sets/first_party_sets_handler_database_helper.h b/content/browser/first_party_sets/first_party_sets_handler_database_helper.h
|
||||
index a12af718abda0..92afb98d64ea4 100644
|
||||
--- a/content/browser/first_party_sets/first_party_sets_handler_database_helper.h
|
||||
+++ b/content/browser/first_party_sets/first_party_sets_handler_database_helper.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#define CONTENT_BROWSER_FIRST_PARTY_SETS_FIRST_PARTY_SETS_HANDLER_DATABASE_HELPER_H_
|
||||
|
||||
#include <memory>
|
||||
+#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
@@ -1,19 +0,0 @@
|
||||
--- src/chrome/browser/ui/lens/BUILD.gn.orig 2025-04-11 12:05:17.505799730 +0200
|
||||
+++ src/chrome/browser/ui/lens/BUILD.gn 2025-04-12 13:42:57.195753884 +0200
|
||||
@@ -276,13 +276,15 @@ source_set("interactive_ui_tests") {
|
||||
"//components/feature_engagement/public",
|
||||
"//components/lens:enterprise_policy",
|
||||
"//components/lens:features",
|
||||
- "//components/pdf/browser:browser",
|
||||
"//components/prefs",
|
||||
"//components/search_engines",
|
||||
"//components/user_education/views",
|
||||
"//content/test:test_support",
|
||||
"//testing/gtest",
|
||||
]
|
||||
+ if (enable_pdf) {
|
||||
+ deps += [ "//components/pdf/browser:browser" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
source_set("unit_tests") {
|
@@ -21,53 +21,45 @@
|
||||
"//services/strings",
|
||||
"//services/test/echo/public/mojom",
|
||||
@@ -8027,7 +8021,6 @@ test("unit_tests") {
|
||||
|
||||
# Non-android deps for "unit_tests" target.
|
||||
#
|
||||
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
|
||||
deps += [
|
||||
- "../browser/screen_ai:screen_ai_install_state",
|
||||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
"//chrome/browser/apps/app_service:app_registry_cache_waiter",
|
||||
@@ -8172,7 +8165,6 @@ test("unit_tests") {
|
||||
"//services/device/public/cpp/bluetooth",
|
||||
"//components/webapps/browser",
|
||||
"//services/metrics/public/cpp:ukm_builders",
|
||||
"//services/network:test_support",
|
||||
- "//services/screen_ai:test_support",
|
||||
"//services/video_effects/test:test_support",
|
||||
"//third_party/crashpad/crashpad/util",
|
||||
"//third_party/libaddressinput",
|
||||
"//third_party/lzma_sdk/google:unit_tests",
|
||||
@@ -8445,7 +8437,6 @@ test("unit_tests") {
|
||||
"//chrome/browser/push_notification",
|
||||
"//chrome/browser/push_notification:test_support",
|
||||
"//chrome/browser/push_notification/protos:proto",
|
||||
- "//chrome/browser/screen_ai/public:test_support",
|
||||
"//chrome/browser/sharesheet",
|
||||
"//chrome/browser/smart_card:smart_card",
|
||||
"//chrome/browser/task_manager:impl",
|
||||
"//chrome/browser/ui/ash:test_support",
|
||||
@@ -8591,7 +8582,6 @@ test("unit_tests") {
|
||||
"//chrome/browser/nearby_sharing/contacts:unit_tests",
|
||||
"//chrome/browser/nearby_sharing/local_device_data:unit_tests",
|
||||
"//chrome/browser/policy:unit_tests",
|
||||
- "//chrome/browser/screen_ai:unit_tests",
|
||||
"//chrome/browser/smart_card:unit_tests",
|
||||
"//chrome/browser/support_tool/ash:unit_tests",
|
||||
"//chrome/browser/ui/ash:unit_tests",
|
||||
--- src/chrome/browser/BUILD.gn.orig 2025-04-11 12:13:12.927314100 +0200
|
||||
+++ src/chrome/browser/BUILD.gn 2025-04-12 13:12:42.819768051 +0200
|
||||
@@ -4228,10 +4228,6 @@ static_library("browser") {
|
||||
"//chrome/browser/metrics/desktop_session_duration",
|
||||
"//chrome/browser/new_tab_page/chrome_colors",
|
||||
"//chrome/browser/policy:path_parser",
|
||||
"//chrome/browser/resources:component_extension_resources",
|
||||
- "//chrome/browser/screen_ai:prefs",
|
||||
- "//chrome/browser/screen_ai:screen_ai_install_state",
|
||||
- "//chrome/browser/screen_ai:screen_ai_service_router_factory",
|
||||
- "//chrome/browser/screen_ai/public:optical_character_recognizer",
|
||||
"//chrome/browser/search/background",
|
||||
"//chrome/browser/sharing_hub",
|
||||
"//chrome/browser/smart_card",
|
||||
"//chrome/browser/themes",
|
||||
@@ -4357,9 +4353,6 @@ static_library("browser") {
|
||||
"//components/webauthn/core/browser",
|
||||
"//components/webauthn/core/browser:passkey_model",
|
||||
"//services/device/public/cpp/bluetooth",
|
||||
"//services/device/public/cpp/hid",
|
||||
- "//services/screen_ai",
|
||||
- "//services/screen_ai/public/cpp:utilities",
|
||||
@@ -96,8 +88,8 @@
|
||||
"//skia",
|
||||
"//sql",
|
||||
@@ -145,7 +144,6 @@ static_library("utility") {
|
||||
"//chrome/common/importer:interfaces",
|
||||
"//components/autofill/core/common",
|
||||
"//components/user_data_importer/common",
|
||||
"//services/proxy_resolver:lib",
|
||||
- "//services/screen_ai",
|
||||
]
|
||||
@@ -114,8 +106,8 @@
|
||||
]
|
||||
|
||||
@@ -68,9 +67,6 @@ source_set("screen_ai_service_router_fac
|
||||
"//chrome/browser/profiles:profile",
|
||||
"//components/keyed_service/core",
|
||||
"//components/performance_manager:performance_manager",
|
||||
"//content/public/browser",
|
||||
- "//services/screen_ai/public/cpp:utilities",
|
||||
- "//services/screen_ai/public/mojom:factory",
|
||||
@@ -156,7 +148,7 @@
|
||||
--- src/chrome/browser/ui/BUILD.gn.orig 2025-04-11 12:05:17.331313863 +0200
|
||||
+++ src/chrome/browser/ui/BUILD.gn 2025-04-12 13:26:46.759762260 +0200
|
||||
@@ -1705,8 +1705,6 @@ static_library("ui") {
|
||||
"//chrome/browser/reading_list",
|
||||
"//chrome/browser/regional_capabilities",
|
||||
"//chrome/browser/safe_browsing",
|
||||
"//chrome/browser/safe_browsing:advanced_protection",
|
||||
- "//chrome/browser/screen_ai:screen_ai_install_state",
|
||||
|
@@ -1,40 +0,0 @@
|
||||
From 09a3abf8f4aca3b00ccbabc860b0819d7e3ea206 Mon Sep 17 00:00:00 2001
|
||||
From: Yunsik Jung <yunsik.jung@lge.com>
|
||||
Date: Fri, 21 Mar 2025 08:12:22 -0700
|
||||
Subject: [PATCH] Fix build error when "enable_video_effects=false" in Linux
|
||||
|
||||
kVideoEffects is engaged even when ENABLE_VIDEO_EFFECTS is false.
|
||||
(https://crrev.com/c/5898146)
|
||||
However, "video_effects_sandbox_hook_linux.h" is not included when
|
||||
ENABLE_VIDEO_EFFECTS is false which caused build error.
|
||||
|
||||
Thus, include "video_effects_sandbox_hook_linux.h" in Linux regardless
|
||||
of ENABLE_VIDEO_EFFECTS.
|
||||
|
||||
Bug: N/A
|
||||
Change-Id: If0bb3f1b391a7960ee8ff9ad83d8c858a24cedb5
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6380633
|
||||
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
|
||||
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
|
||||
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1436051}
|
||||
---
|
||||
content/utility/utility_main.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc
|
||||
index 7456eab4558962..ffb16be8ce8541 100644
|
||||
--- a/content/utility/utility_main.cc
|
||||
+++ b/content/utility/utility_main.cc
|
||||
@@ -66,9 +66,9 @@
|
||||
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
-#if BUILDFLAG(ENABLE_VIDEO_EFFECTS) && BUILDFLAG(IS_LINUX)
|
||||
+#if BUILDFLAG(IS_LINUX)
|
||||
#include "services/video_effects/video_effects_sandbox_hook_linux.h" // nogncheck
|
||||
-#endif // BUILDFLAG(ENABLE_VIDEO_EFFECTS) && BUILDFLAG(IS_LINUX)
|
||||
+#endif // BUILDFLAG(IS_LINUX)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "chromeos/ash/components/assistant/buildflags.h"
|
@@ -1,22 +0,0 @@
|
||||
Index: src/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
===================================================================
|
||||
--- src.orig/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
+++ src/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc
|
||||
@@ -85,7 +85,7 @@ PipeWireNode::PipeWireNode(PipeWireSessi
|
||||
.param = OnNodeParam,
|
||||
};
|
||||
|
||||
- pw_node_add_listener(proxy_, &node_listener_, &node_events, this);
|
||||
+ pw_node_add_listener((struct pw_node*)proxy_, &node_listener_, &node_events, this);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -117,7 +117,7 @@ void PipeWireNode::OnNodeInfo(void* data
|
||||
uint32_t id = info->params[i].id;
|
||||
if (id == SPA_PARAM_EnumFormat &&
|
||||
info->params[i].flags & SPA_PARAM_INFO_READ) {
|
||||
- pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr);
|
||||
+ pw_node_enum_params((struct pw_node*)that->proxy_, 0, id, 0, UINT32_MAX, nullptr);
|
||||
break;
|
||||
}
|
||||
}
|
16
fpic.patch
16
fpic.patch
@@ -73,26 +73,26 @@ Use -fpic for code which goes only in dlls (gives smaller code),
|
||||
sources = [
|
||||
"compression_utils_portable.cc",
|
||||
"compression_utils_portable.h",
|
||||
--- src/ui/qt/BUILD.gn.orig 2025-04-10 19:56:03.150817690 +0200
|
||||
+++ src/ui/qt/BUILD.gn 2025-04-11 11:42:11.904342754 +0200
|
||||
--- src/ui/qt/BUILD.gn.orig 2025-07-19 11:32:45.537979340 +0200
|
||||
+++ src/ui/qt/BUILD.gn 2025-07-19 16:18:57.173759933 +0200
|
||||
@@ -39,6 +39,8 @@ source_set("qt_interface") {
|
||||
# target instead.
|
||||
public = [ "qt_interface.h" ]
|
||||
sources = [ "qt_interface.cc" ]
|
||||
+ cflags = ["-fpic", "-fno-semantic-interposition"]
|
||||
+ asmflags = ["-fpic", "-fno-semantic-interposition"]
|
||||
}
|
||||
|
||||
template("qt_shim") {
|
||||
@@ -99,6 +101,8 @@ template("qt_shim") {
|
||||
# Don't use libc++ modules as this depends on libstdc++.
|
||||
use_libcxx_modules = false
|
||||
@@ -102,6 +104,8 @@ template("qt_shim") {
|
||||
sources += get_target_outputs(":generate_moc" + invoker.qt_version)
|
||||
deps += [ ":generate_moc" + invoker.qt_version ]
|
||||
}
|
||||
+ cflags = ["-fpic", "-fno-semantic-interposition"]
|
||||
+ asmflags = ["-fpic", "-fno-semantic-interposition"]
|
||||
}
|
||||
}
|
||||
if (use_qt5) {
|
||||
|
||||
# Don't depend on libcxx modules. This binary doesn't depend on the standard
|
||||
# library in libcxx. Instead it depends on the libcxx in the sysroot, so
|
||||
--- src/third_party/abseil-cpp/BUILD.gn.old
|
||||
+++ src/third_party/abseil-cpp/BUILD.gn
|
||||
@@ -132,6 +132,8 @@ config("absl_define_config") {
|
||||
|
@@ -1,32 +0,0 @@
|
||||
From 15e24abc1646ad9984923234a041cd0c3b8b1607 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Tue, 19 Mar 2024 16:21:06 +0000
|
||||
Subject: [PATCH] IWYU: missing include for usage of std::optional in
|
||||
gpu_adapter_info.h
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bug: 41455655
|
||||
Change-Id: I42d6c9f99ea7718fa87267ebcf3368d0f46f5053
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374260
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Reviewed-by: Austin Eng <enga@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1274974}
|
||||
---
|
||||
third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h b/third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h
|
||||
index 70b15d5c055aa..2084afbe6e877 100644
|
||||
--- a/third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h
|
||||
+++ b/third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_GPU_ADAPTER_INFO_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_GPU_ADAPTER_INFO_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/wtf/text/wtf_string.h"
|
@@ -1,37 +0,0 @@
|
||||
From 05a74771fed5491740588ec7b39ba64a7b710013 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Thu, 1 Feb 2024 17:34:38 +0000
|
||||
Subject: [PATCH] GCC: avoid clash between getter and type in
|
||||
grid_sizing_tree.h
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Rename GridSubsizingTree::GridItems getter to GetGridItems to avoid
|
||||
type clash.
|
||||
|
||||
Bug: 819294
|
||||
Change-Id: I4112929d9f85dc4573002b429cc982d50085d3c9
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5224147
|
||||
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
|
||||
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1255116}
|
||||
---
|
||||
.../core/layout/grid/grid_layout_algorithm.cc | 13 +++++++------
|
||||
.../renderer/core/layout/grid/grid_sizing_tree.h | 2 +-
|
||||
2 files changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h b/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h
|
||||
index 45d55e2b36da4..2148ea9ea0657 100644
|
||||
--- a/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h
|
||||
+++ b/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h
|
||||
@@ -188,7 +188,7 @@ class GridSizingSubtree
|
||||
/* subtree_root */ grid_tree_->LookupSubgridIndex(subgrid_data));
|
||||
}
|
||||
|
||||
- GridItems& GridItems() const {
|
||||
+ ::blink::GridItems& GridItems() const {
|
||||
DCHECK(grid_tree_);
|
||||
return grid_tree_->At(subtree_root_).grid_items;
|
||||
}
|
@@ -1,93 +0,0 @@
|
||||
From 5fcaeafcab5460ea65e4a7bdee6589002adf74d2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <drott@chromium.org>
|
||||
Date: Mon, 13 Feb 2023 13:26:16 +0000
|
||||
Subject: [PATCH] Use hb::unique_ptr instead of custom HbScopedPointer
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This was an earlier local RAII implementation that we no longer need now
|
||||
that HarfBuzz provides helpers for this.
|
||||
|
||||
Change-Id: Idc47ce2717c75556acb03e2ccccb50ec87ed3cca
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4239980
|
||||
Reviewed-by: Munira Tursunova <moonira@google.com>
|
||||
Commit-Queue: Dominik Röttsches <drott@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1104453}
|
||||
---
|
||||
.../platform/fonts/shaping/harfbuzz_shaper.cc | 39 ++++---------------
|
||||
1 file changed, 7 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
||||
index c165a1703395a..dc1377a90a9f7 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <unicode/uchar.h>
|
||||
#include <unicode/uscript.h>
|
||||
#include <algorithm>
|
||||
+#include <hb-cplusplus.hh>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
@@ -194,33 +195,6 @@ struct ReshapeQueueItem {
|
||||
: action_(action), start_index_(start), num_characters_(num) {}
|
||||
};
|
||||
|
||||
-template <typename T>
|
||||
-class HarfBuzzScopedPtr {
|
||||
- STACK_ALLOCATED();
|
||||
-
|
||||
- public:
|
||||
- typedef void (*DestroyFunction)(T*);
|
||||
-
|
||||
- HarfBuzzScopedPtr(T* ptr, DestroyFunction destroy)
|
||||
- : ptr_(ptr), destroy_(destroy) {
|
||||
- DCHECK(destroy_);
|
||||
- }
|
||||
- HarfBuzzScopedPtr(const HarfBuzzScopedPtr&) = delete;
|
||||
- HarfBuzzScopedPtr& operator=(const HarfBuzzScopedPtr&) = delete;
|
||||
- ~HarfBuzzScopedPtr() {
|
||||
- if (ptr_)
|
||||
- (*destroy_)(ptr_);
|
||||
- }
|
||||
-
|
||||
- T* Get() const{ return ptr_; }
|
||||
- operator T *() const {return ptr_;}
|
||||
- void Set(T* ptr) { ptr_ = ptr; }
|
||||
-
|
||||
- private:
|
||||
- T* ptr_;
|
||||
- DestroyFunction destroy_;
|
||||
-};
|
||||
-
|
||||
//
|
||||
// Represents a context while shaping a range.
|
||||
//
|
||||
@@ -239,7 +214,7 @@ struct RangeContext {
|
||||
text_direction(direction),
|
||||
start(start),
|
||||
end(end),
|
||||
- buffer(hb_buffer_create(), hb_buffer_destroy),
|
||||
+ buffer(hb_buffer_create()),
|
||||
options(options) {
|
||||
DCHECK_GE(end, start);
|
||||
font_features.Initialize(font->GetFontDescription());
|
||||
@@ -249,7 +224,7 @@ struct RangeContext {
|
||||
const TextDirection text_direction;
|
||||
const unsigned start;
|
||||
const unsigned end;
|
||||
- const HarfBuzzScopedPtr<hb_buffer_t> buffer;
|
||||
+ const hb::unique_ptr<hb_buffer_t> buffer;
|
||||
FontFeatures font_features;
|
||||
Deque<ReshapeQueueItem> reshape_queue;
|
||||
const ShapeOptions options;
|
||||
@@ -1032,7 +1007,7 @@ void HarfBuzzShaper::GetGlyphData(const
|
||||
UScriptCode script,
|
||||
bool is_horizontal,
|
||||
GlyphDataList& glyphs) {
|
||||
- HarfBuzzScopedPtr<hb_buffer_t> hb_buffer(hb_buffer_create(), hb_buffer_destroy);
|
||||
+ hb::unique_ptr<hb_buffer_t> hb_buffer(hb_buffer_create());
|
||||
hb_buffer_set_language(hb_buffer, locale.HarfbuzzLanguage());
|
||||
hb_buffer_set_script(hb_buffer, ICUScriptToHBScript(script));
|
||||
hb_buffer_set_direction(hb_buffer,
|
@@ -1,532 +0,0 @@
|
||||
From aa2ff2bee16776301bd840a4e18bdebdfb916822 Mon Sep 17 00:00:00 2001
|
||||
From: Munira Tursunova <moonira@google.com>
|
||||
Date: Tue, 04 Oct 2022 14:20:04 +0000
|
||||
Subject: [PATCH] Replacing Chromium scoped types with HarfBuzz custom types.
|
||||
|
||||
Removed the Chromium side type HbScoped and move to the
|
||||
HarfBuzz custom type.
|
||||
|
||||
Bug: 1363228
|
||||
Change-Id: I9d390808953e2c36651533cbf5f4958beff2e14d
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3927859
|
||||
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
||||
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
|
||||
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
|
||||
Commit-Queue: Munira Tursunova <moonira@google.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1054692}
|
||||
---
|
||||
|
||||
diff --git a/components/paint_preview/common/BUILD.gn b/components/paint_preview/common/BUILD.gn
|
||||
index 377dc92..c39757d 100644
|
||||
--- a/components/paint_preview/common/BUILD.gn
|
||||
+++ b/components/paint_preview/common/BUILD.gn
|
||||
@@ -37,7 +37,6 @@
|
||||
"//components/crash/core/common:crash_key_lib",
|
||||
"//skia",
|
||||
"//third_party:freetype_harfbuzz",
|
||||
- "//third_party/harfbuzz-ng:hb_scoped_util",
|
||||
"//ui/gfx/geometry",
|
||||
"//url",
|
||||
]
|
||||
diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc
|
||||
index 8298861d5..147dfc3 100644
|
||||
--- a/components/paint_preview/common/subset_font.cc
|
||||
+++ b/components/paint_preview/common/subset_font.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
// clang-format off
|
||||
#include <hb.h>
|
||||
#include <hb-subset.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
// clang-format on
|
||||
|
||||
#include <memory>
|
||||
@@ -17,7 +18,6 @@
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "components/crash/core/common/crash_key.h"
|
||||
#include "skia/ext/font_utils.h"
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
#include "third_party/skia/include/core/SkFontMgr.h"
|
||||
#include "third_party/skia/include/core/SkStream.h"
|
||||
#include "third_party/skia/include/core/SkTypeface.h"
|
||||
@@ -45,11 +45,11 @@
|
||||
}
|
||||
|
||||
// Converts SkData to a hb_blob_t.
|
||||
-HbScoped<hb_blob_t> MakeBlob(sk_sp<SkData> data) {
|
||||
+hb::unique_ptr<hb_blob_t> MakeBlob(sk_sp<SkData> data) {
|
||||
if (!data ||
|
||||
!base::IsValueInRangeForNumericType<unsigned int, size_t>(data->size()))
|
||||
- return nullptr;
|
||||
- return HbScoped<hb_blob_t>(
|
||||
+ return hb::unique_ptr<hb_blob_t>(nullptr);
|
||||
+ return hb::unique_ptr<hb_blob_t>(
|
||||
hb_blob_create(static_cast<const char*>(data->data()),
|
||||
static_cast<unsigned int>(data->size()),
|
||||
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
|
||||
@@ -72,8 +72,9 @@
|
||||
family_name.c_str());
|
||||
int ttc_index = 0;
|
||||
sk_sp<SkData> data = StreamToData(typeface->openStream(&ttc_index));
|
||||
- HbScoped<hb_face_t> face(hb_face_create(MakeBlob(data).get(), ttc_index));
|
||||
- HbScoped<hb_subset_input_t> input(hb_subset_input_create_or_fail());
|
||||
+ hb::unique_ptr<hb_face_t> face(
|
||||
+ hb_face_create(MakeBlob(data).get(), ttc_index));
|
||||
+ hb::unique_ptr<hb_subset_input_t> input(hb_subset_input_create_or_fail());
|
||||
if (!face || !input) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -102,14 +103,16 @@
|
||||
hb_set_add(skip_subset, HB_TAG('G', 'S', 'U', 'B'));
|
||||
hb_set_add(skip_subset, HB_TAG('G', 'P', 'O', 'S'));
|
||||
|
||||
- HbScoped<hb_face_t> subset_face(hb_subset_or_fail(face.get(), input.get()));
|
||||
+ hb::unique_ptr<hb_face_t> subset_face(
|
||||
+ hb_subset_or_fail(face.get(), input.get()));
|
||||
if (!subset_face) {
|
||||
return nullptr;
|
||||
}
|
||||
// Store the correct collection index for the subsetted font.
|
||||
const int final_ttc_index = hb_face_get_index(subset_face.get());
|
||||
|
||||
- HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
|
||||
+ hb::unique_ptr<hb_blob_t> subset_blob(
|
||||
+ hb_face_reference_blob(subset_face.get()));
|
||||
if (!subset_blob) {
|
||||
return nullptr;
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
|
||||
index 88cef3c..ae88e5a 100644
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1683,7 +1683,6 @@
|
||||
"//third_party/blink/renderer/platform/wtf",
|
||||
"//third_party/ced",
|
||||
"//third_party/emoji-segmenter",
|
||||
- "//third_party/harfbuzz-ng:hb_scoped_util",
|
||||
"//third_party/icu",
|
||||
"//third_party/libyuv",
|
||||
"//third_party/one_euro_filter",
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
|
||||
index 7c7057b..d43668f1 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
|
||||
@@ -7,11 +7,11 @@
|
||||
// having to rely on the platform being able to instantiate this font format.
|
||||
#include <hb.h>
|
||||
|
||||
+#include <hb-cplusplus.hh>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/numerics/byte_conversions.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/vector.h"
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
#include "third_party/skia/include/core/SkTypeface.h"
|
||||
|
||||
namespace blink {
|
||||
@@ -27,7 +27,8 @@
|
||||
const unsigned int kMinCOLRHeaderSize = 14;
|
||||
if (table_tags.size() && table_tags.Contains(kCOLRTag) &&
|
||||
table_tags.Contains(HB_TAG('C', 'P', 'A', 'L'))) {
|
||||
- HbScoped<hb_blob_t> table_blob(hb_face_reference_table(face, kCOLRTag));
|
||||
+ hb::unique_ptr<hb_blob_t> table_blob(
|
||||
+ hb_face_reference_table(face, kCOLRTag));
|
||||
if (hb_blob_get_length(table_blob.get()) < kMinCOLRHeaderSize)
|
||||
return FontFormatCheck::COLRVersion::kNoCOLR;
|
||||
|
||||
@@ -51,11 +52,11 @@
|
||||
} // namespace
|
||||
|
||||
FontFormatCheck::FontFormatCheck(sk_sp<SkData> sk_data) {
|
||||
- HbScoped<hb_blob_t> font_blob(
|
||||
+ hb::unique_ptr<hb_blob_t> font_blob(
|
||||
hb_blob_create(reinterpret_cast<const char*>(sk_data->bytes()),
|
||||
base::checked_cast<unsigned>(sk_data->size()),
|
||||
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
|
||||
- HbScoped<hb_face_t> face(hb_face_create(font_blob.get(), 0));
|
||||
+ hb::unique_ptr<hb_face_t> face(hb_face_create(font_blob.get(), 0));
|
||||
|
||||
unsigned table_count = 0;
|
||||
table_count = hb_face_get_table_tags(face.get(), 0, nullptr, nullptr);
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc b/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc
|
||||
index 5e6d1f2..73b984a 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc
|
||||
@@ -5,10 +5,10 @@
|
||||
// clang-format off
|
||||
#include <hb.h>
|
||||
#include <hb-aat.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
// clang-format on
|
||||
|
||||
#include "third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.h"
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@@ -146,9 +146,9 @@
|
||||
hb_face_t* const hb_face =
|
||||
hb_font_get_face(harfbuzz_face_->GetScaledFont());
|
||||
|
||||
- HbScoped<hb_blob_t> morx_blob(
|
||||
+ hb::unique_ptr<hb_blob_t> morx_blob(
|
||||
hb_face_reference_table(hb_face, HB_TAG('m', 'o', 'r', 'x')));
|
||||
- HbScoped<hb_blob_t> mort_blob(
|
||||
+ hb::unique_ptr<hb_blob_t> mort_blob(
|
||||
hb_face_reference_table(hb_face, HB_TAG('m', 'o', 'r', 't')));
|
||||
|
||||
// TODO(crbug.com/911149): Use hb_aat_layout_has_substitution() for
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc b/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
|
||||
index 86c289c..98cbd7a 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
#include "third_party/skia/include/core/SkStream.h"
|
||||
|
||||
// clang-format off
|
||||
#include <hb.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
#include <hb-ot.h>
|
||||
// clang-format on
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if (!typeface || !typeface->getTableSize(kCpalTag))
|
||||
return absl::nullopt;
|
||||
|
||||
- HbScoped<hb_face_t> face(HbFaceFromSkTypeface(typeface));
|
||||
+ hb::unique_ptr<hb_face_t> face(HbFaceFromSkTypeface(typeface));
|
||||
|
||||
if (!face || !hb_ot_color_has_palettes(face.get()))
|
||||
return absl::nullopt;
|
||||
@@ -49,7 +49,7 @@ absl::optional<uint16_t> OpenTypeCpalLoo
|
||||
Vector<Color> OpenTypeCpalLookup::RetrieveColorRecords(
|
||||
sk_sp<SkTypeface> typeface,
|
||||
unsigned palette_index) {
|
||||
- HbScoped<hb_face_t> face(HbFaceFromSkTypeface(typeface));
|
||||
+ hb::unique_ptr<hb_face_t> face(HbFaceFromSkTypeface(typeface));
|
||||
|
||||
if (!face) {
|
||||
return Vector<Color>();
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc b/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc
|
||||
index ebab0fa8..4ecd886 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
#include "third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.h"
|
||||
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
#include "third_party/skia/include/core/SkStream.h"
|
||||
#include "third_party/skia/include/core/SkTypeface.h"
|
||||
|
||||
// clang-format off
|
||||
#include <hb.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
#include <hb-ot.h>
|
||||
// clang-format on
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
return output;
|
||||
sk_sp<SkData> sk_data =
|
||||
SkData::MakeFromStream(stream.get(), stream->getLength());
|
||||
- HbScoped<hb_blob_t> blob(
|
||||
+ hb::unique_ptr<hb_blob_t> blob(
|
||||
hb_blob_create(reinterpret_cast<const char*>(sk_data->bytes()),
|
||||
base::checked_cast<unsigned>(sk_data->size()),
|
||||
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
|
||||
- HbScoped<hb_face_t> face(hb_face_create(blob.get(), 0));
|
||||
+ hb::unique_ptr<hb_face_t> face(hb_face_create(blob.get(), 0));
|
||||
unsigned axes_count = hb_ot_var_get_axis_count(face.get());
|
||||
std::unique_ptr<hb_ot_var_axis_info_t[]> axes =
|
||||
std::make_unique<hb_ot_var_axis_info_t[]>(axes_count);
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
index b4bb5a3..b6ee0a8f 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
// clang-format off
|
||||
#include <hb.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
#include <hb-ot.h>
|
||||
// clang-format on
|
||||
|
||||
@@ -52,7 +53,6 @@
|
||||
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/thread_specific.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/wtf.h"
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
#include "third_party/skia/include/core/SkPaint.h"
|
||||
#include "third_party/skia/include/core/SkPath.h"
|
||||
#include "third_party/skia/include/core/SkPoint.h"
|
||||
@@ -203,7 +203,7 @@
|
||||
const hb_codepoint_t kInvalidCodepoint = static_cast<hb_codepoint_t>(-1);
|
||||
hb_codepoint_t space = kInvalidCodepoint;
|
||||
|
||||
- HbScoped<hb_set_t> glyphs(hb_set_create());
|
||||
+ hb::unique_ptr<hb_set_t> glyphs(hb_set_create());
|
||||
|
||||
// Check whether computing is needed and compute for gpos/gsub.
|
||||
if (features & kKerning &&
|
||||
@@ -391,8 +391,8 @@
|
||||
}
|
||||
|
||||
// TODO(yosin): We should move |CreateFace()| to "harfbuzz_font_cache.cc".
|
||||
-static HbScoped<hb_face_t> CreateFace(FontPlatformData* platform_data) {
|
||||
- HbScoped<hb_face_t> face;
|
||||
+static hb::unique_ptr<hb_face_t> CreateFace(FontPlatformData* platform_data) {
|
||||
+ hb::unique_ptr<hb_face_t> face;
|
||||
|
||||
sk_sp<SkTypeface> typeface = sk_ref_sp(platform_data->Typeface());
|
||||
CHECK(typeface);
|
||||
@@ -402,8 +402,8 @@
|
||||
|
||||
// Fallback to table copies if there is no in-memory access.
|
||||
if (!face) {
|
||||
- face.reset(hb_face_create_for_tables(HarfBuzzSkiaGetTable, typeface.get(),
|
||||
- nullptr));
|
||||
+ face = hb::unique_ptr<hb_face_t>(hb_face_create_for_tables(
|
||||
+ HarfBuzzSkiaGetTable, typeface.get(), nullptr));
|
||||
}
|
||||
|
||||
DCHECK(face);
|
||||
@@ -415,7 +415,7 @@
|
||||
static scoped_refptr<HarfBuzzFontData> CreateHarfBuzzFontData(
|
||||
hb_face_t* face,
|
||||
SkTypeface* typeface) {
|
||||
- HbScoped<hb_font_t> ot_font(hb_font_create(face));
|
||||
+ hb::unique_ptr<hb_font_t> ot_font(hb_font_create(face));
|
||||
hb_ot_font_set_funcs(ot_font.get());
|
||||
|
||||
int axis_count = typeface->getVariationDesignPosition(nullptr, 0);
|
||||
@@ -445,7 +445,7 @@
|
||||
FontPlatformData* platform_data) {
|
||||
const auto& result = font_map_.insert(platform_data->UniqueID(), nullptr);
|
||||
if (result.is_new_entry) {
|
||||
- HbScoped<hb_face_t> face = CreateFace(platform_data);
|
||||
+ hb::unique_ptr<hb_face_t> face = CreateFace(platform_data);
|
||||
result.stored_value->value =
|
||||
CreateHarfBuzzFontData(face.get(), platform_data->Typeface());
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
||||
index cbfb1c15..eb0dcb75 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
|
||||
@@ -38,9 +38,9 @@
|
||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
|
||||
#include <hb.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
|
||||
namespace blink {
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc
|
||||
index 4561bc9..a2d2eb1d 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc
|
||||
@@ -16,9 +16,8 @@
|
||||
} // namespace
|
||||
|
||||
namespace blink {
|
||||
-
|
||||
-HbScoped<hb_face_t> HbFaceFromSkTypeface(sk_sp<SkTypeface> typeface) {
|
||||
- HbScoped<hb_face_t> return_face(nullptr);
|
||||
+hb::unique_ptr<hb_face_t> HbFaceFromSkTypeface(sk_sp<SkTypeface> typeface) {
|
||||
+ hb::unique_ptr<hb_face_t> return_face(nullptr);
|
||||
int ttc_index = 0;
|
||||
|
||||
// Have openStream() write the ttc index of this typeface within the stream to
|
||||
@@ -28,7 +27,7 @@
|
||||
if (tf_stream && tf_stream->getMemoryBase()) {
|
||||
const void* tf_memory = tf_stream->getMemoryBase();
|
||||
size_t tf_size = tf_stream->getLength();
|
||||
- HbScoped<hb_blob_t> face_blob(hb_blob_create(
|
||||
+ hb::unique_ptr<hb_blob_t> face_blob(hb_blob_create(
|
||||
reinterpret_cast<const char*>(tf_memory),
|
||||
base::checked_cast<unsigned int>(tf_size), HB_MEMORY_MODE_READONLY,
|
||||
tf_stream.release(), DeleteTypefaceStream));
|
||||
@@ -38,7 +37,8 @@
|
||||
// See https://github.com/harfbuzz/harfbuzz/issues/248 .
|
||||
unsigned int num_hb_faces = hb_face_count(face_blob.get());
|
||||
if (0 < num_hb_faces && static_cast<unsigned>(ttc_index) < num_hb_faces) {
|
||||
- return_face.reset(hb_face_create(face_blob.get(), ttc_index));
|
||||
+ return_face =
|
||||
+ hb::unique_ptr<hb_face_t>(hb_face_create(face_blob.get(), ttc_index));
|
||||
}
|
||||
}
|
||||
return return_face;
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h
|
||||
index 8817f06..f00d6f2 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h
|
||||
@@ -8,9 +8,8 @@
|
||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
||||
#include "third_party/skia/include/core/SkTypeface.h"
|
||||
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
-
|
||||
#include <hb.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
|
||||
namespace blink {
|
||||
|
||||
@@ -25,7 +24,7 @@
|
||||
// from copying all font tables on Mac into newly allocated memory, causing a
|
||||
// potentially quite large allocations (in the megabytes range). See the
|
||||
// implementation of SkTypeface_Mac::onOpenStream.
|
||||
-PLATFORM_EXPORT HbScoped<hb_face_t> HbFaceFromSkTypeface(
|
||||
+PLATFORM_EXPORT hb::unique_ptr<hb_face_t> HbFaceFromSkTypeface(
|
||||
sk_sp<SkTypeface> typeface);
|
||||
} // namespace blink
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
||||
index 763f3a3..c50910df 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
|
||||
@@ -5,12 +5,11 @@
|
||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h"
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font)
|
||||
- : hb_font_(HbScoped<hb_font_t>(font)),
|
||||
+ : hb_font_(hb::unique_ptr<hb_font_t>(font)),
|
||||
hb_font_data_(std::make_unique<HarfBuzzFontData>()) {}
|
||||
|
||||
HbFontCacheEntry::~HbFontCacheEntry() = default;
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
||||
index 1b0accf..eaedd0b 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
#include "third_party/blink/renderer/platform/fonts/font_metrics.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/unicode_range_set.h"
|
||||
-#include "third_party/harfbuzz-ng/utils/hb_scoped.h"
|
||||
|
||||
#include <hb.h>
|
||||
+#include <hb-cplusplus.hh>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -39,7 +39,7 @@ class HbFontCacheEntry : public RefCount
|
||||
private:
|
||||
explicit HbFontCacheEntry(hb_font_t* font);
|
||||
|
||||
- HbScoped<hb_font_t> hb_font_;
|
||||
+ hb::unique_ptr<hb_font_t> hb_font_;
|
||||
std::unique_ptr<HarfBuzzFontData> hb_font_data_;
|
||||
};
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
index caf5d49..0d4b6f9 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_DATA_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_DATA_H_
|
||||
|
||||
+#include <hb-cplusplus.hh>
|
||||
+
|
||||
#include "base/check_op.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/font_platform_data.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h"
|
||||
diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn
|
||||
index 522e164d..4b64e1b 100644
|
||||
--- a/third_party/harfbuzz-ng/BUILD.gn
|
||||
+++ b/third_party/harfbuzz-ng/BUILD.gn
|
||||
@@ -41,6 +41,7 @@
|
||||
"src/src/hb-blob.h",
|
||||
"src/src/hb-buffer.h",
|
||||
"src/src/hb-common.h",
|
||||
+ "src/src/hb-cplusplus.hh",
|
||||
"src/src/hb-deprecated.h",
|
||||
"src/src/hb-face.h",
|
||||
"src/src/hb-font.h",
|
||||
@@ -409,11 +410,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-source_set("hb_scoped_util") {
|
||||
- sources = [ "utils/hb_scoped.h" ]
|
||||
- deps = [ "//third_party:freetype_harfbuzz" ]
|
||||
-}
|
||||
-
|
||||
# Not all checkouts have a //base directory.
|
||||
if (build_with_chromium) {
|
||||
fuzzer_test("hb_shape_fuzzer") {
|
||||
diff --git a/third_party/harfbuzz-ng/utils/hb_scoped.h b/third_party/harfbuzz-ng/utils/hb_scoped.h
|
||||
deleted file mode 100644
|
||||
index 887f6b90..0000000
|
||||
--- a/third_party/harfbuzz-ng/utils/hb_scoped.h
|
||||
+++ /dev/null
|
||||
@@ -1,60 +0,0 @@
|
||||
-// Copyright 2020 The Chromium Authors. All rights reserved.
|
||||
-// Use of this source code is governed by a BSD-style license that can be
|
||||
-// found in the LICENSE file.
|
||||
-
|
||||
-#ifndef THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_
|
||||
-#define THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_
|
||||
-
|
||||
-// clang-format off
|
||||
-#include <hb.h>
|
||||
-#include <hb-subset.h>
|
||||
-// clang-format on
|
||||
-
|
||||
-#include <memory>
|
||||
-#include <type_traits>
|
||||
-
|
||||
-template <typename T>
|
||||
-struct always_false : std::false_type {};
|
||||
-
|
||||
-template <class T>
|
||||
-struct HbSpecializedDeleter {
|
||||
- inline void operator()(T* obj) {
|
||||
- static_assert(always_false<T>::value,
|
||||
- "HbScoped is only allowed for HarfBuzz types that have a "
|
||||
- "deleter specialization.");
|
||||
- }
|
||||
-};
|
||||
-
|
||||
-// Defines a scoped pointer type HbScoped based on std::unique_ptr, using the
|
||||
-// corresponsing HarfBuzz destructors to commonly used public HarfBuzz types.
|
||||
-// The interface of HbScoped is the same as that of std::unique_ptr.
|
||||
-//
|
||||
-// void MyFunction() {
|
||||
-// HbScoped<hb_blob_t> scoped_harfbuzz_blob(
|
||||
-// hb_blob_create(mydata, mylength));
|
||||
-//
|
||||
-// DoSomethingWithBlob(scoped_harfbuzz_blob.get());
|
||||
-// }
|
||||
-//
|
||||
-// When |scoped_harfbuzz_buffer| goes out of scope, hb_blob_destroy() is called
|
||||
-// for the hb_blob_t* created from hb_blob_create().
|
||||
-template <class T>
|
||||
-using HbScoped = std::unique_ptr<T, HbSpecializedDeleter<T>>;
|
||||
-
|
||||
-#define SPECIALIZED_DELETER_FOR_HARFBUZZ_TYPE(TYPE, DESTRUCTOR) \
|
||||
- template <> \
|
||||
- struct HbSpecializedDeleter<TYPE> { \
|
||||
- inline void operator()(TYPE* obj) { DESTRUCTOR(obj); } \
|
||||
- };
|
||||
-
|
||||
-#define HB_TYPE_DESTRUCTOR_PAIRS_REPEAT(F) \
|
||||
- F(hb_blob_t, hb_blob_destroy) \
|
||||
- F(hb_buffer_t, hb_buffer_destroy) \
|
||||
- F(hb_face_t, hb_face_destroy) \
|
||||
- F(hb_font_t, hb_font_destroy) \
|
||||
- F(hb_set_t, hb_set_destroy) \
|
||||
- F(hb_subset_input_t, hb_subset_input_destroy)
|
||||
-
|
||||
-HB_TYPE_DESTRUCTOR_PAIRS_REPEAT(SPECIALIZED_DELETER_FOR_HARFBUZZ_TYPE)
|
||||
-
|
||||
-#endif // THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_
|
@@ -1,29 +0,0 @@
|
||||
From 3a75d7f8dc3a08a38dd893031f8996b91a00764b Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Tue, 23 Jan 2024 17:55:15 +0000
|
||||
Subject: [PATCH] IWYU: usage of std::optional in hit_test_request.h requires
|
||||
include
|
||||
|
||||
Bug: 957519
|
||||
Change-Id: I1ec32af603720d13bfa4e22e20142459802284b4
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5227329
|
||||
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1250917}
|
||||
---
|
||||
third_party/blink/renderer/core/layout/hit_test_request.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/layout/hit_test_request.h b/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
index c33144dc975b6..38968126fe520 100644
|
||||
--- a/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
+++ b/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_HIT_TEST_REQUEST_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_HIT_TEST_REQUEST_H_
|
||||
|
||||
+#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"
|
@@ -1,63 +0,0 @@
|
||||
--- src/third_party/blink/renderer/build/scripts/generate_permission_element_grd.py 2025-05-07 19:56:08.225814691 +0200
|
||||
+++ src/third_party/blink/renderer/build/scripts/generate_permission_element_grd.py 2025-05-09 17:27:22.302946256 +0200
|
||||
@@ -148,6 +148,18 @@ def generate_grd_file(id_map, file_list,
|
||||
with open(output_file_path, 'wb') as output_file:
|
||||
output_file.write(doc.toxml(encoding='UTF-8'))
|
||||
|
||||
+# Generate the shortest string containing both `long` and `short` as substrings.
|
||||
+# The full n-string problem is NP-complete, but we only use a crude greedy heuristic.
|
||||
+def superstring(long, short):
|
||||
+ if long.find(short) >= 0:
|
||||
+ return long
|
||||
+ for i in range(len(short), 0, -1):
|
||||
+ if(long[-i:] == short[:i]):
|
||||
+ return long + short[i:]
|
||||
+ if(short[-i:] == long[:i]):
|
||||
+ return short + long[i:]
|
||||
+ return long + short
|
||||
+
|
||||
|
||||
def generate_cpp_mapping(orderings, input_file_path, output_file_path):
|
||||
doc = parse(input_file_path)
|
||||
@@ -161,8 +173,8 @@ def generate_cpp_mapping(orderings, inpu
|
||||
# this code will use `pt-pt` (Portuguese from Portugal).
|
||||
custom_locale_mappings = {"en-gb": "en", "pt-pt": "pt", "zh-cn": "zh"}
|
||||
|
||||
- langs = ''
|
||||
- lang_map = {}
|
||||
+
|
||||
+ locales = set()
|
||||
message_map = []
|
||||
for message in messages:
|
||||
message_name = message.getAttribute('name')
|
||||
@@ -171,20 +183,18 @@ def generate_cpp_mapping(orderings, inpu
|
||||
'_', 1)[1].lower().replace("_", "-")
|
||||
if locale in custom_locale_mappings:
|
||||
locale = custom_locale_mappings[locale]
|
||||
- if locale not in lang_map:
|
||||
- # String concatenation is inefficientin Python, since strings
|
||||
- # are immutable. However, maintaining a list of chars and
|
||||
- # re-implementing find() is also unpleasant.
|
||||
- langs_idx = langs.find(locale)
|
||||
- if langs_idx < 0:
|
||||
- lang_map[locale] = (len(langs), len(locale))
|
||||
- langs += locale
|
||||
- else:
|
||||
- # If locale is already a substring in the existing list,
|
||||
- # the substring can simply be reused to save some space.
|
||||
- lang_map[locale] = (langs_idx, len(locale))
|
||||
+ locales.add(locale) # Need to add all locales at first because iteration order is non-deterministic
|
||||
message_map.append((locale, base_message, message_name))
|
||||
|
||||
+ langs = ''
|
||||
+ locales = sorted(locales, key=lambda x: (-len(x), x))
|
||||
+ for locale in locales: # Sort by length so that we add `ab-cd` before `ab` and `cd`
|
||||
+ langs = superstring(langs, locale)
|
||||
+
|
||||
+ lang_map = {}
|
||||
+ for locale in locales:
|
||||
+ lang_map[locale] = langs.find(locale), len(locale)
|
||||
+
|
||||
output_file.write(kStringMapCcPrefix)
|
||||
output_file.write(f' "{langs}";\n')
|
||||
output_file.write(kStringMapCcMidfix)
|
@@ -1,36 +0,0 @@
|
||||
From d8985805ba3c963d9aabbd2c77d15dbd8d7290c5 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Wed, 15 May 2024 18:46:03 +0000
|
||||
Subject: [PATCH] GCC: explicitly use base::span constructor in
|
||||
HttpAuthNtlmMechanism
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
base::span requires explicit construction for several of the
|
||||
constructors. Theoretically the constructor used here should not
|
||||
require that but GCC complains.
|
||||
|
||||
Bug: 40565911
|
||||
Change-Id: I452f31ee0862c3e986e15207f89baa043b016da8
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5540995
|
||||
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1301466}
|
||||
---
|
||||
net/http/http_auth_ntlm_mechanism.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/http/http_auth_ntlm_mechanism.cc b/net/http/http_auth_ntlm_mechanism.cc
|
||||
index ddab00151cda9c..0b103303df56f7 100644
|
||||
--- a/net/http/http_auth_ntlm_mechanism.cc
|
||||
+++ b/net/http/http_auth_ntlm_mechanism.cc
|
||||
@@ -149,7 +149,7 @@ int HttpAuthNtlmMechanism::GenerateAuthToken(
|
||||
return ERR_UNEXPECTED;
|
||||
|
||||
uint8_t client_challenge[8];
|
||||
- g_generate_random_proc(client_challenge);
|
||||
+ g_generate_random_proc(base::span<uint8_t>(client_challenge));
|
||||
|
||||
auto next_token = ntlm_client_.GenerateAuthenticateMessage(
|
||||
domain, user, credentials->password(), hostname, channel_bindings, spn,
|
227
identity_request_account-incomplete-IdentityProviderData.patch
Normal file
227
identity_request_account-incomplete-IdentityProviderData.patch
Normal file
@@ -0,0 +1,227 @@
|
||||
--- src/content/public/browser/identity_request_dialog_controller.h.orig 2025-08-15 17:32:26.573405615 +0200
|
||||
+++ src/content/public/browser/identity_request_dialog_controller.h 2025-08-16 00:53:34.120821675 +0200
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "content/public/browser/identity_request_account.h"
|
||||
-#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-forward.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -22,35 +21,6 @@
|
||||
namespace content {
|
||||
class WebContents;
|
||||
|
||||
-// A Java counterpart will be generated for this enum.
|
||||
-// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content.webid
|
||||
-// GENERATED_JAVA_CLASS_NAME_OVERRIDE: IdentityRequestDialogDisclosureField
|
||||
-enum class IdentityRequestDialogDisclosureField {
|
||||
- kName,
|
||||
- kEmail,
|
||||
- kPicture,
|
||||
- kPhoneNumber,
|
||||
- kUsername
|
||||
-};
|
||||
-
|
||||
-// The client metadata that will be used to display a FedCM dialog. This data is
|
||||
-// extracted from the client metadata endpoint from the FedCM API, where
|
||||
-// 'client' is essentially the relying party which invoked the API.
|
||||
-struct CONTENT_EXPORT ClientMetadata {
|
||||
- ClientMetadata(const GURL& terms_of_service_url,
|
||||
- const GURL& privacy_policy_url,
|
||||
- const GURL& brand_icon_url,
|
||||
- const gfx::Image& brand_decoded_icon);
|
||||
- ClientMetadata(const ClientMetadata& other);
|
||||
- ~ClientMetadata();
|
||||
-
|
||||
- GURL terms_of_service_url;
|
||||
- GURL privacy_policy_url;
|
||||
- GURL brand_icon_url;
|
||||
- // This will be an empty image if the fetching never happened or if it failed.
|
||||
- gfx::Image brand_decoded_icon;
|
||||
-};
|
||||
-
|
||||
// The information about an error that will be used to display a FedCM dialog.
|
||||
// This data is extracted from the error object returned by the identity
|
||||
// provider when the user attempts to login via the FedCM API and an error
|
||||
@@ -60,70 +30,6 @@ struct CONTENT_EXPORT IdentityCredential
|
||||
GURL url;
|
||||
};
|
||||
|
||||
-// The metadata about the identity provider that will be used to display a FedCM
|
||||
-// dialog. This data is extracted from the config file which is fetched when the
|
||||
-// FedCM API is invoked.
|
||||
-struct CONTENT_EXPORT IdentityProviderMetadata {
|
||||
- IdentityProviderMetadata();
|
||||
- IdentityProviderMetadata(const IdentityProviderMetadata& other);
|
||||
- ~IdentityProviderMetadata();
|
||||
-
|
||||
- std::optional<SkColor> brand_text_color;
|
||||
- std::optional<SkColor> brand_background_color;
|
||||
- GURL brand_icon_url;
|
||||
- GURL idp_login_url;
|
||||
- std::string requested_label;
|
||||
- // For registered IdPs, the type is used to only show the accounts when the
|
||||
- // RP is compatible.
|
||||
- std::vector<std::string> types;
|
||||
- // The token formats that are supported.
|
||||
- std::vector<std::string> formats;
|
||||
- // The URL of the configuration endpoint. This is stored in
|
||||
- // IdentityProviderMetadata so that the UI code can pass it along when an
|
||||
- // Account is selected by the user.
|
||||
- GURL config_url;
|
||||
- // Whether this IdP supports signing in to additional accounts.
|
||||
- bool supports_add_account{false};
|
||||
- // Whether this IdP has any filtered out account. This is reset to false each
|
||||
- // time the accounts dialog is shown and recomputed then.
|
||||
- bool has_filtered_out_account{false};
|
||||
- // This will be an empty image if fetching failed.
|
||||
- gfx::Image brand_decoded_icon;
|
||||
-};
|
||||
-
|
||||
-// This class contains all of the data specific to an identity provider that is
|
||||
-// going to be used to display a FedCM dialog. This data is gathered from
|
||||
-// endpoints fetched when the FedCM API is invoked as well as from the
|
||||
-// parameters provided by the relying party when the API is invoked.
|
||||
-class CONTENT_EXPORT IdentityProviderData
|
||||
- : public base::RefCounted<IdentityProviderData> {
|
||||
- public:
|
||||
- IdentityProviderData(const std::string& idp_for_display,
|
||||
- const IdentityProviderMetadata& idp_metadata,
|
||||
- const ClientMetadata& client_metadata,
|
||||
- blink::mojom::RpContext rp_context,
|
||||
- std::optional<blink::mojom::Format> format,
|
||||
- const std::vector<IdentityRequestDialogDisclosureField>&
|
||||
- disclosure_fields,
|
||||
- bool has_login_status_mismatch);
|
||||
-
|
||||
- std::string idp_for_display;
|
||||
- IdentityProviderMetadata idp_metadata;
|
||||
- ClientMetadata client_metadata;
|
||||
- blink::mojom::RpContext rp_context;
|
||||
- std::optional<blink::mojom::Format> format;
|
||||
- // For which fields should the dialog request permission for (assuming
|
||||
- // this is for signup).
|
||||
- std::vector<IdentityRequestDialogDisclosureField> disclosure_fields;
|
||||
- // Whether there was some login status API mismatch when fetching the IDP's
|
||||
- // accounts.
|
||||
- bool has_login_status_mismatch;
|
||||
-
|
||||
- private:
|
||||
- friend class base::RefCounted<IdentityProviderData>;
|
||||
-
|
||||
- ~IdentityProviderData();
|
||||
-};
|
||||
|
||||
// The relying party data that will be used to display a FedCM dialog. This data
|
||||
// is extracted from the website which invoked the API, not from the FedCM
|
||||
--- src/content/public/browser/identity_request_account.h.orig 2025-08-15 17:32:26.573405615 +0200
|
||||
+++ src/content/public/browser/identity_request_account.h 2025-08-16 00:53:42.592813124 +0200
|
||||
@@ -13,13 +13,106 @@
|
||||
#include "base/time/time.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "third_party/blink/public/common/webid/login_status_account.h"
|
||||
+#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-forward.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
-class IdentityProviderData;
|
||||
+// A Java counterpart will be generated for this enum.
|
||||
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content.webid
|
||||
+// GENERATED_JAVA_CLASS_NAME_OVERRIDE: IdentityRequestDialogDisclosureField
|
||||
+enum class IdentityRequestDialogDisclosureField {
|
||||
+ kName,
|
||||
+ kEmail,
|
||||
+ kPicture,
|
||||
+ kPhoneNumber,
|
||||
+ kUsername
|
||||
+};
|
||||
+
|
||||
+// The client metadata that will be used to display a FedCM dialog. This data is
|
||||
+// extracted from the client metadata endpoint from the FedCM API, where
|
||||
+// 'client' is essentially the relying party which invoked the API.
|
||||
+struct CONTENT_EXPORT ClientMetadata {
|
||||
+ ClientMetadata(const GURL& terms_of_service_url,
|
||||
+ const GURL& privacy_policy_url,
|
||||
+ const GURL& brand_icon_url,
|
||||
+ const gfx::Image& brand_decoded_icon);
|
||||
+ ClientMetadata(const ClientMetadata& other);
|
||||
+ ~ClientMetadata();
|
||||
+
|
||||
+ GURL terms_of_service_url;
|
||||
+ GURL privacy_policy_url;
|
||||
+ GURL brand_icon_url;
|
||||
+ // This will be an empty image if the fetching never happened or if it failed.
|
||||
+ gfx::Image brand_decoded_icon;
|
||||
+};
|
||||
+
|
||||
+// The metadata about the identity provider that will be used to display a FedCM
|
||||
+// dialog. This data is extracted from the config file which is fetched when the
|
||||
+// FedCM API is invoked.
|
||||
+struct CONTENT_EXPORT IdentityProviderMetadata {
|
||||
+ IdentityProviderMetadata();
|
||||
+ IdentityProviderMetadata(const IdentityProviderMetadata& other);
|
||||
+ ~IdentityProviderMetadata();
|
||||
+
|
||||
+ std::optional<SkColor> brand_text_color;
|
||||
+ std::optional<SkColor> brand_background_color;
|
||||
+ GURL brand_icon_url;
|
||||
+ GURL idp_login_url;
|
||||
+ std::string requested_label;
|
||||
+ // For registered IdPs, the type is used to only show the accounts when the
|
||||
+ // RP is compatible.
|
||||
+ std::vector<std::string> types;
|
||||
+ // The token formats that are supported.
|
||||
+ std::vector<std::string> formats;
|
||||
+ // The URL of the configuration endpoint. This is stored in
|
||||
+ // IdentityProviderMetadata so that the UI code can pass it along when an
|
||||
+ // Account is selected by the user.
|
||||
+ GURL config_url;
|
||||
+ // Whether this IdP supports signing in to additional accounts.
|
||||
+ bool supports_add_account{false};
|
||||
+ // Whether this IdP has any filtered out account. This is reset to false each
|
||||
+ // time the accounts dialog is shown and recomputed then.
|
||||
+ bool has_filtered_out_account{false};
|
||||
+ // This will be an empty image if fetching failed.
|
||||
+ gfx::Image brand_decoded_icon;
|
||||
+};
|
||||
+
|
||||
+// This class contains all of the data specific to an identity provider that is
|
||||
+// going to be used to display a FedCM dialog. This data is gathered from
|
||||
+// endpoints fetched when the FedCM API is invoked as well as from the
|
||||
+// parameters provided by the relying party when the API is invoked.
|
||||
+class CONTENT_EXPORT IdentityProviderData
|
||||
+ : public base::RefCounted<IdentityProviderData> {
|
||||
+ public:
|
||||
+ IdentityProviderData(const std::string& idp_for_display,
|
||||
+ const IdentityProviderMetadata& idp_metadata,
|
||||
+ const ClientMetadata& client_metadata,
|
||||
+ blink::mojom::RpContext rp_context,
|
||||
+ std::optional<blink::mojom::Format> format,
|
||||
+ const std::vector<IdentityRequestDialogDisclosureField>&
|
||||
+ disclosure_fields,
|
||||
+ bool has_login_status_mismatch);
|
||||
+
|
||||
+ std::string idp_for_display;
|
||||
+ IdentityProviderMetadata idp_metadata;
|
||||
+ ClientMetadata client_metadata;
|
||||
+ blink::mojom::RpContext rp_context;
|
||||
+ std::optional<blink::mojom::Format> format;
|
||||
+ // For which fields should the dialog request permission for (assuming
|
||||
+ // this is for signup).
|
||||
+ std::vector<IdentityRequestDialogDisclosureField> disclosure_fields;
|
||||
+ // Whether there was some login status API mismatch when fetching the IDP's
|
||||
+ // accounts.
|
||||
+ bool has_login_status_mismatch;
|
||||
+
|
||||
+ private:
|
||||
+ friend class base::RefCounted<IdentityProviderData>;
|
||||
+
|
||||
+ ~IdentityProviderData();
|
||||
+};
|
||||
|
||||
// Represents a federated user account which is used when displaying the FedCM
|
||||
// account selector.
|
25
json_to_struct-fixed_flat_map-conflicting-declaration.patch
Normal file
25
json_to_struct-fixed_flat_map-conflicting-declaration.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
--- src/tools/json_to_struct/aggregation.py.orig 2025-08-15 17:32:37.009403662 +0200
|
||||
+++ src/tools/json_to_struct/aggregation.py 2025-08-16 00:58:01.264590353 +0200
|
||||
@@ -134,7 +134,9 @@ def _GenerateCCArray(type_name: str, agg
|
||||
Returns:
|
||||
str: The generated C++ array aggregation code.
|
||||
"""
|
||||
- res = f'\nconst auto {aggregation.name} =\n'
|
||||
+ res = '\n const '
|
||||
+ res += f'std::array<const {type_name}*, {len(aggregation.elements)}> '
|
||||
+ res += f'{aggregation.name} =\n'
|
||||
res += f' std::array<const {type_name}*, {len(aggregation.elements)}>'
|
||||
|
||||
res += '({{\n'
|
||||
@@ -157,7 +159,10 @@ def _GenerateCCMap(type_name: str, aggre
|
||||
"""
|
||||
key_type = aggregation.map_key_type
|
||||
|
||||
- res = f'\nconst auto {aggregation.name} =\n'
|
||||
+ res = f'\nconst '
|
||||
+ res += f'base::fixed_flat_map<{aggregation.map_key_type}, '
|
||||
+ res += f'const {type_name}*, {len(aggregation.GetSortedMapElements())}> '
|
||||
+ res += f'{aggregation.name} =\n'
|
||||
res += f' base::MakeFixedFlatMap<{key_type}, const {type_name}*>'
|
||||
|
||||
res += '({\n'
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user