1 From 210019ce23ea273a13c77fedb3e674a47c67214a Mon Sep 17 00:00:00 2001
2 From: Max Ihlenfeldt <max@igalia.com>
3 Date: Mon, 12 Jun 2023 16:52:44 +0000
4 Subject: [PATCH 13/33] [meta-browser] Add missing "typename"s
6 This adds some `typename`s in locations where they are needed in older
7 versions of clang (probably < 16).
9 Upstream-Status: Inappropriate [specific to older versions of clang]
10 Signed-off-by: Max Ihlenfeldt <max@igalia.com>
12 .../download/bubble/download_bubble_update_service.cc | 6 +++---
13 components/optimization_guide/core/tflite_model_executor.h | 2 +-
14 .../browser/web_ui_browser_interface_broker_registry.h | 6 +++---
15 .../core/html/parser/html_document_parser_fastpath.cc | 2 +-
16 .../renderer/core/paint/object_paint_properties_sparse.h | 4 ++--
17 5 files changed, 10 insertions(+), 10 deletions(-)
19 diff --git a/chrome/browser/download/bubble/download_bubble_update_service.cc b/chrome/browser/download/bubble/download_bubble_update_service.cc
20 index 93ec91e38b9b3..acd25f25d1579 100644
21 --- a/chrome/browser/download/bubble/download_bubble_update_service.cc
22 +++ b/chrome/browser/download/bubble/download_bubble_update_service.cc
23 @@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item) {
24 // Helper to get an iterator to the last element in the cache. The cache
26 template <typename Item>
27 -SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
28 +typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
29 CHECK(!cache.empty());
30 auto it = cache.end();
32 @@ -967,9 +967,9 @@ bool DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheImpl(
35 template <typename Id, typename Item>
36 -SortedItems<Item>::iterator
37 +typename SortedItems<Item>::iterator
38 DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter(
39 - SortedItems<Item>::iterator iter,
40 + typename SortedItems<Item>::iterator iter,
41 SortedItems<Item>& cache,
42 IterMap<Id, Item>& iter_map) {
43 CHECK(iter != cache.end());
44 diff --git a/components/optimization_guide/core/tflite_model_executor.h b/components/optimization_guide/core/tflite_model_executor.h
45 index bbb5208aae904..027ae8e101634 100644
46 --- a/components/optimization_guide/core/tflite_model_executor.h
47 +++ b/components/optimization_guide/core/tflite_model_executor.h
48 @@ -240,7 +240,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
49 void SendForBatchExecution(
50 BatchExecutionCallback callback_on_complete,
51 base::TimeTicks start_time,
52 - ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
53 + typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
55 DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
56 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
57 diff --git a/content/public/browser/web_ui_browser_interface_broker_registry.h b/content/public/browser/web_ui_browser_interface_broker_registry.h
58 index 0a419be66b325..7253c9680f722 100644
59 --- a/content/public/browser/web_ui_browser_interface_broker_registry.h
60 +++ b/content/public/browser/web_ui_browser_interface_broker_registry.h
61 @@ -127,10 +127,10 @@ class CONTENT_EXPORT WebUIBrowserInterfaceBrokerRegistry {
63 // TODO(crbug.com/1407936): Point to WebUIJsBridge documentation.
64 template <typename ControllerType>
65 - JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
66 + typename JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
67 using Traits = JsBridgeTraits<ControllerType>;
68 - using Interface = Traits::Interface;
69 - using JsBridgeBinderInitializer = Traits::BinderInitializer;
70 + using Interface = typename Traits::Interface;
71 + using JsBridgeBinderInitializer = typename Traits::BinderInitializer;
73 // WebUIController::GetType() requires an instantiated WebUIController
74 // (because it's a virtual method and can't be static). Here we only have
75 diff --git a/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc b/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
76 index 4b5b6701a591b..59e1262a06e37 100644
77 --- a/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
78 +++ b/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
79 @@ -169,7 +169,7 @@ class HTMLFastPathParser {
80 using Span = base::span<const Char>;
81 using USpan = base::span<const UChar>;
82 // 32 matches that used by HTMLToken::Attribute.
83 - typedef std::conditional<std::is_same_v<Char, UChar>,
84 + typedef typename std::conditional<std::is_same_v<Char, UChar>,
85 UCharLiteralBuffer<32>,
86 LCharLiteralBuffer<32>>::type LiteralBufferType;
87 typedef UCharLiteralBuffer<32> UCharLiteralBufferType;
88 diff --git a/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h b/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
89 index 9adc6dfac54db..be94e55af7cf6 100644
90 --- a/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
91 +++ b/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
92 @@ -272,8 +272,8 @@ class CORE_EXPORT ObjectPaintPropertiesSparse : public ObjectPaintProperties {
95 const ParentType& parent,
96 - NodeType::State&& state,
97 - const NodeType::AnimationState& animation_state =
98 + typename NodeType::State&& state,
99 + const typename NodeType::AnimationState& animation_state =
100 NodeType::AnimationState()) {
101 // First, check if we need to add a new node.
102 if (!nodes.HasField(node_id)) {