diff --git a/DEPS b/DEPS index c1cc91f..d0beb13f 100644 --- a/DEPS +++ b/DEPS
@@ -121,11 +121,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': 'aec8c7e280cbd0590655887e9e2dff7f3822f34e', + 'skia_revision': '61b3d1d00057ad0d72a23b961f1191e429932c5b', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '012576206f4785ac36cbcc35e73c0fa835813d62', + 'v8_revision': 'c49505f1389190661532a9305ba0c20546292768', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -133,7 +133,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': 'cb9609fe58c2464aa01f70404479de91dbf80f17', + 'angle_revision': '60a50cfcb8769ca2f903f8fac3c8d4e7ab5ffdc5', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling build tools # and whatever else without interference from each other. @@ -229,7 +229,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'spv_tools_revision': '980ae1d1cd6e9b4fb209ad5097b3ad06eb7877a3', + 'spv_tools_revision': '64f2750e5dc553baa2922b780f15049023689ef9', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -245,7 +245,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'dawn_revision': '92700bfccd1806971ab47773ebe95576a128a998', + 'dawn_revision': '5dee56f39c422e0b1e8d9f3f1f8f22ee42554603', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -679,7 +679,7 @@ # Build tools for Chrome OS. Note: This depends on third_party/pyelftools. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '61c192b19b7974f3ced48ec339cd0bdea81702a7', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '1716f486f900a76ef3a77d5ef75726d9aef05581', 'condition': 'checkout_linux', }, @@ -694,7 +694,7 @@ # For Linux and Chromium OS. 'src/third_party/cros_system_api': { - 'url': Var('chromium_git') + '/chromiumos/platform2/system_api.git' + '@' + '633fc031bece7e388014a17ebc006526f9d29081', + 'url': Var('chromium_git') + '/chromiumos/platform2/system_api.git' + '@' + '44b6331b895d29946fa5f8f4e39f2128e58294f7', 'condition': 'checkout_linux', }, @@ -1199,7 +1199,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'a2b35635aaef3e9301d69f77f9a0a3fd99291b08', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '5f8b5fdb62d38699e814ff181f511d1038fbf48e', + Var('webrtc_git') + '/src.git' + '@' + '95bdf5f39ec67edd3d7fc7313e8bb3b9fcc9706c', 'src/third_party/xdg-utils': { 'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d', @@ -1230,7 +1230,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@dbf3245a78dbbb86910070cb2649f9a2fe5fd804', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@a8894a8cc4e7df548deb79122a49e85251c1a79b', 'condition': 'checkout_src_internal', },
diff --git a/base/task/task_features.h b/base/task/task_features.h index 8959b86..7075118 100644 --- a/base/task/task_features.h +++ b/base/task/task_features.h
@@ -20,7 +20,15 @@ // if the total number of threads in the pool is above the initial capacity. extern const BASE_EXPORT Feature kNoDetachBelowInitialCapacity; +// Threshold after which the maximum number of tasks running in a foreground +// pool can be incremented to compensate for a task that is within a MAY_BLOCK +// ScopedBlockingCall (a constant is used for background pools). extern const BASE_EXPORT FeatureParam<int> kMayBlockThresholdMicrosecondsParam; + +// Interval at which the service thread checks for workers in a foreground pool +// that have been in a MAY_BLOCK ScopedBlockingCall for more than +// |kMayBlockThresholdMicrosecondsParam| (a constant is used for background +// pools). extern const BASE_EXPORT FeatureParam<int> kBlockedWorkersPollMicrosecondsParam; } // namespace base
diff --git a/base/task/task_scheduler/scheduler_worker_pool_impl.cc b/base/task/task_scheduler/scheduler_worker_pool_impl.cc index b504439..fed6c1eb 100644 --- a/base/task/task_scheduler/scheduler_worker_pool_impl.cc +++ b/base/task/task_scheduler/scheduler_worker_pool_impl.cc
@@ -54,6 +54,27 @@ "TaskScheduler.NumActiveWorkers."; constexpr size_t kMaxNumberOfWorkers = 256; +// In a background pool: +// - Blocking calls take more time than in a foreground pool. +// - We want to minimize impact on foreground work, not maximize execution +// throughput. +// For these reasons, the timeout to increase the maximum number of concurrent +// tasks when there is a MAY_BLOCK ScopedBlockingCall is *long*. It is not +// infinite because execution throughput should not be reduced forever if a task +// blocks forever. +// +// TODO(fdoray): On platforms without background pools, blocking in a +// BEST_EFFORT task should: +// 1. Increment the maximum number of concurrent tasks after a *short* timeout, +// to allow scheduling of USER_VISIBLE/USER_BLOCKING tasks. +// 2. Increment the maximum number of concurrent BEST_EFFORT tasks after a +// *long* timeout, because we only want to allow more BEST_EFFORT tasks to be +// be scheduled concurrently when we believe that a BEST_EFFORT task is +// blocked forever. +// Currently, only 1. is true as the configuration is per pool. +constexpr TimeDelta kBackgroundMayBlockThreshold = TimeDelta::FromSeconds(10); +constexpr TimeDelta kBackgroundBlockedWorkersPoll = TimeDelta::FromSeconds(12); + // Only used in DCHECKs. bool ContainsWorker(const std::vector<scoped_refptr<SchedulerWorker>>& workers, const SchedulerWorker* worker) { @@ -270,13 +291,18 @@ AutoSchedulerLock auto_lock(lock_); - may_block_threshold_ = - TimeDelta::FromMicroseconds(kMayBlockThresholdMicrosecondsParam.Get()); - blocked_workers_poll_period_ = - TimeDelta::FromMicroseconds(kBlockedWorkersPollMicrosecondsParam.Get()); - DCHECK(workers_.empty()); + may_block_threshold_ = priority_hint_ == ThreadPriority::NORMAL + ? TimeDelta::FromMicroseconds( + kMayBlockThresholdMicrosecondsParam.Get()) + : kBackgroundMayBlockThreshold; + blocked_workers_poll_period_ = + priority_hint_ == ThreadPriority::NORMAL + ? TimeDelta::FromMicroseconds( + kBlockedWorkersPollMicrosecondsParam.Get()) + : kBackgroundBlockedWorkersPoll; + max_tasks_ = params.max_tasks(); DCHECK_GE(max_tasks_, 1U); initial_max_tasks_ = max_tasks_;
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index adc63b3c..37ff563 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -7fb0692d9161011a6fd3b8abf5d3d83b7ffeee89 \ No newline at end of file +4145b27107e2b201d8584bfa47e1c4b110daec55 \ No newline at end of file
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index c198749..f9ec96f 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -0c76458159f1a91ec777356c92d5fe7be4bc5681 \ No newline at end of file +6128814baa17836a13b4a2e90f506fbaa69af7e9 \ No newline at end of file
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py index 0f1c53c3..eb47863 100755 --- a/build/vs_toolchain.py +++ b/build/vs_toolchain.py
@@ -138,26 +138,33 @@ version_as_year = GetVisualStudioVersion() year_to_version = { '2017': '15.0', + '2019': '16.0', } if version_as_year not in year_to_version: raise Exception(('Visual Studio version %s (from GYP_MSVS_VERSION)' ' not supported. Supported versions are: %s') % ( version_as_year, ', '.join(year_to_version.keys()))) - if version_as_year == '2017': - # The VC++ 2017 install location needs to be located using COM instead of - # the registry. For details see: - # https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-to-visual-studio-15-setup/ - # For now we use a hardcoded default with an environment variable override. - for path in ( - os.environ.get('vs2017_install'), - os.path.expandvars('%ProgramFiles(x86)%' - '/Microsoft Visual Studio/2017/Enterprise'), - os.path.expandvars('%ProgramFiles(x86)%' - '/Microsoft Visual Studio/2017/Professional'), - os.path.expandvars('%ProgramFiles(x86)%' - '/Microsoft Visual Studio/2017/Community')): - if path and os.path.exists(path): - return path + + # The VC++ >=2017 install location needs to be located using COM instead of + # the registry. For details see: + # https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-to-visual-studio-15-setup/ + # For now we use a hardcoded default with an environment variable override. + for path in ( + os.environ.get('vs%s_install' % version_as_year), + os.path.expandvars('%ProgramFiles(x86)%' + + '/Microsoft Visual Studio/%s/Enterprise' % + version_as_year), + os.path.expandvars('%ProgramFiles(x86)%' + + '/Microsoft Visual Studio/%s/Professional' % + version_as_year), + os.path.expandvars('%ProgramFiles(x86)%' + + '/Microsoft Visual Studio/%s/Community' % + version_as_year), + os.path.expandvars('%ProgramFiles(x86)%' + + '/Microsoft Visual Studio/%s/Preview' % + version_as_year)): + if path and os.path.exists(path): + return path raise Exception(('Visual Studio Version %s (from GYP_MSVS_VERSION)' ' not found.') % (version_as_year)) @@ -255,7 +262,7 @@ version number part changes frequently so the highest version number found is used. """ - assert GetVisualStudioVersion() == '2017' + assert GetVisualStudioVersion() in ['2017', '2019'] SetEnvironmentAndGetRuntimeDllDirs() assert ('GYP_MSVS_OVERRIDE_PATH' in os.environ) vc_component_msvc_root = os.path.join(os.environ['GYP_MSVS_OVERRIDE_PATH'], @@ -271,17 +278,8 @@ raise Exception('Unable to find the VC %s directory.' % component) -def FindVCToolsRoot(): - """In VS2017 the PGO runtime dependencies are located in - {toolchain_root}/VC/Tools/MSVC/{x.y.z}/bin/Host{target_cpu}/{target_cpu}/. - - This returns the '{toolchain_root}/VC/Tools/MSVC/{x.y.z}/bin/' path. - """ - return os.path.join(FindVCComponentRoot('Tools'), 'bin') - - def FindVCRedistRoot(): - """In VS2017, Redist binaries are located in + """In >=VS2017, Redist binaries are located in {toolchain_root}/VC/Redist/MSVC/{x.y.z}/{target_cpu}/. This returns the '{toolchain_root}/VC/Redist/MSVC/{x.y.z}/' path. @@ -289,46 +287,11 @@ return FindVCComponentRoot('Redist') -def _CopyPGORuntime(target_dir, target_cpu): - """Copy the runtime dependencies required during a PGO build. - """ - env_version = GetVisualStudioVersion() - # These dependencies will be in a different location depending on the version - # of the toolchain. - if env_version == '2017': - pgo_runtime_root = FindVCToolsRoot() - assert pgo_runtime_root - # There's no version of pgosweep.exe in HostX64/x86, so we use the copy - # from HostX86/x86. - pgo_x86_runtime_dir = os.path.join(pgo_runtime_root, 'HostX86', 'x86') - pgo_x64_runtime_dir = os.path.join(pgo_runtime_root, 'HostX64', 'x64') - pgo_arm64_runtime_dir = os.path.join(pgo_runtime_root, 'arm64') - else: - raise Exception('Unexpected toolchain version: %s.' % env_version) - - # We need to copy 2 runtime dependencies used during the profiling step: - # - pgort140.dll: runtime library required to run the instrumented image. - # - pgosweep.exe: executable used to collect the profiling data - pgo_runtimes = ['pgort140.dll', 'pgosweep.exe'] - for runtime in pgo_runtimes: - if target_cpu == 'x86': - source = os.path.join(pgo_x86_runtime_dir, runtime) - elif target_cpu == 'x64': - source = os.path.join(pgo_x64_runtime_dir, runtime) - elif target_cpu == 'arm64': - source = os.path.join(pgo_arm64_runtime_dir, runtime) - else: - raise NotImplementedError('Unexpected target_cpu value: ' + target_cpu) - if not os.path.exists(source): - raise Exception('Unable to find %s.' % source) - _CopyRuntimeImpl(os.path.join(target_dir, runtime), source) - - def _CopyRuntime(target_dir, source_dir, target_cpu, debug): """Copy the VS runtime DLLs, only if the target doesn't exist, but the target - directory does exist. Handles VS 2015 and VS 2017.""" + directory does exist. Handles VS 2015, 2017 and 2019.""" suffix = 'd.dll' if debug else '.dll' - # VS 2017 uses the same CRT DLLs as VS 2015. + # VS 2015, 2017 and 2019 use the same CRT DLLs. _CopyUCRTRuntime(target_dir, source_dir, target_cpu, '%s140' + suffix, suffix) @@ -358,9 +321,6 @@ _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False) if configuration == 'Debug': _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) - else: - _CopyPGORuntime(target_dir, target_cpu) - _CopyDebugger(target_dir, target_cpu)
diff --git a/chrome/VERSION b/chrome/VERSION index 143fe25f..2d0780b 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=73 MINOR=0 -BUILD=3655 +BUILD=3658 PATCH=0
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt index dc8db26..a210f27 100644 --- a/chrome/android/profiles/newest.txt +++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-73.0.3654.0_rc-r1.afdo.bz2 \ No newline at end of file +chromeos-chrome-amd64-73.0.3657.0_rc-r1.afdo.bz2 \ No newline at end of file
diff --git a/chrome/browser/extensions/api/extension_action/browser_action_unittest.cc b/chrome/browser/extensions/api/extension_action/browser_action_unittest.cc deleted file mode 100644 index b69bbf30..0000000 --- a/chrome/browser/extensions/api/extension_action/browser_action_unittest.cc +++ /dev/null
@@ -1,39 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/files/file_util.h" -#include "chrome/browser/extensions/extension_service_test_with_install.h" -#include "chrome/common/extensions/api/extension_action/action_info.h" - -namespace extensions { -namespace { - -class BrowserActionUnitTest : public ExtensionServiceTestWithInstall { -}; - -TEST_F(BrowserActionUnitTest, MultiIcons) { - InitializeEmptyExtensionService(); - base::FilePath path = - data_dir().AppendASCII("api_test/browser_action/multi_icons"); - ASSERT_TRUE(base::PathExists(path)); - - const Extension* extension = PackAndInstallCRX(path, INSTALL_NEW); - - EXPECT_EQ(0U, extension->install_warnings().size()); - const ActionInfo* browser_action_info = - ActionInfo::GetBrowserActionInfo(extension); - ASSERT_TRUE(browser_action_info); - - const ExtensionIconSet& icons = browser_action_info->default_icon; - - // Extension can provide arbitrary sizes. - EXPECT_EQ(4u, icons.map().size()); - EXPECT_EQ("icon19.png", icons.Get(19, ExtensionIconSet::MATCH_EXACTLY)); - EXPECT_EQ("icon24.png", icons.Get(24, ExtensionIconSet::MATCH_EXACTLY)); - EXPECT_EQ("icon24.png", icons.Get(31, ExtensionIconSet::MATCH_EXACTLY)); - EXPECT_EQ("icon38.png", icons.Get(38, ExtensionIconSet::MATCH_EXACTLY)); -} - -} // namespace -} // namespace extensions
diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api_unittest.cc b/chrome/browser/extensions/api/extension_action/extension_action_api_unittest.cc new file mode 100644 index 0000000..85f0d5a --- /dev/null +++ b/chrome/browser/extensions/api/extension_action/extension_action_api_unittest.cc
@@ -0,0 +1,110 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/files/file_util.h" +#include "base/strings/stringprintf.h" +#include "chrome/browser/extensions/extension_service.h" +#include "chrome/browser/extensions/extension_service_test_with_install.h" +#include "chrome/common/extensions/api/extension_action/action_info.h" +#include "extensions/common/manifest_constants.h" +#include "extensions/test/test_extension_dir.h" + +namespace extensions { +namespace { + +enum class TestActionType { + kBrowser, + kPage, +}; + +class ExtensionActionAPIUnitTest + : public ExtensionServiceTestWithInstall, + public ::testing::WithParamInterface<TestActionType> { + public: + ExtensionActionAPIUnitTest() {} + ~ExtensionActionAPIUnitTest() override {} + + const char* GetManifestKey() { + switch (GetParam()) { + case TestActionType::kBrowser: + return manifest_keys::kBrowserAction; + case TestActionType::kPage: + return manifest_keys::kPageAction; + } + NOTREACHED(); + return nullptr; + } + + const ActionInfo* GetActionInfo(const Extension& extension) { + switch (GetParam()) { + case TestActionType::kBrowser: + return ActionInfo::GetBrowserActionInfo(&extension); + case TestActionType::kPage: + return ActionInfo::GetPageActionInfo(&extension); + } + NOTREACHED(); + return nullptr; + } + + private: + DISALLOW_COPY_AND_ASSIGN(ExtensionActionAPIUnitTest); +}; + +// Test that extensions can provide icons of arbitrary sizes in the manifest. +TEST_P(ExtensionActionAPIUnitTest, MultiIcons) { + InitializeEmptyExtensionService(); + + constexpr char kManifestTemplate[] = + R"({ + "name": "A test extension that tests multiple browser action icons", + "version": "1.0", + "manifest_version": 2, + "%s": { + "default_icon": { + "19": "icon19.png", + "24": "icon24.png", + "31": "icon24.png", + "38": "icon38.png" + } + } + })"; + + TestExtensionDir test_extension_dir; + test_extension_dir.WriteManifest( + base::StringPrintf(kManifestTemplate, GetManifestKey())); + + { + std::string icon_file_content; + base::FilePath icon_path = data_dir().AppendASCII("icon1.png"); + EXPECT_TRUE(base::ReadFileToString(icon_path, &icon_file_content)); + test_extension_dir.WriteFile(FILE_PATH_LITERAL("icon19.png"), + icon_file_content); + test_extension_dir.WriteFile(FILE_PATH_LITERAL("icon24.png"), + icon_file_content); + test_extension_dir.WriteFile(FILE_PATH_LITERAL("icon38.png"), + icon_file_content); + } + + const Extension* extension = + PackAndInstallCRX(test_extension_dir.UnpackedPath(), INSTALL_NEW); + EXPECT_TRUE(extension->install_warnings().empty()); + const ActionInfo* action_info = GetActionInfo(*extension); + ASSERT_TRUE(action_info); + + const ExtensionIconSet& icons = action_info->default_icon; + + EXPECT_EQ(4u, icons.map().size()); + EXPECT_EQ("icon19.png", icons.Get(19, ExtensionIconSet::MATCH_EXACTLY)); + EXPECT_EQ("icon24.png", icons.Get(24, ExtensionIconSet::MATCH_EXACTLY)); + EXPECT_EQ("icon24.png", icons.Get(31, ExtensionIconSet::MATCH_EXACTLY)); + EXPECT_EQ("icon38.png", icons.Get(38, ExtensionIconSet::MATCH_EXACTLY)); +} + +INSTANTIATE_TEST_CASE_P(, + ExtensionActionAPIUnitTest, + testing::Values(TestActionType::kBrowser, + TestActionType::kPage)); + +} // namespace +} // namespace extensions
diff --git a/chrome/browser/resources/md_extensions/extensions.html b/chrome/browser/resources/md_extensions/extensions.html index 4e921eb8..05b8af9c 100644 --- a/chrome/browser/resources/md_extensions/extensions.html +++ b/chrome/browser/resources/md_extensions/extensions.html
@@ -9,26 +9,49 @@ </if> <style> html { - /* --md-background-color in disguise. Not using the var for increased - * performance. */ + --dev-mode-toolbar-height: 52px; + /* --google-grey-refresh-700 */ + --toolbar-dark-border: 1px solid rgb(95, 99, 104); + --toolbar-light-color: rgb(51, 103, 214); /* --google-blue-700 */ + --toolbar-height: 56px; + + /* --md-background-color in disguise. */ background-color: rgb(248, 249, 250); /* Remove 300ms delay for 'click' event, when using touch interface. */ touch-action: manipulation; } - .loading { - /* --google-blue-700 in disguise. Replaced when manager.html loads. */ - border-top: 56px solid rgb(51, 103, 214); + html[dark] { + background-color: rgb(32, 33, 36); /* --google-grey-900 */ + } + + html:not([dark]).loading { + /* Replaced when manager.html loads. */ + border-top: var(--toolbar-height) solid var(--toolbar-light-color); + } + + html[dark].loading { + border-top: var(--toolbar-dark-border); + margin-top: var(--toolbar-height); + } + + /* Mimics the developer mode toolbar until the real one loads. */ + html[dark].loading.in-dev-mode::before { + border-bottom: var(--toolbar-dark-border); + content: ''; + display: block; + height: var(--dev-mode-toolbar-height); } /* Note: .in-dev-mode is applied by i18n{loadTimeClasses}. */ - .loading.in-dev-mode { - /* --google-blue-700: rgb(51, 103, 214); */ - /* --google-grey-300: #e0e0e0; */ - border-image: linear-gradient(to bottom, rgb(51, 103, 214) 56px, - #fff 56px, #fff 107px, #e0e0e0 107px) 108; - border-top: 108px solid; + html:not([dark]).loading.in-dev-mode { + border-image: linear-gradient(to bottom, + var(--toolbar-light-color) var(--toolbar-height), + #fff var(--toolbar-height), + #fff 107px, #e0e0e0 /* --google-grey-300 */ 107px) 108; + border-top: calc(var(--toolbar-height) + var(--dev-mode-toolbar-height)) + solid; } html,
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc index 296c3e0..6da3c5c 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -2219,7 +2219,13 @@ BookmarkContextMenuNotificationObserver observer_; }; -VIEW_TEST(BookmarkBarViewTest24, ContextMenusKeyboardEscape) +#if defined(OS_WIN) +// TODO(crbug.com/892228): Re-enable when test framework induced flake is fixed. +#define MAYBE_ContextMenusKeyboardEscape DISABLED_ContextMenusKeyboardEscape +#else +#define MAYBE_ContextMenusKeyboardEscape ContextMenusKeyboardEscape +#endif +VIEW_TEST(BookmarkBarViewTest24, MAYBE_ContextMenusKeyboardEscape) #if defined(OS_WIN) // Tests that pressing the key KEYCODE closes the menu.
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index b5d915c..afd7fc3 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -3592,7 +3592,7 @@ "../browser/extensions/api/device_permissions_manager_unittest.cc", "../browser/extensions/api/downloads/downloads_api_unittest.cc", "../browser/extensions/api/enterprise_hardware_platform/enterprise_hardware_platform_api_unittest.cc", - "../browser/extensions/api/extension_action/browser_action_unittest.cc", + "../browser/extensions/api/extension_action/extension_action_api_unittest.cc", "../browser/extensions/api/extension_action/extension_action_prefs_unittest.cc", "../browser/extensions/api/file_system/file_system_api_unittest.cc", "../browser/extensions/api/identity/extension_token_key_unittest.cc",
diff --git a/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon19.png b/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon19.png deleted file mode 100644 index 84c4be34..0000000 --- a/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon19.png +++ /dev/null Binary files differ
diff --git a/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon24.png b/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon24.png deleted file mode 100644 index 84c4be34..0000000 --- a/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon24.png +++ /dev/null Binary files differ
diff --git a/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon38.png b/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon38.png deleted file mode 100644 index 84c4be34..0000000 --- a/chrome/test/data/extensions/api_test/browser_action/multi_icons/icon38.png +++ /dev/null Binary files differ
diff --git a/chrome/test/data/extensions/api_test/browser_action/multi_icons/manifest.json b/chrome/test/data/extensions/api_test/browser_action/multi_icons/manifest.json deleted file mode 100644 index 694d8102..0000000 --- a/chrome/test/data/extensions/api_test/browser_action/multi_icons/manifest.json +++ /dev/null
@@ -1,13 +0,0 @@ -{ - "name": "A test extension that tests multiple browser action icons", - "version": "1.0", - "manifest_version": 2, - "browser_action": { - "default_icon": { - "19": "icon19.png", - "24": "icon24.png", - "31": "icon24.png", - "38": "icon38.png" - } - } -}
diff --git a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc index f929c04..cfaed11 100644 --- a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc +++ b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc
@@ -152,7 +152,7 @@ } return should_request_name_from_user_ - ? l10n_util::GetStringUTF16(IDS_AUTOFILL_SAVE_CARD_PROMPT_NEXT) + ? l10n_util::GetStringUTF16(IDS_AUTOFILL_SAVE_CARD_PROMPT_CONTINUE) : l10n_util::GetStringUTF16(IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT); }
diff --git a/components/autofill_strings.grdp b/components/autofill_strings.grdp index 1bd264b..18f9683 100644 --- a/components/autofill_strings.grdp +++ b/components/autofill_strings.grdp
@@ -205,12 +205,12 @@ <message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT" desc="Text to show for the Autofill save credit card prompt accept button. The prompt can be either a bubble or an infobar."> Save </message> - <message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_NEXT" desc="Text to show for the Autofill upload save credit card prompt accept button when more information (e.g., CVC) is needed in order to save the card."> - Next - </message> <message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_CONFIRM" desc="Text to show for the Autofill upload save credit card prompt accept button when more information (e.g., CVC) was needed in order to save the card and was entered."> Confirm </message> + <message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_CONTINUE" desc="Text to show for the Autofill upload save credit card prompt accept button when more information (e.g., CVC) was needed in order to save the card and was entered."> + Continue + </message> <message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_LOCAL" desc="Title text for the Autofill save card prompt when the card is to be saved locally. The prompt can be either a bubble or an infobar."> Save card? </message>
diff --git a/content/common/OWNERS b/content/common/OWNERS index a0ebcff..6ca5f15 100644 --- a/content/common/OWNERS +++ b/content/common/OWNERS
@@ -44,3 +44,7 @@ # DirectWrite per-file dwrite_font_platform_win*=scottmg@chromium.org per-file font_warmup_win.cc=scottmg@chromium.org + +# AppCache +per-file appcache_interfaces.h=pwnall@chromium.org +per-file appcache_interfaces.cc=pwnall@chromium.org
diff --git a/content/common/appcache_interfaces.h b/content/common/appcache_interfaces.h index 1e5c678..bccc652 100644 --- a/content/common/appcache_interfaces.h +++ b/content/common/appcache_interfaces.h
@@ -85,30 +85,6 @@ virtual ~AppCacheFrontend() {} }; -// Interface used by frontend (renderer) to talk to backend (browser-process). -class CONTENT_EXPORT AppCacheBackend { - public: - virtual void RegisterHost(int host_id) = 0; - virtual void UnregisterHost(int host_id) = 0; - virtual void SetSpawningHostId(int host_id, int spawning_host_id) = 0; - virtual void SelectCache(int host_id, - const GURL& document_url, - const int64_t cache_document_was_loaded_from, - const GURL& manifest_url) = 0; - virtual void SelectCacheForSharedWorker(int host_id, int64_t appcache_id) = 0; - virtual void MarkAsForeignEntry(int host_id, - const GURL& document_url, - int64_t cache_document_was_loaded_from) = 0; - virtual AppCacheStatus GetStatus(int host_id) = 0; - virtual bool StartUpdate(int host_id) = 0; - virtual bool SwapCache(int host_id) = 0; - virtual void GetResourceList( - int host_id, std::vector<AppCacheResourceInfo>* resource_infos) = 0; - - protected: - virtual ~AppCacheBackend() {} -}; - // Useful string constants. CONTENT_EXPORT extern const char kHttpGETMethod[]; CONTENT_EXPORT extern const char kHttpHEADMethod[];
diff --git a/content/renderer/OWNERS b/content/renderer/OWNERS index d9f1b9b..799e14c 100644 --- a/content/renderer/OWNERS +++ b/content/renderer/OWNERS
@@ -26,3 +26,6 @@ per-file child_frame_compositor*=samans@chromium.org per-file child_frame_compositing_helper*=samans@chromium.org per-file render_frame_metadata*=samans@chromium.org + +# For AppCache. +per-file renderer_webapplicationcachehost_impl*=pwnall@chromium.org
diff --git a/content/renderer/appcache/appcache_backend_proxy.h b/content/renderer/appcache/appcache_backend_proxy.h index 87e9378..3a3c732 100644 --- a/content/renderer/appcache/appcache_backend_proxy.h +++ b/content/renderer/appcache/appcache_backend_proxy.h
@@ -12,34 +12,33 @@ #include "content/common/appcache.mojom.h" #include "content/common/appcache_interfaces.h" #include "ipc/ipc_sender.h" +#include "url/gurl.h" namespace content { // Sends appcache related messages to the main process. -class AppCacheBackendProxy : public AppCacheBackend { +class AppCacheBackendProxy { public: AppCacheBackendProxy(); - ~AppCacheBackendProxy() override; - + ~AppCacheBackendProxy(); // AppCacheBackend methods - void RegisterHost(int host_id) override; - void UnregisterHost(int host_id) override; - void SetSpawningHostId(int host_id, int spawning_host_id) override; + void RegisterHost(int host_id); + void UnregisterHost(int host_id); + void SetSpawningHostId(int host_id, int spawning_host_id); void SelectCache(int host_id, const GURL& document_url, const int64_t cache_document_was_loaded_from, - const GURL& manifest_url) override; - void SelectCacheForSharedWorker(int host_id, int64_t appcache_id) override; + const GURL& manifest_url); + void SelectCacheForSharedWorker(int host_id, int64_t appcache_id); void MarkAsForeignEntry(int host_id, const GURL& document_url, - int64_t cache_document_was_loaded_from) override; - AppCacheStatus GetStatus(int host_id) override; - bool StartUpdate(int host_id) override; - bool SwapCache(int host_id) override; - void GetResourceList( - int host_id, - std::vector<AppCacheResourceInfo>* resource_infos) override; + int64_t cache_document_was_loaded_from); + AppCacheStatus GetStatus(int host_id); + bool StartUpdate(int host_id); + bool SwapCache(int host_id); + void GetResourceList(int host_id, + std::vector<AppCacheResourceInfo>* resource_infos); private: mojom::AppCacheBackend* GetAppCacheBackendPtr();
diff --git a/content/renderer/appcache/web_application_cache_host_impl.cc b/content/renderer/appcache/web_application_cache_host_impl.cc index 6e98e6a5..aa3cd86 100644 --- a/content/renderer/appcache/web_application_cache_host_impl.cc +++ b/content/renderer/appcache/web_application_cache_host_impl.cc
@@ -11,6 +11,7 @@ #include "base/containers/id_map.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" +#include "content/renderer/appcache/appcache_backend_proxy.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/platform/web_url_response.h" @@ -56,7 +57,7 @@ WebApplicationCacheHostImpl::WebApplicationCacheHostImpl( WebApplicationCacheHostClient* client, - AppCacheBackend* backend, + AppCacheBackendProxy* backend, int appcache_host_id) : client_(client), backend_(backend),
diff --git a/content/renderer/appcache/web_application_cache_host_impl.h b/content/renderer/appcache/web_application_cache_host_impl.h index 60332fbf..35a680e 100644 --- a/content/renderer/appcache/web_application_cache_host_impl.h +++ b/content/renderer/appcache/web_application_cache_host_impl.h
@@ -17,18 +17,20 @@ namespace content { +class AppCacheBackendProxy; + class WebApplicationCacheHostImpl : public blink::WebApplicationCacheHost { public: // Returns the host having given id or NULL if there is no such host. static WebApplicationCacheHostImpl* FromId(int id); WebApplicationCacheHostImpl(blink::WebApplicationCacheHostClient* client, - AppCacheBackend* backend, + AppCacheBackendProxy* backend, int appcache_host_id); ~WebApplicationCacheHostImpl() override; int host_id() const { return host_id_; } - AppCacheBackend* backend() const { return backend_; } + AppCacheBackendProxy* backend() const { return backend_; } blink::WebApplicationCacheHostClient* client() const { return client_; } virtual void OnCacheSelected(const AppCacheInfo& info); @@ -65,7 +67,7 @@ enum IsNewMasterEntry { MAYBE_NEW_ENTRY, NEW_ENTRY, OLD_ENTRY }; blink::WebApplicationCacheHostClient* client_; - AppCacheBackend* backend_; + AppCacheBackendProxy* backend_; int host_id_; AppCacheStatus status_; blink::WebURLResponse document_response_;
diff --git a/content/renderer/renderer_webapplicationcachehost_impl.cc b/content/renderer/renderer_webapplicationcachehost_impl.cc index fea3e10..39ec671 100644 --- a/content/renderer/renderer_webapplicationcachehost_impl.cc +++ b/content/renderer/renderer_webapplicationcachehost_impl.cc
@@ -5,6 +5,7 @@ #include "content/renderer/renderer_webapplicationcachehost_impl.h" #include "content/common/view_messages.h" +#include "content/renderer/appcache/appcache_backend_proxy.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_thread_impl.h" #include "content/renderer/render_view_impl.h" @@ -20,7 +21,7 @@ RendererWebApplicationCacheHostImpl::RendererWebApplicationCacheHostImpl( RenderViewImpl* render_view, WebApplicationCacheHostClient* client, - AppCacheBackend* backend, + AppCacheBackendProxy* backend, int appcache_host_id, int frame_routing_id) : WebApplicationCacheHostImpl(client, backend, appcache_host_id),
diff --git a/content/renderer/renderer_webapplicationcachehost_impl.h b/content/renderer/renderer_webapplicationcachehost_impl.h index 0a04c56..a369480 100644 --- a/content/renderer/renderer_webapplicationcachehost_impl.h +++ b/content/renderer/renderer_webapplicationcachehost_impl.h
@@ -9,13 +9,14 @@ namespace content { class RenderViewImpl; +class AppCacheBackendProxy; class RendererWebApplicationCacheHostImpl : public WebApplicationCacheHostImpl { public: RendererWebApplicationCacheHostImpl( RenderViewImpl* render_view, blink::WebApplicationCacheHostClient* client, - AppCacheBackend* backend, + AppCacheBackendProxy* backend, int appcache_host_id, int frame_routing_id);
diff --git a/docs/windows_build_instructions.md b/docs/windows_build_instructions.md index 5350c0e..ea94a7b 100644 --- a/docs/windows_build_instructions.md +++ b/docs/windows_build_instructions.md
@@ -23,13 +23,13 @@ ### Visual Studio -As of September, 2017 (R503915) Chromium requires Visual Studio 2017 (15.7.2 or -higher) to build. The clang-cl compiler is used but Visual Studio's header -files, libraries, and some tools are required. Visual Studio Community Edition -should work if its license is appropriate for you. You must install the "Desktop -development with C++" component and the "MFC and ATL support" sub-component. -This can be done from the command line by passing these arguments to the Visual -Studio installer that you download (see below for ARM64 instructions): +Chromium requires Visual Studio 2017 (>=15.7.2) or 2019 (>=16.0.0) to build. +The clang-cl compiler is used but Visual Studio's header files, libraries, and +some tools are required. Visual Studio Community Edition should work if its +license is appropriate for you. You must install the "Desktop development with +C++" component and the "MFC/ATL support" sub-components. This can be done from +the command line by passing these arguments to the Visual Studio installer (see +below for ARM64 instructions): ```shell $ PATH_TO_INSTALLER.EXE ^ --add Microsoft.VisualStudio.Workload.NativeDesktop ^
diff --git a/ios/chrome/browser/context_menu/BUILD.gn b/ios/chrome/browser/context_menu/BUILD.gn index 63b60e5..a49caaa90 100644 --- a/ios/chrome/browser/context_menu/BUILD.gn +++ b/ios/chrome/browser/context_menu/BUILD.gn
@@ -11,7 +11,6 @@ deps = [ "//base", "//base/test:test_support", - "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser/ui", "//ios/chrome/test/app:test_support",
diff --git a/ios/chrome/browser/context_menu/context_menu_egtest.mm b/ios/chrome/browser/context_menu/context_menu_egtest.mm index d0b13d5..f75a001a0 100644 --- a/ios/chrome/browser/context_menu/context_menu_egtest.mm +++ b/ios/chrome/browser/context_menu/context_menu_egtest.mm
@@ -7,7 +7,6 @@ #import <XCTest/XCTest.h> #import "base/test/ios/wait_util.h" -#include "components/strings/grit/components_strings.h" #include "ios/chrome/browser/ui/util/ui_util.h" #include "ios/chrome/grit/ios_strings.h" #import "ios/chrome/test/app/chrome_test_util.h" @@ -361,71 +360,4 @@ }); } -// Tests cancelling the context menu. -- (void)testDismissContextMenu { - const GURL initialURL = self.testServer->GetURL(kInitialPageUrl); - [ChromeEarlGrey loadURL:initialURL]; - [ChromeEarlGrey waitForWebViewContainingText:kInitialPageDestinationLinkText]; - - // Display the context menu twice. - for (NSInteger i = 0; i < 2; i++) { - LongPressElement(kInitialPageDestinationLinkId); - - // Make sure the context menu appeared. - [[EarlGrey selectElementWithMatcher:OpenLinkInNewTabButton()] - assertWithMatcher:grey_notNil()]; - - if (IsIPadIdiom()) { - // Tap the tools menu to dismiss the popover. - [[EarlGrey selectElementWithMatcher:chrome_test_util::ToolsMenuButton()] - performAction:grey_tap()]; - } else { - TapOnContextMenuButton(chrome_test_util::CancelButton()); - } - - // Make sure the context menu disappeared. - [[EarlGrey selectElementWithMatcher:OpenLinkInNewTabButton()] - assertWithMatcher:grey_nil()]; - } - - // Display the context menu one last time. - LongPressElement(kInitialPageDestinationLinkId); - - // Make sure the context menu appeared. - [[EarlGrey selectElementWithMatcher:OpenLinkInNewTabButton()] - assertWithMatcher:grey_notNil()]; -} - -// Checks that all the options are displayed in the context menu. -- (void)testAppropriateContextMenu { - const GURL initialURL = self.testServer->GetURL(kInitialPageUrl); - [ChromeEarlGrey loadURL:initialURL]; - [ChromeEarlGrey waitForWebViewContainingText:kInitialPageDestinationLinkText]; - - LongPressElement(kInitialPageDestinationLinkId); - - // Check the different buttons. - [[EarlGrey - selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( - IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB)] - assertWithMatcher:grey_sufficientlyVisible()]; - [[EarlGrey selectElementWithMatcher: - chrome_test_util::ButtonWithAccessibilityLabelId( - IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWINCOGNITOTAB)] - assertWithMatcher:grey_sufficientlyVisible()]; - [[EarlGrey - selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( - IDS_IOS_CONTENT_CONTEXT_ADDTOREADINGLIST)] - assertWithMatcher:grey_sufficientlyVisible()]; - [[EarlGrey - selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( - IDS_IOS_CONTENT_CONTEXT_COPY)] - assertWithMatcher:grey_sufficientlyVisible()]; - if (!IsIPadIdiom()) { - [[EarlGrey selectElementWithMatcher: - chrome_test_util::ButtonWithAccessibilityLabelId(IDS_CANCEL)] - assertWithMatcher:grey_sufficientlyVisible()]; - } -} - @end
diff --git a/ios/chrome/browser/ui/authentication/cells/table_view_signin_promo_item.mm b/ios/chrome/browser/ui/authentication/cells/table_view_signin_promo_item.mm index 798a08c..e6f2e2f 100644 --- a/ios/chrome/browser/ui/authentication/cells/table_view_signin_promo_item.mm +++ b/ios/chrome/browser/ui/authentication/cells/table_view_signin_promo_item.mm
@@ -21,9 +21,6 @@ #pragma mark - TableViewSigninPromoItem @implementation TableViewSigninPromoItem -@synthesize configurator = _configurator; -@synthesize delegate = _delegate; -@synthesize text = _text; - (instancetype)initWithType:(NSInteger)type { self = [super initWithType:type];
diff --git a/ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm b/ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm index fbea349a..e70c107 100644 --- a/ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm +++ b/ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm
@@ -72,7 +72,6 @@ SectionIdentifierAccountCell, SectionIdentifierAccountControlCell, SectionIdentifierFooters, - SectionIdentifierSync, SectionIdentifierContentSuggestionsCell, }; @@ -235,14 +234,6 @@ // Multiline cells. [model addSectionWithIdentifier:SectionIdentifierMultilineCell]; - CardMultilineItem* multilineItem = - [[CardMultilineItem alloc] initWithType:ItemTypeMultilineBasic]; - multilineItem.text = - @"Lorem ipsum dolor sit amet, consectetur " - @"adipiscing elit, sed do eiusmod tempor " - @"incididunt ut labore et dolore magna aliqua."; - [model addItem:multilineItem - toSectionWithIdentifier:SectionIdentifierMultilineCell]; [model addItem:[self settingsImageDetailTextItem] toSectionWithIdentifier:SectionIdentifierMultilineCell]; LegacySettingsImageDetailTextItem* settingsImageDetailTextItem = @@ -384,11 +375,6 @@ [model addItem:[self warmStateSigninPromoItem] toSectionWithIdentifier:SectionIdentifierAccountCell]; - // Sync cells. - [model addSectionWithIdentifier:SectionIdentifierSync]; - [model addItem:[self syncPassphraseErrorItem] - toSectionWithIdentifier:SectionIdentifierSync]; - // Account control cells. [model addSectionWithIdentifier:SectionIdentifierAccountControlCell]; [model addItem:[self accountControlItem] @@ -819,13 +805,6 @@ return footerItem; } -- (PassphraseErrorItem*)syncPassphraseErrorItem { - PassphraseErrorItem* item = - [[PassphraseErrorItem alloc] initWithType:ItemTypeSyncPassphraseError]; - item.text = @"Incorrect passphrase"; - return item; -} - - (PasswordDetailsItem*)passwordDetailsShortHiddenItem { PasswordDetailsItem* item = [[PasswordDetailsItem alloc] initWithType:ItemTypePasswordDetailsShortHidden];
diff --git a/ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm b/ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm index bc146363..1b889ae 100644 --- a/ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm +++ b/ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm
@@ -5,7 +5,9 @@ #import "ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.h" #import "ios/chrome/browser/ui/authentication/cells/account_control_item.h" +#import "ios/chrome/browser/ui/authentication/cells/signin_promo_view_configurator.h" #import "ios/chrome/browser/ui/authentication/cells/table_view_account_item.h" +#import "ios/chrome/browser/ui/authentication/cells/table_view_signin_promo_item.h" #import "ios/chrome/browser/ui/autofill/cells/autofill_edit_item.h" #import "ios/chrome/browser/ui/icons/chrome_icon.h" #import "ios/chrome/browser/ui/settings/cells/autofill_data_item.h" @@ -281,6 +283,16 @@ toSectionWithIdentifier:SectionIdentifierAutofill]; // SectionIdentifierAccount. + TableViewSigninPromoItem* signinPromo = + [[TableViewSigninPromoItem alloc] initWithType:ItemTypeAccount]; + signinPromo.configurator = [[SigninPromoViewConfigurator alloc] + initWithUserEmail:@"jonhdoe@example.com" + userFullName:@"John Doe" + userImage:nil + hasCloseButton:NO]; + signinPromo.text = @"Signin promo text example"; + [model addItem:signinPromo toSectionWithIdentifier:SectionIdentifierAccount]; + TableViewAccountItem* accountItemDetailWithError = [[TableViewAccountItem alloc] initWithType:ItemTypeAccount]; // TODO(crbug.com/754032): ios_default_avatar image is from a downstream iOS
diff --git a/media/gpu/android/media_codec_video_decoder.cc b/media/gpu/android/media_codec_video_decoder.cc index 6a1b9839..1fa3f81 100644 --- a/media/gpu/android/media_codec_video_decoder.cc +++ b/media/gpu/android/media_codec_video_decoder.cc
@@ -164,6 +164,9 @@ DVLOG(1) << __func__; TRACE_EVENT0("media", "MediaCodecVideoDecoder::Destroy"); + // Cancel pending callbacks. + weak_factory_.InvalidateWeakPtrs(); + if (media_crypto_context_) { // Cancel previously registered callback (if any). media_crypto_context_->SetMediaCryptoReadyCB(base::NullCallback());
diff --git a/net/third_party/quic/core/crypto/crypto_utils.cc b/net/third_party/quic/core/crypto/crypto_utils.cc index bb996e8..c85a2cd8 100644 --- a/net/third_party/quic/core/crypto/crypto_utils.cc +++ b/net/third_party/quic/core/crypto/crypto_utils.cc
@@ -110,7 +110,7 @@ handshake_secret.resize(EVP_MAX_MD_SIZE); size_t handshake_secret_len; if (!HKDF_extract(handshake_secret.data(), &handshake_secret_len, hash, - connection_id_bytes, arraysize(connection_id_bytes), + connection_id_bytes, QUIC_ARRAYSIZE(connection_id_bytes), kInitialSalt, QUIC_ARRAYSIZE(kInitialSalt))) { QUIC_BUG << "HKDF_extract failed when creating initial crypters"; }
diff --git a/net/third_party/quic/platform/impl/quic_arraysize_impl.h b/net/third_party/quic/platform/impl/quic_arraysize_impl.h index f909da1..fc417a3 100644 --- a/net/third_party/quic/platform/impl/quic_arraysize_impl.h +++ b/net/third_party/quic/platform/impl/quic_arraysize_impl.h
@@ -5,6 +5,8 @@ #ifndef NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_ARRAYSIZE_IMPL_H_ #define NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_ARRAYSIZE_IMPL_H_ -#define QUIC_ARRAYSIZE_IMPL(array) arraysize(array) +#include "base/stl_util.h" + +#define QUIC_ARRAYSIZE_IMPL(array) base::size(array) #endif // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_ARRAYSIZE_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_socket_utils.cc b/net/third_party/quic/platform/impl/quic_socket_utils.cc index 1f252e5..613e890 100644 --- a/net/third_party/quic/platform/impl/quic_socket_utils.cc +++ b/net/third_party/quic/platform/impl/quic_socket_utils.cc
@@ -15,6 +15,7 @@ #include <string> #include "net/third_party/quic/core/quic_packets.h" +#include "net/third_party/quic/platform/api/quic_arraysize.h" #include "net/third_party/quic/platform/api/quic_bug_tracker.h" #include "net/third_party/quic/platform/api/quic_flags.h" #include "net/third_party/quic/platform/api/quic_logging.h" @@ -220,9 +221,9 @@ hdr.msg_flags = 0; struct cmsghdr* cmsg = reinterpret_cast<struct cmsghdr*>(cbuf); - cmsg->cmsg_len = arraysize(cbuf); + cmsg->cmsg_len = QUIC_ARRAYSIZE(cbuf); hdr.msg_control = cmsg; - hdr.msg_controllen = arraysize(cbuf); + hdr.msg_controllen = QUIC_ARRAYSIZE(cbuf); int bytes_read = recvmsg(fd, &hdr, 0); @@ -237,7 +238,7 @@ if (hdr.msg_flags & MSG_CTRUNC) { QUIC_BUG << "Incorrectly set control length: " << hdr.msg_controllen - << ", expected " << arraysize(cbuf); + << ", expected " << QUIC_ARRAYSIZE(cbuf); return -1; }
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 5c78ebb..95da4b76 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -4965,10 +4965,184 @@ ] }, "Linux FYI Experimental Release (NVIDIA)": { + "gtest_tests": [ + { + "args": [ + "--use-gpu-in-tests", + "--test-launcher-retry-limit=0" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "shards": 4 + }, + "test": "angle_end2end_tests" + }, + { + "args": [ + "--use-gpu-in-tests", + "--test-launcher-retry-limit=0", + "--no-xvfb" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ] + }, + "test": "angle_unittests" + }, + { + "args": [ + "--test-launcher-retry-limit=0" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ] + }, + "test": "angle_white_box_tests" + }, + { + "args": [ + "--enable-gpu", + "--test-launcher-bot-mode", + "--test-launcher-jobs=1", + "--gtest_filter=CastStreamingApiTestWithPixelOutput.EndToEnd*:TabCaptureApiPixelTest.EndToEnd*", + "--no-xvfb" + ], + "name": "tab_capture_end2end_tests", + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ] + }, + "test": "browser_tests" + }, + { + "args": [ + "--use-gpu-in-tests", + "--test-launcher-retry-limit=0" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "shards": 4 + }, + "test": "dawn_end2end_tests" + }, + { + "args": [ + "--use-gpu-in-tests", + "--use-cmd-decoder=validating" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ] + }, + "test": "gl_tests" + }, + { + "args": [ + "--use-gpu-in-tests", + "--no-xvfb" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ] + }, + "test": "gl_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ] + }, + "test": "gles2_conform_test" + }, + { + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ] + }, + "test": "swiftshader_unittests" + } + ], "isolated_scripts": [ { "args": [ - "noop_sleep", + "-v", + "--one-frame-only" + ], + "isolate_name": "angle_perftests", + "name": "angle_perftests", + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ] + } + }, + { + "args": [ + "context_lost", "--show-stdout", "--browser=release", "--passthrough", @@ -4976,19 +5150,342 @@ "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" ], "isolate_name": "telemetry_gpu_integration_test", - "name": "noop_sleep_tests", + "name": "context_lost_tests", "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "dimension_sets": [ { - "gpu": "10de:1cb3-384.90", + "gpu": "10de:1cb3-410.78", "os": "Ubuntu", "pool": "Chrome-GPU" } ], "idempotent": false } + }, + { + "args": [ + "depth_capture", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "depth_capture_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false + } + }, + { + "args": [ + "gpu_process", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "gpu_process_launch_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false + } + }, + { + "args": [ + "hardware_accelerated_feature", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "hardware_accelerated_feature_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false + } + }, + { + "args": [ + "info_collection", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", + "--expected-vendor-id", + "10de", + "--expected-device-id", + "1cb3" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "info_collection_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false + } + }, + { + "args": [ + "maps", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", + "--dont-restore-color-profile-after-test", + "--os-type", + "linux", + "--build-revision", + "${got_revision}", + "--test-machine-name", + "${buildername}" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "maps_pixel_test", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false + } + }, + { + "args": [ + "pixel", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", + "--dont-restore-color-profile-after-test", + "--refimg-cloud-storage-bucket", + "chromium-gpu-archive/reference-images", + "--os-type", + "linux", + "--build-revision", + "${got_revision}", + "--test-machine-name", + "${buildername}" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "pixel_test", + "non_precommit_args": [ + "--upload-refimg-to-cloud-storage" + ], + "precommit_args": [ + "--download-refimg-from-cloud-storage" + ], + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false + } + }, + { + "args": [ + "screenshot_sync", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", + "--dont-restore-color-profile-after-test" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "screenshot_sync_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false + } + }, + { + "args": [ + "trace_test", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "trace_test", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false + } + }, + { + "args": [ + "webgl_conformance", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle --use-angle=gl --use-cmd-decoder=passthrough", + "--webgl-conformance-version=2.0.1", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "webgl2_conformance_gl_passthrough_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false, + "shards": 20 + } + }, + { + "args": [ + "webgl_conformance", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", + "--webgl-conformance-version=2.0.1", + "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "webgl2_conformance_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false, + "shards": 20 + } + }, + { + "args": [ + "webgl_conformance", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle --use-angle=gl --use-cmd-decoder=passthrough" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "webgl_conformance_gl_passthrough_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false, + "shards": 2 + } + }, + { + "args": [ + "webgl_conformance", + "--show-stdout", + "--browser=release", + "--passthrough", + "-v", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" + ], + "isolate_name": "telemetry_gpu_integration_test", + "name": "webgl_conformance_tests", + "should_retry_with_patch": false, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:1cb3-410.78", + "os": "Ubuntu", + "pool": "Chrome-GPU" + } + ], + "idempotent": false, + "shards": 2 + } } ] },
diff --git a/testing/buildbot/mixins.pyl b/testing/buildbot/mixins.pyl index e907a31a..8df1a94 100644 --- a/testing/buildbot/mixins.pyl +++ b/testing/buildbot/mixins.pyl
@@ -264,6 +264,15 @@ } } }, + 'linux_nvidia_quadro_p400_experimental': { + 'swarming': { + 'dimensions': { + 'gpu': '10de:1cb3-410.78', + 'os': 'Ubuntu', + 'pool': 'Chrome-GPU', + }, + }, + }, 'lollipop': { 'swarming': { 'dimensions': {
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index c2a972d2..272db5dd 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -3317,16 +3317,18 @@ }, }, - 'gpu_noop_sleep_telemetry_test': { - # The former GPU-specific generator script contained logic to - # detect whether the so-called "experimental" GPU bots, which test - # newer driver versions, were identical to the "stable" versions - # of the bots, and if so to mirror their configurations. We prefer - # to keep this new script simpler and to just configure this by - # hand in waterfalls.pyl. - 'noop_sleep': { - } - }, + # Temporarily disabled because it is not used anywhere. + # TODO(jmadill): Re-enable after upgrade. http://crbug.com/887241 + # 'gpu_noop_sleep_telemetry_test': { + # # The former GPU-specific generator script contained logic to + # # detect whether the so-called "experimental" GPU bots, which test + # # newer driver versions, were identical to the "stable" versions + # # of the bots, and if so to mirror their configurations. We prefer + # # to keep this new script simpler and to just configure this by + # # hand in waterfalls.pyl. + # 'noop_sleep': { + # } + # }, 'gpu_telemetry_tests': { 'context_lost': {},
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 47905f26..9bdd1c11e 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -2284,23 +2284,13 @@ 'Linux FYI Experimental Release (NVIDIA)': { 'os_type': 'linux', 'browser_config': 'release', - 'swarming': { - 'dimension_sets': [ - { - # LINUX_QUADRO_P400_EXPERIMENTAL_DRIVER - # TODO(jmadill): Update this with new driver. http://crbug.com/887241 - 'gpu': '10de:1cb3-384.90', - 'os': 'Ubuntu', - 'pool': 'Chrome-GPU', - }, - ], - }, - # Currently the experimental driver is identical to the stable - # driver. If it's upgraded, change these test_suites to be the same as - # 'Linux FYI Release (NVIDIA)'. - # TODO(jmadill): Update this to add tests. http://crbug.com/887241 + 'mixins': [ + 'linux_nvidia_quadro_p400_experimental', + ], 'test_suites': { - 'gpu_telemetry_tests': 'gpu_noop_sleep_telemetry_test', + 'gtest_tests': 'gpu_fyi_linux_release_gtests', + 'isolated_scripts': 'gpu_fyi_and_optional_isolated_scripts', + 'gpu_telemetry_tests': 'gpu_fyi_linux_intel_and_nvidia_release_telemetry_tests', }, }, 'Linux FYI GPU TSAN Release': {
diff --git a/third_party/blink/public/platform/OWNERS b/third_party/blink/public/platform/OWNERS index 65e1bbf..9b95924 100644 --- a/third_party/blink/public/platform/OWNERS +++ b/third_party/blink/public/platform/OWNERS
@@ -12,5 +12,6 @@ per-file *.typemap=set noparent per-file *.typemap=file://ipc/SECURITY_OWNERS +per-file web_application_cache_*=pwnall@chromium.org per-file web_rtc_*=hbos@chromium.org per-file web_media_player*=mlamouri@chromium.org
diff --git a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc index ab050462..61b9116 100644 --- a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc
@@ -1093,12 +1093,14 @@ const AtomicString& method, const KURL& url, bool async, + EncodedFormData* form_data, const HTTPHeaderMap& headers, bool include_credentials) { DCHECK(xhr); DCHECK(!pending_request_); pending_xhr_replay_data_ = XHRReplayData::Create( - method, UrlWithoutFragment(url), async, include_credentials); + method, UrlWithoutFragment(url), async, + form_data ? form_data->DeepCopy() : nullptr, include_credentials); for (const auto& header : headers) pending_xhr_replay_data_->AddHeader(header.key, header.value); } @@ -1424,8 +1426,12 @@ xhr->setRequestHeader(header.key, header.value, IGNORE_EXCEPTION_FOR_TESTING); } - xhr->SendForInspectorXHRReplay(data ? data->PostData() : nullptr, - IGNORE_EXCEPTION_FOR_TESTING); + scoped_refptr<EncodedFormData> post_data; + if (data) + post_data = data->PostData(); + if (!post_data) + post_data = xhr_replay_data->FormData(); + xhr->SendForInspectorXHRReplay(post_data, IGNORE_EXCEPTION_FOR_TESTING); replay_xhrs_.insert(xhr); return Response::OK();
diff --git a/third_party/blink/renderer/core/inspector/inspector_network_agent.h b/third_party/blink/renderer/core/inspector/inspector_network_agent.h index 2b96380..e1cdcc16 100644 --- a/third_party/blink/renderer/core/inspector/inspector_network_agent.h +++ b/third_party/blink/renderer/core/inspector/inspector_network_agent.h
@@ -141,6 +141,7 @@ const AtomicString& method, const KURL&, bool async, + EncodedFormData* form_data, const HTTPHeaderMap& headers, bool include_crendentials); void DidFinishXHR(XMLHttpRequest*);
diff --git a/third_party/blink/renderer/core/inspector/network_resources_data.cc b/third_party/blink/renderer/core/inspector/network_resources_data.cc index 76ba31d..87485fc 100644 --- a/third_party/blink/renderer/core/inspector/network_resources_data.cc +++ b/third_party/blink/renderer/core/inspector/network_resources_data.cc
@@ -45,9 +45,10 @@ XHRReplayData* XHRReplayData::Create(const AtomicString& method, const KURL& url, bool async, + scoped_refptr<EncodedFormData> form_data, bool include_credentials) { - return MakeGarbageCollected<XHRReplayData>(method, url, async, - include_credentials); + return MakeGarbageCollected<XHRReplayData>( + method, url, async, std::move(form_data), include_credentials); } void XHRReplayData::AddHeader(const AtomicString& key, @@ -58,10 +59,12 @@ XHRReplayData::XHRReplayData(const AtomicString& method, const KURL& url, bool async, + scoped_refptr<EncodedFormData> form_data, bool include_credentials) : method_(method), url_(url), async_(async), + form_data_(form_data), include_credentials_(include_credentials) {} // ResourceData
diff --git a/third_party/blink/renderer/core/inspector/network_resources_data.h b/third_party/blink/renderer/core/inspector/network_resources_data.h index 8749817f..eda26619 100644 --- a/third_party/blink/renderer/core/inspector/network_resources_data.h +++ b/third_party/blink/renderer/core/inspector/network_resources_data.h
@@ -54,17 +54,20 @@ static XHRReplayData* Create(const AtomicString& method, const KURL&, bool async, + scoped_refptr<EncodedFormData>, bool include_credentials); XHRReplayData(const AtomicString& method, const KURL&, bool async, + scoped_refptr<EncodedFormData>, bool include_credentials); void AddHeader(const AtomicString& key, const AtomicString& value); const AtomicString& Method() const { return method_; } const KURL& Url() const { return url_; } bool Async() const { return async_; } + EncodedFormData* FormData() const { return form_data_.get(); } const HTTPHeaderMap& Headers() const { return headers_; } bool IncludeCredentials() const { return include_credentials_; } @@ -74,6 +77,7 @@ AtomicString method_; KURL url_; bool async_; + scoped_refptr<EncodedFormData> form_data_; HTTPHeaderMap headers_; bool include_credentials_; }; @@ -162,7 +166,7 @@ void SetPostData(scoped_refptr<EncodedFormData> post_data) { post_data_ = post_data; } - scoped_refptr<EncodedFormData> PostData() const { return post_data_; } + EncodedFormData* PostData() const { return post_data_.get(); } ExecutionContext* GetExecutionContext() const { return execution_context_; } void Trace(blink::Visitor*);
diff --git a/third_party/blink/renderer/core/layout/layout_block.cc b/third_party/blink/renderer/core/layout/layout_block.cc index 5b31788..3b67df83 100644 --- a/third_party/blink/renderer/core/layout/layout_block.cc +++ b/third_party/blink/renderer/core/layout/layout_block.cc
@@ -2104,13 +2104,13 @@ return layout_object->RecalcLayoutOverflow(); } -bool LayoutBlock::RecalcNormalFlowChildVisualOverflowIfNeeded( +void LayoutBlock::RecalcNormalFlowChildVisualOverflowIfNeeded( LayoutObject* layout_object) { if (layout_object->IsOutOfFlowPositioned() || (layout_object->HasLayer() && ToLayoutBoxModelObject(layout_object)->HasSelfPaintingLayer())) - return false; - return layout_object->RecalcVisualOverflow(); + return; + layout_object->RecalcVisualOverflow(); } bool LayoutBlock::RecalcChildLayoutOverflow() { @@ -2135,26 +2135,19 @@ children_layout_overflow_changed; } -bool LayoutBlock::RecalcChildVisualOverflow() { +void LayoutBlock::RecalcChildVisualOverflow() { DCHECK(!IsTable()); - DCHECK(ChildNeedsVisualOverflowRecalc()); - ClearChildNeedsVisualOverflowRecalc(); - - bool children_visual_overflow_changed = false; if (ChildrenInline()) { SECURITY_DCHECK(IsLayoutBlockFlow()); - children_visual_overflow_changed = - ToLayoutBlockFlow(this)->RecalcInlineChildrenVisualOverflow(); + ToLayoutBlockFlow(this)->RecalcInlineChildrenVisualOverflow(); } else { for (LayoutBox* box = FirstChildBox(); box; box = box->NextSiblingBox()) { - if (RecalcNormalFlowChildVisualOverflowIfNeeded(box)) - children_visual_overflow_changed = true; + RecalcNormalFlowChildVisualOverflowIfNeeded(box); } } - return RecalcPositionedDescendantsVisualOverflow() || - children_visual_overflow_changed; + RecalcPositionedDescendantsVisualOverflow(); } bool LayoutBlock::RecalcPositionedDescendantsLayoutOverflow() { @@ -2171,20 +2164,16 @@ return children_layout_overflow_changed; } -bool LayoutBlock::RecalcPositionedDescendantsVisualOverflow() { - bool children_visual_overflow_changed = false; - +void LayoutBlock::RecalcPositionedDescendantsVisualOverflow() { TrackedLayoutBoxListHashSet* positioned_descendants = PositionedObjects(); if (!positioned_descendants) - return children_visual_overflow_changed; + return; for (auto* box : *positioned_descendants) { if (box->HasLayer() && box->HasSelfPaintingLayer()) continue; - if (box->RecalcVisualOverflow()) - children_visual_overflow_changed = true; + box->RecalcVisualOverflow(); } - return children_visual_overflow_changed; } bool LayoutBlock::RecalcLayoutOverflow() { @@ -2199,23 +2188,9 @@ return RecalcSelfLayoutOverflow(); } -bool LayoutBlock::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - bool visual_overflow_changed = false; - if (ChildNeedsVisualOverflowRecalc()) - visual_overflow_changed = RecalcChildVisualOverflow(); - - if (SelfNeedsVisualOverflowRecalc()) - visual_overflow_changed = true; - - if (RecalcSelfVisualOverflow()) - visual_overflow_changed = true; - - ClearChildNeedsVisualOverflowRecalc(); - ClearSelfNeedsVisualOverflowRecalc(); - - return visual_overflow_changed; +void LayoutBlock::RecalcVisualOverflow() { + RecalcChildVisualOverflow(); + RecalcSelfVisualOverflow(); } bool LayoutBlock::RecalcSelfLayoutOverflow() { @@ -2233,11 +2208,8 @@ return !HasOverflowClip() || self_needs_layout_overflow_recalc; } -bool LayoutBlock::RecalcSelfVisualOverflow() { +void LayoutBlock::RecalcSelfVisualOverflow() { ComputeVisualOverflow(true); - // TODO(chrishtr): what does it have to do with HasOverflowClip()? Why - // not just return true if the visual overflow actually changed? - return !HasOverflowClip(); } // Called when a positioned object moves but doesn't necessarily change size.
diff --git a/third_party/blink/renderer/core/layout/layout_block.h b/third_party/blink/renderer/core/layout/layout_block.h index 466e053b..d5fe0eed 100644 --- a/third_party/blink/renderer/core/layout/layout_block.h +++ b/third_party/blink/renderer/core/layout/layout_block.h
@@ -325,17 +325,17 @@ protected: bool RecalcNormalFlowChildLayoutOverflowIfNeeded(LayoutObject*); - bool RecalcNormalFlowChildVisualOverflowIfNeeded(LayoutObject*); + void RecalcNormalFlowChildVisualOverflowIfNeeded(LayoutObject*); bool RecalcPositionedDescendantsLayoutOverflow(); - bool RecalcPositionedDescendantsVisualOverflow(); + void RecalcPositionedDescendantsVisualOverflow(); bool RecalcSelfLayoutOverflow(); - bool RecalcSelfVisualOverflow(); + void RecalcSelfVisualOverflow(); public: bool RecalcChildLayoutOverflow(); - bool RecalcChildVisualOverflow(); + void RecalcChildVisualOverflow(); bool RecalcLayoutOverflow() override; - bool RecalcVisualOverflow() override; + void RecalcVisualOverflow() override; // An example explaining layout tree structure about first-line style: // <style>
diff --git a/third_party/blink/renderer/core/layout/layout_block_flow.cc b/third_party/blink/renderer/core/layout/layout_block_flow.cc index daa3145..102c0b9 100644 --- a/third_party/blink/renderer/core/layout/layout_block_flow.cc +++ b/third_party/blink/renderer/core/layout/layout_block_flow.cc
@@ -4693,20 +4693,17 @@ return children_layout_overflow_changed; } -bool LayoutBlockFlow::RecalcInlineChildrenVisualOverflow() { +void LayoutBlockFlow::RecalcInlineChildrenVisualOverflow() { DCHECK(ChildrenInline()); - bool children_visual_overflow_changed = false; ListHashSet<RootInlineBox*> line_boxes; for (InlineWalker walker(LineLayoutBlockFlow(this)); !walker.AtEnd(); walker.Advance()) { LayoutObject* layout_object = walker.Current().GetLayoutObject(); - if (RecalcNormalFlowChildVisualOverflowIfNeeded(layout_object)) { - children_visual_overflow_changed = true; - if (layout_object->IsBox()) { - if (InlineBox* inline_box_wrapper = - ToLayoutBox(layout_object)->InlineBoxWrapper()) - line_boxes.insert(&inline_box_wrapper->Root()); - } + RecalcNormalFlowChildVisualOverflowIfNeeded(layout_object); + if (layout_object->IsBox()) { + if (InlineBox* inline_box_wrapper = + ToLayoutBox(layout_object)->InlineBoxWrapper()) + line_boxes.insert(&inline_box_wrapper->Root()); } } @@ -4717,8 +4714,6 @@ RootInlineBox* box = *it; box->AddReplacedChildrenVisualOverflow(box->LineTop(), box->LineBottom()); } - - return children_visual_overflow_changed; } PositionWithAffinity LayoutBlockFlow::PositionForPoint(
diff --git a/third_party/blink/renderer/core/layout/layout_block_flow.h b/third_party/blink/renderer/core/layout/layout_block_flow.h index f754999c..bfd9dff 100644 --- a/third_party/blink/renderer/core/layout/layout_block_flow.h +++ b/third_party/blink/renderer/core/layout/layout_block_flow.h
@@ -425,7 +425,7 @@ void SimplifiedNormalFlowInlineLayout(); bool RecalcInlineChildrenLayoutOverflow(); - bool RecalcInlineChildrenVisualOverflow(); + void RecalcInlineChildrenVisualOverflow(); PositionWithAffinity PositionForPoint(const LayoutPoint&) const override;
diff --git a/third_party/blink/renderer/core/layout/layout_list_item.cc b/third_party/blink/renderer/core/layout/layout_list_item.cc index dc5c2ff..4aba376 100644 --- a/third_party/blink/renderer/core/layout/layout_list_item.cc +++ b/third_party/blink/renderer/core/layout/layout_list_item.cc
@@ -287,23 +287,9 @@ return false; } -bool LayoutListItem::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - bool visual_overflow_changed = false; - if (ChildNeedsVisualOverflowRecalc()) - visual_overflow_changed = RecalcChildVisualOverflow(); - // UpdateOverflow may override the visual overflow rect for inline boxes. - - if (SelfNeedsVisualOverflowRecalc()) - visual_overflow_changed = true; - if (RecalcSelfVisualOverflow()) - visual_overflow_changed = true; - - ClearChildNeedsVisualOverflowRecalc(); - ClearSelfNeedsVisualOverflowRecalc(); - - return visual_overflow_changed; +void LayoutListItem::RecalcVisualOverflow() { + RecalcChildVisualOverflow(); + RecalcSelfVisualOverflow(); } void LayoutListItem::ComputeVisualOverflow(bool recompute_floats) {
diff --git a/third_party/blink/renderer/core/layout/layout_list_item.h b/third_party/blink/renderer/core/layout/layout_list_item.h index c35aa165d..3984e8d 100644 --- a/third_party/blink/renderer/core/layout/layout_list_item.h +++ b/third_party/blink/renderer/core/layout/layout_list_item.h
@@ -48,7 +48,7 @@ const char* GetName() const override { return "LayoutListItem"; } - bool RecalcVisualOverflow() override; + void RecalcVisualOverflow() override; private: bool IsOfType(LayoutObjectType type) const override {
diff --git a/third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.cc b/third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.cc index e50c236..b5bd25c 100644 --- a/third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.cc +++ b/third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.cc
@@ -94,14 +94,11 @@ return layout_object_in_flow_thread_->NeedsPreferredWidthsRecalculation(); } -bool LayoutMultiColumnSpannerPlaceholder::RecalcVisualOverflow() { - LayoutRect old_contents_overflow = ContentsVisualOverflowRect(); - bool visual_overflow_changed = LayoutBox::RecalcVisualOverflow(); +void LayoutMultiColumnSpannerPlaceholder::RecalcVisualOverflow() { + LayoutBox::RecalcVisualOverflow(); ClearVisualOverflow(); AddContentsVisualOverflow( layout_object_in_flow_thread_->VisualOverflowRect()); - return visual_overflow_changed || - old_contents_overflow != ContentsVisualOverflowRect(); } LayoutUnit LayoutMultiColumnSpannerPlaceholder::MinPreferredLogicalWidth()
diff --git a/third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.h b/third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.h index 021bb9d..888a6bc2 100644 --- a/third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.h +++ b/third_party/blink/renderer/core/layout/layout_multi_column_spanner_placeholder.h
@@ -55,7 +55,7 @@ void InsertedIntoTree() override; void WillBeRemovedFromTree() override; bool NeedsPreferredWidthsRecalculation() const override; - bool RecalcVisualOverflow() override; + void RecalcVisualOverflow() override; LayoutUnit MinPreferredLogicalWidth() const override; LayoutUnit MaxPreferredLogicalWidth() const override; void UpdateLayout() override;
diff --git a/third_party/blink/renderer/core/layout/layout_object.cc b/third_party/blink/renderer/core/layout/layout_object.cc index 230413a..9c92088 100644 --- a/third_party/blink/renderer/core/layout/layout_object.cc +++ b/third_party/blink/renderer/core/layout/layout_object.cc
@@ -1431,21 +1431,14 @@ return children_layout_overflow_changed; } -bool LayoutObject::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - bool visual_overflow_changed = SelfNeedsVisualOverflowRecalc(); +void LayoutObject::RecalcVisualOverflow() { for (LayoutObject* current = SlowFirstChild(); current; current = current->NextSibling()) { if (current->HasLayer() && ToLayoutBoxModelObject(current)->HasSelfPaintingLayer()) continue; - if (current->RecalcVisualOverflow()) - visual_overflow_changed = true; + current->RecalcVisualOverflow(); } - ClearChildNeedsVisualOverflowRecalc(); - ClearSelfNeedsVisualOverflowRecalc(); - return visual_overflow_changed; } const LayoutBoxModelObject* LayoutObject::EnclosingCompositedContainer() const { @@ -1998,11 +1991,6 @@ void LayoutObject::MarkContainerChainForOverflowRecalcIfNeeded() { LayoutObject* object = this; - bool found_layer = false; - if (HasLayer()) { - ToLayoutBoxModelObject(this)->Layer()->SetNeedsCompositingInputsUpdate(); - found_layer = true; - } do { // Cell and row need to propagate the flag to their containing section and // row as their containing block is the table wrapper. @@ -2010,26 +1998,16 @@ object = object->IsTableCell() || object->IsTableRow() ? object->Parent() : object->Container(); - if (object) { + if (object) object->SetChildNeedsLayoutOverflowRecalc(); - object->SetChildNeedsVisualOverflowRecalc(); - - if (object->HasLayer() && !found_layer) { - ToLayoutBoxModelObject(object) - ->Layer() - ->SetNeedsCompositingInputsUpdate(); - found_layer = true; - } - } - } while (object); } void LayoutObject::SetNeedsOverflowRecalc() { - bool needed_recalc = - NeedsLayoutOverflowRecalc() && NeedsVisualOverflowRecalc(); + bool needed_recalc = NeedsLayoutOverflowRecalc(); SetSelfNeedsLayoutOverflowRecalc(); - SetSelfNeedsVisualOverflowRecalc(); + if (auto* painting_layer = PaintingLayer()) + painting_layer->SetNeedsVisualOverflowRecalc(); SetShouldCheckForPaintInvalidation(); if (!needed_recalc) MarkContainerChainForOverflowRecalcIfNeeded();
diff --git a/third_party/blink/renderer/core/layout/layout_object.h b/third_party/blink/renderer/core/layout/layout_object.h index 214553c..1467118 100644 --- a/third_party/blink/renderer/core/layout/layout_object.h +++ b/third_party/blink/renderer/core/layout/layout_object.h
@@ -938,29 +938,6 @@ bitfields_.SetChildNeedsLayoutOverflowRecalc(false); } - bool NeedsVisualOverflowRecalc() const { - return bitfields_.SelfNeedsVisualOverflowRecalc() || - bitfields_.ChildNeedsVisualOverflowRecalc(); - } - bool SelfNeedsVisualOverflowRecalc() const { - return bitfields_.SelfNeedsVisualOverflowRecalc(); - } - bool ChildNeedsVisualOverflowRecalc() const { - return bitfields_.ChildNeedsVisualOverflowRecalc(); - } - void SetSelfNeedsVisualOverflowRecalc() { - bitfields_.SetSelfNeedsVisualOverflowRecalc(true); - } - void SetChildNeedsVisualOverflowRecalc() { - bitfields_.SetChildNeedsVisualOverflowRecalc(true); - } - void ClearSelfNeedsVisualOverflowRecalc() { - bitfields_.SetSelfNeedsVisualOverflowRecalc(false); - } - void ClearChildNeedsVisualOverflowRecalc() { - bitfields_.SetChildNeedsVisualOverflowRecalc(false); - } - // CSS clip only applies when position is absolute or fixed. Prefer this check // over !StyleRef().HasAutoClip(). bool HasClip() const { @@ -1251,7 +1228,9 @@ virtual void Paint(const PaintInfo&) const; virtual bool RecalcLayoutOverflow(); - virtual bool RecalcVisualOverflow(); + // Recalculates visual overflow for this object and non-self-painting + // PaintLayer descendants. + virtual void RecalcVisualOverflow(); // Subclasses must reimplement this method to compute the size and position // of this object and all its descendants. @@ -2531,8 +2510,6 @@ needs_simplified_normal_flow_layout_(false), self_needs_layout_overflow_recalc_(false), child_needs_layout_overflow_recalc_(false), - self_needs_visual_overflow_recalc_(false), - child_needs_visual_overflow_recalc_(false), preferred_logical_widths_dirty_(false), needs_collect_inlines_(false), should_check_for_paint_invalidation_(true), @@ -2631,12 +2608,6 @@ ADD_BOOLEAN_BITFIELD(child_needs_layout_overflow_recalc_, ChildNeedsLayoutOverflowRecalc); - ADD_BOOLEAN_BITFIELD(self_needs_visual_overflow_recalc_, - SelfNeedsVisualOverflowRecalc); - - ADD_BOOLEAN_BITFIELD(child_needs_visual_overflow_recalc_, - ChildNeedsVisualOverflowRecalc); - // This boolean marks preferred logical widths for lazy recomputation. // // See INTRINSIC SIZES / PREFERRED LOGICAL WIDTHS above about those
diff --git a/third_party/blink/renderer/core/layout/layout_object_child_list.cc b/third_party/blink/renderer/core/layout/layout_object_child_list.cc index bd2c737..444162ba 100644 --- a/third_party/blink/renderer/core/layout/layout_object_child_list.cc +++ b/third_party/blink/renderer/core/layout/layout_object_child_list.cc
@@ -217,8 +217,7 @@ PaintInvalidationReason::kAppeared); new_child->AddSubtreePaintPropertyUpdateReason( SubtreePaintPropertyUpdateReason::kContainerChainMayChange); - new_child->SetChildNeedsLayoutOverflowRecalc(); - new_child->SetChildNeedsVisualOverflowRecalc(); + new_child->SetNeedsOverflowRecalc(); if (!owner->NormalChildNeedsLayout()) { owner->SetChildNeedsLayout(); // We may supply the static position for an
diff --git a/third_party/blink/renderer/core/layout/layout_replaced.cc b/third_party/blink/renderer/core/layout/layout_replaced.cc index 6bcc049..8bd259f 100644 --- a/third_party/blink/renderer/core/layout/layout_replaced.cc +++ b/third_party/blink/renderer/core/layout/layout_replaced.cc
@@ -152,19 +152,11 @@ layout_object->IsVideo(); } -bool LayoutReplaced::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - LayoutRect previous_visual_overflow_rect = VisualOverflowRect(); - bool visual_overflow_changed = SelfNeedsVisualOverflowRecalc(); - - if (LayoutObject::RecalcVisualOverflow()) - visual_overflow_changed = true; - +void LayoutReplaced::RecalcVisualOverflow() { + // Add in overflow from children. + LayoutObject::RecalcVisualOverflow(); ClearVisualOverflow(); AddVisualEffectOverflow(); - return visual_overflow_changed || - previous_visual_overflow_rect != VisualOverflowRect(); } void LayoutReplaced::ComputeIntrinsicSizingInfoForReplacedContent(
diff --git a/third_party/blink/renderer/core/layout/layout_replaced.h b/third_party/blink/renderer/core/layout/layout_replaced.h index 0f043ae..2682400 100644 --- a/third_party/blink/renderer/core/layout/layout_replaced.h +++ b/third_party/blink/renderer/core/layout/layout_replaced.h
@@ -71,7 +71,7 @@ bool NeedsPreferredWidthsRecalculation() const override; - bool RecalcVisualOverflow() override; + void RecalcVisualOverflow() override; // These values are specified to be 300 and 150 pixels in the CSS 2.1 spec. // http://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width
diff --git a/third_party/blink/renderer/core/layout/layout_table.cc b/third_party/blink/renderer/core/layout/layout_table.cc index ed351279d..25deec9 100644 --- a/third_party/blink/renderer/core/layout/layout_table.cc +++ b/third_party/blink/renderer/core/layout/layout_table.cc
@@ -595,30 +595,20 @@ children_layout_overflow_changed; } -bool LayoutTable::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - bool visual_overflow_changed = false; - if (ChildNeedsVisualOverflowRecalc()) { - for (auto* caption : captions_) +void LayoutTable::RecalcVisualOverflow() { + for (auto* caption : captions_) { + if (!caption->HasSelfPaintingLayer()) caption->RecalcVisualOverflow(); - - for (LayoutTableSection* section = TopSection(); section; - section = SectionBelow(section)) { - if (section->RecalcVisualOverflow()) - visual_overflow_changed = true; - } - if (RecalcPositionedDescendantsVisualOverflow()) - visual_overflow_changed = true; } - if (SelfNeedsVisualOverflowRecalc()) - visual_overflow_changed = true; - ClearChildNeedsVisualOverflowRecalc(); - ClearSelfNeedsVisualOverflowRecalc(); - if (RecalcSelfVisualOverflow()) - visual_overflow_changed = true; - return visual_overflow_changed; + for (LayoutTableSection* section = TopSection(); section; + section = SectionBelow(section)) { + if (!section->HasSelfPaintingLayer()) + section->RecalcVisualOverflow(); + } + + RecalcPositionedDescendantsVisualOverflow(); + RecalcSelfVisualOverflow(); } void LayoutTable::UpdateLayout() {
diff --git a/third_party/blink/renderer/core/layout/layout_table.h b/third_party/blink/renderer/core/layout/layout_table.h index f73d0eeb..92feaf2f 100644 --- a/third_party/blink/renderer/core/layout/layout_table.h +++ b/third_party/blink/renderer/core/layout/layout_table.h
@@ -428,7 +428,7 @@ void SimplifiedNormalFlowLayout() override; bool RecalcLayoutOverflow() final; - bool RecalcVisualOverflow() final; + void RecalcVisualOverflow() final; void EnsureIsReadyForPaintInvalidation() override; void InvalidatePaint(const PaintInvalidatorContext&) const override;
diff --git a/third_party/blink/renderer/core/layout/layout_table_row.cc b/third_party/blink/renderer/core/layout/layout_table_row.cc index 6bb0c11..74fd2978 100644 --- a/third_party/blink/renderer/core/layout/layout_table_row.cc +++ b/third_party/blink/renderer/core/layout/layout_table_row.cc
@@ -292,26 +292,20 @@ AddLayoutOverflowFromCell(cell); } -bool LayoutTableRow::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - bool visual_overflow_changed = SelfNeedsVisualOverflowRecalc(); +void LayoutTableRow::RecalcVisualOverflow() { unsigned n_cols = Section()->NumCols(RowIndex()); for (unsigned c = 0; c < n_cols; c++) { auto* cell = Section()->OriginatingCellAt(RowIndex(), c); if (!cell) continue; - if (cell->RecalcVisualOverflow()) - visual_overflow_changed = true; + if (!cell->HasSelfPaintingLayer()) + cell->RecalcVisualOverflow(); } - ClearChildNeedsVisualOverflowRecalc(); - ClearSelfNeedsVisualOverflowRecalc(); - if (!visual_overflow_changed) - return false; - return ComputeVisualOverflow(); + + ComputeVisualOverflow(); } -bool LayoutTableRow::ComputeVisualOverflow() { +void LayoutTableRow::ComputeVisualOverflow() { const auto& old_visual_rect = VisualOverflowRect(); ClearVisualOverflow(); AddVisualEffectOverflow(); @@ -320,9 +314,7 @@ AddVisualOverflowFromCell(cell); if (old_visual_rect != VisualOverflowRect()) { SetShouldCheckForPaintInvalidation(); - return true; } - return false; } void LayoutTableRow::AddLayoutOverflowFromCell(const LayoutTableCell* cell) { @@ -339,6 +331,9 @@ } void LayoutTableRow::AddVisualOverflowFromCell(const LayoutTableCell* cell) { + if (cell->HasSelfPaintingLayer()) + return; + // Table row paints its background behind cells. If the cell spans multiple // rows, the row's visual rect should be expanded to cover the cell. // Here don't check background existence to avoid requirement to invalidate
diff --git a/third_party/blink/renderer/core/layout/layout_table_row.h b/third_party/blink/renderer/core/layout/layout_table_row.h index 8a252e8..99f2a62c 100644 --- a/third_party/blink/renderer/core/layout/layout_table_row.h +++ b/third_party/blink/renderer/core/layout/layout_table_row.h
@@ -108,7 +108,7 @@ void ComputeLayoutOverflow(); - bool RecalcVisualOverflow() override; + void RecalcVisualOverflow() override; const char* GetName() const override { return "LayoutTableRow"; } @@ -125,7 +125,7 @@ bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; private: - bool ComputeVisualOverflow(); + void ComputeVisualOverflow(); void AddLayoutOverflowFromCell(const LayoutTableCell*); void AddVisualOverflowFromCell(const LayoutTableCell*);
diff --git a/third_party/blink/renderer/core/layout/layout_table_section.cc b/third_party/blink/renderer/core/layout/layout_table_section.cc index 88d5749..1a5b948 100644 --- a/third_party/blink/renderer/core/layout/layout_table_section.cc +++ b/third_party/blink/renderer/core/layout/layout_table_section.cc
@@ -1392,6 +1392,8 @@ AddVisualOverflowFromChild(*row); for (auto* cell = row->FirstCell(); cell; cell = cell->NextCell()) { + if (cell->HasSelfPaintingLayer()) + continue; // Let the section's self visual overflow cover the cell's whole collapsed // borders. This ensures correct raster invalidation on section border // style change. @@ -1468,33 +1470,17 @@ return children_layout_overflow_changed; } -bool LayoutTableSection::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - +void LayoutTableSection::RecalcVisualOverflow() { unsigned total_rows = grid_.size(); - bool child_visual_overflow_changed = false; for (unsigned r = 0; r < total_rows; r++) { LayoutTableRow* row_layouter = RowLayoutObjectAt(r); if (!row_layouter || (row_layouter->HasLayer() && row_layouter->Layer()->IsSelfPaintingLayer())) continue; - if (row_layouter->RecalcVisualOverflow()) - child_visual_overflow_changed = true; + row_layouter->RecalcVisualOverflow(); } - - LayoutRect previous_visual_overflow_rect = VisualOverflowRect(); - - if (child_visual_overflow_changed || SelfNeedsVisualOverflowRecalc()) - ComputeVisualOverflowFromDescendants(); - if (SelfNeedsVisualOverflowRecalc()) - AddVisualEffectOverflow(); - - ClearChildNeedsVisualOverflowRecalc(); - ClearSelfNeedsVisualOverflowRecalc(); - - return child_visual_overflow_changed || - previous_visual_overflow_rect != VisualOverflowRect(); + ComputeVisualOverflowFromDescendants(); + AddVisualEffectOverflow(); } void LayoutTableSection::MarkAllCellsWidthsDirtyAndOrNeedsLayout(
diff --git a/third_party/blink/renderer/core/layout/layout_table_section.h b/third_party/blink/renderer/core/layout/layout_table_section.h index 1b3e55b..0f4b2719 100644 --- a/third_party/blink/renderer/core/layout/layout_table_section.h +++ b/third_party/blink/renderer/core/layout/layout_table_section.h
@@ -121,7 +121,7 @@ int CalcRowLogicalHeight(); void LayoutRows(); bool RecalcLayoutOverflow() final; - bool RecalcVisualOverflow() final; + void RecalcVisualOverflow() final; void MarkAllCellsWidthsDirtyAndOrNeedsLayout(LayoutTable::WhatToMarkAllCells);
diff --git a/third_party/blink/renderer/core/layout/layout_text.cc b/third_party/blink/renderer/core/layout/layout_text.cc index 1bf767b5..6f0ff01d 100644 --- a/third_party/blink/renderer/core/layout/layout_text.cc +++ b/third_party/blink/renderer/core/layout/layout_text.cc
@@ -1780,17 +1780,6 @@ SetText(std::move(text_to_transform), true); } -bool LayoutText::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - ClearSelfNeedsVisualOverflowRecalc(); - ClearChildNeedsVisualOverflowRecalc(); - // The actual visual overflow of text is computed during layout, - // because of complications to do with glyph caches, so return true - // always if recalc is needed for now. - return true; -} - static inline bool IsInlineFlowOrEmptyText(const LayoutObject* o) { if (o->IsLayoutInline()) return true;
diff --git a/third_party/blink/renderer/core/layout/layout_text.h b/third_party/blink/renderer/core/layout/layout_text.h index 221ff37..cfefdc2e 100644 --- a/third_party/blink/renderer/core/layout/layout_text.h +++ b/third_party/blink/renderer/core/layout/layout_text.h
@@ -204,8 +204,6 @@ virtual void TransformText(); - bool RecalcVisualOverflow() override; - LayoutRect LocalSelectionRect() const final; LayoutRect LocalCaretRect( const InlineBox*,
diff --git a/third_party/blink/renderer/core/layout/line/inline_flow_box.cc b/third_party/blink/renderer/core/layout/line/inline_flow_box.cc index e53c0090..1fa99fb 100644 --- a/third_party/blink/renderer/core/layout/line/inline_flow_box.cc +++ b/third_party/blink/renderer/core/layout/line/inline_flow_box.cc
@@ -1144,6 +1144,7 @@ LayoutUnit line_bottom) { LayoutRect logical_visual_overflow = VisualOverflowRect(line_top, line_bottom); + bool visual_overflow_may_have_changed = false; for (InlineBox* curr = FirstChild(); curr; curr = curr->NextOnLine()) { const LineLayoutItem& item = curr->GetLineLayoutItem(); if (item.IsOutOfFlowPositioned() || item.IsText() || item.IsLayoutInline()) @@ -1162,10 +1163,13 @@ curr->LogicalTop()); logical_visual_overflow.Unite(child_logical_visual_overflow); ClearKnownToHaveNoOverflow(); + visual_overflow_may_have_changed = true; } } - SetVisualOverflowFromLogicalRect(logical_visual_overflow, line_top, - line_bottom); + if (visual_overflow_may_have_changed) { + SetVisualOverflowFromLogicalRect(logical_visual_overflow, line_top, + line_bottom); + } } static void ComputeGlyphOverflow(
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc index 61c5f6f..d11efb4 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc
@@ -241,19 +241,11 @@ StyleRef().OverflowX() == EOverflow::kScroll || IsDocumentElement(); } -bool LayoutSVGRoot::RecalcVisualOverflow() { - if (!NeedsVisualOverflowRecalc()) - return false; - bool visual_overflow_changed = LayoutReplaced::RecalcVisualOverflow(); +void LayoutSVGRoot::RecalcVisualOverflow() { + LayoutReplaced::RecalcVisualOverflow(); UpdateCachedBoundaries(); - if (!ShouldApplyViewportClip()) { - LayoutRect old_contents_overflow = ContentsVisualOverflowRect(); + if (!ShouldApplyViewportClip()) AddContentsVisualOverflow(ComputeContentsVisualOverflow()); - visual_overflow_changed = - visual_overflow_changed || - old_contents_overflow != ContentsVisualOverflowRect(); - } - return visual_overflow_changed; } LayoutRect LayoutSVGRoot::ComputeContentsVisualOverflow() const {
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_root.h b/third_party/blink/renderer/core/layout/svg/layout_svg_root.h index 1ffe8140..158d5d8 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_root.h +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_root.h
@@ -85,7 +85,7 @@ bool ShouldApplyViewportClip() const; - bool RecalcVisualOverflow() override; + void RecalcVisualOverflow() override; bool HasNonIsolatedBlendingDescendants() const final;
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_text.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_text.cc index 859ac47..b4f64c54 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_text.cc +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_text.cc
@@ -300,13 +300,11 @@ ClearNeedsLayout(); } -bool LayoutSVGText::RecalcVisualOverflow() { - LayoutRect previous_visual_overflow_rect = VisualOverflowRect(); - bool visual_overflow_changed = LayoutObject::RecalcVisualOverflow(); +void LayoutSVGText::RecalcVisualOverflow() { + // Add in overflow from children. + LayoutObject::RecalcVisualOverflow(); AddSelfVisualOverflow(LayoutRect(ObjectBoundingBox())); AddVisualEffectOverflow(); - return visual_overflow_changed || - previous_visual_overflow_rect != VisualOverflowRect(); } RootInlineBox* LayoutSVGText::CreateRootInlineBox() {
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_text.h b/third_party/blink/renderer/core/layout/svg/layout_svg_text.h index bff7bfa..bf9845c 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_text.h +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_text.h
@@ -62,7 +62,7 @@ void SubtreeChildWillBeRemoved(); void SubtreeTextDidChange(); - bool RecalcVisualOverflow() override; + void RecalcVisualOverflow() override; const char* GetName() const override { return "LayoutSVGText"; }
diff --git a/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc b/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc index b70e07d..6111fe6 100644 --- a/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc +++ b/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc
@@ -181,10 +181,10 @@ compositing_reasons_stats.active_animation_layers, 1, 100, 5); UMA_HISTOGRAM_CUSTOM_COUNTS( "Blink.Compositing.LayerPromotionCount.AssumedOverlap", - compositing_reasons_stats.assumed_overlap_layers, 1, 100, 5); + compositing_reasons_stats.assumed_overlap_layers, 1, 1000, 5); UMA_HISTOGRAM_CUSTOM_COUNTS( "Blink.Compositing.LayerPromotionCount.IndirectComposited", - compositing_reasons_stats.indirect_composited_layers, 1, 100, 5); + compositing_reasons_stats.indirect_composited_layers, 1, 1000, 5); UMA_HISTOGRAM_CUSTOM_COUNTS( "Blink.Compositing.LayerPromotionCount.TotalComposited", compositing_reasons_stats.total_composited_layers, 1, 1000, 10);
diff --git a/third_party/blink/renderer/core/paint/paint_layer.cc b/third_party/blink/renderer/core/paint/paint_layer.cc index 3cefbd35..4a65163 100644 --- a/third_party/blink/renderer/core/paint/paint_layer.cc +++ b/third_party/blink/renderer/core/paint/paint_layer.cc
@@ -140,6 +140,7 @@ : is_root_layer_(layout_object.IsLayoutView()), has_visible_content_(false), needs_descendant_dependent_flags_update_(true), + needs_visual_overflow_recalc_(true), has_visible_descendant_(false), #if DCHECK_IS_ON() // The root layer (LayoutView) does not need position update at start @@ -734,8 +735,9 @@ GetLayoutObject().SetNeedsPaintPropertyUpdate(); needs_descendant_dependent_flags_update_ = false; - if (GetLayoutObject().NeedsVisualOverflowRecalc() && IsSelfPaintingLayer()) + if (IsSelfPaintingLayer() && needs_visual_overflow_recalc_) GetLayoutObject().RecalcVisualOverflow(); + needs_visual_overflow_recalc_ = false; } bool previously_has_visible_content = has_visible_content_; @@ -1075,6 +1077,12 @@ MarkAncestorChainForFlagsUpdate(flag); } +void PaintLayer::SetNeedsVisualOverflowRecalc() { + DCHECK(IsSelfPaintingLayer()); + needs_visual_overflow_recalc_ = true; + SetNeedsCompositingInputsUpdate(); +} + void PaintLayer::SetNeedsCompositingInputsUpdateInternal() { if (RuntimeEnabledFeatures::CompositeAfterPaintEnabled()) return; @@ -2947,6 +2955,9 @@ // invalidate the new chain in addition to the old one. MarkCompositingContainerChainForNeedsRepaint(); + if (is_self_painting_layer) + SetNeedsVisualOverflowRecalc(); + if (PaintLayer* parent = Parent()) { parent->MarkAncestorChainForFlagsUpdate();
diff --git a/third_party/blink/renderer/core/paint/paint_layer.h b/third_party/blink/renderer/core/paint/paint_layer.h index a385db6..8467c06 100644 --- a/third_party/blink/renderer/core/paint/paint_layer.h +++ b/third_party/blink/renderer/core/paint/paint_layer.h
@@ -769,6 +769,7 @@ NeedsDescendantDependentUpdate, DoesNotNeedDescendantDependentUpdate }; + void SetNeedsVisualOverflowRecalc(); void SetNeedsCompositingInputsUpdate( DescendantDependentFlagsUpdateFlag = NeedsDescendantDependentUpdate); // Use this internal method only for cases during the descendant-dependent @@ -1255,7 +1256,10 @@ const unsigned is_root_layer_ : 1; unsigned has_visible_content_ : 1; + unsigned needs_descendant_dependent_flags_update_ : 1; + unsigned needs_visual_overflow_recalc_ : 1; + unsigned has_visible_descendant_ : 1; #if DCHECK_IS_ON()
diff --git a/third_party/blink/renderer/core/probe/core_probes.pidl b/third_party/blink/renderer/core/probe/core_probes.pidl index 4593311..674efab 100644 --- a/third_party/blink/renderer/core/probe/core_probes.pidl +++ b/third_party/blink/renderer/core/probe/core_probes.pidl
@@ -101,7 +101,7 @@ void didFailLoading(CoreProbeSink*, unsigned long identifier, DocumentLoader*, const ResourceError&); void willSendEventSourceRequest(ExecutionContext*, ThreadableLoaderClient* eventSource); void willDispatchEventSourceEvent(ExecutionContext*, unsigned long identifier, const AtomicString& eventName, const AtomicString& eventId, const String& data); - void willLoadXHR(ExecutionContext*, XMLHttpRequest* xhr, ThreadableLoaderClient* client, const AtomicString& method, const KURL& url, bool async, const HTTPHeaderMap& headers, bool includeCredentials); + void willLoadXHR(ExecutionContext*, XMLHttpRequest* xhr, ThreadableLoaderClient* client, const AtomicString& method, const KURL& url, bool async, EncodedFormData* form_data, const HTTPHeaderMap& headers, bool includeCredentials); void didFinishXHR(ExecutionContext*, XMLHttpRequest* xhr); void scriptImported(ExecutionContext*, unsigned long identifier, const String& sourceString); void scriptExecutionBlockedByCSP(ExecutionContext*, const String& directiveText);
diff --git a/third_party/blink/renderer/core/testing/internals.cc b/third_party/blink/renderer/core/testing/internals.cc index b81df811..91e2e2a 100644 --- a/third_party/blink/renderer/core/testing/internals.cc +++ b/third_party/blink/renderer/core/testing/internals.cc
@@ -267,6 +267,15 @@ // call. page->SetDefaultPageScaleLimits(1, 4); page->SetPageScaleFactor(1); + + // Ensure timers are reset so timers such as EventHandler's |hover_timer_| do + // not cause additional lifecycle updates. + for (Frame* frame = page->MainFrame(); frame; + frame = frame->Tree().TraverseNext()) { + if (frame->IsLocalFrame()) + ToLocalFrame(frame)->GetEventHandler().Clear(); + } + LocalFrame* frame = page->DeprecatedLocalMainFrame(); frame->View()->LayoutViewport()->SetScrollOffset(ScrollOffset(), kProgrammaticScroll);
diff --git a/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc b/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc index f6778b5e..79a3c44 100644 --- a/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc +++ b/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc
@@ -1065,7 +1065,7 @@ execution_context.GetSecurityContext().AddressSpace()); probe::willLoadXHR(&execution_context, this, this, method_, url_, async_, - request_headers_, with_credentials_); + http_body.get(), request_headers_, with_credentials_); if (http_body) { DCHECK_NE(method_, http_names::kGET);
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 7db6a9f6..28ff0155 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -3206,7 +3206,7 @@ crbug.com/626703 external/wpt/css/filter-effects/filter-subregion-01.html [ Failure ] crbug.com/626703 external/wpt/webrtc/RTCTrackEvent-fire.html [ Timeout ] crbug.com/626703 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-005.html [ Failure ] -crbug.com/626703 external/wpt/css/css-multicol/multicol-span-all-005.html [ Failure ] +crbug.com/915204 external/wpt/css/css-multicol/multicol-span-all-005.html [ Failure ] crbug.com/626703 [ Android ] external/wpt/css/css-layout-api/auto-block-size-absolute.https.html [ Failure ] crbug.com/626703 [ Mac10.10 ] external/wpt/css/css-layout-api/auto-block-size-absolute.https.html [ Failure ] crbug.com/626703 external/wpt/infrastructure/testdriver/file_upload.sub.html [ Skip ] @@ -5942,13 +5942,6 @@ # Sheriff 2018-12-19 crbug.com/915862 [ Android ] webmidi/permission.html [ Pass Failure ] -# These tests will fail until upstream v8 changes are landed. -crbug.com/v8/8381 http/tests/devtools/coverage/coverage-repeated.js [ Pass Failure ] -crbug.com/v8/8381 http/tests/devtools/coverage/coverage-view-filter.js [ Pass Failure ] -crbug.com/v8/8381 http/tests/devtools/coverage/coverage-view.js [ Pass Failure ] -crbug.com/v8/8381 http/tests/devtools/coverage/multiple-instances-merge.js [ Pass Failure ] -crbug.com/v8/8381 http/tests/devtools/coverage/coverage-export.js [ Pass Failure ] - # ssauleau 2018-12-20 crbug.com/v8/8319 external/wpt/wasm/jsapi/global/constructor.any.html [ Pass Failure ] crbug.com/v8/8319 external/wpt/wasm/jsapi/global/constructor.any.worker.html [ Pass Failure ] @@ -5967,5 +5960,4 @@ crbug.com/917284 virtual/outofblink-cors/external/wpt/service-workers/service-worker/claim-fetch-with-appcache.https.html [ Failure ] # Sheriff 2018-12-27 -crbug.com/917944 [ Mac10.10 Mac10.11 ] paint/invalidation/forms/textarea-caret.html [ Failure ] crbug.com/917970 [ Mac10.13 ] virtual/mouseevent_fractional/fast/events/popup-blocking-timers5.html [ Pass Failure ]
diff --git a/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-export-expected.txt b/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-export-expected.txt index 8d20964..0f351e6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-export-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-export-expected.txt
@@ -34,15 +34,10 @@ Usage: function inner2(a) { return a + 2; + } Usage: -} - -Usage: -function inner4(a) { return a + 4; - -Usage: -} +function inner4(a) { return a + 4; } Usage: if (index === 7) @@ -52,14 +47,10 @@ if (!self.__funcs) self.__funcs = [inner1, inner2, inner3, inner4, inner5]; return self.__funcs[index]; - -Usage: } function performActions() { return outer(1)(0) + outer(3)(0); - -Usage: } Usage:
diff --git a/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-repeated-expected.txt b/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-repeated-expected.txt index 3553bb4..2784bfe2 100644 --- a/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-repeated-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-repeated-expected.txt
@@ -1,10 +1,10 @@ Tests the coverage list view after finishing recording in the Coverage view. Initial -.../devtools/coverage/resources/coverage.js JS used: 354 unused: 214 total: 568 +.../devtools/coverage/resources/coverage.js JS used: 360 unused: 208 total: 568 .../devtools/coverage/resources/highlight-in-source.css CSS used: 67 unused: 142 total: 209 After second session -.../devtools/coverage/resources/coverage.js JS used: 354 unused: 214 total: 568 +.../devtools/coverage/resources/coverage.js JS used: 360 unused: 208 total: 568 .../devtools/coverage/resources/highlight-in-source.css CSS used: 67 unused: 142 total: 209 After clear .../devtools/coverage/resources/highlight-in-source.css CSS used: 67 unused: 142 total: 209
diff --git a/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-expected.txt b/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-expected.txt index 202ff8f..8b49cb2 100644 --- a/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-expected.txt
@@ -5,7 +5,7 @@ .../devtools/coverage/resources/basic-coverage.html JS (coarse) used: 51 unused: 0 total: 51 Reloading Page Page reloaded. -.../devtools/coverage/resources/coverage.js JS used: 354 unused: 214 total: 568 +.../devtools/coverage/resources/coverage.js JS used: 360 unused: 208 total: 568 .../devtools/coverage/resources/highlight-in-source.css CSS used: 67 unused: 142 total: 209 .../devtools/coverage/resources/basic-coverage.html JS used: 51 unused: 0 total: 51
diff --git a/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-filter-expected.txt b/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-filter-expected.txt index d6a1202..a826f77 100644 --- a/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-filter-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/coverage/coverage-view-filter-expected.txt
@@ -1,14 +1,14 @@ Tests the filter is properly applied to coverage list view. Filter: devtools -.../devtools/coverage/resources/coverage.js JS used: 354 unused: 214 total: 568 +.../devtools/coverage/resources/coverage.js JS used: 360 unused: 208 total: 568 .../devtools/coverage/resources/highlight-in-source.css CSS used: 67 unused: 142 total: 209 .../devtools/coverage/resources/basic-coverage.html JS used: 51 unused: 0 total: 51 Filter: CES/COV -.../devtools/coverage/resources/coverage.js JS used: 354 unused: 214 total: 568 +.../devtools/coverage/resources/coverage.js JS used: 360 unused: 208 total: 568 Filter: no pasaran Filter: -.../devtools/coverage/resources/coverage.js JS used: 354 unused: 214 total: 568 +.../devtools/coverage/resources/coverage.js JS used: 360 unused: 208 total: 568 .../devtools/coverage/resources/highlight-in-source.css CSS used: 67 unused: 142 total: 209 .../devtools/coverage/resources/basic-coverage.html JS used: 51 unused: 0 total: 51
diff --git a/third_party/blink/web_tests/http/tests/devtools/coverage/multiple-instances-merge-expected.txt b/third_party/blink/web_tests/http/tests/devtools/coverage/multiple-instances-merge-expected.txt index 5b46229..9cdab027 100644 --- a/third_party/blink/web_tests/http/tests/devtools/coverage/multiple-instances-merge-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/coverage/multiple-instances-merge-expected.txt
@@ -1,8 +1,8 @@ Tests the coverage list view after finishing recording in the Coverage view. -.../devtools/coverage/resources/coverage.js JS used: 389 unused: 179 total: 568 +.../devtools/coverage/resources/coverage.js JS used: 396 unused: 172 total: 568 .../devtools/coverage/resources/highlight-in-source.css CSS used: 90 unused: 119 total: 209 -.../devtools/coverage/resources/subframe.html JS used: 73 unused: 1 total: 74 +.../devtools/coverage/resources/subframe.html JS used: 74 unused: 0 total: 74 0: + body { 1: + background-color: lightblue; 2: + }
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/network/resources/cors-return-post.php b/third_party/blink/web_tests/http/tests/inspector-protocol/network/resources/cors-return-post.php new file mode 100644 index 0000000..f5ad24f --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/network/resources/cors-return-post.php
@@ -0,0 +1,10 @@ +<?php +header('Access-Control-Allow-Origin: *'); +header('Access-Control-Allow-Methods: GET, POST'); +header('Access-Control-Allow-Headers: content-type'); +if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { + echo 'replied to options with Access-Control-Allow headers'; +} else { + echo 'post data: ' . file_get_contents('php://input'); +} +?>
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/network/xhr-post-replay-cors-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/network/xhr-post-replay-cors-expected.txt new file mode 100644 index 0000000..1f6f986 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/network/xhr-post-replay-cors-expected.txt
@@ -0,0 +1,19 @@ +Verifies that replayed CORS XHRs still have post data +request 0: { + "method": "OPTIONS", + "url": "http://127.0.0.1:8000/inspector-protocol/network/resources/cors-return-post.php", + "responseData": "replied to options with Access-Control-Allow headers" +} +request 1: { + "method": "POST", + "url": "http://127.0.0.1:8000/inspector-protocol/network/resources/cors-return-post.php", + "postData": "{\"data\":\"test post data\"}", + "responseData": "post data: {\"data\":\"test post data\"}" +} +request 2: { + "method": "POST", + "url": "http://127.0.0.1:8000/inspector-protocol/network/resources/cors-return-post.php", + "postData": "{\"data\":\"test post data\"}", + "responseData": "post data: {\"data\":\"test post data\"}" +} +
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/network/xhr-post-replay-cors.js b/third_party/blink/web_tests/http/tests/inspector-protocol/network/xhr-post-replay-cors.js new file mode 100644 index 0000000..b75ecdf --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/network/xhr-post-replay-cors.js
@@ -0,0 +1,60 @@ +(async function(testRunner) { + const {page, session, dp} = await testRunner.startURL( + 'http://localhost:8000/', + 'Verifies that replayed CORS XHRs still have post data'); + await dp.Network.enable(); + + const requestsById = {}; + let sentReplayXhr = false; + + function replayOptionsXhr() { + sentReplayXhr = true; + const optionsRequestId = + Object.keys(requestsById) + .find(id => requestsById[id].method === 'OPTIONS'); + dp.Network.replayXHR({requestId: optionsRequestId}); + } + + function printResultsAndFinish() { + const requests = Object.values(requestsById) + .sort((one, two) => one.wallTime - two.wallTime) + .map(request => { + delete request.wallTime; + return request; + }); + for (let i = 0; i < requests.length; i++) { + testRunner.log(`request ${i}: ${JSON.stringify(requests[i], null, 2)}`); + } + testRunner.completeTest(); + } + + dp.Network.onRequestWillBeSent(event => { + requestsById[event.params.requestId] = { + method: event.params.request.method, + url: event.params.request.url, + postData: event.params.request.postData, + wallTime: event.params.wallTime + }; + }); + + dp.Network.onLoadingFinished(async event => { + const requestId = event.params.requestId; + const responseData = + await dp.Network.getResponseBody({'requestId': requestId}); + requestsById[requestId].responseData = responseData.result.body; + + if (Object.values(requestsById).every(request => request.responseData)) { + if (sentReplayXhr) + printResultsAndFinish(); + else + replayOptionsXhr(); + } + }); + + await session.evaluate(` + const xhr = new XMLHttpRequest(); + xhr.open('POST', 'http://127.0.0.1:8000/inspector-protocol/network/resources/cors-return-post.php'); + xhr.setRequestHeader('content-type', 'application/json'); + xhr.send(JSON.stringify({data: 'test post data'})); + `); +})
diff --git a/third_party/blink/web_tests/paint/invalidation/forms/textarea-caret.html b/third_party/blink/web_tests/paint/invalidation/forms/textarea-caret.html index 699e84ee..1be30da0 100644 --- a/third_party/blink/web_tests/paint/invalidation/forms/textarea-caret.html +++ b/third_party/blink/web_tests/paint/invalidation/forms/textarea-caret.html
@@ -8,4 +8,4 @@ onload = runRepaintAndPixelTest; </script> <!-- Test passes if caret is visible at rightmost edge of input field. --> -<textarea id="editor" style="white-space: nowrap;"></textarea> +<textarea id="editor" style="white-space: nowrap; font-size: 13px"></textarea>
diff --git a/third_party/blink/web_tests/platform/linux/paint/invalidation/forms/textarea-caret-expected.txt b/third_party/blink/web_tests/platform/linux/paint/invalidation/forms/textarea-caret-expected.txt deleted file mode 100644 index eef142b..0000000 --- a/third_party/blink/web_tests/platform/linux/paint/invalidation/forms/textarea-caret-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutTextControl TEXTAREA id='editor'", - "rect": [7, 7, 183, 40], - "reason": "chunk appeared" - }, - { - "object": "LayoutTextControl TEXTAREA id='editor'", - "rect": [7, 7, 183, 40], - "reason": "chunk appeared" - }, - { - "object": "LayoutBlockFlow HTML", - "rect": [8, 8, 181, 38], - "reason": "chunk disappeared" - }, - { - "object": "LayoutTextControl TEXTAREA id='editor'", - "rect": [9, 11, 179, 16], - "reason": "chunk appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/paint/invalidation/forms/textarea-caret-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/paint/invalidation/forms/textarea-caret-expected.png index b7e522b..eccaad90 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.10/paint/invalidation/forms/textarea-caret-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.10/paint/invalidation/forms/textarea-caret-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/paint/invalidation/forms/textarea-caret-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/paint/invalidation/forms/textarea-caret-expected.png index a4eff8d..46243a4 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.11/paint/invalidation/forms/textarea-caret-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.11/paint/invalidation/forms/textarea-caret-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/forms/textarea-caret-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/forms/textarea-caret-expected.png index 7487e84c..e699e96b 100644 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/forms/textarea-caret-expected.png +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/forms/textarea-caret-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/forms/textarea-caret-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/forms/textarea-caret-expected.txt index 31b9093f..a3035b1 100644 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/forms/textarea-caret-expected.txt +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/forms/textarea-caret-expected.txt
@@ -19,22 +19,22 @@ "paintInvalidations": [ { "object": "LayoutTextControl TEXTAREA id='editor'", - "rect": [5, 5, 147, 38], + "rect": [5, 5, 167, 44], "reason": "chunk appeared" }, { "object": "LayoutTextControl TEXTAREA id='editor'", - "rect": [5, 5, 147, 38], + "rect": [5, 5, 167, 44], "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", - "rect": [8, 8, 141, 32], + "rect": [8, 8, 161, 38], "reason": "chunk disappeared" }, { "object": "LayoutTextControl TEXTAREA id='editor'", - "rect": [9, 11, 139, 13], + "rect": [9, 11, 159, 16], "reason": "chunk appeared" } ]
diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/forms/textarea-caret-expected.txt b/third_party/blink/web_tests/platform/win/paint/invalidation/forms/textarea-caret-expected.txt index ad6d7229..eef142b 100644 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/forms/textarea-caret-expected.txt +++ b/third_party/blink/web_tests/platform/win/paint/invalidation/forms/textarea-caret-expected.txt
@@ -34,7 +34,7 @@ }, { "object": "LayoutTextControl TEXTAREA id='editor'", - "rect": [9, 10, 179, 18], + "rect": [9, 11, 179, 16], "reason": "chunk appeared" } ]
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc index eddcad7..c2c8cb4 100644 --- a/third_party/leveldatabase/env_chromium.cc +++ b/third_party/leveldatabase/env_chromium.cc
@@ -707,7 +707,7 @@ const int kOtherError = 0; int error = kOtherError; const std::string& str_error = status.ToString(); - const size_t kNumPatterns = arraysize(patterns); + const size_t kNumPatterns = base::size(patterns); for (size_t i = 0; i < kNumPatterns; ++i) { if (str_error.find(patterns[i]) != std::string::npos) { error = i + 1; @@ -720,7 +720,7 @@ int GetNumCorruptionCodes() { // + 1 for the "other" error that is returned when a corruption message // doesn't match any of the patterns. - return arraysize(patterns) + 1; + return base::size(patterns) + 1; } std::string GetCorruptionMessage(const leveldb::Status& status) {
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py index 25b7cc82..a83c122 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py
@@ -384,6 +384,7 @@ '2013': 'msdia120.dll', '2015': 'msdia140.dll', '2017': 'msdia140.dll', + '2019': 'msdia140.dll', } # Don't let vs_toolchain overwrite our environment.