diff options
26 files changed, 95 insertions, 40 deletions
diff --git a/chromium/BUILD.gn b/chromium/BUILD.gn index 0444154737d..90a4fb24e3c 100644 --- a/chromium/BUILD.gn +++ b/chromium/BUILD.gn @@ -312,7 +312,7 @@ group("gn_all") { ] } - if (is_win && (target_cpu == "x86" || target_cpu == "x64")) { + if (is_win && (target_cpu == "x86" || target_cpu == "x64") && !use_qt) { deps += [ "//chrome/browser/browser_switcher/bho:browser_switcher_dlls" ] } diff --git a/chromium/base/compiler_specific.h b/chromium/base/compiler_specific.h index 60dfbad1de6..81ebaeb1b21 100644 --- a/chromium/base/compiler_specific.h +++ b/chromium/base/compiler_specific.h @@ -200,7 +200,7 @@ // Macro useful for writing cross-platform function pointers. #if !defined(CDECL) -#if defined(OS_WIN) +#if defined(OS_WIN) && (defined(__i386) || defined(__i386__) || defined(_M_IX86)) #define CDECL __cdecl #else // defined(OS_WIN) #define CDECL @@ -266,7 +266,8 @@ #endif #endif -#if defined(__clang__) && __has_attribute(uninitialized) +#if defined(__clang__) +#if __has_attribute(uninitialized) // Attribute "uninitialized" disables -ftrivial-auto-var-init=pattern for // the specified variable. // Library-wide alternative is @@ -300,6 +301,9 @@ #else #define STACK_UNINITIALIZED #endif +#else +#define STACK_UNINITIALIZED +#endif // The ANALYZER_ASSUME_TRUE(bool arg) macro adds compiler-specific hints // to Clang which control what code paths are statically analyzed, diff --git a/chromium/base/export_template.h b/chromium/base/export_template.h index b4fc8fe5fbd..e177fa5b7b9 100644 --- a/chromium/base/export_template.h +++ b/chromium/base/export_template.h @@ -105,6 +105,7 @@ #define EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllexport EXPORT_DLLEXPORT #define EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllimport DEFAULT +#if defined(__clang__) // Sanity checks. // // EXPORT_TEMPLATE_TEST uses the same macro invocation pattern as @@ -143,5 +144,6 @@ EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); #undef EXPORT_TEMPLATE_TEST #undef EXPORT_TEMPLATE_TEST_DEFAULT_DEFAULT #undef EXPORT_TEMPLATE_TEST_EXPORT_DLLEXPORT_EXPORT_DLLEXPORT +#endif #endif // BASE_EXPORT_TEMPLATE_H_ diff --git a/chromium/base/win/wrapped_window_proc.h b/chromium/base/win/wrapped_window_proc.h index 203a8854c18..79dff1e190b 100644 --- a/chromium/base/win/wrapped_window_proc.h +++ b/chromium/base/win/wrapped_window_proc.h @@ -22,7 +22,7 @@ namespace win { // expected behavior for this function is to not return, instead of returning // EXCEPTION_EXECUTE_HANDLER or similar, given that in general we are not // prepared to handle exceptions. -using WinProcExceptionFilter = int __cdecl (*)(EXCEPTION_POINTERS* info); +using WinProcExceptionFilter = int (CDECL *)(EXCEPTION_POINTERS* info); // Sets the filter to deal with exceptions inside a WindowProc. Returns the old // exception filter, if any. diff --git a/chromium/chrome/BUILD.gn b/chromium/chrome/BUILD.gn index f1d3bfe1cf6..d353af0a14e 100644 --- a/chromium/chrome/BUILD.gn +++ b/chromium/chrome/BUILD.gn @@ -159,7 +159,7 @@ if (!is_android && !is_mac) { data_deps += [ "//chrome:chrome(//build/toolchain/linux:ash_clang_x64)" ] } - if (is_win) { + if (is_win && !use_qt) { sources += [ "app/chrome_exe.rc", "app/chrome_exe_main_win.cc", diff --git a/chromium/components/variations/net/BUILD.gn b/chromium/components/variations/net/BUILD.gn index e872d22a232..b63904f26ea 100644 --- a/chromium/components/variations/net/BUILD.gn +++ b/chromium/components/variations/net/BUILD.gn @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/features.gni") + static_library("net") { sources = [ "variations_command_line.cc", @@ -39,6 +41,11 @@ static_library("net") { "//third_party/blink/public/common", ] } + if (use_qt) { + deps -= [ + "//components/variations/field_trial_config", + ] + } } component("omnibox_http_headers") { diff --git a/chromium/components/variations/service/BUILD.gn b/chromium/components/variations/service/BUILD.gn index 963203dbc16..7ceb285026f 100644 --- a/chromium/components/variations/service/BUILD.gn +++ b/chromium/components/variations/service/BUILD.gn @@ -4,6 +4,7 @@ import("//build/buildflag_header.gni") import("//build/config/chrome_build.gni") +import("//build/config/features.gni") declare_args() { # Set to true make a build that disables activation of field trial tests @@ -56,6 +57,15 @@ static_library("service") { "//services/network/public/cpp", "//ui/base", ] + if (use_qt) { + sources -= [ + "variations_field_trial_creator.cc", + "variations_field_trial_creator.h", + ] + deps -= [ + "//components/variations/field_trial_config", + ] + } } source_set("unit_tests") { diff --git a/chromium/content/browser/accessibility/browser_accessibility_state_impl.cc b/chromium/content/browser/accessibility/browser_accessibility_state_impl.cc index 1c037db7c71..ecde83a4d79 100644 --- a/chromium/content/browser/accessibility/browser_accessibility_state_impl.cc +++ b/chromium/content/browser/accessibility/browser_accessibility_state_impl.cc @@ -175,7 +175,7 @@ void BrowserAccessibilityStateImpl::UpdateHistogramsOnUIThread() { UMA_HISTOGRAM_BOOLEAN("Accessibility.ManuallyEnabled", base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kForceRendererAccessibility)); -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(TOOLKIT_QT) UMA_HISTOGRAM_ENUMERATION( "Accessibility.WinHighContrastTheme", ui::NativeTheme::GetInstanceForNativeUi() diff --git a/chromium/content/browser/gpu/peak_gpu_memory_tracker_impl.h b/chromium/content/browser/gpu/peak_gpu_memory_tracker_impl.h index 3d00e11a64d..4599591f32a 100644 --- a/chromium/content/browser/gpu/peak_gpu_memory_tracker_impl.h +++ b/chromium/content/browser/gpu/peak_gpu_memory_tracker_impl.h @@ -40,7 +40,7 @@ class CONTENT_EXPORT PeakGpuMemoryTrackerImpl : public PeakGpuMemoryTracker { // A callback which will be ran after receiving a callback from the // GpuService. For use by tests to synchronize work done on the IO thread. - base::OnceClosure post_gpu_service_callback_for_testing_ = base::DoNothing(); + base::OnceClosure post_gpu_service_callback_for_testing_ = base::DoNothing::Once(); // Provides the unique identifier for each PeakGpuMemoryTrackerImpl. static uint32_t next_sequence_number_; diff --git a/chromium/content/browser/renderer_host/clipboard_host_impl.cc b/chromium/content/browser/renderer_host/clipboard_host_impl.cc index 51f2b84eb6f..3f73f05c108 100644 --- a/chromium/content/browser/renderer_host/clipboard_host_impl.cc +++ b/chromium/content/browser/renderer_host/clipboard_host_impl.cc @@ -168,7 +168,7 @@ void ClipboardHostImpl::IsFormatAvailable(blink::mojom::ClipboardFormat format, result = clipboard_->IsFormatAvailable( ui::ClipboardFormatType::GetPlainTextType(), clipboard_buffer, data_endpoint.get()); -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(TOOLKIT_QT) result |= clipboard_->IsFormatAvailable( ui::ClipboardFormatType::GetPlainTextAType(), clipboard_buffer, data_endpoint.get()); @@ -209,7 +209,7 @@ void ClipboardHostImpl::ReadText(ui::ClipboardBuffer clipboard_buffer, clipboard_buffer, data_dst.get())) { clipboard_->ReadText(clipboard_buffer, data_dst.get(), &result); } else { -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(TOOLKIT_QT) if (clipboard_->IsFormatAvailable( ui::ClipboardFormatType::GetPlainTextAType(), clipboard_buffer, data_dst.get())) { diff --git a/chromium/content/browser/webauth/webauth_request_security_checker.h b/chromium/content/browser/webauth/webauth_request_security_checker.h index d1cb8f730ec..32fa539b067 100644 --- a/chromium/content/browser/webauth/webauth_request_security_checker.h +++ b/chromium/content/browser/webauth/webauth_request_security_checker.h @@ -72,7 +72,7 @@ class CONTENT_EXPORT WebAuthRequestSecurityChecker const GURL& url); protected: - friend class RefCounted<WebAuthRequestSecurityChecker>; + friend class base::RefCounted<WebAuthRequestSecurityChecker>; virtual ~WebAuthRequestSecurityChecker(); private: diff --git a/chromium/gpu/command_buffer/service/wrapped_sk_image.cc b/chromium/gpu/command_buffer/service/wrapped_sk_image.cc index 30c6b0f09d6..696963d4ef1 100644 --- a/chromium/gpu/command_buffer/service/wrapped_sk_image.cc +++ b/chromium/gpu/command_buffer/service/wrapped_sk_image.cc @@ -273,7 +273,11 @@ class WrappedSkImage : public ClearTrackingSharedImageBacking { case GrBackendApi::kVulkan: { GrVkImageInfo image_info; if (backend_texture_.getVkImageInfo(&image_info)) +#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) tracing_id_ = reinterpret_cast<uint64_t>(image_info.fImage); +#else + tracing_id_ = image_info.fImage; +#endif break; } #if BUILDFLAG(SKIA_USE_DAWN) diff --git a/chromium/net/third_party/quiche/src/quic/core/quic_interval_deque.h b/chromium/net/third_party/quiche/src/quic/core/quic_interval_deque.h index d4e82e2d1a2..838e1ed89d0 100644 --- a/chromium/net/third_party/quiche/src/quic/core/quic_interval_deque.h +++ b/chromium/net/third_party/quiche/src/quic/core/quic_interval_deque.h @@ -185,8 +185,8 @@ class QUIC_NO_EXPORT QuicIntervalDeque { ++(*this); return copy; } - reference operator*() { return deque_->container_[index_]; } - reference operator*() const { return deque_->container_[index_]; } + reference operator*() { return *&deque_->container_[index_]; } + reference operator*() const { return *&deque_->container_[index_]; } pointer operator->() { return &deque_->container_[index_]; } bool operator==(const Iterator& rhs) const { return index_ == rhs.index_ && deque_ == rhs.deque_; diff --git a/chromium/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.cc b/chromium/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.cc index 219eacdbd60..f3a58b05260 100644 --- a/chromium/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.cc +++ b/chromium/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.cc @@ -224,6 +224,28 @@ StreamPendingRetransmission QuicStreamSendBuffer::NextPendingRetransmission() return {0, 0}; } +namespace { +template<class ForwardIt, class T, class Compare> +ForwardIt lower_bound(ForwardIt first, ForwardIt last, const T& value, Compare comp) +{ + ForwardIt it = first; + typename std::iterator_traits<ForwardIt>::difference_type count, step; + count = std::distance(first, last); + + while (count > 0) { + step = count / 2; + std::advance(it, step); + if (comp(*it, value)) { + first = ++it; + count -= step + 1; + } + else + count = step; + } + return first; +} +} + bool QuicStreamSendBuffer::FreeMemSlices(QuicStreamOffset start, QuicStreamOffset end) { auto it = interval_deque_.DataBegin(); @@ -236,8 +258,8 @@ bool QuicStreamSendBuffer::FreeMemSlices(QuicStreamOffset start, } if (!it->interval().Contains(start)) { // Slow path that not the earliest outstanding data gets acked. - it = std::lower_bound(interval_deque_.DataBegin(), - interval_deque_.DataEnd(), start, CompareOffset()); + it = lower_bound(interval_deque_.DataBegin(), + interval_deque_.DataEnd(), start, CompareOffset()); } if (it == interval_deque_.DataEnd() || it->slice.empty()) { QUIC_BUG << "Offset " << start << " with iterator offset: " << it->offset diff --git a/chromium/ppapi/cpp/point.h b/chromium/ppapi/cpp/point.h index 028d050e7ad..9d2d87d14e5 100644 --- a/chromium/ppapi/cpp/point.h +++ b/chromium/ppapi/cpp/point.h @@ -291,15 +291,13 @@ class FloatPoint { PP_FloatPoint float_point_; }; -} // namespace pp - /// Determines whether the x and y values of two Points are equal. /// /// @param[in] lhs The Point on the left-hand side of the equation. /// @param[in] rhs The Point on the right-hand side of the equation. /// /// @return true if they are equal, false if unequal. -inline bool operator==(const pp::Point& lhs, const pp::Point& rhs) { +inline bool operator==(const Point& lhs, const Point& rhs) { return lhs.x() == rhs.x() && lhs.y() == rhs.y(); } @@ -310,7 +308,7 @@ inline bool operator==(const pp::Point& lhs, const pp::Point& rhs) { /// /// @return true if the coordinates of lhs are equal to the coordinates /// of rhs, otherwise false. -inline bool operator!=(const pp::Point& lhs, const pp::Point& rhs) { +inline bool operator!=(const Point& lhs, const Point& rhs) { return !(lhs == rhs); } @@ -320,7 +318,7 @@ inline bool operator!=(const pp::Point& lhs, const pp::Point& rhs) { /// @param[in] rhs The Point on the right-hand side of the equation. /// /// @return true if they are equal, false if unequal. -inline bool operator==(const pp::FloatPoint& lhs, const pp::FloatPoint& rhs) { +inline bool operator==(const FloatPoint& lhs, const FloatPoint& rhs) { return lhs.x() == rhs.x() && lhs.y() == rhs.y(); } @@ -331,8 +329,10 @@ inline bool operator==(const pp::FloatPoint& lhs, const pp::FloatPoint& rhs) { /// /// @return true if the coordinates of lhs are equal to the coordinates /// of rhs, otherwise false. -inline bool operator!=(const pp::FloatPoint& lhs, const pp::FloatPoint& rhs) { +inline bool operator!=(const FloatPoint& lhs, const FloatPoint& rhs) { return !(lhs == rhs); } +} // namespace pp + #endif // PPAPI_CPP_POINT_H_ diff --git a/chromium/ppapi/cpp/rect.h b/chromium/ppapi/cpp/rect.h index 7973a83d805..99a3a99db98 100644 --- a/chromium/ppapi/cpp/rect.h +++ b/chromium/ppapi/cpp/rect.h @@ -784,8 +784,6 @@ class FloatRect { PP_FloatRect rect_; }; -} // namespace pp - /// This function determines whether the x, y, width, and height values of two /// rectangles and are equal. /// @@ -793,7 +791,7 @@ class FloatRect { /// @param[in] rhs The <code>Rect</code> on the right-hand side of the equation. /// /// @return true if they are equal, false if unequal. -inline bool operator==(const pp::Rect& lhs, const pp::Rect& rhs) { +inline bool operator==(const Rect& lhs, const Rect& rhs) { return lhs.x() == rhs.x() && lhs.y() == rhs.y() && lhs.width() == rhs.width() && @@ -807,7 +805,7 @@ inline bool operator==(const pp::Rect& lhs, const pp::Rect& rhs) { /// equation. /// /// @return true if the given Rects are equal, otherwise false. -inline bool operator!=(const pp::Rect& lhs, const pp::Rect& rhs) { +inline bool operator!=(const Rect& lhs, const Rect& rhs) { return !(lhs == rhs); } @@ -820,7 +818,7 @@ inline bool operator!=(const pp::Rect& lhs, const pp::Rect& rhs) { /// equation. /// /// @return true if they are equal, false if unequal. -inline bool operator==(const pp::FloatRect& lhs, const pp::FloatRect& rhs) { +inline bool operator==(const FloatRect& lhs, const FloatRect& rhs) { return lhs.x() == rhs.x() && lhs.y() == rhs.y() && lhs.width() == rhs.width() && @@ -835,9 +833,11 @@ inline bool operator==(const pp::FloatRect& lhs, const pp::FloatRect& rhs) { /// equation. /// /// @return true if the given Rects are equal, otherwise false. -inline bool operator!=(const pp::FloatRect& lhs, const pp::FloatRect& rhs) { +inline bool operator!=(const FloatRect& lhs, const FloatRect& rhs) { return !(lhs == rhs); } +} // namespace pp + #endif diff --git a/chromium/ppapi/cpp/size.h b/chromium/ppapi/cpp/size.h index e96b598b3f8..69e836a294b 100644 --- a/chromium/ppapi/cpp/size.h +++ b/chromium/ppapi/cpp/size.h @@ -279,8 +279,6 @@ class FloatSize { PP_FloatSize size_; }; -} // namespace pp - /// This function determines whether the width and height values of two sizes /// are equal. /// @@ -289,7 +287,7 @@ class FloatSize { /// equation. /// /// @return true if they are equal, false if unequal. -inline bool operator==(const pp::Size& lhs, const pp::Size& rhs) { +inline bool operator==(const Size& lhs, const Size& rhs) { return lhs.width() == rhs.width() && lhs.height() == rhs.height(); } @@ -300,7 +298,7 @@ inline bool operator==(const pp::Size& lhs, const pp::Size& rhs) { /// /// @return true if the <code>Size</code> of lhs are equal to the /// <code>Size</code> of rhs, otherwise false. -inline bool operator!=(const pp::Size& lhs, const pp::Size& rhs) { +inline bool operator!=(const Size& lhs, const Size& rhs) { return !(lhs == rhs); } @@ -313,7 +311,7 @@ inline bool operator!=(const pp::Size& lhs, const pp::Size& rhs) { /// equation. /// /// @return true if they are equal, false if unequal. -inline bool operator==(const pp::FloatSize& lhs, const pp::FloatSize& rhs) { +inline bool operator==(const FloatSize& lhs, const FloatSize& rhs) { return lhs.width() == rhs.width() && lhs.height() == rhs.height(); } @@ -326,9 +324,11 @@ inline bool operator==(const pp::FloatSize& lhs, const pp::FloatSize& rhs) { /// /// @return true if the <code>FloatSize</code> of lhs are equal to the /// <code>FloatSize</code> of rhs, otherwise false. -inline bool operator!=(const pp::FloatSize& lhs, const pp::FloatSize& rhs) { +inline bool operator!=(const FloatSize& lhs, const FloatSize& rhs) { return !(lhs == rhs); } +} // namespace pp + #endif // PPAPI_CPP_SIZE_H_ diff --git a/chromium/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h b/chromium/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h index 5a39f8ae2fd..511c022b316 100644 --- a/chromium/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h +++ b/chromium/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h @@ -370,7 +370,7 @@ struct NativeValueTraits<IDLByteStringBaseV2<mode>> v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exception_state) { - if (value->IsString() and value.As<v8::String>()->ContainsOnlyOneByte()) + if (value->IsString() && value.As<v8::String>()->ContainsOnlyOneByte()) return bindings::NativeValueTraitsStringAdapter(value.As<v8::String>()); if (value->IsInt32()) { return bindings::NativeValueTraitsStringAdapter( diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/origin_trials.cc.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/origin_trials.cc.tmpl index 6cbd0173460..d810e0574ef 100644 --- a/chromium/third_party/blink/renderer/build/scripts/templates/origin_trials.cc.tmpl +++ b/chromium/third_party/blink/renderer/build/scripts/templates/origin_trials.cc.tmpl @@ -74,7 +74,7 @@ base::span<const OriginTrialFeature> origin_trials::FeaturesForTrial( std::begin(kTrialToFeaturesMap), std::end(kTrialToFeaturesMap), [&](const auto& entry) { return entry.trial_name == trial_name; }); DCHECK(it != std::end(kTrialToFeaturesMap)); - return {it->features.begin(), it->feature_count}; + return {it->features.data(), it->feature_count}; } base::span<const OriginTrialFeature> origin_trials::GetImpliedFeatures( diff --git a/chromium/third_party/blink/renderer/core/layout/layout_shift_tracker.cc b/chromium/third_party/blink/renderer/core/layout/layout_shift_tracker.cc index 560b7f61f2b..69e02e21561 100644 --- a/chromium/third_party/blink/renderer/core/layout/layout_shift_tracker.cc +++ b/chromium/third_party/blink/renderer/core/layout/layout_shift_tracker.cc @@ -739,7 +739,7 @@ std::unique_ptr<TracedValue> LayoutShiftTracker::PerFrameTraceData( } void LayoutShiftTracker::AttributionsToTracedValue(TracedValue& value) const { - const Attribution* it = attributions_.begin(); + auto it = attributions_.begin(); if (!*it) return; diff --git a/chromium/third_party/blink/renderer/core/page/scrolling/scroll_state.cc b/chromium/third_party/blink/renderer/core/page/scrolling/scroll_state.cc index 728e964d684..5fe784f0c28 100644 --- a/chromium/third_party/blink/renderer/core/page/scrolling/scroll_state.cc +++ b/chromium/third_party/blink/renderer/core/page/scrolling/scroll_state.cc @@ -41,7 +41,7 @@ ScrollState* ScrollState::Create(ScrollStateInit* init) { scroll_state_data->from_user_input = init->fromUserInput(); scroll_state_data->is_direct_manipulation = init->isDirectManipulation(); scroll_state_data->delta_granularity = - static_cast<ScrollGranularity>(init->deltaGranularity()); + static_cast<ScrollGranularity>(int(init->deltaGranularity())); ScrollState* scroll_state = MakeGarbageCollected<ScrollState>(std::move(scroll_state_data)); return scroll_state; diff --git a/chromium/third_party/blink/renderer/platform/fonts/opentype/open_type_math_support.cc b/chromium/third_party/blink/renderer/platform/fonts/opentype/open_type_math_support.cc index 534c6d6885d..7f7b9525cda 100644 --- a/chromium/third_party/blink/renderer/platform/fonts/opentype/open_type_math_support.cc +++ b/chromium/third_party/blink/renderer/platform/fonts/opentype/open_type_math_support.cc @@ -23,7 +23,7 @@ float HarfBuzzUnitsToFloat(hb_position_t value) { // Latin Modern, STIX Two, XITS, Asana, Deja Vu, Libertinus and TeX Gyre fonts // provide at most 13 size variant and 5 assembly parts. // See https://chromium-review.googlesource.com/c/chromium/src/+/2074678 -unsigned kMaxHarfBuzzRecords = 20; +constexpr unsigned kMaxHarfBuzzRecords = 20; hb_direction_t HarfBuzzDirection( blink::OpenTypeMathStretchData::StretchAxis stretch_axis) { diff --git a/chromium/third_party/blink/renderer/platform/wtf/hash_traits.h b/chromium/third_party/blink/renderer/platform/wtf/hash_traits.h index eb836152181..fe6b410ea5e 100644 --- a/chromium/third_party/blink/renderer/platform/wtf/hash_traits.h +++ b/chromium/third_party/blink/renderer/platform/wtf/hash_traits.h @@ -205,7 +205,7 @@ struct HashTraits<P*> : GenericHashTraits<P*> { static void ConstructDeletedValue(P*& slot, bool) { slot = reinterpret_cast<P*>(-1); } - static bool IsDeletedValue(const P* value) { + static bool IsDeletedValue(std::add_const_t<P>* value) { return value == reinterpret_cast<P*>(-1); } }; diff --git a/chromium/third_party/perfetto/include/perfetto/protozero/proto_utils.h b/chromium/third_party/perfetto/include/perfetto/protozero/proto_utils.h index df7386d8f6a..543bfdbf9ab 100644 --- a/chromium/third_party/perfetto/include/perfetto/protozero/proto_utils.h +++ b/chromium/third_party/perfetto/include/perfetto/protozero/proto_utils.h @@ -161,10 +161,11 @@ inline typename std::make_unsigned<T>::type ZigZagEncode(T value) { // Proto types: sint64, sint32. template <typename T> inline typename std::make_signed<T>::type ZigZagDecode(T value) { + using SignedType = typename std::make_signed<T>::type; using UnsignedType = typename std::make_unsigned<T>::type; using SignedType = typename std::make_signed<T>::type; auto u_value = static_cast<UnsignedType>(value); - auto mask = static_cast<UnsignedType>(-static_cast<SignedType>(u_value & 1)); + auto mask = static_cast<UnsignedType>(-static_cast<SignedType>(u_value & 1U)); return static_cast<SignedType>((u_value >> 1) ^ mask); } diff --git a/chromium/ui/base/clipboard/clipboard_format_type.h b/chromium/ui/base/clipboard/clipboard_format_type.h index 07be3b32f1e..7ff063a5bab 100644 --- a/chromium/ui/base/clipboard/clipboard_format_type.h +++ b/chromium/ui/base/clipboard/clipboard_format_type.h @@ -65,7 +65,7 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD_TYPES) ClipboardFormatType { static const ClipboardFormatType& GetBitmapType(); static const ClipboardFormatType& GetWebCustomDataType(); -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(TOOLKIT_QT) // ANSI formats. Only Windows differentiates between ANSI and UNICODE formats // in ClipboardFormatType. Reference: // https://docs.microsoft.com/en-us/windows/win32/learnwin32/working-with-strings diff --git a/chromium/ui/color/color_id_macros.inc b/chromium/ui/color/color_id_macros.inc index 112e49bb46b..aee8b5b0678 100644 --- a/chromium/ui/color/color_id_macros.inc +++ b/chromium/ui/color/color_id_macros.inc @@ -26,7 +26,12 @@ #define E3(enum_name, old_enum_name, enum_value) D2(enum_name, enum_value) #define E_CPONLY(...) E(__VA_ARGS__) #define GET_E(_1, _2, _3, macro_name, ...) macro_name +#ifndef __GNUC__ +#define EXPAND_E(x) x +#define E(...) EXPAND_E(GET_E(__VA_ARGS__, E3, E2, E1)(__VA_ARGS__)), +#else #define E(...) GET_E(__VA_ARGS__, E3, E2, E1)(__VA_ARGS__), +#endif #else #undef D1 #undef D2 |