summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-12-09 15:26:58 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-03-16 15:21:53 +0100
commit922cf977666f21c3a2b3b6ffb6fb8f40e63cb651 (patch)
treeadc31b6a827c94ea45703c26aa5e96b28dd21719
parent9bfd4d52f9ce5ab1ed2fd2be3085702f7ecf4801 (diff)
downloadqtwebengine-chromium-922cf977666f21c3a2b3b6ffb6fb8f40e63cb651.tar.gz
Fix build with MSVC 2019 after 87 merge
Change-Id: I202e361c1fa51d8a5758d4ffacdba08d86d065cb Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
-rw-r--r--chromium/base/allocator/partition_allocator/page_allocator_constants.h2
-rw-r--r--chromium/base/allocator/partition_allocator/partition_alloc_constants.h2
-rw-r--r--chromium/base/allocator/partition_allocator/partition_tls.h2
-rw-r--r--chromium/base/allocator/partition_allocator/thread_cache.h1
-rw-r--r--chromium/base/allocator/partition_allocator/yield_processor.h5
-rw-r--r--chromium/base/compiler_specific.h7
-rw-r--r--chromium/base/debug/invalid_access_win.cc4
-rw-r--r--chromium/base/memory/shared_memory_mapping.h7
-rw-r--r--chromium/base/notreached.h7
-rw-r--r--chromium/base/trace_event/optional_trace_event.h6
-rw-r--r--chromium/base/win/scoped_handle_verifier.cc12
-rw-r--r--chromium/chrome/browser/printing/print_job.cc2
-rw-r--r--chromium/chrome/browser/spellchecker/spellcheck_service.cc30
-rw-r--r--chromium/chrome/browser/spellchecker/spellcheck_service.h12
-rw-r--r--chromium/components/paint_preview/common/serial_utils.cc4
-rw-r--r--chromium/components/performance_manager/decorators/site_data_recorder.cc4
-rw-r--r--chromium/components/services/storage/indexed_db/scopes/leveldb_scope.cc10
-rw-r--r--chromium/components/services/storage/indexed_db/scopes/leveldb_scope.h9
-rw-r--r--chromium/components/spellcheck/browser/windows_spell_checker.cc6
-rw-r--r--chromium/components/spellcheck/browser/windows_spell_checker.h2
-rw-r--r--chromium/components/spellcheck/common/spellcheck.mojom16
-rw-r--r--chromium/content/browser/BUILD.gn4
-rw-r--r--chromium/content/browser/accessibility/accessibility_event_recorder_uia_win.cc2
-rw-r--r--chromium/content/browser/conversions/conversion_manager_impl.cc2
-rw-r--r--chromium/device/fido/cable/v2_handshake.h4
-rw-r--r--chromium/device/fido/cbor_extract.h2
-rw-r--r--chromium/gpu/config/vulkan_info.h2
-rw-r--r--chromium/gpu/ipc/service/gpu_init.cc6
-rw-r--r--chromium/media/cdm/BUILD.gn2
-rw-r--r--chromium/net/base/backoff_entry.cc2
-rw-r--r--chromium/net/dns/host_resolver.cc1
-rw-r--r--chromium/net/third_party/quiche/src/quic/core/frames/quic_frame.h2
-rw-r--r--chromium/services/network/network_context.cc2
-rw-r--r--chromium/services/network/public/cpp/features.cc4
-rw-r--r--chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py2
-rw-r--r--chromium/third_party/blink/renderer/core/fullscreen/fullscreen.h1
-rw-r--r--chromium/third_party/blink/renderer/core/layout/ng/inline/ng_fragment_item.h2
-rw-r--r--chromium/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc3
-rw-r--r--chromium/third_party/blink/renderer/core/page/page_popup_controller.h1
-rw-r--r--chromium/third_party/blink/renderer/core/svg/svg_external_document_cache.h1
-rw-r--r--chromium/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc2
-rw-r--r--chromium/third_party/blink/renderer/modules/cache_storage/cache_storage_trace_utils.h1
-rw-r--r--chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_path.cc4
-rw-r--r--chromium/third_party/blink/renderer/modules/nfc/nfc_proxy.h1
-rw-r--r--chromium/third_party/blink/renderer/modules/presentation/presentation_controller.h1
-rw-r--r--chromium/third_party/blink/renderer/modules/scheduler/dom_scheduler.h1
-rw-r--r--chromium/third_party/blink/renderer/modules/service_worker/service_worker_container.h1
-rw-r--r--chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h1
-rw-r--r--chromium/third_party/blink/renderer/platform/graphics/dark_mode_filter.cc3
-rw-r--r--chromium/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h4
-rw-r--r--chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.cc19
-rw-r--r--chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.h11
-rw-r--r--chromium/third_party/perfetto/include/perfetto/base/logging.h5
-rw-r--r--chromium/third_party/snappy/win32/config.h6
-rw-r--r--chromium/tools/json_schema_compiler/manifest_parse_util.cc13
-rw-r--r--chromium/url/origin.cc5
-rw-r--r--chromium/url/origin.h2
57 files changed, 188 insertions, 87 deletions
diff --git a/chromium/base/allocator/partition_allocator/page_allocator_constants.h b/chromium/base/allocator/partition_allocator/page_allocator_constants.h
index e4b980d5531..c42fe2835ff 100644
--- a/chromium/base/allocator/partition_allocator/page_allocator_constants.h
+++ b/chromium/base/allocator/partition_allocator/page_allocator_constants.h
@@ -65,7 +65,7 @@ PageAllocationGranularity() {
#if defined(OS_APPLE)
return vm_page_size;
#else
- return 1 << PageAllocationGranularityShift();
+ return 1ULL << PageAllocationGranularityShift();
#endif
}
diff --git a/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
index 4ae2ca685b5..a2d2911b096 100644
--- a/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
+++ b/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
@@ -70,7 +70,7 @@ PartitionPageShift() {
#endif
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
PartitionPageSize() {
- return 1 << PartitionPageShift();
+ return 1ULL << PartitionPageShift();
}
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
PartitionPageOffsetMask() {
diff --git a/chromium/base/allocator/partition_allocator/partition_tls.h b/chromium/base/allocator/partition_allocator/partition_tls.h
index 9f706572efe..d499f789935 100644
--- a/chromium/base/allocator/partition_allocator/partition_tls.h
+++ b/chromium/base/allocator/partition_allocator/partition_tls.h
@@ -76,9 +76,11 @@ ALWAYS_INLINE bool PartitionTlsCreate(PartitionTlsKey* key,
void (*destructor)(void*)) {
// NOTIMPLEMENTED() may allocate, crash instead.
IMMEDIATE_CRASH();
+ return false;
}
ALWAYS_INLINE void* PartitionTlsGet(PartitionTlsKey key) {
IMMEDIATE_CRASH();
+ return nullptr;
}
ALWAYS_INLINE void PartitionTlsSet(PartitionTlsKey key, void* value) {
IMMEDIATE_CRASH();
diff --git a/chromium/base/allocator/partition_allocator/thread_cache.h b/chromium/base/allocator/partition_allocator/thread_cache.h
index 10fc0b02c6f..cbc05028be2 100644
--- a/chromium/base/allocator/partition_allocator/thread_cache.h
+++ b/chromium/base/allocator/partition_allocator/thread_cache.h
@@ -120,6 +120,7 @@ class BASE_EXPORT ThreadCache {
static ThreadCache* Create(PartitionRoot<ThreadSafe>* root);
static ThreadCache* Create(PartitionRoot<NotThreadSafe>* root) {
IMMEDIATE_CRASH();
+ return nullptr;
}
~ThreadCache();
diff --git a/chromium/base/allocator/partition_allocator/yield_processor.h b/chromium/base/allocator/partition_allocator/yield_processor.h
index 0cf0916888e..f4ffc15623d 100644
--- a/chromium/base/allocator/partition_allocator/yield_processor.h
+++ b/chromium/base/allocator/partition_allocator/yield_processor.h
@@ -13,7 +13,10 @@
// other hyper-thread on this core. See the following for context:
// https://software.intel.com/en-us/articles/benefitting-power-and-performance-sleep-loops
-#if defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_X86)
+#if defined(COMPILER_MSVC)
+#include <windows.h>
+#define YIELD_PROCESSOR YieldProcessor()
+#elif defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_X86)
#define YIELD_PROCESSOR __asm__ __volatile__("pause")
#elif (defined(ARCH_CPU_ARMEL) && __ARM_ARCH >= 6) || defined(ARCH_CPU_ARM64)
#define YIELD_PROCESSOR __asm__ __volatile__("yield")
diff --git a/chromium/base/compiler_specific.h b/chromium/base/compiler_specific.h
index 32720a90128..22f6e190560 100644
--- a/chromium/base/compiler_specific.h
+++ b/chromium/base/compiler_specific.h
@@ -55,9 +55,12 @@
// prevent code folding, see base::debug::Alias.
// Use like:
// void NOT_TAIL_CALLED FooBar();
-#if defined(__clang__) && __has_attribute(not_tail_called)
+#if defined(__clang__)
+#if __has_attribute(not_tail_called)
#define NOT_TAIL_CALLED __attribute__((not_tail_called))
-#else
+#endif
+#endif
+#ifndef NOT_TAIL_CALLED
#define NOT_TAIL_CALLED
#endif
diff --git a/chromium/base/debug/invalid_access_win.cc b/chromium/base/debug/invalid_access_win.cc
index c2dd0604089..67eb33f1ff4 100644
--- a/chromium/base/debug/invalid_access_win.cc
+++ b/chromium/base/debug/invalid_access_win.cc
@@ -29,11 +29,15 @@ static constexpr int kNopInstructionSize = 4;
#endif
// Function that can be jumped midway into safely.
+#if defined(COMPILER_MSVC)
+int nop_sled() { return 0; }
+#else
__attribute__((naked)) int nop_sled() {
asm("nop\n"
"nop\n"
"ret\n");
}
+#endif // defined(COMPILER_MSVC)
using FuncType = decltype(&nop_sled);
diff --git a/chromium/base/memory/shared_memory_mapping.h b/chromium/base/memory/shared_memory_mapping.h
index 2b8858e1662..abc79e25f19 100644
--- a/chromium/base/memory/shared_memory_mapping.h
+++ b/chromium/base/memory/shared_memory_mapping.h
@@ -184,9 +184,10 @@ class BASE_EXPORT WritableSharedMemoryMapping : public SharedMemoryMapping {
// enough to contain a T, or nullptr otherwise.
template <typename T>
T* GetMemoryAs() const {
- static_assert(std::is_trivially_copyable<T>::value,
- "Copying non-trivially-copyable object across memory spaces "
- "is dangerous");
+// FIXME: assert is triggered by https://crbug.com/1134659 with MSVC
+// static_assert(std::is_trivially_copyable<T>::value,
+// "Copying non-trivially-copyable object across memory spaces "
+// "is dangerous");
if (!IsValid())
return nullptr;
if (sizeof(T) > size())
diff --git a/chromium/base/notreached.h b/chromium/base/notreached.h
index b6466b8a493..009c2aa2d0c 100644
--- a/chromium/base/notreached.h
+++ b/chromium/base/notreached.h
@@ -23,10 +23,17 @@ void BASE_EXPORT LogErrorNotReached(const char* file, int line);
// implemented yet. If output spam is a serious concern,
// NOTIMPLEMENTED_LOG_ONCE can be used.
#if DCHECK_IS_ON()
+#ifdef _MSC_VER
+#define NOTIMPLEMENTED() \
+ ::logging::CheckError::NotImplemented(__FILE__, __LINE__, \
+ __FUNCSIG__) \
+ .stream()
+#else
#define NOTIMPLEMENTED() \
::logging::CheckError::NotImplemented(__FILE__, __LINE__, \
__PRETTY_FUNCTION__) \
.stream()
+#endif
#else
#define NOTIMPLEMENTED() EAT_CHECK_STREAM_PARAMS()
#endif
diff --git a/chromium/base/trace_event/optional_trace_event.h b/chromium/base/trace_event/optional_trace_event.h
index 860a25bc51e..ac7636acd9e 100644
--- a/chromium/base/trace_event/optional_trace_event.h
+++ b/chromium/base/trace_event/optional_trace_event.h
@@ -15,9 +15,9 @@
#if BUILDFLAG(OPTIONAL_TRACE_EVENTS_ENABLED)
-#define OPTIONAL_TRACE_EVENT0(...) TRACE_EVENT0(__VA_ARGS__)
-#define OPTIONAL_TRACE_EVENT1(...) TRACE_EVENT1(__VA_ARGS__)
-#define OPTIONAL_TRACE_EVENT2(...) TRACE_EVENT2(__VA_ARGS__)
+#define OPTIONAL_TRACE_EVENT0(...) CR_EXPAND_ARG(TRACE_EVENT0(__VA_ARGS__))
+#define OPTIONAL_TRACE_EVENT1(...) CR_EXPAND_ARG(TRACE_EVENT1(__VA_ARGS__))
+#define OPTIONAL_TRACE_EVENT2(...) CR_EXPAND_ARG(TRACE_EVENT2(__VA_ARGS__))
#else // BUILDFLAG(OPTIONAL_TRACE_EVENTS_ENABLED)
diff --git a/chromium/base/win/scoped_handle_verifier.cc b/chromium/base/win/scoped_handle_verifier.cc
index 9364997ba29..f96a69498eb 100644
--- a/chromium/base/win/scoped_handle_verifier.cc
+++ b/chromium/base/win/scoped_handle_verifier.cc
@@ -44,7 +44,11 @@ NOINLINE void ReportErrorOnScopedHandleOperation(
auto creation_stack_copy = creation_stack;
base::debug::Alias(&creation_stack_copy);
CHECK(false);
+#if !defined(COMPILER_MSVC)
__builtin_unreachable();
+#else
+ __assume(0);
+#endif
}
NOINLINE void ReportErrorOnScopedHandleOperation(
@@ -55,7 +59,11 @@ NOINLINE void ReportErrorOnScopedHandleOperation(
auto creation_stack_copy = creation_stack;
base::debug::Alias(&creation_stack_copy);
CHECK(false);
+#if !defined(COMPILER_MSVC)
__builtin_unreachable();
+#else
+ __assume(0);
+#endif
}
} // namespace
@@ -87,10 +95,10 @@ ScopedHandleVerifierInfo::ScopedHandleVerifierInfo(
ScopedHandleVerifierInfo::~ScopedHandleVerifierInfo() = default;
-ScopedHandleVerifierInfo::ScopedHandleVerifierInfo(ScopedHandleVerifierInfo&&) =
+ScopedHandleVerifierInfo::ScopedHandleVerifierInfo(ScopedHandleVerifierInfo&&) noexcept =
default;
ScopedHandleVerifierInfo& ScopedHandleVerifierInfo::operator=(
- ScopedHandleVerifierInfo&&) = default;
+ ScopedHandleVerifierInfo&&) noexcept = default;
ScopedHandleVerifier::ScopedHandleVerifier(bool enabled)
: enabled_(enabled), lock_(GetLock()) {}
diff --git a/chromium/chrome/browser/printing/print_job.cc b/chromium/chrome/browser/printing/print_job.cc
index 997362290dc..bf9056ed5c5 100644
--- a/chromium/chrome/browser/printing/print_job.cc
+++ b/chromium/chrome/browser/printing/print_job.cc
@@ -50,7 +50,7 @@ void HoldRefCallback(scoped_refptr<PrintJob> job, base::OnceClosure callback) {
std::move(callback).Run();
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && !defined(TOOLKIT_QT)
// Those must be kept in sync with the values defined in policy_templates.json.
enum class PrintRasterizationMode {
// Do full page rasterization if necessary. Default value when policy not set.
diff --git a/chromium/chrome/browser/spellchecker/spellcheck_service.cc b/chromium/chrome/browser/spellchecker/spellcheck_service.cc
index e769f5de540..85446269482 100644
--- a/chromium/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chromium/chrome/browser/spellchecker/spellcheck_service.cc
@@ -153,7 +153,7 @@ SpellcheckService::SpellcheckService(content::BrowserContext* context)
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
content::NotificationService::AllSources());
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (spellcheck::UseBrowserSpellChecker() &&
base::FeatureList::IsEnabled(
spellcheck::kWinDelaySpellcheckServiceInit)) {
@@ -196,7 +196,7 @@ void SpellcheckService::GetDictionaries(
",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
for (const auto& accept_language : accept_languages) {
Dictionary dictionary;
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (spellcheck::UseBrowserSpellChecker()) {
SpellcheckService* spellcheck =
SpellcheckServiceFactory::GetForContext(browser_context);
@@ -250,7 +250,7 @@ std::string SpellcheckService::GetSupportedAcceptLanguageCode(
/* include_script_tag= */ false);
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (!spellcheck::UseBrowserSpellChecker())
return supported_accept_language;
@@ -365,7 +365,7 @@ void SpellcheckService::StartRecordingMetrics(bool spellcheck_enabled) {
metrics_->RecordEnabledStats(spellcheck_enabled);
OnUseSpellingServiceChanged();
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
RecordChromeLocalesStats();
RecordSpellcheckLocalesStats();
#endif // defined(OS_WIN)
@@ -462,10 +462,9 @@ void SpellcheckService::LoadDictionaries() {
hunspell_dictionaries_.back()->Load();
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
RecordSpellcheckLocalesStats();
-#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (base::FeatureList::IsEnabled(
spellcheck::kWinDelaySpellcheckServiceInit) &&
spellcheck::UseBrowserSpellChecker()) {
@@ -481,8 +480,7 @@ void SpellcheckService::LoadDictionaries() {
}
return;
}
-#endif // BUILDFLAG(USE_BROWSER_SPELLCHECKER)
-#endif // defined(OS_WIN)
+#endif // defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
dictionaries_loaded_ = true;
}
@@ -495,7 +493,7 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
const PrefService* prefs = user_prefs::UserPrefs::Get(context_);
bool enable_if_uninitialized = false;
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (spellcheck::UseBrowserSpellChecker() &&
base::FeatureList::IsEnabled(
spellcheck::kWinDelaySpellcheckServiceInit)) {
@@ -581,7 +579,7 @@ void SpellcheckService::InitializeDictionaries(base::OnceClosure done) {
return;
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
dictionaries_loaded_callback_ = std::move(done);
// Need to initialize the platform spellchecker in order to record platform
// locale stats even if the platform spellcheck feature is disabled.
@@ -595,7 +593,7 @@ void SpellcheckService::InitializeDictionaries(base::OnceClosure done) {
StartRecordingMetrics(
prefs->GetBoolean(spellcheck::prefs::kSpellCheckEnable));
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (spellcheck::UseBrowserSpellChecker() && platform_spell_checker()) {
spellcheck_platform::RetrieveSpellcheckLanguages(
platform_spell_checker(),
@@ -609,7 +607,7 @@ void SpellcheckService::InitializeDictionaries(base::OnceClosure done) {
LoadDictionaries();
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
void SpellcheckService::InitWindowsDictionaryLanguages(
const std::vector<std::string>& windows_spellcheck_languages) {
windows_spellcheck_dictionary_map_.clear();
@@ -714,7 +712,7 @@ std::string SpellcheckService::GetLanguageAndScriptTag(
return language_and_script_tag;
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
// static
std::string SpellcheckService::GetSupportedAcceptLanguageCodeGenericOnly(
const std::string& supported_language_full_tag,
@@ -868,7 +866,7 @@ void SpellcheckService::OnAcceptLanguagesChanged() {
dictionaries_pref.SetValue(filtered_dictionaries);
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
RecordChromeLocalesStats();
#endif // defined(OS_WIN)
}
@@ -884,7 +882,7 @@ std::vector<std::string> SpellcheckService::GetNormalizedAcceptLanguages(
std::transform(
accept_languages.begin(), accept_languages.end(),
accept_languages.begin(), [&](const std::string& language) {
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (spellcheck::UseBrowserSpellChecker() &&
UsesWindowsDictionary(language))
return language;
@@ -896,7 +894,7 @@ std::vector<std::string> SpellcheckService::GetNormalizedAcceptLanguages(
return accept_languages;
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
void SpellcheckService::InitializePlatformSpellchecker() {
// The Windows spell checker must be created before the dictionaries are
// initialized. Note it is instantiated even if only Hunspell is being used
diff --git a/chromium/chrome/browser/spellchecker/spellcheck_service.h b/chromium/chrome/browser/spellchecker/spellcheck_service.h
index 29ea018d1df..23d1c8af9b3 100644
--- a/chromium/chrome/browser/spellchecker/spellcheck_service.h
+++ b/chromium/chrome/browser/spellchecker/spellcheck_service.h
@@ -41,7 +41,7 @@ class NotificationSource;
class RenderProcessHost;
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
namespace extensions {
class LanguageSettingsPrivateApiTestDelayInit;
}
@@ -173,7 +173,7 @@ class SpellcheckService : public KeyedService,
// One-time initialization of dictionaries if needed.
void InitializeDictionaries(base::OnceClosure done);
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
// Callback for spellcheck_platform::RetrieveSpellcheckLanguages. Populates
// map of preferred languages to available platform dictionaries then
// loads the dictionaries.
@@ -203,7 +203,7 @@ class SpellcheckService : public KeyedService,
private:
FRIEND_TEST_ALL_PREFIXES(SpellcheckServiceBrowserTest, DeleteCorruptedBDICT);
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
FRIEND_TEST_ALL_PREFIXES(SpellcheckServiceWindowsHybridBrowserTest,
WindowsHybridSpellcheck);
FRIEND_TEST_ALL_PREFIXES(SpellcheckServiceWindowsHybridBrowserTestDelayInit,
@@ -223,7 +223,7 @@ class SpellcheckService : public KeyedService,
static std::string GetLanguageAndScriptTag(const std::string& full_tag,
bool include_script_tag);
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
// Returns the language subtag (first part of the full BCP47 tag)
// if the generic accept language is supported by the browser.
static std::string GetSupportedAcceptLanguageCodeGenericOnly(
@@ -276,7 +276,7 @@ class SpellcheckService : public KeyedService,
std::vector<std::string> GetNormalizedAcceptLanguages(
bool normalize_for_spellcheck = true) const;
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
// Initializes the platform spell checker.
void InitializePlatformSpellchecker();
@@ -326,7 +326,7 @@ class SpellcheckService : public KeyedService,
std::vector<std::unique_ptr<SpellcheckHunspellDictionary>>
hunspell_dictionaries_;
-#if defined(OS_WIN)
+#if defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
// Maps accept language tags to Windows spellcheck BCP47 tags, an analog
// of the hardcoded kSupportedSpellCheckerLanguages used for Hunspell,
// with the difference that only language packs installed on the system
diff --git a/chromium/components/paint_preview/common/serial_utils.cc b/chromium/components/paint_preview/common/serial_utils.cc
index 8fd6f25be7c..e5566fb147d 100644
--- a/chromium/components/paint_preview/common/serial_utils.cc
+++ b/chromium/components/paint_preview/common/serial_utils.cc
@@ -167,9 +167,9 @@ PictureSerializationContext::PictureSerializationContext() = default;
PictureSerializationContext::~PictureSerializationContext() = default;
PictureSerializationContext::PictureSerializationContext(
- PictureSerializationContext&&) = default;
+ PictureSerializationContext&&) noexcept = default;
PictureSerializationContext& PictureSerializationContext::operator=(
- PictureSerializationContext&&) = default;
+ PictureSerializationContext&&) noexcept = default;
TypefaceSerializationContext::TypefaceSerializationContext(
TypefaceUsageMap* usage)
diff --git a/chromium/components/performance_manager/decorators/site_data_recorder.cc b/chromium/components/performance_manager/decorators/site_data_recorder.cc
index 07c670867ae..4bf75f7cc57 100644
--- a/chromium/components/performance_manager/decorators/site_data_recorder.cc
+++ b/chromium/components/performance_manager/decorators/site_data_recorder.cc
@@ -44,6 +44,7 @@ class SiteDataNodeData : public NodeAttachedDataImpl<SiteDataNodeData>,
public:
struct Traits : public NodeAttachedDataOwnedByNodeType<PageNodeImpl> {};
+ SiteDataNodeData() = default;
explicit SiteDataNodeData(const PageNodeImpl* page_node)
: page_node_(page_node) {}
~SiteDataNodeData() override = default;
@@ -343,9 +344,6 @@ void SiteDataRecorder::SetPageNodeDataCache(const PageNode* page_node) {
page_node->GetBrowserContextID()));
}
-SiteDataNodeData::Data::Data() = default;
-SiteDataNodeData::Data::~Data() = default;
-
// static
const SiteDataRecorder::Data* SiteDataRecorder::Data::FromPageNode(
const PageNode* page_node) {
diff --git a/chromium/components/services/storage/indexed_db/scopes/leveldb_scope.cc b/chromium/components/services/storage/indexed_db/scopes/leveldb_scope.cc
index 9e5c8d2681c..e5ba09b63d5 100644
--- a/chromium/components/services/storage/indexed_db/scopes/leveldb_scope.cc
+++ b/chromium/components/services/storage/indexed_db/scopes/leveldb_scope.cc
@@ -105,12 +105,16 @@ class LevelDBScope::UndoLogWriter : public leveldb::WriteBatch::Handler {
leveldb::Status error_ = leveldb::Status::OK();
};
-LevelDBScope::EmptyRangeLessThan::EmptyRangeLessThan() = default;
+LevelDBScope::EmptyRangeLessThan::EmptyRangeLessThan() noexcept = default;
LevelDBScope::EmptyRangeLessThan::EmptyRangeLessThan(
- const leveldb::Comparator* comparator)
+ const leveldb::Comparator* comparator) noexcept
: comparator_(comparator) {}
+LevelDBScope::EmptyRangeLessThan::EmptyRangeLessThan(const LevelDBScope::EmptyRangeLessThan& other) noexcept = default;
LevelDBScope::EmptyRangeLessThan& LevelDBScope::EmptyRangeLessThan::operator=(
- const LevelDBScope::EmptyRangeLessThan& other) = default;
+ const LevelDBScope::EmptyRangeLessThan& other) noexcept = default;
+LevelDBScope::EmptyRangeLessThan::EmptyRangeLessThan(LevelDBScope::EmptyRangeLessThan&& other) noexcept = default;
+LevelDBScope::EmptyRangeLessThan& LevelDBScope::EmptyRangeLessThan::operator=(
+ LevelDBScope::EmptyRangeLessThan&& other) noexcept = default;
// The ranges are expected to be disjoint.
bool LevelDBScope::EmptyRangeLessThan::operator()(const EmptyRange& lhs,
diff --git a/chromium/components/services/storage/indexed_db/scopes/leveldb_scope.h b/chromium/components/services/storage/indexed_db/scopes/leveldb_scope.h
index 10538eafcfd..f7a96a966c1 100644
--- a/chromium/components/services/storage/indexed_db/scopes/leveldb_scope.h
+++ b/chromium/components/services/storage/indexed_db/scopes/leveldb_scope.h
@@ -115,9 +115,12 @@ class LevelDBScope {
struct EmptyRangeLessThan {
// This constructor is needed to satisfy the constraints of having default
// construction of the |empty_ranges_| flat_map below.
- EmptyRangeLessThan();
- EmptyRangeLessThan(const leveldb::Comparator* comparator);
- EmptyRangeLessThan& operator=(const EmptyRangeLessThan& other);
+ EmptyRangeLessThan() noexcept;
+ EmptyRangeLessThan(const leveldb::Comparator* comparator) noexcept;
+ EmptyRangeLessThan(const EmptyRangeLessThan& other) noexcept;
+ EmptyRangeLessThan(EmptyRangeLessThan&& other) noexcept;
+ EmptyRangeLessThan& operator=(const EmptyRangeLessThan& other) noexcept;
+ EmptyRangeLessThan& operator=(EmptyRangeLessThan&& other) noexcept;
// The ranges are expected to be disjoint.
bool operator()(const EmptyRange& lhs, const EmptyRange& rhs) const;
diff --git a/chromium/components/spellcheck/browser/windows_spell_checker.cc b/chromium/components/spellcheck/browser/windows_spell_checker.cc
index 13d856bef7f..cc0b21a326a 100644
--- a/chromium/components/spellcheck/browser/windows_spell_checker.cc
+++ b/chromium/components/spellcheck/browser/windows_spell_checker.cc
@@ -69,11 +69,13 @@ class BackgroundHelper {
int document_tag,
const base::string16& text);
+#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
// Gets spelling suggestions for |word| from all active spell checkers (all
// languages), keeping the suggestions separate per language, and returns
// the results in a vector of vector of strings.
spellcheck::PerLanguageSuggestions GetPerLanguageSuggestions(
const base::string16& word);
+#endif
// Fills the given vector |optional_suggestions| with a number (up to
// kMaxSuggestions) of suggestions for the string |wrong_word| using the
@@ -272,7 +274,7 @@ std::vector<SpellCheckResult> BackgroundHelper::RequestTextCheckForAllLanguages(
return final_results;
}
-#if BUILDFLAG(USE_WIN_HYBRID_SPELLCHECKER)
+#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
spellcheck::PerLanguageSuggestions BackgroundHelper::GetPerLanguageSuggestions(
const base::string16& word) {
DCHECK(background_task_runner_->RunsTasksInCurrentSequence());
@@ -531,7 +533,7 @@ void WindowsSpellChecker::RequestTextCheck(
std::move(callback));
}
-#if BUILDFLAG(USE_WIN_HYBRID_SPELLCHECKER)
+#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
void WindowsSpellChecker::GetPerLanguageSuggestions(
const base::string16& word,
spellcheck_platform::GetSuggestionsCallback callback) {
diff --git a/chromium/components/spellcheck/browser/windows_spell_checker.h b/chromium/components/spellcheck/browser/windows_spell_checker.h
index abfbfca58e9..e7d1d892a91 100644
--- a/chromium/components/spellcheck/browser/windows_spell_checker.h
+++ b/chromium/components/spellcheck/browser/windows_spell_checker.h
@@ -50,7 +50,7 @@ class WindowsSpellChecker : public PlatformSpellChecker {
const base::string16& text,
spellcheck_platform::TextCheckCompleteCallback callback) override;
-#if BUILDFLAG(USE_WIN_HYBRID_SPELLCHECKER)
+#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
void GetPerLanguageSuggestions(
const base::string16& word,
spellcheck_platform::GetSuggestionsCallback callback);
diff --git a/chromium/components/spellcheck/common/spellcheck.mojom b/chromium/components/spellcheck/common/spellcheck.mojom
index 21bce14877c..76c3f530045 100644
--- a/chromium/components/spellcheck/common/spellcheck.mojom
+++ b/chromium/components/spellcheck/common/spellcheck.mojom
@@ -77,16 +77,16 @@ interface SpellCheckHost {
// Returns a list of suggestions for each spellcheck language for a given word
// with a platform-specific spell checker.
- [EnableIf=is_win, Sync]
- GetPerLanguageSuggestions(mojo_base.mojom.String16 word) =>
- (array<array<mojo_base.mojom.String16>> suggestions);
+// [EnableIf=is_win, Sync]
+// GetPerLanguageSuggestions(mojo_base.mojom.String16 word) =>
+// (array<array<mojo_base.mojom.String16>> suggestions);
// Completes initialization of the spellcheck service by loading dictionaries.
- [EnableIf=is_win]
- InitializeDictionaries() =>
- (array<SpellCheckBDictLanguage> dictionaries,
- array<string> custom_words,
- bool enable);
+// [EnableIf=is_win]
+// InitializeDictionaries() =>
+// (array<SpellCheckBDictLanguage> dictionaries,
+// array<string> custom_words,
+// bool enable);
};
enum Decoration {
diff --git a/chromium/content/browser/BUILD.gn b/chromium/content/browser/BUILD.gn
index bc36cb970e5..81e556a0815 100644
--- a/chromium/content/browser/BUILD.gn
+++ b/chromium/content/browser/BUILD.gn
@@ -2927,7 +2927,9 @@ jumbo_static_library("browser") {
"accessibility/browser_accessibility_win.h",
"accessibility/accessibility_tree_formatter_win.cc",
"renderer_host/legacy_render_widget_host_win.cc",
- "renderer_host/legacy_render_widget_host_win.h"
+ "renderer_host/legacy_render_widget_host_win.h",
+ "renderer_host/virtual_keyboard_controller_win.cc",
+ "renderer_host/virtual_keyboard_controller_win.h"
]
}
if (is_mac) {
diff --git a/chromium/content/browser/accessibility/accessibility_event_recorder_uia_win.cc b/chromium/content/browser/accessibility/accessibility_event_recorder_uia_win.cc
index 768d56d7c77..26389c18e92 100644
--- a/chromium/content/browser/accessibility/accessibility_event_recorder_uia_win.cc
+++ b/chromium/content/browser/accessibility/accessibility_event_recorder_uia_win.cc
@@ -109,9 +109,11 @@ void AccessibilityEventRecorderUia::Thread::ThreadMain() {
IID_IUIAutomation, &uia_);
CHECK(uia_.Get());
+#if !defined(TOOLKIT_QT)
// Register the custom event to mark the end of the test.
shutdown_sentinel_ =
ui::UiaRegistrarWin::GetInstance().GetUiaTestCompleteEventId();
+#endif
// Find the IUIAutomationElement for the root content window
uia_->ElementFromHandle(hwnd_, &root_);
diff --git a/chromium/content/browser/conversions/conversion_manager_impl.cc b/chromium/content/browser/conversions/conversion_manager_impl.cc
index ffb832e5e0a..b5ed21eac48 100644
--- a/chromium/content/browser/conversions/conversion_manager_impl.cc
+++ b/chromium/content/browser/conversions/conversion_manager_impl.cc
@@ -22,7 +22,7 @@
namespace content {
-const constexpr base::TimeDelta kConversionManagerQueueReportsInterval =
+const base::TimeDelta kConversionManagerQueueReportsInterval =
base::TimeDelta::FromMinutes(30);
ConversionManager* ConversionManagerProviderImpl::GetManager(
diff --git a/chromium/device/fido/cable/v2_handshake.h b/chromium/device/fido/cable/v2_handshake.h
index 26bb711b082..549194507fe 100644
--- a/chromium/device/fido/cable/v2_handshake.h
+++ b/chromium/device/fido/cable/v2_handshake.h
@@ -34,8 +34,10 @@ constexpr uint32_t Base32Ord(char c) {
return c - 'a';
} else if (c >= '2' && c <= '7') {
return 26 + c - '2';
+#ifdef __GNUC__
} else {
__builtin_unreachable();
+#endif
}
}
@@ -52,9 +54,11 @@ enum class TLD {
// domain plus a TLD, into a 22-bit value.
constexpr uint32_t EncodeDomain(const char label[5], TLD tld) {
const uint32_t tld_value = static_cast<uint32_t>(tld);
+#ifdef __GNUC__
if (tld_value > 3 || label[4] != 0) {
__builtin_unreachable();
}
+#endif
return ((Base32Ord(label[0]) << 15 | Base32Ord(label[1]) << 10 |
Base32Ord(label[2]) << 5 | Base32Ord(label[3]))
<< 2) |
diff --git a/chromium/device/fido/cbor_extract.h b/chromium/device/fido/cbor_extract.h
index 5a99ac6d0c9..411230e763b 100644
--- a/chromium/device/fido/cbor_extract.h
+++ b/chromium/device/fido/cbor_extract.h
@@ -147,12 +147,14 @@ struct StepOrByte {
template <typename S>
constexpr StepOrByte<S> IntKey(int key) {
+#ifdef __GNUC__
if (key > std::numeric_limits<int8_t>::max() ||
key < std::numeric_limits<int8_t>::min() ||
key == StepOrByte<S>::STRING_KEY) {
// It's a compile-time error if __builtin_unreachable is reachable.
__builtin_unreachable();
}
+#endif
return StepOrByte<S>(static_cast<char>(key));
}
diff --git a/chromium/gpu/config/vulkan_info.h b/chromium/gpu/config/vulkan_info.h
index be60f8ca105..1e52376f7c5 100644
--- a/chromium/gpu/config/vulkan_info.h
+++ b/chromium/gpu/config/vulkan_info.h
@@ -5,7 +5,7 @@
#ifndef GPU_CONFIG_VULKAN_INFO_H_
#define GPU_CONFIG_VULKAN_INFO_H_
-#include <vulkan/vulkan.h>
+#include "third_party/vulkan_headers/include/vulkan/vulkan.h"
#include <vector>
#include "base/macros.h"
diff --git a/chromium/gpu/ipc/service/gpu_init.cc b/chromium/gpu/ipc/service/gpu_init.cc
index 17998f437ea..0b55a371113 100644
--- a/chromium/gpu/ipc/service/gpu_init.cc
+++ b/chromium/gpu/ipc/service/gpu_init.cc
@@ -47,11 +47,13 @@
#include "ui/ozone/public/surface_factory_ozone.h"
#endif
-#if defined(OS_WIN) && !defined(TOOLKIT_QT)
+#if defined(OS_WIN)
+#if !defined(TOOLKIT_QT)
#include "gpu/config/gpu_driver_bug_workarounds.h"
-#include "ui/gl/direct_composition_surface_win.h"
#include "ui/gl/gl_surface_egl.h"
#endif
+#include "ui/gl/direct_composition_surface_win.h"
+#endif
#if defined(OS_ANDROID)
#include "base/android/android_image_reader_compat.h"
diff --git a/chromium/media/cdm/BUILD.gn b/chromium/media/cdm/BUILD.gn
index fd2f3718983..450a95dab78 100644
--- a/chromium/media/cdm/BUILD.gn
+++ b/chromium/media/cdm/BUILD.gn
@@ -94,7 +94,7 @@ source_set("cdm") {
}
}
- if (is_win) {
+ if (is_win && !use_qt) {
sources += [
"win/media_foundation_cdm.cc",
"win/media_foundation_cdm.h",
diff --git a/chromium/net/base/backoff_entry.cc b/chromium/net/base/backoff_entry.cc
index c1df27125c4..59cbdf8985c 100644
--- a/chromium/net/base/backoff_entry.cc
+++ b/chromium/net/base/backoff_entry.cc
@@ -142,7 +142,7 @@ base::TimeTicks BackoffEntry::CalculateReleaseTime() const {
// accounted for. Both cases are handled by using CheckedNumeric<int64_t> to
// perform the conversion to integers.
double delay_ms = policy_->initial_delay_ms;
- delay_ms *= pow(policy_->multiply_factor, effective_failure_count - 1);
+ delay_ms *= pow(policy_->multiply_factor, double(effective_failure_count) - 1);
delay_ms -= base::RandDouble() * policy_->jitter_factor * delay_ms;
// Do overflow checking in microseconds, the internal unit of TimeTicks.
diff --git a/chromium/net/dns/host_resolver.cc b/chromium/net/dns/host_resolver.cc
index dec61ed0c58..c9a5c784c3a 100644
--- a/chromium/net/dns/host_resolver.cc
+++ b/chromium/net/dns/host_resolver.cc
@@ -79,6 +79,7 @@ class FailingRequestImpl : public HostResolver::ResolveHostRequest,
const base::Optional<std::vector<bool>>&
HostResolver::ResolveHostRequest::GetExperimentalResultsForTesting() const {
IMMEDIATE_CRASH();
+ return base::Optional<std::vector<bool>>();
}
const size_t HostResolver::ManagerOptions::kDefaultRetryAttempts =
diff --git a/chromium/net/third_party/quiche/src/quic/core/frames/quic_frame.h b/chromium/net/third_party/quiche/src/quic/core/frames/quic_frame.h
index 505f562b7c8..2b513c51084 100644
--- a/chromium/net/third_party/quiche/src/quic/core/frames/quic_frame.h
+++ b/chromium/net/third_party/quiche/src/quic/core/frames/quic_frame.h
@@ -37,7 +37,7 @@
#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
#ifndef QUIC_FRAME_DEBUG
-#if !defined(NDEBUG) || defined(ADDRESS_SANITIZER)
+#if (!defined(NDEBUG) || defined(ADDRESS_SANITIZER)) && !defined(COMPILER_MSVC)
#define QUIC_FRAME_DEBUG 1
#else // !defined(NDEBUG) || defined(ADDRESS_SANITIZER)
#define QUIC_FRAME_DEBUG 0
diff --git a/chromium/services/network/network_context.cc b/chromium/services/network/network_context.cc
index d10ba72b675..c86b6a3458a 100644
--- a/chromium/services/network/network_context.cc
+++ b/chromium/services/network/network_context.cc
@@ -1799,7 +1799,7 @@ void NetworkContext::LookupProxyAuthCredentials(
}
#endif
-const net::HttpAuthPreferences* NetworkContext::GetHttpAuthPreferences() const {
+const net::HttpAuthPreferences* NetworkContext::GetHttpAuthPreferences() const noexcept {
return &http_auth_merged_preferences_;
}
diff --git a/chromium/services/network/public/cpp/features.cc b/chromium/services/network/public/cpp/features.cc
index cd4d9239360..3d802f44807 100644
--- a/chromium/services/network/public/cpp/features.cc
+++ b/chromium/services/network/public/cpp/features.cc
@@ -223,8 +223,8 @@ const base::Feature kWebSocketReassembleShortMessages{
"WebSocketReassembleShortMessages", base::FEATURE_ENABLED_BY_DEFAULT};
// Enables usage of First Party Sets to determine cookie availability.
-constexpr base::Feature kFirstPartySets{"FirstPartySets",
- base::FEATURE_DISABLED_BY_DEFAULT};
+const base::Feature kFirstPartySets{"FirstPartySets",
+ base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace features
} // namespace network
diff --git a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
index e1ea6dd9a87..fb03852d85b 100644
--- a/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
+++ b/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py
@@ -2496,7 +2496,7 @@ ${class_name}::NamedPropertyDeleterCallback(property_name, ${info});
// step 1.3. Return false.
const bool is_supported = ${index} < ${blink_receiver}->length();
bindings::V8SetReturnValue(${info}, !is_supported);
-if (is_supported and ${info}.ShouldThrowOnError()) {
+if (is_supported && ${info}.ShouldThrowOnError()) {
ExceptionState exception_state(${info}.GetIsolate(),
ExceptionState::kIndexedDeletionContext,
"${interface.identifier}");
diff --git a/chromium/third_party/blink/renderer/core/fullscreen/fullscreen.h b/chromium/third_party/blink/renderer/core/fullscreen/fullscreen.h
index 0627cccb097..e4022f13a5e 100644
--- a/chromium/third_party/blink/renderer/core/fullscreen/fullscreen.h
+++ b/chromium/third_party/blink/renderer/core/fullscreen/fullscreen.h
@@ -36,6 +36,7 @@
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/fullscreen/fullscreen_request_type.h"
#include "third_party/blink/renderer/platform/geometry/layout_rect.h"
#include "third_party/blink/renderer/platform/supplementable.h"
diff --git a/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_fragment_item.h b/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_fragment_item.h
index 96457d5a29b..8ceaaa8a1db 100644
--- a/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_fragment_item.h
+++ b/chromium/third_party/blink/renderer/core/layout/ng/inline/ng_fragment_item.h
@@ -68,6 +68,8 @@ class CORE_EXPORT NGFragmentItem {
enum ItemType { kText, kGeneratedText, kLine, kBox };
+ NGFragmentItem() { }
+
// Create appropriate type for |line_item|.
NGFragmentItem(NGLogicalLineItem&& line_item, WritingMode writing_mode);
// Create a text item.
diff --git a/chromium/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc b/chromium/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
index 9e60515c149..8a21d9382e5 100644
--- a/chromium/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
+++ b/chromium/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
@@ -229,8 +229,7 @@ void LayoutNGMixin<Base>::UpdateOutOfFlowBlockLayout() {
NGFragmentGeometry fragment_geometry;
fragment_geometry.border = ComputeBorders(constraint_space, container_node);
- fragment_geometry.scrollbar =
- ComputeScrollbars(constraint_space, container_node);
+ fragment_geometry.scrollbar = (constraint_space.IsAnonymous() ? NGBoxStrut() : ComputeScrollbarsForNonAnonymous(container_node));
fragment_geometry.padding =
ComputePadding(constraint_space, *container_style);
diff --git a/chromium/third_party/blink/renderer/core/page/page_popup_controller.h b/chromium/third_party/blink/renderer/core/page/page_popup_controller.h
index b53070d87b5..1045708dae0 100644
--- a/chromium/third_party/blink/renderer/core/page/page_popup_controller.h
+++ b/chromium/third_party/blink/renderer/core/page/page_popup_controller.h
@@ -31,6 +31,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PAGE_POPUP_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PAGE_POPUP_CONTROLLER_H_
+#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/supplementable.h"
diff --git a/chromium/third_party/blink/renderer/core/svg/svg_external_document_cache.h b/chromium/third_party/blink/renderer/core/svg/svg_external_document_cache.h
index 379f5c99768..4c71be2a288 100644
--- a/chromium/third_party/blink/renderer/core/svg/svg_external_document_cache.h
+++ b/chromium/third_party/blink/renderer/core/svg/svg_external_document_cache.h
@@ -25,6 +25,7 @@
#include "services/network/public/mojom/content_security_policy.mojom-blink.h"
#include "third_party/blink/renderer/core/core_export.h"
+#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_client.h"
diff --git a/chromium/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc b/chromium/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc
index 3d788c8ec04..0bdea356b4d 100644
--- a/chromium/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc
+++ b/chromium/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc
@@ -292,7 +292,7 @@ void AXInlineTextBox::GetDocumentMarkers(
markers_used_by_accessibility);
const int start_text_offset_in_parent = TextOffsetInContainer(0);
for (const auto& node_marker_pair : node_marker_pairs) {
- DCHECK_EQ(GetNode(), node_marker_pair.first);
+ DCHECK_EQ(GetNode(), node_marker_pair.first.Get());
const DocumentMarker* marker = node_marker_pair.second;
if (aria_marker_type == marker->GetType())
diff --git a/chromium/third_party/blink/renderer/modules/cache_storage/cache_storage_trace_utils.h b/chromium/third_party/blink/renderer/modules/cache_storage/cache_storage_trace_utils.h
index e2d67e48dea..84e0ba37c32 100644
--- a/chromium/third_party/blink/renderer/modules/cache_storage/cache_storage_trace_utils.h
+++ b/chromium/third_party/blink/renderer/modules/cache_storage/cache_storage_trace_utils.h
@@ -6,6 +6,7 @@
#define THIRD_PARTY_BLINK_RENDERER_MODULES_CACHE_STORAGE_CACHE_STORAGE_TRACE_UTILS_H_
#include <memory>
+#include <string>
#include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink-forward.h"
diff --git a/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_path.cc b/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_path.cc
index bd3bf105d7a..043e330f4e4 100644
--- a/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_path.cc
+++ b/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_path.cc
@@ -477,7 +477,11 @@ void CanvasPath::roundRect(double double_x,
FloatRect rect = FloatRect(x, y, width, height);
+#if !defined(COMPILER_MSVC)
FloatSize r[num_radii];
+#else
+ FloatSize r[4];
+#endif
for (int i = 0; i < num_radii; ++i) {
if (radii[i].IsDouble()) {
float a = base::saturated_cast<float>(radii[i].GetAsDouble());
diff --git a/chromium/third_party/blink/renderer/modules/nfc/nfc_proxy.h b/chromium/third_party/blink/renderer/modules/nfc/nfc_proxy.h
index 2054198e35c..28cd8bc0950 100644
--- a/chromium/third_party/blink/renderer/modules/nfc/nfc_proxy.h
+++ b/chromium/third_party/blink/renderer/modules/nfc/nfc_proxy.h
@@ -8,6 +8,7 @@
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/device/public/mojom/nfc.mojom-blink.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_receiver.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_wrapper_mode.h"
diff --git a/chromium/third_party/blink/renderer/modules/presentation/presentation_controller.h b/chromium/third_party/blink/renderer/modules/presentation/presentation_controller.h
index 41312f0d9b7..ec7c53e3c85 100644
--- a/chromium/third_party/blink/renderer/modules/presentation/presentation_controller.h
+++ b/chromium/third_party/blink/renderer/modules/presentation/presentation_controller.h
@@ -9,6 +9,7 @@
#include "mojo/public/cpp/bindings/remote.h"
#include "third_party/blink/public/mojom/presentation/presentation.mojom-blink.h"
#include "third_party/blink/public/platform/web_url.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/modules/presentation/presentation.h"
#include "third_party/blink/renderer/modules/presentation/presentation_availability_callbacks.h"
diff --git a/chromium/third_party/blink/renderer/modules/scheduler/dom_scheduler.h b/chromium/third_party/blink/renderer/modules/scheduler/dom_scheduler.h
index 1cec218a5f9..4f5186bf693 100644
--- a/chromium/third_party/blink/renderer/modules/scheduler/dom_scheduler.h
+++ b/chromium/third_party/blink/renderer/modules/scheduler/dom_scheduler.h
@@ -8,6 +8,7 @@
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
diff --git a/chromium/third_party/blink/renderer/modules/service_worker/service_worker_container.h b/chromium/third_party/blink/renderer/modules/service_worker/service_worker_container.h
index f9cb4f5a4a9..39e23978a5d 100644
--- a/chromium/third_party/blink/renderer/modules/service_worker/service_worker_container.h
+++ b/chromium/third_party/blink/renderer/modules/service_worker/service_worker_container.h
@@ -41,6 +41,7 @@
#include "third_party/blink/renderer/bindings/modules/v8/v8_registration_options.h"
#include "third_party/blink/renderer/core/dom/events/event_target.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/modules/service_worker/message_from_service_worker.h"
#include "third_party/blink/renderer/modules/service_worker/service_worker.h"
diff --git a/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h b/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h
index eac7f3ca5dc..1e9147443f3 100644
--- a/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h
+++ b/chromium/third_party/blink/renderer/modules/speech/speech_synthesis.h
@@ -27,6 +27,7 @@
#define THIRD_PARTY_BLINK_RENDERER_MODULES_SPEECH_SPEECH_SYNTHESIS_H_
#include "third_party/blink/public/mojom/speech/speech_synthesis.mojom-blink-forward.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/modules/event_target_modules.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/modules/speech/speech_synthesis_utterance.h"
diff --git a/chromium/third_party/blink/renderer/platform/graphics/dark_mode_filter.cc b/chromium/third_party/blink/renderer/platform/graphics/dark_mode_filter.cc
index 9839dd846ea..21ae08c7267 100644
--- a/chromium/third_party/blink/renderer/platform/graphics/dark_mode_filter.cc
+++ b/chromium/third_party/blink/renderer/platform/graphics/dark_mode_filter.cc
@@ -51,7 +51,8 @@ class DarkModeInvertedColorCache {
return *cached_value;
SkColor inverted_color = filter->InvertColor(color);
- cache_.Put(key, static_cast<SkColor>(inverted_color));
+ SkColor copy = inverted_color;
+ cache_.Put(key, std::move(copy));
return inverted_color;
}
diff --git a/chromium/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h b/chromium/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
index 4b571cb872a..69e3c69ec51 100644
--- a/chromium/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
+++ b/chromium/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
@@ -61,7 +61,7 @@ class DarkModeSRGBColorSpace {
}
SkV3 FromLinear(const SkV3& v) const {
- auto OETF = [](float u) {
+ auto OETF = [](float u) -> float {
return (u < 0.0031308f
? Clamp(12.92 * u, .0, 1.0)
: Clamp(1.055 * std::pow(u, 1.0 / 2.4) - 0.055, .0, 1.0));
@@ -144,7 +144,7 @@ class DarkModeLABColorSpace {
// See
// https://en.wikipedia.org/wiki/CIELAB_color_space#Forward_transformation.
SkV3 ToXYZ(const SkV3& lab) const {
- auto invf = [](float x) {
+ auto invf = [](float x) -> float {
return x > kSigma ? pow(x, 3) : 3 * kSigma2 * (x - 4.0f / 29.0f);
};
diff --git a/chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.cc b/chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.cc
index 5bd25b96116..ee25d9875cb 100644
--- a/chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.cc
+++ b/chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.cc
@@ -15,6 +15,7 @@
namespace blink {
namespace internal {
+#if !defined(COMPILER_MSVC)
namespace {
constexpr int ToGCCMemoryOrder(std::memory_order order) {
switch (order) {
@@ -33,17 +34,26 @@ constexpr int ToGCCMemoryOrder(std::memory_order order) {
}
}
} // namespace
+#endif // !defined(COMPILER_MSVC)
template <typename T>
void UnsanitizedAtomic<T>::store(T desired, std::memory_order order) {
+#if !defined(COMPILER_MSVC)
__atomic_store(&value_, &desired, ToGCCMemoryOrder(order));
+#else
+ Base::store(desired, order);
+#endif // !defined(COMPILER_MSVC)
}
template <typename T>
T UnsanitizedAtomic<T>::load(std::memory_order order) const {
+#if !defined(COMPILER_MSVC)
T result;
__atomic_load(&value_, &result, ToGCCMemoryOrder(order));
return result;
+#else
+ return Base::load(order);
+#endif // !defined(COMPILER_MSVC)
}
template <typename T>
@@ -59,9 +69,14 @@ bool UnsanitizedAtomic<T>::compare_exchange_strong(
T desired,
std::memory_order succ_order,
std::memory_order fail_order) {
+#if !defined(COMPILER_MSVC)
return __atomic_compare_exchange(&value_, &expected, &desired, false,
ToGCCMemoryOrder(succ_order),
ToGCCMemoryOrder(fail_order));
+#else
+ return Base::compare_exchange_strong(expected, desired, succ_order,
+ fail_order);
+#endif // !defined(COMPILER_MSVC)
}
template <typename T>
@@ -76,9 +91,13 @@ bool UnsanitizedAtomic<T>::compare_exchange_weak(T& expected,
T desired,
std::memory_order succ_order,
std::memory_order fail_order) {
+#if !defined(COMPILER_MSVC)
return __atomic_compare_exchange(&value_, &expected, &desired, true,
ToGCCMemoryOrder(succ_order),
ToGCCMemoryOrder(fail_order));
+#else
+ return Base::compare_exchange_weak(expected, desired, succ_order, fail_order);
+#endif // !defined(COMPILER_MSVC)
}
template class PLATFORM_EXPORT UnsanitizedAtomic<uint16_t>;
diff --git a/chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.h b/chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.h
index 7c6828d9ee1..321af5f776d 100644
--- a/chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.h
+++ b/chromium/third_party/blink/renderer/platform/heap/impl/unsanitized_atomic.h
@@ -19,10 +19,19 @@ namespace internal {
// Currently is only used to access poisoned HeapObjectHeader. For derived or
// user types an explicit instantiation must be added to unsanitized_atomic.cc.
template <typename T>
+#if !defined(COMPILER_MSVC)
class PLATFORM_EXPORT UnsanitizedAtomic final {
+ private:
+ T value_;
+
public:
UnsanitizedAtomic() = default;
explicit UnsanitizedAtomic(T value) : value_(value) {}
+#else
+class PLATFORM_EXPORT UnsanitizedAtomic final : private std::atomic<T> {
+ using Base = std::atomic<T>;
+ public:
+#endif // !defined(COMPILER_MSVC)
void store(T, std::memory_order = std::memory_order_seq_cst);
T load(std::memory_order = std::memory_order_seq_cst) const;
@@ -37,8 +46,6 @@ class PLATFORM_EXPORT UnsanitizedAtomic final {
std::memory_order = std::memory_order_seq_cst);
bool compare_exchange_weak(T&, T, std::memory_order, std::memory_order);
- private:
- T value_;
};
template <typename T>
diff --git a/chromium/third_party/perfetto/include/perfetto/base/logging.h b/chromium/third_party/perfetto/include/perfetto/base/logging.h
index 2716540659d..c6e2c68b1da 100644
--- a/chromium/third_party/perfetto/include/perfetto/base/logging.h
+++ b/chromium/third_party/perfetto/include/perfetto/base/logging.h
@@ -194,8 +194,13 @@ PERFETTO_EXPORT void LogMessage(LogLev,
#if PERFETTO_DCHECK_IS_ON()
#define PERFETTO_DCHECK(x) PERFETTO_CHECK(x)
+#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC)
+#define PERFETTO_DFATAL(...) CR_EXPAND_ARG(PERFETTO_FATAL(__VA_ARGS__))
+#define PERFETTO_DFATAL_OR_ELOG(...) CR_EXPAND_ARG(PERFETTO_DFATAL(__VA_ARGS__))
+#else
#define PERFETTO_DFATAL(...) PERFETTO_FATAL(__VA_ARGS__)
#define PERFETTO_DFATAL_OR_ELOG(...) PERFETTO_DFATAL(__VA_ARGS__)
+#endif // PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC)
#else // PERFETTO_DCHECK_IS_ON()
diff --git a/chromium/third_party/snappy/win32/config.h b/chromium/third_party/snappy/win32/config.h
index 6bb8bf82479..494ee00fc0f 100644
--- a/chromium/third_party/snappy/win32/config.h
+++ b/chromium/third_party/snappy/win32/config.h
@@ -2,13 +2,13 @@
#define THIRD_PARTY_SNAPPY_OPENSOURCE_CMAKE_CONFIG_H_
/* Define to 1 if the compiler supports __attribute__((always_inline)). */
-#define HAVE_ATTRIBUTE_ALWAYS_INLINE 1
+/* #define HAVE_ATTRIBUTE_ALWAYS_INLINE 1 */
/* Define to 1 if the compiler supports __builtin_ctz and friends. */
-#define HAVE_BUILTIN_CTZ 1
+/* #define HAVE_BUILTIN_CTZ 1 */
/* Define to 1 if the compiler supports __builtin_expect. */
-#define HAVE_BUILTIN_EXPECT 1
+/* #define HAVE_BUILTIN_EXPECT 1 */
/* Define to 1 if you have a definition for mmap() in <sys/mman.h>. */
/* #undef HAVE_FUNC_MMAP */
diff --git a/chromium/tools/json_schema_compiler/manifest_parse_util.cc b/chromium/tools/json_schema_compiler/manifest_parse_util.cc
index 98728c7b762..595845cfe2c 100644
--- a/chromium/tools/json_schema_compiler/manifest_parse_util.cc
+++ b/chromium/tools/json_schema_compiler/manifest_parse_util.cc
@@ -8,6 +8,8 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include <string>
+
namespace json_schema_compiler {
namespace manifest_parse_util {
@@ -144,8 +146,15 @@ bool ParseFromDictionary(const base::DictionaryValue& dict,
std::string* out,
base::string16* error,
std::vector<base::StringPiece>* error_path_reversed) {
- return ParseHelper(dict, key, base::Value::Type::STRING,
- &base::Value::GetString, out, error, error_path_reversed);
+ DCHECK(out);
+
+ const base::Value* value =
+ FindKeyOfType(dict, key, base::Value::Type::STRING, error, error_path_reversed);
+ if (!value)
+ return false;
+
+ *out = value->GetString();
+ return true;
}
} // namespace manifest_parse_util
diff --git a/chromium/url/origin.cc b/chromium/url/origin.cc
index 999398570f6..a15d690fa7b 100644
--- a/chromium/url/origin.cc
+++ b/chromium/url/origin.cc
@@ -390,7 +390,6 @@ bool IsSameOriginWith(const GURL& a, const GURL& b) {
return Origin::Create(a).IsSameOriginWith(Origin::Create(b));
}
-Origin::Nonce::Nonce() = default;
Origin::Nonce::Nonce(const base::UnguessableToken& token) : token_(token) {
CHECK(!token_.is_empty());
}
@@ -418,11 +417,11 @@ Origin::Nonce& Origin::Nonce::operator=(const Origin::Nonce& other) {
}
// Moving a nonce does NOT trigger lazy-generation of the token.
-Origin::Nonce::Nonce(Origin::Nonce&& other) : token_(other.token_) {
+Origin::Nonce::Nonce(Origin::Nonce&& other) noexcept : token_(other.token_) {
other.token_ = base::UnguessableToken(); // Reset |other|.
}
-Origin::Nonce& Origin::Nonce::operator=(Origin::Nonce&& other) {
+Origin::Nonce& Origin::Nonce::operator=(Origin::Nonce&& other) noexcept {
token_ = other.token_;
other.token_ = base::UnguessableToken(); // Reset |other|.
return *this;
diff --git a/chromium/url/origin.h b/chromium/url/origin.h
index 2257a1bec66..d574b45e4c2 100644
--- a/chromium/url/origin.h
+++ b/chromium/url/origin.h
@@ -323,7 +323,7 @@ class COMPONENT_EXPORT(URL) Origin {
public:
// Creates a nonce to hold a newly-generated UnguessableToken. The actual
// token value will be generated lazily.
- Nonce();
+ Nonce() noexcept = default;
// Creates a nonce to hold an already-generated UnguessableToken value. This
// constructor should only be used for IPC serialization and testing --