diff --git a/DEPS b/DEPS index 6baa43e..abefdaa7 100644 --- a/DEPS +++ b/DEPS
@@ -209,11 +209,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': '8942247ae46e8ce1de3706c3468f499949a1c88b', + 'skia_revision': 'fe9b4316d8de469749812376684957347b0709cd', # 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': '43034f95af5e72459e08c9d58f34274ac0ae07ab', + 'v8_revision': 'fe7a5763a6a008e2c6744390db949308acd5602f', # 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. @@ -221,11 +221,11 @@ # 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': '96ab6566490495f472cd239997701b201c7a48ac', + 'angle_revision': 'a44b16d39075af2ba64ac48457bd6f8f3b3aafeb', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. - 'swiftshader_revision': 'f504d9ef5615cad38cb983b02b5dda6f9b3b613b', + 'swiftshader_revision': '90c0551ca547914f96b32d50bba9c2126b45be41', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. @@ -288,7 +288,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': 'b9f13e02ee51a46dd20b31d922ae817de873c2bd', + 'devtools_frontend_revision': 'c13c29dc98e39bc5c96f6b58be4856b8eda4fee6', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -324,7 +324,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. - 'shaderc_revision': 'dfcab4917955daeacc74e5629735321ad45a7c31', + 'shaderc_revision': '772eac6bcaa2742a5c8da44f5480cf6a71d562d9', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -946,7 +946,7 @@ # Tools used when building Chrome for Chrome OS. This affects both the Simple # Chrome workflow, as well as the chromeos-chrome ebuild. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '5766d1ba4c24dfd0961723f67bf79156a5dc4f40', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '51b5c4ef069e8c97c0365ace0ed84447dc237b1d', 'condition': 'checkout_chromeos', }, @@ -1547,7 +1547,7 @@ 'src/third_party/usrsctp/usrsctplib': Var('chromium_git') + '/external/github.com/sctplab/usrsctp' + '@' + '22ba62ffe79c3881581ab430368bf3764d9533eb', - 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@f7463350a894cb26ad7952af498cf109f8194180', + 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@7d19f5261090fbb07bd30679184538c36bee229c', 'src/third_party/vulkan_memory_allocator': Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git' + '@' + '732a76d9d3c70d6aa487216495eeb28518349c3a', @@ -1574,7 +1574,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '43c0f51e87ddec8a014a48428e485b07a3be46f2', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '6ad542cf114da20b7d214fe78fca34b4957ff2ea', + Var('webrtc_git') + '/src.git' + '@' + '376cf07ea25449cb41eef33457cddbcc197cb5ce', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1635,7 +1635,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@e1e13f5c77fbe42bdfb9b34b7925d69ec2faa7a2', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@cba0315f729acb461704dfcad21f43bbbfe2961d', 'condition': 'checkout_src_internal', },
diff --git a/build/config/ozone.gni b/build/config/ozone.gni index a14eb93..537d082 100644 --- a/build/config/ozone.gni +++ b/build/config/ozone.gni
@@ -79,7 +79,10 @@ ozone_platform = "x11" ozone_platform_drm = true ozone_platform_x11 = true - } else if (is_linux || is_chromeos_lacros) { + } else if (is_chromeos_lacros) { + ozone_platform = "wayland" + ozone_platform_wayland = true + } else if (is_linux) { ozone_platform = "x11" ozone_platform_wayland = true ozone_platform_x11 = true
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index 019887fd..00ff4fa 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -4.20210531.0.1 +4.20210531.3.1
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index 019887fd..00ff4fa 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -4.20210531.0.1 +4.20210531.3.1
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc index 289ff12..b79370c 100644 --- a/cc/layers/heads_up_display_layer_impl.cc +++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -510,11 +510,23 @@ render_pass->quad_list.ReplaceExistingElement<viz::TextureDrawQuad>( it); + // The acquired resource's size could be bigger than actually needed due + // to reuse. In this case, only use the part of the texture that is within + // the bounds. + gfx::PointF uv_bottom_right(1.f, 1.f); + if (in_flight_resource_.size() != bounds()) { + uv_bottom_right.set_x( + static_cast<double>(bounds().width()) / + static_cast<double>(in_flight_resource_.size().width())); + uv_bottom_right.set_y( + static_cast<double>(bounds().height()) / + static_cast<double>(in_flight_resource_.size().height())); + } const float vertex_opacity[] = {1.f, 1.f, 1.f, 1.f}; quad->SetNew(sqs, quad_rect, visible_rect, /*needs_blending=*/true, resource_id, /*premultiplied_alpha=*/true, /*uv_top_left=*/gfx::PointF(), - /*uv_bottom_right=*/gfx::PointF(1.f, 1.f), + /*uv_bottom_right=*/uv_bottom_right, /*background_color=*/SK_ColorTRANSPARENT, vertex_opacity, /*flipped=*/false, /*nearest_neighbor=*/false, /*secure_output_only=*/false,
diff --git a/chrome/VERSION b/chrome/VERSION index 813fc30..e9395856 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=93 MINOR=0 -BUILD=4529 +BUILD=4530 PATCH=0
diff --git a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/trigger_scripts/AssistantTriggerScriptBridge.java b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/trigger_scripts/AssistantTriggerScriptBridge.java index 12dd8e2..3d25cc3 100644 --- a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/trigger_scripts/AssistantTriggerScriptBridge.java +++ b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/trigger_scripts/AssistantTriggerScriptBridge.java
@@ -120,8 +120,6 @@ @CalledByNative private void hideTriggerScript() { mTriggerScript.hide(); - mStartupDependencies.getKeyboardVisibilityDelegate().removeKeyboardVisibilityListener( - mKeyboardVisibilityListener); } @CalledByNative
diff --git a/chrome/android/features/autofill_assistant/javatests/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantTriggerScriptIntegrationTest.java b/chrome/android/features/autofill_assistant/javatests/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantTriggerScriptIntegrationTest.java index 408bbe4..97ce013 100644 --- a/chrome/android/features/autofill_assistant/javatests/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantTriggerScriptIntegrationTest.java +++ b/chrome/android/features/autofill_assistant/javatests/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantTriggerScriptIntegrationTest.java
@@ -23,7 +23,9 @@ import static org.chromium.base.test.util.CriteriaHelper.DEFAULT_MAX_TIME_TO_POLL; import static org.chromium.chrome.browser.autofill_assistant.AutofillAssistantUiTestUtil.createDefaultTriggerScriptUI; +import static org.chromium.chrome.browser.autofill_assistant.AutofillAssistantUiTestUtil.scrollIntoView; import static org.chromium.chrome.browser.autofill_assistant.AutofillAssistantUiTestUtil.tapElement; +import static org.chromium.chrome.browser.autofill_assistant.AutofillAssistantUiTestUtil.waitUntilKeyboardMatchesCondition; import static org.chromium.chrome.browser.autofill_assistant.AutofillAssistantUiTestUtil.waitUntilViewAssertionTrue; import static org.chromium.chrome.browser.autofill_assistant.AutofillAssistantUiTestUtil.waitUntilViewMatchesCondition; @@ -723,4 +725,36 @@ waitUntilViewAssertionTrue(withText("Continue"), doesNotExist(), DEFAULT_MAX_TIME_TO_POLL); Assert.assertTrue(AutofillAssistantPreferencesUtil.getShowOnboarding()); } + + @Test + @MediumTest + @Features.EnableFeatures(ChromeFeatureList.AUTOFILL_ASSISTANT_PROACTIVE_HELP) + public void triggerScriptHidesAndShowsForKeyboard() throws Exception { + TriggerScriptProto.Builder triggerScript = + TriggerScriptProto.newBuilder() + .setTriggerCondition( + TriggerScriptConditionProto.newBuilder().setKeyboardHidden( + Empty.newBuilder())) + .setUserInterface(createDefaultTriggerScriptUI("Hello world", + /* bubbleMessage = */ "", + /* withProgressBar = */ false)); + + GetTriggerScriptsResponseProto triggerScripts = GetTriggerScriptsResponseProto.newBuilder() + .addTriggerScripts(triggerScript) + .build(); + AutofillAssistantTestServiceRequestSender testServiceRequestSender = + setupTriggerScripts(triggerScripts); + startAutofillAssistantOnTab(TEST_PAGE_A); + waitUntilViewMatchesCondition(withText("Hello world"), isCompletelyDisplayed()); + + scrollIntoView(mTestRule.getWebContents(), "input1"); + tapElement(mTestRule, "input1"); + waitUntilKeyboardMatchesCondition(mTestRule, /* isShowing= */ true); + waitUntilViewAssertionTrue( + withText("Hello World"), doesNotExist(), DEFAULT_MAX_TIME_TO_POLL); + + Espresso.closeSoftKeyboard(); + waitUntilKeyboardMatchesCondition(mTestRule, /* isShowing= */ false); + waitUntilViewMatchesCondition(withText("Hello world"), isCompletelyDisplayed()); + } }
diff --git a/chrome/android/features/autofill_assistant/javatests/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiTestUtil.java b/chrome/android/features/autofill_assistant/javatests/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiTestUtil.java index ca0f8c65..b6ccc6ed 100644 --- a/chrome/android/features/autofill_assistant/javatests/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiTestUtil.java +++ b/chrome/android/features/autofill_assistant/javatests/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiTestUtil.java
@@ -707,6 +707,23 @@ } /** + * Scroll the element into view. + */ + public static void scrollIntoView(WebContents webContents, String... elementIds) + throws Exception { + if (!checkElementExists(webContents, elementIds)) { + throw new IllegalArgumentException(Arrays.toString(elementIds) + " does not exist"); + } + TestCallbackHelperContainer.OnEvaluateJavaScriptResultHelper javascriptHelper = + new TestCallbackHelperContainer.OnEvaluateJavaScriptResultHelper(); + javascriptHelper.evaluateJavaScriptForTests(webContents, + "(function() {" + getElementSelectorString(elementIds) + ".scrollIntoView();" + + "return true;" + + "})()"); + javascriptHelper.waitUntilHasValue(); + } + + /** * Converts a view into a bitmap. */ public static Bitmap getBitmapFromView(View view) {
diff --git a/chrome/browser/apps/app_service/browser_app_launcher.cc b/chrome/browser/apps/app_service/browser_app_launcher.cc index ca7d7bc..0b70f3627 100644 --- a/chrome/browser/apps/app_service/browser_app_launcher.cc +++ b/chrome/browser/apps/app_service/browser_app_launcher.cc
@@ -41,21 +41,23 @@ AppLaunchParams params_for_restore( params.app_id, params.container, params.disposition, params.source, params.display_id, params.launch_files, params.intent); + std::string app_id = params.app_id; + apps::mojom::AppLaunchSource source = params.source; + apps::mojom::LaunchContainer container = params.container; int restore_id = params.restore_id; auto* web_contents = web_app_launch_manager_.OpenApplication(std::move(params)); if (!SessionID::IsValidValue(restore_id)) { - RecordAppLaunchMetrics(profile_, apps::mojom::AppType::kWeb, - params.app_id, GetLaunchSource(params.source), - params.container); + RecordAppLaunchMetrics(profile_, apps::mojom::AppType::kWeb, app_id, + GetLaunchSource(source), container); return web_contents; } - RecordAppLaunchMetrics(profile_, apps::mojom::AppType::kWeb, params.app_id, + RecordAppLaunchMetrics(profile_, apps::mojom::AppType::kWeb, app_id, apps::mojom::LaunchSource::kFromFullRestore, - params.container); + container); int session_id = GetSessionIdForRestoreFromWebContents(web_contents); if (!SessionID::IsValidValue(session_id)) {
diff --git a/chrome/browser/ash/crostini/crostini_manager.cc b/chrome/browser/ash/crostini/crostini_manager.cc index 8e09b46..6c34c897 100644 --- a/chrome/browser/ash/crostini/crostini_manager.cc +++ b/chrome/browser/ash/crostini/crostini_manager.cc
@@ -2272,10 +2272,12 @@ } // The UI can only resize the default VM, so only (maybe) show the - // notification for the default VM and only if there wasn't an error getting - // free space. + // notification for the default VM. Additionally, ignore <= 0 as -1 means + // error and 0 is ambiguous meaning both no free space and missing data. + // TODO(crbug/1212890): Distinguish 0 bytes free from didn't populate field + // e.g. when VM is already running. if (vm_name == ContainerId::GetDefault().vm_name && - response->free_bytes() != -1) { + response->free_bytes() > 0) { low_disk_notifier_->ShowNotificationIfAppropriate(response->free_bytes()); }
diff --git a/chrome/browser/ash/crostini/crostini_manager_unittest.cc b/chrome/browser/ash/crostini/crostini_manager_unittest.cc index a235d1be..6135961 100644 --- a/chrome/browser/ash/crostini/crostini_manager_unittest.cc +++ b/chrome/browser/ash/crostini/crostini_manager_unittest.cc
@@ -511,6 +511,11 @@ TEST_F(CrostiniManagerTest, StartTerminaVmLowDiskNotification) { const base::FilePath& disk_path = base::FilePath(kVmName); NotificationDisplayServiceTester notification_service(nullptr); + vm_tools::concierge::StartVmResponse response; + response.set_free_bytes(1); + response.set_success(true); + response.set_status(::vm_tools::concierge::VmStatus::VM_STATUS_RUNNING); + fake_concierge_client_->set_start_vm_response(response); EnsureTerminaInstalled(); crostini_manager()->StartTerminaVm(
diff --git a/chrome/browser/ash/guest_os/guest_os_share_path.cc b/chrome/browser/ash/guest_os/guest_os_share_path.cc index 9cfefa6..88e3d6c3 100644 --- a/chrome/browser/ash/guest_os/guest_os_share_path.cc +++ b/chrome/browser/ash/guest_os/guest_os_share_path.cc
@@ -351,6 +351,9 @@ RegisterPersistedPath(vm_name, path); } RegisterSharedPath(vm_name, path); + for (Observer& observer : observers_) { + observer.OnShare(vm_name, path, persist); + } request.mutable_shared_path()->set_path(relative_path.value()); request.mutable_shared_path()->set_writable(true);
diff --git a/chrome/browser/ash/guest_os/guest_os_share_path.h b/chrome/browser/ash/guest_os/guest_os_share_path.h index efa6fe2..3591020 100644 --- a/chrome/browser/ash/guest_os/guest_os_share_path.h +++ b/chrome/browser/ash/guest_os/guest_os_share_path.h
@@ -55,6 +55,9 @@ const std::string& failure_reason)>; class Observer { public: + virtual void OnShare(const std::string& vm_name, + const base::FilePath& path, + bool persist) = 0; virtual void OnUnshare(const std::string& vm_name, const base::FilePath& path) = 0; };
diff --git a/chrome/browser/ash/login/oobe_interactive_ui_test.cc b/chrome/browser/ash/login/oobe_interactive_ui_test.cc index 79c1155..be81a880f 100644 --- a/chrome/browser/ash/login/oobe_interactive_ui_test.cc +++ b/chrome/browser/ash/login/oobe_interactive_ui_test.cc
@@ -827,8 +827,9 @@ // crbug.com/997987. Disabled on MSAN since they time out. // crbug.com/1055853: EndToEnd is flaky on Linux Chromium OS ASan LSan +// crbug.com/1214917: EndToEnd is flaky on linux-chromeos-dbg #if defined(MEMORY_SANITIZER) || defined(ADDRESS_SANITIZER) || \ - defined(LEAK_SANITIZER) + defined(LEAK_SANITIZER) || !defined(NDEBUG) #define MAYBE_EndToEnd DISABLED_EndToEnd #else #define MAYBE_EndToEnd EndToEnd
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc index 3ce81906..f209b70 100644 --- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc +++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -912,14 +912,41 @@ OnFileManagerPrefsChanged(); } -void EventRouter::PopulateCrostiniUnshareEvent( +// Send crostini share, unshare event. +void EventRouter::SendCrostiniEvent( + file_manager_private::CrostiniEventType event_type, + const std::string& vm_name, + const base::FilePath& path) { + std::string mount_name; + std::string file_system_name; + std::string full_path; + if (!util::ExtractMountNameFileSystemNameFullPath( + path, &mount_name, &file_system_name, &full_path)) + return; + + for (const auto& extension_id : GetEventListenerExtensionIds( + profile_, file_manager_private::OnCrostiniChanged::kEventName)) { + file_manager_private::CrostiniEvent event; + PopulateCrostiniEvent(event, event_type, vm_name, extension_id, mount_name, + file_system_name, full_path); + DispatchEventToExtension( + profile_, extension_id, + extensions::events::FILE_MANAGER_PRIVATE_ON_CROSTINI_CHANGED, + file_manager_private::OnCrostiniChanged::kEventName, + file_manager_private::OnCrostiniChanged::Create(event)); + } +} + +// static +void EventRouter::PopulateCrostiniEvent( file_manager_private::CrostiniEvent& event, + file_manager_private::CrostiniEventType event_type, const std::string& vm_name, const std::string& extension_id, const std::string& mount_name, const std::string& file_system_name, const std::string& full_path) { - event.event_type = file_manager_private::CROSTINI_EVENT_TYPE_UNSHARE; + event.event_type = event_type; event.vm_name = vm_name; file_manager_private::CrostiniEvent::EntriesType entry; entry.additional_properties.SetString( @@ -933,26 +960,19 @@ event.entries.emplace_back(std::move(entry)); } +void EventRouter::OnShare(const std::string& vm_name, + const base::FilePath& path, + bool persist) { + if (persist) { + SendCrostiniEvent(file_manager_private::CROSTINI_EVENT_TYPE_SHARE, vm_name, + path); + } +} + void EventRouter::OnUnshare(const std::string& vm_name, const base::FilePath& path) { - std::string mount_name; - std::string file_system_name; - std::string full_path; - if (!util::ExtractMountNameFileSystemNameFullPath( - path, &mount_name, &file_system_name, &full_path)) - return; - - for (const auto& extension_id : GetEventListenerExtensionIds( - profile_, file_manager_private::OnCrostiniChanged::kEventName)) { - file_manager_private::CrostiniEvent event; - PopulateCrostiniUnshareEvent(event, vm_name, extension_id, mount_name, - file_system_name, full_path); - DispatchEventToExtension( - profile_, extension_id, - extensions::events::FILE_MANAGER_PRIVATE_ON_CROSTINI_CHANGED, - file_manager_private::OnCrostiniChanged::kEventName, - file_manager_private::OnCrostiniChanged::Create(event)); - } + SendCrostiniEvent(file_manager_private::CROSTINI_EVENT_TYPE_UNSHARE, vm_name, + path); } void EventRouter::OnTabletModeStarted() {
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.h b/chrome/browser/chromeos/extensions/file_manager/event_router.h index 1e32316..d788239 100644 --- a/chrome/browser/chromeos/extensions/file_manager/event_router.h +++ b/chrome/browser/chromeos/extensions/file_manager/event_router.h
@@ -159,6 +159,9 @@ void OnFileSystemMountFailed() override; // guest_os::GuestOsSharePath::Observer overrides. + void OnShare(const std::string& vm_name, + const base::FilePath& path, + bool persist) override; void OnUnshare(const std::string& vm_name, const base::FilePath& path) override; @@ -177,7 +180,7 @@ base::WeakPtr<EventRouter> GetWeakPtr(); private: - FRIEND_TEST_ALL_PREFIXES(EventRouterTest, PopulateCrostiniUnshareEvent); + FRIEND_TEST_ALL_PREFIXES(EventRouterTest, PopulateCrostiniEvent); // Starts observing file system change events. void ObserveEvents(); @@ -211,9 +214,16 @@ chromeos::MountError error, const Volume& volume); - // Populate the path unshared event. - static void PopulateCrostiniUnshareEvent( + // Send crostini path shared or unshared event. + void SendCrostiniEvent( + extensions::api::file_manager_private::CrostiniEventType event_type, + const std::string& vm_name, + const base::FilePath& path); + + // Populate the crostini path shared or unshared event. + static void PopulateCrostiniEvent( extensions::api::file_manager_private::CrostiniEvent& event, + extensions::api::file_manager_private::CrostiniEventType event_type, const std::string& vm_name, const std::string& extension_id, const std::string& mount_name,
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router_unittest.cc b/chrome/browser/chromeos/extensions/file_manager/event_router_unittest.cc index b14ff4a..5cf79de 100644 --- a/chrome/browser/chromeos/extensions/file_manager/event_router_unittest.cc +++ b/chrome/browser/chromeos/extensions/file_manager/event_router_unittest.cc
@@ -8,11 +8,11 @@ namespace file_manager { -TEST(EventRouterTest, PopulateCrostiniUnshareEvent) { +TEST(EventRouterTest, PopulateCrostiniEvent) { extensions::api::file_manager_private::CrostiniEvent event; - EventRouter::PopulateCrostiniUnshareEvent(event, "vmname", "extensionid", - "mountname", "filesystemname", - "/full/path"); + EventRouter::PopulateCrostiniEvent( + event, extensions::api::file_manager_private::CROSTINI_EVENT_TYPE_UNSHARE, + "vmname", "extensionid", "mountname", "filesystemname", "/full/path"); EXPECT_EQ(event.event_type, extensions::api::file_manager_private::CROSTINI_EVENT_TYPE_UNSHARE);
diff --git a/chrome/browser/chromeos/full_restore/arc_ghost_window_shell_surface.cc b/chrome/browser/chromeos/full_restore/arc_ghost_window_shell_surface.cc index 5f1dc670..fdd52bd0 100644 --- a/chrome/browser/chromeos/full_restore/arc_ghost_window_shell_surface.cc +++ b/chrome/browser/chromeos/full_restore/arc_ghost_window_shell_surface.cc
@@ -4,13 +4,13 @@ #include "chrome/browser/chromeos/full_restore/arc_ghost_window_shell_surface.h" -#include "ash/public/cpp/window_properties.h" #include "ash/wm/desks/desks_util.h" #include "chrome/browser/chromeos/full_restore/arc_ghost_window_delegate.h" #include "chrome/browser/chromeos/full_restore/arc_ghost_window_view.h" #include "chrome/browser/chromeos/full_restore/arc_window_utils.h" #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" #include "components/exo/buffer.h" +#include "components/full_restore/full_restore_utils.h" #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" #include "ui/aura/env.h" #include "ui/views/window/caption_button_types.h" @@ -141,9 +141,9 @@ ui::PropertyHandler* property_handler, const absl::optional<std::string>& id) { if (id) - property_handler->SetProperty(ash::kAppIDKey, *id); + property_handler->SetProperty(::full_restore::kAppIdKey, *id); else - property_handler->ClearProperty(ash::kAppIDKey); + property_handler->ClearProperty(::full_restore::kAppIdKey); } } // namespace full_restore
diff --git a/chrome/browser/chromeos/input_method/ime_service_connector.h b/chrome/browser/chromeos/input_method/ime_service_connector.h index 7536fdf..80a0254 100644 --- a/chrome/browser/chromeos/input_method/ime_service_connector.h +++ b/chrome/browser/chromeos/input_method/ime_service_connector.h
@@ -8,7 +8,7 @@ #include "base/base_paths.h" #include "base/files/file_path.h" #include "chrome/browser/profiles/profile.h" -#include "chromeos/services/ime/public/mojom/input_engine.mojom.h" +#include "chromeos/services/ime/public/mojom/ime_service.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h"
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys.cc b/chrome/browser/chromeos/platform_keys/platform_keys.cc index 10d9b03..709e6609 100644 --- a/chrome/browser/chromeos/platform_keys/platform_keys.cc +++ b/chrome/browser/chromeos/platform_keys/platform_keys.cc
@@ -257,46 +257,57 @@ return output; } - // Currently, the only supported combinations are: - // 1- A certificate declaring rsaEncryption in the SubjectPublicKeyInfo used - // with the RSASSA-PKCS1-v1.5 algorithm. - // 2- A certificate declaring id-ecPublicKey in the SubjectPublicKeyInfo used - // with the ECDSA algorithm. - if (algorithm_name == kWebCryptoRsassaPkcs1v15) { - if (key_info.key_type != net::X509Certificate::kPublicKeyTypeRSA) { - output.status = Status::kErrorAlgorithmNotPermittedByCertificate; - return output; - } - - BuildWebCryptoRSAAlgorithmDictionary(key_info, &output.algorithm); - output.public_key = - std::vector<uint8_t>(key_info.public_key_spki_der.begin(), - key_info.public_key_spki_der.end()); - output.status = Status::kSuccess; + if (GetKeyTypeForAlgorithm(algorithm_name) != key_info.key_type) { + output.status = Status::kErrorAlgorithmNotPermittedByCertificate; return output; } - if (algorithm_name == kWebCryptoEcdsa) { - if (key_info.key_type != net::X509Certificate::kPublicKeyTypeECDSA) { - output.status = Status::kErrorAlgorithmNotPermittedByCertificate; - return output; - } + absl::optional<base::DictionaryValue> algorithm = + BuildWebCrypAlgorithmDictionary(key_info); + DCHECK(algorithm.has_value()); + output.algorithm = std::move(algorithm.value()); - BuildWebCryptoEcdsaAlgorithmDictionary(key_info, &output.algorithm); - output.public_key = - std::vector<uint8_t>(key_info.public_key_spki_der.begin(), - key_info.public_key_spki_der.end()); - output.status = Status::kSuccess; - return output; - } - - output.status = Status::kErrorAlgorithmNotPermittedByCertificate; + output.public_key = std::vector<uint8_t>(key_info.public_key_spki_der.begin(), + key_info.public_key_spki_der.end()); + output.status = Status::kSuccess; return output; } PublicKeyInfo::PublicKeyInfo() = default; PublicKeyInfo::~PublicKeyInfo() = default; +net::X509Certificate::PublicKeyType GetKeyTypeForAlgorithm( + const std::string& algorithm_name) { + // Currently, the only supported combinations are: + // 1- A certificate declaring rsaEncryption in the SubjectPublicKeyInfo used + // with the RSASSA-PKCS1-v1.5 algorithm. + // 2- A certificate declaring id-ecPublicKey in the SubjectPublicKeyInfo used + // with the ECDSA algorithm. + if (algorithm_name == kWebCryptoRsassaPkcs1v15) + return net::X509Certificate::kPublicKeyTypeRSA; + if (algorithm_name == kWebCryptoEcdsa) + return net::X509Certificate::kPublicKeyTypeECDSA; + return net::X509Certificate::kPublicKeyTypeUnknown; +} + +absl::optional<base::DictionaryValue> BuildWebCrypAlgorithmDictionary( + const PublicKeyInfo& key_info) { + switch (key_info.key_type) { + case net::X509Certificate::kPublicKeyTypeRSA: { + base::DictionaryValue result; + BuildWebCryptoRSAAlgorithmDictionary(key_info, &result); + return result; + } + case net::X509Certificate::kPublicKeyTypeECDSA: { + base::DictionaryValue result; + BuildWebCryptoEcdsaAlgorithmDictionary(key_info, &result); + return result; + } + default: + return absl::nullopt; + } +} + void BuildWebCryptoRSAAlgorithmDictionary(const PublicKeyInfo& key_info, base::DictionaryValue* algorithm) { CHECK_EQ(net::X509Certificate::kPublicKeyTypeRSA, key_info.key_type);
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys.h b/chrome/browser/chromeos/platform_keys/platform_keys.h index 23dc64de7..1ddc341 100644 --- a/chrome/browser/chromeos/platform_keys/platform_keys.h +++ b/chrome/browser/chromeos/platform_keys/platform_keys.h
@@ -15,6 +15,7 @@ #include "base/values.h" #include "chromeos/crosapi/mojom/keystore_error.mojom.h" #include "net/cert/x509_certificate.h" +#include "third_party/abseil-cpp/absl/types/optional.h" namespace chromeos { namespace platform_keys { @@ -126,6 +127,18 @@ size_t key_size_bits = 0; }; +// Returns the certificate key type that supports the given algorithm, +// or |kPublicKeyTypeUnknown| if the algorithm is unknown or unsupported. +net::X509Certificate::PublicKeyType GetKeyTypeForAlgorithm( + const std::string& algorithm_name); + +// Builds a partial WebCrypto Algorithm object from the parameters available in +// |key_info|. This supports both RSA and EC keys. +// Returns absl::nullopt if the key is of an unsupported type (so not RSA or +// EC). +absl::optional<base::DictionaryValue> BuildWebCrypAlgorithmDictionary( + const PublicKeyInfo& key_info); + // Builds a partial WebCrypto Algorithm object from the parameters available in // |key_info|, which must be the info of an RSA key. This doesn't include // sign/hash parameters and thus isn't complete. platform_keys::GetPublicKey()
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_service.h b/chrome/browser/chromeos/platform_keys/platform_keys_service.h index 82750510..d97c8c7 100644 --- a/chrome/browser/chromeos/platform_keys/platform_keys_service.h +++ b/chrome/browser/chromeos/platform_keys/platform_keys_service.h
@@ -109,7 +109,8 @@ // Functions of this class shouldn't be called directly from the context of // an extension. Instead use ExtensionPlatformKeysService which enforces // restrictions upon extensions. -// All public methods of this class should be called on the UI thread. +// All public methods of this class should be called on the UI thread and all of +// the callbacks will be called with the result on the UI thread as well. // When the underlying key store is not available anymore, a PlatformKeysService // is shut down. Any function called after that will fail with an error. // For a Profile-specific PlatformKeysService, this will be when the Profile is
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_service_nss.cc b/chrome/browser/chromeos/platform_keys/platform_keys_service_nss.cc index 80c4c86b1..ff4494c8 100644 --- a/chrome/browser/chromeos/platform_keys/platform_keys_service_nss.cc +++ b/chrome/browser/chromeos/platform_keys/platform_keys_service_nss.cc
@@ -82,8 +82,7 @@ class NSSOperationState { public: explicit NSSOperationState(ServiceWeakPtr weak_ptr) - : service_weak_ptr_(weak_ptr), - origin_task_runner_(base::ThreadTaskRunnerHandle::Get()) {} + : service_weak_ptr_(weak_ptr) {} virtual ~NSSOperationState() = default; @@ -102,9 +101,6 @@ // Weak pointer to the PlatformKeysServiceImpl that created this state. Used // to check if the callback should be still called. ServiceWeakPtr service_weak_ptr_; - // The task runner on which the NSS operation was called. Any reply must be - // posted to this runner. - scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner_; private: DISALLOW_COPY_AND_ASSIGN(NSSOperationState); @@ -192,7 +188,7 @@ status == Status::kSuccess); auto bound_callback = base::BindOnce(std::move(callback_), public_key_spki_der, status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -231,7 +227,7 @@ status == Status::kSuccess); auto bound_callback = base::BindOnce(std::move(callback_), public_key_spki_der, status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -287,7 +283,7 @@ EmitOperationStatusToHistogram(status == Status::kSuccess); auto bound_callback = base::BindOnce(std::move(callback_), signature, status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -340,7 +336,7 @@ Status status) { auto bound_callback = base::BindOnce(std::move(callback_), std::move(matches), status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -376,7 +372,7 @@ Status status) { auto bound_callback = base::BindOnce(std::move(callback_), std::move(certs), status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -408,7 +404,7 @@ Status status) { auto bound_callback = base::BindOnce( std::move(callback_), std::move(public_key_spki_der_list), status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -441,7 +437,7 @@ private: void CallBack(const base::Location& from, Status status) { auto bound_callback = base::BindOnce(std::move(callback_), status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -474,7 +470,7 @@ private: void CallBack(const base::Location& from, Status status) { auto bound_callback = base::BindOnce(std::move(callback_), status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -508,7 +504,7 @@ private: void CallBack(const base::Location& from, Status status) { auto bound_callback = base::BindOnce(std::move(callback_), status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -540,7 +536,7 @@ Status status) { auto bound_callback = base::BindOnce(std::move(callback_), std::move(token_ids), status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -578,7 +574,7 @@ Status status) { auto bound_callback = base::BindOnce(std::move(callback_), token_ids, status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -618,7 +614,7 @@ private: void CallBack(const base::Location& from, Status status) { auto bound_callback = base::BindOnce(std::move(callback_), status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -659,7 +655,7 @@ Status status) { auto bound_callback = base::BindOnce(std::move(callback_), attribute_value, status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); } @@ -696,7 +692,7 @@ Status status) { auto bound_callback = base::BindOnce(std::move(callback_), on_token, status); - origin_task_runner_->PostTask( + content::GetUIThreadTaskRunner({})->PostTask( from, base::BindOnce(&NSSOperationState::RunCallback, std::move(bound_callback), service_weak_ptr_)); }
diff --git a/chrome/browser/extensions/api/automation/automation_apitest.cc b/chrome/browser/extensions/api/automation/automation_apitest.cc index 6aa5c01..c1c1fef4f 100644 --- a/chrome/browser/extensions/api/automation/automation_apitest.cc +++ b/chrome/browser/extensions/api/automation/automation_apitest.cc
@@ -406,7 +406,13 @@ << message_; } -IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopInitialFocus) { +// TODO(http://crbug.com/1213987): flaky on ChromeOS. +#if defined(OS_CHROMEOS) +#define MAYBE_DesktopInitialFocus DISABLED_DesktopInitialFocus +#else +#define MAYBE_DesktopInitialFocus DesktopInitialFocus +#endif +IN_PROC_BROWSER_TEST_F(AutomationApiTest, MAYBE_DesktopInitialFocus) { ASSERT_TRUE(RunExtensionTest("automation/tests/desktop", {.page_url = "initial_focus.html"})) << message_; @@ -632,7 +638,14 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) -IN_PROC_BROWSER_TEST_F(AutomationApiTest, HitTestMultipleWindows) { +// TODO(crbug.com/1209766) Flaky on lacros +#if BUILDFLAG(IS_CHROMEOS_LACROS) +#define MAYBE_HitTestMultipleWindows DISABLED_HitTestMultipleWindows +#else +#define MAYBE_HitTestMultipleWindows HitTestMultipleWindows +#endif + +IN_PROC_BROWSER_TEST_F(AutomationApiTest, MAYBE_HitTestMultipleWindows) { StartEmbeddedTestServer(); ASSERT_TRUE(RunExtensionTest({.name = "automation/tests/desktop", .page_url = "hit_test_multiple_windows.html"}))
diff --git a/chrome/browser/extensions/api/platform_keys/platform_keys_api_ash.cc b/chrome/browser/extensions/api/platform_keys/platform_keys_api_ash.cc index 1735e135..00870460 100644 --- a/chrome/browser/extensions/api/platform_keys/platform_keys_api_ash.cc +++ b/chrome/browser/extensions/api/platform_keys/platform_keys_api_ash.cc
@@ -264,20 +264,15 @@ result_match.certificate.assign(der_encoded_cert.begin(), der_encoded_cert.end()); - switch (key_info.key_type) { - case net::X509Certificate::kPublicKeyTypeRSA: - chromeos::platform_keys::BuildWebCryptoRSAAlgorithmDictionary( - key_info, &result_match.key_algorithm.additional_properties); - break; - case net::X509Certificate::kPublicKeyTypeECDSA: - chromeos::platform_keys::BuildWebCryptoEcdsaAlgorithmDictionary( - key_info, &result_match.key_algorithm.additional_properties); - break; - default: - LOG(ERROR) << "Skipping unsupported certificate with key type " - << key_info.key_type; - continue; + absl::optional<base::DictionaryValue> algorithm = + BuildWebCrypAlgorithmDictionary(key_info); + if (!algorithm) { + LOG(ERROR) << "Skipping unsupported certificate with key type " + << key_info.key_type; + continue; } + result_match.key_algorithm.additional_properties = + std::move(algorithm.value()); result_matches.push_back(std::move(result_match)); }
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc index b7792c1..70eb8ed6 100644 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
@@ -1692,8 +1692,14 @@ // Tests that the Play/Pause button is displayed appropriately in the // Picture-in-Picture window. +// TODO(crbug.com/1213355): Test is flaky on Linux. +#if defined(OS_LINUX) +#define MAYBE_PlayPauseButtonVisibility DISABLED_PlayPauseButtonVisibility +#else +#define MAYBE_PlayPauseButtonVisibility PlayPauseButtonVisibility +#endif IN_PROC_BROWSER_TEST_F(PictureInPictureWindowControllerBrowserTest, - PlayPauseButtonVisibility) { + MAYBE_PlayPauseButtonVisibility) { LoadTabAndEnterPictureInPicture( browser(), base::FilePath(kPictureInPictureWindowSizePage)); @@ -1859,7 +1865,7 @@ // window when Media Session actions "play" and "pause" are handled by the // website even if video is a media stream. IN_PROC_BROWSER_TEST_F(MediaSessionPictureInPictureWindowControllerBrowserTest, - PlayPauseButtonVisibility) { + MAYBE_PlayPauseButtonVisibility) { LoadTabAndEnterPictureInPicture( browser(), base::FilePath(kPictureInPictureWindowSizePage));
diff --git a/chrome/browser/signin/ui/android/java/src/org/chromium/chrome/browser/signin/ui/SigninPromoUtil.java b/chrome/browser/signin/ui/android/java/src/org/chromium/chrome/browser/signin/ui/SigninPromoUtil.java index 9fe9485..0665dec 100644 --- a/chrome/browser/signin/ui/android/java/src/org/chromium/chrome/browser/signin/ui/SigninPromoUtil.java +++ b/chrome/browser/signin/ui/android/java/src/org/chromium/chrome/browser/signin/ui/SigninPromoUtil.java
@@ -24,6 +24,7 @@ import org.chromium.components.signin.metrics.SigninAccessPoint; import org.chromium.components.user_prefs.UserPrefs; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -110,11 +111,8 @@ SigninPromoController.OnDismissListener listener) { final AccountManagerFacade accountManagerFacade = AccountManagerFacadeProvider.getInstance(); - if (!accountManagerFacade.isCachePopulated()) { - signinPromoController.setupPromoView(view, /* profileData= */ null, listener); - return; - } - final List<Account> accounts = accountManagerFacade.tryGetGoogleAccounts(); + final List<Account> accounts = + accountManagerFacade.getGoogleAccounts().or(Collections.emptyList()); if (accounts.isEmpty()) { signinPromoController.setupPromoView(view, /* profileData= */ null, listener); return;
diff --git a/chrome/browser/ui/app_list/app_list_client_impl.cc b/chrome/browser/ui/app_list/app_list_client_impl.cc index dde88a8..1c7ca499 100644 --- a/chrome/browser/ui/app_list/app_list_client_impl.cc +++ b/chrome/browser/ui/app_list/app_list_client_impl.cc
@@ -52,6 +52,11 @@ AppListClientImpl* g_app_list_client_instance = nullptr; +// Parameters used by the time duration metrics. +constexpr base::TimeDelta kTimeMetricsMin = base::TimeDelta::FromSeconds(1); +constexpr base::TimeDelta kTimeMetricsMax = base::TimeDelta::FromDays(7); +constexpr int kTimeMetricsBucketCount = 100; + bool IsTabletMode() { return ash::TabletMode::Get() && ash::TabletMode::Get()->InTabletMode(); } @@ -423,7 +428,7 @@ } void AppListClientImpl::InitializeAsIfNewUserLoginForTest() { - new_user_session_activation_time_ = base::TimeTicks::Now(); + new_user_session_activation_time_ = base::Time::Now(); state_for_new_user_ = StateForNewUser(); } @@ -435,7 +440,7 @@ return; } - new_user_session_activation_time_ = base::TimeTicks::Now(); + new_user_session_activation_time_ = base::Time::Now(); } void AppListClientImpl::OnTemplateURLServiceChanged() { @@ -556,13 +561,18 @@ state_for_new_user_->showing_recorded = true; DCHECK(new_user_session_activation_time_.has_value()); - UMA_HISTOGRAM_CUSTOM_TIMES( - /*name=*/ - "Apps.TimeDurationBetweenNewUserSessionActivationAndFirstLauncherOpening", - /*sample=*/base::TimeTicks::Now() - *new_user_session_activation_time_, - /*min=*/base::TimeDelta::FromSeconds(1), - /*max=*/base::TimeDelta::FromDays(7), - /*bucket_count=*/100); + const base::TimeDelta opening_duration = + base::Time::Now() - *new_user_session_activation_time_; + if (opening_duration >= base::TimeDelta()) { + // `base::Time` may skew. Therefore only record when the time duration is + // non-negative. + UMA_HISTOGRAM_CUSTOM_TIMES( + /*name=*/ + "Apps." + "TimeDurationBetweenNewUserSessionActivationAndFirstLauncherOpening", + /*sample=*/opening_duration, kTimeMetricsMin, kTimeMetricsMax, + kTimeMetricsBucketCount); + } } void AppListClientImpl::RecordOpenedResultFromSearchBox( @@ -614,4 +624,17 @@ state_for_new_user_->action_recorded = true; base::UmaHistogramEnumeration("Apps.FirstLauncherActionByNewUsers", launched_from); + + DCHECK(new_user_session_activation_time_.has_value()); + const base::TimeDelta launcher_action_duration = + base::Time::Now() - *new_user_session_activation_time_; + if (launcher_action_duration >= base::TimeDelta()) { + // `base::Time` may skew. Therefore only record when the time duration is + // non-negative. + UMA_HISTOGRAM_CUSTOM_TIMES( + /*name=*/ + "Apps.TimeBetweenNewUserSessionActivationAndFirstLauncherAction", + /*sample=*/launcher_action_duration, kTimeMetricsMin, kTimeMetricsMax, + kTimeMetricsBucketCount); + } }
diff --git a/chrome/browser/ui/app_list/app_list_client_impl.h b/chrome/browser/ui/app_list/app_list_client_impl.h index 939b40d..8989d55 100644 --- a/chrome/browser/ui/app_list/app_list_client_impl.h +++ b/chrome/browser/ui/app_list/app_list_client_impl.h
@@ -211,7 +211,7 @@ // Indicates when the session of a new user becomes active. If there is no new // users logged in, `new_user_session_activation_time_` is null. - absl::optional<base::TimeTicks> new_user_session_activation_time_; + absl::optional<base::Time> new_user_session_activation_time_; bool app_list_target_visibility_ = false; bool app_list_visible_ = false;
diff --git a/chrome/browser/ui/app_list/app_list_client_impl_browsertest.cc b/chrome/browser/ui/app_list/app_list_client_impl_browsertest.cc index 0b2dccf..d9581ac 100644 --- a/chrome/browser/ui/app_list/app_list_client_impl_browsertest.cc +++ b/chrome/browser/ui/app_list/app_list_client_impl_browsertest.cc
@@ -267,6 +267,9 @@ "Apps.FirstLauncherActionByNewUsers", static_cast<int>(ash::AppListLaunchedFrom::kLaunchedFromGrid), /*expected_bucket_count=*/1); + histogram_tester.ExpectTotalCount( + "Apps.TimeBetweenNewUserSessionActivationAndFirstLauncherAction", + /*expected_bucket_count=*/1); // Verify that only the first app activation is recorded. client->ActivateItem(/*profile_id=*/0, item->id(), /*event_flags=*/0); @@ -274,6 +277,9 @@ "Apps.FirstLauncherActionByNewUsers", static_cast<int>(ash::AppListLaunchedFrom::kLaunchedFromGrid), /*expected_bucket_count=*/1); + histogram_tester.ExpectTotalCount( + "Apps.TimeBetweenNewUserSessionActivationAndFirstLauncherAction", + /*expected_bucket_count=*/1); } // Test that all the items in the context menu for a hosted app have valid @@ -373,6 +379,9 @@ "Apps.FirstLauncherActionByNewUsers", static_cast<int>(ash::AppListLaunchedFrom::kLaunchedFromSearchBox), /*expected_bucket_count=*/1); + histogram_tester.ExpectTotalCount( + "Apps.TimeBetweenNewUserSessionActivationAndFirstLauncherAction", + /*expected_bucket_count=*/1); // App list should be dismissed. EXPECT_FALSE(client->app_list_target_visibility());
diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate.cc b/chrome/browser/ui/app_list/app_list_controller_delegate.cc index 491492d81..422d897 100644 --- a/chrome/browser/ui/app_list/app_list_controller_delegate.cc +++ b/chrome/browser/ui/app_list/app_list_controller_delegate.cc
@@ -18,9 +18,6 @@ #include "chrome/browser/ui/ash/tablet_mode_page_behavior.h" #include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/webui/settings/chromeos/app_management/app_management_uma.h" -#include "chrome/browser/web_applications/components/app_registrar.h" -#include "chrome/browser/web_applications/components/web_app_utils.h" -#include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/common/extensions/extension_constants.h" #include "components/services/app_service/public/mojom/types.mojom.h" #include "extensions/browser/extension_prefs.h" @@ -59,14 +56,13 @@ void AppListControllerDelegate::DoShowAppInfoFlow(Profile* profile, const std::string& app_id) { - DCHECK_NE(apps::AppServiceProxyFactory::GetForProfile(profile) - ->AppRegistryCache() - .GetAppType(app_id), - apps::mojom::AppType::kUnknown); + auto app_type = apps::AppServiceProxyFactory::GetForProfile(profile) + ->AppRegistryCache() + .GetAppType(app_id); + DCHECK_NE(app_type, apps::mojom::AppType::kUnknown); - web_app::AppRegistrar& registrar = - web_app::WebAppProvider::Get(profile)->registrar(); - if (registrar.IsInstalled(app_id)) { + if (app_type == apps::mojom::AppType::kWeb || + app_type == apps::mojom::AppType::kSystemWeb) { chrome::ShowAppManagementPage( profile, app_id, AppManagementEntryPoint::kAppListContextMenuAppInfoWebApp);
diff --git a/chrome/browser/ui/ash/sharesheet/sharesheet_bubble_view.cc b/chrome/browser/ui/ash/sharesheet/sharesheet_bubble_view.cc index fc91f9d3..56bee2c 100644 --- a/chrome/browser/ui/ash/sharesheet/sharesheet_bubble_view.cc +++ b/chrome/browser/ui/ash/sharesheet/sharesheet_bubble_view.cc
@@ -220,6 +220,7 @@ body_view->AddChildView(std::make_unique<views::Separator>()); } + const size_t targets_size = targets.size(); auto scroll_view = std::make_unique<views::ScrollView>(); scroll_view->SetContents(MakeScrollableTargetView(std::move(targets))); scroll_view->ClipHeightTo(kTargetViewHeight, kTargetViewExpandedHeight); @@ -232,7 +233,7 @@ footer_view_->AddChildView(std::make_unique<SharesheetExpandButton>( base::BindRepeating(&SharesheetBubbleView::ExpandButtonPressed, base::Unretained(this)))); - } else if (targets.size() <= kMaxTargetsPerRow * kMaxRowsForDefaultView) { + } else if (targets_size <= kMaxTargetsPerRow * kMaxRowsForDefaultView) { // When we have between 1 and 8 targets inclusive. Update |footer_layout| // padding. footer_layout->set_inside_border_insets(
diff --git a/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc b/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc index e1f13d8..0aa16ee 100644 --- a/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc +++ b/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc
@@ -75,9 +75,7 @@ #include "chrome/browser/ui/settings_window_manager_chromeos.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/webui/settings/chromeos/app_management/app_management_uma.h" -#include "chrome/browser/web_applications/components/app_registrar.h" #include "chrome/browser/web_applications/components/web_app_helpers.h" -#include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/common/chrome_features.h" #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" #include "chrome/common/pref_names.h" @@ -845,16 +843,16 @@ apps::AppServiceProxyChromeOs* proxy = apps::AppServiceProxyFactory::GetForProfile(profile); + auto app_type = proxy->AppRegistryCache().GetAppType(app_id); + // Apps that are not in the App Service may call this function. // E.g. extensions, apps that are using their platform specific IDs. - if (proxy->AppRegistryCache().GetAppType(app_id) == - apps::mojom::AppType::kUnknown) { + if (app_type == apps::mojom::AppType::kUnknown) { return; } - web_app::WebAppProvider* web_app_provider = - web_app::WebAppProvider::Get(profile); - if (web_app_provider && web_app_provider->registrar().IsInstalled(app_id)) { + if (app_type == apps::mojom::AppType::kWeb || + app_type == apps::mojom::AppType::kSystemWeb) { chrome::ShowAppManagementPage( profile, app_id, AppManagementEntryPoint::kShelfContextMenuAppInfoWebApp);
diff --git a/chrome/browser/web_applications/app_service/web_apps_chromeos.cc b/chrome/browser/web_applications/app_service/web_apps_chromeos.cc index 3e4297d..3cae3689 100644 --- a/chrome/browser/web_applications/app_service/web_apps_chromeos.cc +++ b/chrome/browser/web_applications/app_service/web_apps_chromeos.cc
@@ -634,6 +634,22 @@ bool paused = publisher_helper().IsPaused(web_app->app_id()); app->icon_key = publisher_helper().MakeIconKey(web_app); + auto display_mode = GetRegistrar()->GetAppUserDisplayMode(web_app->app_id()); + switch (display_mode) { + case blink::mojom::DisplayMode::kUndefined: + app->window_mode = apps::mojom::WindowMode::kUnknown; + break; + case blink::mojom::DisplayMode::kBrowser: + app->window_mode = apps::mojom::WindowMode::kBrowser; + break; + case blink::mojom::DisplayMode::kMinimalUi: + case blink::mojom::DisplayMode::kStandalone: + case blink::mojom::DisplayMode::kFullscreen: + case blink::mojom::DisplayMode::kWindowControlsOverlay: + app->window_mode = apps::mojom::WindowMode::kWindow; + break; + } + apps::mojom::OptionalBool has_notification = app_notifications_.HasNotification(web_app->app_id()) ? apps::mojom::OptionalBool::kTrue
diff --git a/chrome/browser/web_applications/web_app_icon_manager_unittest.cc b/chrome/browser/web_applications/web_app_icon_manager_unittest.cc index 3a4bc05..3a509dc0 100644 --- a/chrome/browser/web_applications/web_app_icon_manager_unittest.cc +++ b/chrome/browser/web_applications/web_app_icon_manager_unittest.cc
@@ -1381,7 +1381,7 @@ } TEST_F(WebAppIconManagerTest, CacheAppFavicon_UiScaleFactors_NoMissingIcons) { - ui::SetSupportedScaleFactors( + ui::test::ScopedSetSupportedScaleFactors scoped_scale_factors( {ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_200P, ui::SCALE_FACTOR_300P}); std::unique_ptr<WebApp> web_app = CreateWebApp(); @@ -1424,7 +1424,8 @@ } TEST_F(WebAppIconManagerTest, CacheAppFavicon_UiScaleFactors_DownsizingIcons) { - ui::SetSupportedScaleFactors({ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_200P}); + ui::test::ScopedSetSupportedScaleFactors scoped_scale_factors( + {ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_200P}); std::unique_ptr<WebApp> web_app = CreateWebApp(); const AppId app_id = web_app->app_id(); @@ -1461,7 +1462,8 @@ } TEST_F(WebAppIconManagerTest, CacheAppFavicon_UiScaleFactors_NoIcons) { - ui::SetSupportedScaleFactors({ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_200P}); + ui::test::ScopedSetSupportedScaleFactors scoped_scale_factors( + {ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_200P}); std::unique_ptr<WebApp> web_app = CreateWebApp(); const AppId app_id = web_app->app_id(); @@ -1474,7 +1476,8 @@ } TEST_F(WebAppIconManagerTest, CacheAppFavicon_UiScaleFactors_NoMatchSmaller) { - ui::SetSupportedScaleFactors({ui::SCALE_FACTOR_200P, ui::SCALE_FACTOR_300P}); + ui::test::ScopedSetSupportedScaleFactors scoped_scale_factors( + {ui::SCALE_FACTOR_200P, ui::SCALE_FACTOR_300P}); std::unique_ptr<WebApp> web_app = CreateWebApp(); const AppId app_id = web_app->app_id(); @@ -1495,7 +1498,8 @@ TEST_F(WebAppIconManagerTest, CacheAppFavicon_UiScaleFactors_DownsizingFromSingleIcon) { - ui::SetSupportedScaleFactors({ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_200P}); + ui::test::ScopedSetSupportedScaleFactors scoped_scale_factors( + {ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_200P}); std::unique_ptr<WebApp> web_app = CreateWebApp(); const AppId app_id = web_app->app_id(); @@ -1529,7 +1533,8 @@ TEST_F(WebAppIconManagerTest, CacheAppFavicon_UiScaleFactors_BiggerUiScaleFactorIconMissing) { - ui::SetSupportedScaleFactors({ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_300P}); + ui::test::ScopedSetSupportedScaleFactors scoped_scale_factors( + {ui::SCALE_FACTOR_100P, ui::SCALE_FACTOR_300P}); std::unique_ptr<WebApp> web_app = CreateWebApp(); const AppId app_id = web_app->app_id();
diff --git a/chrome/browser/win/conflicts/module_info.cc b/chrome/browser/win/conflicts/module_info.cc index 0c04ff6..b684963 100644 --- a/chrome/browser/win/conflicts/module_info.cc +++ b/chrome/browser/win/conflicts/module_info.cc
@@ -80,6 +80,11 @@ std::tie(mik.module_path, mik.module_size, mik.module_time_date_stamp); } +bool ModuleInfoKey::operator==(const ModuleInfoKey& mik) const { + return std::tie(module_path, module_size, module_time_date_stamp) == + std::tie(mik.module_path, mik.module_size, mik.module_time_date_stamp); +} + // ModuleInspectionResult ------------------------------------------------------ ModuleInspectionResult::ModuleInspectionResult() = default;
diff --git a/chrome/browser/win/conflicts/module_info.h b/chrome/browser/win/conflicts/module_info.h index 2c04131..1c1a31d9 100644 --- a/chrome/browser/win/conflicts/module_info.h +++ b/chrome/browser/win/conflicts/module_info.h
@@ -26,6 +26,8 @@ // Less-than operator allowing this object to be used in std::map. bool operator<(const ModuleInfoKey& mi) const; + // Allows comparing keys in DCHECKs. + bool operator==(const ModuleInfoKey& mi) const; // Full path to the module on disk. Part of the key for a ModuleInfo. base::FilePath module_path;
diff --git a/chrome/browser/win/conflicts/module_inspector.cc b/chrome/browser/win/conflicts/module_inspector.cc index 1a9ea3a..43b21caa 100644 --- a/chrome/browser/win/conflicts/module_inspector.cc +++ b/chrome/browser/win/conflicts/module_inspector.cc
@@ -145,10 +145,12 @@ } bool ModuleInspector::IsIdle() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return queue_.empty(); } void ModuleInspector::OnModuleDatabaseIdle() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); MaybeUpdateInspectionResultsCache(); } @@ -199,6 +201,7 @@ void ModuleInspector::OnInspectionResultsCacheRead( InspectionResultsCache inspection_results_cache) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(is_after_startup_); DCHECK(!inspection_results_cache_read_); @@ -224,6 +227,7 @@ } void ModuleInspector::StartInspectingModule() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(inspection_results_cache_read_); DCHECK(!queue_.empty()); @@ -300,6 +304,11 @@ ModuleInspectionResult inspection_result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // TODO(https://crbug.com/1213241): Change to DCHECKs once the issue is + // resolved. + CHECK(!queue_.empty()); + CHECK(queue_.front() == module_key); + // Pop first, because the callback may want to know if there is any work left // to be done, which is caracterized by a non-empty queue. queue_.pop();
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index e43f9ef..8e2146b 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-master-1622451432-27a6dd506be2c21f762a55887642e897c86a3ad6.profdata +chrome-win32-master-1622527178-9a5352b7412ad6ef11456de74f66a37dcaa3308d.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index d873230..a2d677e8 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-master-1622451432-7b1260380fda753c01b76934befbad72cf874a33.profdata +chrome-win64-master-1622527178-f7f002d24b6ce32cbf736f0bf14b7211500ab8a5.profdata
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM index 3d2e3fa..4dea8125 100644 --- a/chromeos/CHROMEOS_LKGM +++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@ -14004.0.0 \ No newline at end of file +14005.0.0 \ No newline at end of file
diff --git a/chromeos/components/camera_app_ui/resources.h b/chromeos/components/camera_app_ui/resources.h index 609aa9e5..2c85fffc 100644 --- a/chromeos/components/camera_app_ui/resources.h +++ b/chromeos/components/camera_app_ui/resources.h
@@ -46,6 +46,7 @@ {"error_msg_take_photo_failed", IDS_ERROR_MSG_TAKE_PHOTO_FAILED}, {"error_msg_take_portrait_bokeh_photo_failed", IDS_ERROR_MSG_TAKE_PORTRAIT_BOKEH_PHOTO_FAILED}, + {"error_msg_video_too_short", IDS_ERROR_MSG_VIDEO_TOO_SHORT}, {"expert_custom_video_parameters", IDS_EXPERT_CUSTOM_VIDEO_PARAMETERS}, {"expert_mode_button", IDS_EXPERT_MODE_BUTTON}, {"expert_preview_metadata", IDS_EXPERT_PREVIEW_METADATA},
diff --git a/chromeos/components/camera_app_ui/resources/js/BUILD.gn b/chromeos/components/camera_app_ui/resources/js/BUILD.gn index 9fa4f66..5a635f4 100644 --- a/chromeos/components/camera_app_ui/resources/js/BUILD.gn +++ b/chromeos/components/camera_app_ui/resources/js/BUILD.gn
@@ -10,6 +10,7 @@ closure_flags = default_closure_args + [ "language_in=ECMASCRIPT_2020", + "language_out=ECMASCRIPT_2020", "jscomp_error=strictCheckTypes", "conformance_configs=" + rebase_path("externs/conformance_config.textproto", root_build_dir),
diff --git a/chromeos/components/camera_app_ui/resources/js/models/file_system_access_entry.js b/chromeos/components/camera_app_ui/resources/js/models/file_system_access_entry.js index 63921a32..806482f 100644 --- a/chromeos/components/camera_app_ui/resources/js/models/file_system_access_entry.js +++ b/chromeos/components/camera_app_ui/resources/js/models/file_system_access_entry.js
@@ -36,8 +36,9 @@ export class FileAccessEntry extends FileSystemAccessEntry { /** * @param {!FileSystemFileHandle} handle + * @param {?DirectoryAccessEntryImpl} parent */ - constructor(handle) { + constructor(handle, parent = null) { super(handle); /** @@ -45,6 +46,12 @@ * @private */ this.handle_ = handle; + + /** + * @type {?DirectoryAccessEntryImpl} + * @private + */ + this.parent_ = parent; } /** @@ -92,6 +99,19 @@ const file = await this.file(); return file.lastModified; } + + /** + * Deletes the file. + * @return {!Promise} + * @throws {!Error} Thrown when trying to delete file with no parent + * directory. + */ + async delete() { + if (this.parent_ === null) { + throw new Error('Failed to delete file due to no parent directory'); + } + return this.parent_.removeEntry(this.name); + } } /** @@ -158,6 +178,13 @@ * directory. */ async getDirectory({name, createIfNotExist}) {} + + /** + * Removes file by given |name| from the directory. + * @param {string} name The name of the file. + * @return {!Promise} + */ + async removeEntry(name) {} } /** @@ -167,8 +194,9 @@ export class DirectoryAccessEntryImpl extends FileSystemAccessEntry { /** * @param {!FileSystemDirectoryHandle} handle + * @param {?DirectoryAccessEntryImpl} parent */ - constructor(handle) { + constructor(handle, parent = null) { super(handle); /** @@ -176,6 +204,12 @@ * @private */ this.handle_ = handle; + + /** + * @type {?DirectoryAccessEntryImpl} + * @private + */ + this.parent_ = parent; } /** @@ -206,7 +240,7 @@ */ async getFile(name) { const handle = await this.handle_.getFileHandle(name, {create: false}); - return new FileAccessEntry(handle); + return new FileAccessEntry(handle, this); } /** @@ -242,7 +276,7 @@ } const handle = await this.handle_.getFileHandle(uniqueName, {create: true}); - return new FileAccessEntry(handle); + return new FileAccessEntry(handle, this); }); } @@ -255,7 +289,7 @@ name, {create: createIfNotExist}); assert(handle !== null); return new DirectoryAccessEntryImpl( - /** @type {!FileSystemDirectoryHandle} */ (handle)); + /** @type {!FileSystemDirectoryHandle} */ (handle), this); } catch (error) { if (!createIfNotExist && error.name === 'NotFoundError') { return null; @@ -265,6 +299,13 @@ } /** + * @override + */ + async removeEntry(name) { + return this.handle_.removeEntry(name); + } + + /** * Gets the file handles in this directory if |isDirectory| is set to false. * If |isDirectory| is true, gets the directory entries instead. * @param {{isDirectory: boolean}} params @@ -274,9 +315,9 @@ const results = []; for await (const handle of this.handle_.values()) { if (isDirectory && handle.kind === 'directory') { - results.push(new DirectoryAccessEntryImpl(handle)); + results.push(new DirectoryAccessEntryImpl(handle, this)); } else if (!isDirectory && handle.kind === 'file') { - results.push(new FileAccessEntry(handle)); + results.push(new FileAccessEntry(handle, this)); } } return results;
diff --git a/chromeos/components/camera_app_ui/resources/js/models/lazy_directory_entry.js b/chromeos/components/camera_app_ui/resources/js/models/lazy_directory_entry.js index 81a58f9..0c10a718 100644 --- a/chromeos/components/camera_app_ui/resources/js/models/lazy_directory_entry.js +++ b/chromeos/components/camera_app_ui/resources/js/models/lazy_directory_entry.js
@@ -115,6 +115,16 @@ } /** + * @override + */ + async removeEntry(name) { + if (this.directory_ === null) { + return null; + } + return this.directory_.removeEntry(name); + } + + /** * Gets the directory which this entry points to. Create it if it does not * exist. * @return {!Promise<!DirectoryAccessEntry>}
diff --git a/chromeos/components/camera_app_ui/resources/js/models/mp4_video_processor.js b/chromeos/components/camera_app_ui/resources/js/models/mp4_video_processor.js index 0f6db045..c0ef1e4 100644 --- a/chromeos/components/camera_app_ui/resources/js/models/mp4_video_processor.js +++ b/chromeos/components/camera_app_ui/resources/js/models/mp4_video_processor.js
@@ -252,6 +252,7 @@ this.inputDevice_ = new InputDevice(); this.outputDevice_ = new OutputDevice(output); this.jobQueue_ = new AsyncJobQueue(); + this.quitCallback_ = null; const args = [ // Make the procssing pipeline start earlier by shorten the initial @@ -312,6 +313,7 @@ assert(stdin.fd === 0); assert(stdout.fd === 1); assert(stderr.fd === 2); + this.quitCallback_ = fs.quit; }, }; @@ -363,6 +365,22 @@ } /** + * Cancels all the remaining tasks and quits the processor. + * @return {!Promise} Resolved when the processor quits. + */ + async cancel() { + await this.jobQueue_.clear(); + await this.output_.close(); + + // We quit the processor directly instead of calling close() to avoid mp4 + // video processor crashing and entering an unrecoverable state when trying + // to encode video file without receiving any data chunk. + if (this.quitCallback_ !== null) { + this.quitCallback_(); + } + } + + /** * Expose the VideoProcessor constructor to given end point. * @param {!Port} endPoint */
diff --git a/chromeos/components/camera_app_ui/resources/js/models/video_processor_interface.js b/chromeos/components/camera_app_ui/resources/js/models/video_processor_interface.js index 3de4853..ccf3286 100644 --- a/chromeos/components/camera_app_ui/resources/js/models/video_processor_interface.js +++ b/chromeos/components/camera_app_ui/resources/js/models/video_processor_interface.js
@@ -22,4 +22,12 @@ * @abstract */ async close() {} + + /** + * Cancels the remaining tasks and quits the processor. No more write + * operations are allowed. + * @return {!Promise} Resolved when the processor quits. + * @abstract + */ + async cancel() {} }
diff --git a/chromeos/components/camera_app_ui/resources/js/models/video_saver.js b/chromeos/components/camera_app_ui/resources/js/models/video_saver.js index 8f18351..d9393c47 100644 --- a/chromeos/components/camera_app_ui/resources/js/models/video_saver.js +++ b/chromeos/components/camera_app_ui/resources/js/models/video_saver.js
@@ -78,6 +78,15 @@ } /** + * Cancels and drops all the written video data. + * @return {!Promise} + */ + async cancel() { + await this.processor_.cancel(); + return this.file_.delete(); + } + + /** * Finishes the write of video data parts and returns result video file. * @return {!Promise<!FileAccessEntry>} Result video file. */
diff --git a/chromeos/components/camera_app_ui/resources/js/type.js b/chromeos/components/camera_app_ui/resources/js/type.js index e79a2d2..c364a72f 100644 --- a/chromeos/components/camera_app_ui/resources/js/type.js +++ b/chromeos/components/camera_app_ui/resources/js/type.js
@@ -322,3 +322,17 @@ this.name = this.constructor.name; } } + +/** + * Throws when the recording is ended with no chunk returned. + */ +export class NoChunkError extends Error { + /** + * @param {string=} message + * @public + */ + constructor(message = 'No chunk is received during recording session') { + super(message); + this.name = this.constructor.name; + } +}
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/record_time.js b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/record_time.js index e30c9b1..f037e7f6 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/record_time.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/record_time.js
@@ -32,6 +32,20 @@ * @private */ this.ticks_ = 0; + + /** + * The timestamp when the recording starts. + * @type {number} + * @private + */ + this.startTimestamp_ = 0; + + /** + * The total duration of the recording in milliseconds. + * @type {number} + * @private + */ + this.totalDuration_ = 0; } /** @@ -61,6 +75,7 @@ start({resume}) { if (!resume) { this.ticks_ = 0; + this.totalDuration_ = 0; } this.update_(this.ticks_); this.recordTime_.hidden = false; @@ -69,12 +84,13 @@ this.ticks_++; this.update_(this.ticks_); }, 1000); + + this.startTimestamp_ = performance.now(); } /** * Stops counting and showing the elapsed recording time. * @param {{pause: boolean}} param If the time count is paused temporarily. - * @return {number} Recorded time in 1 minute buckets. */ stop({pause}) { speak('status_msg_recording_stopped'); @@ -82,12 +98,28 @@ clearInterval(this.tickTimeout_); this.tickTimeout_ = null; } - const mins = Math.ceil(this.ticks_ / 60); if (!pause) { this.ticks_ = 0; this.recordTime_.hidden = true; this.update_(0); } - return mins; + + this.totalDuration_ += performance.now() - this.startTimestamp_; + } + + /** + * Returns the recorded duration in minutes. + * @return {number} + */ + inMinutes() { + return Math.ceil(this.totalDuration_ / 1000 / 60); + } + + /** + * Returns the recorded duration in milliseconds. + * @return {number} + */ + inMilliseconds() { + return this.totalDuration_; } }
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/video.js b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/video.js index 5c3b5a71..9f0fc66 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/video.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/video.js
@@ -27,6 +27,7 @@ import { CanceledError, Facing, // eslint-disable-line no-unused-vars + NoChunkError, PerfEvent, Resolution, ResolutionList, // eslint-disable-line no-unused-vars @@ -54,6 +55,9 @@ */ let avc1Parameters = null; +// The minimum duration of videos captured via cca. +const MINIMUM_VIDEO_DURATION_IN_MILLISECONDS = 500; + /** * Sets avc1 parameter used in video recording. * @param {?h264.EncoderParameters} params @@ -361,23 +365,44 @@ this.recordTime_.start({resume: false}); let /** ?VideoSaver */ videoSaver = null; - let /** number */ duration = 0; + const isVideoTooShort = () => this.recordTime_.inMilliseconds() < + MINIMUM_VIDEO_DURATION_IN_MILLISECONDS; + try { - videoSaver = await this.captureVideo_(); + try { + videoSaver = await this.captureVideo_(); + } finally { + this.recordTime_.stop({pause: false}); + sound.play(dom.get('#sound-rec-end', HTMLAudioElement)); + await this.snapshots_.flush(); + } } catch (e) { - toast.show('error_msg_empty_recording'); - throw e; - } finally { - duration = this.recordTime_.stop({pause: false}); + // Tolerates the error if it is due to the very short duration. Reports + // for other errors. + if (!(e instanceof NoChunkError && isVideoTooShort())) { + toast.show('error_msg_empty_recording'); + throw e; + } } - sound.play(dom.get('#sound-rec-end', HTMLAudioElement)); + + if (isVideoTooShort()) { + toast.show('error_msg_video_too_short'); + if (videoSaver !== null) { + await videoSaver.cancel(); + } + return; + } const settings = this.stream_.getVideoTracks()[0].getSettings(); const resolution = new Resolution(settings.width, settings.height); state.set(PerfEvent.VIDEO_CAPTURE_POST_PROCESSING, true); try { - await this.handler_.handleResultVideo(new VideoResult( - {resolution, duration, videoSaver, everPaused: this.everPaused_})); + await this.handler_.handleResultVideo(new VideoResult({ + resolution, + duration: this.recordTime_.inMinutes(), + videoSaver, + everPaused: this.everPaused_, + })); state.set( PerfEvent.VIDEO_CAPTURE_POST_PROCESSING, false, {resolution, facing: this.facing_}); @@ -386,8 +411,6 @@ PerfEvent.VIDEO_CAPTURE_POST_PROCESSING, false, {hasError: true}); throw e; } - - await this.snapshots_.flush(); } /** @@ -413,45 +436,51 @@ async captureVideo_() { const saver = await this.handler_.createVideoSaver(); - return new Promise((resolve, reject) => { - let noChunk = true; + try { + await new Promise((resolve, reject) => { + let noChunk = true; - const ondataavailable = (event) => { - if (event.data && event.data.size > 0) { - noChunk = false; - saver.write(event.data); - } - }; - const onstop = (event) => { - state.set(state.State.RECORDING, false); + const ondataavailable = (event) => { + if (event.data && event.data.size > 0) { + noChunk = false; + saver.write(event.data); + } + }; + const onstop = async (event) => { + state.set(state.State.RECORDING, false); + state.set(state.State.RECORDING_PAUSED, false); + state.set(state.State.RECORDING_UI_PAUSED, false); + + this.mediaRecorder_.removeEventListener( + 'dataavailable', ondataavailable); + this.mediaRecorder_.removeEventListener('stop', onstop); + + if (noChunk) { + reject(new NoChunkError()); + } else { + // TODO(yuli): Handle insufficient storage. + resolve(saver); + } + }; + const onstart = () => { + state.set(state.State.RECORDING, true); + this.mediaRecorder_.removeEventListener('start', onstart); + }; + this.mediaRecorder_.addEventListener('dataavailable', ondataavailable); + this.mediaRecorder_.addEventListener('stop', onstop); + this.mediaRecorder_.addEventListener('start', onstart); + + window.addEventListener('beforeunload', beforeUnloadListener); + + this.mediaRecorder_.start(100); state.set(state.State.RECORDING_PAUSED, false); state.set(state.State.RECORDING_UI_PAUSED, false); - - this.mediaRecorder_.removeEventListener( - 'dataavailable', ondataavailable); - this.mediaRecorder_.removeEventListener('stop', onstop); - - if (noChunk) { - reject(new Error('Video blob error.')); - } else { - // TODO(yuli): Handle insufficient storage. - resolve(saver); - } - }; - const onstart = () => { - state.set(state.State.RECORDING, true); - this.mediaRecorder_.removeEventListener('start', onstart); - }; - this.mediaRecorder_.addEventListener('dataavailable', ondataavailable); - this.mediaRecorder_.addEventListener('stop', onstop); - this.mediaRecorder_.addEventListener('start', onstart); - - window.addEventListener('beforeunload', beforeUnloadListener); - - this.mediaRecorder_.start(100); - state.set(state.State.RECORDING_PAUSED, false); - state.set(state.State.RECORDING_UI_PAUSED, false); - }); + }); + return saver; + } catch (e) { + await saver.cancel(); + throw e; + } } }
diff --git a/chromeos/components/camera_app_ui/resources/strings/camera_strings.grd b/chromeos/components/camera_app_ui/resources/strings/camera_strings.grd index 407bb6a..a109731 100644 --- a/chromeos/components/camera_app_ui/resources/strings/camera_strings.grd +++ b/chromeos/components/camera_app_ui/resources/strings/camera_strings.grd
@@ -466,6 +466,9 @@ <message desc="Error message shown on camera app window when the app is paused." name="IDS_ERROR_MSG_CAMERA_PAUSED"> Paused </message> + <message desc="Error message shown when users capture a video which is too short." name="IDS_ERROR_MSG_VIDEO_TOO_SHORT"> + The video is not saved since it is too short. + </message> </messages> </release> </grit>
diff --git a/chromeos/components/camera_app_ui/resources/strings/camera_strings_grd/IDS_ERROR_MSG_VIDEO_TOO_SHORT.png.sha1 b/chromeos/components/camera_app_ui/resources/strings/camera_strings_grd/IDS_ERROR_MSG_VIDEO_TOO_SHORT.png.sha1 new file mode 100644 index 0000000..e940b84 --- /dev/null +++ b/chromeos/components/camera_app_ui/resources/strings/camera_strings_grd/IDS_ERROR_MSG_VIDEO_TOO_SHORT.png.sha1
@@ -0,0 +1 @@ +b2626b33abff403cadccdd79d32901163884e88d \ No newline at end of file
diff --git a/chromeos/dbus/session_manager/session_manager_client.cc b/chromeos/dbus/session_manager/session_manager_client.cc index 4f97cfe..8a680f7 100644 --- a/chromeos/dbus/session_manager/session_manager_client.cc +++ b/chromeos/dbus/session_manager/session_manager_client.cc
@@ -24,7 +24,6 @@ #include "base/memory/platform_shared_memory_region.h" #include "base/memory/read_only_shared_memory_region.h" #include "base/memory/writable_shared_memory_region.h" -#include "base/metrics/histogram_functions.h" #include "base/path_service.h" #include "base/strings/string_util.h" #include "base/threading/thread_task_runner_handle.h" @@ -709,18 +708,6 @@ std::move(callback).Run(response); } - // Called when `StorePolicyEx()` finishes. - void OnStorePolicyEx(base::TimeTicks store_policy_ex_start_time, - VoidDBusMethodCallback callback, - dbus::Response* response) { - base::TimeTicks now = base::TimeTicks::Now(); - DCHECK(!store_policy_ex_start_time.is_null()); - base::TimeDelta delta = now - store_policy_ex_start_time; - base::UmaHistogramMediumTimes("Enterprise.StorePolicy.Duration", delta); - - OnVoidMethod(std::move(callback), response); - } - // Non-blocking call to Session Manager to retrieve policy. void CallRetrievePolicy(const login_manager::PolicyDescriptor& descriptor, RetrievePolicyCallback callback) { @@ -784,17 +771,13 @@ writer.AppendArrayOfBytes( reinterpret_cast<const uint8_t*>(policy_blob.data()), policy_blob.size()); - // TODO(crbug/1155533) On grunt devices, initially storing device policy may - // take about 45s, which is longer than the default timeout for dbus calls. - // We need to investigate why this is happening. In the meantime, increase - // the timeout to make sure enrollment does not fail. - // Record the timing to find a reasonable timeout value. - base::TimeTicks store_policy_ex_start_time = base::TimeTicks::Now(); + // The timeout is intentionally chosen to be that big because on some + // devices the operation is slow and a short timeout would lead to + // unnecessary enrollment failures. See crbug.com/1155533 for context. session_manager_proxy_->CallMethod( - &method_call, /*timeout_ms=*/90000, - base::BindOnce(&SessionManagerClientImpl::OnStorePolicyEx, - weak_ptr_factory_.GetWeakPtr(), - store_policy_ex_start_time, std::move(callback))); + &method_call, /*timeout_ms=*/180000, + base::BindOnce(&SessionManagerClientImpl::OnVoidMethod, + weak_ptr_factory_.GetWeakPtr(), std::move(callback))); } // Called when kSessionManagerRetrieveActiveSessions method is complete.
diff --git a/chromeos/services/ime/ime_service.h b/chromeos/services/ime/ime_service.h index c82674fa..8d58c51c 100644 --- a/chromeos/services/ime/ime_service.h +++ b/chromeos/services/ime/ime_service.h
@@ -13,7 +13,7 @@ #include "base/files/file_path.h" #include "chromeos/services/ime/input_engine.h" #include "chromeos/services/ime/public/cpp/shared_lib/interfaces.h" -#include "chromeos/services/ime/public/mojom/input_engine.mojom.h" +#include "chromeos/services/ime/public/mojom/ime_service.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h"
diff --git a/chromeos/services/ime/public/mojom/BUILD.gn b/chromeos/services/ime/public/mojom/BUILD.gn index cd96507..26939b9 100644 --- a/chromeos/services/ime/public/mojom/BUILD.gn +++ b/chromeos/services/ime/public/mojom/BUILD.gn
@@ -5,7 +5,10 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("mojom") { - sources = [ "input_engine.mojom" ] + sources = [ + "ime_service.mojom", + "input_engine.mojom", + ] public_deps = [ "//mojo/public/mojom/base",
diff --git a/chromeos/services/ime/public/mojom/ime_service.mojom b/chromeos/services/ime/public/mojom/ime_service.mojom new file mode 100644 index 0000000..17af233 --- /dev/null +++ b/chromeos/services/ime/public/mojom/ime_service.mojom
@@ -0,0 +1,60 @@ +// Copyright 2021 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. + +module chromeos.ime.mojom; + +import "mojo/public/mojom/base/file_path.mojom"; +import "url/mojom/url.mojom"; +import "chromeos/services/ime/public/mojom/input_engine.mojom"; + +// IME on ChromeOS consists of three parts: +// - The IME running in an extension to provide a soft keyboard +// - The sandboxed, core IME service running in ChromeOS (responsible for +// processing input and turning it into characters/symbols) +// - The IME framework running in the Chrome browser process, that brokers +// between the IME extension and the IME service. It also provides additional +// functionality to the IME service (for downloading IME data as needed). + +// Manages access to a set of IMEs, implemented by the IME service +// itself. The IME framework in the browser process is responsible for brokering +// the connection between the IME service and the IME extension, but does not +// otherwise participate. +interface InputEngineManager { + // Sets up the connection by binding the |to_engine_request| to the input + // engine identified by the |ime_spec|. The |extra| is an optional serialized + // protobuf data for setting up the IME engine. On success, return |success| + // as true, and the input data can be sent to the engine by the channel using + // the interface of |to_engine_request|. The channel interface |from_engine| + // is implemented on the client and used to receive data sent from the engine. + // On failure (e.g. input engine is not found), |success| is false. + ConnectToImeEngine(string ime_spec, + pending_receiver<InputChannel> to_engine_request, + pending_remote<InputChannel> from_engine, + array<uint8> extra) + => (bool success); +}; + +// Implemented in the browser process, used to perform network requests or +// access privileged resources on behalf of the core IME service in ChromeOS. +interface PlatformAccessProvider { + // Download language module from a allowlisted url to a given path. + // Provider will validate the url and return an empty file path if it's + // invalid or downloading fails. + DownloadImeFileTo(url.mojom.Url url, + mojo_base.mojom.FilePath file_path) => + (mojo_base.mojom.FilePath file_path); +}; + +// The main interface to the IME service, which runs in a Chrome utility +// process to handle IME related operations. There are two clients of the IME +// service: the browser process for certain first-party input methods and the +// renderer process running the first-party IME extension. +interface ImeService { + // Injects a remote PlatformAccessProvider interface that the service can use + // to request privileged operations from the client (i.e. the browser). + SetPlatformAccessProvider(pending_remote<PlatformAccessProvider> provider); + + // Binds an InputEngineManager interface. + BindInputEngineManager(pending_receiver<InputEngineManager> receiver); +};
diff --git a/chromeos/services/ime/public/mojom/input_engine.mojom b/chromeos/services/ime/public/mojom/input_engine.mojom index ee1f153a..022acfe 100644 --- a/chromeos/services/ime/public/mojom/input_engine.mojom +++ b/chromeos/services/ime/public/mojom/input_engine.mojom
@@ -4,18 +4,8 @@ module chromeos.ime.mojom; -import "mojo/public/mojom/base/file_path.mojom"; -import "url/mojom/url.mojom"; import "ui/gfx/range/mojom/range.mojom"; -// IME on ChromeOS consists of three parts: -// - The IME running in an extension to provide a soft keyboard -// - The sandboxed, core IME service running in ChromeOS (responsible for -// processing input and turning it into characters/symbols) -// - The IME framework running in the Chrome browser process, that brokers -// between the IME extension and the IME service. It also provides additional -// functionality to the IME service (for downloading IME data as needed). - // Method of an operation to apply to a text field. enum OperationMethodForRulebased { COMMIT_TEXT = 0, @@ -235,25 +225,6 @@ InputMethodApiOperation non_compliant_operation; }; -// Manages access to a set of IME engines, implemented by the IME service -// itself. The IME framework in the browser process is responsible for brokering -// the connection between the IME service and the IME extension, but does not -// otherwise participate. -interface InputEngineManager { - // Sets up the connection by binding the |to_engine_request| to the input - // engine identified by the |ime_spec|. The |extra| is an optional serialized - // protobuf data for setting up the IME engine. On success, return |success| - // as true, and the input data can be sent to the engine by the channel using - // the interface of |to_engine_request|. The channel interface |from_engine| - // is implmented on the client and used to receive data sent from the engine. - // On failure (e.g. input engine is not found), |success| is false. - ConnectToImeEngine(string ime_spec, - pending_receiver<InputChannel> to_engine_request, - pending_remote<InputChannel> from_engine, - array<uint8> extra) - => (bool success); -}; - // A message channel is a paired message sender and receiver. It provides the // communication channel between the IME extension process and the core IME // service in ChromeOS. @@ -372,24 +343,3 @@ // Record a Url-Keyed Metric (UKM). RecordUkm(UkmEntry entry); }; - -// Implemented in the browser process, used to perform network requests or -// access privileged resources on behalf of the core IME service in ChromeOS. -interface PlatformAccessProvider { - // Download language module from a allowlisted url to a given path. - // Provider will validate the url and return an empty file path if it's - // invalid or downloading fails. - DownloadImeFileTo(url.mojom.Url url, - mojo_base.mojom.FilePath file_path) => - (mojo_base.mojom.FilePath file_path); -}; - -// The main interface to the IME service. -interface ImeService { - // Injects a remote PlatformAccessProvider interface that the service can use - // to request privileged operations from the client (i.e. the browser). - SetPlatformAccessProvider(pending_remote<PlatformAccessProvider> provider); - - // Binds an InputEngineManager interface. - BindInputEngineManager(pending_receiver<InputEngineManager> receiver); -};
diff --git a/components/guest_view/browser/BUILD.gn b/components/guest_view/browser/BUILD.gn index f60ffe5..896e019 100644 --- a/components/guest_view/browser/BUILD.gn +++ b/components/guest_view/browser/BUILD.gn
@@ -33,6 +33,7 @@ ] deps = [ "//build:chromeos_buildflags", + "//components/crash/core/common:crash_key", "//components/keyed_service/content", "//components/keyed_service/core", "//components/zoom",
diff --git a/components/page_load_metrics/browser/page_load_metrics_test_waiter.cc b/components/page_load_metrics/browser/page_load_metrics_test_waiter.cc index b6ab690f..5bd2e96 100644 --- a/components/page_load_metrics/browser/page_load_metrics_test_waiter.cc +++ b/components/page_load_metrics/browser/page_load_metrics_test_waiter.cc
@@ -63,10 +63,9 @@ void PageLoadMetricsTestWaiter::AddWebFeatureExpectation( blink::mojom::WebFeature web_feature) { - size_t feature_idx = static_cast<size_t>(web_feature); - if (!expected_.web_features_.test(feature_idx)) { - expected_.web_features_.set(feature_idx); - } + expected_.feature_tracker_.TestAndSet( + {blink::mojom::UseCounterFeatureType::kWebFeature, + static_cast<blink::UseCounterFeature::EnumValue>(web_feature)}); } void PageLoadMetricsTestWaiter::AddSubframeNavigationExpectation() { @@ -107,7 +106,9 @@ bool PageLoadMetricsTestWaiter::DidObserveWebFeature( blink::mojom::WebFeature feature) const { - return observed_.web_features_.test(static_cast<size_t>(feature)); + return observed_.feature_tracker_.Test( + {blink::mojom::UseCounterFeatureType::kWebFeature, + static_cast<blink::UseCounterFeature::EnumValue>(feature)}); } void PageLoadMetricsTestWaiter::Wait() { @@ -206,11 +207,7 @@ content::RenderFrameHost* rfh, const std::vector<blink::UseCounterFeature>& features) { for (const auto& feature : features) { - // TODO(crbug.com/1194678): Expand test converage to other feature types. - if (feature.type() != blink::mojom::UseCounterFeatureType::kWebFeature) - continue; - - observed_.web_features_.set(feature.value()); + observed_.feature_tracker_.TestAndSet(feature); } if (ExpectationsSatisfied() && run_loop_) @@ -365,13 +362,12 @@ current_network_bytes_ >= expected_minimum_network_bytes_); } -bool PageLoadMetricsTestWaiter::WebFeaturesExpectationsSatisfied() const { +bool PageLoadMetricsTestWaiter::UseCounterExpectationsSatisfied() const { // We are only interested to see if all features being set in - // |expected_.web_features_| are observed, but don't care about whether extra - // features are observed. - return ((expected_.web_features_ & observed_.web_features_) ^ - expected_.web_features_) - .none(); + // |expected_.feature_tracker| are observed, but don't care about whether + // extra features are observed. + return observed_.feature_tracker_.ContainsForTesting( + expected_.feature_tracker_); } bool PageLoadMetricsTestWaiter::SubframeNavigationExpectationsSatisfied() @@ -413,7 +409,7 @@ return expected_.page_fields_.AreAllSetIn(observed_.page_fields_) && expected_.subframe_fields_.AreAllSetIn(observed_.subframe_fields_) && ResourceUseExpectationsSatisfied() && - WebFeaturesExpectationsSatisfied() && + UseCounterExpectationsSatisfied() && SubframeNavigationExpectationsSatisfied() && SubframeDataExpectationsSatisfied() && IsSubset(expected_.frame_sizes_, observed_.frame_sizes_) &&
diff --git a/components/page_load_metrics/browser/page_load_metrics_test_waiter.h b/components/page_load_metrics/browser/page_load_metrics_test_waiter.h index ec4b3d6f..6a96091f 100644 --- a/components/page_load_metrics/browser/page_load_metrics_test_waiter.h +++ b/components/page_load_metrics/browser/page_load_metrics_test_waiter.h
@@ -13,6 +13,7 @@ #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" #include "components/page_load_metrics/browser/page_load_tracker.h" #include "content/public/browser/render_frame_host.h" +#include "third_party/blink/public/common/use_counter/use_counter_feature_tracker.h" #include "ui/gfx/geometry/size.h" namespace page_load_metrics { @@ -278,7 +279,7 @@ bool CpuTimeExpectationsSatisfied() const; bool LoadingBehaviorExpectationsSatisfied() const; bool ResourceUseExpectationsSatisfied() const; - bool WebFeaturesExpectationsSatisfied() const; + bool UseCounterExpectationsSatisfied() const; bool SubframeNavigationExpectationsSatisfied() const; bool SubframeDataExpectationsSatisfied() const; bool MainFrameIntersectionExpectationsSatisfied() const; @@ -296,9 +297,7 @@ TimingFieldBitSet page_fields_; TimingFieldBitSet subframe_fields_; - std::bitset<static_cast<size_t>( - blink::mojom::WebFeature::kNumberOfFeatures)> - web_features_; + blink::UseCounterFeatureTracker feature_tracker_; int loading_behavior_flags_ = 0; bool subframe_navigation_ = false; bool subframe_data_ = false;
diff --git a/components/services/app_service/public/cpp/app_update.cc b/components/services/app_service/public/cpp/app_update.cc index a7f324a..87bb941 100644 --- a/components/services/app_service/public/cpp/app_update.cc +++ b/components/services/app_service/public/cpp/app_update.cc
@@ -131,6 +131,9 @@ if (delta->resize_locked != apps::mojom::OptionalBool::kUnknown) { state->resize_locked = delta->resize_locked; } + if (delta->window_mode != apps::mojom::WindowMode::kUnknown) { + state->window_mode = delta->window_mode; + } // When adding new fields to the App Mojo type, this function should also be // updated. @@ -542,6 +545,21 @@ (!state_ || (delta_->resize_locked != state_->resize_locked)); } +apps::mojom::WindowMode AppUpdate::WindowMode() const { + if (delta_ && (delta_->window_mode != apps::mojom::WindowMode::kUnknown)) { + return delta_->window_mode; + } + if (state_) { + return state_->window_mode; + } + return apps::mojom::WindowMode::kUnknown; +} + +bool AppUpdate::WindowModeChanged() const { + return delta_ && (delta_->window_mode != apps::mojom::WindowMode::kUnknown) && + (!state_ || (delta_->window_mode != state_->window_mode)); +} + const ::AccountId& AppUpdate::AccountId() const { return account_id_; }
diff --git a/components/services/app_service/public/cpp/app_update.h b/components/services/app_service/public/cpp/app_update.h index 1699333b..37a9223 100644 --- a/components/services/app_service/public/cpp/app_update.h +++ b/components/services/app_service/public/cpp/app_update.h
@@ -136,6 +136,9 @@ apps::mojom::OptionalBool ResizeLocked() const; bool ResizeLockedChanged() const; + apps::mojom::WindowMode WindowMode() const; + bool WindowModeChanged() const; + const ::AccountId& AccountId() const; private:
diff --git a/components/services/app_service/public/cpp/app_update_unittest.cc b/components/services/app_service/public/cpp/app_update_unittest.cc index 7c8bee81..89c407e6 100644 --- a/components/services/app_service/public/cpp/app_update_unittest.cc +++ b/components/services/app_service/public/cpp/app_update_unittest.cc
@@ -84,6 +84,9 @@ apps::mojom::OptionalBool expect_resize_locked_; bool expect_resize_locked_changed_; + apps::mojom::WindowMode expect_window_mode_; + bool expect_window_mode_changed_; + AccountId account_id_ = AccountId::FromUserEmail("test@gmail.com"); static constexpr uint32_t kPermissionTypeLocation = 100; @@ -122,6 +125,7 @@ expect_paused_changed_ = false; expect_intent_filters_changed_ = false; expect_resize_locked_changed_ = false; + expect_window_mode_changed_ = false; } void CheckExpects(const apps::AppUpdate& u) { @@ -195,6 +199,9 @@ EXPECT_EQ(expect_resize_locked_, u.ResizeLocked()); EXPECT_EQ(expect_resize_locked_changed_, u.ResizeLockedChanged()); + EXPECT_EQ(expect_window_mode_, u.WindowMode()); + EXPECT_EQ(expect_window_mode_changed_, u.WindowModeChanged()); + EXPECT_EQ(account_id_, u.AccountId()); } @@ -228,6 +235,7 @@ expect_paused_ = apps::mojom::OptionalBool::kUnknown; expect_intent_filters_.clear(); expect_resize_locked_ = apps::mojom::OptionalBool::kUnknown; + expect_window_mode_ = apps::mojom::WindowMode::kUnknown; ExpectNoChange(); CheckExpects(u); @@ -794,6 +802,28 @@ ExpectNoChange(); CheckExpects(u); } + + // WindowMode tests. + + if (state) { + state->window_mode = apps::mojom::WindowMode::kBrowser; + expect_window_mode_ = apps::mojom::WindowMode::kBrowser; + expect_window_mode_changed_ = false; + CheckExpects(u); + } + + if (delta) { + delta->window_mode = apps::mojom::WindowMode::kWindow; + expect_window_mode_ = apps::mojom::WindowMode::kWindow; + expect_window_mode_changed_ = true; + CheckExpects(u); + } + + if (state) { + apps::AppUpdate::Merge(state, delta); + ExpectNoChange(); + CheckExpects(u); + } } };
diff --git a/components/services/app_service/public/mojom/types.mojom b/components/services/app_service/public/mojom/types.mojom index faf4b53..c4e8855 100644 --- a/components/services/app_service/public/mojom/types.mojom +++ b/components/services/app_service/public/mojom/types.mojom
@@ -72,6 +72,9 @@ // operations will be restricted. OptionalBool resize_locked; + // Whether the app's display mode is in the browser or otherwise. + WindowMode window_mode; + // When adding new fields, also update the Merge method and other helpers in // components/services/app_service/public/cpp/app_update.* }; @@ -451,3 +454,12 @@ int64 display_id = -1; Rect? bounds; }; + +// The window mode that each app will open in. +enum WindowMode { + kUnknown = 0, + // Opens in a standalone window + kWindow, + // Opens in the default web browser + kBrowser, +}; \ No newline at end of file
diff --git a/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacade.java b/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacade.java index 3dd5682..8f69ac8 100644 --- a/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacade.java +++ b/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacade.java
@@ -49,14 +49,6 @@ void removeObserver(AccountsChangeObserver observer); /** - * Returns whether the account cache has already been populated. {@link #tryGetGoogleAccounts()} - * and similar methods will return instantly if the cache has been populated, otherwise these - * methods may block waiting for the cache to be populated. - */ - @AnyThread - boolean isCachePopulated(); - - /** * Retrieves all Google accounts on the device from the cache. * Returns an empty array if an error occurs while getting account list. * If the cache is not yet populated, the optional will be empty.
diff --git a/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacadeImpl.java b/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacadeImpl.java index 74e331e..d38565ad 100644 --- a/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacadeImpl.java +++ b/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacadeImpl.java
@@ -112,16 +112,6 @@ assert success : "Can't find observer"; } - /** - * Returns whether the account cache has already been populated. {@link #tryGetGoogleAccounts()} - * and similar methods will return instantly if the cache has been populated, otherwise these - * methods may block waiting for the cache to be populated. - */ - @Override - public boolean isCachePopulated() { - return mFilteredAccounts.get() != null; - } - @Override public Optional<List<Account>> getGoogleAccounts() { return Optional.fromNullable(mFilteredAccounts.get());
diff --git a/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacadeTest.java b/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacadeTest.java index 879d1df..8722f6b0 100644 --- a/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacadeTest.java +++ b/components/signin/public/android/java/src/org/chromium/components/signin/AccountManagerFacadeTest.java
@@ -76,7 +76,7 @@ @SmallTest public void testIsCachePopulated() throws InterruptedException { // Cache shouldn't be populated until getAccountsSync is unblocked. - assertFalse(AccountManagerFacadeProvider.getInstance().isCachePopulated()); + assertFalse(AccountManagerFacadeProvider.getInstance().getGoogleAccounts().isPresent()); mDelegate.unblockGetAccounts(); CountDownLatch countDownLatch = new CountDownLatch(1); @@ -86,7 +86,7 @@ }); // Wait for cache population to finish. countDownLatch.await(); - assertTrue(AccountManagerFacadeProvider.getInstance().isCachePopulated()); + assertTrue(AccountManagerFacadeProvider.getInstance().getGoogleAccounts().isPresent()); } @Test
diff --git a/components/signin/public/android/java/src/org/chromium/components/signin/test/util/FakeAccountManagerFacade.java b/components/signin/public/android/java/src/org/chromium/components/signin/test/util/FakeAccountManagerFacade.java index 2d65cfcf..2ea832f8 100644 --- a/components/signin/public/android/java/src/org/chromium/components/signin/test/util/FakeAccountManagerFacade.java +++ b/components/signin/public/android/java/src/org/chromium/components/signin/test/util/FakeAccountManagerFacade.java
@@ -71,11 +71,6 @@ } @Override - public boolean isCachePopulated() { - return true; - } - - @Override public Optional<List<Account>> getGoogleAccounts() { List<Account> accounts = new ArrayList<>(); synchronized (mLock) {
diff --git a/components/variations/BUILD.gn b/components/variations/BUILD.gn index 23163a2..3841d01 100644 --- a/components/variations/BUILD.gn +++ b/components/variations/BUILD.gn
@@ -35,7 +35,7 @@ deps = [ "//base" ] } -static_library("variations") { +component("variations") { sources = [ "active_field_trials.cc", "active_field_trials.h", @@ -89,6 +89,9 @@ "variations_url_constants.h", ] + # Needed for exporting functions (because the target type is a component). + defines = [ "IS_VARIATIONS_IMPL" ] + if (is_android || is_ios) { sources += [ "variations_request_scheduler_mobile.cc",
diff --git a/components/variations/active_field_trials.h b/components/variations/active_field_trials.h index a1cba30..0307a98 100644 --- a/components/variations/active_field_trials.h +++ b/components/variations/active_field_trials.h
@@ -9,6 +9,7 @@ #include <string> +#include "base/component_export.h" #include "base/metrics/field_trial.h" #include "base/strings/string_piece.h" @@ -16,18 +17,19 @@ // The Unique ID of a trial and its active group, where the name and group // identifiers are hashes of the trial and group name strings. -struct ActiveGroupId { +struct COMPONENT_EXPORT(VARIATIONS) ActiveGroupId { uint32_t name; uint32_t group; }; // Returns an ActiveGroupId struct for the given trial and group names. +COMPONENT_EXPORT(VARIATIONS) ActiveGroupId MakeActiveGroupId(base::StringPiece trial_name, base::StringPiece group_name); // We need to supply a Compare class for templates since ActiveGroupId is a // user-defined type. -struct ActiveGroupIdCompare { +struct COMPONENT_EXPORT(VARIATIONS) ActiveGroupIdCompare { bool operator() (const ActiveGroupId& lhs, const ActiveGroupId& rhs) const { // The group and name fields are just SHA-1 Hashes, so we just need to treat // them as IDs and do a less-than comparison. We test group first, since @@ -43,6 +45,7 @@ // Field Trials for which a group has not been chosen yet are NOT returned in // this list. Field trial names are suffixed with |suffix| before hashing is // executed. +COMPONENT_EXPORT(VARIATIONS) void GetFieldTrialActiveGroupIds(base::StringPiece suffix, std::vector<ActiveGroupId>* name_group_ids); @@ -52,6 +55,7 @@ // with the names as hex strings. Field Trials for which a group has not been // chosen yet are NOT returned in this list. Field trial names are suffixed with // |suffix| before hashing is executed. +COMPONENT_EXPORT(VARIATIONS) void GetFieldTrialActiveGroupIdsAsStrings(base::StringPiece suffix, std::vector<std::string>* output); @@ -61,12 +65,14 @@ // group. The strings are formatted as "<TrialName>-<GroupName>", // with the names as hex strings. Synthetic Field Trials for which a group // which hasn't been chosen yet are NOT returned in this list. +COMPONENT_EXPORT(VARIATIONS) void GetSyntheticTrialGroupIdsAsString(std::vector<std::string>* output); // Sets the version of the seed that the current set of FieldTrials was // generated from. // TODO(crbug/507665): Move this to field_trials_provider once it moves // into components/variations +COMPONENT_EXPORT(VARIATIONS) void SetSeedVersion(const std::string& seed_version); // Gets the version of the seed that the current set of FieldTrials was @@ -75,12 +81,14 @@ // processes. // TODO(crbug/507665): Move this to field_trials_provider once it moves // into components/variations +COMPONENT_EXPORT(VARIATIONS) const std::string& GetSeedVersion(); // Expose some functions for testing. These functions just wrap functionality // that is implemented above. namespace testing { +COMPONENT_EXPORT(VARIATIONS) void TestGetFieldTrialActiveGroupIds( base::StringPiece suffix, const base::FieldTrial::ActiveGroups& active_groups,
diff --git a/components/variations/android/variations_seed_bridge.h b/components/variations/android/variations_seed_bridge.h index e4ac1854..5b1c2ed 100644 --- a/components/variations/android/variations_seed_bridge.h +++ b/components/variations/android/variations_seed_bridge.h
@@ -8,32 +8,35 @@ #include <jni.h> #include <string> +#include "base/component_export.h" #include "components/variations/seed_response.h" namespace variations { namespace android { // Return the first run seed data pulled from the Java side of application. +COMPONENT_EXPORT(VARIATIONS) std::unique_ptr<variations::SeedResponse> GetVariationsFirstRunSeed(); // Clears first run seed preferences stored on the Java side of Chrome for // Android. -void ClearJavaFirstRunPrefs(); +COMPONENT_EXPORT(VARIATIONS) void ClearJavaFirstRunPrefs(); // Marks variations seed as stored to avoid repeated fetches of the seed at // the Java side. -void MarkVariationsSeedAsStored(); +COMPONENT_EXPORT(VARIATIONS) void MarkVariationsSeedAsStored(); // Sets test data on the Java side. The data is pulled during the unit tests to // C++ side and is being checked for consistency. // This method is used for unit testing purposes only. +COMPONENT_EXPORT(VARIATIONS) void SetJavaFirstRunPrefsForTesting(const std::string& seed_data, const std::string& seed_signature, const std::string& seed_country, long response_date, bool is_gzip_compressed); -bool HasMarkedPrefsForTesting(); +COMPONENT_EXPORT(VARIATIONS) bool HasMarkedPrefsForTesting(); } // namespace android } // namespace variations
diff --git a/components/variations/child_process_field_trial_syncer.h b/components/variations/child_process_field_trial_syncer.h index ed6b570..6931731b 100644 --- a/components/variations/child_process_field_trial_syncer.h +++ b/components/variations/child_process_field_trial_syncer.h
@@ -9,6 +9,7 @@ #include <string> #include "base/callback.h" +#include "base/component_export.h" #include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/threading/thread_local.h" @@ -19,7 +20,8 @@ // processes. Specifically, when a field trial is activated in the browser, it // also activates it in the child process and when a field trial is activated in // the child process, it notifies the browser process to activate it. -class ChildProcessFieldTrialSyncer : public base::FieldTrialList::Observer { +class COMPONENT_EXPORT(VARIATIONS) ChildProcessFieldTrialSyncer + : public base::FieldTrialList::Observer { public: using FieldTrialActivatedCallback = base::RepeatingCallback<void(const std::string& trial_name)>;
diff --git a/components/variations/client_filterable_state.h b/components/variations/client_filterable_state.h index 06c3c406..2e1ab5dd 100644 --- a/components/variations/client_filterable_state.h +++ b/components/variations/client_filterable_state.h
@@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/component_export.h" #include "base/macros.h" #include "base/time/time.h" #include "base/version.h" @@ -31,7 +32,7 @@ using IsEnterpriseFunction = base::OnceCallback<bool()>; // A container for all of the client state which is used for filtering studies. -struct ClientFilterableState { +struct COMPONENT_EXPORT(VARIATIONS) ClientFilterableState { static Study::Platform GetCurrentPlatform(); // base::Version used in {min,max}_os_version filtering.
diff --git a/components/variations/entropy_provider.h b/components/variations/entropy_provider.h index 0f765b16..8cd0109 100644 --- a/components/variations/entropy_provider.h +++ b/components/variations/entropy_provider.h
@@ -14,6 +14,7 @@ #include <vector> #include "base/compiler_specific.h" +#include "base/component_export.h" #include "base/macros.h" #include "base/metrics/field_trial.h" @@ -23,7 +24,8 @@ // It works by taking the first 64 bits of the SHA1 hash of the entropy source // concatenated with the trial name, or randomization seed and using that for // the final entropy value. -class SHA1EntropyProvider : public base::FieldTrial::EntropyProvider { +class COMPONENT_EXPORT(VARIATIONS) SHA1EntropyProvider + : public base::FieldTrial::EntropyProvider { public: // Creates a SHA1EntropyProvider with the given |entropy_source|, which // should contain a large amount of entropy - for example, a textual @@ -47,7 +49,7 @@ // the actual low entropy source's hash would fall in the sorted list of all // those hashes, and uses that as the final value. For more info, see: // https://docs.google.com/document/d/1cPF5PruriWNP2Z5gSkq4MBTm0wSZqLyIJkUO9ekibeo -class NormalizedMurmurHashEntropyProvider +class COMPONENT_EXPORT(VARIATIONS) NormalizedMurmurHashEntropyProvider : public base::FieldTrial::EntropyProvider { public: NormalizedMurmurHashEntropyProvider(uint16_t low_entropy_source,
diff --git a/components/variations/hashing.h b/components/variations/hashing.h index 149813f..2cb0760 100644 --- a/components/variations/hashing.h +++ b/components/variations/hashing.h
@@ -7,13 +7,14 @@ #include <stdint.h> +#include "base/component_export.h" #include "base/strings/string_piece.h" namespace variations { // Computes a uint32_t hash of a given string based on its SHA1 hash. Suitable // for uniquely identifying field trial names and group names. -uint32_t HashName(base::StringPiece name); +COMPONENT_EXPORT(VARIATIONS) uint32_t HashName(base::StringPiece name); } // namespace variations
diff --git a/components/variations/metrics.h b/components/variations/metrics.h index 660a4751..4febb0dd 100644 --- a/components/variations/metrics.h +++ b/components/variations/metrics.h
@@ -5,6 +5,7 @@ #ifndef COMPONENTS_VARIATIONS_METRICS_H_ #define COMPONENTS_VARIATIONS_METRICS_H_ +#include "base/component_export.h" #include "build/build_config.h" namespace variations { @@ -89,19 +90,21 @@ #if defined(OS_ANDROID) // Records the result of importing a seed during Android first run. +COMPONENT_EXPORT(VARIATIONS) void RecordFirstRunSeedImportResult(FirstRunSeedImportResult result); #endif // OS_ANDROID // Records the result of attempting to load the latest variations seed on // startup. -void RecordLoadSeedResult(LoadSeedResult state); +COMPONENT_EXPORT(VARIATIONS) void RecordLoadSeedResult(LoadSeedResult state); // Records the result of attempting to load the safe variations seed on startup. +COMPONENT_EXPORT(VARIATIONS) void RecordLoadSafeSeedResult(LoadSeedResult state); // Records the result of attempting to store a variations seed received from the // server. -void RecordStoreSeedResult(StoreSeedResult result); +COMPONENT_EXPORT(VARIATIONS) void RecordStoreSeedResult(StoreSeedResult result); } // namespace variations
diff --git a/components/variations/platform_field_trials.h b/components/variations/platform_field_trials.h index 335cd0e..df468a6 100644 --- a/components/variations/platform_field_trials.h +++ b/components/variations/platform_field_trials.h
@@ -5,13 +5,14 @@ #ifndef COMPONENTS_VARIATIONS_PLATFORM_FIELD_TRIALS_H_ #define COMPONENTS_VARIATIONS_PLATFORM_FIELD_TRIALS_H_ +#include "base/component_export.h" #include "base/metrics/field_trial.h" namespace variations { // Infrastructure for setting up platform specific field trials. Chrome and // WebView make use through their corresponding subclasses. -class PlatformFieldTrials { +class COMPONENT_EXPORT(VARIATIONS) PlatformFieldTrials { public: PlatformFieldTrials() = default; virtual ~PlatformFieldTrials() = default;
diff --git a/components/variations/pref_names.h b/components/variations/pref_names.h index ca7e4e7..a7ef1d3 100644 --- a/components/variations/pref_names.h +++ b/components/variations/pref_names.h
@@ -5,31 +5,40 @@ #ifndef COMPONENTS_VARIATIONS_PREF_NAMES_H_ #define COMPONENTS_VARIATIONS_PREF_NAMES_H_ +#include "base/component_export.h" + namespace variations { namespace prefs { // Alphabetical list of preference names specific to the variations component. // Keep alphabetized and document each in the .cc file. +COMPONENT_EXPORT(VARIATIONS) extern const char kDeviceVariationsRestrictionsByPolicy[]; -extern const char kVariationsCompressedSeed[]; -extern const char kVariationsCountry[]; -extern const char kVariationsCrashStreak[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsCompressedSeed[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsCountry[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsCrashStreak[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsFailedToFetchSeedStreak[]; -extern const char kVariationsLastFetchTime[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsLastFetchTime[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsPermanentConsistencyCountry[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsPermanentOverriddenCountry[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsRestrictionsByPolicy[]; -extern const char kVariationsRestrictParameter[]; -extern const char kVariationsSafeCompressedSeed[]; -extern const char kVariationsSafeSeedDate[]; -extern const char kVariationsSafeSeedFetchTime[]; -extern const char kVariationsSafeSeedLocale[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsRestrictParameter[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSafeCompressedSeed[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSafeSeedDate[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSafeSeedFetchTime[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSafeSeedLocale[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSafeSeedPermanentConsistencyCountry[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSafeSeedSessionConsistencyCountry[]; -extern const char kVariationsSafeSeedSignature[]; -extern const char kVariationsSeedDate[]; -extern const char kVariationsSeedSignature[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSafeSeedSignature[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSeedDate[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsSeedSignature[]; } // namespace prefs } // namespace variations
diff --git a/components/variations/processed_study.h b/components/variations/processed_study.h index 504b5f4..584e7410 100644 --- a/components/variations/processed_study.h +++ b/components/variations/processed_study.h
@@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/component_export.h" #include "base/metrics/field_trial.h" namespace variations { @@ -16,7 +17,7 @@ // Wrapper over Study with extra information computed during pre-processing, // such as whether the study is expired and its total probability. -class ProcessedStudy { +class COMPONENT_EXPORT(VARIATIONS) ProcessedStudy { public: // The default group used when a study doesn't specify one. This is needed // because the field trial api requires a default group name.
diff --git a/components/variations/seed_response.h b/components/variations/seed_response.h index 058bb11..bee917c07 100644 --- a/components/variations/seed_response.h +++ b/components/variations/seed_response.h
@@ -7,12 +7,14 @@ #include <string> +#include "base/component_export.h" + namespace variations { // Represents data received when downloading the seed: "data" is the response // body while the other fields come from headers. // This is only used on Android. -struct SeedResponse { +struct COMPONENT_EXPORT(VARIATIONS) SeedResponse { SeedResponse(); ~SeedResponse();
diff --git a/components/variations/study_filtering.h b/components/variations/study_filtering.h index aba51115..e4ec9de 100644 --- a/components/variations/study_filtering.h +++ b/components/variations/study_filtering.h
@@ -9,6 +9,7 @@ #include <vector> #include "base/compiler_specific.h" +#include "base/component_export.h" #include "base/time/time.h" #include "base/version.h" #include "components/variations/client_filterable_state.h" @@ -25,66 +26,82 @@ namespace internal { // Checks whether a study is applicable for the given |channel| per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyChannel(const Study::Filter& filter, Study::Channel channel); // Checks whether a study is applicable for the given |form_factor| per // |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyFormFactor(const Study::Filter& filter, Study::FormFactor form_factor); // Checks whether a study is applicable for the given |hardware_class| per // |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyHardwareClass(const Study::Filter& filter, const std::string& hardware_class); // Checks whether a study is applicable for the given |locale| per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyLocale(const Study::Filter& filter, const std::string& locale); // Checks whether a study is applicable for the given |platform| per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyPlatform(const Study::Filter& filter, Study::Platform platform); // Checks whether a study is applicable given |is_low_end_device| per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyLowEndDevice(const Study::Filter& filter, bool is_low_end_device); // Checks whether a study is applicable given the ChromeVariations policy value. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyPolicyRestriction(const Study::Filter& filter, RestrictionPolicy policy_restriction); // Checks whether a study is applicable for the given date/time per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyStartDate(const Study::Filter& filter, const base::Time& date_time); // Checks whether a study is applicable for the given date/time per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyEndDate(const Study::Filter& filter, const base::Time& date_time); // Checks whether a study is applicable for the given version per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyVersion(const Study::Filter& filter, const base::Version& version); // Checks whether a study is applicable for the given OS version per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyOSVersion(const Study::Filter& filter, const base::Version& os_version); // Checks whether a study is applicable for the given |country| per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyCountry(const Study::Filter& filter, const std::string& country); // Checks whether a study is applicable given |is_enterprise| per |filter|. +COMPONENT_EXPORT(VARIATIONS) bool CheckStudyEnterprise(const Study::Filter& filter, const ClientFilterableState& client_state); // Returns the country that should be used for filtering this study, depending // on whether the study has session or permanent consistency. +COMPONENT_EXPORT(VARIATIONS) const std::string& GetClientCountryForStudy( const Study& study, const ClientFilterableState& client_state); // Checks whether |study| is expired using the given date/time. +COMPONENT_EXPORT(VARIATIONS) bool IsStudyExpired(const Study& study, const base::Time& date_time); // Returns whether |study| should be disabled according to the restriction // parameters in the |config|. +COMPONENT_EXPORT(VARIATIONS) bool ShouldAddStudy(const Study& study, const ClientFilterableState& client_state, const VariationsLayers& layers); @@ -95,6 +112,7 @@ // validates and pre-processes them, adding any kept studies to the // |filtered_studies| list. Ensures that the resulting list will not have more // than one study with the same name. +COMPONENT_EXPORT(VARIATIONS) void FilterAndValidateStudies(const VariationsSeed& seed, const ClientFilterableState& client_state, const VariationsLayers& layers,
diff --git a/components/variations/synthetic_trial_registry.h b/components/variations/synthetic_trial_registry.h index 3cfe4de..cb9e584 100644 --- a/components/variations/synthetic_trial_registry.h +++ b/components/variations/synthetic_trial_registry.h
@@ -7,6 +7,7 @@ #include <vector> +#include "base/component_export.h" #include "base/feature_list.h" #include "base/metrics/field_trial_params.h" #include "base/observer_list.h" @@ -24,10 +25,11 @@ class SyntheticTrialRegistryTest; namespace internal { +COMPONENT_EXPORT(VARIATIONS) extern const base::Feature kExternalExperimentAllowlist; } // namespace internal -class SyntheticTrialRegistry { +class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialRegistry { public: // Constructor that specifies whether the SyntheticTrialRegistry should use // an allowlist for external experiments. Some embedders such as WebLayer
diff --git a/components/variations/synthetic_trials.h b/components/variations/synthetic_trials.h index 89cbd1bf..9586882 100644 --- a/components/variations/synthetic_trials.h +++ b/components/variations/synthetic_trials.h
@@ -10,6 +10,7 @@ #include <vector> #include "base/compiler_specific.h" +#include "base/component_export.h" #include "base/time/time.h" #include "components/variations/active_field_trials.h" @@ -18,7 +19,7 @@ // A Field Trial and its selected group, which represent a particular // Chrome configuration state. For example, the trial name could map to // a preference name, and the group name could map to a preference value. -struct SyntheticTrialGroup { +struct COMPONENT_EXPORT(VARIATIONS) SyntheticTrialGroup { public: SyntheticTrialGroup(uint32_t trial, uint32_t group); ~SyntheticTrialGroup(); @@ -31,7 +32,7 @@ }; // Interface class to observe changes to synthetic trials in MetricsService. -class SyntheticTrialObserver { +class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialObserver { public: // Called when the list of synthetic field trial groups has changed. virtual void OnSyntheticTrialsChanged(
diff --git a/components/variations/synthetic_trials_active_group_id_provider.h b/components/variations/synthetic_trials_active_group_id_provider.h index 365cacc..17ea2a4 100644 --- a/components/variations/synthetic_trials_active_group_id_provider.h +++ b/components/variations/synthetic_trials_active_group_id_provider.h
@@ -7,6 +7,7 @@ #include <vector> +#include "base/component_export.h" #include "base/macros.h" #include "base/synchronization/lock.h" #include "components/variations/active_field_trials.h" @@ -22,7 +23,8 @@ // This is a helper class which can observe the creation of SyntheticTrialGroups // and later provide a list of active group IDs to be included in the crash // reports. This class is a thread-safe singleton. -class SyntheticTrialsActiveGroupIdProvider : public SyntheticTrialObserver { +class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialsActiveGroupIdProvider + : public SyntheticTrialObserver { public: static SyntheticTrialsActiveGroupIdProvider* GetInstance();
diff --git a/components/variations/variations_associated_data.h b/components/variations/variations_associated_data.h index 214e3189..21da1ca 100644 --- a/components/variations/variations_associated_data.h +++ b/components/variations/variations_associated_data.h
@@ -88,18 +88,21 @@ // the trial and append groups) and needs to have a variations::VariationID // associated with it so Google servers can recognize the FieldTrial. // Thread safe. +COMPONENT_EXPORT(VARIATIONS) void AssociateGoogleVariationID(IDCollectionKey key, const std::string& trial_name, const std::string& group_name, VariationID id); // As above, but overwrites any previously set id. Thread safe. +COMPONENT_EXPORT(VARIATIONS) void AssociateGoogleVariationIDForce(IDCollectionKey key, const std::string& trial_name, const std::string& group_name, VariationID id); // As above, but takes an ActiveGroupId hash pair, rather than the string names. +COMPONENT_EXPORT(VARIATIONS) void AssociateGoogleVariationIDForceHashes(IDCollectionKey key, const ActiveGroupId& active_group, VariationID id); @@ -110,47 +113,57 @@ // for the named group. This API can be nicely combined with // FieldTrial::GetActiveFieldTrialGroups() to enumerate the variation IDs for // all active FieldTrial groups. Thread safe. +COMPONENT_EXPORT(VARIATIONS) VariationID GetGoogleVariationID(IDCollectionKey key, const std::string& trial_name, const std::string& group_name); // Same as GetGoogleVariationID(), but takes in a hashed |active_group| rather // than the string trial and group name. +COMPONENT_EXPORT(VARIATIONS) VariationID GetGoogleVariationIDFromHashes(IDCollectionKey key, const ActiveGroupId& active_group); // Deprecated. Use base::AssociateFieldTrialParams() instead. +COMPONENT_EXPORT(VARIATIONS) bool AssociateVariationParams(const std::string& trial_name, const std::string& group_name, const std::map<std::string, std::string>& params); // Deprecated. Use base::GetFieldTrialParams() instead. +COMPONENT_EXPORT(VARIATIONS) bool GetVariationParams(const std::string& trial_name, std::map<std::string, std::string>* params); // Deprecated. Use base::GetFieldTrialParamsByFeature() instead. +COMPONENT_EXPORT(VARIATIONS) bool GetVariationParamsByFeature(const base::Feature& feature, std::map<std::string, std::string>* params); // Deprecated. Use base::GetFieldTrialParamValue() instead. +COMPONENT_EXPORT(VARIATIONS) std::string GetVariationParamValue(const std::string& trial_name, const std::string& param_name); // Deprecated. Use base::GetFieldTrialParamValueByFeature() instead. +COMPONENT_EXPORT(VARIATIONS) std::string GetVariationParamValueByFeature(const base::Feature& feature, const std::string& param_name); // Deprecated. Use base::GetFieldTrialParamByFeatureAsInt() instead. +COMPONENT_EXPORT(VARIATIONS) int GetVariationParamByFeatureAsInt(const base::Feature& feature, const std::string& param_name, int default_value); // Deprecated. Use base::GetFieldTrialParamByFeatureAsDouble() instead. +COMPONENT_EXPORT(VARIATIONS) double GetVariationParamByFeatureAsDouble(const base::Feature& feature, const std::string& param_name, double default_value); // Deprecated. Use base::GetFieldTrialParamByFeatureAsBool() instead. +COMPONENT_EXPORT(VARIATIONS) bool GetVariationParamByFeatureAsBool(const base::Feature& feature, const std::string& param_name, bool default_value); @@ -160,11 +173,11 @@ // Clears all of the mapped associations. Deprecated, use ScopedFeatureList // instead as it does a lot of work for you automatically. -void ClearAllVariationIDs(); +COMPONENT_EXPORT(VARIATIONS) void ClearAllVariationIDs(); // Clears all of the associated params. Deprecated, use ScopedFeatureList // instead as it does a lot of work for you automatically. -void ClearAllVariationParams(); +COMPONENT_EXPORT(VARIATIONS) void ClearAllVariationParams(); } // namespace testing
diff --git a/components/variations/variations_client.h b/components/variations/variations_client.h index bdfa3bd1..df74d1ba 100644 --- a/components/variations/variations_client.h +++ b/components/variations/variations_client.h
@@ -5,6 +5,7 @@ #ifndef COMPONENTS_VARIATIONS_VARIATIONS_CLIENT_H_ #define COMPONENTS_VARIATIONS_VARIATIONS_CLIENT_H_ +#include "base/component_export.h" #include "components/variations/variations.mojom.h" namespace variations { @@ -12,7 +13,7 @@ // Used by VariationsURLLoaderThrottle to insulate the content layer from // concepts like user sign in which don't belong there. There is an instance per // profile, so there can be multiple clients at a time when in multi user mode. -class VariationsClient { +class COMPONENT_EXPORT(VARIATIONS) VariationsClient { public: virtual ~VariationsClient() = default;
diff --git a/components/variations/variations_crash_keys.h b/components/variations/variations_crash_keys.h index 2bee11c6..908c1d3 100644 --- a/components/variations/variations_crash_keys.h +++ b/components/variations/variations_crash_keys.h
@@ -8,38 +8,41 @@ #include <string> #include <vector> +#include "base/component_export.h" + namespace variations { struct SyntheticTrialGroup; // The key used in crash reports to indicate the number of active experiments. // Should match the number of entries in kExperimentListKey. -extern const char kNumExperimentsKey[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kNumExperimentsKey[]; // The key used in crash reports to list all the active experiments. Each // experiment is listed as two hex numbers: trial ID and group ID, separated by // a dash. The experiments are separated by a comma. -extern const char kExperimentListKey[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kExperimentListKey[]; // Initializes crash keys that report the current set of active FieldTrial // groups (aka variations) for crash reports. After initialization, an observer // will be registered on FieldTrialList that will keep the crash keys up-to-date // with newly-activated trials. Synthetic trials must be manually updated using // the API below. -void InitCrashKeys(); +COMPONENT_EXPORT(VARIATIONS) void InitCrashKeys(); // Updates variations crash keys by replacing the list of synthetic trials with // the specified list. Does not affect non-synthetic trials. +COMPONENT_EXPORT(VARIATIONS) void UpdateCrashKeysWithSyntheticTrials( const std::vector<SyntheticTrialGroup>& synthetic_trials); // Clears the internal instance, for testing. -void ClearCrashKeysInstanceForTesting(); +COMPONENT_EXPORT(VARIATIONS) void ClearCrashKeysInstanceForTesting(); // The list of experiments, in the format needed by the crash keys. The // |num_experiments| goes into the |kNumExperimentsKey| crash key, and the // |experiment_list| goes into the |kExperimentListKey| crash key. -struct ExperimentListInfo { +struct COMPONENT_EXPORT(VARIATIONS) ExperimentListInfo { int num_experiments = 0; std::string experiment_list; }; @@ -48,7 +51,7 @@ // Specifically, returns the string used for representing the active experiment // groups + the synthetic trials in |experiment_list| and the number of elements // in that list in |num_experiments|. Must be called on the UI thread. -ExperimentListInfo GetExperimentListInfo(); +COMPONENT_EXPORT(VARIATIONS) ExperimentListInfo GetExperimentListInfo(); } // namespace variations
diff --git a/components/variations/variations_crash_keys_chromeos.h b/components/variations/variations_crash_keys_chromeos.h index 3453776..eebd2ab 100644 --- a/components/variations/variations_crash_keys_chromeos.h +++ b/components/variations/variations_crash_keys_chromeos.h
@@ -5,6 +5,7 @@ #ifndef COMPONENTS_VARIATIONS_VARIATIONS_CRASH_KEYS_CHROMEOS_H_ #define COMPONENTS_VARIATIONS_VARIATIONS_CRASH_KEYS_CHROMEOS_H_ +#include "base/component_export.h" #include "base/sequenced_task_runner.h" #include "components/variations/variations_crash_keys.h" @@ -13,6 +14,7 @@ // On a separate thread, report the provided crash keys to Chrome OS using a // .variant-list.txt in the user's home directory, or /home/chronos if no user // is logged in. +COMPONENT_EXPORT(VARIATIONS) void ReportVariationsToChromeOs(scoped_refptr<base::SequencedTaskRunner> runner, ExperimentListInfo info);
diff --git a/components/variations/variations_ids_provider.h b/components/variations/variations_ids_provider.h index 00ed598..3242b90 100644 --- a/components/variations/variations_ids_provider.h +++ b/components/variations/variations_ids_provider.h
@@ -11,6 +11,7 @@ #include <utility> #include <vector> +#include "base/component_export.h" #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/metrics/field_trial.h" @@ -32,7 +33,7 @@ // (i) VariationsIDs associated with external experiments, which can be sent // only for signed-in users and (ii) VariationsIDs that can be sent in first- // and third-party contexts. -struct VariationsHeaderKey { +struct COMPONENT_EXPORT(VARIATIONS) VariationsHeaderKey { bool is_signed_in; Study_GoogleWebVisibility web_visibility; @@ -43,10 +44,11 @@ // A helper class for maintaining client experiments and metrics state // transmitted in custom HTTP request headers. // This class is a thread-safe singleton. -class VariationsIdsProvider : public base::FieldTrialList::Observer, - public SyntheticTrialObserver { +class COMPONENT_EXPORT(VARIATIONS) VariationsIdsProvider + : public base::FieldTrialList::Observer, + public SyntheticTrialObserver { public: - class Observer { + class COMPONENT_EXPORT(VARIATIONS) Observer { public: // Called when variation ids headers are updated. virtual void VariationIdsHeaderUpdated() = 0;
diff --git a/components/variations/variations_layers.h b/components/variations/variations_layers.h index d24484f..c5c17f6 100644 --- a/components/variations/variations_layers.h +++ b/components/variations/variations_layers.h
@@ -7,6 +7,7 @@ #include <map> +#include "base/component_export.h" #include "base/metrics/field_trial.h" #include "components/variations/proto/variations_seed.pb.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -15,7 +16,7 @@ // Parses out the Variations Layers data from the provided seed and // chooses which member within each layer should be the active one. -class VariationsLayers { +class COMPONENT_EXPORT(VARIATIONS) VariationsLayers { public: VariationsLayers( const VariationsSeed& seed,
diff --git a/components/variations/variations_murmur_hash.h b/components/variations/variations_murmur_hash.h index d4a0291..62df4c3 100644 --- a/components/variations/variations_murmur_hash.h +++ b/components/variations/variations_murmur_hash.h
@@ -9,6 +9,7 @@ #include <vector> #include "base/compiler_specific.h" +#include "base/component_export.h" #include "base/strings/string_piece.h" namespace variations { @@ -16,7 +17,7 @@ // Hash utilities for NormalizedMurmurHashEntropyProvider. For more info, see: // https://docs.google.com/document/d/1cPF5PruriWNP2Z5gSkq4MBTm0wSZqLyIJkUO9ekibeo -class VariationsMurmurHash { +class COMPONENT_EXPORT(VARIATIONS) VariationsMurmurHash { public: // Prepares data to be hashed by VariationsMurmurHash: align and zero-pad to a // multiple of 4 bytes, and produce the same uint32_t values regardless of
diff --git a/components/variations/variations_request_scheduler.h b/components/variations/variations_request_scheduler.h index 72ca48da..d2b114f 100644 --- a/components/variations/variations_request_scheduler.h +++ b/components/variations/variations_request_scheduler.h
@@ -6,6 +6,7 @@ #define COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ #include "base/bind.h" +#include "base/component_export.h" #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/time/time.h" @@ -16,7 +17,7 @@ namespace variations { // A helper class that makes VariationsService requests at the correct times. -class VariationsRequestScheduler { +class COMPONENT_EXPORT(VARIATIONS) VariationsRequestScheduler { public: virtual ~VariationsRequestScheduler();
diff --git a/components/variations/variations_request_scheduler_mobile.h b/components/variations/variations_request_scheduler_mobile.h index ee1e117d..fe8193e5 100644 --- a/components/variations/variations_request_scheduler_mobile.h +++ b/components/variations/variations_request_scheduler_mobile.h
@@ -6,6 +6,7 @@ #define COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_MOBILE_H_ #include "base/bind.h" +#include "base/component_export.h" #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/timer/timer.h" @@ -17,12 +18,13 @@ // A specialized VariationsRequestScheduler that manages request cycles for // VariationsService on mobile platforms. -class VariationsRequestSchedulerMobile : public VariationsRequestScheduler { +class COMPONENT_EXPORT(VARIATIONS) VariationsRequestSchedulerMobile + : public VariationsRequestScheduler { public: // |task} is the closure to call when the scheduler deems ready. |local_state| // is the PrefService that contains the time of the last fetch. - explicit VariationsRequestSchedulerMobile(const base::RepeatingClosure& task, - PrefService* local_state); + VariationsRequestSchedulerMobile(const base::RepeatingClosure& task, + PrefService* local_state); ~VariationsRequestSchedulerMobile() override; // Base class overrides.
diff --git a/components/variations/variations_seed_processor.h b/components/variations/variations_seed_processor.h index 553556b..763ac56 100644 --- a/components/variations/variations_seed_processor.h +++ b/components/variations/variations_seed_processor.h
@@ -12,6 +12,7 @@ #include "base/callback_forward.h" #include "base/compiler_specific.h" +#include "base/component_export.h" #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/metrics/field_trial.h" @@ -29,7 +30,7 @@ struct ClientFilterableState; // Helper class to instantiate field trials from a variations seed. -class VariationsSeedProcessor { +class COMPONENT_EXPORT(VARIATIONS) VariationsSeedProcessor { public: using UIStringOverrideCallback = base::RepeatingCallback<void(uint32_t, const std::u16string&)>;
diff --git a/components/variations/variations_seed_simulator.h b/components/variations/variations_seed_simulator.h index 72986af..3cb9e1f 100644 --- a/components/variations/variations_seed_simulator.h +++ b/components/variations/variations_seed_simulator.h
@@ -9,6 +9,7 @@ #include <vector> #include "base/compiler_specific.h" +#include "base/component_export.h" #include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/version.h" @@ -23,12 +24,15 @@ // VariationsSeedSimulator simulates the result of creating a set of studies // and detecting which studies would result in group changes. -class VariationsSeedSimulator { +class COMPONENT_EXPORT(VARIATIONS) VariationsSeedSimulator { public: // The result of variations seed simulation, counting the number of experiment // group changes of each type that are expected to occur on a restart with the // seed. - struct Result { + struct COMPONENT_EXPORT(VARIATIONS) Result { + Result(); + ~Result(); + // The number of expected group changes that do not fall into any special // category. This is a lower bound due to session randomized studies. int normal_group_change_count; @@ -40,9 +44,6 @@ // The number of expected group changes that fall in the category of killed // experiments that should trigger the "critical" restart mechanism. int kill_critical_group_change_count; - - Result(); - ~Result(); }; // Creates the simulator with the given default and low entropy providers. The
diff --git a/components/variations/variations_seed_store.h b/components/variations/variations_seed_store.h index 8f905e1..62b55da06 100644 --- a/components/variations/variations_seed_store.h +++ b/components/variations/variations_seed_store.h
@@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/component_export.h" #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/time/time.h" @@ -27,7 +28,7 @@ // VariationsSeedStore is a helper class for reading and writing the variations // seed from Local State. -class VariationsSeedStore { +class COMPONENT_EXPORT(VARIATIONS) VariationsSeedStore { public: // Standard constructor. Enables signature verification. explicit VariationsSeedStore(PrefService* local_state);
diff --git a/components/variations/variations_switches.h b/components/variations/variations_switches.h index c4559c2d..32bb2e8 100644 --- a/components/variations/variations_switches.h +++ b/components/variations/variations_switches.h
@@ -5,20 +5,31 @@ #ifndef COMPONENTS_VARIATIONS_VARIATIONS_SWITCHES_H_ #define COMPONENTS_VARIATIONS_VARIATIONS_SWITCHES_H_ +#include "base/component_export.h" + namespace variations { namespace switches { // Alphabetical list of switches specific to the variations component. Document // each in the .cc file. +COMPONENT_EXPORT(VARIATIONS) extern const char kDisableFieldTrialTestingConfig[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kEnableBenchmarking[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kFakeVariationsChannel[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kForceFieldTrialParams[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kForceVariationIds[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kForceDisableVariationIds[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsOverrideCountry[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsServerURL[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kVariationsInsecureServerURL[]; } // namespace switches
diff --git a/components/variations/variations_url_constants.h b/components/variations/variations_url_constants.h index 336effdc..f6c2852 100644 --- a/components/variations/variations_url_constants.h +++ b/components/variations/variations_url_constants.h
@@ -5,11 +5,13 @@ #ifndef COMPONENTS_VARIATIONS_VARIATIONS_URL_CONSTANTS_H_ #define COMPONENTS_VARIATIONS_VARIATIONS_URL_CONSTANTS_H_ +#include "base/component_export.h" + namespace variations { -extern const char kDefaultServerUrl[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kDefaultServerUrl[]; -extern const char kDefaultInsecureServerUrl[]; +COMPONENT_EXPORT(VARIATIONS) extern const char kDefaultInsecureServerUrl[]; } // namespace variations
diff --git a/content/browser/loader/navigation_early_hints_browsertest.cc b/content/browser/loader/navigation_early_hints_browsertest.cc index daa629d..95bfc854 100644 --- a/content/browser/loader/navigation_early_hints_browsertest.cc +++ b/content/browser/loader/navigation_early_hints_browsertest.cc
@@ -59,12 +59,19 @@ const char kPageWithHintedScriptPath[] = "/page_with_hinted_js.html"; const char kPageWithHintedScriptBody[] = "<script src=\"/hinted.js\"></script>"; + +const char kPageWithHintedCorsScriptPath[] = "/page_with_hinted_cors_js.html"; +const char kPageWithHintedCorsScriptBody[] = + "<script src=\"/hinted.js\" crossorigin></script>"; + const char kPageWithHintedModuleScriptPath[] = "/page_with_hinted_module_js.html"; const char kPageWithHintedModuleScriptBody[] = "<script src=\"/hinted.js\" type=\"module\"></script>"; + const char kHintedScriptPath[] = "/hinted.js"; const char kHintedScriptBody[] = "document.title = 'Done';"; + const char kHintedStylesheetPath[] = "/hinted.css"; const char kHintedStylesheetBody[] = "/*empty*/"; @@ -123,6 +130,12 @@ base::StringPrintf("<%s>; rel=preload; as=script", kHintedScriptPath)); } + HeaderField CreatePreloadLinkForCorsScript() { + return HeaderField( + "link", base::StringPrintf("<%s>; rel=preload; as=script; crossorigin", + kHintedScriptPath)); + } + HeaderField CreateModulePreloadLink() { return HeaderField("link", base::StringPrintf("<%s>; rel=modulepreload", kHintedScriptPath)); @@ -165,6 +178,18 @@ return entry; } + ResponseEntry CreatePageEntryWithHintedCorsScript( + net::HttpStatusCode status_code) { + RegisterHintedScriptResource(); + + ResponseEntry entry(kPageWithHintedCorsScriptPath, status_code); + entry.body = kPageWithHintedCorsScriptBody; + HeaderField link_header = CreatePreloadLinkForCorsScript(); + entry.AddEarlyHints({std::move(link_header)}); + + return entry; + } + ResponseEntry CreatePageEntryWithHintedModuleScript( net::HttpStatusCode status_code) { RegisterHintedScriptResource(); @@ -230,6 +255,24 @@ EXPECT_EQ(it->second.error_code.value(), net::OK); } +IN_PROC_BROWSER_TEST_F(NavigationEarlyHintsTest, CorsAttribute) { + ResponseEntry entry = CreatePageEntryWithHintedCorsScript(net::HTTP_OK); + RegisterResponse(entry); + + EXPECT_TRUE(NavigateToURLAndWaitTitle( + net::QuicSimpleTestServer::GetFileURL(kPageWithHintedCorsScriptPath), + "Done")); + PreloadedResources preloads = WaitForPreloadedResources(); + EXPECT_EQ(preloads.size(), 1UL); + + GURL preloaded_url = net::QuicSimpleTestServer::GetFileURL(kHintedScriptPath); + auto it = preloads.find(preloaded_url); + ASSERT_TRUE(it != preloads.end()); + ASSERT_FALSE(it->second.was_canceled); + ASSERT_TRUE(it->second.error_code.has_value()); + EXPECT_EQ(it->second.error_code.value(), net::OK); +} + IN_PROC_BROWSER_TEST_F(NavigationEarlyHintsTest, ModulePreload) { ResponseEntry entry = CreatePageEntryWithHintedModuleScript(net::HTTP_OK); RegisterResponse(entry);
diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc index 16d8ef1..73e6a48 100644 --- a/content/browser/loader/navigation_url_loader_impl.cc +++ b/content/browser/loader/navigation_url_loader_impl.cc
@@ -186,9 +186,8 @@ "combination of both) limits the scope of these requests." )"); -// TODO(kinuko): |request_info| can likely be given as a const ref. std::unique_ptr<network::ResourceRequest> CreateResourceRequest( - NavigationRequestInfo* request_info, + const NavigationRequestInfo& request_info, int frame_tree_node_id, mojo::PendingRemote<network::mojom::CookieAccessObserver> cookie_observer, mojo::PendingRemote<network::mojom::URLLoaderNetworkServiceObserver> @@ -196,48 +195,46 @@ mojo::PendingRemote<network::mojom::DevToolsObserver> devtools_observer) { auto new_request = std::make_unique<network::ResourceRequest>(); - new_request->method = request_info->common_params->method; - new_request->url = request_info->common_params->url; + new_request->method = request_info.common_params->method; + new_request->url = request_info.common_params->url; new_request->site_for_cookies = - request_info->isolation_info.site_for_cookies(); + request_info.isolation_info.site_for_cookies(); new_request->trusted_params = network::ResourceRequest::TrustedParams(); - new_request->trusted_params->isolation_info = request_info->isolation_info; + new_request->trusted_params->isolation_info = request_info.isolation_info; new_request->trusted_params->cookie_observer = std::move(cookie_observer); new_request->trusted_params->url_loader_network_observer = std::move(url_loader_network_observer); new_request->trusted_params->devtools_observer = std::move(devtools_observer); new_request->trusted_params->client_security_state = - request_info->client_security_state.Clone(); - new_request->is_main_frame = request_info->is_main_frame; + request_info.client_security_state.Clone(); + new_request->is_main_frame = request_info.is_main_frame; new_request->priority = net::HIGHEST; - new_request->request_initiator = - request_info->common_params->initiator_origin; - new_request->referrer = request_info->common_params->referrer->url; + new_request->request_initiator = request_info.common_params->initiator_origin; + new_request->referrer = request_info.common_params->referrer->url; new_request->referrer_policy = Referrer::ReferrerPolicyForUrlRequest( - request_info->common_params->referrer->policy); - new_request->headers.AddHeadersFromString( - request_info->begin_params->headers); - new_request->cors_exempt_headers = request_info->cors_exempt_headers; - if (request_info->begin_params->web_bundle_token) { + request_info.common_params->referrer->policy); + new_request->headers.AddHeadersFromString(request_info.begin_params->headers); + new_request->cors_exempt_headers = request_info.cors_exempt_headers; + if (request_info.begin_params->web_bundle_token) { FrameTreeNode* frame_tree_node = FrameTreeNode::GloballyFindByID(frame_tree_node_id); DCHECK(frame_tree_node->parent()); int render_process_id = frame_tree_node->parent()->GetProcess()->GetID(); new_request->web_bundle_token_params = - request_info->begin_params->web_bundle_token; + request_info.begin_params->web_bundle_token; new_request->web_bundle_token_params->render_process_id = render_process_id; } new_request->devtools_accepted_stream_types = - request_info->devtools_accepted_stream_types; + request_info.devtools_accepted_stream_types; new_request->resource_type = static_cast<int>( - request_info->is_main_frame ? blink::mojom::ResourceType::kMainFrame - : blink::mojom::ResourceType::kSubFrame); - if (request_info->is_main_frame) + request_info.is_main_frame ? blink::mojom::ResourceType::kMainFrame + : blink::mojom::ResourceType::kSubFrame); + if (request_info.is_main_frame) new_request->update_first_party_url_on_redirect = true; - int load_flags = request_info->begin_params->load_flags; - if (request_info->is_main_frame) { + int load_flags = request_info.begin_params->load_flags; + if (request_info.is_main_frame) { load_flags |= net::LOAD_MAIN_FRAME_DEPRECATED; load_flags |= net::LOAD_CAN_USE_RESTRICTED_PREFETCH; } @@ -248,33 +245,33 @@ new_request->load_flags = load_flags; - new_request->request_body = request_info->common_params->post_data.get(); - new_request->report_raw_headers = request_info->report_raw_headers; - new_request->has_user_gesture = request_info->common_params->has_user_gesture; + new_request->request_body = request_info.common_params->post_data.get(); + new_request->report_raw_headers = request_info.report_raw_headers; + new_request->has_user_gesture = request_info.common_params->has_user_gesture; new_request->enable_load_timing = true; new_request->mode = network::mojom::RequestMode::kNavigate; - new_request->destination = request_info->begin_params->request_destination; + new_request->destination = request_info.begin_params->request_destination; if (ui::PageTransitionIsWebTriggerable( - request_info->common_params->transition)) { + request_info.common_params->transition)) { new_request->trusted_params->has_user_activation = - request_info->common_params->has_user_gesture; + request_info.common_params->has_user_gesture; } else { new_request->trusted_params->has_user_activation = true; } new_request->credentials_mode = network::mojom::CredentialsMode::kInclude; new_request->redirect_mode = network::mojom::RedirectMode::kManual; - new_request->upgrade_if_insecure = request_info->upgrade_if_insecure; - new_request->throttling_profile_id = request_info->devtools_frame_token; - new_request->transition_type = request_info->common_params->transition; - new_request->previews_state = request_info->common_params->previews_state; + new_request->upgrade_if_insecure = request_info.upgrade_if_insecure; + new_request->throttling_profile_id = request_info.devtools_frame_token; + new_request->transition_type = request_info.common_params->transition; + new_request->previews_state = request_info.common_params->previews_state; new_request->devtools_request_id = - request_info->devtools_navigation_token.ToString(); - new_request->obey_origin_policy = request_info->obey_origin_policy; - if (request_info->begin_params->trust_token_params) { + request_info.devtools_navigation_token.ToString(); + new_request->obey_origin_policy = request_info.obey_origin_policy; + if (request_info.begin_params->trust_token_params) { new_request->trust_token_params = - *request_info->begin_params->trust_token_params; + *request_info.begin_params->trust_token_params; } return new_request; } @@ -1143,7 +1140,7 @@ ->signed_exchange_prefetch_metric_recorder(); resource_request_ = CreateResourceRequest( - request_info_.get(), frame_tree_node_id_, std::move(cookie_observer), + *request_info_, frame_tree_node_id_, std::move(cookie_observer), std::move(url_loader_network_observer), std::move(devtools_observer)); std::string accept_langs =
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc index c7f2679..b4fb8e9 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc
@@ -1166,9 +1166,7 @@ entry ? entry->reload_type() : NavigationTypeToReloadType(common_params_->navigation_type)), nav_entry_id_(entry ? entry->GetUniqueID() : 0), - bindings_(FrameNavigationEntry::kInvalidBindings), from_begin_navigation_(from_begin_navigation), - expected_render_process_host_id_(ChildProcessHost::kInvalidUniqueID), rfh_restored_from_back_forward_cache_( rfh_restored_from_back_forward_cache), // Store the old RenderFrameHost id at request creation to be used later. @@ -1178,7 +1176,6 @@ initiator_frame_token_(begin_params_->initiator_frame_token), initiator_process_id_(initiator_process_id), was_opener_suppressed_(was_opener_suppressed), - coop_status_(this), previous_page_ukm_source_id_( frame_tree_node_->current_frame_host()->GetPageUkmSourceId()) { DCHECK(browser_initiated_ || common_params_->initiator_origin.has_value());
diff --git a/content/browser/renderer_host/navigation_request.h b/content/browser/renderer_host/navigation_request.h index 6e53351..1574c7dd3 100644 --- a/content/browser/renderer_host/navigation_request.h +++ b/content/browser/renderer_host/navigation_request.h
@@ -1387,7 +1387,7 @@ const ReloadType reload_type_; const int nav_entry_id_; bool is_view_source_ = false; - int bindings_; + int bindings_ = FrameNavigationEntry::kInvalidBindings; scoped_refptr<SiteInstanceImpl> starting_site_instance_; @@ -1439,7 +1439,7 @@ // Identifies in which RenderProcessHost this navigation is expected to // commit. - int expected_render_process_host_id_; + int expected_render_process_host_id_ = ChildProcessHost::kInvalidUniqueID; // The SiteInfo of this navigation, as obtained from // SiteInstanceImpl::ComputeSiteInfo(). @@ -1644,12 +1644,12 @@ // ID of the renderer process of the frame host that initiated the navigation. // This is defined if and only if |initiator_frame_token_| above is, and it is // only valid in conjunction with it. - int initiator_process_id_ = ChildProcessHost::kInvalidUniqueID; + const int initiator_process_id_ = ChildProcessHost::kInvalidUniqueID; // Whether a navigation in a new window had the opener suppressed. False if // the navigation is not in a new window. Can only be true for renderer // initiated navigations which use `CreateBrowserInitiated()`. - bool was_opener_suppressed_ = false; + const bool was_opener_suppressed_ = false; // This tracks a connection between the current pending entry and this // request, such that the pending entry can be discarded if no requests are @@ -1680,7 +1680,7 @@ // Structure tracking the effects of the CrossOriginOpenerPolicy on this // navigation. - CrossOriginOpenerPolicyStatus coop_status_; + CrossOriginOpenerPolicyStatus coop_status_{this}; #if DCHECK_IS_ON() bool is_safe_to_delete_ = true;
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.cc b/content/browser/renderer_host/render_widget_host_input_event_router.cc index 804ea37b..893c804 100644 --- a/content/browser/renderer_host/render_widget_host_input_event_router.cc +++ b/content/browser/renderer_host/render_widget_host_input_event_router.cc
@@ -1937,6 +1937,8 @@ last_device_scale_factor_ = last_mouse_move_root_view_->GetCurrentDeviceScaleFactor(); + if (touch_emulator_) + touch_emulator_->SetDeviceScaleFactor(last_device_scale_factor_); if (auto* cursor_manager = last_mouse_move_root_view_->GetCursorManager()) { for (auto it : owner_map_) { if (it.second)
diff --git a/content/browser/tracing/startup_tracing_browsertest.cc b/content/browser/tracing/startup_tracing_browsertest.cc index d3d18172..44c9db4 100644 --- a/content/browser/tracing/startup_tracing_browsertest.cc +++ b/content/browser/tracing/startup_tracing_browsertest.cc
@@ -311,12 +311,8 @@ OutputLocation::kDirectoryWithBasenameUpdatedBeforeStop))); // TODO(crbug.com/1197278): Failing on Windows 7 debug builds. -#if defined(OS_WIN) && DCHECK_IS_ON() -#define MAYBE_TestEnableTracing DISABLED_TestEnableTracing -#else -#define MAYBE_TestEnableTracing TestEnableTracing -#endif -IN_PROC_BROWSER_TEST_P(StartupTracingTest, MAYBE_TestEnableTracing) { +// TODO(crbug.com/1213441): Failing on Linux and Android. +IN_PROC_BROWSER_TEST_P(StartupTracingTest, DISABLED_TestEnableTracing) { EXPECT_TRUE(NavigateToURL(shell(), GetTestUrl("", "title1.html"))); if (GetOutputLocation() ==
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 662a3d1..1be5ffc 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -1988,7 +1988,8 @@ #endif // BUILDFLAG(ENABLE_PLUGINS) -void RenderFrameImpl::ScriptedPrint(bool user_initiated) { +void RenderFrameImpl::ScriptedPrint() { + bool user_initiated = GetLocalRootWebFrameWidget()->HandlingInputEvent(); for (auto& observer : observers_) observer.ScriptedPrint(user_initiated); }
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index 3542e457..852c6df 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -322,8 +322,6 @@ #endif // BUILDFLAG(ENABLE_PLUGINS) - void ScriptedPrint(bool user_initiated); - // IPC::Sender bool Send(IPC::Message* msg) override; @@ -634,6 +632,7 @@ void SetUpSharedMemoryForSmoothness( base::ReadOnlySharedMemoryRegion shared_memory) override; blink::WebURL LastCommittedUrlForUKM() override; + void ScriptedPrint() override; // Binds to the MHTML file generation service in the browser. void BindMhtmlFileWriter(
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 4be2d89..2882fd9 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc
@@ -409,14 +409,6 @@ return view->GetWebView(); } -void RenderViewImpl::PrintPage(WebLocalFrame* frame) { - RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame); - blink::WebFrameWidget* frame_widget = - render_frame->GetLocalRootWebFrameWidget(); - - render_frame->ScriptedPrint(frame_widget->HandlingInputEvent()); -} - void RenderViewImpl::StartNavStateSyncTimerIfNecessary(RenderFrameImpl* frame) { // Keep track of which frames have pending updates. frames_with_pending_state_.insert(frame->GetRoutingID());
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index d9fabe67..a2113fcc 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h
@@ -123,7 +123,6 @@ const blink::SessionStorageNamespaceId& session_storage_namespace_id, bool& consumed_user_gesture, const absl::optional<blink::WebImpression>& impression) override; - void PrintPage(blink::WebLocalFrame* frame) override; void OnPageFrozenChanged(bool frozen) override; // RenderView implementation -------------------------------------------------
diff --git a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt index 20a2abd0..2ff25483 100644 --- a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt
@@ -388,6 +388,7 @@ crbug.com/870856 [ mac amd no-passthrough ] conformance2/textures/misc/tex-mipmap-levels.html [ Failure ] crbug.com/1044638 [ mac amd ] conformance2/rendering/framebuffer-texture-level1.html [ RetryOnFailure ] +crbug.com/1214931 [ mojave amd-0x6821 angle-opengl passthrough ] deqp/functional/gles3/shadertexturefunction/texturesize.html [ RetryOnFailure ] # The transformfeedback tests are specialized for two different AMD # GPUs because of different failure modes on each.
diff --git a/docs/profiling.md b/docs/profiling.md index c407bdb2..a18340d 100644 --- a/docs/profiling.md +++ b/docs/profiling.md
@@ -30,6 +30,7 @@ is_debug = false blink_symbol_level = 2 symbol_level = 2 + use_allocator = "tcmalloc" # Needed for built-in profiling only enable_profiling = true
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc index 04c7afc..f0be6f0b 100644 --- a/gpu/config/gpu_finch_features.cc +++ b/gpu/config/gpu_finch_features.cc
@@ -62,8 +62,14 @@ // https://crbug.com/1176185 List of devices on which SurfaceControl should be // disabled. -const base::FeatureParam<std::string> kAndroidSurfaceControlBlocklist{ - &kAndroidSurfaceControl, "AndroidSurfaceControlBlocklist", "capri|caprip"}; +const base::FeatureParam<std::string> kAndroidSurfaceControlDeviceBlocklist{ + &kAndroidSurfaceControl, "AndroidSurfaceControlDeviceBlocklist", + "capri|caprip"}; + +// List of models on which SurfaceControl should be disabled. +const base::FeatureParam<std::string> kAndroidSurfaceControlModelBlocklist{ + &kAndroidSurfaceControl, "AndroidSurfaceControlModelBlocklist", + "SM-F7*|SM-F9*"}; // Hardware Overlays for WebView. const base::Feature kWebViewSurfaceControl{"WebViewSurfaceControl", @@ -291,7 +297,9 @@ bool IsAndroidSurfaceControlEnabled() { const auto* build_info = base::android::BuildInfo::GetInstance(); if (IsDeviceBlocked(build_info->device(), - kAndroidSurfaceControlBlocklist.Get())) { + kAndroidSurfaceControlDeviceBlocklist.Get()) || + IsDeviceBlocked(build_info->model(), + kAndroidSurfaceControlModelBlocklist.Get())) { return false; }
diff --git a/ios/chrome/browser/metrics/BUILD.gn b/ios/chrome/browser/metrics/BUILD.gn index 81b11136..c33dbcd 100644 --- a/ios/chrome/browser/metrics/BUILD.gn +++ b/ios/chrome/browser/metrics/BUILD.gn
@@ -253,6 +253,7 @@ ":tab_usage_recorder_metrics", "//base/test:test_support", "//components/metrics/demographics", + "//components/signin/public/base", "//components/strings:components_strings_grit", "//components/ukm", "//ios/chrome/app/strings:ios_strings_grit",
diff --git a/ios/chrome/browser/metrics/ukm_egtest.mm b/ios/chrome/browser/metrics/ukm_egtest.mm index 12c2b91..bfc66f229 100644 --- a/ios/chrome/browser/metrics/ukm_egtest.mm +++ b/ios/chrome/browser/metrics/ukm_egtest.mm
@@ -4,6 +4,7 @@ #include "base/ios/ios_util.h" #include "base/macros.h" +#include "components/signin/public/base/account_consistency_method.h" #import "ios/chrome/browser/metrics/metrics_app_interface.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h" @@ -92,6 +93,12 @@ [super tearDown]; } +- (AppLaunchConfiguration)appConfigurationForTestCase { + AppLaunchConfiguration config; + config.features_disabled.push_back(signin::kMobileIdentityConsistency); + return config; +} + #pragma mark - Helpers // Waits for a new incognito tab to be opened.
diff --git a/ios/chrome/browser/safe_browsing/password_protection_egtest.mm b/ios/chrome/browser/safe_browsing/password_protection_egtest.mm index e67c9f3..1f06cf8 100644 --- a/ios/chrome/browser/safe_browsing/password_protection_egtest.mm +++ b/ios/chrome/browser/safe_browsing/password_protection_egtest.mm
@@ -136,7 +136,8 @@ // Tests that password protection UI is not shown when saved password is reused // on safe site. -- (void)testPasswordProtectionNotShownForAllowListedURL { +// TODO(crbug.com/1213616) Test is flaky. +- (void)DISABLED_testPasswordProtectionNotShownForAllowListedURL { // PhishGuard is only available on iOS 14.0 or above. if (!base::ios::IsRunningOnIOS14OrLater()) { return;
diff --git a/ios/chrome/browser/ui/authentication/signin/signin_coordinator_egtest.mm b/ios/chrome/browser/ui/authentication/signin/signin_coordinator_egtest.mm index 361393d9..954781d 100644 --- a/ios/chrome/browser/ui/authentication/signin/signin_coordinator_egtest.mm +++ b/ios/chrome/browser/ui/authentication/signin/signin_coordinator_egtest.mm
@@ -7,6 +7,7 @@ #include "base/strings/sys_string_conversions.h" #import "base/test/ios/wait_util.h" #import "components/signin/ios/browser/features.h" +#include "components/signin/public/base/account_consistency_method.h" #include "components/signin/public/base/signin_pref_names.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h" @@ -105,6 +106,7 @@ - (AppLaunchConfiguration)appConfigurationForTestCase { AppLaunchConfiguration config; config.features_disabled.push_back(kDiscoverFeedInNtp); + config.features_disabled.push_back(signin::kMobileIdentityConsistency); config.features_enabled.push_back(signin::kSimplifySignOutIOS); return config; }
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.h b/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.h index cd99f65..cd02826 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.h +++ b/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.h
@@ -55,6 +55,9 @@ browser:(Browser*)browser NS_DESIGNATED_INITIALIZER; - (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE; +// Called before the instance is deallocated. +- (void)shutdown; + // Closes the edit view as if close button was pressed. - (void)dismiss;
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm index 4e7e5426..89cb7ef 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_edit_view_controller.mm
@@ -219,6 +219,10 @@ } - (void)dealloc { + [self shutdown]; +} + +- (void)shutdown { _folderViewController.delegate = nil; }
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_home_mediator.mm b/ios/chrome/browser/ui/bookmarks/bookmark_home_mediator.mm index 0934fac..e5d3d4a 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_home_mediator.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_home_mediator.mm
@@ -120,6 +120,9 @@ } - (void)disconnect { + [_bookmarkPromoController shutdown]; + _bookmarkPromoController = nil; + _modelBridge = nullptr; _syncedBookmarksObserver = nullptr; self.browserState = nullptr;
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.h b/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.h index 965332d..16fe955 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.h +++ b/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.h
@@ -49,6 +49,9 @@ - (instancetype)initWithBrowser:(Browser*)browser NS_DESIGNATED_INITIALIZER; - (instancetype)initWithStyle:(UITableViewStyle)tableViewStyle NS_UNAVAILABLE; +// Called before the instance is deallocated. +- (void)shutdown; + // Setter to set _rootNode value. - (void)setRootNode:(const bookmarks::BookmarkNode*)rootNode;
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm index f40592fb..c50c21f 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm
@@ -87,6 +87,10 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util_mac.h" +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + using bookmarks::BookmarkNode; using l10n_util::GetNSString; @@ -238,10 +242,6 @@ @implementation BookmarkHomeViewController -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - #pragma mark - Initializer - (instancetype)initWithBrowser:(Browser*)browser { @@ -272,9 +272,18 @@ } - (void)dealloc { + [self shutdown]; +} + +- (void)shutdown { + [_bookmarkInteractionController shutdown]; + _bookmarkInteractionController = nil; + [self.mediator disconnect]; _sharedState.tableView.dataSource = nil; _sharedState.tableView.delegate = nil; + + _bridge.reset(); } - (void)setRootNode:(const bookmarks::BookmarkNode*)rootNode {
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.h b/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.h index 658fde6..3e791df9 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.h +++ b/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.h
@@ -33,6 +33,9 @@ NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; +// Called before the instance is deallocated. +- (void)shutdown; + // Adds a bookmark for |URL| with the given |title|. - (void)bookmarkURL:(const GURL&)URL title:(NSString*)title;
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm index 3ac75dc..1f21189 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.mm
@@ -183,8 +183,19 @@ } - (void)dealloc { + [self shutdown]; +} + +- (void)shutdown { + [self bookmarkBrowserDismissed]; + _bookmarkBrowser.homeDelegate = nil; + [_bookmarkBrowser shutdown]; + _bookmarkBrowser = nil; + _bookmarkEditor.delegate = nil; + [_bookmarkEditor shutdown]; + _bookmarkEditor = nil; } - (void)bookmarkURL:(const GURL&)URL title:(NSString*)title { @@ -305,17 +316,7 @@ } ProceduralBlock completion = ^{ - // TODO(crbug.com/940856): Make sure navigaton - // controller doesn't keep any controllers. Without - // this there's a memory leak of (almost) every BHVC - // the user visits. - [self.bookmarkNavigationController setViewControllers:@[] animated:NO]; - - self.bookmarkBrowser.homeDelegate = nil; - self.bookmarkBrowser = nil; - self.bookmarkTransitioningDelegate = nil; - self.bookmarkNavigationController = nil; - self.bookmarkNavigationControllerDelegate = nil; + [self bookmarkBrowserDismissed]; if (!openUrlsAfterDismissal) { return; @@ -334,6 +335,20 @@ self.currentPresentedState = PresentedState::NONE; } +- (void)bookmarkBrowserDismissed { + // TODO(crbug.com/940856): Make sure navigaton + // controller doesn't keep any controllers. Without + // this there's a memory leak of (almost) every BHVC + // the user visits. + [self.bookmarkNavigationController setViewControllers:@[] animated:NO]; + + self.bookmarkBrowser.homeDelegate = nil; + self.bookmarkBrowser = nil; + self.bookmarkTransitioningDelegate = nil; + self.bookmarkNavigationController = nil; + self.bookmarkNavigationControllerDelegate = nil; +} + - (void)dismissBookmarkEditorAnimated:(BOOL)animated { if (self.currentPresentedState != PresentedState::BOOKMARK_EDITOR) return;
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_model_bridge_observer.mm b/ios/chrome/browser/ui/bookmarks/bookmark_model_bridge_observer.mm index bebb5ab2..0d0ec7b 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_model_bridge_observer.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_model_bridge_observer.mm
@@ -26,8 +26,9 @@ } BookmarkModelBridge::~BookmarkModelBridge() { - DCHECK(model_); - model_->RemoveObserver(this); + if (model_) { + model_->RemoveObserver(this); + } } void BookmarkModelBridge::BookmarkModelLoaded(BookmarkModel* model, @@ -36,9 +37,9 @@ } void BookmarkModelBridge::BookmarkModelBeingDeleted(BookmarkModel* model) { - // This is an inconsistent state in the application lifecycle. The bookmark - // model shouldn't disappear. - NOTREACHED(); + DCHECK(model_); + model_->RemoveObserver(this); + model_ = nullptr; } void BookmarkModelBridge::BookmarkNodeMoved(BookmarkModel* model,
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_promo_controller.h b/ios/chrome/browser/ui/bookmarks/bookmark_promo_controller.h index 2a3ec20c..1746295 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_promo_controller.h +++ b/ios/chrome/browser/ui/bookmarks/bookmark_promo_controller.h
@@ -42,6 +42,9 @@ (id<BookmarkPromoControllerDelegate>)delegate presenter:(id<SigninPresenter>)presenter; +// Called before the instance is deallocated. +- (void)shutdown; + // Hides the promo cell. It won't be presented again on this profile. - (void)hidePromoCell;
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_promo_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_promo_controller.mm index b0bbfe56..997fed0 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_promo_controller.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_promo_controller.mm
@@ -67,7 +67,14 @@ } - (void)dealloc { + [self shutdown]; +} + +- (void)shutdown { [_signinPromoViewMediator signinPromoViewIsRemoved]; + _signinPromoViewMediator = nil; + + _identityManagerObserverBridge.reset(); } - (void)hidePromoCell {
diff --git a/ios/chrome/browser/ui/browser_view/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view/browser_view_controller.mm index a9eba81..d3c959f 100644 --- a/ios/chrome/browser/ui/browser_view/browser_view_controller.mm +++ b/ios/chrome/browser/ui/browser_view/browser_view_controller.mm
@@ -1375,6 +1375,9 @@ } _fullscreenDisabler = nullptr; [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [_bookmarkInteractionController shutdown]; + _bookmarkInteractionController = nil; } #pragma mark - NSObject
diff --git a/ios/chrome/browser/ui/settings/google_services/accounts_table_egtest.mm b/ios/chrome/browser/ui/settings/google_services/accounts_table_egtest.mm index 02e98dd..c42a777 100644 --- a/ios/chrome/browser/ui/settings/google_services/accounts_table_egtest.mm +++ b/ios/chrome/browser/ui/settings/google_services/accounts_table_egtest.mm
@@ -62,6 +62,7 @@ - (AppLaunchConfiguration)appConfigurationForTestCase { AppLaunchConfiguration config; + config.features_disabled.push_back(signin::kMobileIdentityConsistency); config.features_disabled.push_back(signin::kSimplifySignOutIOS); return config; }
diff --git a/ios/chrome/browser/ui/settings/google_services/google_services_settings_egtest.mm b/ios/chrome/browser/ui/settings/google_services/google_services_settings_egtest.mm index fc45413..f8c47be 100644 --- a/ios/chrome/browser/ui/settings/google_services/google_services_settings_egtest.mm +++ b/ios/chrome/browser/ui/settings/google_services/google_services_settings_egtest.mm
@@ -7,6 +7,7 @@ #import "components/policy/core/common/policy_loader_ios_constants.h" #import "components/policy/policy_constants.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h" +#include "components/signin/public/base/account_consistency_method.h" #include "components/signin/public/base/signin_pref_names.h" #import "ios/chrome/browser/policy/policy_util.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey.h" @@ -51,6 +52,12 @@ @implementation GoogleServicesSettingsTestCase +- (AppLaunchConfiguration)appConfigurationForTestCase { + AppLaunchConfiguration config; + config.features_disabled.push_back(signin::kMobileIdentityConsistency); + return config; +} + // Opens the Google services settings view, and closes it. - (void)testOpenGoogleServicesSettings { [self openGoogleServicesSettings];
diff --git a/ios/chrome/browser/ui/settings/sync/BUILD.gn b/ios/chrome/browser/ui/settings/sync/BUILD.gn index 7bca828..992e8a2 100644 --- a/ios/chrome/browser/ui/settings/sync/BUILD.gn +++ b/ios/chrome/browser/ui/settings/sync/BUILD.gn
@@ -110,6 +110,7 @@ sources = [ "sync_encryption_passphrase_table_view_controller_egtest.mm" ] deps = [ "//base/test:test_support", + "//components/signin/public/base", "//components/strings:components_strings_grit", "//ios/chrome/app/strings", "//ios/chrome/browser/ui/authentication:eg_test_support+eg2",
diff --git a/ios/chrome/browser/ui/settings/sync/sync_encryption_passphrase_table_view_controller_egtest.mm b/ios/chrome/browser/ui/settings/sync/sync_encryption_passphrase_table_view_controller_egtest.mm index 180af38..fd2ce56 100644 --- a/ios/chrome/browser/ui/settings/sync/sync_encryption_passphrase_table_view_controller_egtest.mm +++ b/ios/chrome/browser/ui/settings/sync/sync_encryption_passphrase_table_view_controller_egtest.mm
@@ -3,6 +3,7 @@ // found in the LICENSE file. #import <UIKit/UIKit.h> +#include "components/signin/public/base/account_consistency_method.h" #include "components/strings/grit/components_strings.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui.h" @@ -34,6 +35,12 @@ @implementation SyncEncryptionPassphraseTestCase +- (AppLaunchConfiguration)appConfigurationForTestCase { + AppLaunchConfiguration config; + config.features_disabled.push_back(signin::kMobileIdentityConsistency); + return config; +} + // Tests to open the sync passphrase view, and to close it. - (void)testShowSyncPassphraseAndDismiss { [ChromeEarlGrey addBookmarkWithSyncPassphrase:@"hello"];
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_cell.mm b/ios/chrome/browser/ui/table_view/cells/table_view_cell.mm index 2450d8d..9c97c6f 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_cell.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_cell.mm
@@ -7,7 +7,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/ui_util.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui/colors/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/ui/colors/semantic_color_names.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." @@ -28,7 +28,8 @@ if (self) { _customSeparator = [[UIView alloc] init]; _customSeparator.translatesAutoresizingMaskIntoConstraints = NO; - _customSeparator.backgroundColor = UIColor.cr_opaqueSeparatorColor; + _customSeparator.backgroundColor = [UIColor colorNamed:kSeparatorColor]; + [self addSubview:_customSeparator]; NSArray* constraints = @[
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 index c0722a2..62ba4e5 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -b037499c582181704c47945fc15aa5688ef6d580 \ No newline at end of file +b165ec4bd7a5979a32893cd52ecd39e61cc65339 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 index ed438f58b..f133e9b 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -cdc6cdeb69aa51156c630c75977bbe22808023a8 \ No newline at end of file +36f7829f239fab66d5af0bde8373c1c97186821f \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.arm64.zip.sha1 index ec9bca0..a0051aab 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -8ebb1a901d2498d31db9a5d369ef3e38d066dc7d \ No newline at end of file +21c7a1e4734ce5005e50a4f07419bb693470d473 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 index 021e52d..c468ff2 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -3954c54bde6e7a0f6f26aca5924fa994f9dd8ebf \ No newline at end of file +165894cdafef013703fb57c6dca18ded340f5718 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 index 4a40ec5e..05f1959 100644 --- a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -f84c4f5888c7f8e10c5b884a4236a9926beeb2b9 \ No newline at end of file +0471019a3826bd272307ab625bf5bb3de791a8eb \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 index a448faa..6e07618 100644 --- a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -f8209c1b177e11ee470f655b4e8f97b291dc6d35 \ No newline at end of file +bcf5330f3f49eda35b79d1f397e97b280d4074ec \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 index f9940ba..a2fd07b 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -f403c2766111c2db0d6066c24fe8212bf430f0c5 \ No newline at end of file +ab01efc21b39b87bb64ae359b65ac97c68af8f04 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 index aaf0af6..4ae4442c 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -192dd0bf973891577b3dba39a8aae09271a71f5b \ No newline at end of file +9be3d6042aa1ec76bebc57b2d1a8380abcd058d2 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 index 76f918e8..81df60e3 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -896966f05d108136f64390cdbb852d62ed6a8f8c \ No newline at end of file +975c899c4005d936f8734d84cdf0d3470658c282 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 index 02f0d6d9..f48b80ef 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -1d98e32dab81bba466b4893adb7ecb56d03f34de \ No newline at end of file +9deb5535c74ff72c62913f93ee134338bbf3599c \ No newline at end of file
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index aa69a5f..9a1519e 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -4689,7 +4689,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M91", - "revision": "version:91.0.4472.83" + "revision": "version:91.0.4472.87" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -4768,7 +4768,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.36" + "revision": "version:92.0.4515.40" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -4926,7 +4926,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M91", - "revision": "version:91.0.4472.83" + "revision": "version:91.0.4472.87" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -5005,7 +5005,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.36" + "revision": "version:92.0.4515.40" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index 1faf0ae..00dbbdad 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -53852,7 +53852,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M91", - "revision": "version:91.0.4472.83" + "revision": "version:91.0.4472.87" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -53932,7 +53932,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.36" + "revision": "version:92.0.4515.40" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -54092,7 +54092,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M91", - "revision": "version:91.0.4472.83" + "revision": "version:91.0.4472.87" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -54172,7 +54172,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.36" + "revision": "version:92.0.4515.40" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -54397,7 +54397,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M91", - "revision": "version:91.0.4472.83" + "revision": "version:91.0.4472.87" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -54476,7 +54476,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.36" + "revision": "version:92.0.4515.40" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -54634,7 +54634,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M91", - "revision": "version:91.0.4472.83" + "revision": "version:91.0.4472.87" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -54713,7 +54713,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.36" + "revision": "version:92.0.4515.40" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -54938,7 +54938,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M91", - "revision": "version:91.0.4472.83" + "revision": "version:91.0.4472.87" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -55017,7 +55017,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.36" + "revision": "version:92.0.4515.40" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -55175,7 +55175,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M91", - "revision": "version:91.0.4472.83" + "revision": "version:91.0.4472.87" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -55254,7 +55254,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.36" + "revision": "version:92.0.4515.40" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 5811895..b2a6ba1 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -424,7 +424,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.36', + 'revision': 'version:92.0.4515.40', } ], }, @@ -448,7 +448,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M91', - 'revision': 'version:91.0.4472.83', + 'revision': 'version:91.0.4472.87', } ], }, @@ -496,7 +496,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.36', + 'revision': 'version:92.0.4515.40', } ], }, @@ -520,7 +520,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M91', - 'revision': 'version:91.0.4472.83', + 'revision': 'version:91.0.4472.87', } ], }, @@ -568,7 +568,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.36', + 'revision': 'version:92.0.4515.40', } ], }, @@ -592,7 +592,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M91', - 'revision': 'version:91.0.4472.83', + 'revision': 'version:91.0.4472.87', } ], },
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index da57cd94..46b1d81 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -4914,7 +4914,8 @@ "MobileIdentityConsistency": [ { "platforms": [ - "android" + "android", + "ios" ], "experiments": [ { @@ -5841,6 +5842,22 @@ ] } ], + "PartitionAllocPCScanBrowserOnly": [ + { + "platforms": [ + "android", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "PartitionAllocPCScanBrowserOnly" + ] + } + ] + } + ], "PartitionConnectionsByNetworkIsolationKey": [ { "platforms": [ @@ -7699,7 +7716,7 @@ { "name": "Enabled", "enable_features": [ - "TextFragmentColorChangeBlink" + "TextFragmentColorChange" ] } ]
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc index a4b956eb..e6c5b18 100644 --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc
@@ -847,9 +847,8 @@ // manifests. Also controls whether the parsed field is used in browser. See // incubation spec: // https://wicg.github.io/manifest-incubations/#note_taking-member -// TODO(crbug.com/1185678): Enable by default after M92 branches. const base::Feature kWebAppNoteTaking{"WebAppNoteTaking", - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_ENABLED_BY_DEFAULT}; // Makes network loading tasks unfreezable so that they can be processed while // the page is frozen.
diff --git a/third_party/blink/common/use_counter/use_counter_feature_tracker.cc b/third_party/blink/common/use_counter/use_counter_feature_tracker.cc index 899bdce7..e5b924b 100644 --- a/third_party/blink/common/use_counter/use_counter_feature_tracker.cc +++ b/third_party/blink/common/use_counter/use_counter_feature_tracker.cc
@@ -5,6 +5,12 @@ #include "third_party/blink/public/common/use_counter/use_counter_feature_tracker.h" namespace blink { +namespace { +template <size_t N> +bool BitsetContains(const std::bitset<N>& lhs, const std::bitset<N>& rhs) { + return (lhs & rhs) == rhs; +} +} // namespace using FeatureType = mojom::UseCounterFeatureType; @@ -57,6 +63,14 @@ Set(feature, false); } +bool UseCounterFeatureTracker::ContainsForTesting( + const UseCounterFeatureTracker& other) const { + return BitsetContains(web_features_, other.web_features_) && + BitsetContains(css_properties_, other.css_properties_) && + BitsetContains(animated_css_properties_, + other.animated_css_properties_); +} + void UseCounterFeatureTracker::Set(const UseCounterFeature& feature, bool value) { switch (feature.type()) {
diff --git a/third_party/blink/public/common/use_counter/use_counter_feature_tracker.h b/third_party/blink/public/common/use_counter/use_counter_feature_tracker.h index 6b14221..b360bee2 100644 --- a/third_party/blink/public/common/use_counter/use_counter_feature_tracker.h +++ b/third_party/blink/public/common/use_counter/use_counter_feature_tracker.h
@@ -24,6 +24,10 @@ void ResetForTesting(const UseCounterFeature&); + // Returns whether all recorded features in `other` are also recorded + // in `this`. + bool ContainsForTesting(const UseCounterFeatureTracker& other) const; + private: void Set(const UseCounterFeature&, bool);
diff --git a/third_party/blink/public/mojom/use_counter/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/css_property_id.mojom index 4fd74c4e..9b113801 100644 --- a/third_party/blink/public/mojom/use_counter/css_property_id.mojom +++ b/third_party/blink/public/mojom/use_counter/css_property_id.mojom
@@ -747,6 +747,8 @@ kBorderEndEndRadius = 694, kAccentColor = 695, kSizeAdjust = 696, + kContainerName = 697, + kContainerType = 698, // 1. Add new features above this line (don't change the assigned numbers of // the existing items). // 2. Run the src/tools/metrics/histograms/update_use_counter_css.py script
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h index c17f15d9..a8fadc4e 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -758,6 +758,10 @@ // than the document's URL because it will contain a data URL if a base URL // was used for its load or if an unreachable URL was used. virtual WebURL LastCommittedUrlForUKM() { return WebURL(); } + + // Called when script in the frame (and it subframes) wishes to be printed via + // a window.print() call. + virtual void ScriptedPrint() {} }; } // namespace blink
diff --git a/third_party/blink/public/web/web_view_client.h b/third_party/blink/public/web/web_view_client.h index 75bdef8f..782336e6 100644 --- a/third_party/blink/public/web/web_view_client.h +++ b/third_party/blink/public/web/web_view_client.h
@@ -84,12 +84,6 @@ // the layers. virtual void InvalidateContainer() {} - // Called when script in the page calls window.print(). If frame is - // non-null, then it selects a particular frame, including its - // children, to print. Otherwise, the main frame and its children - // should be printed. - virtual void PrintPage(WebLocalFrame*) {} - virtual void OnPageFrozenChanged(bool frozen) {} // UI ------------------------------------------------------------------
diff --git a/third_party/blink/renderer/bindings/generated_in_core.gni b/third_party/blink/renderer/bindings/generated_in_core.gni index f9a2532..670831fe 100644 --- a/third_party/blink/renderer/bindings/generated_in_core.gni +++ b/third_party/blink/renderer/bindings/generated_in_core.gni
@@ -85,6 +85,10 @@ "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_animation_playback_event_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_app_history_navigate_event_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_app_history_navigate_event_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_app_history_navigate_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_app_history_navigate_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_app_history_navigation_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_app_history_navigation_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_application_cache_error_event_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_application_cache_error_event_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_assigned_nodes_options.cc", @@ -115,6 +119,10 @@ "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_custom_layout_constraints_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_document_timeline_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_document_timeline_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_document_transition_prepare_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_document_transition_prepare_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_document_transition_start_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_document_transition_start_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_dom_matrix_2d_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_dom_matrix_2d_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_dom_matrix_init.cc", @@ -177,8 +185,6 @@ "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_image_data_settings.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_image_encode_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_image_encode_options.h", - "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_impression_params.cc", - "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_impression_params.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_input_device_capabilities_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_input_device_capabilities_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_input_event_init.cc", @@ -1561,6 +1567,8 @@ "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_union_float32array_uint16array_uint8clampedarray.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_union_float_stringelementrecord.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_union_float_stringelementrecord.h", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_union_htmlcanvaselement_imagebitmap_offscreencanvas.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_union_htmlcanvaselement_imagebitmap_offscreencanvas.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_union_htmlcanvaselement_offscreencanvas.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_union_htmlcanvaselement_offscreencanvas.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_union_htmlelement_long.cc",
diff --git a/third_party/blink/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni index 7db719b..de24a1e 100644 --- a/third_party/blink/renderer/bindings/generated_in_modules.gni +++ b/third_party/blink/renderer/bindings/generated_in_modules.gni
@@ -111,6 +111,12 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_android_pay_method_data.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_app_banner_prompt_result.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_app_banner_prompt_result.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_auction_ad.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_auction_ad.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_auction_ad_config.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_auction_ad_config.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_auction_ad_interest_group.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_auction_ad_interest_group.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_buffer_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_buffer_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_buffer_source_options.cc", @@ -131,6 +137,8 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_encoder_config.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_encoder_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_encoder_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_encoder_support.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_encoder_support.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_node_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_node_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_audio_param_descriptor.cc", @@ -201,6 +209,12 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_canvas_filter_dictionary.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_canvas_rendering_context_2d_settings.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_canvas_rendering_context_2d_settings.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_capture_handle.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_capture_handle.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_capture_handle_change_event_init.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_capture_handle_change_event_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_capture_handle_config.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_capture_handle_config.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_channel_merger_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_channel_merger_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_channel_splitter_options.cc", @@ -381,12 +395,16 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_fragment_state.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_buffer.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_buffer.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_external_image.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_external_image.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_image_bitmap.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_image_bitmap.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_texture.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_texture.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_data_layout.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_data_layout.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_multisample_state.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_multisample_state.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_object_descriptor_base.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_object_descriptor_base.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_origin_2d_dict.cc", @@ -591,6 +609,10 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_midi_permission_descriptor.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_multi_cache_query_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_multi_cache_query_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_native_io_read_result.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_native_io_read_result.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_native_io_write_result.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_native_io_write_result.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_navigation_preload_state.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_navigation_preload_state.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_ndef_message_init.cc", @@ -681,6 +703,8 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_picture_in_picture_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_plane_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_plane_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_plane_layout.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_plane_layout.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_point_2d.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_point_2d.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_position_options.cc", @@ -715,8 +739,6 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_push_subscription_options_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_query_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_query_options.h", - "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_quic_transport_options.cc", - "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_quic_transport_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_registration_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_registration_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_related_application.cc", @@ -839,6 +861,8 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_stream_abort_info.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sync_event_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sync_event_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_task_priority_change_event_init.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_task_priority_change_event_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_text_decode_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_text_decode_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_text_decoder_options.cc", @@ -875,12 +899,18 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_encoder_encode_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_encoder_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_encoder_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_encoder_support.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_encoder_support.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_metadata.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_metadata.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_plane_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_plane_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_read_into_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_read_into_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_region.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_frame_region.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_watch_advertisements_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_watch_advertisements_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_wave_shaper_options.cc", @@ -889,6 +919,8 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_web_id_request_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_web_transport_close_info.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_web_transport_close_info.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_web_transport_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_web_transport_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl_context_attributes.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl_context_attributes.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl_context_event_init.cc", @@ -936,6 +968,8 @@ ] generated_enumeration_sources_in_modules = [ + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_alpha_option.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_alpha_option.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_app_banner_prompt_outcome.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_app_banner_prompt_outcome.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_append_mode.cc", @@ -1134,6 +1168,8 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_midi_port_device_state.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_midi_port_type.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_midi_port_type.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_mode.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_mode.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_notification_action_type.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_notification_action_type.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_notification_direction.cc",
diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni index 7fa88eb..e3a7fb6 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni
@@ -956,6 +956,7 @@ "//third_party/blink/renderer/modules/webgpu/gpu_extent_3d_dict.idl", "//third_party/blink/renderer/modules/webgpu/gpu_fragment_state.idl", "//third_party/blink/renderer/modules/webgpu/gpu_image_copy_buffer.idl", + "//third_party/blink/renderer/modules/webgpu/gpu_image_copy_external_image.idl", "//third_party/blink/renderer/modules/webgpu/gpu_image_copy_image_bitmap.idl", "//third_party/blink/renderer/modules/webgpu/gpu_image_copy_texture.idl", "//third_party/blink/renderer/modules/webgpu/gpu_image_data_layout.idl",
diff --git a/third_party/blink/renderer/bindings/modules/v8/generated.gni b/third_party/blink/renderer/bindings/modules/v8/generated.gni index baf661b..67dbb47 100644 --- a/third_party/blink/renderer/bindings/modules/v8/generated.gni +++ b/third_party/blink/renderer/bindings/modules/v8/generated.gni
@@ -73,6 +73,8 @@ "$bindings_modules_v8_output_dir/idb_object_store_or_idb_index.h", "$bindings_modules_v8_output_dir/idb_object_store_or_idb_index_or_idb_cursor.cc", "$bindings_modules_v8_output_dir/idb_object_store_or_idb_index_or_idb_cursor.h", + "$bindings_modules_v8_output_dir/image_bitmap_or_html_canvas_element_or_offscreen_canvas.cc", + "$bindings_modules_v8_output_dir/image_bitmap_or_html_canvas_element_or_offscreen_canvas.h", "$bindings_modules_v8_output_dir/image_bitmap_source.cc", "$bindings_modules_v8_output_dir/image_bitmap_source.h", "$bindings_modules_v8_output_dir/int32_array_or_long_sequence.cc",
diff --git a/third_party/blink/renderer/core/animation/css/css_animations.cc b/third_party/blink/renderer/core/animation/css/css_animations.cc index 3848b38..e4867dbd 100644 --- a/third_party/blink/renderer/core/animation/css/css_animations.cc +++ b/third_party/blink/renderer/core/animation/css/css_animations.cc
@@ -438,37 +438,8 @@ return iteration_duration * (iteration_boundary - iteration_start); } -CSSScrollTimeline* CreateCSSScrollTimeline( - Document& document, - CSSScrollTimeline::Options&& options) { - if (!options.IsValid()) - return nullptr; - auto* scroll_timeline = - MakeGarbageCollected<CSSScrollTimeline>(&document, std::move(options)); - // It's is not allowed for a style resolve to create timelines that - // needs timing updates (i.e. AnimationTimeline::NeedsAnimationTimingUpdate() - // must return false). Servicing animations after creation preserves this - // invariant by ensuring the last-update time of the timeline is equal to - // the current time. - scroll_timeline->ServiceAnimations(kTimingUpdateOnDemand); - return scroll_timeline; -} - -CSSScrollTimeline* FindMatchingCachedTimeline( - Document& document, - const AtomicString& name, - const CSSScrollTimeline::Options& options) { - auto* cached_timeline = DynamicTo<CSSScrollTimeline>( - document.GetDocumentAnimations().FindCachedCSSScrollTimeline(name)); - if (cached_timeline && cached_timeline->Matches(options)) - return cached_timeline; - return nullptr; -} - AnimationTimeline* ComputeTimeline(Element* element, - const StyleNameOrKeyword& timeline_name, - StyleRuleScrollTimeline* rule, - AnimationTimeline* existing_timeline) { + const StyleNameOrKeyword& timeline_name) { Document& document = element->GetDocument(); if (timeline_name.IsKeyword()) { if (timeline_name.GetKeyword() == CSSValueID::kAuto) @@ -476,37 +447,7 @@ DCHECK_EQ(timeline_name.GetKeyword(), CSSValueID::kNone); return nullptr; } - if (rule) { - CSSScrollTimeline::Options options(document, *rule); - - const AtomicString& name = timeline_name.GetName().GetValue(); - // When multiple animations refer to the same @scroll-timeline, the same - // CSSScrollTimeline instance should be shared. - if (auto* timeline = FindMatchingCachedTimeline(document, name, options)) - return timeline; - // When the incoming options match the existing timeline (associated with - // an existing animation), we can continue to use the existing timeline, - // since creating a new timeline from the options would just yield an - // identical timeline. - if (auto* timeline = DynamicTo<CSSScrollTimeline>(existing_timeline)) { - if (timeline->Matches(options)) - return existing_timeline; - } - if (auto* timeline = - CreateCSSScrollTimeline(document, std::move(options))) { - document.GetDocumentAnimations().CacheCSSScrollTimeline(*timeline); - return timeline; - } - } - return nullptr; -} - -StyleRuleScrollTimeline* FindScrollTimelineRule( - Document& document, - const StyleNameOrKeyword& timeline_name) { - if (timeline_name.IsKeyword()) - return nullptr; - return document.GetStyleEngine().FindScrollTimelineRule( + return document.GetStyleEngine().FindScrollTimeline( timeline_name.GetName().GetValue()); } @@ -708,9 +649,6 @@ const StyleNameOrKeyword& timeline_name = animation_data->GetTimeline(i); - StyleRuleScrollTimeline* scroll_timeline_rule = - FindScrollTimelineRule(element.GetDocument(), timeline_name); - const RunningAnimation* existing_animation = nullptr; wtf_size_t existing_animation_index = 0; @@ -753,10 +691,8 @@ toggle_pause_state ? animation->Paused() : animation->Playing(); AnimationTimeline* timeline = existing_animation->Timeline(); - if (!is_animation_style_change && !animation->GetIgnoreCSSTimeline()) { - timeline = ComputeTimeline(&element, timeline_name, - scroll_timeline_rule, timeline); - } + if (!is_animation_style_change && !animation->GetIgnoreCSSTimeline()) + timeline = ComputeTimeline(&element, timeline_name); if (keyframes_rule != existing_animation->style_rule || keyframes_rule->Version() != @@ -795,9 +731,7 @@ } } else { DCHECK(!is_animation_style_change); - AnimationTimeline* timeline = - ComputeTimeline(&element, timeline_name, scroll_timeline_rule, - nullptr /* existing_timeline */); + AnimationTimeline* timeline = ComputeTimeline(&element, timeline_name); absl::optional<TimelinePhase> inherited_phase; absl::optional<AnimationTimeDelta> inherited_time = AnimationTimeDelta();
diff --git a/third_party/blink/renderer/core/animation/css/css_scroll_timeline.cc b/third_party/blink/renderer/core/animation/css/css_scroll_timeline.cc index 854e05f9..409d485 100644 --- a/third_party/blink/renderer/core/animation/css/css_scroll_timeline.cc +++ b/third_party/blink/renderer/core/animation/css/css_scroll_timeline.cc
@@ -9,6 +9,7 @@ #include "third_party/blink/renderer/core/css/css_id_selector_value.h" #include "third_party/blink/renderer/core/css/css_identifier_value.h" #include "third_party/blink/renderer/core/css/css_value_list.h" +#include "third_party/blink/renderer/core/css/style_engine.h" #include "third_party/blink/renderer/core/css/style_rule.h" #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/dom/element.h" @@ -49,14 +50,15 @@ return nullptr; } -Element* ComputeScrollSource(Document& document, const CSSValue* value) { +absl::optional<Element*> ComputeScrollSource(Document& document, + const CSSValue* value) { if (const auto* id = GetIdSelectorValue(value)) return document.getElementById(id->Id()); if (IsNone(value)) return nullptr; DCHECK(!value || IsAuto(value)); // TODO(crbug.com/1189101): Respond when the scrolling element changes. - return document.ScrollingElementNoLayout(); + return absl::nullopt; } Element* ComputeElementOffsetTarget(Document& document, const CSSValue* value) { @@ -157,18 +159,21 @@ const AtomicString& id, CSSScrollTimeline* timeline) : IdTargetObserver(document->GetIdTargetObserverRegistry(), id), + document_(document), timeline_(timeline) {} void Trace(Visitor* visitor) const override { visitor->Trace(timeline_); + visitor->Trace(document_); IdTargetObserver::Trace(visitor); } private: void IdTargetChanged() override { if (timeline_) - timeline_->InvalidateEffectTargetStyle(); + document_->GetStyleEngine().ScrollTimelineInvalidated(*timeline_); } + Member<Document> document_; WeakMember<CSSScrollTimeline> timeline_; };
diff --git a/third_party/blink/renderer/core/animation/css/css_scroll_timeline.h b/third_party/blink/renderer/core/animation/css/css_scroll_timeline.h index 013b7f5..b5d7672 100644 --- a/third_party/blink/renderer/core/animation/css/css_scroll_timeline.h +++ b/third_party/blink/renderer/core/animation/css/css_scroll_timeline.h
@@ -31,7 +31,7 @@ private: friend class CSSScrollTimeline; - Element* source_; + absl::optional<Element*> source_; ScrollTimeline::ScrollDirection direction_; HeapVector<Member<ScrollTimelineOffset>> offsets_; absl::optional<double> time_range_; @@ -42,6 +42,8 @@ const AtomicString& Name() const; + StyleRuleScrollTimeline* GetRule() const { return rule_; } + bool Matches(const Options&) const; // AnimationTimeline implementation.
diff --git a/third_party/blink/renderer/core/animation/css/css_scroll_timeline_test.cc b/third_party/blink/renderer/core/animation/css/css_scroll_timeline_test.cc index 8de8d87..3b3c46e 100644 --- a/third_party/blink/renderer/core/animation/css/css_scroll_timeline_test.cc +++ b/third_party/blink/renderer/core/animation/css/css_scroll_timeline_test.cc
@@ -32,6 +32,12 @@ DocumentAnimations& GetDocumentAnimations() const { return GetDocument().GetDocumentAnimations(); } + + void SimulateFrame() { + auto new_time = GetAnimationClock().CurrentTime() + + base::TimeDelta::FromMilliseconds(100); + GetPage().Animator().ServiceScriptedAnimations(new_time); + } }; TEST_F(CSSScrollTimelineTest, IdObserverElementRemoval) { @@ -64,11 +70,13 @@ ASSERT_TRUE(element2); element1->remove(); + SimulateFrame(); UpdateAllLifecyclePhasesForTest(); ThreadState::Current()->CollectAllGarbageForTesting(); EXPECT_TRUE(HasObservers("scroller")); element2->remove(); + SimulateFrame(); UpdateAllLifecyclePhasesForTest(); ThreadState::Current()->CollectAllGarbageForTesting(); EXPECT_FALSE(HasObservers("scroller")); @@ -282,20 +290,26 @@ class AnimationTriggeringDelegate : public ResizeObserver::Delegate { public: - explicit AnimationTriggeringDelegate(Element* element) : element_(element) {} + explicit AnimationTriggeringDelegate(Element* style_element) + : style_element_(style_element) {} void OnResize( const HeapVector<Member<ResizeObserverEntry>>& entries) override { - element_->setAttribute(blink::html_names::kClassAttr, "animate"); + style_element_->setTextContent(R"CSS( + @scroll-timeline timeline { + source: selector(#scroller); + time-range: 10s; + } + )CSS"); } void Trace(Visitor* visitor) const override { ResizeObserver::Delegate::Trace(visitor); - visitor->Trace(element_); + visitor->Trace(style_element_); } private: - Member<Element> element_; + Member<Element> style_element_; }; } // namespace @@ -307,10 +321,6 @@ from { width: 100px; } to { width: 100px; } } - @scroll-timeline timeline { - source: selector(#scroller); - time-range: 10s; - } #scroller { height: 100px; overflow: scroll; @@ -320,8 +330,6 @@ } #element { width: 1px; - } - #element.animate { animation: anim 10s timeline; } </style> @@ -338,12 +346,16 @@ scroller->setAttribute(blink::html_names::kIdAttr, "scroller"); scroller->AppendChild(MakeGarbageCollected<HTMLDivElement>(GetDocument())); + Element* style = MakeGarbageCollected<HTMLStyleElement>(GetDocument(), + CreateElementFlags()); + Element* main = GetDocument().getElementById("main"); ASSERT_TRUE(main); + main->AppendChild(style); main->AppendChild(element); main->AppendChild(scroller); - auto* delegate = MakeGarbageCollected<AnimationTriggeringDelegate>(element); + auto* delegate = MakeGarbageCollected<AnimationTriggeringDelegate>(style); ResizeObserver* observer = ResizeObserver::Create(GetDocument().domWindow(), delegate); observer->observe(element);
diff --git a/third_party/blink/renderer/core/animation/document_animations.cc b/third_party/blink/renderer/core/animation/document_animations.cc index 6cd49b7..81a1298 100644 --- a/third_party/blink/renderer/core/animation/document_animations.cc +++ b/third_party/blink/renderer/core/animation/document_animations.cc
@@ -181,21 +181,10 @@ unvalidated_timelines_.clear(); } -void DocumentAnimations::CacheCSSScrollTimeline(CSSScrollTimeline& timeline) { - // We cache the least seen CSSScrollTimeline for a given name. - cached_css_timelines_.Set(timeline.Name(), &timeline); -} - -CSSScrollTimeline* DocumentAnimations::FindCachedCSSScrollTimeline( - const AtomicString& name) { - return To<CSSScrollTimeline>(cached_css_timelines_.at(name)); -} - void DocumentAnimations::Trace(Visitor* visitor) const { visitor->Trace(document_); visitor->Trace(timelines_); visitor->Trace(unvalidated_timelines_); - visitor->Trace(cached_css_timelines_); } void DocumentAnimations::GetAnimationsTargetingTreeScope(
diff --git a/third_party/blink/renderer/core/animation/document_animations.h b/third_party/blink/renderer/core/animation/document_animations.h index 03f2395..15754c4e 100644 --- a/third_party/blink/renderer/core/animation/document_animations.h +++ b/third_party/blink/renderer/core/animation/document_animations.h
@@ -38,7 +38,6 @@ namespace blink { class AnimationTimeline; -class CSSScrollTimeline; class Document; class PaintArtifactCompositor; @@ -89,9 +88,6 @@ // https://github.com/w3c/csswg-drafts/issues/5261 void ValidateTimelines(); - void CacheCSSScrollTimeline(CSSScrollTimeline&); - CSSScrollTimeline* FindCachedCSSScrollTimeline(const AtomicString&); - const HeapHashSet<WeakMember<AnimationTimeline>>& GetTimelinesForTesting() const { return timelines_; @@ -115,14 +111,6 @@ Member<Document> document_; HeapHashSet<WeakMember<AnimationTimeline>> timelines_; HeapHashSet<WeakMember<AnimationTimeline>> unvalidated_timelines_; - - // We cache CSSScrollTimelines by name, such that multiple animations using - // the same timeline can use the same CSSScrollTimeline instance. - // - // Note that timelines present in |cached_css_timelines_| are also present - // in |timelines_|. - HeapHashMap<AtomicString, WeakMember<AnimationTimeline>> - cached_css_timelines_; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/animation/scroll_timeline.cc b/third_party/blink/renderer/core/animation/scroll_timeline.cc index c28aacb..c4a8b6b 100644 --- a/third_party/blink/renderer/core/animation/scroll_timeline.cc +++ b/third_party/blink/renderer/core/animation/scroll_timeline.cc
@@ -90,13 +90,10 @@ } } -// Note that the resolution process may trigger document lifecycle to clean -// style and layout. Node* ResolveScrollSource(Element* scroll_source) { - // When in quirks mode we need the style to be clean, so we don't use - // |ScrollingElementNoLayout|. if (scroll_source && - scroll_source == scroll_source->GetDocument().scrollingElement()) { + scroll_source == + scroll_source->GetDocument().ScrollingElementNoLayout()) { return &scroll_source->GetDocument(); } return scroll_source; @@ -106,9 +103,9 @@ ScrollTimeline* ScrollTimeline::Create(Document& document, ScrollTimelineOptions* options, ExceptionState& exception_state) { - Element* scroll_source = options->hasScrollSource() - ? options->scrollSource() - : document.scrollingElement(); + absl::optional<Element*> scroll_source = + options->hasScrollSource() ? absl::make_optional(options->scrollSource()) + : absl::nullopt; ScrollDirection orientation; if (!StringToScrollDirection(options->orientation(), orientation)) { @@ -143,18 +140,25 @@ time_range = absl::make_optional(options->timeRange().GetAsDouble()); } + // The scrollingElement depends on style/layout-tree in quirks mode. Update + // such that subsequent calls to ScrollingElementNoLayout returns up-to-date + // information. + if (document.InQuirksMode()) + document.UpdateStyleAndLayoutTree(); + return MakeGarbageCollected<ScrollTimeline>( &document, scroll_source, orientation, scroll_offsets, time_range); } ScrollTimeline::ScrollTimeline( Document* document, - Element* scroll_source, + absl::optional<Element*> scroll_source, ScrollDirection orientation, HeapVector<Member<ScrollTimelineOffset>> scroll_offsets, absl::optional<double> time_range) : AnimationTimeline(document), - scroll_source_(scroll_source), + scroll_source_( + scroll_source.value_or(document->ScrollingElementNoLayout())), resolved_scroll_source_(ResolveScrollSource(scroll_source_)), orientation_(orientation), scroll_offsets_(std::move(scroll_offsets)),
diff --git a/third_party/blink/renderer/core/animation/scroll_timeline.h b/third_party/blink/renderer/core/animation/scroll_timeline.h index 4c4fe8d..32afcdb 100644 --- a/third_party/blink/renderer/core/animation/scroll_timeline.h +++ b/third_party/blink/renderer/core/animation/scroll_timeline.h
@@ -43,7 +43,7 @@ ExceptionState&); ScrollTimeline(Document*, - Element*, + absl::optional<Element*> scroll_source, ScrollDirection, HeapVector<Member<ScrollTimelineOffset>>, absl::optional<double>);
diff --git a/third_party/blink/renderer/core/css/css_primitive_value_mappings.h b/third_party/blink/renderer/core/css/css_primitive_value_mappings.h index c316819..45d1c62 100644 --- a/third_party/blink/renderer/core/css/css_primitive_value_mappings.h +++ b/third_party/blink/renderer/core/css/css_primitive_value_mappings.h
@@ -1544,6 +1544,22 @@ } template <> +inline EContainerType CSSIdentifierValue::ConvertTo() const { + switch (GetValueID()) { + case CSSValueID::kNone: + return kContainerTypeNone; + case CSSValueID::kInlineSize: + return kContainerTypeInlineSize; + case CSSValueID::kBlockSize: + return kContainerTypeBlockSize; + default: + break; + } + NOTREACHED(); + return kContainerTypeNone; +} + +template <> inline CSSIdentifierValue::CSSIdentifierValue(TextUnderlinePosition position) : CSSValue(kIdentifierClass) { switch (position) {
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 index e402d51..508cbd0 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -2003,6 +2003,31 @@ computable: false, }, { + name: "container-name", + property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], + type_name: "AtomicString", + default_value: "AtomicString()", + field_group: "*", + field_template: "external", + converter: "ConvertContainerName", + keywords: ["none"], + typedom_types: ["Keyword"], + runtime_flag: "CSSContainerQueries", + }, + { + name: "container-type", + property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], + keywords: ["none", "block-size", "inline-size"], + field_group: "*", + field_size: 2, + field_template: "primitive", + default_value: "kContainerTypeNone", + type_name: "unsigned", + converter: "ConvertFlags<EContainerType>", + typedom_types: ["Keyword"], + runtime_flag: "CSSContainerQueries", + }, + { name: "content", property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], field_group: "*",
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc index c63fae7..6042cbe 100644 --- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc +++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
@@ -4870,6 +4870,43 @@ return ConsumeLength(range, context, kValueRangeAll, UnitlessQuirk::kAllow); } +CSSValue* ConsumeContainerName(CSSParserTokenRange& range, + const CSSParserContext& context) { + if (CSSValue* value = ConsumeIdent<CSSValueID::kNone>(range)) + return value; + // TODO(crbug.com/1066390): ConsumeCustomIdent should not allow "default". + if (range.Peek().Id() == CSSValueID::kDefault) + return nullptr; + return ConsumeCustomIdent(range, context); +} + +CSSValue* ConsumeContainerType(CSSParserTokenRange& range) { + if (CSSValue* value = ConsumeIdent<CSSValueID::kNone>(range)) + return value; + + CSSIdentifierValue* inline_size = nullptr; + CSSIdentifierValue* block_size = nullptr; + + while (!range.AtEnd()) { + CSSValueID id = range.Peek().Id(); + if (id == CSSValueID::kInlineSize && !inline_size) { + inline_size = ConsumeIdent(range); + } else if (id == CSSValueID::kBlockSize && !block_size) { + block_size = ConsumeIdent(range); + } else { + return nullptr; + } + } + + CSSValueList* list = CSSValueList::CreateSpaceSeparated(); + + if (inline_size) + list->Append(*inline_size); + if (block_size) + list->Append(*block_size); + + return list; +} CSSValue* ConsumeSVGPaint(CSSParserTokenRange& range, const CSSParserContext& context) { if (range.Peek().Id() == CSSValueID::kNone)
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.h b/third_party/blink/renderer/core/css/properties/css_parsing_utils.h index 2991b6b..bb92825 100644 --- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.h +++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.h
@@ -453,6 +453,9 @@ CSSValue* ConsumeSVGPaint(CSSParserTokenRange&, const CSSParserContext&); CSSValue* ParseSpacing(CSSParserTokenRange&, const CSSParserContext&); +CSSValue* ConsumeContainerName(CSSParserTokenRange&, const CSSParserContext&); +CSSValue* ConsumeContainerType(CSSParserTokenRange&); + UnitlessQuirk UnitlessUnlessShorthand(const CSSParserLocalContext&); // https://drafts.csswg.org/css-counter-styles-3/#typedef-counter-style-name
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc index 280acf1..9a8b361 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -1885,19 +1885,19 @@ return CSSIdentifierValue::Create(CSSValueID::kContent); CSSValueList* list = CSSValueList::CreateSpaceSeparated(); - if (style.ContainsSize()) { + if ((style.Contain() & kContainsSize) == kContainsSize) { list->Append(*CSSIdentifierValue::Create(CSSValueID::kSize)); } else { - if (style.ContainsInlineSize()) + if (style.Contain() & kContainsInlineSize) list->Append(*CSSIdentifierValue::Create(CSSValueID::kInlineSize)); - else if (style.ContainsBlockSize()) + else if (style.Contain() & kContainsBlockSize) list->Append(*CSSIdentifierValue::Create(CSSValueID::kBlockSize)); } - if (style.ContainsLayout()) + if (style.Contain() & kContainsLayout) list->Append(*CSSIdentifierValue::Create(CSSValueID::kLayout)); - if (style.ContainsStyle()) + if (style.Contain() & kContainsStyle) list->Append(*CSSIdentifierValue::Create(CSSValueID::kStyle)); - if (style.ContainsPaint()) + if (style.Contain() & kContainsPaint) list->Append(*CSSIdentifierValue::Create(CSSValueID::kPaint)); DCHECK(list->length()); return list; @@ -1938,6 +1938,43 @@ CSSValuePair::kDropIdenticalValues); } +const CSSValue* ContainerName::ParseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext& context, + const CSSParserLocalContext&) const { + return css_parsing_utils::ConsumeContainerName(range, context); +} + +const CSSValue* ContainerName::CSSValueFromComputedStyleInternal( + const ComputedStyle& style, + const LayoutObject* layout_object, + bool allow_visited_style) const { + if (style.ContainerName().IsNull()) + return CSSIdentifierValue::Create(CSSValueID::kNone); + return MakeGarbageCollected<CSSCustomIdentValue>(style.ContainerName()); +} + +const CSSValue* ContainerType::ParseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext& context, + const CSSParserLocalContext&) const { + return css_parsing_utils::ConsumeContainerType(range); +} + +const CSSValue* ContainerType::CSSValueFromComputedStyleInternal( + const ComputedStyle& style, + const LayoutObject* layout_object, + bool allow_visited_style) const { + if (style.ContainerType() == kContainerTypeNone) + return CSSIdentifierValue::Create(CSSValueID::kNone); + CSSValueList* list = CSSValueList::CreateSpaceSeparated(); + if (style.ContainerType() & kContainerTypeInlineSize) + list->Append(*CSSIdentifierValue::Create(CSSValueID::kInlineSize)); + if (style.ContainerType() & kContainerTypeBlockSize) + list->Append(*CSSIdentifierValue::Create(CSSValueID::kBlockSize)); + return list; +} + namespace { CSSValue* ConsumeAttr(CSSParserTokenRange args,
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc index fac4072a..20078a4 100644 --- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc +++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
@@ -2158,4 +2158,13 @@ return flags; } +AtomicString StyleBuilderConverter::ConvertContainerName( + StyleResolverState& state, + const CSSValue& value) { + if (auto* custom_ident_value = DynamicTo<CSSCustomIdentValue>(value)) + return AtomicString(custom_ident_value->Value()); + DCHECK_EQ(To<CSSIdentifierValue>(value).GetValueID(), CSSValueID::kNone); + return AtomicString(); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h index 8059584..1529edd 100644 --- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h +++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
@@ -296,6 +296,9 @@ static ScrollbarGutter ConvertScrollbarGutter(StyleResolverState& state, const CSSValue& value); + static AtomicString ConvertContainerName(StyleResolverState&, + const CSSValue&); + static void CountSystemColorComputeToSelfUsage( const StyleResolverState& state); };
diff --git a/third_party/blink/renderer/core/css/resolver/style_resolver.cc b/third_party/blink/renderer/core/css/resolver/style_resolver.cc index 7f3d519..f76c2517 100644 --- a/third_party/blink/renderer/core/css/resolver/style_resolver.cc +++ b/third_party/blink/renderer/core/css/resolver/style_resolver.cc
@@ -1751,10 +1751,8 @@ // <html> root element with no background steals background from its first // <body> child. // Also see LayoutBoxModelObject::BackgroundTransfersToView() - if (body_style && IsA<HTMLHtmlElement>(document_element) && - !background_style->HasBackground()) { + if (body_style && !background_style->HasBackground()) background_style = body_style; - } Color background_color = Color::kTransparent; FillLayer background_layers(EFillLayerType::kBackground, true);
diff --git a/third_party/blink/renderer/core/css/style_engine.cc b/third_party/blink/renderer/core/css/style_engine.cc index dbbf7f0..380bbb7 100644 --- a/third_party/blink/renderer/core/css/style_engine.cc +++ b/third_party/blink/renderer/core/css/style_engine.cc
@@ -540,6 +540,7 @@ UpdateViewport(); UpdateActiveStyleSheets(); UpdateGlobalRuleSet(); + UpdateTimelines(); } const ActiveStyleSheetVector StyleEngine::ActiveStyleSheetsForInspector() { @@ -1751,6 +1752,17 @@ resolver_->InvalidateMatchedPropertiesCache(); } +void StyleEngine::ScrollTimelinesChanged() { + MarkAllElementsForStyleRecalc(StyleChangeReasonForTracing::Create( + style_change_reason::kScrollTimeline)); + // We currently rely on marking at least one element for recalc in order + // to clean the timelines_need_update_ flag. (Otherwise the timelines + // will just remain dirty). Hence, if we in the future remove the call + // to mark elements for recalc, we would need to call + // ScheduleLayoutTreeUpdateIfNeeded to ensure that we reach UpdateTimelines. + timelines_need_update_ = true; +} + void StyleEngine::MarkForWhitespaceReattachment() { DCHECK(GetDocument().InStyleRecalc()); for (auto element : whitespace_reattach_set_) { @@ -1842,7 +1854,8 @@ } void StyleEngine::ClearScrollTimelineRules() { - scroll_timeline_map_.clear(); + scroll_timeline_rule_map_.clear(); + ScrollTimelinesChanged(); } void StyleEngine::AddPropertyRulesFromSheets( @@ -1913,9 +1926,8 @@ if (scroll_timeline_rules.IsEmpty()) return; for (const auto& rule : scroll_timeline_rules) - scroll_timeline_map_.Set(AtomicString(rule->GetName()), rule); - MarkAllElementsForStyleRecalc(StyleChangeReasonForTracing::Create( - style_change_reason::kScrollTimeline)); + scroll_timeline_rule_map_.Set(rule->GetName(), rule); + ScrollTimelinesChanged(); } StyleRuleKeyframes* StyleEngine::KeyframeStylesForAnimation( @@ -1930,11 +1942,53 @@ return it->value.Get(); } -StyleRuleScrollTimeline* StyleEngine::FindScrollTimelineRule( - const AtomicString& name) { +void StyleEngine::UpdateTimelines() { + if (!timelines_need_update_) + return; + timelines_need_update_ = false; + + HeapHashMap<AtomicString, Member<CSSScrollTimeline>> timelines; + + for (const auto& it : scroll_timeline_rule_map_) { + const AtomicString& name = it.key; + + CSSScrollTimeline::Options options(GetDocument(), *it.value); + // TODO(crbug.com/1097041): Support 'auto'. + if (!options.IsValid()) + continue; + + // Check if we can re-use existing timeline. + CSSScrollTimeline* existing_timeline = FindScrollTimeline(name); + if (existing_timeline && existing_timeline->Matches(options)) { + timelines.Set(name, existing_timeline); + continue; + } + + // Create a new timeline. + auto* timeline = MakeGarbageCollected<CSSScrollTimeline>( + &GetDocument(), std::move(options)); + // It is not allowed for a style update to create timelines that + // needs timing updates (i.e. + // AnimationTimeline::NeedsAnimationTimingUpdate() must return false). + // Servicing animations after creation preserves this invariant by ensuring + // the last-update time of the timeline is equal to the current time. + timeline->ServiceAnimations(kTimingUpdateOnDemand); + timelines.Set(name, timeline); + } + + std::swap(scroll_timeline_map_, timelines); +} + +CSSScrollTimeline* StyleEngine::FindScrollTimeline(const AtomicString& name) { + DCHECK(!timelines_need_update_); return scroll_timeline_map_.at(name); } +void StyleEngine::ScrollTimelineInvalidated(CSSScrollTimeline& timeline) { + timelines_need_update_ = true; + timeline.InvalidateEffectTargetStyle(); +} + DocumentStyleEnvironmentVariables& StyleEngine::EnsureEnvironmentVariables() { if (!environment_variables_) { environment_variables_ = DocumentStyleEnvironmentVariables::Create( @@ -2466,6 +2520,7 @@ visitor->Trace(custom_element_default_style_sheets_); visitor->Trace(keyframes_rule_map_); visitor->Trace(user_counter_style_map_); + visitor->Trace(scroll_timeline_rule_map_); visitor->Trace(scroll_timeline_map_); visitor->Trace(inspector_style_sheet_); visitor->Trace(document_style_sheet_collection_);
diff --git a/third_party/blink/renderer/core/css/style_engine.h b/third_party/blink/renderer/core/css/style_engine.h index 9935144d..f9f0a7e 100644 --- a/third_party/blink/renderer/core/css/style_engine.h +++ b/third_party/blink/renderer/core/css/style_engine.h
@@ -36,6 +36,7 @@ #include "third_party/blink/public/common/css/forced_colors.h" #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h" #include "third_party/blink/public/web/web_document.h" +#include "third_party/blink/renderer/core/animation/css/css_scroll_timeline.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/css/active_style_sheets.h" #include "third_party/blink/renderer/core/css/css_global_rule_set.h" @@ -373,6 +374,13 @@ void EnvironmentVariableChanged(); + // Called when the set of @scroll-timeline rules changes. E.g. if a new + // @scroll-timeline rule was inserted. + // + // Not to be confused with ScrollTimelineInvalidated, which is called when + // elements *referenced* by @scroll-timeline rules change. + void ScrollTimelinesChanged(); + bool NeedsWhitespaceReattachment() const { return !whitespace_reattach_set_.IsEmpty(); } @@ -396,7 +404,18 @@ StyleRuleKeyframes* KeyframeStylesForAnimation( const AtomicString& animation_name); - StyleRuleScrollTimeline* FindScrollTimelineRule(const AtomicString& name); + + void UpdateTimelines(); + + CSSScrollTimeline* FindScrollTimeline(const AtomicString& name); + + // Called when information a @scroll-timeline depends on changes, e.g. + // when we have source:selector(#foo), and the element referenced by + // #foo changes. + // + // Not to be confused with ScrollTimelinesChanged, which is called when + // @scroll-timeline rules themselves change. + void ScrollTimelineInvalidated(CSSScrollTimeline&); CounterStyleMap* GetUserCounterStyleMap() { return user_counter_style_map_; } const CounterStyle& FindCounterStyleAcrossScopes(const AtomicString&, @@ -612,6 +631,7 @@ bool viewport_style_dirty_{false}; bool fonts_need_update_{false}; bool counter_styles_need_update_{false}; + bool timelines_need_update_{false}; // Set to true if we allow marking style dirty from style recalc. Ideally, we // should get rid of this, but we keep track of where we allow it with @@ -667,7 +687,8 @@ Member<CounterStyleMap> user_counter_style_map_; HeapHashMap<AtomicString, Member<StyleRuleScrollTimeline>> - scroll_timeline_map_; + scroll_timeline_rule_map_; + HeapHashMap<AtomicString, Member<CSSScrollTimeline>> scroll_timeline_map_; scoped_refptr<DocumentStyleEnvironmentVariables> environment_variables_;
diff --git a/third_party/blink/renderer/core/css/style_engine_test.cc b/third_party/blink/renderer/core/css/style_engine_test.cc index e902937..5231f65 100644 --- a/third_party/blink/renderer/core/css/style_engine_test.cc +++ b/third_party/blink/renderer/core/css/style_engine_test.cc
@@ -116,6 +116,13 @@ return ListMarker::Get(marker)->TextAlternative(*marker); } + StyleRuleScrollTimeline* FindScrollTimelineRule(AtomicString name) { + CSSScrollTimeline* timeline = GetStyleEngine().FindScrollTimeline(name); + if (!timeline) + return nullptr; + return timeline->GetRule(); + } + private: std::unique_ptr<DummyPageHolder> dummy_page_holder_; }; @@ -3119,12 +3126,12 @@ // @scroll-timeline in the user origin: InjectSheet("user1", WebDocument::kUserOrigin, R"CSS( @scroll-timeline timeline1 { + time-range: 10s; source: selector(#scroller1); } )CSS"); UpdateAllLifecyclePhases(); - StyleRuleScrollTimeline* rule1 = - GetStyleEngine().FindScrollTimelineRule("timeline1"); + StyleRuleScrollTimeline* rule1 = FindScrollTimelineRule("timeline1"); ASSERT_TRUE(rule1); ASSERT_TRUE(rule1->GetSource()); EXPECT_EQ("selector(#scroller1)", rule1->GetSource()->CssText()); @@ -3132,12 +3139,12 @@ // @scroll-timeline in the author origin (should win over user origin) InjectSheet("author", WebDocument::kAuthorOrigin, R"CSS( @scroll-timeline timeline1 { + time-range: 10s; source: selector(#scroller2); } )CSS"); UpdateAllLifecyclePhases(); - StyleRuleScrollTimeline* rule2 = - GetStyleEngine().FindScrollTimelineRule("timeline1"); + StyleRuleScrollTimeline* rule2 = FindScrollTimelineRule("timeline1"); ASSERT_TRUE(rule2); ASSERT_TRUE(rule2->GetSource()); EXPECT_EQ("selector(#scroller2)", rule2->GetSource()->CssText()); @@ -3145,12 +3152,12 @@ // An additional @scroll-timeline in the user origin: InjectSheet("user2", WebDocument::kUserOrigin, R"CSS( @scroll-timeline timeline2 { + time-range: 10s; source: selector(#scroller3); } )CSS"); UpdateAllLifecyclePhases(); - StyleRuleScrollTimeline* rule3 = - GetStyleEngine().FindScrollTimelineRule("timeline2"); + StyleRuleScrollTimeline* rule3 = FindScrollTimelineRule("timeline2"); ASSERT_TRUE(rule3); ASSERT_TRUE(rule3->GetSource()); EXPECT_EQ("selector(#scroller3)", rule3->GetSource()->CssText());
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc index 54c45f4..ac289f7 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc
@@ -1530,8 +1530,6 @@ Element* Document::ScrollingElementNoLayout() { if (RuntimeEnabledFeatures::ScrollTopLeftInteropEnabled()) { if (InQuirksMode()) { - DCHECK(!IsActive() || InStyleRecalc() || - lifecycle_.GetState() >= DocumentLifecycle::kStyleClean); HTMLBodyElement* body = FirstBodyElement(); if (body && body->GetLayoutObject() && body->GetLayoutObject()->IsScrollContainer()) @@ -3298,8 +3296,7 @@ const ComputedStyle* root_style = root_element->GetComputedStyle(); if (!root_style || root_style->IsEnsuredInDisplayNone()) return nullptr; - if (body_element && root_style->IsOverflowVisibleAlongBothAxes() && - IsA<HTMLHtmlElement>(root_element)) + if (body_element && root_style->IsOverflowVisibleAlongBothAxes()) return body_element; return root_element; }
diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h index d20955a..bf2b4b8 100644 --- a/third_party/blink/renderer/core/dom/document.h +++ b/third_party/blink/renderer/core/dom/document.h
@@ -406,6 +406,14 @@ Element* scrollingElement(); // When calling from C++ code, use this method. scrollingElement() is // just for the web IDL implementation. + // + // Style/layout-tree needs to be updated before calling this function, + // otherwise the returned element might be outdated. However, accessing + // information based on the layout of the previous frame is occasionally + // the correct behavior [1], hence it's not invalid to call this function + // while style/layout dirty. + // + // [1] https://drafts.csswg.org/scroll-animations-1/#avoiding-cycles Element* ScrollingElementNoLayout(); String readyState() const;
diff --git a/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc b/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc index 5459bde..179b7548 100644 --- a/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc +++ b/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc
@@ -332,7 +332,12 @@ // 'beforeinput' event handler may destroy target frame. if (frame.GetDocument()->GetFrame() != frame) return true; + + // No DOM mutation if EditContext is active. + if (frame.GetInputMethodController().GetActiveEditContext()) + return true; } + frame.GetEditor().DeleteSelectionWithSmartDelete( ConvertSmartReplaceOptionToDeleteMode(GetSmartReplaceOption(frame)), InputEvent::InputType::kDeleteByCut); @@ -453,6 +458,10 @@ // 'beforeinput' event handler may destroy target frame. if (frame.GetDocument()->GetFrame() != frame) return; + + // No DOM mutation if EditContext is active. + if (frame.GetInputMethodController().GetActiveEditContext()) + return; } if (paste_mode == PasteMode::kAllMimeTypes) { @@ -500,9 +509,23 @@ // before we obtain the selection. frame.GetDocument()->UpdateStyleAndLayout(DocumentUpdateReason::kEditing); - if (source == EditorCommandSource::kMenuOrKeyBinding && - !frame.Selection().SelectionHasFocus()) - return false; + if (source == EditorCommandSource::kMenuOrKeyBinding) { + if (!frame.Selection().SelectionHasFocus()) + return false; + + DataTransfer* data_transfer = DataTransfer::Create( + DataTransfer::kCopyAndPaste, DataTransferAccessPolicy::kReadable, + DataObject::CreateFromClipboard(frame.GetSystemClipboard(), + PasteMode::kPlainTextOnly)); + if (DispatchBeforeInputDataTransfer( + FindEventTargetForClipboardEvent(frame, source), + InputEvent::InputType::kInsertFromPaste, + data_transfer) != DispatchEventResult::kNotCanceled) + return true; + // 'beforeinput' event handler may destroy target frame. + if (frame.GetDocument()->GetFrame() != frame) + return true; + } PasteAsPlainTextFromClipboard(frame, source); return true;
diff --git a/third_party/blink/renderer/core/editing/commands/editor_command.cc b/third_party/blink/renderer/core/editing/commands/editor_command.cc index ad8232b..5eb6e8ab 100644 --- a/third_party/blink/renderer/core/editing/commands/editor_command.cc +++ b/third_party/blink/renderer/core/editing/commands/editor_command.cc
@@ -1963,9 +1963,7 @@ case EditingCommandType::kInsertBacktab: case EditingCommandType::kInsertNewline: case EditingCommandType::kInsertLineBreak: - case EditingCommandType::kPaste: case EditingCommandType::kPasteAndMatchStyle: - case EditingCommandType::kCut: // 1) BeforeInput event only, ex ctrl+B or <enter>. return true; case EditingCommandType::kDeleteBackward:
diff --git a/third_party/blink/renderer/core/editing/finder/find_in_page_coordinates.cc b/third_party/blink/renderer/core/editing/finder/find_in_page_coordinates.cc index 17071c5..bc6f53c4 100644 --- a/third_party/blink/renderer/core/editing/finder/find_in_page_coordinates.cc +++ b/third_party/blink/renderer/core/editing/finder/find_in_page_coordinates.cc
@@ -77,7 +77,7 @@ // For scrolling we need to get where the actual origin is independently of // the scroll. if (container->IsScrollContainer()) - overflow_rect.Move(-PhysicalOffset(container->ScrolledContentOffset())); + overflow_rect.Move(-container->ScrolledContentOffset()); FloatRect container_rect(container->LocalToAbsoluteRect(overflow_rect));
diff --git a/third_party/blink/renderer/core/editing/selection_modifier_line.cc b/third_party/blink/renderer/core/editing/selection_modifier_line.cc index e20c56f..c6fbe6f 100644 --- a/third_party/blink/renderer/core/editing/selection_modifier_line.cc +++ b/third_party/blink/renderer/core/editing/selection_modifier_line.cc
@@ -114,10 +114,8 @@ // TODO(yosin): Is kIgnoreTransforms correct here? PhysicalOffset absolute_block_point = containing_block.LocalToAbsolutePoint( PhysicalOffset(), kIgnoreTransforms); - if (containing_block.IsScrollContainer()) { - absolute_block_point -= - PhysicalOffset(containing_block.ScrolledContentOffset()); - } + if (containing_block.IsScrollContainer()) + absolute_block_point -= containing_block.ScrolledContentOffset(); if (containing_block.IsHorizontalWritingMode()) { return PhysicalOffset(line_direction_point - absolute_block_point.left,
diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc index 10af02c0..f61dfa9 100644 --- a/third_party/blink/renderer/core/exported/web_view_test.cc +++ b/third_party/blink/renderer/core/exported/web_view_test.cc
@@ -2604,24 +2604,24 @@ EXPECT_EQ(SK_ColorYELLOW, web_view_impl->BackgroundColor()); } -class PrintWebViewClient : public frame_test_helpers::TestWebViewClient { +class PrintWebFrameClient : public frame_test_helpers::TestWebFrameClient { public: - PrintWebViewClient() : print_called_(false) {} + PrintWebFrameClient() = default; - // WebViewClient methods - void PrintPage(WebLocalFrame*) override { print_called_ = true; } + // WebLocalFrameClient overrides: + void ScriptedPrint() override { print_called_ = true; } bool PrintCalled() const { return print_called_; } private: - bool print_called_; + bool print_called_ = false; }; TEST_F(WebViewTest, PrintWithXHRInFlight) { - PrintWebViewClient client; + PrintWebFrameClient client; RegisterMockedHttpURLLoad("print_with_xhr_inflight.html"); WebViewImpl* web_view_impl = web_view_helper_.InitializeAndLoad( - base_url_ + "print_with_xhr_inflight.html", nullptr, &client); + base_url_ + "print_with_xhr_inflight.html", &client, nullptr); ASSERT_TRUE(To<LocalFrame>(web_view_impl->GetPage()->MainFrame()) ->GetDocument()
diff --git a/third_party/blink/renderer/core/frame/embedded_content_view.cc b/third_party/blink/renderer/core/frame/embedded_content_view.cc index 9e609f6f..c7cb1853 100644 --- a/third_party/blink/renderer/core/frame/embedded_content_view.cc +++ b/third_party/blink/renderer/core/frame/embedded_content_view.cc
@@ -31,9 +31,9 @@ if (owner_layout_view->IsScrollContainer()) { // Floored because the frame_rect in a content view is an IntRect. We may // want to reevaluate that since scroll offsets/layout can be fractional. - IntSize scroll_offset( - FlooredIntSize(owner_layout_view->ScrolledContentOffset())); - location.SaturatedMove(-scroll_offset.Width(), -scroll_offset.Height()); + IntPoint scroll_offset( + FlooredIntPoint(owner_layout_view->ScrolledContentOffset())); + location.SaturatedMove(-scroll_offset.X(), -scroll_offset.Y()); } } return location;
diff --git a/third_party/blink/renderer/core/layout/api/line_layout_box.h b/third_party/blink/renderer/core/layout/api/line_layout_box.h index 663b29f..309a9cf 100644 --- a/third_party/blink/renderer/core/layout/api/line_layout_box.h +++ b/third_party/blink/renderer/core/layout/api/line_layout_box.h
@@ -79,7 +79,7 @@ void SetSize(const LayoutSize& size) { return ToBox()->SetSize(size); } - LayoutSize ScrolledContentOffset() const { + PhysicalOffset ScrolledContentOffset() const { return ToBox()->ScrolledContentOffset(); }
diff --git a/third_party/blink/renderer/core/layout/layout_box.cc b/third_party/blink/renderer/core/layout/layout_box.cc index 99eb266..4a6f5f66 100644 --- a/third_party/blink/renderer/core/layout/layout_box.cc +++ b/third_party/blink/renderer/core/layout/layout_box.cc
@@ -1860,11 +1860,12 @@ return GetScrollableArea() ? GetScrollableArea()->ScrollOrigin() : IntPoint(); } -LayoutSize LayoutBox::ScrolledContentOffset() const { +PhysicalOffset LayoutBox::ScrolledContentOffset() const { NOT_DESTROYED(); DCHECK(IsScrollContainer()); DCHECK(GetScrollableArea()); - return LayoutSize(GetScrollableArea()->GetScrollOffset()); + return PhysicalOffset::FromFloatSizeFloor( + GetScrollableArea()->GetScrollOffset()); } IntPoint LayoutBox::PixelSnappedScrolledContentOffset() const { @@ -1973,9 +1974,9 @@ // c) Container scroll offset. if (container_object->IsBox() && container_object != ancestor && To<LayoutBox>(container_object)->ContainedContentsScroll(*this)) { - LayoutSize offset( + PhysicalOffset offset( -To<LayoutBox>(container_object)->ScrolledContentOffset()); - transform.PostTranslate(offset.Width(), offset.Height()); + transform.PostTranslate(offset.left, offset.top); } bool has_perspective = container_object && container_object->HasLayer() && @@ -2026,7 +2027,7 @@ return true; if (ContainedContentsScroll(contents)) - transform_state.Move(PhysicalOffset(-ScrolledContentOffset())); + transform_state.Move(-ScrolledContentOffset()); return ApplyBoxClips(transform_state, accumulation, visual_rect_flags); }
diff --git a/third_party/blink/renderer/core/layout/layout_box.h b/third_party/blink/renderer/core/layout/layout_box.h index 5f5e53c..e436ce864 100644 --- a/third_party/blink/renderer/core/layout/layout_box.h +++ b/third_party/blink/renderer/core/layout/layout_box.h
@@ -1806,7 +1806,7 @@ // See README.md for an explanation of scroll origin. IntSize OriginAdjustmentForScrollbars() const; IntPoint ScrollOrigin() const; - LayoutSize ScrolledContentOffset() const; + PhysicalOffset ScrolledContentOffset() const; // Scroll offset as snapped to physical pixels. This value should be used in // any values used after layout and inside "layout code" that cares about
diff --git a/third_party/blink/renderer/core/layout/layout_box_test.cc b/third_party/blink/renderer/core/layout/layout_box_test.cc index 8690524..92baef86 100644 --- a/third_party/blink/renderer/core/layout/layout_box_test.cc +++ b/third_party/blink/renderer/core/layout/layout_box_test.cc
@@ -1433,7 +1433,7 @@ #define EXPECT_ZERO_SCROLL(box) \ do { \ - EXPECT_EQ(LayoutSize(), box->ScrolledContentOffset()); \ + EXPECT_EQ(PhysicalOffset(), box->ScrolledContentOffset()); \ const auto* scrollable_area = box->GetScrollableArea(); \ EXPECT_EQ(IntSize(), scrollable_area->ScrollOffsetInt()); \ EXPECT_EQ(IntPoint(), scrollable_area->ScrollOrigin()); \ @@ -1538,7 +1538,7 @@ const auto* normal = GetLayoutBoxByElementId("normal"); const auto* scrollable_area = normal->GetScrollableArea(); - EXPECT_EQ(LayoutSize(), normal->ScrolledContentOffset()); + EXPECT_EQ(PhysicalOffset(), normal->ScrolledContentOffset()); EXPECT_EQ(IntSize(), normal->OriginAdjustmentForScrollbars()); EXPECT_EQ(IntSize(), scrollable_area->ScrollOffsetInt()); // 50 = border_left, 20 = border_top @@ -1560,7 +1560,7 @@ const auto* vlr = GetLayoutBoxByElementId("vlr"); scrollable_area = vlr->GetScrollableArea(); - EXPECT_EQ(LayoutSize(), vlr->ScrolledContentOffset()); + EXPECT_EQ(PhysicalOffset(), vlr->ScrolledContentOffset()); EXPECT_EQ(IntSize(), vlr->OriginAdjustmentForScrollbars()); EXPECT_EQ(IntSize(), scrollable_area->ScrollOffsetInt()); // 2060 = child_width + padding_left + padding_right @@ -1581,7 +1581,7 @@ const auto* vrl = GetLayoutBoxByElementId("vrl"); scrollable_area = vrl->GetScrollableArea(); - EXPECT_EQ(LayoutSize(), vrl->ScrolledContentOffset()); + EXPECT_EQ(PhysicalOffset(), vrl->ScrolledContentOffset()); EXPECT_EQ(IntSize(), vrl->OriginAdjustmentForScrollbars()); EXPECT_EQ(IntSize(), scrollable_area->ScrollOffsetInt()); // Same as "vlr" except for flipping. @@ -1598,7 +1598,7 @@ const auto* rtl = GetLayoutBoxByElementId("rtl"); scrollable_area = rtl->GetScrollableArea(); - EXPECT_EQ(LayoutSize(), rtl->ScrolledContentOffset()); + EXPECT_EQ(PhysicalOffset(), rtl->ScrolledContentOffset()); EXPECT_EQ(IntSize(15, 0), rtl->OriginAdjustmentForScrollbars()); EXPECT_EQ(IntSize(), scrollable_area->ScrollOffsetInt()); // The contents overflow to the left. @@ -1618,7 +1618,7 @@ const auto* rtl_vlr = GetLayoutBoxByElementId("rtl-vlr"); scrollable_area = rtl_vlr->GetScrollableArea(); - EXPECT_EQ(LayoutSize(), rtl_vlr->ScrolledContentOffset()); + EXPECT_EQ(PhysicalOffset(), rtl_vlr->ScrolledContentOffset()); EXPECT_EQ(IntSize(), rtl_vlr->OriginAdjustmentForScrollbars()); EXPECT_EQ(IntSize(), scrollable_area->ScrollOffsetInt()); // 2060 = child_width + padding_left + padding_right @@ -1637,7 +1637,7 @@ const auto* rtl_vrl = GetLayoutBoxByElementId("rtl-vrl"); scrollable_area = rtl_vrl->GetScrollableArea(); - EXPECT_EQ(LayoutSize(), rtl_vrl->ScrolledContentOffset()); + EXPECT_EQ(PhysicalOffset(), rtl_vrl->ScrolledContentOffset()); EXPECT_EQ(IntSize(), rtl_vrl->OriginAdjustmentForScrollbars()); EXPECT_EQ(IntSize(), scrollable_area->ScrollOffsetInt()); // Same as "vlr" except for flipping.
diff --git a/third_party/blink/renderer/core/layout/layout_flexible_box_test.cc b/third_party/blink/renderer/core/layout/layout_flexible_box_test.cc index f00b19df..1f6b0d3 100644 --- a/third_party/blink/renderer/core/layout/layout_flexible_box_test.cc +++ b/third_party/blink/renderer/core/layout/layout_flexible_box_test.cc
@@ -76,7 +76,7 @@ flex_box->PhysicalContentBoxRect()); } - EXPECT_EQ(LayoutSize(), flex_box->ScrolledContentOffset()); + EXPECT_EQ(PhysicalOffset(), flex_box->ScrolledContentOffset()); EXPECT_EQ(ScrollOffset(), flex_box->GetScrollableArea()->GetScrollOffset()); }
diff --git a/third_party/blink/renderer/core/layout/layout_object.cc b/third_party/blink/renderer/core/layout/layout_object.cc index 40a2a0bd..bcfaa3b 100644 --- a/third_party/blink/renderer/core/layout/layout_object.cc +++ b/third_party/blink/renderer/core/layout/layout_object.cc
@@ -3471,7 +3471,7 @@ DCHECK(container->IsScrollContainer()); const auto* box = To<LayoutBox>(container); if (!ignore_scroll_offset) - return -PhysicalOffset(box->ScrolledContentOffset()); + return -box->ScrolledContentOffset(); // ScrollOrigin accounts for other writing modes whose content's origin is not // at the top-left.
diff --git a/third_party/blink/renderer/core/layout/layout_object.h b/third_party/blink/renderer/core/layout/layout_object.h index 4b7258fc..5a19438 100644 --- a/third_party/blink/renderer/core/layout/layout_object.h +++ b/third_party/blink/renderer/core/layout/layout_object.h
@@ -618,13 +618,11 @@ } inline bool ShouldApplyInlineSizeContainment() const { NOT_DESTROYED(); - return (StyleRef().ContainsInlineSize() || StyleRef().ContainsSize()) && - IsEligibleForSizeContainment(); + return StyleRef().ContainsInlineSize() && IsEligibleForSizeContainment(); } inline bool ShouldApplyBlockSizeContainment() const { NOT_DESTROYED(); - return (StyleRef().ContainsBlockSize() || StyleRef().ContainsSize()) && - IsEligibleForSizeContainment(); + return StyleRef().ContainsBlockSize() && IsEligibleForSizeContainment(); } inline bool ShouldApplyStyleContainment() const { NOT_DESTROYED();
diff --git a/third_party/blink/renderer/core/layout/layout_view.cc b/third_party/blink/renderer/core/layout/layout_view.cc index 0095ca8..9f7cf511 100644 --- a/third_party/blink/renderer/core/layout/layout_view.cc +++ b/third_party/blink/renderer/core/layout/layout_view.cc
@@ -566,8 +566,7 @@ PhysicalOffset LayoutView::OffsetForFixedPosition() const { NOT_DESTROYED(); - return IsScrollContainer() ? PhysicalOffset(ScrolledContentOffset()) - : PhysicalOffset(); + return IsScrollContainer() ? ScrolledContentOffset() : PhysicalOffset(); } PhysicalOffset LayoutView::PixelSnappedOffsetForFixedPosition() const {
diff --git a/third_party/blink/renderer/core/layout/list_marker.cc b/third_party/blink/renderer/core/layout/list_marker.cc index 4c8ff49..edf8e72a 100644 --- a/third_party/blink/renderer/core/layout/list_marker.cc +++ b/third_party/blink/renderer/core/layout/list_marker.cc
@@ -128,8 +128,6 @@ LayoutObject* ListMarker::GetContentChild(const LayoutObject& marker) const { DCHECK_EQ(Get(&marker), this); LayoutObject* const first_child = marker.SlowFirstChild(); - if (!first_child) - return nullptr; if (IsA<LayoutNGTextCombine>(first_child)) return first_child->SlowFirstChild(); return first_child;
diff --git a/third_party/blink/renderer/core/layout/ng/svg/ng_svg_text_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/svg/ng_svg_text_layout_algorithm.cc index 900e8fb3..8d7bda5b 100644 --- a/third_party/blink/renderer/core/layout/ng/svg/ng_svg_text_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/svg/ng_svg_text_layout_algorithm.cc
@@ -641,9 +641,6 @@ // 'right', then reverse path. // ==> We don't support 'side' attribute yet. - // 5.1.2.3. Let length be the length of path. - const float length = path_mapper->length(); - // 5.1.2.4. Let offset be the value of the ‘textPath’ element's // ‘startOffset’ attribute, adjusted due to any ‘pathLength’ // attribute on the referenced element. @@ -664,6 +661,7 @@ scaling_factor + offset; + // 5.1.2.3. Let length be the length of path. // 5.1.2.9. If path is a closed subpath depending on the values of // text-anchor and direction of the element the character at index is // in: @@ -676,32 +674,9 @@ // -> (start, rtl) or (end, ltr) // If mid−offset < −length or mid−offset > 0, set the "hidden" // flag of result[index] to true. - const ComputedStyle& style = - items[result_[index].item_index]->Style(); - const bool is_ltr = style.IsLeftToRightDirection(); - const float mid_offset = mid - offset; - switch (style.TextAnchor()) { - default: - NOTREACHED(); - FALLTHROUGH; - case ETextAnchor::kStart: - if (is_ltr) { - info.hidden = mid_offset < 0 || mid_offset > length; - } else { - info.hidden = mid_offset < -length || mid_offset > 0; - } - break; - case ETextAnchor::kEnd: - if (is_ltr) { - info.hidden = mid_offset < -length || mid_offset > 0; - } else { - info.hidden = mid_offset < 0 || mid_offset > length; - } - break; - case ETextAnchor::kMiddle: - info.hidden = mid_offset < -length / 2 || mid_offset > length / 2; - break; - } + // + // ==> Major browsers don't support the special handling for closed + // paths. // 5.1.2.10. If the hidden flag is false: if (!info.hidden) {
diff --git a/third_party/blink/renderer/core/page/chrome_client_impl.cc b/third_party/blink/renderer/core/page/chrome_client_impl.cc index 897ed4d..997b738 100644 --- a/third_party/blink/renderer/core/page/chrome_client_impl.cc +++ b/third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -597,8 +597,8 @@ void ChromeClientImpl::PrintDelegate(LocalFrame* frame) { NotifyPopupOpeningObservers(); - if (web_view_->Client()) - web_view_->Client()->PrintPage(WebLocalFrameImpl::FromFrame(frame)); + WebLocalFrameImpl* web_frame = WebLocalFrameImpl::FromFrame(frame); + web_frame->Client()->ScriptedPrint(); } ColorChooser* ChromeClientImpl::OpenColorChooser(
diff --git a/third_party/blink/renderer/core/paint/background_image_geometry.cc b/third_party/blink/renderer/core/paint/background_image_geometry.cc index 193ab56..b11b19da 100644 --- a/third_party/blink/renderer/core/paint/background_image_geometry.cc +++ b/third_party/blink/renderer/core/paint/background_image_geometry.cc
@@ -62,7 +62,7 @@ block && !skip_info.AncestorSkipped(); block = block->ContainingBlock(&skip_info)) { if (block->IsScrollContainer()) - result += PhysicalOffsetToBeNoop(block->ScrolledContentOffset()); + result += block->ScrolledContentOffset(); if (block == container) break; } @@ -355,7 +355,7 @@ return rect; // The LayoutView is the only object that can paint a fixed background into // its scrolling contents layer, so it gets a special adjustment here. - rect.offset = PhysicalOffsetToBeNoop(layout_view->ScrolledContentOffset()); + rect.offset = layout_view->ScrolledContentOffset(); } rect.Move(AccumulatedScrollOffsetForFixedBackground(obj, container));
diff --git a/third_party/blink/renderer/core/paint/scoped_paint_state.h b/third_party/blink/renderer/core/paint/scoped_paint_state.h index a6003f3..d5dead3b 100644 --- a/third_party/blink/renderer/core/paint/scoped_paint_state.h +++ b/third_party/blink/renderer/core/paint/scoped_paint_state.h
@@ -46,9 +46,16 @@ return; } const auto* properties = fragment_to_paint_->PaintProperties(); - if (properties && properties->PaintOffsetTranslation()) { + if (!properties) + return; + if (properties->PaintOffsetTranslation()) { AdjustForPaintOffsetTranslation(object, *properties->PaintOffsetTranslation()); + } else if (object.IsNGSVGText()) { + if (const auto* transform = properties->Transform()) { + adjusted_paint_info_.emplace(paint_info); + adjusted_paint_info_->TransformCullRect(*transform); + } } }
diff --git a/third_party/blink/renderer/core/streams/readable_stream.cc b/third_party/blink/renderer/core/streams/readable_stream.cc index 9974276..7861188d 100644 --- a/third_party/blink/renderer/core/streams/readable_stream.cc +++ b/third_party/blink/renderer/core/streams/readable_stream.cc
@@ -1114,32 +1114,44 @@ AllowPerChunkTransferring allow_per_chunk_transferring, std::unique_ptr<ReadableStreamTransferringOptimizer> optimizer) { auto* isolate = script_state->GetIsolate(); - - auto strategy = CreateTrivialQueuingStrategy(isolate, high_water_mark); - ExceptionState exception_state(isolate, ExceptionState::kConstructionContext, "ReadableStream"); v8::MicrotasksScope microtasks_scope( isolate, v8::MicrotasksScope::kDoNotRunMicrotasks); - v8::Local<v8::Value> underlying_source_v8 = - ToV8(underlying_source, script_state); - auto* stream = MakeGarbageCollected<ReadableStream>(); - stream->InitInternal(script_state, ScriptValue(isolate, underlying_source_v8), - strategy, true, exception_state); - + stream->InitWithCountQueueingStrategy( + script_state, underlying_source, high_water_mark, + allow_per_chunk_transferring, std::move(optimizer), exception_state); if (exception_state.HadException()) { exception_state.ClearException(); DLOG(WARNING) << "Ignoring an exception in CreateWithCountQueuingStrategy()."; } - - stream->allow_per_chunk_transferring_ = allow_per_chunk_transferring; - stream->transferring_optimizer_ = std::move(optimizer); return stream; } +void ReadableStream::InitWithCountQueueingStrategy( + ScriptState* script_state, + UnderlyingSourceBase* underlying_source, + size_t high_water_mark, + AllowPerChunkTransferring allow_per_chunk_transferring, + std::unique_ptr<ReadableStreamTransferringOptimizer> optimizer, + ExceptionState& exception_state) { + auto* isolate = script_state->GetIsolate(); + + auto strategy = CreateTrivialQueuingStrategy(isolate, high_water_mark); + + v8::Local<v8::Value> underlying_source_v8 = + ToV8(underlying_source, script_state); + + InitInternal(script_state, ScriptValue(isolate, underlying_source_v8), + strategy, true, exception_state); + + allow_per_chunk_transferring_ = allow_per_chunk_transferring; + transferring_optimizer_ = std::move(optimizer); +} + ReadableStream* ReadableStream::Create(ScriptState* script_state, StreamStartAlgorithm* start_algorithm, StreamAlgorithm* pull_algorithm,
diff --git a/third_party/blink/renderer/core/streams/readable_stream.h b/third_party/blink/renderer/core/streams/readable_stream.h index c04011bb..777df67 100644 --- a/third_party/blink/renderer/core/streams/readable_stream.h +++ b/third_party/blink/renderer/core/streams/readable_stream.h
@@ -116,6 +116,16 @@ ~ReadableStream() override; + // See CreateWithCountQueueingStrategy() comment above for how to use + // `allow_per_chunk_transferring`. + void InitWithCountQueueingStrategy( + ScriptState*, + UnderlyingSourceBase*, + size_t high_water_mark, + AllowPerChunkTransferring allow_per_chunk_transferring, + std::unique_ptr<ReadableStreamTransferringOptimizer>, + ExceptionState&); + // https://streams.spec.whatwg.org/#rs-constructor bool locked() const;
diff --git a/third_party/blink/renderer/core/style/computed_style.h b/third_party/blink/renderer/core/style/computed_style.h index e137aa81..d9e8564a 100644 --- a/third_party/blink/renderer/core/style/computed_style.h +++ b/third_party/blink/renderer/core/style/computed_style.h
@@ -2040,14 +2040,34 @@ } // Contain utility functions. + // + // Containment can be enabled from a variety of sources, not just the + // 'contain' property itself. The return values represent whether or not + // we should enable containment of a given type, taking those different + // sources into account. + // + // Note that even with a return value of |true|, containment may still not + // be applied if the layout object is ineligible for the given containment + // type. See |LayoutObject::IsEligibleForSizeContainment| and similar + // functions. + bool ContainsPaint() const { return Contain() & kContainsPaint; } - bool ContainsStyle() const { return Contain() & kContainsStyle; } - bool ContainsLayout() const { return Contain() & kContainsLayout; } - bool ContainsSize() const { - return (Contain() & kContainsSize) == kContainsSize; + bool ContainsStyle() const { + return (Contain() & kContainsStyle) || IsInlineOrBlockSizeContainer(); } - bool ContainsInlineSize() const { return Contain() & kContainsInlineSize; } - bool ContainsBlockSize() const { return Contain() & kContainsBlockSize; } + bool ContainsLayout() const { + return (Contain() & kContainsLayout) || IsInlineOrBlockSizeContainer(); + } + bool ContainsSize() const { + return ((Contain() & kContainsSize) == kContainsSize) || + IsInlineAndBlockSizeContainer(); + } + bool ContainsInlineSize() const { + return (Contain() & kContainsInlineSize) || IsInlineSizeContainer(); + } + bool ContainsBlockSize() const { + return (Contain() & kContainsBlockSize) || IsBlockSizeContainer(); + } // Display utility functions. bool IsDisplayReplacedType() const { @@ -2647,6 +2667,21 @@ EFloat Floating() const { return FloatingInternal(); } EResize Resize() const { return ResizeInternal(); } + bool IsInlineSizeContainer() const { + return ContainerType() & kContainerTypeInlineSize; + } + bool IsBlockSizeContainer() const { + return ContainerType() & kContainerTypeBlockSize; + } + bool IsInlineOrBlockSizeContainer() const { + return ContainerType() & + (kContainerTypeInlineSize | kContainerTypeBlockSize); + } + bool IsInlineAndBlockSizeContainer() const { + const unsigned both = (kContainerTypeInlineSize | kContainerTypeBlockSize); + return (ContainerType() & both) == both; + } + void SetInternalVisitedColor(const StyleColor& v) { SetInternalVisitedColorInternal(v); }
diff --git a/third_party/blink/renderer/core/style/computed_style_constants.h b/third_party/blink/renderer/core/style/computed_style_constants.h index 02ca08c..96480e2 100644 --- a/third_party/blink/renderer/core/style/computed_style_constants.h +++ b/third_party/blink/renderer/core/style/computed_style_constants.h
@@ -204,6 +204,19 @@ return a = a | b; } +static const size_t kContainerTypeBits = 2; +enum EContainerType { + kContainerTypeNone = 0x0, + kContainerTypeInlineSize = 0x1, + kContainerTypeBlockSize = 0x2, +}; +inline EContainerType operator|(EContainerType a, EContainerType b) { + return EContainerType(int(a) | int(b)); +} +inline EContainerType& operator|=(EContainerType& a, EContainerType b) { + return a = a | b; +} + static const size_t kTextUnderlinePositionBits = 4; enum TextUnderlinePosition { kTextUnderlinePositionAuto = 0x0,
diff --git a/third_party/blink/renderer/modules/media_controls/resources/mediaControls.css b/third_party/blink/renderer/modules/media_controls/resources/mediaControls.css index e0782ff..f33684d 100644 --- a/third_party/blink/renderer/modules/media_controls/resources/mediaControls.css +++ b/third_party/blink/renderer/modules/media_controls/resources/mediaControls.css
@@ -1330,24 +1330,22 @@ video::-internal-media-controls-text-track-list-kind-captions { -webkit-appearance: none; background-image: -internal-light-dark(-webkit-image-set(url(ic_closed_caption.svg) 1x), -webkit-image-set(url(ic_closed_caption_white.svg) 1x)); - background-size: 32px; + background-size: 18px; background-repeat: no-repeat; background-position: center center; - height: 20px; - width: 20px; - margin-left: 10px; + height: 18px; + width: 18px; vertical-align: middle; } video::-internal-media-controls-text-track-list-kind-subtitles { -webkit-appearance: none; background-image: -internal-light-dark(-webkit-image-set(url(ic_subtitles.svg) 1x), -webkit-image-set(url(ic_subtitles_white.svg) 1x)); - background-size: 32px; + background-size: 18px; background-repeat: no-repeat; background-position: center center; - height: 20px; - width: 20px; - margin-left: 10px; + height: 18px; + width: 18px; vertical-align: middle; }
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_image_copy_external_image.idl b/third_party/blink/renderer/modules/webgpu/gpu_image_copy_external_image.idl new file mode 100644 index 0000000..6d9b80f --- /dev/null +++ b/third_party/blink/renderer/modules/webgpu/gpu_image_copy_external_image.idl
@@ -0,0 +1,11 @@ +// Copyright 2021 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. + + +// https://gpuweb.github.io/gpuweb/ + +dictionary GPUImageCopyExternalImage { + required (ImageBitmap or HTMLCanvasElement or OffscreenCanvas) source; + GPUOrigin2D origin = {}; +};
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_queue.cc b/third_party/blink/renderer/modules/webgpu/gpu_queue.cc index 6c47d3a..a7c4e670 100644 --- a/third_party/blink/renderer/modules/webgpu/gpu_queue.cc +++ b/third_party/blink/renderer/modules/webgpu/gpu_queue.cc
@@ -10,6 +10,7 @@ #include "gpu/command_buffer/common/shared_image_usage.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_gpu_command_buffer_descriptor.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_external_image.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_image_bitmap.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_gpu_image_copy_texture.h" #include "third_party/blink/renderer/core/dom/dom_exception.h" @@ -66,17 +67,16 @@ return dawn_origin; } -bool IsValidCopyIB2TDestinationFormat(WGPUTextureFormat dawn_texture_format) { +bool IsValidExternalImageDestinationFormat( + WGPUTextureFormat dawn_texture_format) { switch (dawn_texture_format) { + // Not support float target format due to unclear "srgb" definition for now. case WGPUTextureFormat_RGBA8Unorm: case WGPUTextureFormat_RGBA8UnormSrgb: case WGPUTextureFormat_BGRA8Unorm: case WGPUTextureFormat_BGRA8UnormSrgb: case WGPUTextureFormat_RGB10A2Unorm: - case WGPUTextureFormat_RGBA16Float: - case WGPUTextureFormat_RGBA32Float: case WGPUTextureFormat_RG8Unorm: - case WGPUTextureFormat_RG16Float: return true; default: return false; @@ -94,7 +94,7 @@ // This function should be called after |IsValidCopyEI2TDestinationFormat|. // Use DCHECK to guard this assumption. - DCHECK(IsValidCopyIB2TDestinationFormat(dst_texture_format)); + DCHECK(IsValidExternalImageDestinationFormat(dst_texture_format)); // CopyTextureForBrowser() supports neither RGBA8UnormSrgb nor BGRA8UnormSrgb // as dst texture format. @@ -113,6 +113,72 @@ dest_texture->Format()); } +scoped_refptr<Image> GetImageFromExternalImage( + const ImageBitmapOrHTMLCanvasElementOrOffscreenCanvas& external_image, + ExceptionState& exception_state) { + CanvasImageSource* source = nullptr; + if (external_image.IsImageBitmap()) { + source = external_image.GetAsImageBitmap(); + } else { + CanvasRenderingContextHost* canvas = nullptr; + if (external_image.IsHTMLCanvasElement()) { + canvas = external_image.GetAsHTMLCanvasElement(); + } else if (external_image.IsOffscreenCanvas()) { + canvas = external_image.GetAsOffscreenCanvas(); + } else { + NOTREACHED(); + return nullptr; + } + + // The rendering context is 2d or webgl/webgl2. + if (!(canvas->Is3d() || canvas->IsRenderingContext2D())) { + exception_state.ThrowDOMException( + DOMExceptionCode::kOperationError, + "CopyExternalImageToTexture doesn't support canvas withoug 2d, webgl " + "or webgl2 conext"); + return nullptr; + } + } + + // Neutered external image. + if (source->IsNeutered()) { + exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, + "External Image has been detached."); + return nullptr; + } + + // HTMLCanvasElement and OffscreenCanvas won't care image orientation. But for + // ImageBitmap, use kRespectImageOrientation will make ElementSize() behave + // as Size(). + FloatSize image_size = source->ElementSize( + FloatSize(), // It will be ignored and won't affect size. + kRespectImageOrientation); + + // Canvas element contains cross-origin data and may not be loaded + if (source->WouldTaintOrigin()) { + exception_state.ThrowSecurityError( + "The external image is tainted by cross-origin data."); + return nullptr; + } + + // TODO(crbug.com/1197369): Ensure kUnpremultiplyAlpha impl will also make + // image live on GPU if possible. + // Use kDontChangeAlpha here to bypass the alpha type conversion here. + // Left the alpha op to CopyTextureForBrowser() and CopyContentFromCPU(). + // This will help combine more transforms (e.g. flipY, color-space) + // into a single blit. + SourceImageStatus source_image_status = kInvalidSourceImageStatus; + auto image = source->GetSourceImageForCanvas(&source_image_status, image_size, + kDontChangeAlpha); + if (source_image_status != kNormalSourceImageStatus) { + // Canvas back resource is broken, zero size, incomplete or invalid. + // but developer can do nothing. Return nullptr and issue an noop. + return nullptr; + } + + return image; +} + } // anonymous namespace GPUQueue::GPUQueue(GPUDevice* device, WGPUQueue queue) @@ -304,11 +370,128 @@ return; } -// TODO(shaobo.yan@intel.com): Implement this function +void GPUQueue::copyExternalImageToTexture(GPUImageCopyExternalImage* copyImage, + GPUImageCopyTexture* destination, + const V8GPUExtent3D* copy_size, + ExceptionState& exception_state) { + scoped_refptr<Image> image = + GetImageFromExternalImage(copyImage->source(), exception_state); + + scoped_refptr<StaticBitmapImage> static_bitmap_image = + DynamicTo<StaticBitmapImage>(image.get()); + if (!static_bitmap_image) { + device_->AddConsoleWarning( + "CopyExternalImageToTexture(): Browser fails extracting valid resource" + "from external image. This API call will return early."); + return; + } + + // TODO(crbug.com/1197369): Extract alpha info and config the following + // CopyContentFromCPU() and CopyContentFromGPU(). + + WGPUExtent3D dawn_copy_size = AsDawnType(copy_size, device_); + + // Extract source origin + WGPUOrigin3D origin_in_external_image = + GPUOrigin2DToWGPUOrigin3D(&(copyImage->origin())); + + // Validate origin value + const bool copyRectOutOfBounds = + static_cast<uint32_t>(static_bitmap_image->width()) < + origin_in_external_image.x || + static_cast<uint32_t>(static_bitmap_image->height()) < + origin_in_external_image.y || + static_cast<uint32_t>(static_bitmap_image->width()) - + origin_in_external_image.x < + dawn_copy_size.width || + static_cast<uint32_t>(static_bitmap_image->height()) - + origin_in_external_image.y < + dawn_copy_size.height; + + if (copyRectOutOfBounds) { + exception_state.ThrowDOMException( + DOMExceptionCode::kOperationError, + "Copy rect is out of bounds of external image"); + return; + } + + // Check copy depth. + // the validation rule is origin.z + copy_size.depth <= 1. + // Since origin in external image is 2D Origin(z always equals to 0), + // checks copy size here only. + if (dawn_copy_size.depthOrArrayLayers > 1) { + exception_state.ThrowDOMException( + DOMExceptionCode::kOperationError, + "Copy depth is out of bounds of external image."); + return; + } + + WGPUTextureCopyView dawn_destination = AsDawnType(destination, device_); + + if (!IsValidExternalImageDestinationFormat( + destination->texture()->Format())) { + GetProcs().deviceInjectError(device_->GetHandle(), WGPUErrorType_Validation, + "Invalid destination gpu texture format."); + return; + } + + WGPUTextureUsage dst_texture_usage = destination->texture()->Usage(); + + if ((dst_texture_usage & WGPUTextureUsage_RenderAttachment) != + WGPUTextureUsage_RenderAttachment || + (dst_texture_usage & WGPUTextureUsage_CopyDst) != + WGPUTextureUsage_CopyDst) { + GetProcs().deviceInjectError( + device_->GetHandle(), WGPUErrorType_Validation, + "Destination texture needs to have CopyDst and RenderAttachment " + "usage."); + return; + } + + // Issue the noop copy to continue validation to destination textures + const bool isNoopCopy = dawn_copy_size.width == 0 || + dawn_copy_size.height == 0 || + dawn_copy_size.depthOrArrayLayers == 0; + + if (isNoopCopy) { + device_->AddConsoleWarning( + "CopyExternalImageToTexture(): It is a noop copy" + "({width|height|depthOrArrayLayers} equals to 0)."); + } + + // Try GPU path first and delegate noop copy to CPU path. + if (static_bitmap_image->IsTextureBacked() && + !isNoopCopy) { // Try GPU uploading path. + if (CanUploadThroughGPU(static_bitmap_image.get(), + destination->texture())) { + if (CopyContentFromGPU(static_bitmap_image.get(), + origin_in_external_image, dawn_copy_size, + dawn_destination)) { + return; + } + } + // GPU path failed, fallback to CPU path + static_bitmap_image = static_bitmap_image->MakeUnaccelerated(); + } + // CPU path is the fallback path and should always work. + if (!CopyContentFromCPU(static_bitmap_image.get(), origin_in_external_image, + dawn_copy_size, dawn_destination, + destination->texture()->Format())) { + exception_state.ThrowTypeError( + "Failed to copy content from external image."); + return; + } +} + void GPUQueue::copyImageBitmapToTexture(GPUImageCopyImageBitmap* source, GPUImageCopyTexture* destination, const V8GPUExtent3D* copy_size, ExceptionState& exception_state) { + device_->AddConsoleWarning( + "The copyImageBitmapToTexture has been deprecated in favor of the " + "copyExternalImageToTexture" + "and will soon be removed."); + if (!source->imageBitmap()) { exception_state.ThrowTypeError("No valid imageBitmap"); return; @@ -321,75 +504,15 @@ return; } - scoped_refptr<StaticBitmapImage> image = source->imageBitmap()->BitmapImage(); + GPUImageCopyExternalImage imageCopyExternalImage; + imageCopyExternalImage.setSource( + ImageBitmapOrHTMLCanvasElementOrOffscreenCanvas::FromImageBitmap( + source->imageBitmap())); + imageCopyExternalImage.setOrigin(source->origin()); - - // TODO(shaobo.yan@intel.com) : Check that the destination GPUTexture has an - // appropriate format. Now only support texture format exactly the same. The - // compatible formats need to be defined in WebGPU spec. - - WGPUExtent3D dawn_copy_size = AsDawnType(copy_size, device_); - - // Extract imageBitmap attributes - WGPUOrigin3D origin_in_image_bitmap = - GPUOrigin2DToWGPUOrigin3D(&(source->origin())); - - // Validate copy depth - if (dawn_copy_size.depthOrArrayLayers > 1) { - GetProcs().deviceInjectError(device_->GetHandle(), WGPUErrorType_Validation, - "Copy depth is out of bounds of imageBitmap."); - return; - } - - // Validate origin value - if (static_cast<uint32_t>(image->width()) < origin_in_image_bitmap.x || - static_cast<uint32_t>(image->height()) < origin_in_image_bitmap.y) { - GetProcs().deviceInjectError( - device_->GetHandle(), WGPUErrorType_Validation, - "Copy origin is out of bounds of imageBitmap."); - return; - } - - // Validate the copy rect is inside the imageBitmap - if (image->width() - origin_in_image_bitmap.x < dawn_copy_size.width || - image->height() - origin_in_image_bitmap.y < dawn_copy_size.height) { - GetProcs().deviceInjectError(device_->GetHandle(), WGPUErrorType_Validation, - "Copy rect is out of bounds of imageBitmap."); - return; - } - - WGPUTextureCopyView dawn_destination = AsDawnType(destination, device_); - - if (!IsValidCopyIB2TDestinationFormat(destination->texture()->Format())) { - return exception_state.ThrowTypeError("Invalid gpu texture format."); - return; - } - - bool isNoopCopy = dawn_copy_size.width == 0 || dawn_copy_size.height == 0 || - dawn_copy_size.depthOrArrayLayers == 0; - - // Try GPU path first and delegate noop copy to CPU path. - // The users of imageBitmap always have enough information about the - // color space (in the future the WICG proposal 'CanvasColorSpaceProposal' - // will bring more enhancements), so it is always acceptable to issue a - // passthrough copy here. - if (image->IsTextureBacked() && !isNoopCopy) { // Try GPU uploading path. - if (CanUploadThroughGPU(image.get(), destination->texture())) { - if (CopyContentFromGPU(image.get(), origin_in_image_bitmap, - dawn_copy_size, dawn_destination)) { - return; - } - } - // GPU path failed, fallback to CPU path - image = image->MakeUnaccelerated(); - } - // CPU path is the fallback path and should always work. - if (!CopyContentFromCPU(image.get(), origin_in_image_bitmap, dawn_copy_size, - dawn_destination, destination->texture()->Format())) { - exception_state.ThrowTypeError("Failed to copy content from imageBitmap."); - return; - } -} + this->copyExternalImageToTexture(&imageCopyExternalImage, destination, + copy_size, exception_state); +} // namespace blink bool GPUQueue::CopyContentFromCPU(StaticBitmapImage* image, const WGPUOrigin3D& origin,
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_queue.h b/third_party/blink/renderer/modules/webgpu/gpu_queue.h index 4ec5b9cf..c19cff5 100644 --- a/third_party/blink/renderer/modules/webgpu/gpu_queue.h +++ b/third_party/blink/renderer/modules/webgpu/gpu_queue.h
@@ -18,6 +18,7 @@ class GPUBuffer; class GPUCommandBuffer; class GPUImageCopyImageBitmap; +class GPUImageCopyExternalImage; class GPUImageCopyTexture; class GPUImageDataLayout; class ScriptPromiseResolver; @@ -65,6 +66,10 @@ GPUImageDataLayout* data_layout, const V8GPUExtent3D* write_size, ExceptionState& exception_state); + void copyExternalImageToTexture(GPUImageCopyExternalImage* copyImage, + GPUImageCopyTexture* destination, + const V8GPUExtent3D* copySize, + ExceptionState& exception_state); void copyImageBitmapToTexture(GPUImageCopyImageBitmap* source, GPUImageCopyTexture* destination, const V8GPUExtent3D* copy_size,
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_queue.idl b/third_party/blink/renderer/modules/webgpu/gpu_queue.idl index e7fd8719..b024bdf 100644 --- a/third_party/blink/renderer/modules/webgpu/gpu_queue.idl +++ b/third_party/blink/renderer/modules/webgpu/gpu_queue.idl
@@ -37,10 +37,16 @@ ArrayBuffer data, GPUImageDataLayout dataLayout, GPUExtent3D size); - + + // Deprecated [RaisesException] void copyImageBitmapToTexture( GPUImageCopyImageBitmap source, GPUImageCopyTexture destination, GPUExtent3D copySize); + + [RaisesException] void copyExternalImageToTexture( + GPUImageCopyExternalImage source, + GPUImageCopyTexture destination, + GPUExtent3D copySize); }; GPUQueue includes GPUObjectBase;
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.cc b/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.cc index 7054b42b..580e1cd 100644 --- a/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.cc +++ b/third_party/blink/renderer/modules/webgpu/gpu_swap_chain.cc
@@ -146,8 +146,8 @@ WGPUTexture dawn_client_texture = swap_buffers_->GetNewTexture(context_->CanvasSize()); DCHECK(dawn_client_texture); - texture_ = - MakeGarbageCollected<GPUTexture>(device_, dawn_client_texture, format_); + texture_ = MakeGarbageCollected<GPUTexture>(device_, dawn_client_texture, + format_, usage_); return texture_; }
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_texture.cc b/third_party/blink/renderer/modules/webgpu/gpu_texture.cc index c521922..f5cb122 100644 --- a/third_party/blink/renderer/modules/webgpu/gpu_texture.cc +++ b/third_party/blink/renderer/modules/webgpu/gpu_texture.cc
@@ -111,7 +111,7 @@ GPUTexture* texture = MakeGarbageCollected<GPUTexture>( device, device->GetProcs().deviceCreateTexture(device->GetHandle(), &dawn_desc), - dawn_desc.format); + dawn_desc.format, static_cast<WGPUTextureUsage>(dawn_desc.usage)); texture->setLabel(webgpu_desc->label()); return texture; } @@ -205,7 +205,7 @@ DCHECK(mailbox_texture->GetTexture() != nullptr); - return MakeGarbageCollected<GPUTexture>(device, format, + return MakeGarbageCollected<GPUTexture>(device, format, usage, std::move(mailbox_texture)); } @@ -300,20 +300,25 @@ std::move(recyclable_canvas_resource)); DCHECK(mailbox_texture->GetTexture()); - return MakeGarbageCollected<GPUTexture>(device, format, + return MakeGarbageCollected<GPUTexture>(device, format, usage, std::move(mailbox_texture)); } GPUTexture::GPUTexture(GPUDevice* device, WGPUTexture texture, - WGPUTextureFormat format) - : DawnObject<WGPUTexture>(device, texture), format_(format) {} + WGPUTextureFormat format, + WGPUTextureUsage usage) + : DawnObject<WGPUTexture>(device, texture), + format_(format), + usage_(usage) {} GPUTexture::GPUTexture(GPUDevice* device, WGPUTextureFormat format, + WGPUTextureUsage usage, scoped_refptr<WebGPUMailboxTexture> mailbox_texture) : DawnObject<WGPUTexture>(device, mailbox_texture->GetTexture()), format_(format), + usage_(usage), mailbox_texture_(std::move(mailbox_texture)) {} GPUTextureView* GPUTexture::createView(
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_texture.h b/third_party/blink/renderer/modules/webgpu/gpu_texture.h index e903a1e3..b6bb788e 100644 --- a/third_party/blink/renderer/modules/webgpu/gpu_texture.h +++ b/third_party/blink/renderer/modules/webgpu/gpu_texture.h
@@ -35,9 +35,13 @@ WGPUTextureUsage usage, ExceptionState& exception_state); - GPUTexture(GPUDevice* device, WGPUTexture texture, WGPUTextureFormat format); + GPUTexture(GPUDevice* device, + WGPUTexture texture, + WGPUTextureFormat format, + WGPUTextureUsage usage); GPUTexture(GPUDevice* device, WGPUTextureFormat format, + WGPUTextureUsage usage, scoped_refptr<WebGPUMailboxTexture> mailbox_texture); // gpu_texture.idl @@ -45,9 +49,11 @@ void destroy(); WGPUTextureFormat Format() { return format_; } + WGPUTextureUsage Usage() { return usage_; } private: WGPUTextureFormat format_; + WGPUTextureUsage usage_; scoped_refptr<WebGPUMailboxTexture> mailbox_texture_; DISALLOW_COPY_AND_ASSIGN(GPUTexture); };
diff --git a/third_party/blink/renderer/modules/webgpu/idls.gni b/third_party/blink/renderer/modules/webgpu/idls.gni index 28edec8..72aff46 100644 --- a/third_party/blink/renderer/modules/webgpu/idls.gni +++ b/third_party/blink/renderer/modules/webgpu/idls.gni
@@ -64,6 +64,7 @@ "gpu_extent_3d_dict.idl", "gpu_fragment_state.idl", "gpu_image_copy_buffer.idl", + "gpu_image_copy_external_image.idl", "gpu_image_copy_image_bitmap.idl", "gpu_image_copy_texture.idl", "gpu_image_data_layout.idl",
diff --git a/third_party/blink/renderer/modules/webtransport/bidirectional_stream.cc b/third_party/blink/renderer/modules/webtransport/bidirectional_stream.cc index 54c9d4e..7886200 100644 --- a/third_party/blink/renderer/modules/webtransport/bidirectional_stream.cc +++ b/third_party/blink/renderer/modules/webtransport/bidirectional_stream.cc
@@ -38,7 +38,7 @@ if (exception_state.HadException()) return; - incoming_stream_->Init(); + incoming_stream_->Init(exception_state); } void BidirectionalStream::OnIncomingStreamClosed(bool fin_received) {
diff --git a/third_party/blink/renderer/modules/webtransport/incoming_stream.cc b/third_party/blink/renderer/modules/webtransport/incoming_stream.cc index d29f9170..3c77309 100644 --- a/third_party/blink/renderer/modules/webtransport/incoming_stream.cc +++ b/third_party/blink/renderer/modules/webtransport/incoming_stream.cc
@@ -17,6 +17,7 @@ #include "third_party/blink/renderer/core/streams/readable_stream.h" #include "third_party/blink/renderer/core/streams/readable_stream_default_controller_with_script_scope.h" #include "third_party/blink/renderer/core/streams/readable_stream_generic_reader.h" +#include "third_party/blink/renderer/core/streams/readable_stream_transferring_optimizer.h" #include "third_party/blink/renderer/core/streams/stream_promise_resolver.h" #include "third_party/blink/renderer/core/streams/underlying_source_base.h" #include "third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h" @@ -75,9 +76,15 @@ IncomingStream::~IncomingStream() = default; -void IncomingStream::Init() { +void IncomingStream::Init(ExceptionState& exception_state) { DVLOG(1) << "IncomingStream::Init() this=" << this; + auto* stream = MakeGarbageCollected<ReadableStream>(); + InitWithExistingReadableStream(stream, exception_state); +} +void IncomingStream::InitWithExistingReadableStream( + ReadableStream* stream, + ExceptionState& exception_state) { read_watcher_.Watch(data_pipe_.get(), MOJO_HANDLE_SIGNAL_READABLE, MOJO_TRIGGER_CONDITION_SIGNALS_SATISFIED, WTF::BindRepeating(&IncomingStream::OnHandleReady, @@ -94,9 +101,12 @@ reading_aborted_resolver_ = MakeGarbageCollected<ScriptPromiseResolver>(script_state_); reading_aborted_ = reading_aborted_resolver_->Promise(); - readable_ = ReadableStream::CreateWithCountQueueingStrategy( + stream->InitWithCountQueueingStrategy( script_state_, - MakeGarbageCollected<UnderlyingSource>(script_state_, this), 1); + MakeGarbageCollected<UnderlyingSource>(script_state_, this), 1, + AllowPerChunkTransferring(false), + /*optimizer=*/nullptr, exception_state); + readable_ = stream; } void IncomingStream::OnIncomingStreamClosed(bool fin_received) {
diff --git a/third_party/blink/renderer/modules/webtransport/incoming_stream.h b/third_party/blink/renderer/modules/webtransport/incoming_stream.h index 03342ee1..640f5e5 100644 --- a/third_party/blink/renderer/modules/webtransport/incoming_stream.h +++ b/third_party/blink/renderer/modules/webtransport/incoming_stream.h
@@ -46,8 +46,11 @@ mojo::ScopedDataPipeConsumerHandle); ~IncomingStream(); - // Init() must be called before the stream is used. - void Init(); + // Init() or InitWithExistingReadableStream() must be called before the stream + // is used. + void Init(ExceptionState&); + + void InitWithExistingReadableStream(ReadableStream*, ExceptionState&); // Methods from the IncomingStream IDL: // https://wicg.github.io/web-transport/#incoming-stream
diff --git a/third_party/blink/renderer/modules/webtransport/incoming_stream_test.cc b/third_party/blink/renderer/modules/webtransport/incoming_stream_test.cc index 66dd2673..d3fc759 100644 --- a/third_party/blink/renderer/modules/webtransport/incoming_stream_test.cc +++ b/third_party/blink/renderer/modules/webtransport/incoming_stream_test.cc
@@ -54,7 +54,7 @@ auto* script_state = scope.GetScriptState(); auto* incoming_stream = MakeGarbageCollected<IncomingStream>( script_state, mock_on_abort_.Get(), std::move(data_pipe_consumer_)); - incoming_stream->Init(); + incoming_stream->Init(ASSERT_NO_EXCEPTION); return incoming_stream; }
diff --git a/third_party/blink/renderer/modules/webtransport/receive_stream.cc b/third_party/blink/renderer/modules/webtransport/receive_stream.cc index 169034b..41a210f2 100644 --- a/third_party/blink/renderer/modules/webtransport/receive_stream.cc +++ b/third_party/blink/renderer/modules/webtransport/receive_stream.cc
@@ -40,7 +40,7 @@ void ReceiveStream::Trace(Visitor* visitor) const { visitor->Trace(incoming_stream_); visitor->Trace(web_transport_); - ScriptWrappable::Trace(visitor); + ReadableStream::Trace(visitor); WebTransportStream::Trace(visitor); }
diff --git a/third_party/blink/renderer/modules/webtransport/receive_stream.h b/third_party/blink/renderer/modules/webtransport/receive_stream.h index 2413740..1f2e9d7 100644 --- a/third_party/blink/renderer/modules/webtransport/receive_stream.h +++ b/third_party/blink/renderer/modules/webtransport/receive_stream.h
@@ -8,6 +8,7 @@ #include <stdint.h> #include "mojo/public/cpp/system/data_pipe.h" +#include "third_party/blink/renderer/core/streams/readable_stream.h" #include "third_party/blink/renderer/modules/modules_export.h" #include "third_party/blink/renderer/modules/webtransport/incoming_stream.h" #include "third_party/blink/renderer/modules/webtransport/web_transport_stream.h" @@ -16,13 +17,14 @@ namespace blink { +class ExceptionState; class ScriptState; class WebTransport; // Implementation of ReceiveStream from the standard: // https://wicg.github.io/web-transport/#receive-stream. -class MODULES_EXPORT ReceiveStream final : public ScriptWrappable, +class MODULES_EXPORT ReceiveStream final : public ReadableStream, public WebTransportStream { DEFINE_WRAPPERTYPEINFO(); @@ -34,11 +36,13 @@ uint32_t stream_id, mojo::ScopedDataPipeConsumerHandle); - void Init() { incoming_stream_->Init(); } + void Init(ExceptionState& exception_state) { + incoming_stream_->InitWithExistingReadableStream(this, exception_state); + } // Implementation of receive_stream.idl. As noted in the IDL file, these // properties are implemented on IncomingStream in the standard. - ReadableStream* readable() const { return incoming_stream_->Readable(); } + ReceiveStream* readable() { return this; } ScriptPromise readingAborted() const { return incoming_stream_->ReadingAborted();
diff --git a/third_party/blink/renderer/modules/webtransport/receive_stream.idl b/third_party/blink/renderer/modules/webtransport/receive_stream.idl index d37953c..1b22e70 100644 --- a/third_party/blink/renderer/modules/webtransport/receive_stream.idl +++ b/third_party/blink/renderer/modules/webtransport/receive_stream.idl
@@ -6,11 +6,10 @@ [ Exposed=(Window,Worker), RuntimeEnabled=WebTransport ] -interface ReceiveStream { - // IncomingStream interface. In the standard this is a mixin, but we can't use - // a mixin in the implementation because BidirectionalStream would end up - // inheriting from two mixins, causing diamond inheritance. - readonly attribute ReadableStream readable; +interface ReceiveStream : ReadableStream { + // Deprecated attributes for backwards-compatibility. + // TODO(ricea): Remove these when the origin trial ends. + readonly attribute ReceiveStream readable; readonly attribute Promise<StreamAbortInfo> readingAborted; void abortReading(optional StreamAbortInfo abortInfo = {}); };
diff --git a/third_party/blink/renderer/modules/webtransport/web_transport.cc b/third_party/blink/renderer/modules/webtransport/web_transport.cc index 6c83f91..93d6742 100644 --- a/third_party/blink/renderer/modules/webtransport/web_transport.cc +++ b/third_party/blink/renderer/modules/webtransport/web_transport.cc
@@ -307,7 +307,19 @@ ScriptState::Scope scope(script_state_); auto* receive_stream = MakeGarbageCollected<ReceiveStream>( script_state_, web_transport_, stream_id, std::move(readable)); - receive_stream->Init(); + auto* isolate = script_state_->GetIsolate(); + ExceptionState exception_state( + isolate, ExceptionState::kConstructionContext, "ReceiveStream"); + v8::MicrotasksScope microtasks_scope( + isolate, v8::MicrotasksScope::kDoNotRunMicrotasks); + receive_stream->Init(exception_state); + + if (exception_state.HadException()) { + // Abandon the stream. + exception_state.ClearException(); + return; + } + // 0xfffffffe and 0xffffffff are reserved values in stream_map_. CHECK_LT(stream_id, 0xfffffffe); web_transport_->stream_map_.insert(stream_id, receive_stream);
diff --git a/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc b/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc index 4dcbf2d..3a509ba 100644 --- a/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc +++ b/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc
@@ -313,6 +313,7 @@ } namespace { + cc::Layer* ForeignLayer(const PaintChunk& chunk, const PaintArtifact& artifact) { if (chunk.size() != 1) @@ -1526,6 +1527,7 @@ } namespace { + // This class iterates forward over the PaintChunks in a vector of // |PreCompositedLayerInfo|s. class PreCompositedLayerPaintChunkFinder { @@ -1570,6 +1572,7 @@ Vector<PreCompositedLayerInfo>::iterator pre_composited_layer_it_; PaintChunkSubset::Iterator subset_iterator_; }; + } // namespace void PaintArtifactCompositor::UpdateRepaintedLayers( @@ -1614,13 +1617,12 @@ } } else { // These are CompositeAfterPaint (or CompositeSVG) layers and we need to - // both update the cc::Layer properties and issue raster invalidations - // (both handled in |UpdateRepaintedLayer|). To update, we need the - // previous PaintChunks (from the PendingLayer) and the matching repainted - // PaintChunks (from |pre_composited_layers|). Because repaint-only - // updates cannot add, remove, or re-order PaintChunks, we use - // |repainted_chunk_finder| to search forward in |pre_composited_layers| - // for the matching paint chunk which ensures this is O(chunks). + // both copy the repainted paint chunks and update the cc::Layer. To do + // this, we need the previous PaintChunks (from the PendingLayer) and the + // matching repainted PaintChunks (from |pre_composited_layers|). Because + // repaint-only updates cannot add, remove, or re-order PaintChunks, + // |repainted_chunk_finder| searches forward in |pre_composited_layers| + // for the matching paint chunk, ensuring this function is O(chunks). const PaintChunk& first = *pending_layer_it->chunks.begin(); bool did_advance = repainted_chunk_finder.AdvanceToMatching(first); @@ -1629,11 +1631,21 @@ // instead of a repaint update. CHECK(did_advance); - // Because chunks were not added, removed, or re-ordered, we can simply - // swap in the repainted PaintArtifact and the chunk indices will still be - // valid. - pending_layer_it->chunks.SetPaintArtifact( - &repainted_chunk_finder.current_artifact()); + // Essentially replace the paint chunks of the pending layer with the + // repainted chunks in |repainted_artifact|. The pending layer's paint + // chunks (a |PaintChunkSubset|) actually store indices to |PaintChunk|s + // in a |PaintArtifact|. In repaint updates, chunks are not added, + // removed, or re-ordered, so we can simply swap in a repainted + // |PaintArtifact| instead of copying |PaintChunk|s individually. + const PaintArtifact& previous_artifact = + pending_layer_it->chunks.GetPaintArtifact(); + const PaintArtifact& repainted_artifact = + repainted_chunk_finder.current_artifact(); + DCHECK_EQ(previous_artifact.PaintChunks().size(), + repainted_artifact.PaintChunks().size()); + pending_layer_it->chunks.SetPaintArtifact(&repainted_artifact); + + // Update the cc::Layer associated with the pending layer. UpdateRepaintedLayer(*pending_layer_it, layer_selection); } }
diff --git a/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h b/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h index c55163b..18a7cef 100644 --- a/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h +++ b/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h
@@ -337,6 +337,9 @@ cc::LayerSelection& layer_selection, PropertyTreeManager* = nullptr); + // Updates the cc::Layer associated with a |pending_layer| following a paint. + // This includes both raster invalidation and updating the cc::Layer + // properties (bounds, background_color, etc). void UpdateRepaintedLayer(PendingLayer& pending_layer, cc::LayerSelection& layer_selection);
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index f3c9aba6..7acd3ba 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -4072,8 +4072,6 @@ crbug.com/1179585 virtual/layout_ng_svg_text/paint/invalidation/svg/use-detach.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/animations/animate-text-nested-transforms.html [ Timeout ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/smallFonts.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textAnchor2.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textAnchor3.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textDecoration.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textDecoration2.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textEffect.svg [ Failure ] @@ -4082,7 +4080,6 @@ crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textFeatures.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textLayout2.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textProperties.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/clip-path/clip-path-text.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/clip-path/clip-path-text-and-shape.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/clip-path/clip-path-text-and-stroke.svg [ Failure ]
diff --git a/third_party/blink/web_tests/WebGPUExpectations b/third_party/blink/web_tests/WebGPUExpectations index 14cab1fc..f31f7d2 100644 --- a/third_party/blink/web_tests/WebGPUExpectations +++ b/third_party/blink/web_tests/WebGPUExpectations
@@ -276,6 +276,10 @@ crbug.com/tint/480 wpt_internal/webgpu/cts.html?q=webgpu:shader,validation,variable_and_const:v_0033:* [ Skip ] crbug.com/tint/481 wpt_internal/webgpu/cts.html?q=webgpu:shader,validation,variable_and_const:v_0038:* [ Skip ] +# Validation rules and supported texture format changed for CopyExternalImageToTexture/CopyImageBitmapToTexture +crbug.com/1197369 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,queue,copyToTexture,ImageBitmap,* [ Skip ] +crbug.com/1197369 wpt_internal/webgpu/cts.html?q=webgpu:web_platform,copyToTexture,ImageBitmap:* [ Skip ] + ### ### Mac (Metal) specific ###
diff --git a/third_party/blink/web_tests/editing/input/edit-context-dom-mutation.html b/third_party/blink/web_tests/editing/input/edit-context-dom-mutation.html index 4e3801d..8c39c44 100644 --- a/third_party/blink/web_tests/editing/input/edit-context-dom-mutation.html +++ b/third_party/blink/web_tests/editing/input/edit-context-dom-mutation.html
@@ -36,12 +36,82 @@ window.getSelection().selectAllChildren(div); eventSender.keyDown(testcase['key'], [testcase['modifier']]); - // There should be no <b> (or <i> or <u>) tag that wraps around the text node. - assert_equals(div.childNodes[0].nodeType, Node.TEXT_NODE); - assert_equals(got_before_input_event, true); + assert_equals(div.childNodes[0].nodeType, Node.TEXT_NODE, "DOM shouldn't be modified, i.e. no extra <b>, <i> or <u>"); + assert_equals(got_before_input_event, true, "The beforeinput event should be fired."); document.body.removeChild(div); - }, "EditContext should disable DOM mutation from " + testcase['command'] + " keyboard shortcuts"); + }, "EditContext should disable DOM mutation from " + testcase['modifier'] + " + " + testcase['key']); + }); + + if (onMacPlatform) { + formatCommands = [{'modifier': 'shiftKey', 'key': 'Delete', 'command': 'deleteByCut'}]; + } else { + formatCommands = [{'modifier': 'shiftKey', 'key': 'Delete', 'command': 'deleteByCut'}, + {'modifier': 'ctrlKey', 'key': 'x', 'command': 'deleteByCut'}]; + } + + formatCommands.forEach( testcase => { + test(function () { + let editContext = new EditContext(); + assert_not_equals(editContext, null); + let div = document.createElement("div"); + document.body.appendChild(div); + let myText = "abc"; + div.innerHTML = myText; + div.editContext = editContext; + div.focus(); + + let got_before_input_event = false; + div.addEventListener("beforeinput", (e) => { + if (e.inputType === testcase['command']) { + got_before_input_event = true; + } + }); + window.getSelection().selectAllChildren(div); + eventSender.keyDown(testcase['key'], [testcase['modifier']]); + assert_equals(div.innerText, myText, "DOM shouldn't be modified"); + assert_equals(got_before_input_event, true, "The beforeinput event should be fired."); + + document.body.removeChild(div); + }, "EditContext should disable DOM mutation from " + testcase['modifier'] + " + " + testcase['key']); + }); + + if (onMacPlatform) { + formatCommands = [{'modifier': 'shiftKey', 'key': 'Insert', 'command': 'insertFromPaste'}]; + } else { + formatCommands = [{'modifier': 'shiftKey', 'key': 'Insert', 'command': 'insertFromPaste'}, + {'modifier': 'ctrlKey', 'key': 'v', 'command': 'insertFromPaste'}]; + } + + formatCommands.forEach( testcase => { + test(function () { + let editContext = new EditContext(); + assert_not_equals(editContext, null); + let div = document.createElement("div"); + document.body.appendChild(div); + let myText = "abc"; + div.innerHTML = myText; + div.editContext = editContext; + div.focus(); + + let got_before_input_event = false; + div.addEventListener("beforeinput", (e) => { + if (e.inputType === testcase['command']) { + got_before_input_event = true; + assert_equals(e.dataTransfer.getData("text"), myText, "The beforeinput event should contain clipboard data"); + } + }); + window.getSelection().selectAllChildren(div); + // copy 'abc'. + eventSender.keyDown('c', ['ctrlKey']); + window.getSelection().collapse(div); + // paste 'abc' at the begining. + eventSender.keyDown(testcase['key'], [testcase['modifier']]); + assert_equals(div.innerText, myText, "DOM shouldn't be modified"); + assert_equals(got_before_input_event, true, "The beforeinput event should be fired."); + + document.body.removeChild(div); + }, "EditContext should disable DOM mutation from " + testcase['modifier'] + " + " + testcase['key']); }); </script> </body>
diff --git a/third_party/blink/web_tests/external/wpt/scroll-animations/source-quirks-mode.html b/third_party/blink/web_tests/external/wpt/scroll-animations/source-quirks-mode.html new file mode 100644 index 0000000..0614509 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/scroll-animations/source-quirks-mode.html
@@ -0,0 +1,36 @@ +<!-- Quirks mode --> +<html> +<head> + <title>ScrollTimeline default source in quirks mode</title> + <link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#dom-scrolltimeline-scrolltimeline"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <style> + /* This is just to make it possible for #body1 to be + "potentially scrollable". + + https://drafts.csswg.org/cssom-view/#potentially-scrollable */ + html { + overflow: hidden; + } + </style> +</head> +<body id=body1></body> +<script> +test(() => { + try { + assert_equals(document.scrollingElement.id, 'body1'); + assert_equals(new ScrollTimeline({}).scrollSource, body1); + + // Make #body1 "potentially scrollable". This causes the scrollingElement + // of the document to become null. + // + // https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement + body1.style = 'overflow:scroll'; + assert_equals(new ScrollTimeline({}).scrollSource, null); + } finally { + body1.style = ''; + } +}, 'Style of <body> is reflected in scrollSource attribute in quirks mode'); +</script> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any-expected.txt b/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any-expected.txt index 42bc8cd6..190265da 100644 --- a/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 69 tests; 45 PASS, 24 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 69 tests; 47 PASS, 22 FAIL, 0 TIMEOUT, 0 NOTRUN. FAIL idl_test setup promise_test: Unhandled rejection with value: object "SyntaxError: Failed to construct 'WebTransport': The URL's scheme must be 'https'. 'quic-transport' is not allowed." PASS idl_test validation PASS WebTransport includes UnidirectionalStreamsTransport: member names are unique @@ -53,10 +53,10 @@ PASS SendStream interface: existence and properties of interface prototype object's @@unscopables property PASS SendStream interface: attribute writingAborted PASS SendStream interface: operation abortWriting(optional StreamAbortInfo) -FAIL ReceiveStream interface: existence and properties of interface object assert_equals: prototype of ReceiveStream is not ReadableStream expected function "function ReadableStream() { [native code] }" but got function "function () { [native code] }" +PASS ReceiveStream interface: existence and properties of interface object PASS ReceiveStream interface object length PASS ReceiveStream interface object name -FAIL ReceiveStream interface: existence and properties of interface prototype object assert_equals: prototype of ReceiveStream.prototype is not ReadableStream.prototype expected object "[object ReadableStream]" but got object "[object Object]" +PASS ReceiveStream interface: existence and properties of interface prototype object PASS ReceiveStream interface: existence and properties of interface prototype object's "constructor" property PASS ReceiveStream interface: existence and properties of interface prototype object's @@unscopables property PASS ReceiveStream interface: attribute readingAborted
diff --git a/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.serviceworker-expected.txt b/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.serviceworker-expected.txt index 42bc8cd6..190265da 100644 --- a/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.serviceworker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.serviceworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 69 tests; 45 PASS, 24 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 69 tests; 47 PASS, 22 FAIL, 0 TIMEOUT, 0 NOTRUN. FAIL idl_test setup promise_test: Unhandled rejection with value: object "SyntaxError: Failed to construct 'WebTransport': The URL's scheme must be 'https'. 'quic-transport' is not allowed." PASS idl_test validation PASS WebTransport includes UnidirectionalStreamsTransport: member names are unique @@ -53,10 +53,10 @@ PASS SendStream interface: existence and properties of interface prototype object's @@unscopables property PASS SendStream interface: attribute writingAborted PASS SendStream interface: operation abortWriting(optional StreamAbortInfo) -FAIL ReceiveStream interface: existence and properties of interface object assert_equals: prototype of ReceiveStream is not ReadableStream expected function "function ReadableStream() { [native code] }" but got function "function () { [native code] }" +PASS ReceiveStream interface: existence and properties of interface object PASS ReceiveStream interface object length PASS ReceiveStream interface object name -FAIL ReceiveStream interface: existence and properties of interface prototype object assert_equals: prototype of ReceiveStream.prototype is not ReadableStream.prototype expected object "[object ReadableStream]" but got object "[object Object]" +PASS ReceiveStream interface: existence and properties of interface prototype object PASS ReceiveStream interface: existence and properties of interface prototype object's "constructor" property PASS ReceiveStream interface: existence and properties of interface prototype object's @@unscopables property PASS ReceiveStream interface: attribute readingAborted
diff --git a/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.sharedworker-expected.txt b/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.sharedworker-expected.txt index 42bc8cd6..190265da 100644 --- a/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.sharedworker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.sharedworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 69 tests; 45 PASS, 24 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 69 tests; 47 PASS, 22 FAIL, 0 TIMEOUT, 0 NOTRUN. FAIL idl_test setup promise_test: Unhandled rejection with value: object "SyntaxError: Failed to construct 'WebTransport': The URL's scheme must be 'https'. 'quic-transport' is not allowed." PASS idl_test validation PASS WebTransport includes UnidirectionalStreamsTransport: member names are unique @@ -53,10 +53,10 @@ PASS SendStream interface: existence and properties of interface prototype object's @@unscopables property PASS SendStream interface: attribute writingAborted PASS SendStream interface: operation abortWriting(optional StreamAbortInfo) -FAIL ReceiveStream interface: existence and properties of interface object assert_equals: prototype of ReceiveStream is not ReadableStream expected function "function ReadableStream() { [native code] }" but got function "function () { [native code] }" +PASS ReceiveStream interface: existence and properties of interface object PASS ReceiveStream interface object length PASS ReceiveStream interface object name -FAIL ReceiveStream interface: existence and properties of interface prototype object assert_equals: prototype of ReceiveStream.prototype is not ReadableStream.prototype expected object "[object ReadableStream]" but got object "[object Object]" +PASS ReceiveStream interface: existence and properties of interface prototype object PASS ReceiveStream interface: existence and properties of interface prototype object's "constructor" property PASS ReceiveStream interface: existence and properties of interface prototype object's @@unscopables property PASS ReceiveStream interface: attribute readingAborted
diff --git a/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.worker-expected.txt index 42bc8cd6..190265da 100644 --- a/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.worker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webtransport/idlharness.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 69 tests; 45 PASS, 24 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 69 tests; 47 PASS, 22 FAIL, 0 TIMEOUT, 0 NOTRUN. FAIL idl_test setup promise_test: Unhandled rejection with value: object "SyntaxError: Failed to construct 'WebTransport': The URL's scheme must be 'https'. 'quic-transport' is not allowed." PASS idl_test validation PASS WebTransport includes UnidirectionalStreamsTransport: member names are unique @@ -53,10 +53,10 @@ PASS SendStream interface: existence and properties of interface prototype object's @@unscopables property PASS SendStream interface: attribute writingAborted PASS SendStream interface: operation abortWriting(optional StreamAbortInfo) -FAIL ReceiveStream interface: existence and properties of interface object assert_equals: prototype of ReceiveStream is not ReadableStream expected function "function ReadableStream() { [native code] }" but got function "function () { [native code] }" +PASS ReceiveStream interface: existence and properties of interface object PASS ReceiveStream interface object length PASS ReceiveStream interface object name -FAIL ReceiveStream interface: existence and properties of interface prototype object assert_equals: prototype of ReceiveStream.prototype is not ReadableStream.prototype expected object "[object ReadableStream]" but got object "[object Object]" +PASS ReceiveStream interface: existence and properties of interface prototype object PASS ReceiveStream interface: existence and properties of interface prototype object's "constructor" property PASS ReceiveStream interface: existence and properties of interface prototype object's @@unscopables property PASS ReceiveStream interface: attribute readingAborted
diff --git a/third_party/blink/web_tests/fast/events/inputevents/inputevent-keyboard.html b/third_party/blink/web_tests/fast/events/inputevents/inputevent-keyboard.html index 0b58787..cec7bc48 100644 --- a/third_party/blink/web_tests/fast/events/inputevents/inputevent-keyboard.html +++ b/third_party/blink/web_tests/fast/events/inputevents/inputevent-keyboard.html
@@ -83,6 +83,20 @@ testKeyDownInputType('ArrowLeft', [], NO_INPUT_EVENT_FIRED); testKeyDownInputType('ArrowLeft', ['shiftKey'], NO_INPUT_EVENT_FIRED); testKeyDownInputType('Home', [], NO_INPUT_EVENT_FIRED); + + // Clipboard + editable.innerHTML = 'abc'; + selection.collapse(editable, 0); + selection.extend(editable, 1); + testKeyDownInputType('Delete', ['shiftKey'], 'deleteByCut'); + testKeyDownInputType('Insert', ['shiftKey'], 'insertFromPaste'); + if (!isMacOS) { + testKeyDownInputType('v', ['ctrlKey', 'shiftKey'], 'insertFromPaste'); + selection.collapse(editable, 0); + selection.extend(editable, 1); + testKeyDownInputType('x', ['ctrlKey'], 'deleteByCut'); + testKeyDownInputType('v', ['ctrlKey'], 'insertFromPaste'); + } }, 'Testing beforeinput inputType'); </script> </body>
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt b/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt index 6690f88..1482d7c 100644 --- a/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt +++ b/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
@@ -1305,7 +1305,7 @@ method constructor method read method releaseLock -interface ReceiveStream +interface ReceiveStream : ReadableStream attribute @@toStringTag getter readable getter readingAborted
diff --git a/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png new file mode 100644 index 0000000..b32a4d7 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/layout_ng_svg_text/svg/batik/text/textAnchor2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/layout_ng_svg_text/svg/batik/text/textAnchor2-expected.png new file mode 100644 index 0000000..b642618 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/layout_ng_svg_text/svg/batik/text/textAnchor2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/layout_ng_svg_text/svg/batik/text/textAnchor3-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/layout_ng_svg_text/svg/batik/text/textAnchor3-expected.png new file mode 100644 index 0000000..0e6fd4c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/layout_ng_svg_text/svg/batik/text/textAnchor3-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png new file mode 100644 index 0000000..1f69b6db --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png b/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png new file mode 100644 index 0000000..8ff13bd --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/batik/text/verticalTextOnPath-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt index 573ca1a..a193532 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt
@@ -1320,7 +1320,7 @@ [Worker] method constructor [Worker] method read [Worker] method releaseLock -[Worker] interface ReceiveStream +[Worker] interface ReceiveStream : ReadableStream [Worker] attribute @@toStringTag [Worker] getter readable [Worker] getter readingAborted
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt index c5cf3d3..440b635 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
@@ -6890,7 +6890,7 @@ method constructor method read method releaseLock -interface ReceiveStream +interface ReceiveStream : ReadableStream attribute @@toStringTag getter readable getter readingAborted
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt index eafa2f51..bedb310 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt
@@ -1194,7 +1194,7 @@ [Worker] method constructor [Worker] method read [Worker] method releaseLock -[Worker] interface ReceiveStream +[Worker] interface ReceiveStream : ReadableStream [Worker] attribute @@toStringTag [Worker] getter readable [Worker] getter readingAborted
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-name-computed.html b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-name-computed.html new file mode 100644 index 0000000..e725ee2 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-name-computed.html
@@ -0,0 +1,24 @@ +<!DOCTYPE html> +<title>Computed values of container-name</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<style> + #outer { container-name: foo; } +</style> +<div id="outer"> + <div id="target"></div> + <div id="target2"></div> +</div> +<script> +test_computed_value('container-name', 'initial', 'none'); +test_computed_value('container-name', 'inherit', 'foo'); +test_computed_value('container-name', 'unset', 'none'); +test_computed_value('container-name', 'foo'); +test_computed_value('container-name', 'FoO'); + +test(() => { + assert_equals(getComputedStyle(outer).containerName, 'foo'); + assert_equals(getComputedStyle(target2).containerName, 'none'); +}, 'container-type is not inherited'); +</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-name-parsing.html b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-name-parsing.html new file mode 100644 index 0000000..82e8391 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-name-parsing.html
@@ -0,0 +1,23 @@ +<!DOCTYPE html> +<title>Parsing of container-name</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<div id="target"></div> +<script> +test_valid_value('container-name', 'initial'); +test_valid_value('container-name', 'inherit'); +test_valid_value('container-name', 'unset'); +test_valid_value('container-name', 'revert'); +test_valid_value('container-name', 'none'); +test_valid_value('container-name', 'foo'); +test_valid_value('container-name', 'BAR'); + +test_invalid_value('container-name', 'none none'); +test_invalid_value('container-name', 'foo bar'); +test_invalid_value('container-name', '"foo"'); +test_invalid_value('container-name', 'foo, bar'); +test_invalid_value('container-name', '#fff'); +test_invalid_value('container-name', '1px'); +test_invalid_value('container-name', 'default'); /* reserved */ +</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-computed.html b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-computed.html new file mode 100644 index 0000000..b9b00b5 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-computed.html
@@ -0,0 +1,26 @@ +<!DOCTYPE html> +<title>Computed values of container-type</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<style> + #outer { container-type: inline-size; } +</style> +<div id="outer"> + <div id="target"></div> + <div id="target2"></div> +</div> +<script> +test_computed_value('container-type', 'initial', 'none'); +test_computed_value('container-type', 'inherit', 'inline-size'); +test_computed_value('container-type', 'unset', 'none'); +test_computed_value('container-type', 'inline-size'); +test_computed_value('container-type', 'block-size'); +test_computed_value('container-type', 'inline-size block-size'); +test_computed_value('container-type', 'block-size inline-size', 'inline-size block-size'); + +test(() => { + assert_equals(getComputedStyle(outer).containerType, 'inline-size'); + assert_equals(getComputedStyle(target2).containerType, 'none'); +}, 'container-type is not inherited'); +</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-containment.html b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-containment.html new file mode 100644 index 0000000..e77abb6 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-containment.html
@@ -0,0 +1,103 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + /* Note: background colors have no impact on the test result. They are + present to make it easier to visually verify that the test + does the right thing. */ + .square { + width: 50px; + height: 50px; + background: tomato; + } + .half { + width: 25px; + height: 50px; + background: red; + } + div > div:nth-of-type(1) { background: skyblue; } + div > div:nth-of-type(2) { background: hotpink; } +</style> + +<div id=test1 class=square> + <div id=float1 class=half style="float:left"></div> + <div id=child1 class=half style="container-type:inline-size"></div> +</div> +<script> + test(() => { + assert_equals(child1.offsetLeft, test1.offsetLeft + float1.offsetWidth); + }, 'container-type:inline-size turns on layout containment'); +</script> + +<hr> + +<div id=test2 class=square> + <div id=float2 class=half style="float:left"></div> + <div id=child2 class=half style="container-type:block-size"></div> +</div> +<script> + test(() => { + assert_equals(child2.offsetLeft, test2.offsetLeft + float2.offsetWidth); + }, 'container-type:block-size turns on layout containment'); +</script> + +<hr> + +<div id=test3 class=square> + <div id=ref3 style="float:left">A</div> + <div id=child3 style="float:left; container-type:inline-size">A</div> +</div> +<script> + test(() => { + assert_equals(child3.offsetWidth, 0); + assert_equals(child3.offsetHeight, ref3.offsetHeight); + }, 'container-type:inline-size turns on inline-size containment'); +</script> + +<hr> + +<div id=test4 class=square> + <div id=ref4>A</div> + <div id=child4 style="container-type:block-size">A</div> +</div> +<script> + test(() => { + assert_equals(child4.offsetHeight, 0); + assert_equals(child4.offsetWidth, ref4.offsetWidth); + }, 'container-type:block-size turns on block-size containment'); +</script> + +<hr> + +<div id=test5 class=square> + <div id=child5 style="float:left; container-type:inline-size block-size">A</div> +</div> +<script> + test(() => { + assert_equals(child5.offsetHeight, 0); + assert_equals(child5.offsetWidth, 0); + }, 'container-type:inline-size block-size turns on full size containment'); +</script> + +<hr> + +<style> + #ref6::before, #child6::before { + content: counter(foo); + } +</style> +<div id=test6 class=square style="counter-set: foo 5"> + <div id=ref6 style="float:left"></div> + <section style="container-type:inline-size"> + <span style="counter-increment: foo 1000;"></span> + </section> + <section style="container-type:block-size"> + <span style="counter-increment: foo 1000;"></span> + </section> + <div id=child6 style="float:left"></div> +</div> +<script> + test(() => { + assert_equals(child6.offsetWidth, ref6.offsetWidth); + }, 'container-type:inline/block-size turns on style containment'); +</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-parsing.html b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-parsing.html new file mode 100644 index 0000000..7221ca4 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-conditional/container-queries/container-type-parsing.html
@@ -0,0 +1,29 @@ +<!DOCTYPE html> +<title>Parsing of container-type</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<div id="target"></div> +<script> +test_valid_value('container-type', 'initial'); +test_valid_value('container-type', 'inherit'); +test_valid_value('container-type', 'unset'); +test_valid_value('container-type', 'revert'); +test_valid_value('container-type', 'none'); +test_valid_value('container-type', 'inline-size'); +test_valid_value('container-type', 'block-size'); +test_valid_value('container-type', 'inline-size block-size'); +test_valid_value('container-type', 'block-size inline-size', 'inline-size block-size'); + +test_invalid_value('container-type', 'none none'); +test_invalid_value('container-type', 'none inline-size'); +test_invalid_value('container-type', 'inline-size none'); +test_invalid_value('container-type', 'inline-size inline-size'); +test_invalid_value('container-type', 'none, none'); +test_invalid_value('container-type', 'foo'); +test_invalid_value('container-type', '"foo"'); +test_invalid_value('container-type', 'foo, bar'); +test_invalid_value('container-type', '#fff'); +test_invalid_value('container-type', '1px'); +test_invalid_value('container-type', 'default'); +</script>
diff --git a/third_party/r8/3pp/patches/0001-Statefull-lambdas-regress-dex-size.patch b/third_party/r8/3pp/patches/0001-Statefull-lambdas-regress-dex-size.patch index 7cf2cd97..b36daa2 100644 --- a/third_party/r8/3pp/patches/0001-Statefull-lambdas-regress-dex-size.patch +++ b/third_party/r8/3pp/patches/0001-Statefull-lambdas-regress-dex-size.patch
@@ -1,7 +1,7 @@ -From 226eb4566b5c7500f91b6e12aeb437d0ce351234 Mon Sep 17 00:00:00 2001 +From 05082848aac245423f24f849756cf2f019e42ce8 Mon Sep 17 00:00:00 2001 From: Andrew Grieve <agrieve@chromium.org> Date: Mon, 1 Feb 2021 15:09:52 -0500 -Subject: [PATCH 1/3] Statefull lambdas regress dex size. +Subject: [PATCH 1/4] Statefull lambdas regress dex size. Bug: b/129997269 ---
diff --git a/third_party/r8/3pp/patches/0002-Allow-access-modification-everywhere.patch b/third_party/r8/3pp/patches/0002-Allow-access-modification-everywhere.patch index 45d0c65..fe68a46 100644 --- a/third_party/r8/3pp/patches/0002-Allow-access-modification-everywhere.patch +++ b/third_party/r8/3pp/patches/0002-Allow-access-modification-everywhere.patch
@@ -1,7 +1,7 @@ -From 990692b69123d5c51730858c63009230daa908a5 Mon Sep 17 00:00:00 2001 +From a9f22ab02ee02a099ede1d76ab25a2dfa125cab8 Mon Sep 17 00:00:00 2001 From: Andrew Grieve <agrieve@chromium.org> Date: Wed, 21 Oct 2020 10:59:42 -0400 -Subject: [PATCH 2/3] Allow access modification everywhere +Subject: [PATCH 2/4] Allow access modification everywhere Chrome does not need need -keep to maintain original visibility. Loosening this constraint allows for better optimization, and is easier @@ -11,10 +11,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/android/tools/r8/shaking/AppInfoWithLiveness.java b/src/main/java/com/android/tools/r8/shaking/AppInfoWithLiveness.java -index 462278685..1fdea12c2 100644 +index a4478d624..f83fb8ced 100644 --- a/src/main/java/com/android/tools/r8/shaking/AppInfoWithLiveness.java +++ b/src/main/java/com/android/tools/r8/shaking/AppInfoWithLiveness.java -@@ -954,7 +954,7 @@ public class AppInfoWithLiveness extends AppInfoWithClassHierarchy +@@ -953,7 +953,7 @@ public class AppInfoWithLiveness extends AppInfoWithClassHierarchy public boolean isAccessModificationAllowed(DexReference reference) { assert options().getProguardConfiguration().isAccessModificationAllowed();
diff --git a/third_party/r8/3pp/patches/0003-Add-disassemble-command-to-keeps.patch b/third_party/r8/3pp/patches/0003-Add-disassemble-command-to-keeps.patch index 6c8e580e..448df5e 100644 --- a/third_party/r8/3pp/patches/0003-Add-disassemble-command-to-keeps.patch +++ b/third_party/r8/3pp/patches/0003-Add-disassemble-command-to-keeps.patch
@@ -1,14 +1,14 @@ -From 9c1c7d53df33edf41754988587a1e6c6f2c3a299 Mon Sep 17 00:00:00 2001 +From 71c4cc6340fc4acba809b8205a63b6cd2c2e7489 Mon Sep 17 00:00:00 2001 From: Mohamed Heikal <mheikal@google.com> Date: Wed, 26 May 2021 19:03:39 -0400 -Subject: [PATCH 3/3] Add disassemble command to keeps +Subject: [PATCH 3/4] Add disassemble command to keeps --- src/main/keep.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/keep.txt b/src/main/keep.txt -index f3e6dd454..491840e44 100644 +index e03ef61f8..5454561a4 100644 --- a/src/main/keep.txt +++ b/src/main/keep.txt @@ -7,6 +7,7 @@
diff --git a/third_party/r8/3pp/patches/0004-Disable-useDexPcAsDebugInformation.patch b/third_party/r8/3pp/patches/0004-Disable-useDexPcAsDebugInformation.patch new file mode 100644 index 0000000..2e3b905 --- /dev/null +++ b/third_party/r8/3pp/patches/0004-Disable-useDexPcAsDebugInformation.patch
@@ -0,0 +1,28 @@ +From 9d1ddf05f237b5bc678f52688db84a9ae0682476 Mon Sep 17 00:00:00 2001 +From: Sam Maier <smaier@chromium.org> +Date: Mon, 31 May 2021 15:28:45 -0400 +Subject: [PATCH 4/4] Disable useDexPcAsDebugInformation + +useDexPcAsDebugInformation breaks deobfuscation, but would be great to turn on. + +See crbug.com/1214915 for more information. +--- + src/main/java/com/android/tools/r8/utils/InternalOptions.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main/java/com/android/tools/r8/utils/InternalOptions.java b/src/main/java/com/android/tools/r8/utils/InternalOptions.java +index e08fe12d7..cde4865a5 100644 +--- a/src/main/java/com/android/tools/r8/utils/InternalOptions.java ++++ b/src/main/java/com/android/tools/r8/utils/InternalOptions.java +@@ -1620,7 +1620,7 @@ public class InternalOptions implements GlobalKeepInfoConfiguration { + } + + public boolean canUseDexPcAsDebugInformation() { +- return !debug && hasMinApi(AndroidApiLevel.O); ++ return false; + } + + public boolean isInterfaceMethodDesugaringEnabled() { +-- +2.32.0.rc0.204.g9fa02ecfa5-goog +
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 0a055e6..b892967 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -51386,6 +51386,8 @@ <int value="694" label="border-end-end-radius"/> <int value="695" label="accent-color"/> <int value="696" label="size-adjust"/> + <int value="697" label="container-name"/> + <int value="698" label="container-type"/> </enum> <enum name="MappedEditingCommands">
diff --git a/tools/metrics/histograms/histograms_xml/accessibility/histograms.xml b/tools/metrics/histograms/histograms_xml/accessibility/histograms.xml index 33e801f..515b658 100644 --- a/tools/metrics/histograms/histograms_xml/accessibility/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/accessibility/histograms.xml
@@ -177,7 +177,7 @@ </histogram> <histogram name="Accessibility.ChromeVox.PerformGestureType" - enum="ChromeVoxGestureType" expires_after="2021-09-19"> + enum="ChromeVoxGestureType" expires_after="2021-11-28"> <owner>dtseng@chromium.org</owner> <owner>chrome-a11y-core@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/android/histograms.xml b/tools/metrics/histograms/histograms_xml/android/histograms.xml index 52052e57c..056dc0b7 100644 --- a/tools/metrics/histograms/histograms_xml/android/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/android/histograms.xml
@@ -3295,7 +3295,7 @@ </histogram> <histogram name="Android.WebView.Startup.CreationTime.Stage1.FactoryInit" - units="ms" expires_after="2021-09-26"> + units="ms" expires_after="2021-11-28"> <owner>changwan@chromium.org</owner> <owner>src/android_webview/OWNERS</owner> <summary> @@ -3305,7 +3305,7 @@ </histogram> <histogram name="Android.WebView.Startup.CreationTime.Stage2.ProviderInit.Cold" - units="ms" expires_after="2021-09-26"> + units="ms" expires_after="2021-11-28"> <owner>changwan@chromium.org</owner> <owner>src/android_webview/OWNERS</owner> <summary> @@ -3317,7 +3317,7 @@ </histogram> <histogram name="Android.WebView.Startup.CreationTime.Stage2.ProviderInit.Warm" - units="ms" expires_after="2021-09-26"> + units="ms" expires_after="2021-11-28"> <owner>changwan@chromium.org</owner> <owner>src/android_webview/OWNERS</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/apps/histograms.xml b/tools/metrics/histograms/histograms_xml/apps/histograms.xml index a901042f..78c42f928 100644 --- a/tools/metrics/histograms/histograms_xml/apps/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/apps/histograms.xml
@@ -1174,7 +1174,7 @@ </histogram> <histogram name="Apps.AppListRecommendedImpResultCountAfterOpen" units="shows" - expires_after="2021-09-27"> + expires_after="2021-11-28"> <owner>napper@chromium.org</owner> <owner>robsc@chromium.org</owner> <owner>thanhdng@chromium.org</owner> @@ -1668,7 +1668,7 @@ </histogram> <histogram name="Apps.LockScreen.AppsProfile.Creation.Duration" units="ms" - expires_after="2021-06-01"> + expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1681,7 +1681,7 @@ </histogram> <histogram name="Apps.LockScreen.AppsProfile.Creation.Success" - units="BooleanSuccess" expires_after="2021-06-01"> + units="BooleanSuccess" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1693,7 +1693,7 @@ </histogram> <histogram name="Apps.LockScreen.DataItemStorage.ClearTextItemSize" - units="bytes" expires_after="2021-06-01"> + units="bytes" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1704,7 +1704,7 @@ </histogram> <histogram name="Apps.LockScreen.DataItemStorage.EncryptedItemSize" - units="bytes" expires_after="2021-06-01"> + units="bytes" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1715,7 +1715,7 @@ <histogram base="true" name="Apps.LockScreen.DataItemStorage.FailedOperationDuration" units="ms" - expires_after="2021-06-01"> + expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1735,7 +1735,7 @@ </histogram> <histogram base="true" name="Apps.LockScreen.DataItemStorage.OperationResult" - enum="LockScreenDataItemOperationResult" expires_after="2021-06-01"> + enum="LockScreenDataItemOperationResult" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1745,7 +1745,7 @@ </histogram> <histogram name="Apps.LockScreen.DataItemStorage.RegisteredItemsCount" - units="units" expires_after="2021-06-01"> + units="units" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1756,7 +1756,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.AppStatusOnNoteLaunch" - enum="LockScreenNoteAppStatusOnLaunch" expires_after="2021-06-01"> + enum="LockScreenNoteAppStatusOnLaunch" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1768,7 +1768,7 @@ </histogram> <histogram base="true" name="Apps.LockScreen.NoteTakingApp.AppWindowLifeTime" - units="ms" expires_after="2021-06-01"> + units="ms" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1780,7 +1780,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.AvailabilityOnScreenLock" - enum="LockScreenActionAvailability" expires_after="2021-06-01"> + enum="LockScreenActionAvailability" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1790,7 +1790,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.FinalAppSessionState" - enum="LockScreenAppSessionState" expires_after="2021-06-01"> + enum="LockScreenAppSessionState" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1800,7 +1800,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.LaunchDurationAtLaunchCancel" - units="ms" expires_after="2021-06-01"> + units="ms" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1811,7 +1811,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.LaunchRequestOrdinalNumber" - units="units" expires_after="2021-06-01"> + units="units" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1823,7 +1823,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.LaunchRequestReason" - enum="NewLockScreenNoteRequestType" expires_after="2021-10-04"> + enum="NewLockScreenNoteRequestType" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1832,7 +1832,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.LockScreenAppUnloaded" - enum="LockScreenAppUnloadStatus" expires_after="2021-06-01"> + enum="LockScreenAppUnloadStatus" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1846,7 +1846,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.LockScreenInstallationDuration" - units="ms" expires_after="2021-06-01"> + units="ms" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1856,7 +1856,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.NoteTakingExitReason" - enum="LockScreenNoteTakingExitReason" expires_after="2021-10-04"> + enum="LockScreenNoteTakingExitReason" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1866,7 +1866,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.ReloadCountOnAppTermination" - units="units" expires_after="2021-06-01"> + units="units" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1878,7 +1878,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.TimeToLoadAppWindowContents" - units="ms" expires_after="2021-06-01"> + units="ms" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1889,7 +1889,7 @@ </histogram> <histogram name="Apps.LockScreen.NoteTakingApp.TimeToShowWindow" units="ms" - expires_after="2021-06-01"> + expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1913,7 +1913,7 @@ </histogram> <histogram name="Apps.NoteTakingApp.DefaultLaunchResult" - enum="NoteTakingAppLaunchResult" expires_after="2021-06-01"> + enum="NoteTakingAppLaunchResult" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -1923,7 +1923,7 @@ </histogram> <histogram name="Apps.NoteTakingApp.PreferredLaunchResult" - enum="NoteTakingAppLaunchResult" expires_after="2021-06-01"> + enum="NoteTakingAppLaunchResult" expires_after="2022-06-01"> <owner>dstockwell@chromium.org</owner> <owner>tbuckley@chromium.org</owner> <summary> @@ -2264,6 +2264,20 @@ </histogram> <histogram + name="Apps.TimeBetweenNewUserSessionActivationAndFirstLauncherAction" + units="ms" expires_after="M99"> + <owner>andrewxu@chromium.org</owner> + <owner>tbarzic@chromium.org</owner> + <summary> + The time duration between session activation and the first launcher action + on a new user session. Launcher actions include the following: activating a + launcher app and opening a search result from either a launcher suggestion + chip or the search box. This metric is recorded when a new user triggers the + launcher action for the first time. + </summary> +</histogram> + +<histogram name="Apps.TimeDurationBetweenNewUserSessionActivationAndFirstLauncherOpening" units="ms" expires_after="M99"> <owner>andrewxu@chromium.org</owner>
diff --git a/tools/metrics/histograms/histograms_xml/arc/histograms.xml b/tools/metrics/histograms/histograms_xml/arc/histograms.xml index 9d7136c..87ab959 100644 --- a/tools/metrics/histograms/histograms_xml/arc/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/arc/histograms.xml
@@ -1069,7 +1069,7 @@ </histogram> <histogram name="Arc.Runtime.Performance.Generic.FrameTime" units="ms" - expires_after="2021-09-28"> + expires_after="2021-11-28"> <owner>camurcu@google.com</owner> <owner>khmel@google.com</owner> <summary> @@ -1079,7 +1079,7 @@ </histogram> <histogram name="Arc.Runtime.Performance.Generic.Jankiness" units="%" - expires_after="2021-09-28"> + expires_after="2021-11-28"> <owner>camurcu@google.com</owner> <owner>khmel@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/ash/histograms.xml b/tools/metrics/histograms/histograms_xml/ash/histograms.xml index b89a7b1..cf97e80 100644 --- a/tools/metrics/histograms/histograms_xml/ash/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/ash/histograms.xml
@@ -355,7 +355,7 @@ </histogram> <histogram name="Ash.CaptureModeController.ScreenshotsPerDay" units="int" - expires_after="2021-09-29"> + expires_after="2021-11-28"> <owner>afakhry@chromium.org</owner> <owner>gzadina@google.com</owner> <summary> @@ -367,7 +367,7 @@ </histogram> <histogram name="Ash.CaptureModeController.ScreenshotsPerWeek" units="int" - expires_after="2021-09-29"> + expires_after="2021-11-28"> <owner>afakhry@chromium.org</owner> <owner>gzadina@google.com</owner> <summary> @@ -2011,7 +2011,7 @@ </histogram> <histogram name="Ash.ScreenshotController.ScreenshotsPerWeek" units="int" - expires_after="2021-09-29"> + expires_after="2021-11-28"> <owner>xiyuan@chromium.org</owner> <owner>gzadina@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/blink/histograms.xml b/tools/metrics/histograms/histograms_xml/blink/histograms.xml index 57f6f0b..c3bf4e13 100644 --- a/tools/metrics/histograms/histograms_xml/blink/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/blink/histograms.xml
@@ -2645,7 +2645,7 @@ </histogram> <histogram base="true" name="Blink.Style.UpdateTime" units="microseconds" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePreFCPSuffixes" --> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePostFCPSuffixes" --> @@ -3140,15 +3140,15 @@ </summary> </histogram> -<histogram base="true" +<histogram name="Blink.{Host}.RenderTaskDuration.{Thread}.{Context}.{Resource}.{Filter}" units="microseconds" expires_after="2022-05-11"> <owner>junov@chromium.org</owner> <owner>fserb@chromium.org</owner> <owner>aaronhk@chromium.org</owner> <summary> - Time spent executing a script task that draws content to a rendering context - of a canvas element or OffscreenCanvas. + Time spent executing a script task that draws content to a {Context} context + of a {Host}. Note: This metric drops reports on clients with low-resolution clocks, which means these reports will be biased against a portion of the population on
diff --git a/tools/metrics/histograms/histograms_xml/enterprise/histograms.xml b/tools/metrics/histograms/histograms_xml/enterprise/histograms.xml index 6bd1a7b8..9b4c6b9 100644 --- a/tools/metrics/histograms/histograms_xml/enterprise/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/enterprise/histograms.xml
@@ -1417,6 +1417,9 @@ <histogram name="Enterprise.StorePolicy.Duration" units="ms" expires_after="2021-10-10"> + <obsolete> + Removed in M93. + </obsolete> <owner>mpolzer@google.com</owner> <owner>managed-platforms@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/gpu/histograms.xml b/tools/metrics/histograms/histograms_xml/gpu/histograms.xml index 07d4b69b..16c5ccb 100644 --- a/tools/metrics/histograms/histograms_xml/gpu/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/gpu/histograms.xml
@@ -500,7 +500,7 @@ </histogram> <histogram name="GPU.DirectComposition.IsUnderlay" enum="BooleanUnderlay" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>magchen@chromium.org</owner> <owner>zmo@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/holding_space/histograms.xml b/tools/metrics/histograms/histograms_xml/holding_space/histograms.xml index 2a1a89b5..0d62831a 100644 --- a/tools/metrics/histograms/histograms_xml/holding_space/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/holding_space/histograms.xml
@@ -52,7 +52,7 @@ </variants> <histogram name="HoldingSpace.Animation.BubbleResize.Smoothness" units="%" - expires_after="2021-09-24"> + expires_after="2021-11-28"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -76,7 +76,7 @@ </histogram> <histogram name="HoldingSpace.Downloads.Action.All" - enum="HoldingSpaceDownloadsAction" expires_after="2021-09-24"> + enum="HoldingSpaceDownloadsAction" expires_after="2021-11-28"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -86,7 +86,7 @@ </histogram> <histogram name="HoldingSpace.FilesAppChip.Action.All" - enum="HoldingSpaceFilesAppChipAction" expires_after="2021-09-24"> + enum="HoldingSpaceFilesAppChipAction" expires_after="2021-11-28"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -96,7 +96,7 @@ </histogram> <histogram name="HoldingSpace.Item.Action.All" enum="HoldingSpaceItemAction" - expires_after="2021-09-24"> + expires_after="2021-11-28"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -159,7 +159,7 @@ </histogram> <histogram name="HoldingSpace.Pod.Action.All" enum="HoldingSpacePodAction" - expires_after="2021-09-24"> + expires_after="2021-11-28"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -179,7 +179,7 @@ </histogram> <histogram name="HoldingSpace.TimeFromFirstAvailabilityToFirstEntry" units="ms" - expires_after="2021-09-24"> + expires_after="2021-11-28"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -189,7 +189,7 @@ </histogram> <histogram name="HoldingSpace.TimeFromFirstEntryToFirstPin" units="ms" - expires_after="2021-09-24"> + expires_after="2021-11-28"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/ios/histograms.xml b/tools/metrics/histograms/histograms_xml/ios/histograms.xml index 37fa6cc98..3f2fabc 100644 --- a/tools/metrics/histograms/histograms_xml/ios/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/ios/histograms.xml
@@ -1058,7 +1058,7 @@ </summary> </histogram> -<histogram name="IOS.Snapshots.ImageSize" units="KB" expires_after="2021-09-12"> +<histogram name="IOS.Snapshots.ImageSize" units="KB" expires_after="2021-11-28"> <owner>ajuma@chromium.org</owner> <owner>edchin@chromium.org</owner> <summary> @@ -1067,7 +1067,7 @@ </summary> </histogram> -<histogram name="IOS.Snapshots.PDFSize" units="KB" expires_after="2021-09-12"> +<histogram name="IOS.Snapshots.PDFSize" units="KB" expires_after="2021-11-28"> <owner>ajuma@chromium.org</owner> <owner>edchin@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/memory/histograms.xml b/tools/metrics/histograms/histograms_xml/memory/histograms.xml index 181137e..259060809 100644 --- a/tools/metrics/histograms/histograms_xml/memory/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/memory/histograms.xml
@@ -1615,7 +1615,7 @@ </histogram> <histogram name="Memory.NativeLibrary.MappedAndResidentMemoryFootprint3" - units="KB" expires_after="2021-09-27"> + units="KB" expires_after="2021-11-28"> <owner>lizeb@chromium.org</owner> <owner>pasko@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/net/histograms.xml b/tools/metrics/histograms/histograms_xml/net/histograms.xml index 87d3e77..f6a5ff6 100644 --- a/tools/metrics/histograms/histograms_xml/net/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/net/histograms.xml
@@ -1248,7 +1248,7 @@ </histogram> <histogram name="Net.DNS.ProbeSequence.ConfigChange.Failure.AttemptTime" - units="ms" expires_after="2021-09-26"> + units="ms" expires_after="2021-11-28"> <owner>ericorth@chromium.org</owner> <owner>doh-core@google.com</owner> <summary> @@ -5018,7 +5018,7 @@ </histogram> <histogram name="Net.SpdySessionErrorDetails2" enum="SpdyProtocolErrorDetails2" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>dschinazi@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary>The type of SPDY Protocol error encountered.</summary>
diff --git a/tools/metrics/histograms/histograms_xml/others/histograms.xml b/tools/metrics/histograms/histograms_xml/others/histograms.xml index 9270f71..ce9656c 100644 --- a/tools/metrics/histograms/histograms_xml/others/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/others/histograms.xml
@@ -781,7 +781,7 @@ </histogram> <histogram name="appcache.UpdateJob.ExistingResourceCorruptionRecovery" - units="units" expires_after="2021-09-26"> + units="units" expires_after="2021-11-28"> <owner>cmp@chromium.org</owner> <owner>pwnall@chromium.org</owner> <summary> @@ -8346,7 +8346,7 @@ </histogram> <histogram name="Kiosk.Launch.CryptohomeFailure" enum="LoginFailureReason" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>xiyuan@chromium.org</owner> <owner>apotapchuk@chromium.org</owner> <summary>Tracks cryptohome failure during kiosk launch.</summary> @@ -12267,7 +12267,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.CookieDomainCount" units="units" - expires_after="2021-09-19"> + expires_after="2021-11-28"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -12278,7 +12278,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.DatabaseSize" units="KiB" - expires_after="2021-09-19"> + expires_after="2021-11-28"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -12289,7 +12289,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.RecordCount" units="units" - expires_after="2021-09-19"> + expires_after="2021-11-28"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -12300,7 +12300,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.StorageOriginCount" units="units" - expires_after="2021-09-19"> + expires_after="2021-11-28"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -12311,7 +12311,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.TopFrameOriginCount" units="units" - expires_after="2021-09-19"> + expires_after="2021-11-28"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -18690,7 +18690,7 @@ </histogram> <histogram name="WebFont.CacheHit" enum="WebFontCacheHit" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>hajimehoshi@chromium.org</owner> <owner>kenjibaheux@chromium.org</owner> <owner>kouhei@chromium.org</owner> @@ -18714,7 +18714,7 @@ </histogram> <histogram name="WebFont.DownloadTime.0.Under10KB" units="ms" - expires_after="2021-08-15"> + expires_after="2022-01-15"> <owner>kenjibaheux@chromium.org</owner> <owner>ksakamoto@chromium.org</owner> <summary> @@ -18724,7 +18724,7 @@ </histogram> <histogram name="WebFont.DownloadTime.1.10KBTo50KB" units="ms" - expires_after="2021-08-15"> + expires_after="2022-01-15"> <owner>kenjibaheux@chromium.org</owner> <owner>ksakamoto@chromium.org</owner> <summary> @@ -18734,7 +18734,7 @@ </histogram> <histogram name="WebFont.DownloadTime.2.50KBTo100KB" units="ms" - expires_after="2021-08-15"> + expires_after="2022-01-15"> <owner>kenjibaheux@chromium.org</owner> <owner>ksakamoto@chromium.org</owner> <summary> @@ -18744,7 +18744,7 @@ </histogram> <histogram name="WebFont.DownloadTime.3.100KBTo1MB" units="ms" - expires_after="2021-08-15"> + expires_after="2022-01-15"> <owner>kenjibaheux@chromium.org</owner> <owner>ksakamoto@chromium.org</owner> <summary> @@ -18754,7 +18754,7 @@ </histogram> <histogram name="WebFont.DownloadTime.4.Over1MB" units="ms" - expires_after="2021-08-15"> + expires_after="2022-01-15"> <owner>kenjibaheux@chromium.org</owner> <owner>ksakamoto@chromium.org</owner> <summary> @@ -18764,7 +18764,7 @@ </histogram> <histogram name="WebFont.DownloadTime.LoadError" units="ms" - expires_after="2021-06-13"> + expires_after="2022-01-15"> <owner>kenjibaheux@chromium.org</owner> <owner>ksakamoto@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/page/histograms.xml b/tools/metrics/histograms/histograms_xml/page/histograms.xml index ad3b3a1..8eeb721 100644 --- a/tools/metrics/histograms/histograms_xml/page/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/page/histograms.xml
@@ -611,7 +611,7 @@ </histogram> <histogram name="PageLoad.Clients.Scheme.HTTP.PaintTiming.UnderStat" - enum="PageLoadTimingUnderStat" expires_after="2021-09-26"> + enum="PageLoadTimingUnderStat" expires_after="2021-11-28"> <owner>tbansal@chromium.org</owner> <summary> Records if the time from navigation to first contentful paint was less than @@ -639,7 +639,7 @@ </histogram> <histogram name="PageLoad.Clients.Scheme.HTTPS.PaintTiming.UnderStat" - enum="PageLoadTimingUnderStat" expires_after="2021-09-26"> + enum="PageLoadTimingUnderStat" expires_after="2021-11-28"> <owner>tbansal@chromium.org</owner> <summary> Records if the time from navigation to first contentful paint was less than
diff --git a/tools/metrics/histograms/histograms_xml/platform/histograms.xml b/tools/metrics/histograms/histograms_xml/platform/histograms.xml index c35b55c..072e727 100644 --- a/tools/metrics/histograms/histograms_xml/platform/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/platform/histograms.xml
@@ -213,7 +213,7 @@ </histogram> <histogram name="Platform.Cr50.RlzOfBoardIdMismatch" enum="Cr50CrosRlzCodes" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>vbendeb@chromium.org</owner> <owner>apronin@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner>
diff --git a/tools/metrics/histograms/histograms_xml/power/histograms.xml b/tools/metrics/histograms/histograms_xml/power/histograms.xml index 2e6d885b..9ea7f50 100644 --- a/tools/metrics/histograms/histograms_xml/power/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/power/histograms.xml
@@ -97,7 +97,7 @@ </histogram> <histogram name="Power.BatteryDischargeRate" units="mW" - expires_after="2021-11-21"> + expires_after="2021-11-28"> <owner>tbroch@chromium.org</owner> <summary> Chrome OS battery discharge rate in mW sampled every 30 seconds while the @@ -316,7 +316,7 @@ </histogram> <histogram name="Power.CpuTimeSecondsPerProcessType" enum="ProcessType2" - expires_after="2021-11-21"> + expires_after="2021-11-28"> <owner>eseckler@chromium.org</owner> <owner>skyostil@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/safe_browsing/histograms.xml b/tools/metrics/histograms/histograms_xml/safe_browsing/histograms.xml index 18aeea8..479ff77b 100644 --- a/tools/metrics/histograms/histograms_xml/safe_browsing/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/safe_browsing/histograms.xml
@@ -1910,7 +1910,7 @@ </histogram> <histogram name="SafeBrowsing.V4Update.Network.Result" - enum="CombinedHttpResponseAndNetErrorCode" expires_after="2021-09-26"> + enum="CombinedHttpResponseAndNetErrorCode" expires_after="2021-11-28"> <owner>vakh@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> <summary> @@ -1935,7 +1935,7 @@ </histogram> <histogram name="SafeBrowsing.V4Update.ResponseSizeKB" units="KB" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>vakh@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/session/histograms.xml b/tools/metrics/histograms/histograms_xml/session/histograms.xml index 3658a84..ec94c707 100644 --- a/tools/metrics/histograms/histograms_xml/session/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/session/histograms.xml
@@ -193,10 +193,15 @@ <owner>msarda@chromium.org</owner> <owner>treib@chromium.org</owner> <owner>tschumann@chromium.org</owner> + <owner>chrome-signin-team@google.com</owner> <owner>chrome-analysis-team@google.com</owner> <summary> - The amount of active browsing time that was spent not being opted in to sync - but while having a refresh token for a user's account. + The amount of active browsing time that was spent with sync disabled while + having a valid refresh token for the primary account. This corresponds to + the case when the user did not opt in to sync, or sync is disabled due to + another reason, e.g. enterprise policy. Note that auth errors are not + counted here, but rather in + Session.TotalDuration.OptedInToSyncWithoutAccount. This time is measured from when the user starts interacting with the browser until either they stopped interacting with the browser or their signin or @@ -209,15 +214,16 @@ measured are unlikely to be helpful. Instead, please compare total durations. - This metric is only recorded on Win/Mac/Linux. + This metric is recorded on Win/Mac/Linux/iOS/Android. One caveat with this metric is that if the user has multiple profiles open at the same time, their session activity will be logged from all the profiles, instead of only from the profile that the user is using at that moment. - This histogram is of special interest to the chrome-analysis-team@. Do not - change its semantics or retire it without talking to them first. + This histogram is of special interest to the chrome-analysis-team@ and + chrome-signin-team@. Do not change its semantics or retire it without + talking to them first. </summary> </histogram> @@ -230,10 +236,12 @@ <owner>msarda@chromium.org</owner> <owner>treib@chromium.org</owner> <owner>tschumann@chromium.org</owner> + <owner>chrome-signin-team@google.com</owner> <owner>chrome-analysis-team@google.com</owner> <summary> - The amount of active browsing time that was spent not being opted in to sync - and not having a refresh token for a user's account. + The amount of active browsing time that was spent with sync disabled and + signed out of Chrome (no primary account or invalid token for the primary + account). This time is measured from when the user starts interacting with the browser until either they stopped interacting with the browser or their signin or @@ -246,15 +254,16 @@ measured are unlikely to be helpful. Instead, please compare total durations. - This metric is only recorded on Win/Mac/Linux. + This metric is recorded on Win/Mac/Linux/iOS/Android. One caveat with this metric is that if the user has multiple profiles open at the same time, their session activity will be logged from all the profiles, instead of only from the profile that the user is using at that moment. - This histogram is of special interest to the chrome-analysis-team@. Do not - change its semantics or retire it without talking to them first. + This histogram is of special interest to the chrome-analysis-team@ and + chrome-signin-team@. Do not change its semantics or retire it without + talking to them first. </summary> </histogram> @@ -267,10 +276,11 @@ <owner>msarda@chromium.org</owner> <owner>treib@chromium.org</owner> <owner>tschumann@chromium.org</owner> + <owner>chrome-signin-team@google.com</owner> <owner>chrome-analysis-team@google.com</owner> <summary> - The total session duration (see Session.TotalDuration) that was spent being - opted in to sync while having a valid refresh token for the account. + The total session duration (see Session.TotalDuration) that was spent with + sync enabled and signed in to Chrome (valid token for the primary account). This time is measured from when the user starts interacting with the browser until either they stopped interacting with the browser or their signin or @@ -283,15 +293,16 @@ measured are unlikely to be helpful. Instead, please compare total durations. - This metric is only recorded on Win/Mac/Linux. + This metric is recorded on Win/Mac/Linux/iOS/Android. One caveat with this metric is that if the user has multiple profiles open at the same time, their session activity will be logged from all the profiles, instead of only from the profile that the user is using at that moment. - This histogram is of special interest to the chrome-analysis-team@. Do not - change its semantics or retire it without talking to them first. + This histogram is of special interest to the chrome-analysis-team@ and + chrome-signin-team@. Do not change its semantics or retire it without + talking to them first. </summary> </histogram> @@ -304,13 +315,18 @@ <owner>msarda@chromium.org</owner> <owner>treib@chromium.org</owner> <owner>tschumann@chromium.org</owner> + <owner>chrome-signin-team@google.com</owner> <owner>chrome-analysis-team@google.com</owner> <summary> - The total session duration (see Session.TotalDuration) that was spent being - opted in to sync without a having a valid refresh token for the account. + The total session duration (see Session.TotalDuration) that was being spent + with sync inactive due to an invalid refresh token for the primary account + (a.k.a. sync in an auth error state). Note that in this state, the user has + already opted in to sync previously. This corresponds to the so-called + "Sync paused" state. - This can for example be the case if the user signed out of the web, changed - their password, or otherwise invalidated their signin. + This can for example be the case when a user, that previously opted in to + sync, signed out of the web on desktop, changed their password, or otherwise + invalidated their signin. This time is measured from when the user starts interacting with the browser until either they stopped interacting with the browser or their signin or @@ -323,15 +339,16 @@ measured are unlikely to be helpful. Instead, please compare total durations. - This metric is only recorded on Win/Mac/Linux. + This metric is recorded on Win/Mac/Linux/iOS/Android. One caveat with this metric is that if the user has multiple profiles open at the same time, their session activity will be logged from all the profiles, instead of only from the profile that the user is using at that moment. - This histogram is of special interest to the chrome-analysis-team@. Do not - change its semantics or retire it without talking to them first. + This histogram is of special interest to the chrome-analysis-team@ and + chrome-signin-team@. Do not change its semantics or retire it without + talking to them first. </summary> </histogram> @@ -359,9 +376,10 @@ <owner>msarda@chromium.org</owner> <owner>treib@chromium.org</owner> <owner>tschumann@chromium.org</owner> + <owner>chrome-signin-team@google.com</owner> <summary> - The total session duration (see Session.TotalDuration) that was spent with - an account signed into the content area. + The total session duration (see Session.TotalDuration) that was spent with a + Google account signed into the content area. The difference between the With(out)Account measurements and the Opted(In/Out)ToSyncWith(out)Account measurements is that these metrics are @@ -378,12 +396,15 @@ measured are unlikely to be helpful. Instead, please compare total durations. - This metric is only recorded on Win/Mac/Linux. + This metric is recorded on Win/Mac/Linux/iOS/Android. One caveat with this metric is that if the user has multiple profiles open at the same time, their session activity will be logged from all the profiles, instead of only from the profile that the user is using at that moment. + + This histogram is of special interest to the chrome-signin-team@. Do not + change its semantics or retire it without talking to them first. </summary> </histogram> @@ -396,9 +417,10 @@ <owner>msarda@chromium.org</owner> <owner>treib@chromium.org</owner> <owner>tschumann@chromium.org</owner> + <owner>chrome-signin-team@google.com</owner> <summary> The total session duration (see Session.TotalDuration) that was spent - without an account signed into the content area. + without a Google account signed into the content area. The difference between the With(out)Account measurements and the Opted(In/Out)ToSyncWith(out)Account measurements is that these metrics are @@ -415,12 +437,15 @@ measured are unlikely to be helpful. Instead, please compare total durations. - This metric is only recorded on Win/Mac/Linux. + This metric is recorded on Win/Mac/Linux/iOS/Android. One caveat with this metric is that if the user has multiple profiles open at the same time, their session activity will be logged from all the profiles, instead of only from the profile that the user is using at that moment. + + This histogram is of special interest to the chrome-signin-team@. Do not + change its semantics or retire it without talking to them first. </summary> </histogram>
diff --git a/tools/metrics/histograms/histograms_xml/uma/histograms.xml b/tools/metrics/histograms/histograms_xml/uma/histograms.xml index ce5df7e..fbb97843 100644 --- a/tools/metrics/histograms/histograms_xml/uma/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/uma/histograms.xml
@@ -589,7 +589,7 @@ </histogram> <histogram name="UMA.TruncatedEvents.UserAction" units="events" - expires_after="2021-11-21"> + expires_after="2021-11-28"> <owner>rkaplow@chromium.org</owner> <owner>src/base/metrics/OWNERS</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/web_rtc/histograms.xml b/tools/metrics/histograms/histograms_xml/web_rtc/histograms.xml index 8faceb4d..fe827bb3 100644 --- a/tools/metrics/histograms/histograms_xml/web_rtc/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/web_rtc/histograms.xml
@@ -804,7 +804,7 @@ </histogram> <histogram name="WebRTC.Audio.SpeechExpandRatePercent" units="%" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>hlundin@chromium.org</owner> <summary> Measures the audible expand rate for an incoming WebRTC audio stream. The @@ -1803,7 +1803,7 @@ </histogram> <histogram name="WebRTC.ReceivedAudioTrackDuration" units="ms" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>perkj@chromium.org</owner> <summary> Durations of audio tracks received over a PeerConnection. The stopwatch @@ -1813,7 +1813,7 @@ </histogram> <histogram name="WebRTC.ReceivedVideoTrackDuration" units="ms" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>perkj@chromium.org</owner> <summary> Durations of video tracks received over a PeerConnection. The stopwatch @@ -1839,7 +1839,7 @@ </histogram> <histogram name="WebRTC.SentAudioTrackDuration" units="ms" - expires_after="2021-09-26"> + expires_after="2021-11-28"> <owner>perkj@chromium.org</owner> <summary> Durations of audio tracks sent over a PeerConnection. The stopwatch starts
diff --git a/tools/v8_context_snapshot/v8_context_snapshot.gni b/tools/v8_context_snapshot/v8_context_snapshot.gni index 07ca1586..811ab55 100644 --- a/tools/v8_context_snapshot/v8_context_snapshot.gni +++ b/tools/v8_context_snapshot/v8_context_snapshot.gni
@@ -16,7 +16,7 @@ # TODO(crbug.com/764576): Enable the feature on more environments. # Disable in mac and win cross builds since building Blink twice is slow. use_v8_context_snapshot = - !is_chromeos_ash && !is_android && !is_chromecast && !is_fuchsia && + !is_chromeos && !is_android && !is_chromecast && !is_fuchsia && !(host_os == "mac" && current_cpu == "x86") && v8_target_cpu == target_cpu && !(host_toolchain == default_toolchain && is_msan) &&
diff --git a/ui/accessibility/ax_tree_serializer.h b/ui/accessibility/ax_tree_serializer.h index f63b2cec..7d8c09d 100644 --- a/ui/accessibility/ax_tree_serializer.h +++ b/ui/accessibility/ax_tree_serializer.h
@@ -9,7 +9,10 @@ #include <stdint.h> #include <ctime> +#include <map> +#include <memory> #include <ostream> +#include <set> #include <unordered_set> #include <vector>
diff --git a/ui/base/ime/chromeos/input_method_manager.h b/ui/base/ime/chromeos/input_method_manager.h index c180a9e6..82319f5 100644 --- a/ui/base/ime/chromeos/input_method_manager.h +++ b/ui/base/ime/chromeos/input_method_manager.h
@@ -14,7 +14,7 @@ #include "base/component_export.h" #include "base/memory/ref_counted.h" -#include "chromeos/services/ime/public/mojom/input_engine.mojom.h" +#include "chromeos/services/ime/public/mojom/ime_service.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "ui/base/ime/chromeos/ime_keyset.h" #include "ui/base/ime/chromeos/input_method_descriptor.h"
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h index fe4e33a..5bf36e2 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h
@@ -9,6 +9,7 @@ #include <memory> #include <string> +#include <unordered_set> #include "base/callback_forward.h" #include "base/containers/flat_map.h"
diff --git a/ui/events/keycodes/keysym_to_unicode.cc b/ui/events/keycodes/keysym_to_unicode.cc index 7d21e40..6b26e68 100644 --- a/ui/events/keycodes/keysym_to_unicode.cc +++ b/ui/events/keycodes/keysym_to_unicode.cc
@@ -6,6 +6,8 @@ #include <stddef.h> +#include <unordered_map> + #include "base/cxx17_backports.h" #include "base/lazy_instance.h" #include "ui/gfx/x/keysyms/keysyms.h"
diff --git a/ui/file_manager/file_manager/background/js/file_operation_util.js b/ui/file_manager/file_manager/background/js/file_operation_util.js index 51c5a27..90ab7c9 100644 --- a/ui/file_manager/file_manager/background/js/file_operation_util.js +++ b/ui/file_manager/file_manager/background/js/file_operation_util.js
@@ -1184,64 +1184,64 @@ * @override */ run(entryChangedCallback, progressCallback, successCallback, errorCallback) { - // TODO(fdegros) Per-entry zip progress update with accurate byte count. - // For now just set processedBytes to 0 so that it is not full until - // the zip operation is done. - this.processedBytes = 0; - progressCallback(); + const f = async () => { + try { + // TODO(fdegros) Per-entry zip progress update with accurate byte count. + // For now just set processedBytes to 0 so that it is not full until + // the zip operation is done. + this.processedBytes = 0; + progressCallback(); - this.run_().then( - entry => { - this.processedBytes = this.totalBytes; - entryChangedCallback(util.EntryChangedKind.CREATED, entry); - successCallback(); - }, - error => errorCallback(new FileOperationError( - util.FileOperationErrorType.FILESYSTEM_ERROR, - /** @type DOMError */ (error)))); - } + // TODO(fdegros) Localize the name. + let destName = 'Archive'; - /** - * Runs a zip file creation task. - * - * @return {!Promise<FileEntry>} Promise fulfilled with the created archive - * entry, or rejected with a DOMError. - * @private - */ - async run_() { - // TODO(fdegros) Localize the name. - let destName = 'Archive'; + // If there is only one entry to zip, use this entry's name for the ZIP + // filename. + if (this.sourceEntries.length == 1) { + const entryName = this.sourceEntries[0].name; + const i = entryName.lastIndexOf('.'); + destName = ((i < 0) ? entryName : entryName.substr(0, i)); + } - // If there is only one entry to zip, use this entry's name for the ZIP - // filename. - if (this.sourceEntries.length == 1) { - const entryName = this.sourceEntries[0].name; - const i = entryName.lastIndexOf('.'); - destName = ((i < 0) ? entryName : entryName.substr(0, i)); - } + const destPath = await fileOperationUtil.deduplicatePath( + this.targetDirEntry, destName + '.zip'); - const destPath = await fileOperationUtil.deduplicatePath( - this.targetDirEntry, destName + '.zip'); + this.cancelCallback_ = () => { + console.log('Cancelling ZIP task...'); + chrome.fileManagerPrivate.cancelZip(this.zipBaseDirEntry, destPath); + }; - this.cancelCallback_ = () => { - console.log('Cancelling ZIP task...'); - chrome.fileManagerPrivate.cancelZip(this.zipBaseDirEntry, destPath); + const success = await new Promise( + resolve => chrome.fileManagerPrivate.zipSelection( + assert(this.sourceEntries), this.zipBaseDirEntry, destPath, + resolve)); + + if (!success) { + // Cannot create ZIP archive. + throw util.createDOMError(util.FileError.INVALID_MODIFICATION_ERR); + } + + // Get the created entry. + const entry = await new Promise( + (resolve, reject) => this.zipBaseDirEntry.getFile( + destPath, {create: false}, resolve, reject)); + + this.processedBytes = this.totalBytes; + entryChangedCallback(util.EntryChangedKind.CREATED, entry); + } catch (error) { + // Don't display any error message if the task was cancelled. + if (!this.cancelRequested_) { + errorCallback(new FileOperationError( + util.FileOperationErrorType.FILESYSTEM_ERROR, + /** @type DOMError */ (error))); + return; + } + } + + successCallback(); }; - const success = await new Promise( - resolve => chrome.fileManagerPrivate.zipSelection( - assert(this.sourceEntries), this.zipBaseDirEntry, destPath, - resolve)); - - if (!success) { - // Cannot create ZIP archive. - throw util.createDOMError(util.FileError.INVALID_MODIFICATION_ERR); - } - - // Get the created entry. - return new Promise( - (resolve, reject) => this.zipBaseDirEntry.getFile( - destPath, {create: false}, resolve, reject)); + f(); } };
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js index 37ba7a5..bc803fd 100644 --- a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js +++ b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
@@ -2358,10 +2358,8 @@ chrome.runtime.lastError.message); } }); - // Register the share and show the 'Manage Linux sharing' toast - // immediately, since the container may take 10s or more to start. - fileManager.crostini.registerSharedPath( - constants.DEFAULT_CROSTINI_VM, dir); + // Show the 'Manage Linux sharing' toast immediately, since the container + // may take 10s or more to start. fileManager.ui.toast.show(str('FOLDER_SHARED_WITH_CROSTINI'), { text: str('MANAGE_TOAST_BUTTON_LABEL'), callback: () => {
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h index 40d7cc9..866fbfb 100644 --- a/ui/gfx/render_text_harfbuzz.h +++ b/ui/gfx/render_text_harfbuzz.h
@@ -5,11 +5,15 @@ #ifndef UI_GFX_RENDER_TEXT_HARFBUZZ_H_ #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_ +#include <hb.h> #include <stddef.h> #include <stdint.h> +#include <limits> #include <memory> #include <string> +#include <unordered_map> +#include <utility> #include <vector> #include "base/macros.h" @@ -17,8 +21,6 @@ #include "third_party/icu/source/common/unicode/uscript.h" #include "ui/gfx/render_text.h" -#include <hb.h> - namespace gfx { class Range;
diff --git a/ui/gl/gl_version_info.cc b/ui/gl/gl_version_info.cc index f0c85d9..30efd56 100644 --- a/ui/gl/gl_version_info.cc +++ b/ui/gl/gl_version_info.cc
@@ -4,6 +4,9 @@ #include "ui/gl/gl_version_info.h" +#include <map> +#include <vector> + #include "base/check_op.h" #include "base/notreached.h" #include "base/strings/strcat.h"
diff --git a/ui/ozone/platform/wayland/BUILD.gn b/ui/ozone/platform/wayland/BUILD.gn index 40b71e72..0368a75 100644 --- a/ui/ozone/platform/wayland/BUILD.gn +++ b/ui/ozone/platform/wayland/BUILD.gn
@@ -212,7 +212,6 @@ "//ui/events/devices", "//ui/events/keycodes:xkb", "//ui/events/ozone", - "//ui/events/ozone/evdev", "//ui/events/ozone/layout", "//ui/events/platform", "//ui/gfx",
diff --git a/ui/ozone/platform/x11/x11_clipboard_ozone.cc b/ui/ozone/platform/x11/x11_clipboard_ozone.cc index 49b3c88..3d07ce1e 100644 --- a/ui/ozone/platform/x11/x11_clipboard_ozone.cc +++ b/ui/ozone/platform/x11/x11_clipboard_ozone.cc
@@ -6,7 +6,8 @@ #include <iterator> #include <memory> -#include <vector> +#include <set> +#include <utility> #include "base/bind.h" #include "ui/base/clipboard/clipboard_constants.h"