From 210019ce23ea273a13c77fedb3e674a47c67214a Mon Sep 17 00:00:00 2001 From: Max Ihlenfeldt Date: Mon, 12 Jun 2023 16:52:44 +0000 Subject: [PATCH 13/33] [meta-browser] Add missing "typename"s This adds some `typename`s in locations where they are needed in older versions of clang (probably < 16). Upstream-Status: Inappropriate [specific to older versions of clang] Signed-off-by: Max Ihlenfeldt --- .../download/bubble/download_bubble_update_service.cc | 6 +++--- components/optimization_guide/core/tflite_model_executor.h | 2 +- .../browser/web_ui_browser_interface_broker_registry.h | 6 +++--- .../core/html/parser/html_document_parser_fastpath.cc | 2 +- .../renderer/core/paint/object_paint_properties_sparse.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chrome/browser/download/bubble/download_bubble_update_service.cc b/chrome/browser/download/bubble/download_bubble_update_service.cc index 93ec91e38b9b3..acd25f25d1579 100644 --- a/chrome/browser/download/bubble/download_bubble_update_service.cc +++ b/chrome/browser/download/bubble/download_bubble_update_service.cc @@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item) { // Helper to get an iterator to the last element in the cache. The cache // must not be empty. template -SortedItems::const_iterator GetLastIter(const SortedItems& cache) { +typename SortedItems::const_iterator GetLastIter(const SortedItems& cache) { CHECK(!cache.empty()); auto it = cache.end(); return std::prev(it); @@ -967,9 +967,9 @@ bool DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheImpl( } template -SortedItems::iterator +typename SortedItems::iterator DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter( - SortedItems::iterator iter, + typename SortedItems::iterator iter, SortedItems& cache, IterMap& iter_map) { CHECK(iter != cache.end()); diff --git a/components/optimization_guide/core/tflite_model_executor.h b/components/optimization_guide/core/tflite_model_executor.h index bbb5208aae904..027ae8e101634 100644 --- a/components/optimization_guide/core/tflite_model_executor.h +++ b/components/optimization_guide/core/tflite_model_executor.h @@ -240,7 +240,7 @@ class TFLiteModelExecutor : public ModelExecutor { void SendForBatchExecution( BatchExecutionCallback callback_on_complete, base::TimeTicks start_time, - ModelExecutor::ConstRefInputVector inputs) + typename ModelExecutor::ConstRefInputVector inputs) override { DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); diff --git a/content/public/browser/web_ui_browser_interface_broker_registry.h b/content/public/browser/web_ui_browser_interface_broker_registry.h index 0a419be66b325..7253c9680f722 100644 --- a/content/public/browser/web_ui_browser_interface_broker_registry.h +++ b/content/public/browser/web_ui_browser_interface_broker_registry.h @@ -127,10 +127,10 @@ class CONTENT_EXPORT WebUIBrowserInterfaceBrokerRegistry { // // TODO(crbug.com/1407936): Point to WebUIJsBridge documentation. template - JsBridgeTraits::BinderInitializer& ForWebUIWithJsBridge() { + typename JsBridgeTraits::BinderInitializer& ForWebUIWithJsBridge() { using Traits = JsBridgeTraits; - using Interface = Traits::Interface; - using JsBridgeBinderInitializer = Traits::BinderInitializer; + using Interface = typename Traits::Interface; + using JsBridgeBinderInitializer = typename Traits::BinderInitializer; // WebUIController::GetType() requires an instantiated WebUIController // (because it's a virtual method and can't be static). Here we only have 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 index 4b5b6701a591b..59e1262a06e37 100644 --- 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 @@ -169,7 +169,7 @@ class HTMLFastPathParser { using Span = base::span; using USpan = base::span; // 32 matches that used by HTMLToken::Attribute. - typedef std::conditional, + typedef typename std::conditional, UCharLiteralBuffer<32>, LCharLiteralBuffer<32>>::type LiteralBufferType; typedef UCharLiteralBuffer<32> UCharLiteralBufferType; 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 index 9adc6dfac54db..be94e55af7cf6 100644 --- a/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h +++ b/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h @@ -272,8 +272,8 @@ class CORE_EXPORT ObjectPaintPropertiesSparse : public ObjectPaintProperties { NodeList& nodes, NodeId node_id, const ParentType& parent, - NodeType::State&& state, - const NodeType::AnimationState& animation_state = + typename NodeType::State&& state, + const typename NodeType::AnimationState& animation_state = NodeType::AnimationState()) { // First, check if we need to add a new node. if (!nodes.HasField(node_id)) { -- 2.42.1