7
0

Accepting request 1178181 from home:dziobian:gulgul-ultron:19

- Update to 30.0.9
  * ABI break: NODE_MODULE_VERSION is now 123
  * Chromium 124.0.6367.233
  * Node 20.11.1
  * V8 12.4
  * Added WebContentsView and BaseWindow, replacing the now-deprecated BrowserView APIs.
  * cross-origin iframes now use Permission Policy to access features
  * Removed: The --disable-color-correct-rendering switch
  * The inputFieldType property in the context-menu params has been removed
  * Removed: process.getIOCounters()
  * see https://www.electronjs.org/blog/electron-30-0 and https://github.com/electron/electron/releases/tag/v30.0.0 for more
- drop Fedora 38 support
  * drop v8-icu73-alt_calendar.patch
  * drop v8-icu73-simple-case-folding.patch
- Drop no longer needed patches
  * chromium-122-avoid-SFINAE-TypeConverter.patch
  * chromium-122-BookmarkNode-missing-operator.patch
  * chromium-98-EnumTable-crash.patch
  * chromium-gcc11.patch
  * grid_sizing_tree-Wchanges-meaning.patch
  * hit_test_request-missing-optional.patch
  * InternalAllocator-too-many-initializers.patch
  * material_color_utilities-tones-missing-round.patch
  * nested-nested-nested-nested-nested-nested-regex-patterns.patch
  * perfetto-numeric_storage-double_t.patch
  * plus_address_types-missing-optional.patch
  * race_network_request_write_buffer_manager-missing-optional.patch
  * resolution_monitor-missing-bitset.patch
  * script_promise_resolver-explicit-specialization.patch
  * search_engine_choice_service-missing-optional.patch
  * text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch
  * v8-instance-type-inl-constexpr-used-before-its-definition.patch
- Drop no longer needed -Wno-error=narrowing from CXXFLAGS
- Add patches to fix build
  * chromium-124-shims.patch
  * enable_stack_trace_line_numbers-symbol_level.patch
  * angle-FramebufferVk-powf.patch
  * licenses.py-FileNotFoundError.patch
  * span_reader-missing-optional.patch
  * bitset-missing-uint8_t-memcpy.patch
  * temporal_scalability_id_extractor-missing-bitset.patch
  * gpu_adapter_info-missing-optional.patch
  * first_party_sets_handler_database_helper-missing-optional.patch
  * async_iterable-forwarding.patch
  * preview_cancel_reason-missing-string.patch
  * script_streamer-atomic-include.patch
- Add -Wno-packed-not-aligned -Wno-address to CXXFLAGS to suppress build logspam
- Add libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch to build with old libaom
- Use system vulkan headers wherever system spirv is used

OBS-URL: https://build.opensuse.org/request/show/1178181
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=151
This commit is contained in:
2024-06-02 19:19:59 +00:00
committed by Git OBS Bridge
parent ef5e272069
commit 82c926a786
21 changed files with 61 additions and 1223 deletions

View File

@@ -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);

View File

@@ -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.

View File

@@ -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) {

View File

@@ -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()))

View File

@@ -1,25 +0,0 @@
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 {

View File

@@ -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;
}

View File

@@ -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"

View File

@@ -1,10 +0,0 @@
--- src/third_party/material_color_utilities/src/cpp/palettes/tones.cc.old 2023-10-11 11:30:46.080385500 +0200
+++ src/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2023-10-11 21:04:10.234128500 +0200
@@ -16,6 +16,7 @@
#include "cpp/palettes/tones.h"
+#include <cmath>
#include "cpp/cam/cam.h"
#include "cpp/cam/hct.h"

View File

@@ -1,44 +0,0 @@
description: fix build error when building with clang & GNU libstdc++
author: Stephan Hartmann <stha09@googlemail.com>
Apparently this doesn't happen with the embedded clang, but we get this:
In file included from ../../components/autofill/core/browser/form_parsing/regex_patterns.cc:5:
In file included from ../../components/autofill/core/browser/form_parsing/regex_patterns.h:8:
In file included from ../../base/containers/span.h:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/algorithm:74:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/pstl/glue_algorithm_defs.h:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/functional:54:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/array:268:52: fatal error: instantiating fold expression with 303 arguments exceeded expression nesting limit of 256
-> array<enable_if_t<(is_same_v<_Tp, _Up> && ...), _Tp>,
~~~~~~~~~~~~~~~~~~~~~~~~^~~~
gen/components/autofill/core/browser/form_parsing/regex_patterns_inl.h:77:22: note: while substituting deduced template arguments into function template '<deduction guide for array>' [with _Tp = autofill::MatchingPattern, _Up = <autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPatter[...]
This is fixed upstream in chromium 103 with the following commit:
https://chromium-review.googlesource.com/c/chromium/src/+/3613356
However, that depends on other stuff and we can't use it without a
bunch more changes - so we'll just use this fix which I nabbed from
Stephan Hartmann instead:
https://github.com/stha09/chromium-patches/blob/master/chromium-102-regex_pattern-array.patch
--- a/components/autofill/core/browser/BUILD.gn
+++ b/components/autofill/core/browser/BUILD.gn
@@ -54,6 +54,11 @@ action("regex_patterns_inl_h") {
}
static_library("browser") {
+ if (is_clang) {
+ cflags = [
+ "-fbracket-depth=1000",
+ ]
+ }
sources = [
"address_normalization_manager.cc",
"address_normalization_manager.h",

View File

@@ -1,3 +1,57 @@
-------------------------------------------------------------------
Sun Jun 2 16:25:34 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
- Update to 30.0.9
* ABI break: NODE_MODULE_VERSION is now 123
* Chromium 124.0.6367.233
* Node 20.11.1
* V8 12.4
* Added WebContentsView and BaseWindow, replacing the now-deprecated BrowserView APIs.
* cross-origin iframes now use Permission Policy to access features
* Removed: The --disable-color-correct-rendering switch
* The inputFieldType property in the context-menu params has been removed
* Removed: process.getIOCounters()
* see https://www.electronjs.org/blog/electron-30-0 and https://github.com/electron/electron/releases/tag/v30.0.0 for more
- drop Fedora 38 support
* drop v8-icu73-alt_calendar.patch
* drop v8-icu73-simple-case-folding.patch
- Drop no longer needed patches
* chromium-122-avoid-SFINAE-TypeConverter.patch
* chromium-122-BookmarkNode-missing-operator.patch
* chromium-98-EnumTable-crash.patch
* chromium-gcc11.patch
* grid_sizing_tree-Wchanges-meaning.patch
* hit_test_request-missing-optional.patch
* InternalAllocator-too-many-initializers.patch
* material_color_utilities-tones-missing-round.patch
* nested-nested-nested-nested-nested-nested-regex-patterns.patch
* perfetto-numeric_storage-double_t.patch
* plus_address_types-missing-optional.patch
* race_network_request_write_buffer_manager-missing-optional.patch
* resolution_monitor-missing-bitset.patch
* script_promise_resolver-explicit-specialization.patch
* search_engine_choice_service-missing-optional.patch
* text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch
* v8-instance-type-inl-constexpr-used-before-its-definition.patch
- Drop no longer needed -Wno-error=narrowing from CXXFLAGS
- Add patches to fix build
* chromium-124-shims.patch
* enable_stack_trace_line_numbers-symbol_level.patch
* angle-FramebufferVk-powf.patch
* licenses.py-FileNotFoundError.patch
* span_reader-missing-optional.patch
* bitset-missing-uint8_t-memcpy.patch
* temporal_scalability_id_extractor-missing-bitset.patch
* gpu_adapter_info-missing-optional.patch
* first_party_sets_handler_database_helper-missing-optional.patch
* async_iterable-forwarding.patch
* preview_cancel_reason-missing-string.patch
* script_streamer-atomic-include.patch
- Add -Wno-packed-not-aligned -Wno-address to CXXFLAGS to suppress build logspam
- Add libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch to build with old libaom
- Use system vulkan headers wherever system spirv is used
------------------------------------------------------------------- -------------------------------------------------------------------
Wed May 29 20:19:39 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com> Wed May 29 20:19:39 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>

View File

@@ -229,9 +229,6 @@ Source402: Cr122-ffmpeg-new-channel-layout.patch
# and against harfbuzz 4 # and against harfbuzz 4
Source415: harfbuzz-replace-chromium-scoped-type.patch Source415: harfbuzz-replace-chromium-scoped-type.patch
Source416: harfbuzz-replace-HbScopedPointer.patch Source416: harfbuzz-replace-HbScopedPointer.patch
# and icu 71
#Source417: v8-icu73-alt_calendar.patch
#Source418: v8-icu73-simple-case-folding.patch
# and wayland 1.31 # and wayland 1.31
Source450: wayland-proto-31-cursor-shape.patch Source450: wayland-proto-31-cursor-shape.patch
@@ -312,7 +309,6 @@ Patch1082: chromium-124-shims.patch
# PATCHES to fix interaction with third-party software # PATCHES to fix interaction with third-party software
#Patch2004: chromium-gcc11.patch
Patch2010: chromium-93-ffmpeg-4.4.patch Patch2010: chromium-93-ffmpeg-4.4.patch
#Since ffmpeg 5, there is no longer first_dts member in AVFormat. Chromium upstream (and Tumbleweed) patches ffmpeg to add a av_stream_get_first_dts function. #Since ffmpeg 5, there is no longer first_dts member in AVFormat. Chromium upstream (and Tumbleweed) patches ffmpeg to add a av_stream_get_first_dts function.
@@ -351,39 +347,22 @@ Patch2048: absl2023-encapsulated_web_transport-StrCat.patch
Patch2049: libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch Patch2049: libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch
# PATCHES that should be submitted upstream verbatim or near-verbatim # PATCHES that should be submitted upstream verbatim or near-verbatim
#Patch3016: chromium-98-EnumTable-crash.patch
# Fix blink nodestructor # Fix blink nodestructor
Patch3023: electron-13-blink-gcc-ambiguous-nodestructor.patch Patch3023: electron-13-blink-gcc-ambiguous-nodestructor.patch
Patch3027: electron-16-freetype-visibility-list.patch Patch3027: electron-16-freetype-visibility-list.patch
Patch3028: electron-16-third_party-symbolize-missing-include.patch Patch3028: electron-16-third_party-symbolize-missing-include.patch
# From https://git.droidware.info/wchen342/ungoogled-chromium-fedora # From https://git.droidware.info/wchen342/ungoogled-chromium-fedora
Patch3033: chromium-94.0.4606.71-InkDropHost-crash.patch Patch3033: chromium-94.0.4606.71-InkDropHost-crash.patch
# https://salsa.debian.org/chromium-team/chromium/-/blob/456851fc808b2a5b5c762921699994e957645917/debian/patches/upstream/nested-nested-nested-nested-nested-nested-regex-patterns.patch
#Patch3064: nested-nested-nested-nested-nested-nested-regex-patterns.patch
Patch3080: compact_enc_det_generated_tables-Wnarrowing.patch Patch3080: compact_enc_det_generated_tables-Wnarrowing.patch
Patch3096: remove-date-reproducible-builds.patch Patch3096: remove-date-reproducible-builds.patch
#Patch3118: material_color_utilities-tones-missing-round.patch
#Patch3126: perfetto-numeric_storage-double_t.patch
#Patch3129: text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch
#Patch3132: v8-instance-type-inl-constexpr-used-before-its-definition.patch
Patch3133: swiftshader-llvm18-LLVMReactor-getInt8PtrTy.patch Patch3133: swiftshader-llvm18-LLVMReactor-getInt8PtrTy.patch
Patch3134: swiftshader-llvm18-LLVMJIT-Host.patch Patch3134: swiftshader-llvm18-LLVMJIT-Host.patch
Patch3135: swiftshader-llvm18-LLVMJIT-CodeGenOptLevel.patch Patch3135: swiftshader-llvm18-LLVMJIT-CodeGenOptLevel.patch
Patch3136: CVE-2024-30260-undici-clear-proxy-authorization.patch Patch3136: CVE-2024-30260-undici-clear-proxy-authorization.patch
Patch3137: CVE-2024-30261-undici-fetch-integrity.patch Patch3137: CVE-2024-30261-undici-fetch-integrity.patch
Patch3138: distributed_point_functions-aes_128_fixed_key_hash-missing-StrCat.patch Patch3138: distributed_point_functions-aes_128_fixed_key_hash-missing-StrCat.patch
#Patch3139: chromium-122-avoid-SFINAE-TypeConverter.patch
#Patch3140: plus_address_types-missing-optional.patch
#Patch3141: chromium-122-BookmarkNode-missing-operator.patch
#Patch3142: search_engine_choice_service-missing-optional.patch
#Patch3143: race_network_request_write_buffer_manager-missing-optional.patch
Patch3144: mt21_util-flax-vector-conversions.patch Patch3144: mt21_util-flax-vector-conversions.patch
#Patch3145: script_promise_resolver-explicit-specialization.patch
#Patch3146: hit_test_request-missing-optional.patch
#Patch3147: grid_sizing_tree-Wchanges-meaning.patch
#Patch3148: resolution_monitor-missing-bitset.patch
Patch3149: boringssl-internal-addc-cxx.patch Patch3149: boringssl-internal-addc-cxx.patch
#Patch3150: InternalAllocator-too-many-initializers.patch
Patch3151: distributed_point_functions-evaluate_prg_hwy-signature.patch Patch3151: distributed_point_functions-evaluate_prg_hwy-signature.patch
Patch3152: fake_ssl_socket_client-Wlto-type-mismatch.patch Patch3152: fake_ssl_socket_client-Wlto-type-mismatch.patch
Patch3153: angle-FramebufferVk-powf.patch Patch3153: angle-FramebufferVk-powf.patch
@@ -533,7 +512,7 @@ BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(gbm)
BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(glproto) BuildRequires: pkgconfig(glproto)
BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(gtest) >= 1.12
BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(harfbuzz) >= 3 BuildRequires: pkgconfig(harfbuzz) >= 3
%if %{with harfbuzz_5} %if %{with harfbuzz_5}
@@ -852,11 +831,6 @@ export CFLAGS="${CXXFLAGS}"
# multiple times throughout the codebase (including generated code). It is not possible to redefine the macro to __builtin_unreachable, # multiple times throughout the codebase (including generated code). It is not possible to redefine the macro to __builtin_unreachable,
# as it has an astonishing syntax, behaving like an ostream (in debug builds it is supposed to trap and print an error message) # as it has an astonishing syntax, behaving like an ostream (in debug builds it is supposed to trap and print an error message)
export CXXFLAGS="${CXXFLAGS} -Wno-error=return-type" export CXXFLAGS="${CXXFLAGS} -Wno-error=return-type"
# [ 8947s] gen/third_party/blink/renderer/bindings/modules/v8/v8_gpu_sampler_descriptor.h:212:39: error: narrowing conversion of '4294967295' from 'unsigned int' to 'float' [-Wnarrowing]
# [ 8947s] 212 | float member_lod_max_clamp_{0xffffffff};
# I have no idea where this code is generated, and it is not something that needs a critical fix.
# Remove this once upstream issues a proper patch.
#export CXXFLAGS="${CXXFLAGS} -Wno-error=narrowing"
# A bunch of memcpy'ing of JSObject in V8 runs us into “Logfile got too big, killed job.” # A bunch of memcpy'ing of JSObject in V8 runs us into “Logfile got too big, killed job.”
export CXXFLAGS="${CXXFLAGS} -Wno-class-memaccess" export CXXFLAGS="${CXXFLAGS} -Wno-class-memaccess"
@@ -915,7 +889,7 @@ unset MALLOC_PERTURB_
%if %{with lto} %if %{with lto}
%ifarch aarch64 %ifarch aarch64
export LDFLAGS="$LDFLAGS -flto=2 --param ggc-min-expand=20 --param ggc-min-heapsize=32768 --param lto-max-streaming-parallelism=1 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" export LDFLAGS="$LDFLAGS -flto=1 --param ggc-min-expand=20 --param ggc-min-heapsize=32768 --param lto-max-streaming-parallelism=1 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
%else %else
# x64 is fine with the the default settings (the machines have 30GB+ ram) # x64 is fine with the the default settings (the machines have 30GB+ ram)
export LDFLAGS="$LDFLAGS -flto=auto" export LDFLAGS="$LDFLAGS -flto=auto"
@@ -1161,7 +1135,12 @@ myconf_gn+=' enable_electron_extensions=false'
# symbol_level=0 no debuginfo (only function names in private symbols) # symbol_level=0 no debuginfo (only function names in private symbols)
# blink (HTML engine) and v8 (js engine) are template-heavy, trying to compile them with full debug leads to linker errors due to inherent limitations of the DWARF format. # blink (HTML engine) and v8 (js engine) are template-heavy, trying to compile them with full debug leads to linker errors due to inherent limitations of the DWARF format.
%ifnarch %ix86 %arm aarch64 %ifnarch %ix86 %arm aarch64
%if 0%{?fedora} == 39
# [10675s] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.cc:9244
myconf_gn+=' symbol_level=1'
%else
myconf_gn+=' symbol_level=2' myconf_gn+=' symbol_level=2'
%endif
myconf_gn+=' blink_symbol_level=1' myconf_gn+=' blink_symbol_level=1'
myconf_gn+=' v8_symbol_level=1' myconf_gn+=' v8_symbol_level=1'
%endif %endif

View File

@@ -1,14 +0,0 @@
Fix inconsistent type alias use
On linux ix86, `double_t` evaluates to `long double`. This contradicts the `double` expected below.
--- src/third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc.old 2023-10-13 11:25:09.719946900 +0200
+++ src/third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc 2023-10-14 23:54:10.728423000 +0200
@@ -39,7 +39,7 @@ namespace trace_processor {
namespace column {
namespace {
-using NumericValue = std::variant<uint32_t, int32_t, int64_t, double_t>;
+using NumericValue = std::variant<uint32_t, int32_t, int64_t, double>;
// Using the fact that binary operators in std are operators() of classes, we
// can wrap those classes in variants and use them for std::visit in

View File

@@ -1,31 +0,0 @@
From 8d253767f895b45053c39ea99a8f02bbe7071d3a Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Mon, 19 Feb 2024 19:00:26 +0000
Subject: [PATCH] IWYU: usage of std::optional in plus_address_types.h requires
include
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bug: 41455655
Change-Id: Ibfda146f5bf7485ad31828f1dc22eb39b57f83b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5306779
Reviewed-by: Jan Keitel <jkeitel@google.com>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1262436}
---
components/plus_addresses/plus_address_types.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/components/plus_addresses/plus_address_types.h b/components/plus_addresses/plus_address_types.h
index 7a7eaa2a818a9..77569d345011a 100644
--- a/components/plus_addresses/plus_address_types.h
+++ b/components/plus_addresses/plus_address_types.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_TYPES_H_
#define COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_TYPES_H_
+#include <optional>
#include <string>
#include <unordered_map>

View File

@@ -1,32 +0,0 @@
From 5b2d53797e5580cbfea00d732fe25a97c7048b5b Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Wed, 24 Jan 2024 06:46:33 +0000
Subject: [PATCH] IWYU: missing include for std::optional usage in
race_network_request_write_buffer_manager.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bug: 957519
Change-Id: Id3a6c3cc3c1273208bde43b70a2bd298695f7cc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5223947
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1251264}
---
.../service_worker/race_network_request_write_buffer_manager.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/content/common/service_worker/race_network_request_write_buffer_manager.h b/content/common/service_worker/race_network_request_write_buffer_manager.h
index 0e7f17417dbd9..ad9ea1348a977 100644
--- a/content/common/service_worker/race_network_request_write_buffer_manager.h
+++ b/content/common/service_worker/race_network_request_write_buffer_manager.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_COMMON_SERVICE_WORKER_RACE_NETWORK_REQUEST_WRITE_BUFFER_MANAGER_H_
#define CONTENT_COMMON_SERVICE_WORKER_RACE_NETWORK_REQUEST_WRITE_BUFFER_MANAGER_H_
+#include <optional>
+
#include "base/containers/span.h"
#include "content/common/content_export.h"
#include "mojo/public/cpp/system/data_pipe.h"

View File

@@ -1,32 +0,0 @@
From 214859e3567ea9def85305e4f021a5d407e1ccfe Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue, 23 Jan 2024 10:56:36 +0000
Subject: [PATCH] IWYU: missing include for usage of std::bitset in
resolution_monitor.cc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bug: 957519
Change-Id: Ia538bbca63105397963632d2a145886e256efeb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5190545
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1250732}
---
.../renderer/platform/peerconnection/resolution_monitor.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc b/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
index 5d6a6495045c4..33135a1b22473 100644
--- a/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
+++ b/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
@@ -4,6 +4,8 @@
#include "third_party/blink/renderer/platform/peerconnection/resolution_monitor.h"
+#include <bitset>
+
#include "base/containers/span.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"

View File

@@ -1,115 +0,0 @@
From 8b293359cafbc741e7742de824b98fbf87a51b51 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Thu, 8 Feb 2024 09:32:57 +0000
Subject: [PATCH] Do not use templates for ScriptPromiseResolver::ToV8
implementation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The usage of templates for reusing the internal implementation of ToV8
is not making the code simpler. So, inline the implementations.
This also fixes a GCC build issue because it was implemented with
template specializations declared in the class scope, and that is
hitting the GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282
Bug: 819294
Change-Id: I51f5a9e0a6e80ac707b630f270179c29fd84b059
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5223626
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257835}
---
.../core/v8/script_promise_resolver.h | 60 +++++--------------
1 file changed, 14 insertions(+), 46 deletions(-)
diff --git a/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h b/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h
index 93cecd06c2814..ae0081b735a67 100644
--- a/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h
+++ b/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h
@@ -316,70 +316,38 @@ class CORE_EXPORT ScriptPromiseResolver
return V8String(isolate, value);
}
- template <size_t sizeOfValue>
- static v8::Local<v8::Value> ToV8SignedIntegerInternal(int64_t value,
- v8::Isolate*);
-
- template <>
- v8::Local<v8::Value> ToV8SignedIntegerInternal<4>(int64_t value,
- v8::Isolate* isolate) {
- return v8::Integer::New(isolate, static_cast<int32_t>(value));
- }
-
- template <>
- v8::Local<v8::Value> ToV8SignedIntegerInternal<8>(int64_t value,
- v8::Isolate* isolate) {
- int32_t value_in32_bit = static_cast<int32_t>(value);
- if (value_in32_bit == value) {
- return v8::Integer::New(isolate, value_in32_bit);
- }
- // V8 doesn't have a 64-bit integer implementation.
- return v8::Number::New(isolate, value);
- }
-
- template <size_t sizeOfValue>
- static v8::Local<v8::Value> ToV8UnsignedIntegerInternal(uint64_t value,
- v8::Isolate*);
-
- template <>
- v8::Local<v8::Value> ToV8UnsignedIntegerInternal<4>(uint64_t value,
- v8::Isolate* isolate) {
- return v8::Integer::NewFromUnsigned(isolate, static_cast<uint32_t>(value));
- }
-
- template <>
- v8::Local<v8::Value> ToV8UnsignedIntegerInternal<8>(uint64_t value,
- v8::Isolate* isolate) {
- uint32_t value_in32_bit = static_cast<uint32_t>(value);
- if (value_in32_bit == value) {
- return v8::Integer::NewFromUnsigned(isolate, value_in32_bit);
- }
- // V8 doesn't have a 64-bit integer implementation.
- return v8::Number::New(isolate, value);
- }
-
static v8::Local<v8::Value> ToV8(int32_t value,
v8::Local<v8::Object> creation_context,
v8::Isolate* isolate) {
- return ToV8SignedIntegerInternal<sizeof value>(value, isolate);
+ return v8::Integer::New(isolate, value);
}
static v8::Local<v8::Value> ToV8(int64_t value,
v8::Local<v8::Object> creation_context,
v8::Isolate* isolate) {
- return ToV8SignedIntegerInternal<sizeof value>(value, isolate);
+ int32_t value_in32_bit = static_cast<int32_t>(value);
+ if (value_in32_bit == value) {
+ return v8::Integer::New(isolate, value_in32_bit);
+ }
+ // V8 doesn't have a 64-bit integer implementation.
+ return v8::Number::New(isolate, value);
}
static v8::Local<v8::Value> ToV8(uint32_t value,
v8::Local<v8::Object> creation_context,
v8::Isolate* isolate) {
- return ToV8UnsignedIntegerInternal<sizeof value>(value, isolate);
+ return v8::Integer::NewFromUnsigned(isolate, value);
}
static v8::Local<v8::Value> ToV8(uint64_t value,
v8::Local<v8::Object> creation_context,
v8::Isolate* isolate) {
- return ToV8UnsignedIntegerInternal<sizeof value>(value, isolate);
+ uint32_t value_in32_bit = static_cast<uint32_t>(value);
+ if (value_in32_bit == value) {
+ return v8::Integer::NewFromUnsigned(isolate, value_in32_bit);
+ }
+ // V8 doesn't have a 64-bit integer implementation.
+ return v8::Number::New(isolate, value);
}
static v8::Local<v8::Value> ToV8(bool value,

View File

@@ -1,32 +0,0 @@
From 4b48bc4dd6ce9c56d254e552a33a7b7c2d6fc226 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Thu, 1 Feb 2024 17:01:51 +0000
Subject: [PATCH] IWYU: usage of std::optional in
search_engine_choice_service.h requires include
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bug: 957519
Change-Id: If89767ae4cd261081efda97cde6a296209b68782
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5259337
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1255105}
---
.../search_engine_choice/search_engine_choice_service.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/components/search_engines/search_engine_choice/search_engine_choice_service.h b/components/search_engines/search_engine_choice/search_engine_choice_service.h
index b84ea7ec5fc08..c9dcce4b7c833 100644
--- a/components/search_engines/search_engine_choice/search_engine_choice_service.h
+++ b/components/search_engines/search_engine_choice/search_engine_choice_service.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_CHOICE_SEARCH_ENGINE_CHOICE_SERVICE_H_
#define COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_CHOICE_SEARCH_ENGINE_CHOICE_SERVICE_H_
+#include <optional>
+
#include "base/memory/raw_ref.h"
#include "base/memory/weak_ptr.h"
#include "components/country_codes/country_codes.h"

View File

@@ -1,148 +0,0 @@
From f62990fb134b7e610502b6804945debaa51960a5 Mon Sep 17 00:00:00 2001
From: Koji Ishii <kojii@chromium.org>
Date: Fri, 9 Feb 2024 18:47:02 +0000
Subject: [PATCH] Support ICU 74 in `LazyTextBreakIterator`
This patch extends the `kBreakAllLineBreakClassTable` table
for 5 new LineBreak classes in ICU 74.
They are for Brahmic scripts, which "line breaks can occur at
the boundaries of any orthographic syllable"[1]. The
`break-all` has no additional break opportunities that all
entries are `0`.
This patch also adds `0` for 3 classes added in ICU 58[2],
instead of doing so in code, to make future additions
possible.
[1] https://unicode.org/reports/tr14/#BreakOpportunities
[2] https://chromiumcodereview.appspot.com/2440923002
Bug: 324419151
Change-Id: I8002edb927280f63b5b668b09076cc71feaeac3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5279337
Auto-Submit: Koji Ishii <kojii@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1258643}
---
.../platform/text/text_break_iterator.cc | 98 ++++++++++---------
1 file changed, 53 insertions(+), 45 deletions(-)
diff --git a/third_party/blink/renderer/platform/text/text_break_iterator.cc b/third_party/blink/renderer/platform/text/text_break_iterator.cc
index 703dc2399075469..38ab94a0a460b5c 100644
--- a/third_party/blink/renderer/platform/text/text_break_iterator.cc
+++ b/third_party/blink/renderer/platform/text/text_break_iterator.cc
@@ -161,11 +161,7 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar
};
// clang-format on
-#if U_ICU_VERSION_MAJOR_NUM >= 58
-#define BA_LB_COUNT (U_LB_COUNT - 3)
-#else
#define BA_LB_COUNT U_LB_COUNT
-#endif
// Line breaking table for CSS word-break: break-all. This table differs from
// asciiLineBreakTable in:
// - Indices are Line Breaking Classes defined in UAX#14 Unicode Line Breaking
@@ -174,47 +170,59 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar
// normal line break, not "prohibit break."
// clang-format off
static const unsigned char kBreakAllLineBreakClassTable[][BA_LB_COUNT / 8 + 1] = {
- // XX AI AL B2 BA BB BK CB CL CM CR EX GL HY ID IN IS LF NS NU OP PO PR QU SA SG SP SY ZW NL WJ H2 H3 JL JT JV CP CJ HL RI
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AI
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AL
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // B2
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // BA
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BB
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BK
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CB
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // CL
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CM
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CR
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // EX
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // GL
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // HY
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ID
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // IN
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // IS
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // LF
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NS
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // NU
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // OP
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // PO
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // PR
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // QU
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // SA
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SG
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SP
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // SY
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ZW
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NL
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // WJ
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H2
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H3
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JL
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JT
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JV
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // CP
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CJ
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // HL
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // RI
+ // XX AI AL B2 BA BB BK CB CL CM CR EX GL HY ID IN IS LF NS NU OP PO PR QU SA SG SP SY ZW NL WJ H2 H3 JL JT JV CP CJ HL RI EB EM ZWJ AK AP AS VF VI
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0,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, 0, 0, 0) }, // RI
+ // Added in ICU 58.
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // EB
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // EM
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ZWJ
+#if U_ICU_VERSION_MAJOR_NUM >= 74
+ // Added in ICU 74. https://icu.unicode.org/download/74
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AK
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AP
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AS
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // VF
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // VI
+#endif // U_ICU_VERSION_MAJOR_NUM >= 74
};
// clang-format on

View File

@@ -1,164 +0,0 @@
From d9715adf895e9acfbaf17ae05b18f2b2467ca322 Mon Sep 17 00:00:00 2001
From: Frank Tang <ftang@chromium.org>
Date: Tue, 20 Jun 2023 15:12:47 -0700
Subject: [PATCH] [Intl] rm alt_calendar hack post ICU 73-1
Also need to bump up the required ICU version.
Bug: v8:14086
Change-Id: I52a53fcd201f3272aa712123fc00c54d0b762d53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4628805
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#88431}
---
src/objects/intl-objects.h | 2 +-
src/objects/js-date-time-format-inl.h | 2 --
src/objects/js-date-time-format.cc | 30 +++++++--------------------
src/objects/js-date-time-format.h | 2 --
src/objects/js-date-time-format.tq | 8 -------
5 files changed, 8 insertions(+), 36 deletions(-)
diff --git a/src/objects/intl-objects.h b/src/objects/intl-objects.h
index 4339673d566..b628cf686f3 100644
--- a/v8/src/objects/intl-objects.h
+++ b/v8/src/objects/intl-objects.h
@@ -21,7 +21,7 @@
#include "unicode/locid.h"
#include "unicode/uversion.h"
-#define V8_MINIMUM_ICU_VERSION 71
+#define V8_MINIMUM_ICU_VERSION 73
namespace U_ICU_NAMESPACE {
class BreakIterator;
diff --git a/src/objects/js-date-time-format-inl.h b/src/objects/js-date-time-format-inl.h
index 8c93a8eeb63..fefe081f8f5 100644
--- a/v8/src/objects/js-date-time-format-inl.h
+++ b/v8/src/objects/js-date-time-format-inl.h
@@ -28,8 +28,6 @@ ACCESSORS(JSDateTimeFormat, icu_simple_date_format,
Tagged<Managed<icu::DateIntervalFormat>>,
kIcuDateIntervalFormatOffset)
-BOOL_ACCESSORS(JSDateTimeFormat, flags, alt_calendar, AltCalendarBit::kShift)
-
inline void JSDateTimeFormat::set_hour_cycle(HourCycle hour_cycle) {
int hints = flags();
hints = HourCycleBits::update(hints, hour_cycle);
diff --git a/src/objects/js-date-time-format.cc b/src/objects/js-date-time-format.cc
index 62d6fdcb935..6aae75c8de8 100644
--- a/v8/src/objects/js-date-time-format.cc
+++ b/v8/src/objects/js-date-time-format.cc
@@ -530,8 +530,7 @@ Handle<Object> JSDateTimeFormat::TimeZoneId(Isolate* isolate,
namespace {
Handle<String> GetCalendar(Isolate* isolate,
- const icu::SimpleDateFormat& simple_date_format,
- bool is_alt_calendar = false) {
+ const icu::SimpleDateFormat& simple_date_format) {
// getType() returns legacy calendar type name instead of LDML/BCP47 calendar
// key values. intl.js maps them to BCP47 values for key "ca".
// TODO(jshin): Consider doing it here, instead.
@@ -542,17 +541,9 @@ Handle<String> GetCalendar(Isolate* isolate,
// and
// http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/calendar.xml
if (calendar_str == "gregorian") {
- if (is_alt_calendar) {
- calendar_str = "iso8601";
- } else {
- calendar_str = "gregory";
- }
+ calendar_str = "gregory";
} else if (calendar_str == "ethiopic-amete-alem") {
calendar_str = "ethioaa";
- } else if (calendar_str == "islamic") {
- if (is_alt_calendar) {
- calendar_str = "islamic-rgsa";
- }
}
return isolate->factory()->NewStringFromAsciiChecked(calendar_str.c_str());
}
@@ -567,8 +558,7 @@ Handle<Object> GetTimeZone(Isolate* isolate,
Handle<String> JSDateTimeFormat::Calendar(
Isolate* isolate, Handle<JSDateTimeFormat> date_time_format) {
return GetCalendar(isolate,
- *(date_time_format->icu_simple_date_format()->raw()),
- date_time_format->alt_calendar());
+ *(date_time_format->icu_simple_date_format()->raw()));
}
Handle<Object> JSDateTimeFormat::TimeZone(
@@ -2328,9 +2318,6 @@ MaybeHandle<JSDateTimeFormat> JSDateTimeFormat::New(
icu_locale.setUnicodeKeywordValue("ca", calendar_str.get(), status);
DCHECK(U_SUCCESS(status));
}
- bool alt_calendar =
- strstr(icu_locale.getName(), "calendar=iso8601") != nullptr ||
- strstr(icu_locale.getName(), "calendar=islamic-rgsa") != nullptr;
if (numbering_system_str != nullptr &&
Intl::IsValidNumberingSystem(numbering_system_str.get())) {
@@ -2640,7 +2627,6 @@ MaybeHandle<JSDateTimeFormat> JSDateTimeFormat::New(
date_time_format->set_time_style(time_style);
}
date_time_format->set_hour_cycle(dateTimeFormatHourCycle);
- date_time_format->set_alt_calendar(alt_calendar);
date_time_format->set_locale(*locale_str);
date_time_format->set_icu_locale(*managed_locale);
date_time_format->set_icu_simple_date_format(*managed_format);
@@ -2742,10 +2728,8 @@ MaybeHandle<JSArray> FormatToPartsWithTemporalSupport(
DateTimeValueRecord x_record;
MAYBE_ASSIGN_RETURN_ON_EXCEPTION_VALUE(
isolate, x_record,
- HandleDateTimeValue(
- isolate, *format,
- GetCalendar(isolate, *format, date_time_format->alt_calendar()), x,
- method_name),
+ HandleDateTimeValue(isolate, *format, GetCalendar(isolate, *format), x,
+ method_name),
Handle<JSArray>());
return FormatMillisecondsByKindToArray(isolate, *format, x_record.kind,
@@ -3070,8 +3054,8 @@ MaybeHandle<T> FormatRangeCommonWithTemporalSupport(
// 6. Let x be ? HandleDateTimeValue(dateTimeFormat, x).
icu::SimpleDateFormat* icu_simple_date_format =
date_time_format->icu_simple_date_format()->raw();
- Handle<String> date_time_format_calendar = GetCalendar(
- isolate, *icu_simple_date_format, date_time_format->alt_calendar());
+ Handle<String> date_time_format_calendar =
+ GetCalendar(isolate, *icu_simple_date_format);
DateTimeValueRecord x_record;
MAYBE_ASSIGN_RETURN_ON_EXCEPTION_VALUE(
isolate, x_record,
diff --git a/src/objects/js-date-time-format.h b/src/objects/js-date-time-format.h
index cdf87c2268a..ceebcc5e8f9 100644
--- a/v8/src/objects/js-date-time-format.h
+++ b/v8/src/objects/js-date-time-format.h
@@ -150,8 +150,6 @@ class JSDateTimeFormat
DECL_ACCESSORS(icu_simple_date_format, Managed<icu::SimpleDateFormat>)
DECL_ACCESSORS(icu_date_interval_format, Managed<icu::DateIntervalFormat>)
- DECL_BOOLEAN_ACCESSORS(alt_calendar)
-
DECL_PRINTER(JSDateTimeFormat)
TQ_OBJECT_CONSTRUCTORS(JSDateTimeFormat)
diff --git a/src/objects/js-date-time-format.tq b/src/objects/js-date-time-format.tq
index ef0584e7901..6fab20c71d1 100644
--- a/v8/src/objects/js-date-time-format.tq
+++ b/v8/src/objects/js-date-time-format.tq
@@ -10,14 +10,6 @@ bitfield struct JSDateTimeFormatFlags extends uint31 {
hour_cycle: HourCycle: 3 bit;
date_style: DateTimeStyle: 3 bit;
time_style: DateTimeStyle: 3 bit;
- // ICU report the same type "gregorian" for both "gregorian" calendar and
- // "iso8601" calendar and the same type "islamic" for both "islamic" and
- // "islamic-rgsa" calendar. We use the alt_calendar bit to distinguish between
- // them. When the type is "gregorian" and the alt_calendar bit is set, it is
- // "iso8601", otherwise the true "gregorian" calendar. While the type is
- // "islamic" and the alt_calendar bit is set, it is "islamic-rgsa" calendar,
- // otherwise "islamic" calendar.
- alt_calendar: bool: 1bit;
}
extern class JSDateTimeFormat extends JSObject {

View File

@@ -1,194 +0,0 @@
From 572b80f2e906a826a499c4c5561b90b97a687f0e Mon Sep 17 00:00:00 2001
From: pthier <pthier@chromium.org>
Date: Tue, 18 Jul 2023 16:27:28 +0200
Subject: [PATCH] [regexp] Remove special handling for simple case folding
ICU 73 introduced creating closures using simple case folding.
We can directly use this method instead of our own special handling where simple case folding (required by JS spec) differs from full case
folding (the previously only supported mode in ICU).
Bug: v8:13377
Change-Id: I42bbcc37fe5c1f33a1d6c36f0d4ceb18a67a9b43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4694009
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89024}
---
src/regexp/gen-regexp-special-case.cc | 48 ---------------------------
src/regexp/regexp-ast.h | 6 ----
src/regexp/regexp-compiler-tonode.cc | 24 +-------------
src/regexp/regexp-parser.cc | 2 +-
src/regexp/special-case.h | 10 ------
5 files changed, 2 insertions(+), 88 deletions(-)
diff --git a/src/regexp/gen-regexp-special-case.cc b/src/regexp/gen-regexp-special-case.cc
index 55618f11783..86f6b212c93 100644
--- a/v8/src/regexp/gen-regexp-special-case.cc
+++ b/v8/src/regexp/gen-regexp-special-case.cc
@@ -9,7 +9,6 @@
#include "src/base/strings.h"
#include "src/regexp/special-case.h"
-#include "unicode/usetiter.h"
namespace v8 {
namespace internal {
@@ -127,52 +126,6 @@ void PrintSpecial(std::ofstream& out) {
PrintSet(out, "SpecialAddSet", special_add);
}
-void PrintUnicodeSpecial(std::ofstream& out) {
- icu::UnicodeSet non_simple_folding;
- icu::UnicodeSet current;
- UErrorCode status = U_ZERO_ERROR;
- // Look at all characters except white spaces.
- icu::UnicodeSet interestingCP(u"[^[:White_Space:]]", status);
- CHECK_EQ(status, U_ZERO_ERROR);
- icu::UnicodeSetIterator iter(interestingCP);
- while (iter.next()) {
- UChar32 c = iter.getCodepoint();
- current.set(c, c);
- current.closeOver(USET_CASE_INSENSITIVE).removeAllStrings();
- CHECK(!current.isBogus());
- // Remove characters from the closeover that have a simple case folding.
- icu::UnicodeSet toRemove;
- icu::UnicodeSetIterator closeOverIter(current);
- while (closeOverIter.next()) {
- UChar32 closeOverChar = closeOverIter.getCodepoint();
- UChar32 closeOverSCF = u_foldCase(closeOverChar, U_FOLD_CASE_DEFAULT);
- if (closeOverChar != closeOverSCF) {
- toRemove.add(closeOverChar);
- }
- }
- CHECK(!toRemove.isBogus());
- current.removeAll(toRemove);
-
- // The current character and its simple case folding are also always OK.
- UChar32 scf = u_foldCase(c, U_FOLD_CASE_DEFAULT);
- current.remove(c);
- current.remove(scf);
-
- // If there are any characters remaining, they were added due to full case
- // foldings and shouldn't match the current charcter according to the spec.
- if (!current.isEmpty()) {
- // Ensure that the character doesn't have a simple case folding.
- // Otherwise the current approach of simply removing the character from
- // the set before calling closeOver won't work.
- CHECK_EQ(c, scf);
- non_simple_folding.add(c);
- }
- }
- CHECK(!non_simple_folding.isBogus());
-
- PrintSet(out, "UnicodeNonSimpleCloseOverSet", non_simple_folding);
-}
-
void WriteHeader(const char* header_filename) {
std::ofstream out(header_filename);
out << std::hex << std::setfill('0') << std::setw(4);
@@ -193,7 +146,6 @@ void WriteHeader(const char* header_filename) {
<< "namespace internal {\n\n";
PrintSpecial(out);
- PrintUnicodeSpecial(out);
out << "\n"
<< "} // namespace internal\n"
diff --git a/src/regexp/regexp-ast.h b/src/regexp/regexp-ast.h
index e7453ad3f8f..8e3bb12fce2 100644
--- a/v8/src/regexp/regexp-ast.h
+++ b/v8/src/regexp/regexp-ast.h
@@ -134,12 +134,6 @@ class CharacterRange {
static void AddUnicodeCaseEquivalents(ZoneList<CharacterRange>* ranges,
Zone* zone);
-#ifdef V8_INTL_SUPPORT
- // Creates the closeOver of the given UnicodeSet, removing all
- // characters/strings that can't be derived via simple case folding.
- static void UnicodeSimpleCloseOver(icu::UnicodeSet& set);
-#endif // V8_INTL_SUPPORT
-
bool Contains(base::uc32 i) const { return from_ <= i && i <= to_; }
base::uc32 from() const { return from_; }
base::uc32 to() const { return to_; }
diff --git a/src/regexp/regexp-compiler-tonode.cc b/src/regexp/regexp-compiler-tonode.cc
index 5ff16ee71d2..9c83e2332e8 100644
--- a/v8/src/regexp/regexp-compiler-tonode.cc
+++ b/v8/src/regexp/regexp-compiler-tonode.cc
@@ -423,27 +423,6 @@ RegExpNode* UnanchoredAdvance(RegExpCompiler* compiler,
} // namespace
-#ifdef V8_INTL_SUPPORT
-// static
-void CharacterRange::UnicodeSimpleCloseOver(icu::UnicodeSet& set) {
- // Remove characters for which closeOver() adds full-case-folding equivalents
- // because we should work only with simple case folding mappings.
- icu::UnicodeSet non_simple = icu::UnicodeSet(set);
- non_simple.retainAll(RegExpCaseFolding::UnicodeNonSimpleCloseOverSet());
- set.removeAll(non_simple);
-
- set.closeOver(USET_CASE_INSENSITIVE);
- // Full case folding maps single characters to multiple characters.
- // Those are represented as strings in the set. Remove them so that
- // we end up with only simple and common case mappings.
- set.removeAllStrings();
-
- // Add characters that have non-simple case foldings again (they match
- // themselves).
- set.addAll(non_simple);
-}
-#endif // V8_INTL_SUPPORT
-
// static
void CharacterRange::AddUnicodeCaseEquivalents(ZoneList<CharacterRange>* ranges,
Zone* zone) {
@@ -465,8 +444,7 @@ void CharacterRange::AddUnicodeCaseEquivalents(ZoneList<CharacterRange>* ranges,
}
// Clear the ranges list without freeing the backing store.
ranges->Rewind(0);
-
- UnicodeSimpleCloseOver(set);
+ set.closeOver(USET_SIMPLE_CASE_INSENSITIVE);
for (int i = 0; i < set.getRangeCount(); i++) {
ranges->Add(Range(set.getRangeStart(i), set.getRangeEnd(i)), zone);
}
diff --git a/src/regexp/regexp-parser.cc b/src/regexp/regexp-parser.cc
index 76ca02bf240..730dfb9da86 100644
--- a/v8/src/regexp/regexp-parser.cc
+++ b/v8/src/regexp/regexp-parser.cc
@@ -1897,7 +1897,7 @@ bool LookupPropertyValueName(UProperty property,
ExtractStringsFromUnicodeSet(set, result_strings, flags, zone);
}
const bool needs_case_folding = IsUnicodeSets(flags) && IsIgnoreCase(flags);
- if (needs_case_folding) CharacterRange::UnicodeSimpleCloseOver(set);
+ if (needs_case_folding) set.closeOver(USET_SIMPLE_CASE_INSENSITIVE);
set.removeAllStrings();
if (negate) set.complement();
for (int i = 0; i < set.getRangeCount(); i++) {
diff --git a/src/regexp/special-case.h b/src/regexp/special-case.h
index c80b94e976a..753c9231ede 100644
--- a/v8/src/regexp/special-case.h
+++ b/v8/src/regexp/special-case.h
@@ -71,21 +71,11 @@ namespace internal {
// another character. Characters that match no other characters in
// their equivalence class are added to IgnoreSet. Characters that
// match at least one other character are added to SpecialAddSet.
-//
-// For unicode ignoreCase ("iu" and "iv"),
-// UnicodeSet::closeOver(USET_CASE_INSENSITIVE) adds all characters that are in
-// the same equivalence class. This includes characaters that are in the same
-// equivalence class using full case folding. According to the spec, only
-// simple case folding shall be considered. We therefore create
-// UnicodeNonSimpleCloseOverSet containing all characters for which
-// UnicodeSet::closeOver adds characters that are not simple case folds. This
-// set should be used similar to IgnoreSet described above.
class RegExpCaseFolding final : public AllStatic {
public:
static const icu::UnicodeSet& IgnoreSet();
static const icu::UnicodeSet& SpecialAddSet();
- static const icu::UnicodeSet& UnicodeNonSimpleCloseOverSet();
// This implements ECMAScript 2020 21.2.2.8.2 (Runtime Semantics:
// Canonicalize) step 3, which is used to determine whether

View File

@@ -1,45 +0,0 @@
--- src/v8/src/objects/instance-type-inl.h.orig 2024-02-21 13:34:15.959879700 +0000
+++ src/v8/src/objects/instance-type-inl.h 2024-02-25 13:47:34.748156000 +0000
@@ -71,7 +71,9 @@ constexpr bool kHasUniqueMapOfInstanceTy
template <InstanceType type>
constexpr RootIndex kUniqueMapOfInstanceType =
- UniqueMapOfInstanceType(type).value_or(RootIndex::kRootListLength);
+ kHasUniqueMapOfInstanceType<type>?
+ *UniqueMapOfInstanceType(type):
+ RootIndex::kRootListLength;
// Manually curated list of instance type ranges which are associated with a
// unique range of map addresses on the read only heap. Both ranges are
@@ -129,14 +131,17 @@ UniqueMapRangeOfInstanceTypeRange(Instan
return {};
}
+constexpr inline TaggedAddressRange NULL_ADDRESS_RANGE{kNullAddress, kNullAddress};
+
template <InstanceType first, InstanceType last>
constexpr bool kHasUniqueMapRangeOfInstanceTypeRange =
UniqueMapRangeOfInstanceTypeRange(first, last).has_value();
template <InstanceType first, InstanceType last>
constexpr TaggedAddressRange kUniqueMapRangeOfInstanceTypeRange =
- UniqueMapRangeOfInstanceTypeRange(first, last)
- .value_or(TaggedAddressRange(kNullAddress, kNullAddress));
+ kHasUniqueMapRangeOfInstanceTypeRange<first, last>?
+ *UniqueMapRangeOfInstanceTypeRange(first, last):
+ NULL_ADDRESS_RANGE;
inline constexpr base::Optional<TaggedAddressRange>
UniqueMapRangeOfInstanceType(InstanceType type) {
@@ -149,8 +154,9 @@ constexpr bool kHasUniqueMapRangeOfInsta
template <InstanceType type>
constexpr TaggedAddressRange kUniqueMapRangeOfInstanceType =
- UniqueMapRangeOfInstanceType(type).value_or(
- TaggedAddressRange(kNullAddress, kNullAddress));
+ kHasUniqueMapRangeOfInstanceType<type>?
+ *UniqueMapRangeOfInstanceType(type):
+ NULL_ADDRESS_RANGE;
inline bool MayHaveMapCheckFastCase(InstanceType type) {
if (UniqueMapOfInstanceType(type)) return true;