diff --git a/.gitignore b/.gitignore index f39533c..bb56f3a 100644 --- a/.gitignore +++ b/.gitignore
@@ -211,6 +211,7 @@ /components/gcm_driver.xml /components/history_clusters/internal /components/leveldb_proto_test_support.xml +/components/metrics/internal /components/ntp_tiles/resources/internal /components/optimization_guide/internal /components/resources/default_100_percent/google_chrome
diff --git a/DEPS b/DEPS index 02c0aa7..cb1e2ce2 100644 --- a/DEPS +++ b/DEPS
@@ -232,7 +232,7 @@ # luci-go CIPD package version. # Make sure the revision is uploaded by infra-packagers builder. # https://ci.chromium.org/p/infra-internal/g/infra-packagers/console - 'luci_go': 'git_revision:265d6513a697d00cea0ab177263a4c699c46be2d', + 'luci_go': 'git_revision:56489f37e8efab64d8b92670e35c1122634b9cae', # This can be overridden, e.g. with custom_vars, to build clang from HEAD # instead of downloading the prebuilt pinned revision. @@ -285,7 +285,7 @@ # 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': '565decd2a447e91d824372a0888c37aae221f3a9', + 'skia_revision': 'ad90b6bd4760218862c2a6e52236ef6f2e0cdb75', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. @@ -293,7 +293,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '443ac5b483b071827c5ba911c74081aaec24df99', + 'angle_revision': '31a501ec536946a4bf37fcbe11bb6fad170ade67', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -308,7 +308,7 @@ # # Note this revision should be updated with # third_party/boringssl/roll_boringssl.py, not roll-dep. - 'boringssl_revision': 'c466222febf86ef8e12c7926d5544354c905fce5', + 'boringssl_revision': '6776d5cd8fcdf6c5e05bae2d655076dbeaa56103', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Fuchsia sdk # and whatever else without interference from each other. @@ -356,7 +356,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '16c787686d0426215c851169b42a4ef990c22068', + 'catapult_revision': 'c3a1432becf77e5e801f430e4e26f769f7d4144c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling CrossBench # and whatever else without interference from each other. @@ -372,7 +372,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': '209b16a59cb4aae49b18025eb5ad14a686e846c7', + 'devtools_frontend_revision': 'd54cedfb878a085f8f2b9a3908d83cfa2011923a', # 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. @@ -476,7 +476,7 @@ # If you change this, also update the libc++ revision in # //buildtools/deps_revisions.gni. - 'libcxx_revision': '8551b86d1ce13c9edbaf8433b0315b934b3c6081', + 'libcxx_revision': 'bff81b702ff4b7f74b1c0ed02a4bcf6c2744a90b', # GN CIPD package version. 'gn_version': 'git_revision:5a004f9427a050c6c393c07ddb85cba8ff3849fa', @@ -771,7 +771,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - 'bf9e1cf1697831ff93045b8f5866d0f2893fb42f', + 'b30c4fa16a10580b48cd6e8f8f42b80386c61c73', 'condition': 'checkout_android and checkout_src_internal', }, @@ -870,7 +870,7 @@ 'packages': [ { 'package': 'chromium/rts/model/linux-amd64', - 'version': '-ZzDYaDKAAegot0k0BxwV6pbW90MYP5mcDOfVuvQudYC', + 'version': 'U_EGI7GOHI_wG6lTEQWrtQDtWpbP5h_OpjgNWD_Df1MC', }, ], 'dep_type': 'cipd', @@ -881,7 +881,7 @@ 'packages': [ { 'package': 'chromium/rts/model/mac-amd64', - 'version': '8o-sJAb0Ao5kEaUw0zzYXGeOAH15nwZgh2S66hF7sckC', + 'version': 'fz-c7CUm7Me9hPuoQ4CHkIi92tjKGyGxAdvxAx9i5JMC', }, ], 'dep_type': 'cipd', @@ -892,7 +892,7 @@ 'packages': [ { 'package': 'chromium/rts/model/windows-amd64', - 'version': 'y0fh0ECciob7yucm9q691p4u8xs_xhICW135zFDuKXcC', + 'version': 'j_oT9R-oGlBMn-9nDfQ9FnIPfG7z_0SN8ksHZtFfxfsC', }, ], 'dep_type': 'cipd', @@ -1195,13 +1195,13 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'e4ff80f5cf81d994f14c2f236aa71f840614746a', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '20ca4c37b70d861d2a269ccdd6ed7f80b4920b89', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '576110b29caeca19d3eee16ff6ab7f1afd6073e7', + 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '5147ac924f8e45db21517ccc1607e22d04c064b7', 'condition': 'checkout_src_internal', }, @@ -1394,7 +1394,7 @@ 'packages': [ { 'package': 'chromium/third_party/jdk', - 'version': '-FR8HTNcMfxy7J2HUaWVa0QmEE4f68iotzvFbqOj2LEC', + 'version': '2Of9Pe_OdO4xoAATuiLDiMVNebKTNO3WrwJGqil4RosC', }, ], # Needed on Linux for use on chromium_presubmit (for checkstyle). @@ -1459,7 +1459,7 @@ Var('chromium_git') + '/external/libaddressinput.git' + '@' + 'e8712e415627f22d0b00ebee8db99547077f39bd', 'src/third_party/libaom/source/libaom': - Var('aomedia_git') + '/aom.git' + '@' + '61fa302827b1673de5c3a63cb391682c7abb414b', + Var('aomedia_git') + '/aom.git' + '@' + '5a0903824082f41123e8365b5b99ddb6ced8971c', 'src/third_party/libavif/src': Var('chromium_git') + '/external/github.com/AOMediaCodec/libavif.git' + '@' + Var('libavif_revision'), @@ -1659,7 +1659,7 @@ Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + '09a4f3ec842a8932341b195c5b01e141c8a16eb7', 'src/third_party/openscreen/src': - Var('chromium_git') + '/openscreen' + '@' + 'ae73185f88aa5ea07b8d18737b185287eb0d4751', + Var('chromium_git') + '/openscreen' + '@' + '0964c1e903264ae2c388fc0eda3309c22b46e1a2', 'src/third_party/openxr/src': { 'url': Var('chromium_git') + '/external/github.com/KhronosGroup/OpenXR-SDK' + '@' + 'bf21ccb1007bb531b45d9978919a56ea5059c245', @@ -1676,7 +1676,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '045679ede73589e328e84b6c42341676b43f25fc', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'd32d008dfa093d800e125bb58a5d0c3f24cc5a29', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1951,7 +1951,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': Var('chrome_git') + '/chrome/src-internal.git@1531c077988a3c899f58bfd18e030d97168e0a32', + 'url': Var('chrome_git') + '/chrome/src-internal.git@5c4d567960c6516d379f50d634ad7b5d947f9654', 'condition': 'checkout_src_internal', },
diff --git a/WATCHLISTS b/WATCHLISTS index 2d53125..426f8823 100644 --- a/WATCHLISTS +++ b/WATCHLISTS
@@ -1936,10 +1936,6 @@ 'switch_access': { 'filepath': 'switch_access', }, - 'sync_android': { - 'filepath': 'chrome/browser/sync/android/'\ - '|chrome/android/java/src/org/chromium/chrome/browser/sync/', - }, 'syncfs': { 'filepath': 'sync_file_system', }, @@ -3044,7 +3040,6 @@ 'surface_layer_for_video': [ 'lethalantidote@chromium.org', 'liberato@chromium.org'], 'switch_access': ['anastasi+watch@google.com'], - 'sync_android': ['victorvianna+watchlists@google.com'], 'syncfs': ['kinuko+fileapi@chromium.org'], 'system_web_apps': [ 'ortuno@chromium.org', 'dominicschulz@google.com',
diff --git a/android_webview/browser/gfx/display_webview.cc b/android_webview/browser/gfx/display_webview.cc index 5a42b7d9..78ea2b5 100644 --- a/android_webview/browser/gfx/display_webview.cc +++ b/android_webview/browser/gfx/display_webview.cc
@@ -5,6 +5,7 @@ #include "android_webview/browser/gfx/display_webview.h" #include "android_webview/browser/gfx/overlay_processor_webview.h" +#include "android_webview/browser/gfx/root_frame_sink.h" #include "base/memory/ptr_util.h" #include "components/viz/common/features.h" #include "components/viz/service/display/overlay_processor_stub.h" @@ -43,7 +44,8 @@ return base::WrapUnique(new DisplayWebView( settings, debug_settings, frame_sink_id, std::move(gpu_dependency), std::move(output_surface), std::move(overlay_processor), - std::move(scheduler), overlay_processor_webview_raw, frame_sink_manager)); + std::move(scheduler), overlay_processor_webview_raw, frame_sink_manager, + root_frame_sink)); } DisplayWebView::DisplayWebView( @@ -56,7 +58,8 @@ std::unique_ptr<viz::OverlayProcessorInterface> overlay_processor, std::unique_ptr<viz::DisplaySchedulerBase> scheduler, OverlayProcessorWebView* overlay_processor_webview, - viz::FrameSinkManagerImpl* frame_sink_manager) + viz::FrameSinkManagerImpl* frame_sink_manager, + RootFrameSink* root_frame_sink) : viz::Display(/*bitmap_manager=*/nullptr, settings, debug_settings, @@ -68,6 +71,7 @@ /*current_task_runner=*/nullptr), overlay_processor_webview_(overlay_processor_webview), frame_sink_manager_(frame_sink_manager), + root_frame_sink_(root_frame_sink), use_new_invalidate_heuristic_(base::FeatureList::IsEnabled( features::kWebViewNewInvalidateHeuristic)) { if (overlay_processor_webview_) { @@ -103,8 +107,12 @@ ++swapped_trace_id_); auto* resolved_data = aggregator_->GetLatestFrameData(surface_id); if (resolved_data) { - overlay_processor_webview_->ProcessForFrameSinkId(frame_sink_id, - resolved_data); + if (!overlay_processor_webview_->ProcessForFrameSinkId(frame_sink_id, + resolved_data)) { + // If we failed to update overlay buffer, we need to invalidate to make + // sure full draw happens. + root_frame_sink_->InvalidateForOverlays(); + } } } }
diff --git a/android_webview/browser/gfx/display_webview.h b/android_webview/browser/gfx/display_webview.h index 65bd058..f7bbc9b88 100644 --- a/android_webview/browser/gfx/display_webview.h +++ b/android_webview/browser/gfx/display_webview.h
@@ -68,10 +68,13 @@ std::unique_ptr<viz::OverlayProcessorInterface> overlay_processor, std::unique_ptr<viz::DisplaySchedulerBase> scheduler, OverlayProcessorWebView* overlay_processor_webview, - viz::FrameSinkManagerImpl* frame_sink_manager); + viz::FrameSinkManagerImpl* frame_sink_manager, + RootFrameSink* root_frame_sink); const raw_ptr<OverlayProcessorWebView> overlay_processor_webview_; const raw_ptr<viz::FrameSinkManagerImpl> frame_sink_manager_; + const raw_ptr<RootFrameSink> root_frame_sink_; + base::ScopedObservation<viz::FrameSinkManagerImpl, viz::FrameSinkObserver> frame_sink_manager_observation_{this};
diff --git a/android_webview/browser/gfx/overlay_processor_webview.cc b/android_webview/browser/gfx/overlay_processor_webview.cc index e8ae3c6..d1c46b3 100644 --- a/android_webview/browser/gfx/overlay_processor_webview.cc +++ b/android_webview/browser/gfx/overlay_processor_webview.cc
@@ -909,7 +909,7 @@ resource_lock_count_.erase(surface_id.frame_sink_id()); } -void OverlayProcessorWebView::ProcessForFrameSinkId( +bool OverlayProcessorWebView::ProcessForFrameSinkId( const viz::FrameSinkId& frame_sink_id, const viz::ResolvedFrameData* frame_data) { auto it = overlays_.find(frame_sink_id); @@ -918,10 +918,11 @@ const auto& passes = frame_data->GetResolvedPasses(); if (passes.empty()) { - return; + return false; } DCHECK_EQ(passes.size(), 1u); + bool buffer_updated = false; auto& pass = passes.back(); if (!pass.draw_quads().empty()) { @@ -932,15 +933,25 @@ // TODO(vasilyt): We should get this from surface aggregator after // aggregator refactoring will be finished. const auto& frame = surface->GetActiveFrame(); - auto* quad = viz::TextureDrawQuad::MaterialCast( - frame.render_pass_list.back()->quad_list.front()); - DCHECK(quad->is_stream_video); + auto* quad = frame.render_pass_list.back()->quad_list.front(); - auto uv_rect = gfx::BoundingRect(quad->uv_top_left, quad->uv_bottom_right); + // We overlay only TextureDrawQuads and only if resource + // IsOverlayCandidate(), return false otherwise so we would trigger + // invalidate and normal draw would remove this overlay candidate. + if (quad->material == viz::TextureDrawQuad::kMaterial) { + auto* texture_quad = viz::TextureDrawQuad::MaterialCast(quad); + DCHECK(texture_quad->is_stream_video); - UpdateOverlayResource(frame_sink_id, - pass.draw_quads().front().remapped_resources.ids[0], - uv_rect); + auto uv_rect = gfx::BoundingRect(texture_quad->uv_top_left, + texture_quad->uv_bottom_right); + + auto new_resource_id = + pass.draw_quads().front().remapped_resources.ids[0]; + if (resource_provider_->IsOverlayCandidate(new_resource_id)) { + UpdateOverlayResource(frame_sink_id, new_resource_id, uv_rect); + buffer_updated = true; + } + } // If resource lock count reached kMaxBuffersInFlight it means we can't // schedule any more frames right away, in this case we delay sending ack to // the client and will send it in ReturnResources after OverlayManager will @@ -949,6 +960,8 @@ surface->SendAckToClient(); } } + + return buffer_updated; } viz::SurfaceId OverlayProcessorWebView::GetOverlaySurfaceId(
diff --git a/android_webview/browser/gfx/overlay_processor_webview.h b/android_webview/browser/gfx/overlay_processor_webview.h index d53fbba..5ce8511 100644 --- a/android_webview/browser/gfx/overlay_processor_webview.h +++ b/android_webview/browser/gfx/overlay_processor_webview.h
@@ -48,7 +48,8 @@ viz::FrameSinkManagerImpl* frame_sink_manager); ~OverlayProcessorWebView() override; - void ProcessForFrameSinkId(const viz::FrameSinkId& frame_sink_id, + // returns false if it failed to update overlays. + bool ProcessForFrameSinkId(const viz::FrameSinkId& frame_sink_id, const viz::ResolvedFrameData* frame_data); void SetOverlaysEnabledByHWUI(bool enabled); void RemoveOverlays();
diff --git a/android_webview/browser/gfx/root_frame_sink.cc b/android_webview/browser/gfx/root_frame_sink.cc index 3d83337..a66dadcb 100644 --- a/android_webview/browser/gfx/root_frame_sink.cc +++ b/android_webview/browser/gfx/root_frame_sink.cc
@@ -445,4 +445,10 @@ client_->Invalidate(); } +void RootFrameSink::InvalidateForOverlays() { + if (client_) { + client_->Invalidate(); + } +} + } // namespace android_webview
diff --git a/android_webview/browser/gfx/root_frame_sink.h b/android_webview/browser/gfx/root_frame_sink.h index 1ca1429..76e6be9 100644 --- a/android_webview/browser/gfx/root_frame_sink.h +++ b/android_webview/browser/gfx/root_frame_sink.h
@@ -75,6 +75,7 @@ void DettachClient(); void EvictChildSurface(const viz::SurfaceId& surface_id); void SetContainedSurfaces(const base::flat_set<viz::SurfaceId>& ids); + void InvalidateForOverlays(); void SubmitChildCompositorFrame(ChildFrame* child_frame); viz::FrameTimingDetailsMap TakeChildFrameTimingDetailsMap();
diff --git a/android_webview/system_webview_apk_tmpl.gni b/android_webview/system_webview_apk_tmpl.gni index a71c7e1..1a3d47a 100644 --- a/android_webview/system_webview_apk_tmpl.gni +++ b/android_webview/system_webview_apk_tmpl.gni
@@ -259,15 +259,18 @@ } } - _libarcore_dir = get_label_info( - "//third_party/arcore-android-sdk-client:com_google_ar_core_java($default_toolchain)", - "target_out_dir") + "/com_google_ar_core_java/jni" - not_needed([ "_libarcore_dir" ]) - _include_arcore = _webview_includes_weblayer && enable_arcore && !_exclude_weblayer_java && (_include_secondary_support || _include_primary_support) + if (_include_arcore) { + # Do not add manifest entries because embedders are the ones that will need to add them. + deps += [ "//third_party/arcore-android-sdk-client:com_google_ar_core_J__unpack_aar" ] + _libarcore_dir = get_label_info( + "//third_party/arcore-android-sdk-client:com_google_ar_core_java($default_toolchain)", + "target_out_dir") + "/com_google_ar_core_java/jni" + } + if (_include_primary_support) { deps += [ "//android_webview:webview_primary_abi_assets", @@ -304,10 +307,6 @@ } } - if (_include_arcore) { - deps += [ "//third_party/arcore-android-sdk-client:com_google_ar_core_J__unpack_aar" ] - } - aapt_locale_allowlist = platform_pak_locales resource_exclusion_regex = common_resource_exclusion_regex
diff --git a/android_webview/test/components/run_webview_component_smoketest.pydeps b/android_webview/test/components/run_webview_component_smoketest.pydeps index e03269b..e32f9c6 100644 --- a/android_webview/test/components/run_webview_component_smoketest.pydeps +++ b/android_webview/test/components/run_webview_component_smoketest.pydeps
@@ -127,6 +127,7 @@ //third_party/catapult/telemetry/telemetry/core/debug_data.py //third_party/catapult/telemetry/telemetry/core/exceptions.py //third_party/catapult/telemetry/telemetry/core/fuchsia_interface.py +//third_party/catapult/telemetry/telemetry/core/linux_based_interface.py //third_party/catapult/telemetry/telemetry/core/local_server.py //third_party/catapult/telemetry/telemetry/core/memory_cache_http_server.py //third_party/catapult/telemetry/telemetry/core/network_controller.py
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 62050e653..174db71 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -182,8 +182,8 @@ "ambient/ambient_weather_controller.cc", "ambient/ambient_weather_controller.h", "ambient/autotest_ambient_api.cc", - "ambient/metrics/ambient_multi_screen_metrics_recorder.cc", - "ambient/metrics/ambient_multi_screen_metrics_recorder.h", + "ambient/metrics/ambient_session_metrics_recorder.cc", + "ambient/metrics/ambient_session_metrics_recorder.h", "ambient/model/ambient_animation_attribution_provider.cc", "ambient/model/ambient_animation_attribution_provider.h", "ambient/model/ambient_animation_photo_config.cc", @@ -2137,6 +2137,8 @@ "wallpaper/wallpaper_constants.h", "wallpaper/wallpaper_controller_impl.cc", "wallpaper/wallpaper_controller_impl.h", + "wallpaper/wallpaper_drag_drop_delegate.cc", + "wallpaper/wallpaper_drag_drop_delegate.h", "wallpaper/wallpaper_image_downloader.cc", "wallpaper/wallpaper_image_downloader.h", "wallpaper/wallpaper_metrics_manager.cc", @@ -2892,7 +2894,7 @@ "ambient/ambient_ui_settings_unittest.cc", "ambient/ambient_weather_controller_unittest.cc", "ambient/autotest_ambient_api_unittest.cc", - "ambient/metrics/ambient_multi_screen_metrics_recorder_unittest.cc", + "ambient/metrics/ambient_session_metrics_recorder_unittest.cc", "ambient/model/ambient_animation_attribution_provider_unittest.cc", "ambient/model/ambient_animation_photo_config_unittest.cc", "ambient/model/ambient_animation_photo_provider_unittest.cc", @@ -3409,6 +3411,7 @@ "utility/rounded_window_targeter_unittest.cc", "wallpaper/online_wallpaper_variant_info_fetcher_unittest.cc", "wallpaper/wallpaper_controller_unittest.cc", + "wallpaper/wallpaper_drag_drop_delegate_unittest.cc", "wallpaper/wallpaper_pref_manager_unittest.cc", "wallpaper/wallpaper_utils/wallpaper_color_calculator_unittest.cc", "wallpaper/wallpaper_utils/wallpaper_ephemeral_user_unittest.cc",
diff --git a/ash/ambient/ambient_controller.cc b/ash/ambient/ambient_controller.cc index 86689c8..4cb07b1 100644 --- a/ash/ambient/ambient_controller.cc +++ b/ash/ambient/ambient_controller.cc
@@ -14,7 +14,7 @@ #include "ash/ambient/ambient_ui_launcher.h" #include "ash/ambient/ambient_ui_settings.h" #include "ash/ambient/ambient_video_ui_launcher.h" -#include "ash/ambient/metrics/ambient_multi_screen_metrics_recorder.h" +#include "ash/ambient/metrics/ambient_session_metrics_recorder.h" #include "ash/ambient/model/ambient_animation_photo_config.h" #include "ash/ambient/model/ambient_backend_model_observer.h" #include "ash/ambient/model/ambient_slideshow_photo_config.h" @@ -304,9 +304,6 @@ // not shown. AssistantInteractionController::Get()->GetModel()->RemoveObserver(this); - frame_rate_controller_.reset(); - multi_screen_metrics_recorder_.reset(); - // |start_time_| may be empty in case of |AmbientUiVisibility::kHidden| if // ambient mode has just started. if (start_time_) { @@ -1023,7 +1020,7 @@ if (ambient_ui_launcher_) { container_view = std::make_unique<AmbientContainerView>( current_theme, ambient_ui_launcher_->CreateView(), - multi_screen_metrics_recorder_.get()); + session_metrics_recorder_.get()); } else { // TODO(b/274164306): Everything should use // |AmbientUiLauncher::CreateView()| when slideshow and animation themes @@ -1032,7 +1029,7 @@ &delegate_, ambient_animation_progress_tracker_.get(), AmbientAnimationStaticResources::Create(current_theme, /*serializable=*/true), - multi_screen_metrics_recorder_.get(), frame_rate_controller_.get()); + session_metrics_recorder_.get(), frame_rate_controller_.get()); } auto* widget_delegate = new AmbientWidgetDelegate(); widget_delegate->SetInitiallyFocusedView(container_view.get()); @@ -1133,6 +1130,9 @@ void AmbientController::StopScreensaver() { CloseAllWidgets(close_widgets_immediately_); + frame_rate_controller_.reset(); + session_metrics_recorder_.reset(); + if (ambient_ui_launcher_) { ambient_ui_launcher_->Finalize(); return; @@ -1154,9 +1154,8 @@ // Add observer for assistant interaction model AssistantInteractionController::Get()->GetModel()->AddObserver(this); - multi_screen_metrics_recorder_ = - std::make_unique<AmbientMultiScreenMetricsRecorder>( - GetCurrentUiSettings().theme()); + session_metrics_recorder_ = std::make_unique<AmbientSessionMetricsRecorder>( + GetCurrentUiSettings().theme()); frame_rate_controller_ = std::make_unique<AmbientAnimationFrameRateController>( Shell::Get()->frame_throttling_controller());
diff --git a/ash/ambient/ambient_controller.h b/ash/ambient/ambient_controller.h index 25c9efb6..b4d2ad4 100644 --- a/ash/ambient/ambient_controller.h +++ b/ash/ambient/ambient_controller.h
@@ -58,8 +58,8 @@ class AmbientAnimationProgressTracker; class AmbientBackendController; class AmbientContainerView; -class AmbientMultiScreenMetricsRecorder; class AmbientPhotoController; +class AmbientSessionMetricsRecorder; class AmbientUiSettings; // Class to handle all ambient mode functionalities. @@ -331,8 +331,7 @@ // the controller. bool is_initialized_ = false; - std::unique_ptr<AmbientMultiScreenMetricsRecorder> - multi_screen_metrics_recorder_; + std::unique_ptr<AmbientSessionMetricsRecorder> session_metrics_recorder_; std::unique_ptr<AmbientUiLauncher> ambient_ui_launcher_; base::WeakPtrFactory<AmbientController> weak_ptr_factory_{this};
diff --git a/ash/ambient/metrics/ambient_multi_screen_metrics_recorder.cc b/ash/ambient/metrics/ambient_session_metrics_recorder.cc similarity index 91% rename from ash/ambient/metrics/ambient_multi_screen_metrics_recorder.cc rename to ash/ambient/metrics/ambient_session_metrics_recorder.cc index d39bd1a..ccbd9a2 100644 --- a/ash/ambient/metrics/ambient_multi_screen_metrics_recorder.cc +++ b/ash/ambient/metrics/ambient_session_metrics_recorder.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/ambient/metrics/ambient_multi_screen_metrics_recorder.h" +#include "ash/ambient/metrics/ambient_session_metrics_recorder.h" #include <algorithm> @@ -14,28 +14,28 @@ namespace ash { -AmbientMultiScreenMetricsRecorder::AmbientMultiScreenMetricsRecorder( - AmbientTheme theme) +AmbientSessionMetricsRecorder::AmbientSessionMetricsRecorder(AmbientTheme theme) : theme_(theme) {} -AmbientMultiScreenMetricsRecorder::~AmbientMultiScreenMetricsRecorder() { +AmbientSessionMetricsRecorder::~AmbientSessionMetricsRecorder() { base::UmaHistogramCounts100( base::StrCat({"Ash.AmbientMode.ScreenCount.", ToString(theme_)}), num_registered_screens_); } -void AmbientMultiScreenMetricsRecorder::RegisterScreen( +void AmbientSessionMetricsRecorder::RegisterScreen( lottie::Animation* animation) { ++num_registered_screens_; - if (!animation) + if (!animation) { return; + } DCHECK(!animation_observations_.IsObservingSource(animation)); registered_animations_.insert(animation); animation_observations_.AddObservation(animation); } -void AmbientMultiScreenMetricsRecorder::AnimationFramePainted( +void AmbientSessionMetricsRecorder::AnimationFramePainted( const lottie::Animation* animation, float t) { if (registered_animations_.size() <= 1u) { @@ -94,7 +94,7 @@ #undef MUTLISCREEN_OFFSET_NAME } -void AmbientMultiScreenMetricsRecorder::AnimationIsDeleting( +void AmbientSessionMetricsRecorder::AnimationIsDeleting( const lottie::Animation* animation) { animation_observations_.RemoveObservation( const_cast<lottie::Animation*>(animation)); @@ -105,7 +105,7 @@ } absl::optional<base::TimeDelta> -AmbientMultiScreenMetricsRecorder::GetOffsetBetweenAnimations( +AmbientSessionMetricsRecorder::GetOffsetBetweenAnimations( const lottie::Animation& animation_l, const lottie::Animation& animation_r) const { absl::optional<float> current_progress_l = animation_l.GetCurrentProgress(); @@ -159,7 +159,7 @@ } // static -bool AmbientMultiScreenMetricsRecorder::IsPlaybackConfigValid( +bool AmbientSessionMetricsRecorder::IsPlaybackConfigValid( const absl::optional<lottie::Animation::PlaybackConfig>& playback_config) { return playback_config && // The logic in GetOffsetBetweenAnimations() assumes animation time
diff --git a/ash/ambient/metrics/ambient_multi_screen_metrics_recorder.h b/ash/ambient/metrics/ambient_session_metrics_recorder.h similarity index 63% rename from ash/ambient/metrics/ambient_multi_screen_metrics_recorder.h rename to ash/ambient/metrics/ambient_session_metrics_recorder.h index 2b028ee..c3c90fe 100644 --- a/ash/ambient/metrics/ambient_multi_screen_metrics_recorder.h +++ b/ash/ambient/metrics/ambient_session_metrics_recorder.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_AMBIENT_METRICS_AMBIENT_MULTI_SCREEN_METRICS_RECORDER_H_ -#define ASH_AMBIENT_METRICS_AMBIENT_MULTI_SCREEN_METRICS_RECORDER_H_ +#ifndef ASH_AMBIENT_METRICS_AMBIENT_SESSION_METRICS_RECORDER_H_ +#define ASH_AMBIENT_METRICS_AMBIENT_SESSION_METRICS_RECORDER_H_ #include "ash/ash_export.h" #include "ash/constants/ambient_theme.h" @@ -17,27 +17,25 @@ namespace ash { -// Records metrics for multi-screen usage in ambient mode: -// * The number of screens active during ambient mode. -// * The average instantaneous offset in timestamp between the animations -// playing on each screen. This metric is not recorded for single-screen -// ambient mode sessions. -// AmbientMultiScreenMetricsRecorder's lifetime is meant to match that of a -// single ambient mode session. Per-session metrics are recorded in its -// destructor. -class ASH_EXPORT AmbientMultiScreenMetricsRecorder +// AmbientSessionMetricsRecorder's lifetime is meant to match that of a +// single ambient session: +// * Construction - Ambient session starts by preparing any assets needed +// for rendering. +// * RegisterScreen() - Ambient session is rendering. There is one call for each +// screen (display). +// * Destruction - Ambient session ends. +class ASH_EXPORT AmbientSessionMetricsRecorder : public lottie::AnimationObserver { public: - explicit AmbientMultiScreenMetricsRecorder(AmbientTheme theme); - AmbientMultiScreenMetricsRecorder(const AmbientMultiScreenMetricsRecorder&) = - delete; - AmbientMultiScreenMetricsRecorder& operator=( - const AmbientMultiScreenMetricsRecorder&) = delete; - ~AmbientMultiScreenMetricsRecorder() override; + explicit AmbientSessionMetricsRecorder(AmbientTheme theme); + AmbientSessionMetricsRecorder(const AmbientSessionMetricsRecorder&) = delete; + AmbientSessionMetricsRecorder& operator=( + const AmbientSessionMetricsRecorder&) = delete; + ~AmbientSessionMetricsRecorder() override; // Registers a screen and its corresponding |animation|. |animation| may be // null if the ambient UI does not have an associated animation (ex: slideshow - // mode). AmbientMultiScreenMetricsRecorder may outlive the incoming + // mode). AmbientSessionMetricsRecorder may outlive the incoming // |animation| if desired. void RegisterScreen(lottie::Animation* animation); @@ -70,4 +68,4 @@ } // namespace ash -#endif // ASH_AMBIENT_METRICS_AMBIENT_MULTI_SCREEN_METRICS_RECORDER_H_ +#endif // ASH_AMBIENT_METRICS_AMBIENT_SESSION_METRICS_RECORDER_H_
diff --git a/ash/ambient/metrics/ambient_multi_screen_metrics_recorder_unittest.cc b/ash/ambient/metrics/ambient_session_metrics_recorder_unittest.cc similarity index 90% rename from ash/ambient/metrics/ambient_multi_screen_metrics_recorder_unittest.cc rename to ash/ambient/metrics/ambient_session_metrics_recorder_unittest.cc index 66a9e06f..dda12a1 100644 --- a/ash/ambient/metrics/ambient_multi_screen_metrics_recorder_unittest.cc +++ b/ash/ambient/metrics/ambient_session_metrics_recorder_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/ambient/metrics/ambient_multi_screen_metrics_recorder.h" +#include "ash/ambient/metrics/ambient_session_metrics_recorder.h" #include <string> @@ -24,7 +24,7 @@ using ::testing::Eq; } // namespace -class AmbientMultiScreenMetricsRecorderTest : public ::testing::Test { +class AmbientSessionMetricsRecorderTest : public ::testing::Test { protected: struct Harness { static constexpr gfx::Size kTestSize = gfx::Size(100, 100); @@ -39,9 +39,9 @@ kTotalAnimationDuration.InSecondsF())) { } - // In the real code, AmbientMultiScreenMetricsRecorder outlives the + // In the real code, AmbientSessionMetricsRecorder outlives the // animations, so simulate that in tests here. - AmbientMultiScreenMetricsRecorder recorder; + AmbientSessionMetricsRecorder recorder; lottie::Animation animation_1; lottie::Animation animation_2; gfx::Canvas canvas; @@ -51,8 +51,8 @@ base::test::TaskEnvironment::TimeSource::MOCK_TIME}; }; -class AmbientMultiScreenMetricsRecorderTestForAllThemes - : public AmbientMultiScreenMetricsRecorderTest, +class AmbientSessionMetricsRecorderTestForAllThemes + : public AmbientSessionMetricsRecorderTest, public ::testing::WithParamInterface<AmbientTheme> { protected: std::string GetMetricNameForTheme(base::StringPiece prefix) { @@ -61,11 +61,11 @@ }; INSTANTIATE_TEST_SUITE_P(AllAnimationThemes, - AmbientMultiScreenMetricsRecorderTestForAllThemes, + AmbientSessionMetricsRecorderTestForAllThemes, testing::Values(AmbientTheme::kFeelTheBreeze, AmbientTheme::kFloatOnBy)); -TEST_P(AmbientMultiScreenMetricsRecorderTestForAllThemes, RecordsScreenCount) { +TEST_P(AmbientSessionMetricsRecorderTestForAllThemes, RecordsScreenCount) { base::HistogramTester histogram_tester; { Harness harness(GetParam()); @@ -93,8 +93,7 @@ /*expected_count=*/1); } -TEST_P(AmbientMultiScreenMetricsRecorderTestForAllThemes, - RecordsTimestampOffset) { +TEST_P(AmbientSessionMetricsRecorderTestForAllThemes, RecordsTimestampOffset) { static constexpr base::TimeDelta kFrameInterval = base::Milliseconds(100); base::HistogramTester histogram_tester; @@ -124,7 +123,7 @@ kFrameInterval, 1); } -TEST_P(AmbientMultiScreenMetricsRecorderTestForAllThemes, +TEST_P(AmbientSessionMetricsRecorderTestForAllThemes, RecordsMeanTimestampOffsetWithDifferentCycleStartOffsets) { base::HistogramTester histogram_tester; @@ -182,7 +181,7 @@ GetMetricNameForTheme("Ash.AmbientMode.MultiScreenOffset."), 6); } -TEST_P(AmbientMultiScreenMetricsRecorderTestForAllThemes, +TEST_P(AmbientSessionMetricsRecorderTestForAllThemes, DoesNotRecordMeanTimestampOffsetForSingleScreen) { static constexpr base::TimeDelta kFrameInterval = base::Milliseconds(100); base::HistogramTester histogram_tester; @@ -199,10 +198,10 @@ "Ash.AmbientMode.MultiScreenOffset.FeelTheBreeze", 0); } -TEST_F(AmbientMultiScreenMetricsRecorderTest, HandlesNullAnimations) { +TEST_F(AmbientSessionMetricsRecorderTest, HandlesNullAnimations) { base::HistogramTester histogram_tester; { - AmbientMultiScreenMetricsRecorder recorder(AmbientTheme::kSlideshow); + AmbientSessionMetricsRecorder recorder(AmbientTheme::kSlideshow); recorder.RegisterScreen(nullptr); recorder.RegisterScreen(nullptr); }
diff --git a/ash/ambient/ui/ambient_animation_view.cc b/ash/ambient/ui/ambient_animation_view.cc index e616257..510faf5a 100644 --- a/ash/ambient/ui/ambient_animation_view.cc +++ b/ash/ambient/ui/ambient_animation_view.cc
@@ -9,7 +9,7 @@ #include <utility> #include "ash/ambient/ambient_view_delegate_impl.h" -#include "ash/ambient/metrics/ambient_multi_screen_metrics_recorder.h" +#include "ash/ambient/metrics/ambient_session_metrics_recorder.h" #include "ash/ambient/model/ambient_animation_attribution_provider.h" #include "ash/ambient/model/ambient_backend_model.h" #include "ash/ambient/model/ambient_photo_config.h" @@ -182,7 +182,7 @@ AmbientViewDelegateImpl* view_delegate, AmbientAnimationProgressTracker* progress_tracker, std::unique_ptr<const AmbientAnimationStaticResources> static_resources, - AmbientMultiScreenMetricsRecorder* multi_screen_metrics_recorder, + AmbientSessionMetricsRecorder* session_metrics_recorder, AmbientAnimationFrameRateController* frame_rate_controller) : view_delegate_(view_delegate), progress_tracker_(progress_tracker), @@ -194,13 +194,13 @@ DCHECK(view_delegate_); DCHECK(frame_rate_controller_); SetID(AmbientViewID::kAmbientAnimationView); - Init(multi_screen_metrics_recorder); + Init(session_metrics_recorder); } AmbientAnimationView::~AmbientAnimationView() = default; void AmbientAnimationView::Init( - AmbientMultiScreenMetricsRecorder* multi_screen_metrics_recorder) { + AmbientSessionMetricsRecorder* session_metrics_recorder) { SetUseDefaultFillLayout(true); views::View* animation_container_view = @@ -223,8 +223,8 @@ static_resources_->GetSkottieWrapper(), cc::SkottieColorMap(), &animation_photo_provider_); animation_observer_.Observe(animation.get()); - DCHECK(multi_screen_metrics_recorder); - multi_screen_metrics_recorder->RegisterScreen(animation.get()); + DCHECK(session_metrics_recorder); + session_metrics_recorder->RegisterScreen(animation.get()); animated_image_view_->SetAnimatedImage(std::move(animation)); animated_image_view_observer_.Observe(animated_image_view_); animation_attribution_provider_ =
diff --git a/ash/ambient/ui/ambient_animation_view.h b/ash/ambient/ui/ambient_animation_view.h index d469268..fd18f4d6 100644 --- a/ash/ambient/ui/ambient_animation_view.h +++ b/ash/ambient/ui/ambient_animation_view.h
@@ -36,7 +36,7 @@ class AmbientAnimationProgressTracker; class AmbientAnimationStaticResources; class AmbientAnimationShieldController; -class AmbientMultiScreenMetricsRecorder; +class AmbientSessionMetricsRecorder; class AmbientViewDelegateImpl; class ASH_EXPORT AmbientAnimationView : public views::View, @@ -51,7 +51,7 @@ AmbientViewDelegateImpl* view_delegate, AmbientAnimationProgressTracker* progress_tracker, std::unique_ptr<const AmbientAnimationStaticResources> static_resources, - AmbientMultiScreenMetricsRecorder* multi_screen_metrics_recorder, + AmbientSessionMetricsRecorder* session_metrics_recorder, AmbientAnimationFrameRateController* frame_rate_controller); AmbientAnimationView(const AmbientAnimationView&) = delete; AmbientAnimationView& operator=(AmbientAnimationView&) = delete; @@ -60,7 +60,7 @@ JitterCalculator* GetJitterCalculatorForTesting(); private: - void Init(AmbientMultiScreenMetricsRecorder* multi_screen_metrics_recorder); + void Init(AmbientSessionMetricsRecorder* session_metrics_recorder); void AnimationCycleEnded(const lottie::Animation* animation) override;
diff --git a/ash/ambient/ui/ambient_container_view.cc b/ash/ambient/ui/ambient_container_view.cc index ede191e..ced6c7e 100644 --- a/ash/ambient/ui/ambient_container_view.cc +++ b/ash/ambient/ui/ambient_container_view.cc
@@ -7,7 +7,7 @@ #include <memory> #include <utility> -#include "ash/ambient/metrics/ambient_multi_screen_metrics_recorder.h" +#include "ash/ambient/metrics/ambient_session_metrics_recorder.h" #include "ash/ambient/resources/ambient_animation_static_resources.h" #include "ash/ambient/ui/ambient_animation_view.h" #include "ash/ambient/ui/ambient_view_delegate.h" @@ -30,10 +30,10 @@ AmbientViewDelegateImpl* delegate, AmbientAnimationProgressTracker* progress_tracker, std::unique_ptr<AmbientAnimationStaticResources> animation_static_resources, - AmbientMultiScreenMetricsRecorder* multi_screen_metrics_recorder, + AmbientSessionMetricsRecorder* session_metrics_recorder, AmbientAnimationFrameRateController* frame_rate_controller) { CHECK(delegate); - CHECK(multi_screen_metrics_recorder); + CHECK(session_metrics_recorder); InitializeCommonSettings(); View* main_rendering_view = nullptr; AmbientTheme theme = animation_static_resources @@ -42,10 +42,10 @@ if (animation_static_resources) { main_rendering_view = AddChildView(std::make_unique<AmbientAnimationView>( delegate, progress_tracker, std::move(animation_static_resources), - multi_screen_metrics_recorder, frame_rate_controller)); + session_metrics_recorder, frame_rate_controller)); } else { main_rendering_view = AddChildView(std::make_unique<PhotoView>(delegate)); - multi_screen_metrics_recorder->RegisterScreen(/*animation=*/nullptr); + session_metrics_recorder->RegisterScreen(/*animation=*/nullptr); } orientation_metrics_recorder_ = std::make_unique<ambient::AmbientOrientationMetricsRecorder>( @@ -55,17 +55,17 @@ AmbientContainerView::AmbientContainerView( AmbientTheme theme, std::unique_ptr<views::View> main_rendering_view, - AmbientMultiScreenMetricsRecorder* multi_screen_metrics_recorder) { + AmbientSessionMetricsRecorder* session_metrics_recorder) { CHECK(main_rendering_view); - CHECK(multi_screen_metrics_recorder); + CHECK(session_metrics_recorder); InitializeCommonSettings(); // Set up metrics common to all ambient UIs. // // TODO(esum): Find a way of recording multi-screen metrics without requiring - // the caller to pass in a |AmbientMultiScreenMetricsRecorder|. Ideally, we + // the caller to pass in a |AmbientSessionMetricsRecorder|. Ideally, we // just make a function call here or instantiate a private member as is done // for |orientation_metrics_recorder_|. - multi_screen_metrics_recorder->RegisterScreen(/*animation=*/nullptr); + session_metrics_recorder->RegisterScreen(/*animation=*/nullptr); orientation_metrics_recorder_ = std::make_unique<ambient::AmbientOrientationMetricsRecorder>( main_rendering_view.get(), theme);
diff --git a/ash/ambient/ui/ambient_container_view.h b/ash/ambient/ui/ambient_container_view.h index 2599702..a7a802c 100644 --- a/ash/ambient/ui/ambient_container_view.h +++ b/ash/ambient/ui/ambient_container_view.h
@@ -16,7 +16,7 @@ class AmbientAnimationFrameRateController; class AmbientAnimationProgressTracker; class AmbientAnimationStaticResources; -class AmbientMultiScreenMetricsRecorder; +class AmbientSessionMetricsRecorder; class AmbientViewDelegateImpl; namespace ambient { @@ -40,16 +40,15 @@ AmbientAnimationProgressTracker* progress_tracker, std::unique_ptr<AmbientAnimationStaticResources> animation_static_resources, - AmbientMultiScreenMetricsRecorder* multi_screen_metrics_recorder, + AmbientSessionMetricsRecorder* session_metrics_recorder, AmbientAnimationFrameRateController* frame_rate_controller); // |main_rendering_view| should contain the primary content; it becomes a // child of |AmbientContainerView|, and |AmbientContainerView| sets up some // parameters in the view hierarchy that are common to all ambient UIs. - AmbientContainerView( - AmbientTheme theme, - std::unique_ptr<views::View> main_rendering_view, - AmbientMultiScreenMetricsRecorder* multi_screen_metrics_recorder); + AmbientContainerView(AmbientTheme theme, + std::unique_ptr<views::View> main_rendering_view, + AmbientSessionMetricsRecorder* session_metrics_recorder); ~AmbientContainerView() override; private:
diff --git a/ash/app_list/views/search_box_view.cc b/ash/app_list/views/search_box_view.cc index ea24c2f..3c30311 100644 --- a/ash/app_list/views/search_box_view.cc +++ b/ash/app_list/views/search_box_view.cc
@@ -31,6 +31,7 @@ #include "ash/strings/grit/ash_strings.h" #include "ash/style/ash_color_id.h" #include "ash/style/ash_color_provider.h" +#include "ash/style/typography.h" #include "base/i18n/rtl.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" @@ -47,6 +48,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/chromeos/styles/cros_tokens_color_mappings.h" +#include "ui/color/color_id.h" #include "ui/color/color_provider_manager.h" #include "ui/compositor/layer.h" #include "ui/compositor/paint_recorder.h" @@ -175,6 +177,12 @@ base::UmaHistogramEnumeration("Apps.AppListSearchAutocomplete", match_type); } +ui::ColorId GetFocusColorId(bool use_jelly_colors) { + return use_jelly_colors + ? static_cast<ui::ColorId>(cros_tokens::kCrosSysFocusRing) + : ui::kColorAshFocusRing; +} + } // namespace class SearchBoxView::FocusRingLayer : public ui::Layer, ui::LayerDelegate { @@ -229,13 +237,23 @@ bool is_app_list_bubble) : delegate_(delegate), view_delegate_(view_delegate), - is_app_list_bubble_(is_app_list_bubble) { + is_app_list_bubble_(is_app_list_bubble), + is_jelly_enabled_(chromeos::features::IsJellyEnabled()) { AppListModelProvider* const model_provider = AppListModelProvider::Get(); model_provider->AddObserver(this); SearchBoxModel* const search_box_model = model_provider->search_model()->search_box(); search_box_model_observer_.Observe(search_box_model); + if (is_jelly_enabled_) { + auto font_list = TypographyProvider::Get()->ResolveTypographyToken( + TypographyToken::kCrosBody1); + SetPreferredStyleForSearchboxText(font_list, + cros_tokens::kCrosSysOnSurface); + SetPreferredStyleForAutocompleteText(font_list, + cros_tokens::kCrosSysOnSurfaceVariant); + } + views::ImageButton* close_button = CreateCloseButton(base::BindRepeating( &SearchBoxView::CloseButtonPressed, base::Unretained(this))); std::u16string close_button_label( @@ -400,15 +418,23 @@ } void SearchBoxView::UpdatePlaceholderTextStyle() { + SkColor primary_color = + is_jelly_enabled_ + ? GetColorProvider()->GetColor(cros_tokens::kCrosSysOnSurface) + : AshColorProvider::Get()->GetContentLayerColor( + AshColorProvider::ContentLayerType::kTextColorPrimary); + SkColor secondary_color = + is_jelly_enabled_ + ? GetColorProvider()->GetColor(cros_tokens::kCrosSysOnSurfaceVariant) + : AshColorProvider::Get()->GetContentLayerColor( + AshColorProvider::ContentLayerType::kTextColorSecondary); if (is_app_list_bubble_) { // The bubble launcher text is always side-aligned. search_box()->set_placeholder_text_draw_flags( base::i18n::IsRTL() ? gfx::Canvas::TEXT_ALIGN_RIGHT : gfx::Canvas::TEXT_ALIGN_LEFT); // Bubble launcher uses standard text colors (light-on-dark by default). - search_box()->set_placeholder_text_color( - AshColorProvider::Get()->GetContentLayerColor( - AshColorProvider::ContentLayerType::kTextColorSecondary)); + search_box()->set_placeholder_text_color(secondary_color); return; } // Fullscreen launcher centers the text when inactive. @@ -418,9 +444,8 @@ : gfx::Canvas::TEXT_ALIGN_LEFT) : gfx::Canvas::TEXT_ALIGN_CENTER); // Fullscreen launcher uses custom colors (dark-on-light by default). - search_box()->set_placeholder_text_color(GetColorProvider()->GetColor( - is_search_box_active() ? kColorAshTextColorSecondary - : kColorAshTextColorPrimary)); + search_box()->set_placeholder_text_color( + is_search_box_active() ? secondary_color : primary_color); } void SearchBoxView::UpdateSearchBoxBorder() { @@ -445,9 +470,10 @@ if (search_box()->HasFocus() && IsTrimmedQueryEmpty(current_query_)) { gfx::Point icon_origin; views::View::ConvertPointToTarget(search_icon(), this, &icon_origin); - PaintFocusBar(canvas, gfx::Point(0, icon_origin.y()), - /*height=*/GetSearchBoxIconSize(), - GetColorProvider()->GetColor(ui::kColorAshFocusRing)); + PaintFocusBar( + canvas, gfx::Point(0, icon_origin.y()), + /*height=*/GetSearchBoxIconSize(), + GetColorProvider()->GetColor(GetFocusColorId(is_jelly_enabled_))); } } } @@ -483,7 +509,7 @@ if (focus_ring_layer_) { focus_ring_layer_->SetColor( - GetColorProvider()->GetColor(ui::kColorAshFocusRing)); + GetColorProvider()->GetColor(GetFocusColorId(is_jelly_enabled_))); } UpdateSearchIcon(); @@ -505,7 +531,7 @@ if (!is_app_list_bubble_) { focus_ring_layer_ = std::make_unique<FocusRingLayer>(); focus_ring_layer_->SetColor( - GetColorProvider()->GetColor(ui::kColorAshFocusRing)); + GetColorProvider()->GetColor(GetFocusColorId(is_jelly_enabled_))); layer()->parent()->Add(focus_ring_layer_.get()); layer()->parent()->StackAtBottom(focus_ring_layer_.get()); UpdateSearchBoxFocusPaint(); @@ -655,14 +681,18 @@ if (is_app_list_bubble_) { return app_list_widget->GetColorProvider()->GetColor( - kColorAshControlBackgroundColorInactive); + is_jelly_enabled_ + ? static_cast<ui::ColorId>(cros_tokens::kCrosSysSystemBaseElevated) + : kColorAshControlBackgroundColorInactive); } if (search_result_page_visible_) return SK_ColorTRANSPARENT; return app_list_widget->GetColorProvider()->GetColor( - kColorAshShieldAndBase80); + is_jelly_enabled_ + ? static_cast<ui::ColorId>(cros_tokens::kCrosSysSystemBaseElevated) + : kColorAshShieldAndBase80); } void SearchBoxView::ProcessAutocomplete( @@ -854,8 +884,11 @@ } void SearchBoxView::UpdateTextColor() { - search_box()->SetTextColor( - GetColorProvider()->GetColor(kColorAshTextColorPrimary)); + ui::ColorId color_id = + is_jelly_enabled_ + ? static_cast<ui::ColorId>(cros_tokens::kCrosSysOnSurface) + : kColorAshTextColorPrimary; + search_box()->SetTextColor(GetColorProvider()->GetColor(color_id)); } void SearchBoxView::UpdatePlaceholderTextAndAccessibleName() {
diff --git a/ash/app_list/views/search_box_view.h b/ash/app_list/views/search_box_view.h index 1dbdd99..e190344 100644 --- a/ash/app_list/views/search_box_view.h +++ b/ash/app_list/views/search_box_view.h
@@ -284,6 +284,8 @@ // instead of the one picked randomly. bool use_fixed_placeholder_text_for_test_ = false; + const bool is_jelly_enabled_ = false; + base::ScopedObservation<SearchBoxModel, SearchBoxModelObserver> search_box_model_observer_{this};
diff --git a/ash/capture_mode/camera_video_frame_handler.cc b/ash/capture_mode/camera_video_frame_handler.cc index 51d5cc7..399c9907 100644 --- a/ash/capture_mode/camera_video_frame_handler.cc +++ b/ash/capture_mode/camera_video_frame_handler.cc
@@ -349,7 +349,8 @@ mailboxes_[plane] = shared_image_interface->CreateSharedImage( gmb.get(), gmb_manager, buffer_planes_[plane], frame_info->color_space.value_or(gfx::ColorSpace()), - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, kSharedImageUsage); + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, kSharedImageUsage, + "CameraVideoFrame"); } // Since this is the first time we create the shared images in `mailboxes_`,
diff --git a/ash/components/arc/bluetooth/bluetooth_type_converters.cc b/ash/components/arc/bluetooth/bluetooth_type_converters.cc index b6c94e3a..2ffbc9b 100644 --- a/ash/components/arc/bluetooth/bluetooth_type_converters.cc +++ b/ash/components/arc/bluetooth/bluetooth_type_converters.cc
@@ -277,11 +277,16 @@ } const std::string* uuid = protocol_record_sequence[0].value().GetIfString(); - int uuid_actual; - if (!base::StringToInt(*uuid, &uuid_actual)) { + if (!uuid) { + continue; + } + std::vector<uint8_t> uuid_as_bytes = + device::BluetoothUUID(*uuid).GetBytes(); + if (uuid_as_bytes.empty()) { break; } - if (uuid_actual != UUID_PROTOCOL_RFCOMM) { + if ((static_cast<uint16_t>(uuid_as_bytes[2] << 8) | + static_cast<uint16_t>(uuid_as_bytes[3])) != UUID_PROTOCOL_RFCOMM) { continue; } absl::optional<int> channel_number =
diff --git a/ash/components/arc/metrics/arc_metrics_service.cc b/ash/components/arc/metrics/arc_metrics_service.cc index ec2420a13..0e5f803 100644 --- a/ash/components/arc/metrics/arc_metrics_service.cc +++ b/ash/components/arc/metrics/arc_metrics_service.cc
@@ -713,6 +713,13 @@ UMA_HISTOGRAM_ENUMERATION("Arc.LowLatencyStylusLibraryApisCounter", api_id); } +void ArcMetricsService::ReportVpnServiceBuilderCompatApiUsage( + mojom::VpnServiceBuilderCompatApiId api_id) { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + base::UmaHistogramEnumeration("Arc.VpnServiceBuilderCompatApisCounter", + api_id); +} + void ArcMetricsService::ReportLowLatencyStylusLibPredictionTarget( mojom::LowLatencyStylusLibPredictionTargetPtr prediction_target) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
diff --git a/ash/components/arc/metrics/arc_metrics_service.h b/ash/components/arc/metrics/arc_metrics_service.h index b21ccf0b..eedab29 100644 --- a/ash/components/arc/metrics/arc_metrics_service.h +++ b/ash/components/arc/metrics/arc_metrics_service.h
@@ -138,6 +138,8 @@ mojom::LowLatencyStylusLibApiId api_id) override; void ReportLowLatencyStylusLibPredictionTarget( mojom::LowLatencyStylusLibPredictionTargetPtr prediction_target) override; + void ReportVpnServiceBuilderCompatApiUsage( + mojom::VpnServiceBuilderCompatApiId api_id) override; void ReportEntireFixupMetrics(base::TimeDelta duration, uint32_t number_of_directories, uint32_t number_of_failures) override;
diff --git a/ash/components/arc/metrics/arc_metrics_service_unittest.cc b/ash/components/arc/metrics/arc_metrics_service_unittest.cc index 7c22a5b..f381003 100644 --- a/ash/components/arc/metrics/arc_metrics_service_unittest.cc +++ b/ash/components/arc/metrics/arc_metrics_service_unittest.cc
@@ -464,6 +464,23 @@ static_cast<base::HistogramBase::Sample>(1), 2); } +TEST_F(ArcMetricsServiceTest, ReportVpnServiceBuilderCompatApiUsage) { + base::HistogramTester tester; + + service()->ReportVpnServiceBuilderCompatApiUsage( + mojom::VpnServiceBuilderCompatApiId::kVpnExcludeRoute); + service()->ReportVpnServiceBuilderCompatApiUsage( + mojom::VpnServiceBuilderCompatApiId::kVpnAddRoute); + + tester.ExpectBucketCount( + "Arc.VpnServiceBuilderCompatApisCounter", + static_cast<int>(mojom::VpnServiceBuilderCompatApiId::kVpnExcludeRoute), + 1); + tester.ExpectBucketCount( + "Arc.VpnServiceBuilderCompatApisCounter", + static_cast<int>(mojom::VpnServiceBuilderCompatApiId::kVpnAddRoute), 1); +} + class ArcVmArcMetricsServiceTest : public ArcMetricsServiceTest, public testing::WithParamInterface<
diff --git a/ash/components/arc/mojom/metrics.mojom b/ash/components/arc/mojom/metrics.mojom index aa64fb1..722fe84 100644 --- a/ash/components/arc/mojom/metrics.mojom +++ b/ash/components/arc/mojom/metrics.mojom
@@ -1,7 +1,7 @@ // Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Next MinVersion: 29 +// Next MinVersion: 30 module arc.mojom; import "mojo/public/mojom/base/time.mojom"; @@ -312,6 +312,22 @@ kGLInkOverlaySetViewMatrix = 4, }; +// Enumerates the API call from ChromeOS VPN service builder compat +// that provides functionality for Vpn exclude and add route +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused +[Extensible] +enum VpnServiceBuilderCompatApiId { + // If the library version doesn't support an API call, the API + // call will be recorded as UNSUPPORTED. + [Default] kUnsupported = 0, + + // com.google.android.chromeos.vpn.VpnServiceBuilderCompat + kVpnExcludeRoute = 1, + + // com.google.android.chromeos.vpn.VpnServiceBuilderCompat + kVpnAddRoute = 2, +}; // Status for migration of the main account hash code from v2 to v3. // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. @@ -373,7 +389,7 @@ }; // Deprecated method IDs: 25 -// Next method ID: 32 +// Next method ID: 33 interface MetricsHost { // Reports boot progress events from ARC instance. ReportBootProgress@0(array<BootProgressEvent> events, @@ -511,6 +527,10 @@ // Reports first WebView started event to collect WebView usage in ARC. [MinVersion=27] ReportWebViewProcessStarted@31(); + + // Reports api usage of vpn exclude route. + [MinVersion=29] ReportVpnServiceBuilderCompatApiUsage@32 + (VpnServiceBuilderCompatApiId api_id); }; // Deprecated method IDs: 0
diff --git a/ash/fast_ink/fast_ink_host_frame_utils.cc b/ash/fast_ink/fast_ink_host_frame_utils.cc index 357b1a3b..96ef5bc 100644 --- a/ash/fast_ink/fast_ink_host_frame_utils.cc +++ b/ash/fast_ink/fast_ink_host_frame_utils.cc
@@ -146,9 +146,10 @@ gpu::GpuMemoryBufferManager* gmb_manager = aura::Env::GetInstance()->context_factory()->GetGpuMemoryBufferManager(); - resource->mailbox = sii->CreateSharedImage( - gpu_memory_buffer, gmb_manager, gfx::ColorSpace(), - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage); + resource->mailbox = + sii->CreateSharedImage(gpu_memory_buffer, gmb_manager, gfx::ColorSpace(), + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, + usage, "FastInkHostUIResource"); resource->sync_token = sii->GenVerifiedSyncToken(); resource->damaged = true; resource->is_overlay_candidate = is_overlay_candidate;
diff --git a/ash/fast_ink/view_tree_host_root_view_frame_factory.cc b/ash/fast_ink/view_tree_host_root_view_frame_factory.cc index 775082a..606fb1f 100644 --- a/ash/fast_ink/view_tree_host_root_view_frame_factory.cc +++ b/ash/fast_ink/view_tree_host_root_view_frame_factory.cc
@@ -105,7 +105,8 @@ aura::Env::GetInstance()->context_factory()->GetGpuMemoryBufferManager(); resource->mailbox = sii->CreateSharedImage( resource->gpu_memory_buffer.get(), gmb_manager, gfx::ColorSpace(), - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage); + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, + "FastInkRootViewFrame"); resource->sync_token = sii->GenVerifiedSyncToken(); resource->damaged = true;
diff --git a/ash/public/cpp/wallpaper/wallpaper_controller.h b/ash/public/cpp/wallpaper/wallpaper_controller.h index 3509810..864e659 100644 --- a/ash/public/cpp/wallpaper/wallpaper_controller.h +++ b/ash/public/cpp/wallpaper/wallpaper_controller.h
@@ -31,6 +31,7 @@ class WallpaperControllerObserver; class WallpaperControllerClient; +class WallpaperDragDropDelegate; class WallpaperDriveFsDelegate; // Used by Chrome to set the wallpaper displayed by ash. @@ -50,6 +51,12 @@ // Sets the client interface, used to show the wallpaper picker, etc. virtual void SetClient(WallpaperControllerClient* client) = 0; + // Gets/sets the delegate for drag-and-drop events over the wallpaper. + // NOTE: May be `nullptr` when drag-and-drop related features are disabled. + virtual WallpaperDragDropDelegate* GetDragDropDelegate() = 0; + virtual void SetDragDropDelegate( + std::unique_ptr<WallpaperDragDropDelegate> delegate) = 0; + virtual void SetDriveFsDelegate( std::unique_ptr<WallpaperDriveFsDelegate> drivefs_delegate) = 0;
diff --git a/ash/rounded_display/rounded_display_frame_factory.cc b/ash/rounded_display/rounded_display_frame_factory.cc index 576537d9..51d6eff 100644 --- a/ash/rounded_display/rounded_display_frame_factory.cc +++ b/ash/rounded_display/rounded_display_frame_factory.cc
@@ -160,7 +160,8 @@ aura::Env::GetInstance()->context_factory()->GetGpuMemoryBufferManager(); resource->mailbox = sii->CreateSharedImage( gpu_memory_buffer.get(), gmb_manager, gfx::ColorSpace(), - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage); + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, + "RoundedDisplayFrameUi"); resource->sync_token = sii->GenVerifiedSyncToken(); resource->damaged = true;
diff --git a/ash/search_box/search_box_view_base.cc b/ash/search_box/search_box_view_base.cc index cab5b473..3312318 100644 --- a/ash/search_box/search_box_view_base.cc +++ b/ash/search_box/search_box_view_base.cc
@@ -18,6 +18,7 @@ #include "third_party/skia/include/core/SkPath.h" #include "ui/base/ime/text_input_flags.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/color/color_id.h" #include "ui/events/event.h" #include "ui/gfx/canvas.h" #include "ui/gfx/color_palette.h" @@ -80,16 +81,17 @@ void SetupLabelView(views::Label* label, const gfx::FontList& font_list, - gfx::Insets border_insets) { + gfx::Insets border_insets, + ui::ColorId color_id) { label->SetHorizontalAlignment(gfx::ALIGN_LEFT); label->GetViewAccessibility().OverrideIsIgnored(true); label->SetBackgroundColor(SK_ColorTRANSPARENT); label->SetAutoColorReadabilityEnabled(false); - label->SetEnabledColorId(kColorAshTextColorSuggestion); + label->SetEnabledColorId(color_id); + label->SetFontList(font_list); label->SetVisible(true); label->SetElideBehavior(gfx::ELIDE_TAIL); label->SetMultiLine(false); - label->SetFontList(font_list); label->SetBorder(views::CreateEmptyBorder(border_insets)); } @@ -372,13 +374,12 @@ search_icon_->layer()->SetFillsBoundsOpaquely(false); search_box_->SetBorder(views::NullBorder()); - search_box_->SetTextColor(kSearchTextColor); search_box_->SetBackgroundColor(SK_ColorTRANSPARENT); search_box_->set_controller(this); search_box_->SetTextInputType(ui::TEXT_INPUT_TYPE_SEARCH); search_box_->SetTextInputFlags(ui::TEXT_INPUT_FLAG_AUTOCORRECT_OFF); auto font_list = search_box_->GetFontList().DeriveWithSizeDelta(2); - search_box_->SetFontList(font_list); + SetPreferredStyleForSearchboxText(font_list, kSearchTextColor); search_box_->SetCursorEnabled(is_search_box_active_); text_container_ = content_container_->AddChildView( @@ -415,10 +416,7 @@ category_ghost_text_ = ghost_text_container_->AddChildView(std::make_unique<views::Label>()); - SetupLabelView(separator_label_, font_list, kGhostTextLabelPadding); - SetupLabelView(autocomplete_ghost_text_, font_list, kGhostTextLabelPadding); - SetupLabelView(category_separator_label_, font_list, kGhostTextLabelPadding); - SetupLabelView(category_ghost_text_, font_list, kGhostTextLabelPadding); + SetPreferredStyleForAutocompleteText(font_list, kColorAshTextColorSuggestion); separator_label_->SetText( l10n_util::GetStringUTF16(IDS_ASH_SEARCH_RESULT_SEPARATOR)); @@ -655,6 +653,26 @@ void SearchBoxViewBase::UpdateSearchBoxFocusPaint() {} +void SearchBoxViewBase::SetPreferredStyleForAutocompleteText( + const gfx::FontList& font_list, + ui::ColorId text_color_id) { + SetupLabelView(separator_label_, font_list, kGhostTextLabelPadding, + text_color_id); + SetupLabelView(autocomplete_ghost_text_, font_list, kGhostTextLabelPadding, + text_color_id); + SetupLabelView(category_separator_label_, font_list, kGhostTextLabelPadding, + text_color_id); + SetupLabelView(category_ghost_text_, font_list, kGhostTextLabelPadding, + text_color_id); +} + +void SearchBoxViewBase::SetPreferredStyleForSearchboxText( + const gfx::FontList& font_list, + ui::ColorId text_color_id) { + search_box_->SetTextColor(text_color_id); + search_box_->SetFontList(font_list); +} + void SearchBoxViewBase::UpdateButtonsVisibility() { DCHECK(close_button_);
diff --git a/ash/search_box/search_box_view_base.h b/ash/search_box/search_box_view_base.h index bb0a8c4..20b1128 100644 --- a/ash/search_box/search_box_view_base.h +++ b/ash/search_box/search_box_view_base.h
@@ -12,6 +12,7 @@ #include "base/functional/bind.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/events/types/event_type.h" +#include "ui/gfx/font_list.h" #include "ui/gfx/geometry/insets.h" #include "ui/views/background.h" #include "ui/views/controls/button/image_button.h" @@ -206,6 +207,12 @@ // Update search box border based on whether the search box is activated. virtual void UpdateSearchBoxBorder() {} + // Updates the style of the searchbox labels and textfield. + void SetPreferredStyleForAutocompleteText(const gfx::FontList& font_list, + ui::ColorId text_color_id); + void SetPreferredStyleForSearchboxText(const gfx::FontList& font_list, + ui::ColorId text_color_id); + private: void OnEnabledChanged();
diff --git a/ash/system/video_conference/video_conference_tray_controller.cc b/ash/system/video_conference/video_conference_tray_controller.cc index af613db..185e7fc 100644 --- a/ash/system/video_conference/video_conference_tray_controller.cc +++ b/ash/system/video_conference/video_conference_tray_controller.cc
@@ -246,10 +246,15 @@ microphone_muted_by_hardware_switch_ = method == CrasAudioHandler::InputMuteChangeMethod::kPhysicalShutter; + + // Reset the speak-on-mute notification timer when change to mute so user can + // get instant speak-on-mute notification when they mute their microphone. + if (mute_on) { + last_speak_on_mute_notification_time_.reset(); + } } void VideoConferenceTrayController::OnSpeakOnMuteDetected() { - // TODO(b/273374112): Add unit test for this toast. const base::TimeTicks current_time = base::TimeTicks::Now(); if (!last_speak_on_mute_notification_time_.has_value() ||
diff --git a/ash/system/video_conference/video_conference_tray_controller_unittest.cc b/ash/system/video_conference/video_conference_tray_controller_unittest.cc index dfa8b1e..6c7af01 100644 --- a/ash/system/video_conference/video_conference_tray_controller_unittest.cc +++ b/ash/system/video_conference/video_conference_tray_controller_unittest.cc
@@ -25,6 +25,9 @@ namespace ash { namespace { +constexpr char kVideoConferenceTraySpeakOnMuteDetectedId[] = + "video_conference_tray_toast_ids.speak_on_mute_detected"; + constexpr char kVideoConferenceTrayUseWhileDisabledToastId[] = "video_conference_tray_toast_ids.use_while_disable"; } // namespace @@ -271,4 +274,37 @@ toast_manager->GetCurrentToastDataForTesting().text); } -} // namespace ash \ No newline at end of file +TEST_F(VideoConferenceTrayControllerTest, SpeakOnMuteToast) { + auto* toast_manager = Shell::Get()->toast_manager(); + + // No toast show be shown before `OnSpeakOnMuteDetected()` is called. + EXPECT_FALSE( + toast_manager->IsRunning(kVideoConferenceTraySpeakOnMuteDetectedId)); + + // Toast should be displayed. Showing that client is speaking while on mute. + controller()->OnSpeakOnMuteDetected(); + EXPECT_TRUE( + toast_manager->IsRunning(kVideoConferenceTraySpeakOnMuteDetectedId)); + + toast_manager->Cancel(kVideoConferenceTraySpeakOnMuteDetectedId); + + // Toast should not be displayed as there is a cool down period for the toast. + controller()->OnSpeakOnMuteDetected(); + EXPECT_FALSE( + toast_manager->IsRunning(kVideoConferenceTraySpeakOnMuteDetectedId)); + + controller()->OnInputMuteChanged( + /*mute_on=*/false, + CrasAudioHandler::InputMuteChangeMethod::kPhysicalShutter); + controller()->OnInputMuteChanged( + /*mute_on=*/true, + CrasAudioHandler::InputMuteChangeMethod::kPhysicalShutter); + + // Toast should be displayed again as the mute action will reset the toast + // cool down timer. + controller()->OnSpeakOnMuteDetected(); + EXPECT_TRUE( + toast_manager->IsRunning(kVideoConferenceTraySpeakOnMuteDetectedId)); +} + +} // namespace ash
diff --git a/ash/wallpaper/wallpaper_controller_impl.cc b/ash/wallpaper/wallpaper_controller_impl.cc index 8adee16..2220f015 100644 --- a/ash/wallpaper/wallpaper_controller_impl.cc +++ b/ash/wallpaper/wallpaper_controller_impl.cc
@@ -31,6 +31,7 @@ #include "ash/shell.h" #include "ash/style/dark_light_mode_controller_impl.h" #include "ash/system/scheduled_feature/scheduled_feature.h" +#include "ash/wallpaper/wallpaper_drag_drop_delegate.h" #include "ash/wallpaper/wallpaper_image_downloader.h" #include "ash/wallpaper/wallpaper_metrics_manager.h" #include "ash/wallpaper/wallpaper_pref_manager.h" @@ -846,6 +847,15 @@ variant_info_fetcher_->SetClient(client); } +WallpaperDragDropDelegate* WallpaperControllerImpl::GetDragDropDelegate() { + return drag_drop_delegate_.get(); +} + +void WallpaperControllerImpl::SetDragDropDelegate( + std::unique_ptr<WallpaperDragDropDelegate> delegate) { + drag_drop_delegate_ = std::move(delegate); +} + void WallpaperControllerImpl::SetDriveFsDelegate( std::unique_ptr<WallpaperDriveFsDelegate> drivefs_delegate) { DCHECK(!drivefs_delegate_);
diff --git a/ash/wallpaper/wallpaper_controller_impl.h b/ash/wallpaper/wallpaper_controller_impl.h index 0521b55..0caa4a7 100644 --- a/ash/wallpaper/wallpaper_controller_impl.h +++ b/ash/wallpaper/wallpaper_controller_impl.h
@@ -237,6 +237,9 @@ // WallpaperController: void SetClient(WallpaperControllerClient* client) override; + WallpaperDragDropDelegate* GetDragDropDelegate() override; + void SetDragDropDelegate( + std::unique_ptr<WallpaperDragDropDelegate> delegate) override; void SetDriveFsDelegate( std::unique_ptr<WallpaperDriveFsDelegate> drivefs_delegate) override; void Init(const base::FilePath& user_data, @@ -792,6 +795,10 @@ // Manages interactions with relevant preferences. std::unique_ptr<WallpaperPrefManager> pref_manager_; + // The delegate for drag-and-drop events over the wallpaper. + // NOTE: May be `nullptr` when drag-and-drop related features are disabled. + std::unique_ptr<WallpaperDragDropDelegate> drag_drop_delegate_; + std::unique_ptr<WallpaperDriveFsDelegate> drivefs_delegate_; // Asynchronous task to extract colors from the wallpaper.
diff --git a/ash/wallpaper/wallpaper_drag_drop_delegate.cc b/ash/wallpaper/wallpaper_drag_drop_delegate.cc new file mode 100644 index 0000000..ea0e6b8 --- /dev/null +++ b/ash/wallpaper/wallpaper_drag_drop_delegate.cc
@@ -0,0 +1,41 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/wallpaper/wallpaper_drag_drop_delegate.h" + +#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h" + +namespace ash { + +WallpaperDragDropDelegate::WallpaperDragDropDelegate() = default; + +WallpaperDragDropDelegate::~WallpaperDragDropDelegate() = default; + +void WallpaperDragDropDelegate::GetDropFormats( + int* formats, + std::set<ui::ClipboardFormatType>* types) {} + +bool WallpaperDragDropDelegate::CanDrop(const ui::OSExchangeData& data) { + return false; +} + +void WallpaperDragDropDelegate::OnDragEntered( + const ui::OSExchangeData& data, + const gfx::Point& location_in_screen) {} + +ui::DragDropTypes::DragOperation WallpaperDragDropDelegate::OnDragUpdated( + const ui::OSExchangeData& data, + const gfx::Point& location_in_screen) { + return ui::DragDropTypes::DragOperation::DRAG_NONE; +} + +void WallpaperDragDropDelegate::OnDragExited() {} + +ui::mojom::DragOperation WallpaperDragDropDelegate::OnDrop( + const ui::OSExchangeData& data, + const gfx::Point& location_in_screen) { + return ui::mojom::DragOperation::kNone; +} + +} // namespace ash
diff --git a/ash/wallpaper/wallpaper_drag_drop_delegate.h b/ash/wallpaper/wallpaper_drag_drop_delegate.h new file mode 100644 index 0000000..f7cd875 --- /dev/null +++ b/ash/wallpaper/wallpaper_drag_drop_delegate.h
@@ -0,0 +1,71 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_WALLPAPER_WALLPAPER_DRAG_DROP_DELEGATE_H_ +#define ASH_WALLPAPER_WALLPAPER_DRAG_DROP_DELEGATE_H_ + +#include <set> + +#include "ash/ash_export.h" +#include "ui/base/dragdrop/drag_drop_types.h" +#include "ui/base/dragdrop/mojom/drag_drop_types.mojom-forward.h" + +namespace gfx { +class Point; +} // namespace gfx + +namespace ui { +class ClipboardFormatType; +class OSExchangeData; +} // namespace ui + +namespace ash { + +// The singleton delegate, owned by the `WallpaperControllerImpl`, for +// drag-and-drop events over the wallpaper. Note that the delegate may not exist +// if drag-and-drop related features are disabled. +class ASH_EXPORT WallpaperDragDropDelegate { + public: + WallpaperDragDropDelegate(); + WallpaperDragDropDelegate(const WallpaperDragDropDelegate&) = delete; + WallpaperDragDropDelegate& operator=(const WallpaperDragDropDelegate&) = + delete; + virtual ~WallpaperDragDropDelegate(); + + // Returns the `formats` and `types` of interesting data. The delegate will + // not receive events for drag-and-drop sequences which do not contain + // interesting data. + virtual void GetDropFormats(int* formats, + std::set<ui::ClipboardFormatType>* types); + + // Returns whether the delegate can handle a drop of the specified + // interesting `data`. If `false` is returned, the delegate will not receive + // further events for the current drag-and-drop sequence. + virtual bool CanDrop(const ui::OSExchangeData& data); + + // Invoked when interesting `data` is dragged over the wallpaper at the + // specified `location_in_screen` coordinates. + virtual void OnDragEntered(const ui::OSExchangeData& data, + const gfx::Point& location_in_screen); + + // Invoked when interesting `data` is dragged within the wallpaper at the + // specified `location_in_screen` coordinates. This method should return the + // drag operation supported. + virtual ui::DragDropTypes::DragOperation OnDragUpdated( + const ui::OSExchangeData& data, + const gfx::Point& location_in_screen); + + // Invoked when interesting `data` is dragged out of the wallpaper. + virtual void OnDragExited(); + + // Invoked when interesting `data` is dropped onto the wallpaper at the + // specified `location_in_screen` coordinates. This method should return the + // drag operation supported. + virtual ui::mojom::DragOperation OnDrop(const ui::OSExchangeData& data, + const gfx::Point& location_in_screen); +}; + +} // namespace ash + +#endif // ASH_WALLPAPER_WALLPAPER_DRAG_DROP_DELEGATE_H_
diff --git a/ash/wallpaper/wallpaper_drag_drop_delegate_unittest.cc b/ash/wallpaper/wallpaper_drag_drop_delegate_unittest.cc new file mode 100644 index 0000000..75c4bac --- /dev/null +++ b/ash/wallpaper/wallpaper_drag_drop_delegate_unittest.cc
@@ -0,0 +1,279 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/wallpaper/wallpaper_drag_drop_delegate.h" + +#include <memory> +#include <set> + +#include "ash/drag_drop/drag_drop_controller.h" +#include "ash/drag_drop/draggable_test_view.h" +#include "ash/public/cpp/test/shell_test_api.h" +#include "ash/public/cpp/wallpaper/wallpaper_controller.h" +#include "ash/test/ash_test_base.h" +#include "base/strings/strcat.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/events/test/event_generator.h" +#include "ui/views/widget/widget.h" + +namespace ash { +namespace { + +// Aliases. +using testing::Invoke; +using testing::Return; +using testing::StrictMock; +using testing::WithArg; + +// MockWallpaperDragDropDelegate ----------------------------------------------- + +// A mock implementation of `WallpaperDragDropDelegate` for testing. +class MockWallpaperDragDropDelegate : public WallpaperDragDropDelegate { + public: + // WallpaperDragDropDelegate: + MOCK_METHOD(void, + GetDropFormats, + (int* formats, std::set<ui::ClipboardFormatType>* types), + (override)); + + MOCK_METHOD(bool, CanDrop, (const ui::OSExchangeData& data), (override)); + + MOCK_METHOD(void, + OnDragEntered, + (const ui::OSExchangeData& data, + const gfx::Point& location_in_screen), + (override)); + + MOCK_METHOD(ui::DragDropTypes::DragOperation, + OnDragUpdated, + (const ui::OSExchangeData& data, + const gfx::Point& location_in_screen), + (override)); + + MOCK_METHOD(void, OnDragExited, (), (override)); + + MOCK_METHOD(ui::mojom::DragOperation, + OnDrop, + (const ui::OSExchangeData& data, + const gfx::Point& location_in_screen), + (override)); +}; + +} // namespace + +// WallpaperDragDropDelegateTest ----------------------------------------------- + +enum class Scenario { + kWithoutDelegate, + kWithDelegateAndInterestingPayload, + kWithDelegateAndInterestingButRejectedPayload, + kWithDelegateAndUninterestingPayload, +}; + +// Base class for tests of `WallpaperDragDropDelegate`, parameterized by testing +// scenario and whether or not to drop data over the wallpaper. +class WallpaperDragDropDelegateTest + : public AshTestBase, + public testing::WithParamInterface< + std::tuple<Scenario, /*drop_over_wallpaper=*/bool>> { + public: + // Returns the `delegate_` for drag-and-drop events over the wallpaper. + // NOTE: May be `nullptr` depending on test parameterization. + StrictMock<MockWallpaperDragDropDelegate>* delegate() { return delegate_; } + + // Returns whether data should be dropped over the wallpaper given test + // parameterization. + bool drop_over_wallpaper() const { return std::get<1>(GetParam()); } + + // Returns the testing scenario given parameterization. + Scenario scenario() const { return std::get<0>(GetParam()); } + + // Returns the `widget_` from which data can be drag-and-dropped. + views::Widget* widget() { return widget_.get(); } + + // Moves the mouse to the center of the specified `widget`. + void MoveMouseTo(views::Widget* widget) { + GetEventGenerator()->MoveMouseTo( + widget->GetWindowBoundsInScreen().CenterPoint(), /*count=*/10); + } + + // Moves the mouse by the specified `x` and `y` offsets. + void MoveMouseBy(int x, int y) { + auto* event_generator = GetEventGenerator(); + event_generator->MoveMouseTo( + event_generator->current_screen_location() + gfx::Vector2d(x, y), + /*count=*/10); + } + + // Performs a press/release of the left mouse button. + void PressLeftButton() { GetEventGenerator()->PressLeftButton(); } + void ReleaseLeftButton() { GetEventGenerator()->ReleaseLeftButton(); } + + // Verifies that any previously set expectations of the drag-and-drop + // `delegate_` have been fulfilled, and resets expectations to their initial + // state. No-ops if `delegate_` does not exist. + void VerifyAndResetExpectations() { + if (!delegate_) { + return; + } + + testing::Mock::VerifyAndClearExpectations(delegate_); + + ON_CALL(*delegate_, CanDrop) + .WillByDefault(testing::Return( + scenario() != + Scenario::kWithDelegateAndInterestingButRejectedPayload)); + + ON_CALL(*delegate_, GetDropFormats) + .WillByDefault(testing::Invoke( + [&](int* formats, std::set<ui::ClipboardFormatType>* types) { + if (scenario() != + Scenario::kWithDelegateAndUninterestingPayload) { + *formats |= OSExchangeData::Format::STRING; + } + })); + + ON_CALL(*delegate_, OnDragUpdated) + .WillByDefault( + testing::Return(ui::DragDropTypes::DragOperation::DRAG_COPY)); + } + + private: + // AshTestBase: + void SetUp() override { + AshTestBase::SetUp(); + + // Prevent blocking during drag-and-drop sequences. + ShellTestApi().drag_drop_controller()->set_should_block_during_drag_drop( + false); + + // Create and show a `widget_` from which data can be drag-and-dropped. + widget_ = CreateFramelessTestWidget(); + widget_->SetContentsView(std::make_unique<DraggableTestView>()); + widget_->CenterWindow(gfx::Size(100, 100)); + widget_->Show(); + + if (scenario() == Scenario::kWithoutDelegate) { + return; + } + + // Initialize and set default expectations for the `delegate_` for + // drag-and-drop events over the wallpaper. + auto delegate = + std::make_unique<StrictMock<MockWallpaperDragDropDelegate>>(); + delegate_ = delegate.get(); + VerifyAndResetExpectations(); + WallpaperController::Get()->SetDragDropDelegate(std::move(delegate)); + } + + void TearDown() override { + widget_->CloseNow(); + widget_.reset(); + + if (delegate_) { + WallpaperController::Get()->SetDragDropDelegate(nullptr); + delegate_ = nullptr; + } + + AshTestBase::TearDown(); + } + + // The delegate, owned by the `WallpaperControllerImpl`, for drag-and-drop + // events over the wallpaper. May be `nullptr` depending on test + // parameterization. + StrictMock<MockWallpaperDragDropDelegate>* delegate_ = nullptr; + + // The widget from which data can be drag-and-dropped. + std::unique_ptr<views::Widget> widget_; +}; + +INSTANTIATE_TEST_SUITE_P( + All, + WallpaperDragDropDelegateTest, + testing::Combine( + testing::Values(Scenario::kWithoutDelegate, + Scenario::kWithDelegateAndInterestingPayload, + Scenario::kWithDelegateAndInterestingButRejectedPayload, + Scenario::kWithDelegateAndUninterestingPayload), + /*drop_over_wallpaper=*/testing::Bool()), + [](const auto& info) { + std::string scenario; + switch (/*scenario=*/std::get<0>(info.param)) { + case Scenario::kWithoutDelegate: + scenario = "WithoutDelegate"; + break; + case Scenario::kWithDelegateAndInterestingPayload: + scenario = "WithDelegateAndInterestingPayload"; + break; + case Scenario::kWithDelegateAndInterestingButRejectedPayload: + scenario = "WithDelegateAndInterestingButRejectedPayload"; + break; + case Scenario::kWithDelegateAndUninterestingPayload: + scenario = "WithDelegateAndUninterestingPayload"; + break; + } + return base::StrCat({/*drop_over_wallpaper=*/std::get<1>(info.param) + ? "OverWallpaper" + : "OverWidget", + scenario}); + }); + +// Tests ----------------------------------------------------------------------- + +// Verifies that drag-and-drop events propagate as expected given the presence/ +// absence of a delegate and various parameterized testing scenarios. +TEST_P(WallpaperDragDropDelegateTest, DragAndDrop) { + // Initiate a drag from `widget()`. + MoveMouseTo(widget()); + PressLeftButton(); + + // The data will be dragged from `widget()` over the wallpaper. The sequence + // of expected events depends on the presence/absence of the `delegate()` and + // the parameterized testing `scenario()`. + if (delegate()) { + testing::InSequence sequence; + EXPECT_CALL(*delegate(), GetDropFormats); + if (scenario() != Scenario::kWithDelegateAndUninterestingPayload) { + EXPECT_CALL(*delegate(), CanDrop); + if (scenario() != + Scenario::kWithDelegateAndInterestingButRejectedPayload) { + EXPECT_CALL(*delegate(), OnDragEntered); + EXPECT_CALL(*delegate(), OnDragUpdated).Times(testing::AtLeast(1)); + } + } + } + + // Drag the data from `widget()` over the wallpaper. + MoveMouseBy(/*x=*/widget()->GetWindowBoundsInScreen().width(), /*y=*/0); + VerifyAndResetExpectations(); + + // The data will be dropped over either the wallpaper or the `widget()`. The + // sequence of expected events depends on the presence/absence of the + // `delegate()` and the paramaterized testing `scenario()`. + if (delegate()) { + if (scenario() == Scenario::kWithDelegateAndInterestingPayload) { + if (drop_over_wallpaper()) { + EXPECT_CALL(*delegate(), OnDrop); + } else { + testing::InSequence sequence; + EXPECT_CALL(*delegate(), OnDragUpdated).Times(testing::AtLeast(1)); + EXPECT_CALL(*delegate(), OnDragExited); + } + } + } + + // If the data should not be dropped over the wallpaper, drag the data back + // over the `widget()`. + if (!drop_over_wallpaper()) { + MoveMouseTo(widget()); + } + + // Drop the drag data over either the wallpaper or the `widget()`. + ReleaseLeftButton(); + VerifyAndResetExpectations(); +} + +} // namespace ash
diff --git a/ash/wallpaper/wallpaper_view.cc b/ash/wallpaper/wallpaper_view.cc index 540a165..51257e7 100644 --- a/ash/wallpaper/wallpaper_view.cc +++ b/ash/wallpaper/wallpaper_view.cc
@@ -10,10 +10,13 @@ #include "ash/session/session_controller_impl.h" #include "ash/shell.h" #include "ash/wallpaper/wallpaper_controller_impl.h" +#include "ash/wallpaper/wallpaper_drag_drop_delegate.h" #include "ash/wallpaper/wallpaper_widget_controller.h" #include "ash/wm/tablet_mode/tablet_mode_controller.h" #include "cc/paint/render_surface_filters.h" #include "ui/aura/window.h" +#include "ui/base/dragdrop/drag_drop_types.h" +#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h" #include "ui/compositor/layer.h" #include "ui/display/display.h" #include "ui/display/manager/display_manager.h" @@ -30,6 +33,14 @@ namespace { +// Returns the delegate, owned by the `WallpaperControllerImpl`, for +// drag-and-drop events over the wallpaper. May be `nullptr` if drag-and-drop +// related features are disabled. +WallpaperDragDropDelegate* GetDragDropDelegate() { + auto* controller = Shell::Get()->wallpaper_controller(); + return controller ? controller->GetDragDropDelegate() : nullptr; +} + // A view that controls the child view's layer so that the layer always has the // same size as the display's original, un-scaled size in DIP. The layer is then // transformed to fit to the virtual screen size when laid-out. This is to avoid @@ -113,6 +124,64 @@ shield_view_->SetBoundsRect(parent()->GetLocalBounds()); } +bool WallpaperView::AreDropTypesRequired() { + return true; +} + +bool WallpaperView::CanDrop(const ui::OSExchangeData& data) { + if (auto* drag_drop_delegate = GetDragDropDelegate()) { + return drag_drop_delegate->CanDrop(data); + } + return false; +} + +views::View::DropCallback WallpaperView::GetDropCallback( + const ui::DropTargetEvent& event) { + const gfx::Point location_in_screen = + views::View::ConvertPointToScreen(this, event.location()); + return base::BindOnce( + [](const gfx::Point& location_in_screen, const ui::DropTargetEvent& event, + ui::mojom::DragOperation& output_drag_op, + std::unique_ptr<ui::LayerTreeOwner> drag_image_layer_owner) { + if (auto* drag_drop_delegate = GetDragDropDelegate()) { + output_drag_op = + drag_drop_delegate->OnDrop(event.data(), location_in_screen); + } + }, + location_in_screen); +} + +bool WallpaperView::GetDropFormats(int* formats, + std::set<ui::ClipboardFormatType>* types) { + if (auto* drag_drop_delegate = GetDragDropDelegate()) { + drag_drop_delegate->GetDropFormats(formats, types); + } + return *formats || types->size(); +} + +void WallpaperView::OnDragEntered(const ui::DropTargetEvent& event) { + if (auto* drag_drop_delegate = GetDragDropDelegate()) { + drag_drop_delegate->OnDragEntered( + event.data(), + views::View::ConvertPointToScreen(this, event.location())); + } +} + +int WallpaperView::OnDragUpdated(const ui::DropTargetEvent& event) { + if (auto* drag_drop_delegate = GetDragDropDelegate()) { + return drag_drop_delegate->OnDragUpdated( + event.data(), + views::View::ConvertPointToScreen(this, event.location())); + } + return ui::DragDropTypes::DRAG_NONE; +} + +void WallpaperView::OnDragExited() { + if (auto* drag_drop_delegate = GetDragDropDelegate()) { + drag_drop_delegate->OnDragExited(); + } +} + void WallpaperView::ShowContextMenuForViewImpl(views::View* source, const gfx::Point& point, ui::MenuSourceType source_type) {
diff --git a/ash/wallpaper/wallpaper_view.h b/ash/wallpaper/wallpaper_view.h index 30a19fea..a56c592 100644 --- a/ash/wallpaper/wallpaper_view.h +++ b/ash/wallpaper/wallpaper_view.h
@@ -5,13 +5,15 @@ #ifndef ASH_WALLPAPER_WALLPAPER_VIEW_H_ #define ASH_WALLPAPER_WALLPAPER_VIEW_H_ +#include <set> + #include "ash/wallpaper/wallpaper_base_view.h" #include "ash/wallpaper/wallpaper_constants.h" #include "ui/views/context_menu_controller.h" namespace aura { class Window; -} +} // namespace aura namespace ash { @@ -43,6 +45,13 @@ const char* GetClassName() const override; bool OnMousePressed(const ui::MouseEvent& event) override; void OnBoundsChanged(const gfx::Rect& previous_bounds) override; + bool AreDropTypesRequired() override; + bool CanDrop(const ui::OSExchangeData& data) override; + DropCallback GetDropCallback(const ui::DropTargetEvent& event) override; + bool GetDropFormats(int*, std::set<ui::ClipboardFormatType>*) override; + void OnDragEntered(const ui::DropTargetEvent& event) override; + int OnDragUpdated(const ui::DropTargetEvent& event) override; + void OnDragExited() override; // views::ContextMenuController: void ShowContextMenuForViewImpl(views::View* source,
diff --git a/ash/webui/shortcut_customization_ui/resources/css/shortcut_customization_shared.css b/ash/webui/shortcut_customization_ui/resources/css/shortcut_customization_shared.css index 8ec1843..d68a1916 100644 --- a/ash/webui/shortcut_customization_ui/resources/css/shortcut_customization_shared.css +++ b/ash/webui/shortcut_customization_ui/resources/css/shortcut_customization_shared.css
@@ -4,13 +4,11 @@ /* #css_wrapper_metadata_start * #type=style + * #import=chrome://resources/cr_elements/chromeos/cros_color_overrides.css.js * #import=chrome://resources/cr_elements/cr_shared_vars.css.js + * #include=cros-color-overrides * #css_wrapper_metadata_end */ -html { - background-color: var(--cros-bg-color); -} - :host { --shortcuts-font-weight-regular: 400; --shortcuts-font-weight-medium: 500;
diff --git a/ash/webui/shortcut_customization_ui/resources/index.html b/ash/webui/shortcut_customization_ui/resources/index.html index 2bcc39c..b4bfd25 100644 --- a/ash/webui/shortcut_customization_ui/resources/index.html +++ b/ash/webui/shortcut_customization_ui/resources/index.html
@@ -11,6 +11,10 @@ background-color: var(--cros-bg-color); } + html:has(body.jelly-enabled) { + background-color: var(--cros-sys-app_base); + } + body { margin: 0; }
diff --git a/ash/webui/shortcut_customization_ui/resources/js/accelerator_edit_dialog.html b/ash/webui/shortcut_customization_ui/resources/js/accelerator_edit_dialog.html index 38ab858..52fbf46a 100644 --- a/ash/webui/shortcut_customization_ui/resources/js/accelerator_edit_dialog.html +++ b/ash/webui/shortcut_customization_ui/resources/js/accelerator_edit_dialog.html
@@ -1,4 +1,8 @@ <style include="shortcut-customization-shared"> + :host-context(body.jelly-enabled) #addIcon { + --iron-icon-fill-color: var(--cros-sys-on_primary_container); + } + #acceleratorViewList { display: grid; row-gap: 5px;
diff --git a/ash/webui/shortcut_customization_ui/resources/js/input_key.html b/ash/webui/shortcut_customization_ui/resources/js/input_key.html index 6e1689d..82dabd7 100644 --- a/ash/webui/shortcut_customization_ui/resources/js/input_key.html +++ b/ash/webui/shortcut_customization_ui/resources/js/input_key.html
@@ -1,4 +1,18 @@ <style> + :host { + --key-modifier-selected-bg-color: var(--cros-highlight-color); + --key-modifier-selected-shadow-color: var(--cros-highlight-color); + --key-not-selected-border-color: var(--google-grey-200); + --key-not-selected-shadow-color: var(--google-grey-200); + } + + :host-context(body.jelly-enabled) { + --key-modifier-selected-bg-color: var(--cros-sys-highlight_shape); + --key-modifier-selected-shadow-color: var(--cros-sys-highlight_shape); + --key-not-selected-border-color: var(--cros-sys-on_surface); + --key-not-selected-shadow-color: var(--cros-sys-on_surface); + } + .key-container { align-items: center; border-radius: 12px; @@ -24,16 +38,16 @@ } :host([key-state='not-selected']) .key-container { - border-color: var(--google-grey-200); + border-color: var(--key-not-selected-border-color); border-style: solid; border-width: thin; - box-shadow: 0 1px 1px var(--google-grey-200); + box-shadow: 0 1px 1px var(--key-not-selected-shadow-color); } :host([key-state='modifier-selected']) .key-container { - background-color: var(--cros-highlight-color); + background-color: var(--key-modifier-selected-bg-color); border: none; - box-shadow: 0 1px 1px var(--cros-highlight-color); + box-shadow: 0 1px 1px var(--key-modifier-selected-shadow-color); } :host([key-state='modifier-selected']:not([key='meta'])) .key-container {
diff --git a/ash/webui/shortcut_customization_ui/resources/js/search/search_box.html b/ash/webui/shortcut_customization_ui/resources/js/search/search_box.html index 587613a..ecb015d58 100644 --- a/ash/webui/shortcut_customization_ui/resources/js/search/search_box.html +++ b/ash/webui/shortcut_customization_ui/resources/js/search/search_box.html
@@ -1,4 +1,4 @@ -<style> +<style include="cros-color-overrides"> :host { --cr-toolbar-search-field-background: var(--cros-toolbar-search-bg-color); @@ -13,20 +13,6 @@ width: var(--cr-toolbar-field-width); } - cr-toolbar-search-field { - --cr-toolbar-search-field-border-radius: 20px; - --cr-toolbar-search-field-paper-spinner-margin: 0 12px; - --cr-toolbar-search-field-input-icon-color: - var(--cros-icon-color-primary); - --cr-toolbar-search-field-input-text-color: - var(--cros-text-color-primary); - --cr-toolbar-search-field-input-caret-color: currentColor; - --cr-toolbar-search-field-prompt-color: - var(--cros-text-color-secondary); - --cr-toolbar-icon-button-focus-outline-color: - var(--cros-focus-ring-color); - } - :host(:focus-within) cr-toolbar-search-field { --cr-toolbar-search-field-background: var(--cros-bg-color-elevation-3); box-shadow: var(--cr-elevation-1); @@ -49,6 +35,18 @@ padding-bottom: var(--separator-height); } + :host-context(body:not(.jelly-enabled)) cr-toolbar-search-field { + --cr-toolbar-search-field-input-icon-color: + var(--cros-icon-color-primary); + --cr-toolbar-search-field-input-text-color: + var(--cros-text-color-primary); + --cr-toolbar-search-field-input-caret-color: var(--cros-text-color-primary); + --cr-toolbar-search-field-prompt-color: + var(--cros-text-color-secondary); + --cr-toolbar-icon-button-focus-outline-color: + var(--cros-focus-ring-color); + } + iron-dropdown { margin-top: 72px; } @@ -70,6 +68,11 @@ user-select: none; } + cr-toolbar-search-field { + --cr-toolbar-search-field-border-radius: 20px; + --cr-toolbar-search-field-paper-spinner-margin: 0 12px; + } + #noSearchResultsContainer { color: var(--cros-text-color-secondary); height: 32px;
diff --git a/ash/webui/shortcut_customization_ui/resources/js/search/search_box.ts b/ash/webui/shortcut_customization_ui/resources/js/search/search_box.ts index 2c11d72..b5b353d5 100644 --- a/ash/webui/shortcut_customization_ui/resources/js/search/search_box.ts +++ b/ash/webui/shortcut_customization_ui/resources/js/search/search_box.ts
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'chrome://resources/cr_elements/chromeos/cros_color_overrides.css.js'; import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js'; import './search_result_row.js'; import 'chrome://resources/polymer/v3_0/iron-dropdown/iron-dropdown.js';
diff --git a/ash/webui/shortcut_customization_ui/resources/js/search/search_result_row.html b/ash/webui/shortcut_customization_ui/resources/js/search/search_result_row.html index 94e12f1..ec5238a5 100644 --- a/ash/webui/shortcut_customization_ui/resources/js/search/search_result_row.html +++ b/ash/webui/shortcut_customization_ui/resources/js/search/search_result_row.html
@@ -1,14 +1,25 @@ -<style include="cr-shared-style"> +<style include="cr-shared-style cros-color-overrides"> :host { width: 100%; + --result-bg-color-selected: var(--cros-highlight-color); + --result-bg-color-not-selected-hover: var(--cros-highlight-color-hover); + } + + :host-context(body.jelly-enabled) { + --result-bg-color-selected: var(--cros-sys-highlight_shape); + --result-bg-color-not-selected-hover: var(--cros-sys-hover_on_subtle); + } + + :host-context(body.jelly-enabled) #description { + color: var(--cros-sys-on_surface); } :host([selected]) [focus-row-container] { - background-color: var(--cros-highlight-color); + background-color: var(--result-bg-color-selected); } :host(:not([selected])) [focus-row-container]:hover { - background-color: var(--cros-highlight-color-hover); + background-color: var(--result-bg-color-not-selected-hover); } #searchResultRowInner {
diff --git a/ash/webui/shortcut_customization_ui/resources/js/search/search_result_row.ts b/ash/webui/shortcut_customization_ui/resources/js/search/search_result_row.ts index 34b9460b..27f692f9 100644 --- a/ash/webui/shortcut_customization_ui/resources/js/search/search_result_row.ts +++ b/ash/webui/shortcut_customization_ui/resources/js/search/search_result_row.ts
@@ -1,6 +1,8 @@ // Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + +import 'chrome://resources/cr_elements/chromeos/cros_color_overrides.css.js'; import 'chrome://resources/cr_elements/cr_shared_style.css.js'; import '../text_accelerator.js';
diff --git a/base/BUILD.gn b/base/BUILD.gn index a3a28db7..afe52c06 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -4277,6 +4277,7 @@ "android/java/src/org/chromium/base/Promise.java", "android/java/src/org/chromium/base/RadioUtils.java", "android/java/src/org/chromium/base/RequiredCallback.java", + "android/java/src/org/chromium/base/ResettersForTesting.java", "android/java/src/org/chromium/base/StreamUtil.java", "android/java/src/org/chromium/base/StrictModeContext.java", "android/java/src/org/chromium/base/SysUtils.java", @@ -4487,6 +4488,7 @@ "test/android/javatests/src/org/chromium/base/test/LoadNative.java", "test/android/javatests/src/org/chromium/base/test/MockitoErrorHandler.java", "test/android/javatests/src/org/chromium/base/test/ResetCachedFlagValuesTestHook.java", + "test/android/javatests/src/org/chromium/base/test/ResettersForTestingTestRule.java", "test/android/javatests/src/org/chromium/base/test/ScreenshotOnFailureStatement.java", "test/android/javatests/src/org/chromium/base/test/TestListInstrumentationRunListener.java", "test/android/javatests/src/org/chromium/base/test/TestTraceEvent.java", @@ -4632,6 +4634,7 @@ "android/junit/src/org/chromium/base/PathUtilsTest.java", "android/junit/src/org/chromium/base/PiiEliderTest.java", "android/junit/src/org/chromium/base/PromiseTest.java", + "android/junit/src/org/chromium/base/ResettersForTestingTest.java", "android/junit/src/org/chromium/base/TimeUtilsTest.java", "android/junit/src/org/chromium/base/TraceEventTest.java", "android/junit/src/org/chromium/base/UnownedUserDataHostTest.java",
diff --git a/base/android/java/src/org/chromium/base/ResettersForTesting.java b/base/android/java/src/org/chromium/base/ResettersForTesting.java new file mode 100644 index 0000000..ecd25b0d --- /dev/null +++ b/base/android/java/src/org/chromium/base/ResettersForTesting.java
@@ -0,0 +1,120 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.base; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedHashSet; + +/** + * ResettersForTesting provides functionality for reset values set for testing. This class is used + * directly by test runners, but lives in prod code to simplify usage. + * + * It is required to invoke {@link #register(Runnable)} whenever a method called `set*ForTesting`, + * such `setFooForTesting(Foo foo)` is invoked. Typical usage looks like this: + * + * <code> + * class MyClass { + * private static MyClass sInstance; + * + * public static MyClass getInstance() { + * if (sInstance == null) sInstance = new MyClass(); + * return sInstance; + * } + * + * public static void setMyClassForTesting(MyClass myClassObj) { + * sInstance = myClassObj; + * ResettersForTesting.register(() -> sInstance = null); + * } + * } + * </code> + * + * This is not only used for singleton instances, but can also be used for resetting other static + * members. + * + * <code> + * class NeedsFoo { + * private static Foo sFooForTesting; + * + * public void doThing() { + * Foo foo; + * if (sFooForTesting != null) { + * foo = sFooForTesting; + * } else {* foo = new FooImpl(); + * } + * foo.doItsThing(); + * } + * + * public static void setFooForTesting(Foo foo) { + * sFooForTesting = foo; + * ResettersForTesting.register(() -> sFooForTesting = null); + * } + * } + * </code> + * + * For cases where it is important that a particular resetter runs only once, even if the + * `set*ForTesting` method is invoked multiple times, there is another variation that can be used. + * In particular, since a lambda always ends up creating a new instance in Chromium builds, we can + * avoid this by having a single static instance of the resetter, like this: + * + * <code> + * private static class NeedsFooSingleDestroy { + * private static final class LazyHolder { + * private static Foo INSTANCE = new Foo(); + * } + * + * private static LazyHolder sFoo; + * + * private static Runnable sOneShotResetter = () -> { + * sFoo.INSTANCE.destroy(); + * sFoo = new Foo(); + * }; + * + * public static void setFooForTesting(Foo foo) { + * sFoo.INSTANCE = foo; + * ResettersForTesting.register(sResetter); + * } + * } + * </code> + */ +public class ResettersForTesting { + // LinkedHashSet is a set that provides ordering and enables one-shot resetters to only be + // invoked once. For example, the following `sResetter` will only be in the set a single time. + // <code> + // private static final Runnable sResetter = () -> { ... } + // ... + // ResettersForTesting.register(sResetter); + // </code> + private static final LinkedHashSet<Runnable> sResetters = new LinkedHashSet<>(); + + /** + * Register a {@link Runnable} that will automatically execute during test tear down. + * @param runnable the {@link Runnable} to execute. + */ + public static void register(Runnable runnable) { + synchronized (sResetters) { + sResetters.add(runnable); + } + } + + /** + * Execute and clear all the currently registered resetters. + * + * This is not intended to be invoked manually, but is intended to be invoked by the test + * runners automatically during tear down. + */ + public static void executeResetters() { + ArrayList<Runnable> resetters; + synchronized (sResetters) { + resetters = new ArrayList<>(sResetters); + sResetters.clear(); + } + + // Ensure that resetters are run in reverse order, enabling nesting of values as well as + // being more similar to C++ destruction order. + Collections.reverse(resetters); + for (Runnable resetter : resetters) resetter.run(); + } +}
diff --git a/base/android/junit/src/org/chromium/base/ResettersForTestingTest.java b/base/android/junit/src/org/chromium/base/ResettersForTestingTest.java new file mode 100644 index 0000000..eb369f61a --- /dev/null +++ b/base/android/junit/src/org/chromium/base/ResettersForTestingTest.java
@@ -0,0 +1,145 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.base; + +import static junit.framework.Assert.assertEquals; + +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.annotation.Config; + +import org.chromium.base.test.BaseRobolectricTestRunner; + +/** + * Unit tests for {@link ResettersForTesting}. + */ +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class ResettersForTestingTest { + private static class ResetsToNull { + public static String str; + public static void setStrForTesting(String newStr) { + str = newStr; + ResettersForTesting.register(() -> str = null); + } + } + + private static class ResetsToOldValue { + public static String str; + + public static void setStrForTesting(String newStr) { + String oldValue = str; + str = newStr; + ResettersForTesting.register(() -> str = oldValue); + } + } + + private static class ResetsToNullAndIncrements { + public static String str; + public static int resetCount; + + public static void setStrForTesting(String newStr) { + str = newStr; + ResettersForTesting.register(() -> { + str = null; + resetCount++; + }); + } + } + + private static class ResetsToNullAndIncrementsWithOneShotResetter { + public static String str; + public static int resetCount; + private static Runnable sResetter = () -> { + str = null; + resetCount++; + }; + + public static void setStrForTesting(String newStr) { + str = newStr; + ResettersForTesting.register(sResetter); + } + } + + @Test + public void testTypicalUsage() { + ResetsToNull.setStrForTesting("foo"); + assertEquals("foo", ResetsToNull.str); + ResettersForTesting.executeResetters(); + Assert.assertNull(ResetsToNull.str); + } + + @Test + public void testResetsToPreviousValue() { + // Inject a previous value to verify that we can get back to it. + ResetsToOldValue.str = "bar"; + + ResetsToOldValue.setStrForTesting("foo"); + assertEquals("foo", ResetsToOldValue.str); + + // After resetting the value, it should be back to the first value. + ResettersForTesting.executeResetters(); + assertEquals("bar", ResetsToOldValue.str); + } + + @Test + public void testMultipleResets() { + // Inject an outer value to verify we can get back to this. + ResetsToOldValue.str = "qux"; + + // Then set the next value. + ResetsToOldValue.setStrForTesting("foo"); + assertEquals("foo", ResetsToOldValue.str); + + // Now, next that value into another one to ensure the unwinding works. + ResetsToOldValue.setStrForTesting("bar"); + assertEquals("bar", ResetsToOldValue.str); + + // Since we are invoking the resetters in the reverse order, we should now be back to start. + ResettersForTesting.executeResetters(); + assertEquals("qux", ResetsToOldValue.str); + } + + @Test + public void testResettersExecutedOnlyOnce() { + // Force set this to 0 for this particular test. + ResetsToNullAndIncrements.resetCount = 0; + ResetsToNullAndIncrements.str = null; + + // Set the initial value and register the resetter. + ResetsToNullAndIncrements.setStrForTesting("some value"); + assertEquals("some value", ResetsToNullAndIncrements.str); + + // Now, execute all resetters and ensure it's only executed once. + ResettersForTesting.executeResetters(); + assertEquals(1, ResetsToNullAndIncrements.resetCount); + + // Execute the resetters again, and verify it does not invoke the same resetter again. + ResettersForTesting.executeResetters(); + assertEquals(1, ResetsToNullAndIncrements.resetCount); + } + + @Test + public void testResettersExecutedOnlyOnceForOneShotResetters() { + // Force set this to 0 for this particular test. + ResetsToNullAndIncrementsWithOneShotResetter.resetCount = 0; + ResetsToNullAndIncrementsWithOneShotResetter.str = null; + + // Set the initial value and register the resetter twice. + ResetsToNullAndIncrementsWithOneShotResetter.setStrForTesting("some value"); + ResetsToNullAndIncrementsWithOneShotResetter.setStrForTesting("some other value"); + assertEquals("some other value", ResetsToNullAndIncrementsWithOneShotResetter.str); + + // Now, execute all resetters and ensure it's only executed once, since it is a single + // instance of the same resetter. + ResettersForTesting.executeResetters(); + assertEquals(1, ResetsToNullAndIncrementsWithOneShotResetter.resetCount); + + // Execute the resetters again, and verify it does not invoke the same resetter again. + ResettersForTesting.executeResetters(); + assertEquals(1, ResetsToNullAndIncrementsWithOneShotResetter.resetCount); + } +}
diff --git a/base/message_loop/message_pump_glib.cc b/base/message_loop/message_pump_glib.cc index 7c046dc..dfc8a95 100644 --- a/base/message_loop/message_pump_glib.cc +++ b/base/message_loop/message_pump_glib.cc
@@ -103,6 +103,153 @@ // we run DoWork. That part will also run in the other event pumps. // - We also run DoWork, and possibly DoIdleWork, in the main loop, // around event handling. +// +// --------------------------------------------------------------------------- +// +// An overview on the way that we track work items: +// +// ScopedDoWorkItems are used by this pump to track native work. They are +// stored by value in |state_| and are set/cleared as the pump runs. Their +// setting and clearing is done in the functions +// {Set,Clear,EnsureSet,EnsureCleared}ScopedWorkItem. Control flow in GLib is +// quite non-obvious because chrome is not notified when a nested loop is +// entered/exited. To detect nested loops, MessagePumpGlib uses +// |state_->do_work_depth| which is incremented when DoWork is entered, and a +// GLib library function, g_main_depth(), which indicates the current number of +// Dispatch() calls on the stack. To react to them, two separate +// ScopedDoWorkItems are used (a standard one used for all native work, and a +// second one used exclusively for forcing nesting when there is a native loop +// spinning). Note that `ThreadController` flags all nesting as +// `Phase::kNested` so separating native and application work while nested isn't +// supported nor a goal. +// +// It should also be noted that a second GSource has been added to GLib, +// referred to as the "observer" source. It is used because in the case where +// native work occurs on wakeup that is higher priority than Chrome (all of +// GTK), chrome won't even get notified that the pump is awake. +// +// There are several cases to consider wrt. nesting level and order. In +// order, we have: +// A. [root] -> MessagePump::Run() -> native event -> g_main_context_iteration +// B. [root] -> MessagePump::Run() -> DoWork -> g_main_context_iteration +// C. [root] -> native -> DoWork -> MessagePump -> [...] +// The second two cases are identical for our purposes, and the last one turns +// out to be handled without any extra headache. +// +// Consider nesting case A, where native work is called from +// |g_main_context_iteration()| from the pump, and that native work spins up a +// loop. For our purposes, this is a nested loop, because control is not +// returned to the pump once one iteration of the pump is complete. In this +// case, the pump needs to enter nesting without DoWork being involved at +// all. This is accomplished using |MessagePumpGlib::NestIfRequired()|, which is +// called during the Prepare() phase of GLib. As the pump records state on entry +// and exit from GLib using |OnEntryToGlib| and |OnExitFromGlib|, we can compare +// |g_main_depth| at |HandlePrepare| with the one before we entered +// |g_main_context_iteration|. If it is higher, there is a native loop being +// spun, and |RegisterNesting| is called, forcing nesting by initializing two +// work items at once. These are destroyed after the exit from +// |g_main_context_iteration| using |OnExitFromGlib|. +// +// Then, considering nesting case B, |state_->do_work_depth| is incremented +// during any Chrome work, to allow the pump to detect re-entrancy during a +// chrome work item. This is required because `g_main_depth` is not incremented +// in any `DoWork` call not occuring during `Dispatch()` (i.e. during +// `MessagePumpGlib::Run()`). In this case, a nested loop is recorded, and the +// pump sets-and-clears scoped work items during Prepare, Check, and Dispatch. A +// work item can never be active when control flow returns to GLib (i.e. on +// return) during a nested loop, because the nested loop could exit at any +// point. This is fine because TimeKeeper is only concerned with the fact that a +// nested loop is in progress, as opposed to the various phases of the nested +// loop. +// +// Finally, consider nesting case C, where a native loop is spinning +// entirely outside of Chrome, such as inside a signal handler, the pump might +// create and destroy DoWorkItems during Prepare() and Check(), but these work +// items will always get cleared during Dispatch(), before the pump enters a +// DoWork(), leading to the pump showing non-nested native work without the +// thread controller being active, the correct situation (which won't occur +// outside of startup or shutdown). Once Dispatch() is called, the pump's +// nesting tracking works correctly, as state_->do_work_depth is increased, and +// upon re-entrancy we detect the nested loop, which is correct, as this is the +// only point at which the loop actually becomes "nested". +// +// ----------------------------------------------------------------------------- +// +// As an overview of the steps taken by MessagePumpGLib to ensure that nested +// loops are detected adequately during each phase of the GLib loop: +// +// 0: Before entering GLib: +// 0.1: Record state about current state of GLib (g_main_depth()) for +// case 1.1.2. +// +// 1: Prepare. +// 1.1: Detection of nested loops + +// 1.1.1: If |state_->do_work_depth| > 0, we are in nesting case B detailed +// above. A work item must be newly created during this function to +// trigger nesting, and is destroyed to ensure proper destruction order +// in the case where GLib quits after Prepare(). +// +// 1.1.2: Otherwise, check if we are in nesting case A above. If yes, trigger +// nesting using ScopedDoWorkItems. The nesting will be cleared at exit +// from GLib. +// +// This check occurs only in |HandleObserverPrepare|, not in +// |HandlePrepare|. +// +// A third party is running a glib message loop. Since Chrome work is +// registered with GLib at |G_PRIORITY_DEFAULT_IDLE|, a relatively low +// priority, sources of default-or-higher priority will be Dispatch()ed +// first. Since only one source is Dispatched per loop iteration, +// |HandlePrepare| can get called several times in a row in the case that +// there are any other events in the queue. A ScopedDoWorkItem is created +// and destroyed to record this. That work item triggers nesting. +// +// 1.2: Other considerations +// 1.2.1: Sleep occurs between Prepare() and Check(). If Chrome will pass a +// nonzero poll time to GLib, the inner ScopedDoWorkItem is cleared and +// BeforeWait() is called. In nesting case A, the nesting work item will +// not be cleared. A nested loop will typically not block. +// +// Since Prepare() is called before Check() in all cases, the bulk of +// nesting detection is done in Prepare(). +// +// 2: Check. +// 2.1: Detection of nested loops: +// 2.1.1: In nesting case B, |ClearScopedWorkItem()| on exit. A third party is +// running a glib message loop. It is possible that at any point the +// nested message loop will quit. In this case, we don't want to leave a +// nested DoWorkItem on the stack. +// +// 2.2: Other considerations +// 2.2.1: A ScopedDoWorkItem may be created (if it was not already present) at +// the entry to Check() to record a wakeup in the case that the pump +// slept. It is important to note that this occurs both in +// |HandleObserverCheck| and |HandleCheck| to ensure that at every point +// as the pump enters the Dispatch phase it is awake. In the case it is +// already awake, this is a very cheap operation. +// +// 3: Dispatch +// 3.1 Detection of nested loops +// 3.1.1: |state_->do_work_depth| is incremented on entry and decremented on +// exit. This is used to detect nesting case B. +// +// 3.1.2: Nested loops can be quit at any point, and so ScopedDoWorkItems can't +// be left on the stack for the same reasons as in 1.1.1/2.1.1. +// +// 3.2 Other considerations +// 3.2.1: Since DoWork creates its own work items, ScopedDoWorkItems are not +// used as this would trigger nesting in all cases. +// +// 4: Post GLib +// 4.1: Detection of nested loops +// 4.1.1: |state_->do_work_depth| is also increased during the DoWork in Run() +// as nesting in that case [calling glib from third party code] needs to +// clear all work items after return to avoid improper destruction order. +// +// 4.2: Other considerations: +// 4.2.1: DoWork uses its own work item, so no ScopedDoWorkItems are active in +// this case. struct WorkSource : public GSource { raw_ptr<MessagePumpGlib> pump; @@ -130,8 +277,28 @@ } // I wish these could be const, but g_source_new wants non-const. -GSourceFuncs WorkSourceFuncs = {WorkSourcePrepare, WorkSourceCheck, - WorkSourceDispatch, nullptr}; +GSourceFuncs g_work_source_funcs = {WorkSourcePrepare, WorkSourceCheck, + WorkSourceDispatch, nullptr}; + +struct ObserverSource : public GSource { + raw_ptr<MessagePumpGlib> pump; +}; + +gboolean ObserverPrepare(GSource* gsource, gint* timeout_ms) { + auto* source = static_cast<ObserverSource*>(gsource); + source->pump->HandleObserverPrepare(); + *timeout_ms = -1; + // We always want to poll. + return FALSE; +} + +gboolean ObserverCheck(GSource* gsource) { + auto* source = static_cast<ObserverSource*>(gsource); + return source->pump->HandleObserverCheck(); +} + +GSourceFuncs g_observer_funcs = {ObserverPrepare, ObserverCheck, nullptr, + nullptr}; struct FdWatchSource : public GSource { raw_ptr<MessagePumpGlib> pump; @@ -171,6 +338,25 @@ // Used to flag that the current Run() invocation should return ASAP. bool should_quit = false; + // Keeps track of the number of calls to DoWork() on the stack for the current + // Run() invocation. Used to detect reentrancy from DoWork in order to make + // decisions about tracking nested work. + int do_work_depth = 0; + + // Value of g_main_depth() captured before the call to + // g_main_context_iteration() in Run(). nullopt if Run() is not calling + // g_main_context_iteration(). Used to track whether the pump has forced a + // nested state due to a native pump. + absl::optional<int> g_depth_on_iteration; + + // Used to keep track of the native event work items processed by the message + // pump. + Delegate::ScopedDoWorkItem scoped_do_work_item; + + // Used to force the pump into a nested state when a native runloop was + // dispatched from main. + Delegate::ScopedDoWorkItem native_loop_do_work_item; + // The information of the next task available at this run-level. Stored in // RunState because different set of tasks can be accessible at various // run-levels (e.g. non-nestable tasks). @@ -199,8 +385,13 @@ wakeup_gpollfd_->fd = wakeup_pipe_read_; wakeup_gpollfd_->events = G_IO_IN; + observer_source_ = std::unique_ptr<GSource, GSourceDeleter>( + g_source_new(&g_observer_funcs, sizeof(ObserverSource))); + static_cast<ObserverSource*>(observer_source_.get())->pump = this; + g_source_attach(observer_source_.get(), context_); + work_source_ = std::unique_ptr<GSource, GSourceDeleter>( - g_source_new(&WorkSourceFuncs, sizeof(WorkSource))); + g_source_new(&g_work_source_funcs, sizeof(WorkSource))); static_cast<WorkSource*>(work_source_.get())->pump = this; g_source_add_poll(work_source_.get(), wakeup_gpollfd_.get()); g_source_set_priority(work_source_.get(), kPriorityWork); @@ -327,19 +518,74 @@ return controller->Attach(this); } +void MessagePumpGlib::HandleObserverPrepare() { + // |state_| may be null during tests. + if (!state_) { + return; + } + + if (state_->do_work_depth > 0) { + // Contingency 1.1.1 detailed above + SetScopedWorkItem(); + ClearScopedWorkItem(); + } else { + // Contingency 1.1.2 detailed above + NestIfRequired(); + } + + return; +} + +bool MessagePumpGlib::HandleObserverCheck() { + // |state_| may be null in tests. + if (!state_) { + return FALSE; + } + + // Make sure we record the fact that we're awake. Chrome won't get Check()ed + // if a higher priority work item returns TRUE from Check(). + EnsureSetScopedWorkItem(); + if (state_->do_work_depth > 0) { + // Contingency 2.1.1 + ClearScopedWorkItem(); + } + + // The observer never needs to run anything. + return FALSE; +} + // Return the timeout we want passed to poll. int MessagePumpGlib::HandlePrepare() { // |state_| may be null during tests. if (!state_) return 0; - return GetTimeIntervalMilliseconds(state_->next_work_info.delayed_run_time); + const int next_wakeup_millis = + GetTimeIntervalMilliseconds(state_->next_work_info.delayed_run_time); + if (next_wakeup_millis != 0) { + // When this is called, it is not possible to know for sure if a + // ScopedWorkItem is on the stack, because HandleObserverCheck may have set + // it during an iteration of the pump where a high priority native work item + // executed. + EnsureClearedScopedWorkItem(); + state_->delegate->BeforeWait(); + } + + return next_wakeup_millis; } bool MessagePumpGlib::HandleCheck() { if (!state_) // state_ may be null during tests. return false; + // Ensure pump is awake. + EnsureSetScopedWorkItem(); + + if (state_->do_work_depth > 0) { + // Contingency 2.1.1 + ClearScopedWorkItem(); + } + // We usually have a single message on the wakeup pipe, since we are only // signaled when the queue went from empty to non-empty, but there can be // two messages if a task posted a task, hence we read at most two bytes. @@ -371,7 +617,18 @@ } void MessagePumpGlib::HandleDispatch() { + // Contingency 3.2.1 + EnsureClearedScopedWorkItem(); + + // Contingency 3.1.1 + ++state_->do_work_depth; state_->next_work_info = state_->delegate->DoWork(); + --state_->do_work_depth; + + if (state_ && state_->do_work_depth > 0) { + // Contingency 3.1.2 + EnsureClearedScopedWorkItem(); + } } void MessagePumpGlib::Run(Delegate* delegate) { @@ -391,14 +648,28 @@ // callbacks. This is so we only quit our own loops, and we don't quit // nested loops run by others. TODO(deanm): Is this what we want? for (;;) { + // ScopedWorkItem to account for any native work until the runloop starts + // running chrome work. + SetScopedWorkItem(); + // Don't block if we think we have more work to do. bool block = !more_work_is_plausible; + OnEntryToGlib(); more_work_is_plausible = g_main_context_iteration(context_, block); + OnExitFromGlib(); + if (state_->should_quit) break; + // Contingency 4.2.1 + EnsureClearedScopedWorkItem(); + + // Contingency 4.1.1 + ++state_->do_work_depth; state_->next_work_info = state_->delegate->DoWork(); + --state_->do_work_depth; + more_work_is_plausible |= state_->next_work_info.is_immediate(); if (state_->should_quit) break; @@ -471,4 +742,128 @@ return state_->should_quit; } +void MessagePumpGlib::SetScopedWorkItem() { + // |state_| can be null during tests + if (!state_) { + return; + } + // If there exists a ScopedDoWorkItem in the current RunState, it cannot be + // overwritten. + CHECK(state_->scoped_do_work_item.IsNull()); + + // In the case that we're more than two work items deep, don't bother tracking + // individual native events anymore. Note that this won't cause out-of-order + // end work items, because the work item is cleared before entering the second + // DoWork(). + if (state_->do_work_depth < 2) { + state_->scoped_do_work_item = state_->delegate->BeginWorkItem(); + } +} + +void MessagePumpGlib::ClearScopedWorkItem() { + // |state_| can be null during tests + if (!state_) { + return; + } + + CHECK(!state_->scoped_do_work_item.IsNull()); + // See identical check in SetScopedWorkItem + if (state_->do_work_depth < 2) { + state_->scoped_do_work_item = Delegate::ScopedDoWorkItem(); + } +} + +void MessagePumpGlib::EnsureSetScopedWorkItem() { + // |state_| can be null during tests + if (!state_) { + return; + } + if (state_->scoped_do_work_item.IsNull()) { + SetScopedWorkItem(); + } +} + +void MessagePumpGlib::EnsureClearedScopedWorkItem() { + // |state_| can be null during tests + if (!state_) { + return; + } + if (!state_->scoped_do_work_item.IsNull()) { + ClearScopedWorkItem(); + } +} + +void MessagePumpGlib::RegisterNested() { + // |state_| can be null during tests + if (!state_) { + return; + } + CHECK(state_->native_loop_do_work_item.IsNull()); + + // Transfer `scoped_do_work_item` to `native_do_work_item`, and so the + // ephemeral `scoped_do_work_item` will be coming in and out of existence on + // top of `native_do_work_item`, whose state hasn't been deleted. + + if (state_->scoped_do_work_item.IsNull()) { + state_->native_loop_do_work_item = state_->delegate->BeginWorkItem(); + } else { + // This clears state_->scoped_do_work_item. + state_->native_loop_do_work_item = std::move(state_->scoped_do_work_item); + } + SetScopedWorkItem(); + ClearScopedWorkItem(); +} + +void MessagePumpGlib::UnregisterNested() { + // |state_| can be null during tests + if (!state_) { + return; + } + CHECK(!state_->native_loop_do_work_item.IsNull()); + + EnsureClearedScopedWorkItem(); + // Nesting exits here. + state_->native_loop_do_work_item = Delegate::ScopedDoWorkItem(); +} + +void MessagePumpGlib::NestIfRequired() { + // |state_| can be null during tests + if (!state_) { + return; + } + if (state_->native_loop_do_work_item.IsNull() && + state_->g_depth_on_iteration.has_value() && + g_main_depth() != state_->g_depth_on_iteration.value()) { + RegisterNested(); + } +} + +void MessagePumpGlib::UnnestIfRequired() { + // |state_| can be null during tests + if (!state_) { + return; + } + if (!state_->native_loop_do_work_item.IsNull()) { + UnregisterNested(); + } +} + +void MessagePumpGlib::OnEntryToGlib() { + // |state_| can be null during tests + if (!state_) { + return; + } + CHECK(!state_->g_depth_on_iteration.has_value()); + state_->g_depth_on_iteration.emplace(g_main_depth()); +} + +void MessagePumpGlib::OnExitFromGlib() { + // |state_| can be null during tests + if (!state_) { + return; + } + state_->g_depth_on_iteration.reset(); + UnnestIfRequired(); +} + } // namespace base
diff --git a/base/message_loop/message_pump_glib.h b/base/message_loop/message_pump_glib.h index 1b0fcce..647f3cc 100644 --- a/base/message_loop/message_pump_glib.h +++ b/base/message_loop/message_pump_glib.h
@@ -93,6 +93,12 @@ bool HandleCheck(); void HandleDispatch(); + // Very similar to the above, with the key difference that these functions are + // only used to track work items and never indicate work is available, and + // poll indefinitely. + void HandleObserverPrepare(); + bool HandleObserverCheck(); + // Overridden from MessagePump: void Run(Delegate* delegate) override; void Quit() override; @@ -131,6 +137,38 @@ raw_ptr<RunState> state_; + // Starts tracking a new work item and stores a `ScopedDoWorkItem` in + // `state_`. + void SetScopedWorkItem(); + // Gets rid of the current scoped work item. + void ClearScopedWorkItem(); + // Ensures there's a ScopedDoWorkItem at the current run-level. This can be + // useful for contexts where the caller can't tell whether they just woke up + // or are continuing from native work. + void EnsureSetScopedWorkItem(); + // Ensures there's no ScopedDoWorkItem at the current run-level. This can be + // useful in contexts where the caller knows that a sleep is imminent but + // doesn't know if the current context captures ongoing work (back from + // native). + void EnsureClearedScopedWorkItem(); + + // Called before entrance to g_main_context_iteration to record context + // related to nesting depth to track native nested loops which would otherwise + // be invisible. + void OnEntryToGlib(); + // Cleans up state set in OnEntryToGlib. + void OnExitFromGlib(); + // Forces the pump into a nested state by creating two work items back to + // back. + void RegisterNested(); + // Removes all of the pump's ScopedDoWorkItems to remove the state of nesting + // which was forced onto the pump. + void UnregisterNested(); + // Nest if pump is not already marked as nested. + void NestIfRequired(); + // Remove the nesting if the pump is nested. + void UnnestIfRequired(); + std::unique_ptr<GMainContext, GMainContextDeleter> owned_context_; // This is a GLib structure that we can add event sources to. On the main // thread, we use the default GLib context, which is the one to which all GTK @@ -141,6 +179,10 @@ // the message pump is destroyed. std::unique_ptr<GSource, GSourceDeleter> work_source_; + // The observer source. It is shared by all calls to Run and destroyed when + // the message pump is destroyed. + std::unique_ptr<GSource, GSourceDeleter> observer_source_; + // We use a wakeup pipe to make sure we'll get out of the glib polling phase // when another thread has scheduled us to do some work. There is a glib // mechanism g_main_context_wakeup, but this won't guarantee that our event's
diff --git a/base/message_loop/message_pump_glib_unittest.cc b/base/message_loop/message_pump_glib_unittest.cc index b202b40..06090fe2 100644 --- a/base/message_loop/message_pump_glib_unittest.cc +++ b/base/message_loop/message_pump_glib_unittest.cc
@@ -27,6 +27,7 @@ #include "base/task/single_thread_task_executor.h" #include "base/task/single_thread_task_runner.h" #include "base/test/task_environment.h" +#include "base/test/trace_event_analyzer.h" #include "base/threading/thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -540,6 +541,67 @@ run_loop.Run(); } +namespace { + +class NestedEventAnalyzer { + public: + NestedEventAnalyzer() { + trace_analyzer::Start(TRACE_DISABLED_BY_DEFAULT("base")); + } + + size_t CountEvents() { + std::unique_ptr<trace_analyzer::TraceAnalyzer> analyzer = + trace_analyzer::Stop(); + trace_analyzer::TraceEventVector events; + return analyzer->FindEvents(trace_analyzer::Query::EventName() == + trace_analyzer::Query::String("Nested"), + &events); + } +}; + +} // namespace + +TEST_F(MessagePumpGLibTest, TestNativeNestedLoopWithoutDoWork) { + // Tests that nesting is triggered correctly if a message loop is run + // from a native event (gtk event) outside of a work item (not in a posted + // task). + + RunLoop run_loop; + NestedEventAnalyzer analyzer; + + base::CurrentThread::Get()->EnableMessagePumpTimeKeeperMetrics( + "GlibMainLoopTest"); + + scoped_refptr<GLibLoopRunner> runner = base::MakeRefCounted<GLibLoopRunner>(); + injector()->AddEvent( + 0, + BindOnce( + [](EventInjector* injector, scoped_refptr<GLibLoopRunner> runner, + OnceClosure done) { + CurrentThread::ScopedAllowApplicationTasksInNativeNestedLoop allow; + runner->RunLoop(); + }, + Unretained(injector()), runner, run_loop.QuitClosure())); + + injector()->AddDummyEvent(0); + injector()->AddDummyEvent(0); + injector()->AddDummyEvent(0); + + SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask( + FROM_HERE, BindOnce(&GLibLoopRunner::Quit, runner), Milliseconds(40)); + + SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask( + FROM_HERE, run_loop.QuitClosure(), Milliseconds(40)); + + run_loop.Run(); + + // It would be expected that there be one single event, but it seems like this + // is counting the Begin/End of the Nested trace event. Each of the two events + // found are of duration 0 with distinct timestamps. It has also been + // confirmed that nesting occurs only once. + CHECK_EQ(analyzer.CountEvents(), 2ul); +} + // Tests for WatchFileDescriptor API class MessagePumpGLibFdWatchTest : public testing::Test { protected:
diff --git a/base/message_loop/message_pump_unittest.cc b/base/message_loop/message_pump_unittest.cc index 9e19703..b11167b 100644 --- a/base/message_loop/message_pump_unittest.cc +++ b/base/message_loop/message_pump_unittest.cc
@@ -139,6 +139,13 @@ MessagePumpTest() : message_pump_(MessagePump::Create(GetParam())) {} protected: +#if defined(USE_GLIB) + // Because of a GLIB implementation quirk, the pump doesn't do the same things + // between each DoWork. In this case, it won't set/clear a ScopedDoWorkItem + // because we run a chrome work item in the runloop outside of GLIB's control, + // so we oscillate between setting and not setting PreDoWorkExpectations. + std::map<MessagePump::Delegate*, int> do_work_counts; +#endif void AddPreDoWorkExpectations( testing::StrictMock<MockMessagePumpDelegate>& delegate) { #if BUILDFLAG(IS_WIN) @@ -155,14 +162,35 @@ EXPECT_CALL(delegate, MockOnEndWorkItem).Times(AtMost(1)); } #endif // BUILDFLAG(IS_WIN) +#if defined(USE_GLIB) + do_work_counts.try_emplace(&delegate, 0); + if (GetParam() == MessagePumpType::UI) { + if (++do_work_counts[&delegate] % 2) { + // The GLib MessagePump will do native work before chrome work on + // startup. + EXPECT_CALL(delegate, MockOnBeginWorkItem); + EXPECT_CALL(delegate, MockOnEndWorkItem); + } + } +#endif // defined(USE_GLIB) } void AddPostDoWorkExpectations( testing::StrictMock<MockMessagePumpDelegate>& delegate) { +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) // MessagePumpLibEvent checks for native notifications once after processing // a DoWork() but only instantiates a ScopedDoWorkItem that triggers // MessagePumpLibevent::OnLibeventNotification() which this test does not // so there are no post-work expectations at the moment. +#endif +#if defined(USE_GLIB) + if (GetParam() == MessagePumpType::UI) { + // The GLib MessagePump can create and destroy work items between DoWorks + // depending on internal state. + EXPECT_CALL(delegate, MockOnBeginWorkItem).Times(AtMost(1)); + EXPECT_CALL(delegate, MockOnEndWorkItem).Times(AtMost(1)); + } +#endif // defined(USE_GLIB) } std::unique_ptr<MessagePump> message_pump_; @@ -182,6 +210,16 @@ message_pump_->Quit(); return MessagePump::Delegate::NextWorkInfo{TimeTicks::Max()}; })); + + // MessagePumpGlib uses a work item between a HandleDispatch() call and + // passing control back to the chrome loop, which handles the Quit() despite + // us not necessarily doing any native work during that time. +#if defined(USE_GLIB) + if (GetParam() == MessagePumpType::UI) { + AddPostDoWorkExpectations(delegate); + } +#endif + EXPECT_CALL(delegate, DoIdleWork()).Times(0); message_pump_->ScheduleWork(); @@ -215,10 +253,14 @@ return MessagePump::Delegate::NextWorkInfo{TimeTicks::Max()}; })); - // PostDoWorkExpectations for the first DoWork. + // The `nested_delegate` will quit first. + AddPostDoWorkExpectations(nested_delegate); + + // Return a delayed task with |yield_to_native| set, and exit. AddPostDoWorkExpectations(delegate); AddPreDoWorkExpectations(delegate); + EXPECT_CALL(delegate, DoWork).WillOnce(Invoke([this] { message_pump_->Quit(); return MessagePump::Delegate::NextWorkInfo{TimeTicks::Max()}; @@ -245,8 +287,8 @@ })); AddPostDoWorkExpectations(delegate); - // Return a delayed task with |yield_to_native| set, and exit. AddPreDoWorkExpectations(delegate); + // Return a delayed task with |yield_to_native| set, and exit. EXPECT_CALL(delegate, DoWork).WillOnce(Invoke([this] { message_pump_->Quit(); auto now = TimeTicks::Now(); @@ -357,9 +399,13 @@ message_pump_->Quit(); return MessagePump::Delegate::NextWorkInfo{TimeTicks::Max()}; })); + + AddPostDoWorkExpectations(delegate); + #if BUILDFLAG(IS_IOS) EXPECT_CALL(delegate, DoIdleWork).Times(AnyNumber()); #endif + message_pump_->Run(&delegate); } @@ -383,6 +429,11 @@ return MessagePump::Delegate::NextWorkInfo{TimeTicks::Max()}; })); + // We quit `nested_delegate` before `delegate` + AddPostDoWorkExpectations(nested_delegate); + + AddPostDoWorkExpectations(delegate); + #if BUILDFLAG(IS_IOS) EXPECT_CALL(nested_delegate, DoIdleWork).Times(AnyNumber()); EXPECT_CALL(delegate, DoIdleWork).Times(AnyNumber());
diff --git a/base/test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java b/base/test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java index 7f4d192..208b7b6 100644 --- a/base/test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java +++ b/base/test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java
@@ -237,7 +237,7 @@ @CallSuper protected List<TestRule> getDefaultTestRules() { return Arrays.asList(new BaseJUnit4TestRule(), new MockitoErrorHandler(), - new UnitTestLifetimeAssertRule()); + new UnitTestLifetimeAssertRule(), new ResettersForTestingTestRule()); } /**
diff --git a/base/test/android/javatests/src/org/chromium/base/test/ResettersForTestingTestRule.java b/base/test/android/javatests/src/org/chromium/base/test/ResettersForTestingTestRule.java new file mode 100644 index 0000000..7797306 --- /dev/null +++ b/base/test/android/javatests/src/org/chromium/base/test/ResettersForTestingTestRule.java
@@ -0,0 +1,32 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.base.test; + +import org.junit.rules.TestRule; +import org.junit.runner.Description; +import org.junit.runners.model.Statement; + +import org.chromium.base.ResettersForTesting; + +/** + * Ensures that all resetters are cleaned up after a test. The resetters are registered through + * {@link ResettersForTesting#register(Runnable)} and are typically used whenever we have code that + * has <code>public static void setFooForTesting(...)</code> constructs. + */ +class ResettersForTestingTestRule implements TestRule { + @Override + public Statement apply(Statement base, Description description) { + return new Statement() { + @Override + public void evaluate() throws Throwable { + try { + base.evaluate(); + } finally { + ResettersForTesting.executeResetters(); + } + } + }; + } +}
diff --git a/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRunner.java b/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRunner.java index a0d0608..defe3ae0 100644 --- a/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRunner.java +++ b/base/test/android/junit/src/org/chromium/base/test/BaseRobolectricTestRunner.java
@@ -18,6 +18,7 @@ import org.chromium.base.Flag; import org.chromium.base.LifetimeAssert; import org.chromium.base.PathUtils; +import org.chromium.base.ResettersForTesting; import org.chromium.base.ThreadUtils; import org.chromium.base.library_loader.LibraryLoader; import org.chromium.base.library_loader.LibraryProcessType; @@ -68,6 +69,7 @@ } finally { CommandLineFlags.tearDownMethod(); CommandLineFlags.tearDownClass(); + ResettersForTesting.executeResetters(); ApplicationStatus.destroyForJUnitTests(); ContextUtils.clearApplicationContextForTests(); PathUtils.resetForTesting();
diff --git a/build/android/gyp/compile_java.py b/build/android/gyp/compile_java.py index 69b8909..3fc40ad 100755 --- a/build/android/gyp/compile_java.py +++ b/build/android/gyp/compile_java.py
@@ -598,11 +598,18 @@ logging.debug('Build command %s', cmd) start = time.time() - build_utils.CheckOutput(cmd, - print_stdout=options.chromium_code, - stdout_filter=process_javac_output_partial, - stderr_filter=process_javac_output_partial, - fail_on_output=options.warnings_as_errors) + try: + build_utils.CheckOutput(cmd, + print_stdout=options.chromium_code, + stdout_filter=process_javac_output_partial, + stderr_filter=process_javac_output_partial, + fail_on_output=options.warnings_as_errors) + except build_utils.CalledProcessError as e: + # Do not output stacktrace as it takes up space on gerrit UI, forcing + # you to click though to find the actual compilation error. It's never + # interesting to see the Python stacktrace for a Java compilation error. + sys.stderr.write(e.output) + sys.exit(1) end = time.time() - start logging.info('Java compilation took %ss', end)
diff --git a/build/android/gyp/turbine.py b/build/android/gyp/turbine.py index 00aa310..2de92f47 100755 --- a/build/android/gyp/turbine.py +++ b/build/android/gyp/turbine.py
@@ -135,11 +135,18 @@ logging.debug('Command: %s', cmd) start = time.time() - build_utils.CheckOutput(cmd, - print_stdout=True, - stdout_filter=process_javac_output_partial, - stderr_filter=process_javac_output_partial, - fail_on_output=options.warnings_as_errors) + try: + build_utils.CheckOutput(cmd, + print_stdout=True, + stdout_filter=process_javac_output_partial, + stderr_filter=process_javac_output_partial, + fail_on_output=options.warnings_as_errors) + except build_utils.CalledProcessError as e: + # Do not output stacktrace as it takes up space on gerrit UI, forcing + # you to click though to find the actual compilation error. It's never + # interesting to see the Python stacktrace for a Java compilation error. + sys.stderr.write(e.output) + sys.exit(1) end = time.time() - start logging.info('Header compilation took %ss', end) if options.kotlin_jar_path:
diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn index efdd382..63b37e0c1 100644 --- a/build/config/android/BUILD.gn +++ b/build/config/android/BUILD.gn
@@ -50,8 +50,10 @@ if (current_cpu == "arm64") { if (arm_control_flow_integrity == "standard") { cflags += [ "-mbranch-protection=standard" ] + rustflags = [ "-Zbranch-protection=bti" ] } else if (arm_control_flow_integrity == "pac") { cflags += [ "-mbranch-protection=pac-ret" ] + rustflags = [ "-Zbranch-protection=pac-ret" ] } }
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni index fa46f82..2c43a64 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni
@@ -4724,6 +4724,7 @@ [ "deps", "input_jars_paths", + "mergeable_android_manifests", "proguard_configs", ]) if (!defined(deps)) {
diff --git a/build/fuchsia/test/common.py b/build/fuchsia/test/common.py index 158b58ed..2ac7173 100644 --- a/build/fuchsia/test/common.py +++ b/build/fuchsia/test/common.py
@@ -493,6 +493,7 @@ def _reboot(reboot_cmd, current_state: TargetState): reboot_cmd() + local_state = None # Check that we transition out of current state. for _ in range(30): try:
diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn index deb13a7c..fccf350a 100644 --- a/build/rust/std/BUILD.gn +++ b/build/rust/std/BUILD.gn
@@ -305,13 +305,6 @@ } config("local_rust_stdlib_config") { - ldflags = [] - lib_dir = rebase_path("$local_rustc_sysroot/$sysroot_lib_subdir", - root_build_dir) - foreach(lib, stdlib_files) { - this_file = "$lib_dir/lib$lib.rlib" - ldflags += [ this_file ] - } if (is_win) { # TODO(crbug.com/1434092): This should really be `libs`, however that # breaks. Normally, we specify lib files with the `.lib` suffix but @@ -320,7 +313,7 @@ # # Omitting the `.lib` suffix breaks linking as well, when clang drives # the linking step of a C++ EXE that depends on Rust. - ldflags += _windows_lib_deps + ldflags = _windows_lib_deps } }
diff --git a/buildtools/deps_revisions.gni b/buildtools/deps_revisions.gni index 06e4f4a..32e9cbb 100644 --- a/buildtools/deps_revisions.gni +++ b/buildtools/deps_revisions.gni
@@ -5,5 +5,5 @@ declare_args() { # Used to cause full rebuilds on libc++ rolls. This should be kept in sync # with the libcxx_revision vars in //DEPS. - libcxx_revision = "8551b86d1ce13c9edbaf8433b0315b934b3c6081" + libcxx_revision = "bff81b702ff4b7f74b1c0ed02a4bcf6c2744a90b" }
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc index c0cc1a8a..6834f06 100644 --- a/cc/layers/heads_up_display_layer_impl.cc +++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -317,7 +317,8 @@ backing->mailbox = sii->CreateSharedImage( pool_resource.format(), pool_resource.size(), pool_resource.color_space(), kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, flags, gpu::kNullSurfaceHandle); + kPremul_SkAlphaType, flags, "HeadsUpDisplayLayer", + gpu::kNullSurfaceHandle); if (gpu_raster) { auto* ri = raster_context_provider->RasterInterface(); ri->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData());
diff --git a/cc/paint/oop_pixeltest.cc b/cc/paint/oop_pixeltest.cc index c6104c1..3dd2f0d 100644 --- a/cc/paint/oop_pixeltest.cc +++ b/cc/paint/oop_pixeltest.cc
@@ -182,7 +182,7 @@ gpu::Mailbox mailbox = sii->CreateSharedImage( viz::SinglePlaneFormat::kRGBA_8888, gfx::Size(width, height), options.target_color_params.color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, flags, gpu::kNullSurfaceHandle); + kPremul_SkAlphaType, flags, "TestLabel", gpu::kNullSurfaceHandle); EXPECT_TRUE(mailbox.Verify()); ri->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData()); @@ -261,7 +261,7 @@ gpu::Mailbox mailbox = sii->CreateSharedImage( image_format, options.resource_size, color_space.value_or(options.target_color_params.color_space), - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, flags, + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, flags, "TestLabel", gpu::kNullSurfaceHandle); EXPECT_TRUE(mailbox.Verify()); ri->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData());
diff --git a/cc/raster/gpu_raster_buffer_provider.cc b/cc/raster/gpu_raster_buffer_provider.cc index cb3aa2d6..7d5914a 100644 --- a/cc/raster/gpu_raster_buffer_provider.cc +++ b/cc/raster/gpu_raster_buffer_provider.cc
@@ -365,7 +365,7 @@ } backing_->mailbox = sii->CreateSharedImage( shared_image_format_, resource_size_, color_space_, - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, flags, + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, flags, "GpuRasterTile", gpu::kNullSurfaceHandle); mailbox_needs_clear = true; ri->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData());
diff --git a/cc/raster/one_copy_raster_buffer_provider.cc b/cc/raster/one_copy_raster_buffer_provider.cc index 666bcb18..081f2b8 100644 --- a/cc/raster/one_copy_raster_buffer_provider.cc +++ b/cc/raster/one_copy_raster_buffer_provider.cc
@@ -406,7 +406,8 @@ usage |= gpu::SHARED_IMAGE_USAGE_SCANOUT; *mailbox = sii->CreateSharedImage( format, resource_size, color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, usage, gpu::kNullSurfaceHandle); + kPremul_SkAlphaType, usage, "OneCopyRasterTile", + gpu::kNullSurfaceHandle); // Clear the resource if we're not going to initialize it fully from the // copy due to non-exact resource reuse. See https://crbug.com/1313091 needs_clear = rect_to_copy.size() != resource_size; @@ -417,7 +418,8 @@ const uint32_t usage = gpu::SHARED_IMAGE_USAGE_CPU_WRITE; staging_buffer->mailbox = sii->CreateSharedImage( staging_buffer->gpu_memory_buffer.get(), gpu_memory_buffer_manager_, - color_space, kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage); + color_space, kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, + "OneCopyRasterStaging"); } else { sii->UpdateSharedImage(staging_buffer->sync_token, staging_buffer->mailbox); }
diff --git a/cc/raster/zero_copy_raster_buffer_provider.cc b/cc/raster/zero_copy_raster_buffer_provider.cc index 3136868..fea89c2 100644 --- a/cc/raster/zero_copy_raster_buffer_provider.cc +++ b/cc/raster/zero_copy_raster_buffer_provider.cc
@@ -103,7 +103,7 @@ backing_->mailbox = sii->CreateSharedImage( gpu_memory_buffer_.get(), gpu_memory_buffer_manager_, resource_color_space_, kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - usage); + usage, "ZeroCopyRasterTile"); } else { sii->UpdateSharedImage(backing_->returned_sync_token, backing_->mailbox); }
diff --git a/cc/slim/frame_sink_impl.cc b/cc/slim/frame_sink_impl.cc index 8ad82a0..02c4d00 100644 --- a/cc/slim/frame_sink_impl.cc +++ b/cc/slim/frame_sink_impl.cc
@@ -160,7 +160,7 @@ uint32_t shared_image_usage = gpu::SHARED_IMAGE_USAGE_DISPLAY_READ; uploaded_resource.mailbox = sii->CreateSharedImage( format, resource_bitmap.GetSize(), color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, shared_image_usage, + kPremul_SkAlphaType, shared_image_usage, "SlimCompositorUIResource", base::span<const uint8_t>(resource_bitmap.GetPixels(), resource_bitmap.SizeInBytes())); gpu::SyncToken sync_token = sii->GenUnverifiedSyncToken();
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index ffaf8946..e759f412 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc
@@ -4679,7 +4679,7 @@ auto* sii = context_provider->SharedImageInterface(); mailbox = sii->CreateSharedImage( format, upload_size, color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, shared_image_usage, + kPremul_SkAlphaType, shared_image_usage, "LayerTreeHostUIResource", base::span<const uint8_t>(bitmap.GetPixels(), bitmap.SizeInBytes())); } else { DCHECK_EQ(bitmap.GetFormat(), UIResourceBitmap::RGBA8); @@ -4744,7 +4744,7 @@ auto* sii = context_provider->SharedImageInterface(); mailbox = sii->CreateSharedImage( format, upload_size, color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, shared_image_usage, + kPremul_SkAlphaType, shared_image_usage, "LayerTreeHostUIResource", base::span<const uint8_t>( reinterpret_cast<const uint8_t*>(pixmap.addr()), pixmap.computeByteSize()));
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index bb14641..39da661 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -609,9 +609,6 @@ # Include sources for start_surface_java_sources.gni sources += start_surface_java_sources - if (enable_arcore) { - deps += [ "//third_party/arcore-android-sdk-client:com_google_ar_core_java__ignored_manifest" ] - } if (enable_vr) { deps += [ ":chrome_vr_java_resources" ] @@ -1531,7 +1528,6 @@ "//chrome/test:sync_integration_test_support_java", "//chrome/test:test_support_java", "//chrome/test/android:chrome_java_integration_test_support", - "//chrome/test/android:chrome_java_integration_test_support_uncommon", "//chrome/test/android:chrome_java_test_pagecontroller", "//chrome/test/android/test_trusted_web_activity:test_trusted_web_activity_java", "//components/autofill/android:autofill_java", @@ -2875,16 +2871,9 @@ deps = [ ":chrome_test_ar_java", "//third_party/android_sdk:android_test_mock_java", - ] - # Include ArCore files directly instead of using bundles. This does - # require us to explicitly re-declare our dependency on ARCore, which - # otherwise should have already been included, since the native libraries - # need to know that it is available. Though we'd always need to forcibly - # include the manifest DEP here as well - deps += [ + # Dependency needed so that libarcore_sdk_c.so will be extracted. "//third_party/arcore-android-sdk-client:com_google_ar_core_java", - "//third_party/arcore-android-sdk-client:com_google_ar_core_java__ignored_manifest", ] _libarcore_dir = get_label_info(
diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni index 4f2bd39..aabf86f 100644 --- a/chrome/android/chrome_java_resources.gni +++ b/chrome/android/chrome_java_resources.gni
@@ -459,10 +459,11 @@ "java/res/layout/auto_sign_in_first_run_dialog.xml", "java/res/layout/autofill_address_profile_prompt_source_notice.xml", "java/res/layout/autofill_billing_address_dropdown.xml", + "java/res/layout/autofill_card_name_and_number.xml", "java/res/layout/autofill_card_unmask_prompt.xml", - "java/res/layout/autofill_card_unmask_prompt_card_details.xml", "java/res/layout/autofill_card_unmask_prompt_new.xml", "java/res/layout/autofill_cc_details.xml", + "java/res/layout/autofill_cc_details_new.xml", "java/res/layout/autofill_expiration_date_fix_flow.xml", "java/res/layout/autofill_local_profile_icon.xml", "java/res/layout/autofill_migrate_address_profile_prompt.xml",
diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni index 28fe242..56c4095 100644 --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni
@@ -563,8 +563,8 @@ # meta-data tag is in the base manifest. if (enable_arcore) { deps += [ - "//third_party/arcore-android-sdk-client:com_google_ar_core_java", - "//third_party/arcore-android-sdk-client:com_google_ar_core_java__ignored_manifest", + "//third_party/arcore-android-sdk-client:arcore_base_manifest_java", + "//third_party/arcore-android-sdk-client:com_google_ar_core_J__unpack_aar", ] }
diff --git a/chrome/android/expectations/monochrome_public_bundle__base.AndroidManifest.expected b/chrome/android/expectations/monochrome_public_bundle__base.AndroidManifest.expected index 7c331559..fe26672 100644 --- a/chrome/android/expectations/monochrome_public_bundle__base.AndroidManifest.expected +++ b/chrome/android/expectations/monochrome_public_bundle__base.AndroidManifest.expected
@@ -103,14 +103,6 @@ android:stateNotNeeded="true" android:theme="@style/Theme.PlayCore.Transparent"> </activity> # DIFF-ANCHOR: a2bae37c - <activity # DIFF-ANCHOR: 28dc9019 - android:name="com.google.ar.core.InstallActivity" - android:configChanges="keyboardHidden|orientation|screenSize" - android:excludeFromRecents="true" - android:exported="false" - android:launchMode="singleTop" - android:theme="@android:style/Theme.Material.Light.Dialog.Alert"> - </activity> # DIFF-ANCHOR: 28dc9019 <activity # DIFF-ANCHOR: a4438884 android:name="org.chromium.android_webview.devui.MainActivity" android:exported="true"
diff --git a/chrome/android/expectations/monochrome_public_bundle__chrome.AndroidManifest.expected b/chrome/android/expectations/monochrome_public_bundle__chrome.AndroidManifest.expected index d3a6967d..6c8fe18 100644 --- a/chrome/android/expectations/monochrome_public_bundle__chrome.AndroidManifest.expected +++ b/chrome/android/expectations/monochrome_public_bundle__chrome.AndroidManifest.expected
@@ -13,6 +13,14 @@ </dist:module> # DIFF-ANCHOR: 2805007f <uses-sdk android:minSdkVersion="24" android:targetSdkVersion="33"/> <application> + <activity # DIFF-ANCHOR: 28dc9019 + android:name="com.google.ar.core.InstallActivity" + android:configChanges="keyboardHidden|orientation|screenSize" + android:excludeFromRecents="true" + android:exported="false" + android:launchMode="singleTop" + android:theme="@android:style/Theme.Material.Light.Dialog.Alert"> + </activity> # DIFF-ANCHOR: 28dc9019 <activity # DIFF-ANCHOR: 93d41352 android:name="org.chromium.chrome.browser.BrowserRestartActivity" android:excludeFromRecents="true"
diff --git a/chrome/android/expectations/trichrome_chrome_bundle__base.AndroidManifest.expected b/chrome/android/expectations/trichrome_chrome_bundle__base.AndroidManifest.expected index 440a7d8..8e361bd1f 100644 --- a/chrome/android/expectations/trichrome_chrome_bundle__base.AndroidManifest.expected +++ b/chrome/android/expectations/trichrome_chrome_bundle__base.AndroidManifest.expected
@@ -104,14 +104,6 @@ android:stateNotNeeded="true" android:theme="@style/Theme.PlayCore.Transparent"> </activity> # DIFF-ANCHOR: a2bae37c - <activity # DIFF-ANCHOR: 28dc9019 - android:name="com.google.ar.core.InstallActivity" - android:configChanges="keyboardHidden|orientation|screenSize" - android:excludeFromRecents="true" - android:exported="false" - android:launchMode="singleTop" - android:theme="@android:style/Theme.Material.Light.Dialog.Alert"> - </activity> # DIFF-ANCHOR: 28dc9019 <meta-data android:name="android.allow_multiple_resumed_activities" android:value="true"/> <meta-data android:name="android.content.APP_RESTRICTIONS" android:resource="@xml/app_restrictions"/> <meta-data android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME" android:value="org.chromium.components.media_router.caf.CastOptionsProvider"/>
diff --git a/chrome/android/features/ar/AndroidManifest.xml b/chrome/android/features/ar/AndroidManifest.xml index bd68841..edd52ff5 100644 --- a/chrome/android/features/ar/AndroidManifest.xml +++ b/chrome/android/features/ar/AndroidManifest.xml
@@ -14,17 +14,4 @@ dist:title="@string/ar_module_title"> <dist:fusing dist:include="true" /> </dist:module> - - <application> - <!-- This tag indicates that this application optionally uses ARCore. --> - <meta-data android:name="com.google.ar.core" android:value="optional" /> - </application> - - {% if channel in ['default'] %} - <queries> - <!-- TODO(https://crbug.com/1122210): This is needed for Android 11 to - allow checking if ARCore is installed when using ToT builds. --> - <package android:name="com.google.ar.core" /> - </queries> - {% endif %} </manifest>
diff --git a/chrome/android/features/ar/ar_module.gni b/chrome/android/features/ar/ar_module.gni index 7a47ad1f..0e90c7c8 100644 --- a/chrome/android/features/ar/ar_module.gni +++ b/chrome/android/features/ar/ar_module.gni
@@ -12,10 +12,7 @@ ar_module_desc = { name = "ar" - java_deps = [ - "//components/webxr/android:xr_java", - "//third_party/arcore-android-sdk-client:com_google_ar_core_java__ignored_manifest", - ] + java_deps = [ "//components/webxr/android:xr_java" ] android_manifest = "//chrome/android/features/ar/AndroidManifest.xml" loadable_modules_32_bit = [ "$_libarcore_dir/armeabi-v7a/libarcore_sdk_c.so" ] loadable_modules_64_bit = [ "$_libarcore_dir/arm64-v8a/libarcore_sdk_c.so" ]
diff --git a/chrome/android/features/keyboard_accessory/BUILD.gn b/chrome/android/features/keyboard_accessory/BUILD.gn index a8fa6e2..cf76543f 100644 --- a/chrome/android/features/keyboard_accessory/BUILD.gn +++ b/chrome/android/features/keyboard_accessory/BUILD.gn
@@ -100,7 +100,6 @@ "//chrome/browser/ui/android/layouts/test:java", "//chrome/browser/ui/messages/android:java", "//chrome/test/android:chrome_java_integration_test_support", - "//chrome/test/android:chrome_java_integration_test_support_uncommon", "//components/autofill/android:autofill_java", "//components/autofill/core/common/mojom:mojo_types_java", "//components/browser_ui/bottomsheet/android:java",
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml index 58d4d02..9ed4338 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml
@@ -172,9 +172,6 @@ alternate mechanism. --> <queries> - {% if include_arcore_manifest_flag == 'true' %} - <package android:name="com.google.ar.core" /> - {% endif %} {% if enable_vr == "true" %} <package android:name="com.google.vr.vrcore" /> {% endif %} @@ -1300,10 +1297,10 @@ android:resource="@xml/app_restrictions"/> {% if include_arcore_manifest_flag == 'true' %} - <!-- ARCore APK integration --> <!-- This tag indicates that this application optionally uses ARCore. --> <meta-data android:name="com.google.ar.core" android:value="optional" /> + <!-- ARCore APK integration --> {% block base_application_extra_arcore_definitions %} <meta-data android:name="com.google.ar.core.session_settings" android:value="allow_front_facing_motion_tracking_6dof," />
diff --git a/chrome/android/java/res/layout/autofill_card_name_and_number.xml b/chrome/android/java/res/layout/autofill_card_name_and_number.xml new file mode 100644 index 0000000..cc1e89be --- /dev/null +++ b/chrome/android/java/res/layout/autofill_card_name_and_number.xml
@@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2023 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. --> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <TextView + android:id="@+id/card_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:maxLines="1" + android:ellipsize="end" + android:layout_weight="1" /> + + <TextView + android:id="@+id/card_number" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="4dp" + android:maxLines="1" + android:layout_weight="0" /> +</LinearLayout>
diff --git a/chrome/android/java/res/layout/autofill_card_unmask_prompt_card_details.xml b/chrome/android/java/res/layout/autofill_card_unmask_prompt_card_details.xml deleted file mode 100644 index 71ed01d..0000000 --- a/chrome/android/java/res/layout/autofill_card_unmask_prompt_card_details.xml +++ /dev/null
@@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2023 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. --> - -<RelativeLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/card_container" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="4dp"> - - <org.chromium.ui.widget.ChromeImageView - android:id="@+id/card_icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" - android:layout_marginEnd="16dp" - android:scaleType="fitCenter" /> - - <LinearLayout - android:id="@+id/card_name_and_last_four_container" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_toEndOf="@id/card_icon"> - - <TextView - android:id="@+id/card_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:maxLines="1" - android:ellipsize="end" - android:layout_weight="1" - style="@style/TextAppearance.TextLarge.Primary" /> - - <TextView - android:id="@+id/card_last_four" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="4dp" - android:maxLines="1" - android:layout_weight="0" - style="@style/TextAppearance.TextLarge.Primary" /> - </LinearLayout> - - <TextView - android:id="@+id/card_expiration" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_below="@id/card_name_and_last_four_container" - android:layout_toEndOf="@id/card_icon" - android:textAppearance="@style/TextAppearance.TextMedium.Secondary" /> -</RelativeLayout>
diff --git a/chrome/android/java/res/layout/autofill_card_unmask_prompt_new.xml b/chrome/android/java/res/layout/autofill_card_unmask_prompt_new.xml index 2360adc3..845954d 100644 --- a/chrome/android/java/res/layout/autofill_card_unmask_prompt_new.xml +++ b/chrome/android/java/res/layout/autofill_card_unmask_prompt_new.xml
@@ -85,17 +85,16 @@ android:gravity="start" /> <include - android:id="@+id/card_details_container" - layout="@layout/autofill_card_unmask_prompt_card_details" + layout="@layout/autofill_cc_details_new" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="9dp" - android:layout_marginHorizontal="20dp" /> + android:layout_marginTop="13dp" + android:layout_marginHorizontal="24dp" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="10dp" + android:layout_marginTop="14dp" android:layout_marginStart="4dp" android:orientation="horizontal">
diff --git a/chrome/android/java/res/layout/autofill_cc_details_new.xml b/chrome/android/java/res/layout/autofill_cc_details_new.xml new file mode 100644 index 0000000..1b80516 --- /dev/null +++ b/chrome/android/java/res/layout/autofill_cc_details_new.xml
@@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2023 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. --> + +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageView + android:id="@+id/card_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_centerVertical="true" + android:layout_marginEnd="16dp" + android:scaleType="fitCenter" + android:importantForAccessibility="no" /> + + <include + android:id="@+id/card_name_and_number_container" + layout="@layout/autofill_card_name_and_number" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toEndOf="@id/card_icon" /> + + <TextView + android:id="@+id/card_expiration" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/card_name_and_number_container" + android:layout_toEndOf="@id/card_icon" /> +</RelativeLayout>
diff --git a/chrome/android/java/res/layout/autofill_server_card_editor.xml b/chrome/android/java/res/layout/autofill_server_card_editor.xml index e5732d23..2575691 100644 --- a/chrome/android/java/res/layout/autofill_server_card_editor.xml +++ b/chrome/android/java/res/layout/autofill_server_card_editor.xml
@@ -15,7 +15,7 @@ android:layout_marginHorizontal="@dimen/pref_autofill_field_horizontal_margin"> <ImageView - android:id="@+id/card_icon" + android:id="@+id/settings_page_card_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentStart="true" @@ -30,10 +30,10 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:layout_alignParentTop="true" - android:layout_toEndOf="@id/card_icon"> + android:layout_toEndOf="@id/settings_page_card_icon"> <TextView - android:id="@+id/card_name" + android:id="@+id/settings_page_card_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" @@ -52,11 +52,11 @@ </LinearLayout> <TextView - android:id="@+id/card_expiration" + android:id="@+id/settings_page_card_expiration" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/card_name_and_last_four_container" - android:layout_toEndOf="@id/card_icon" + android:layout_toEndOf="@id/settings_page_card_icon" style="@style/PreferenceSummary" /> </RelativeLayout>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/creator/CreatorActionDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/creator/CreatorActionDelegateImpl.java index 1be1b8e..99eed9d4 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/creator/CreatorActionDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/creator/CreatorActionDelegateImpl.java
@@ -83,7 +83,7 @@ BottomSheetController mBottomSheetController, WindowAndroid mWindowAndroid) { SigninBottomSheetCoordinator signinCoordinator = new SigninBottomSheetCoordinator(mWindowAndroid, mBottomSheetController, mProfile, - () -> { showSyncConsentActivity(signinAccessPoint); }); + () -> { showSyncConsentActivity(signinAccessPoint); }, signinAccessPoint); signinCoordinator.show(); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/feed/FeedActionDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/feed/FeedActionDelegateImpl.java index be7427a9..07aa72a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/feed/FeedActionDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/feed/FeedActionDelegateImpl.java
@@ -150,7 +150,7 @@ SigninMetricsUtils.logSigninUserActionForAccessPoint(signinAccessPoint); SigninBottomSheetCoordinator signinCoordinator = new SigninBottomSheetCoordinator(windowAndroid, bottomSheetController, - Profile.getLastUsedRegularProfile(), null); + Profile.getLastUsedRegularProfile(), null, signinAccessPoint); signinCoordinator.show(); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java index ff9029d..2aa2d4a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java
@@ -44,7 +44,6 @@ import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.widget.ChromeImageView; import org.chromium.url.GURL; import java.lang.annotation.Retention; @@ -183,18 +182,13 @@ if (ChromeFeatureList.isEnabled( ChromeFeatureList.AUTOFILL_TOUCH_TO_FILL_FOR_CREDIT_CARDS_ANDROID)) { mMainView = inflater.inflate(R.layout.autofill_card_unmask_prompt_new, null); - - // Populate card details. - ChromeImageView cardIconView = (ChromeImageView) mMainView.findViewById(R.id.card_icon); - cardIconView.setImageDrawable(AutofillUiUtils.getCardIcon(context, cardArtUrl, - cardIconId, getCardIconWidthId(), getCardIconHeightId(), - R.dimen.card_art_corner_radius, + AutofillUiUtils.addCardDetails(context, mMainView, cardName, cardLastFourDigits, + cardExpiration, cardArtUrl, cardIconId, + R.style.TextAppearance_TextLarge_Primary, + R.style.TextAppearance_TextMedium_Secondary, isVirtualCard || ChromeFeatureList.isEnabled( - ChromeFeatureList.AUTOFILL_ENABLE_CARD_ART_IMAGE))); - ((TextView) mMainView.findViewById(R.id.card_name)).setText(cardName); - ((TextView) mMainView.findViewById(R.id.card_last_four)).setText(cardLastFourDigits); - ((TextView) mMainView.findViewById(R.id.card_expiration)).setText(cardExpiration); + ChromeFeatureList.AUTOFILL_ENABLE_CARD_ART_IMAGE)); } else { mMainView = inflater.inflate(R.layout.autofill_card_unmask_prompt, null); } @@ -646,20 +640,4 @@ public String getErrorMessage() { return mErrorMessage.getText().toString(); } - - public static int getCardIconWidthId() { - if (ChromeFeatureList.isEnabled( - ChromeFeatureList.AUTOFILL_ENABLE_NEW_CARD_ART_AND_NETWORK_IMAGES)) { - return R.dimen.card_unmask_dialog_credit_card_icon_width_new; - } - return R.dimen.card_unmask_dialog_credit_card_icon_width; - } - - public static int getCardIconHeightId() { - if (ChromeFeatureList.isEnabled( - ChromeFeatureList.AUTOFILL_ENABLE_NEW_CARD_ART_AND_NETWORK_IMAGES)) { - return R.dimen.card_unmask_dialog_credit_card_icon_height_new; - } - return R.dimen.card_unmask_dialog_credit_card_icon_height; - } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillServerCardEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillServerCardEditor.java index 801b661..0c67372 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillServerCardEditor.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillServerCardEditor.java
@@ -150,16 +150,17 @@ } // Set card icon. It can be either a custom card art or the network icon. - ImageView cardIconContainer = v.findViewById(R.id.card_icon); + ImageView cardIconContainer = v.findViewById(R.id.settings_page_card_icon); cardIconContainer.setImageDrawable(getCardIcon(getContext(), mCard.getCardArtUrl(), mCard.getIssuerIconDrawableId(), getSettingsPageIconWidthId(), getSettingsPageIconHeightId(), R.dimen.card_art_corner_radius, ChromeFeatureList.isEnabled(ChromeFeatureList.AUTOFILL_ENABLE_CARD_ART_IMAGE))); - ((TextView) v.findViewById(R.id.card_name)).setText(mCard.getCardNameForAutofillDisplay()); + ((TextView) v.findViewById(R.id.settings_page_card_name)) + .setText(mCard.getCardNameForAutofillDisplay()); ((TextView) v.findViewById(R.id.card_last_four)) .setText(mCard.getObfuscatedLastFourDigits()); - ((TextView) v.findViewById(R.id.card_expiration)) + ((TextView) v.findViewById(R.id.settings_page_card_expiration)) .setText(mCard.getFormattedExpirationDate(getActivity())); v.findViewById(R.id.edit_server_card).setOnClickListener(view -> { logServerCardEditorButtonClicks(showVirtualCardEnrollmentButton()
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/MarketURLGetter.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/MarketURLGetter.java index 574a543..75112aa 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/MarketURLGetter.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/MarketURLGetter.java
@@ -8,6 +8,7 @@ import androidx.annotation.VisibleForTesting; +import org.chromium.base.ResettersForTesting; import org.chromium.base.ThreadUtils; /** @@ -30,6 +31,7 @@ @VisibleForTesting static void setInstanceForTests(MarketURLGetter getter) { sInstanceForTests = getter; + ResettersForTesting.register(() -> sInstanceForTests = null); } private static MarketURLGetter sInstanceForTests;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java index 14bdf60..53af1fb 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java
@@ -19,6 +19,7 @@ import org.chromium.base.ContextUtils; import org.chromium.base.Log; import org.chromium.base.ObserverList; +import org.chromium.base.ResettersForTesting; import org.chromium.base.task.PostTask; import org.chromium.base.task.TaskTraits; import org.chromium.chrome.R; @@ -88,6 +89,7 @@ @VisibleForTesting public static void setInstanceForTesting(UpdateMenuItemHelper testingInstance) { sInstance = testingInstance; + ResettersForTesting.register(() -> sInstance = null); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java index 38ef1c0..bf9c4ee 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
@@ -11,6 +11,7 @@ import org.chromium.base.BuildInfo; import org.chromium.base.ContextUtils; +import org.chromium.base.ResettersForTesting; import org.chromium.base.ThreadUtils; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.IntCachedFieldTrialParameter; @@ -39,6 +40,7 @@ @VisibleForTesting static void setInstanceForTests(VersionNumberGetter getter) { sInstanceForTests = getter; + ResettersForTesting.register(() -> sInstanceForTests = null); } @VisibleForTesting
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java index a9da397..87e83399 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
@@ -22,7 +22,6 @@ import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordUserAction; import org.chromium.chrome.R; -import org.chromium.chrome.browser.enterprise.util.ManagedBrowserUtils; import org.chromium.chrome.browser.feedback.FragmentHelpAndFeedbackLauncher; import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncher; import org.chromium.chrome.browser.flags.ChromeFeatureList; @@ -118,8 +117,7 @@ UserPrefs.get(mProfile).setBoolean(Pref.PRIVACY_GUIDE_VIEWED, true); return false; }); - if (!ChromeFeatureList.isEnabled(ChromeFeatureList.PRIVACY_GUIDE) || mProfile.isChild() - || ManagedBrowserUtils.isBrowserManaged(mProfile)) { + if (!ChromeFeatureList.isEnabled(ChromeFeatureList.PRIVACY_GUIDE)) { getPreferenceScreen().removePreference(privacyGuidePreference); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImpl.java index fec5548..57c9674b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImpl.java
@@ -10,6 +10,7 @@ import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; +import org.chromium.base.metrics.RecordHistogram; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.signin.services.IdentityServicesProvider; import org.chromium.chrome.browser.signin.services.SigninManager; @@ -96,6 +97,8 @@ return true; } if (signinManager.isSigninDisabledByPolicy()) { + RecordHistogram.recordEnumeratedHistogram( + "Signin.SyncDisabledNotificationShown", accessPoint, SigninAccessPoint.MAX); ManagedPreferencesUtils.showManagedByAdministratorToast(context); } return false;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/app/bookmarks/BookmarkTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/app/bookmarks/BookmarkTest.java index 7d49328..4dad87f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/app/bookmarks/BookmarkTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/app/bookmarks/BookmarkTest.java
@@ -54,7 +54,6 @@ import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Criteria; import org.chromium.base.test.util.CriteriaHelper; -import org.chromium.base.test.util.DisableIf; import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.DoNotBatch; import org.chromium.base.test.util.Feature; @@ -110,7 +109,6 @@ import org.chromium.content_public.browser.test.util.TouchCommon; import org.chromium.net.test.EmbeddedTestServer; import org.chromium.ui.test.util.NightModeTestUtils; -import org.chromium.ui.test.util.UiDisableIf; import org.chromium.ui.test.util.UiRestriction; import org.chromium.url.GURL; @@ -1417,7 +1415,7 @@ @Test @MediumTest - @DisableIf.Device(type = {UiDisableIf.TABLET}) // https://crbug.com/1333546 + @DisabledTest(message = "crbug.com/1434777") public void testShowInFolder_Scroll() throws Exception { addFolder(TEST_FOLDER_TITLE); // Index 8 addBookmark(TEST_TITLE_A, mTestUrlA); @@ -1456,7 +1454,7 @@ @Test @MediumTest - @DisableIf.Device(type = {UiDisableIf.TABLET}) // https://crbug.com/1333546 + @DisabledTest(message = "crbug.com/1434777") public void testShowInFolder_OpenOtherFolder() throws Exception { BookmarkId testId = addFolder(TEST_FOLDER_TITLE); TestThreadUtils.runOnUiThreadBlocking(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/TouchToFillCreditCardTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/TouchToFillCreditCardTest.java index ace044eb..5328ac4 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/TouchToFillCreditCardTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/TouchToFillCreditCardTest.java
@@ -9,10 +9,10 @@ import static org.chromium.base.test.util.Matchers.containsString; import static org.chromium.base.test.util.Matchers.is; import static org.chromium.chrome.browser.autofill.AutofillTestHelper.createCreditCard; -import static org.chromium.chrome.test.R.id.card_name; -import static org.chromium.chrome.test.R.id.card_number; import static org.chromium.chrome.test.R.id.description_line_2; import static org.chromium.chrome.test.R.id.sheet_item_list; +import static org.chromium.chrome.test.R.id.touch_to_fill_card_name; +import static org.chromium.chrome.test.R.id.touch_to_fill_card_number; import static org.chromium.content_public.browser.test.util.TestThreadUtils.runOnUiThreadBlocking; import android.view.View; @@ -150,8 +150,9 @@ } private void verifyCardIsCorrectlyDisplayed(View cardItemLayout) { - TextView cardNameLayout = (TextView) cardItemLayout.findViewById(card_name); - TextView cardNumberLayout = (TextView) cardItemLayout.findViewById(card_number); + TextView cardNameLayout = (TextView) cardItemLayout.findViewById(touch_to_fill_card_name); + TextView cardNumberLayout = + (TextView) cardItemLayout.findViewById(touch_to_fill_card_number); TextView cardDescLayout = (TextView) cardItemLayout.findViewById(description_line_2); // Check that the card name is displayed checkThat(cardNameLayout.getText().toString(), is(CARD_NAME));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsFragmentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsFragmentTest.java index cd53771..d4281c8 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsFragmentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsFragmentTest.java
@@ -16,6 +16,8 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.chromium.base.test.util.Batch.PER_CLASS; + import android.text.TextUtils; import android.view.View; import android.widget.TextView; @@ -29,12 +31,11 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.rules.RuleChain; import org.junit.runner.RunWith; +import org.chromium.base.test.util.Batch; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CriteriaHelper; -import org.chromium.base.test.util.DoNotBatch; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.HistogramWatcher; import org.chromium.base.test.util.JniMocker; @@ -49,15 +50,12 @@ import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxBridgeJni; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.settings.SettingsActivityTestRule; -import org.chromium.chrome.browser.signin.SigninCheckerProvider; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.R; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.chrome.test.util.browser.Features; -import org.chromium.chrome.test.util.browser.signin.SigninTestRule; -import org.chromium.components.policy.test.annotations.Policies; import org.chromium.components.user_prefs.UserPrefs; -import org.chromium.content_public.browser.test.NativeLibraryTestUtils; import org.chromium.content_public.browser.test.util.TestThreadUtils; import java.io.IOException; @@ -68,7 +66,7 @@ */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -@DoNotBatch(reason = "Child account can leak to other tests in the suite.") +@Batch(PER_CLASS) public class PrivacySettingsFragmentTest { // Index of the Privacy Sandbox row entry in the settings list when PRIVACY_SANDBOX_SETTINGS_4 // is enabled. @@ -76,14 +74,12 @@ // Name of the histogram to record the entry on Privacy Guide via the S&P link-row. public static final String ENTRY_EXIT_HISTOGRAM = "Settings.PrivacyGuide.EntryExit"; - public final SettingsActivityTestRule<PrivacySettings> mSettingsActivityTestRule = - new SettingsActivityTestRule<>(PrivacySettings.class); - - public final SigninTestRule mSigninTestRule = new SigninTestRule(); + @Rule + public final ChromeBrowserTestRule mChromeBrowserTestRule = new ChromeBrowserTestRule(); @Rule - public final RuleChain mRuleChain = - RuleChain.outerRule(mSigninTestRule).around(mSettingsActivityTestRule); + public final SettingsActivityTestRule<PrivacySettings> mSettingsActivityTestRule = + new SettingsActivityTestRule<>(PrivacySettings.class); @Rule public ChromeRenderTestRule mRenderTestRule = @@ -145,7 +141,6 @@ @Before public void setUp() { - NativeLibraryTestUtils.loadNativeLibraryAndInitBrowserProcess(); mFakePrivacySandboxBridge = new FakePrivacySandboxBridge(); mocker.mock(PrivacySandboxBridgeJni.TEST_HOOKS, mFakePrivacySandboxBridge); } @@ -217,6 +212,7 @@ @Features.DisableFeatures(ChromeFeatureList.PRIVACY_SANDBOX_SETTINGS_4) public void testPrivacySandboxV3View() throws IOException { mSettingsActivityTestRule.startSettingsActivity(); + PrivacySettings fragment = mSettingsActivityTestRule.getFragment(); // Scroll down and open Privacy Sandbox page. scrollToSetting(withText(R.string.prefs_privacy_sandbox)); onView(withText(R.string.prefs_privacy_sandbox)).perform(click()); @@ -230,6 +226,7 @@ @Features.EnableFeatures(ChromeFeatureList.PRIVACY_SANDBOX_SETTINGS_4) public void testPrivacySandboxV4View() throws IOException { mSettingsActivityTestRule.startSettingsActivity(); + PrivacySettings fragment = mSettingsActivityTestRule.getFragment(); // Scroll down and open Privacy Sandbox page. scrollToSetting(withText(R.string.ad_privacy_link_row_label)); onView(withText(R.string.ad_privacy_link_row_label)).perform(click()); @@ -340,25 +337,4 @@ // Tapping on the privacy guide row should mark the privacy guide as viewed assertTrue(isPrivacyGuideViewed()); } - - @Test - @LargeTest - @Features.EnableFeatures(ChromeFeatureList.PRIVACY_GUIDE) - // A random policy is required to make the device managed - @Policies.Add({ @Policies.Item(key = "RandomPolicy", string = "true") }) - public void testPrivacyGuideNotDisplayedWhenDeviceIsManaged() { - mSettingsActivityTestRule.startSettingsActivity(); - onView(withText(R.string.privacy_guide_pref_summary)).check(doesNotExist()); - } - - @Test - @LargeTest - @Features.EnableFeatures(ChromeFeatureList.PRIVACY_GUIDE) - public void testPrivacyGuideNotDisplayedWhenUserIsChild() { - // TODO(crbug.com/1433652): Remove once SigninChecker is automatically created. - TestThreadUtils.runOnUiThreadBlockingNoException(SigninCheckerProvider::get); - mSigninTestRule.addChildTestAccountThenWaitForSignin(); - mSettingsActivityTestRule.startSettingsActivity(); - onView(withText(R.string.privacy_guide_pref_summary)).check(doesNotExist()); - } }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImplTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImplTest.java index 163f793..02338ee 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImplTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImplTest.java
@@ -26,6 +26,7 @@ import org.chromium.base.ContextUtils; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.HistogramWatcher; import org.chromium.chrome.R; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.signin.services.IdentityServicesProvider; @@ -87,12 +88,16 @@ @Test public void testLaunchActivityIfAllowedWhenSigninIsDisabledByPolicy() { + HistogramWatcher watchSigninDisabledToastShownHistogram = + HistogramWatcher.newSingleRecordWatcher("Signin.SyncDisabledNotificationShown", + SigninAccessPoint.NTP_FEED_CARD_MENU_PROMO); when(mSigninManagerMock.isSyncOptInAllowed()).thenReturn(false); when(mSigninManagerMock.isSigninDisabledByPolicy()).thenReturn(true); Assert.assertFalse(SyncConsentActivityLauncherImpl.get().launchActivityIfAllowed( - mContext, SigninAccessPoint.SETTINGS)); + mContext, SigninAccessPoint.NTP_FEED_CARD_MENU_PROMO)); Assert.assertTrue(ShadowToast.showedCustomToast( mContext.getResources().getString(R.string.managed_by_your_organization), R.id.toast_text)); + watchSigninDisabledToastShownHistogram.assertExpected(); } }
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 5755810..25b2e1eb 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -3885,6 +3885,10 @@ "new_tab_page/modules/feed/feed_handler.h", "new_tab_page/modules/history_clusters/cart/cart_processor.cc", "new_tab_page/modules/history_clusters/cart/cart_processor.h", + "new_tab_page/modules/history_clusters/history_clusters_module_service.cc", + "new_tab_page/modules/history_clusters/history_clusters_module_service.h", + "new_tab_page/modules/history_clusters/history_clusters_module_service_factory.cc", + "new_tab_page/modules/history_clusters/history_clusters_module_service_factory.h", "new_tab_page/modules/history_clusters/history_clusters_page_handler.cc", "new_tab_page/modules/history_clusters/history_clusters_page_handler.h", "new_tab_page/modules/modules_switches.cc",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 79a6923c..fca758a 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -6841,6 +6841,9 @@ flag_descriptions::kDisableQuickAnswersV2TranslationDescription, kOsCrOS | kOsLacros, FEATURE_VALUE_TYPE(chromeos::features::kDisableQuickAnswersV2Translation)}, + {"quick-answers-rich-card", flag_descriptions::kQuickAnswersRichCardName, + flag_descriptions::kQuickAnswersRichCardDescription, kOsCrOS | kOsLacros, + FEATURE_VALUE_TYPE(chromeos::features::kQuickAnswersRichCard)}, #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID)
diff --git a/chrome/browser/about_flags_browsertest.cc b/chrome/browser/about_flags_browsertest.cc index 147a133..59d23eb 100644 --- a/chrome/browser/about_flags_browsertest.cc +++ b/chrome/browser/about_flags_browsertest.cc
@@ -87,16 +87,15 @@ std::string GetOriginListText(content::WebContents* contents, const char* experiment_id) { - std::string text; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - contents, - base::StringPrintf( - "var k = document.getElementById('%s');" - "var s = k.getElementsByClassName('experiment-origin-list-value')[0];" - "window.domAutomationController.send(s.value );", - experiment_id), - &text)); - return text; + return content::EvalJs( + contents, + base::StringPrintf( + "var k = document.getElementById('%s');" + "var s = " + "k.getElementsByClassName('experiment-origin-list-value')[0];" + "s.value;", + experiment_id)) + .ExtractString(); } bool IsDropdownEnabled(content::WebContents* contents,
diff --git a/chrome/browser/accessibility/live_caption/live_caption_controller_factory.cc b/chrome/browser/accessibility/live_caption/live_caption_controller_factory.cc index 8e0c274..b14041ea 100644 --- a/chrome/browser/accessibility/live_caption/live_caption_controller_factory.cc +++ b/chrome/browser/accessibility/live_caption/live_caption_controller_factory.cc
@@ -60,7 +60,8 @@ content::BrowserContext* context) const { return new LiveCaptionController( Profile::FromBrowserContext(context)->GetPrefs(), - g_browser_process->local_state(), context); + g_browser_process->local_state(), + g_browser_process->GetApplicationLocale(), context); } } // namespace captions
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc index 3e47402..0e27fc7f 100644 --- a/chrome/browser/apps/guest_view/web_view_browsertest.cc +++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -2565,21 +2565,16 @@ {.launch_as_platform_app = true})); // Verify that the browser tab's local/session storage does not have the same // values which were stored by the webviews. - std::string output; std::string get_local_storage( - "window.domAutomationController.send(" - "window.localStorage.getItem('foo') || 'badval')"); + "window.localStorage.getItem('foo') || 'badval'"); std::string get_session_storage( - "window.domAutomationController.send(" - "window.localStorage.getItem('baz') || 'badval')"); - ASSERT_TRUE(ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetWebContentsAt(0), - get_local_storage.c_str(), &output)); - EXPECT_STREQ("badval", output.c_str()); - ASSERT_TRUE(ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetWebContentsAt(0), - get_session_storage.c_str(), &output)); - EXPECT_STREQ("badval", output.c_str()); + "window.localStorage.getItem('baz') || 'badval'"); + EXPECT_EQ("badval", + content::EvalJs(browser()->tab_strip_model()->GetWebContentsAt(0), + get_local_storage)); + EXPECT_EQ("badval", + content::EvalJs(browser()->tab_strip_model()->GetWebContentsAt(0), + get_session_storage)); } // This tests how guestviews should or should not be able to find each other @@ -4487,48 +4482,45 @@ // *TODO(https://crbug.com/1430991): The exact set of APIs and type of // context this is is a bit fuzzy. In practice, it's basically the same set // as is exposed to content scripts. - std::string accept_languages_result; static constexpr char kGetAcceptLanguages[] = - R"(chrome.i18n.getAcceptLanguages((languages) => { - let result = 'success'; - if (chrome.runtime.lastError) { - result = 'Error: ' + chrome.runtime.lastError; - } else if (!languages || !Array.isArray(languages) || - !languages.includes('en')) { - result = 'Invalid return result: ' + JSON.stringify(languages); - } - domAutomationController.send(result); + R"(new Promise(resolve => { + chrome.i18n.getAcceptLanguages((languages) => { + let result = 'success'; + if (chrome.runtime.lastError) { + result = 'Error: ' + chrome.runtime.lastError; + } else if (!languages || !Array.isArray(languages) || + !languages.includes('en')) { + result = 'Invalid return result: ' + JSON.stringify(languages); + } + resolve(result); + }); });)"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_view_frame, kGetAcceptLanguages, &accept_languages_result)); - EXPECT_EQ("success", accept_languages_result); + EXPECT_EQ("success", content::EvalJs(web_view_frame, kGetAcceptLanguages)); // Finally, try accessing a privileged API, which shouldn't be available to // the embedded resource. // TODO(https://crbug.com/1430991): Even though the API call should fail, the // bindings are unexpectedly available here. Instead, we should just be able // to test `!chrome.app.window`. - std::string app_window_result; static constexpr char kCallAppWindowCreate[] = R"(if (chrome.app && chrome.app.window && chrome.app.window.create) { - chrome.app.window.create('embedder.html', {}, (res) => { - let reply = 'success'; - if (!chrome.runtime.lastError) { - reply = 'No last error found. Result Type: ' + typeof res; - } else if (chrome.runtime.lastError.message != - 'Access to extension API denied.') { - reply = 'Unexpected last error: ' + - chrome.runtime.lastError.message; - } - domAutomationController.send(reply); + new Promise(resolve => { + chrome.app.window.create('embedder.html', {}, (res) => { + let reply = 'success'; + if (!chrome.runtime.lastError) { + reply = 'No last error found. Result Type: ' + typeof res; + } else if (chrome.runtime.lastError.message != + 'Access to extension API denied.') { + reply = 'Unexpected last error: ' + + chrome.runtime.lastError.message; + } + resolve(reply); + }); }); } else { - domAutomationController.send( - 'Unexpectedly missing `chrome.app.window.create`'); + 'Unexpectedly missing `chrome.app.window.create`'; })"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_view_frame, kCallAppWindowCreate, &app_window_result)); - EXPECT_EQ("success", app_window_result); + EXPECT_EQ("success", content::EvalJs(web_view_frame, kCallAppWindowCreate)); } // Tests that a WebView can navigate an iframe to a blob URL that it creates @@ -4552,12 +4544,8 @@ content::RenderFrameHost* blob_frame = ChildFrameAt(webview_rfh, 0); EXPECT_TRUE(blob_frame->GetLastCommittedURL().SchemeIsBlob()); - std::string result; - EXPECT_TRUE(ExecuteScriptAndExtractString( - blob_frame, - "window.domAutomationController.send(document.body.innerText);", - &result)); - EXPECT_EQ("Blob content", result); + EXPECT_EQ("Blob content", + content::EvalJs(blob_frame, "document.body.innerText;")); } // Tests that a WebView cannot load a webview-inaccessible resource. See
diff --git a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc index 38aee7f..4af0fda3 100644 --- a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc +++ b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
@@ -1527,13 +1527,9 @@ EXPECT_TRUE(focus_listener.WaitUntilSatisfied()); // Verify the text inside the <input> is "A B X D". - std::string value; - ASSERT_TRUE(ExecuteScriptAndExtractString(guest_rfh, - "window.domAutomationController." - "send(document.querySelector('" - "input').value)", - &value)); - EXPECT_EQ("A B X D", value); + EXPECT_EQ("A B X D", content::EvalJs(guest_rfh, + "document.querySelector('" + "input').value")); // Now commit "C" to to replace the range (4, 5). // For OOPIF guests, the target for IME is the RWH for the guest's main frame. @@ -1545,13 +1541,9 @@ EXPECT_TRUE(input_listener.WaitUntilSatisfied()); // Get the input value from the guest. - value.clear(); - ASSERT_TRUE(ExecuteScriptAndExtractString(guest_rfh, - "window.domAutomationController." - "send(document.querySelector('" - "input').value)", - &value)); - EXPECT_EQ("A B C D", value); + EXPECT_EQ("A B C D", content::EvalJs(guest_rfh, + "document.querySelector('" + "input').value")); } #endif // BUILDFLAG(IS_MAC) @@ -1587,15 +1579,10 @@ // Clear the string as it already contains some text. Then verify the text in // the <input> is empty. - std::string value; - ASSERT_TRUE(ExecuteScriptAndExtractString( - guest_view->GetGuestMainFrame(), - "var input = document.querySelector('input');" - "input.value = '';" - "window.domAutomationController.send(" - " document.querySelector('input').value)", - &value)); - EXPECT_EQ("", value); + EXPECT_EQ("", content::EvalJs(guest_view->GetGuestMainFrame(), + "var input = document.querySelector('input');" + "input.value = '';" + "document.querySelector('input').value")); // Now set some composition text which should lead to an update in composition // range information.
diff --git a/chrome/browser/ash/accessibility/dictation_browsertest.cc b/chrome/browser/ash/accessibility/dictation_browsertest.cc index 7dd4413..acfc684 100644 --- a/chrome/browser/ash/accessibility/dictation_browsertest.cc +++ b/chrome/browser/ash/accessibility/dictation_browsertest.cc
@@ -466,28 +466,24 @@ } std::string GetEditableValue() { - std::string output; std::string script; switch (editable_type()) { case EditableType::kTextArea: case EditableType::kInput: - script = - "window.domAutomationController.send(" - "document.getElementById('input').value)"; + script = "document.getElementById('input').value"; break; case EditableType::kContentEditable: case EditableType::kFormattedContentEditable: // Replace all non-breaking spaces with regular spaces. Otherwise, // string comparisons will unexpectedly fail. script = - "window.domAutomationController.send(" "document.getElementById('input').innerText.replaceAll(" - "'\u00a0', ' '));"; + "'\u00a0', ' ');"; break; } - CHECK(ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetWebContentsAt(0), script, &output)); - return output; + return content::EvalJs(browser()->tab_strip_model()->GetWebContentsAt(0), + script) + .ExtractString(); } void WaitForEditableValue(const std::string& value) {
diff --git a/chrome/browser/ash/accessibility/switch_access_browsertest.cc b/chrome/browser/ash/accessibility/switch_access_browsertest.cc index 143d60e..8d4cf21 100644 --- a/chrome/browser/ash/accessibility/switch_access_browsertest.cc +++ b/chrome/browser/ash/accessibility/switch_access_browsertest.cc
@@ -66,13 +66,10 @@ } std::string GetInputString() { - std::string output; - std::string script = - "window.domAutomationController.send(" - "document.getElementById('in').value)"; - CHECK(ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetWebContentsAt(0), script, &output)); - return output; + std::string script = "document.getElementById('in').value"; + return content::EvalJs(browser()->tab_strip_model()->GetWebContentsAt(0), + script) + .ExtractString(); } void SetUpOnMainThread() override {
diff --git a/chrome/browser/ash/arc/screen_capture/arc_screen_capture_session.cc b/chrome/browser/ash/arc/screen_capture/arc_screen_capture_session.cc index 76c1ef5..8f312c0 100644 --- a/chrome/browser/ash/arc/screen_capture/arc_screen_capture_session.cc +++ b/chrome/browser/ash/arc/screen_capture/arc_screen_capture_session.cc
@@ -247,7 +247,8 @@ gpu_memory_buffer.get(), gpu_memory_buffer_manager, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2 | - gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT); + gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT, + "ArcScreenCapture"); gl->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData()); GLuint texture = gl->CreateAndTexStorage2DSharedImageCHROMIUM(mailbox.name);
diff --git a/chrome/browser/ash/login/app_mode/test/kiosk_enterprise_browsertest.cc b/chrome/browser/ash/login/app_mode/test/kiosk_enterprise_browsertest.cc index 431b5f03..f32f93f 100644 --- a/chrome/browser/ash/login/app_mode/test/kiosk_enterprise_browsertest.cc +++ b/chrome/browser/ash/login/app_mode/test/kiosk_enterprise_browsertest.cc
@@ -150,14 +150,12 @@ EXPECT_TRUE(content::WaitForLoadStop(window->web_contents())); // Check whether the app can retrieve an OAuth2 access token. - std::string result; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - window->web_contents(), - "chrome.identity.getAuthToken({ 'interactive': false }, function(token) {" - " window.domAutomationController.send(token);" - "});", - &result)); - EXPECT_EQ(kTestAccessToken, result); + EXPECT_EQ(kTestAccessToken, + content::EvalJs(window->web_contents(), + "new Promise(resolve => {" + " chrome.identity.getAuthToken({ 'interactive': " + " false }, resolve);" + "});")); // Verify that the session is not considered to be logged in with a GAIA // account.
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.h b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.h index aa2d04ef..a60001c6 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.h +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection.h
@@ -49,7 +49,7 @@ // is authenticated before calling this function. void MarkConnectionAuthenticated(); - protected: + private: friend class ConnectionTest; using ConnectionResponseCallback =
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc index 42d865e..89e27a0 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc
@@ -65,25 +65,6 @@ constexpr std::array<uint8_t, 6> kRandomSessionId = {0x6b, 0xb3, 0x85, 0x27, 0xbb, 0x28}; -class FakeConnection : public Connection { - public: - explicit FakeConnection( - NearbyConnection* nearby_connection, - base::OnceClosure on_connection_closed, - Connection::ConnectionAuthenticatedCallback on_connection_authenticated) - : Connection(nearby_connection, - RandomSessionId(kRandomSessionId), - kSharedSecret, - std::move(on_connection_closed), - std::move(on_connection_authenticated)) {} - - void SendPayloadAndReadResponseWrapperForTesting( - const base::Value::Dict& message_payload, - PayloadResponseCallback callback) { - SendPayloadAndReadResponse(message_payload, std::move(callback)); - } -}; - } // namespace class ConnectionTest : public testing::Test { @@ -101,8 +82,9 @@ fake_nearby_connection_ = std::make_unique<FakeNearbyConnection>(); NearbyConnection* nearby_connection = fake_nearby_connection_.get(); fake_quick_start_decoder_ = std::make_unique<FakeQuickStartDecoder>(); - connection_ = std::make_unique<FakeConnection>( - nearby_connection, /*on_connection_closed=*/base::DoNothing(), + connection_ = std::make_unique<Connection>( + nearby_connection, session_id_, kSharedSecret, + /*on_connection_closed=*/base::DoNothing(), /*on_connection_authenticated=*/ base::BindLambdaForTesting( [&](base::WeakPtr< @@ -128,9 +110,16 @@ assertion_info_ = assertion_info; } + void SendPayloadAndReadResponse( + const base::Value::Dict& message_payload, + base::OnceCallback<void(absl::optional<std::vector<uint8_t>>)> callback) { + connection_->SendPayloadAndReadResponse(message_payload, + std::move(callback)); + } + base::test::SingleThreadTaskEnvironment task_environment_; std::unique_ptr<FakeNearbyConnection> fake_nearby_connection_; - std::unique_ptr<FakeConnection> connection_; + std::unique_ptr<Connection> connection_; RandomSessionId session_id_ = RandomSessionId(kRandomSessionId); bool ran_assertion_response_callback_ = false; bool ran_connection_authenticated_callback_ = false; @@ -343,7 +332,7 @@ std::vector<uint8_t>(std::begin(kTestBytes), std::end(kTestBytes))); base::RunLoop run_loop; - connection_->SendPayloadAndReadResponseWrapperForTesting( + SendPayloadAndReadResponse( message_payload, base::BindLambdaForTesting( [&run_loop](absl::optional<std::vector<uint8_t>> response) { @@ -369,8 +358,8 @@ TEST_F(ConnectionTest, TestDisconnectionTriggersListener) { base::test::TestFuture<void> future; std::unique_ptr<Connection> connection_under_test = - std::make_unique<FakeConnection>( - fake_nearby_connection_.get(), + std::make_unique<Connection>( + fake_nearby_connection_.get(), session_id_, kSharedSecret, /*on_connection_closed=*/future.GetCallback(), /*on_connection_authenticated=*/base::DoNothing());
diff --git a/chrome/browser/ash/login/test/js_checker.cc b/chrome/browser/ash/login/test/js_checker.cc index bc70f8b..e22b2d4 100644 --- a/chrome/browser/ash/login/test/js_checker.cc +++ b/chrome/browser/ash/login/test/js_checker.cc
@@ -344,8 +344,7 @@ void JSChecker::GetStringImpl(const std::string& expression, std::string* result) { CHECK(web_contents_); - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - web_contents_, WrapSend(expression), result)); + *result = content::EvalJs(web_contents_, expression).ExtractString(); } void JSChecker::ExpectVisiblePath(
diff --git a/chrome/browser/ash/login/test/webview_content_extractor.cc b/chrome/browser/ash/login/test/webview_content_extractor.cc index 2f31c44..0d88cd4d 100644 --- a/chrome/browser/ash/login/test/webview_content_extractor.cc +++ b/chrome/browser/ash/login/test/webview_content_extractor.cc
@@ -57,13 +57,8 @@ content::WaitForLoadStop( content::WebContents::FromRenderFrameHost(FindFrame(element_id))); - std::string text; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - FindFrame(element_id), - "window.domAutomationController.send(document.body.textContent);", - &text)); - - return text; + return content::EvalJs(FindFrame(element_id), "document.body.textContent;") + .ExtractString(); } } // namespace test
diff --git a/chrome/browser/ash/login/wizard_controller_browsertest.cc b/chrome/browser/ash/login/wizard_controller_browsertest.cc index 8e830a8..d056c61e 100644 --- a/chrome/browser/ash/login/wizard_controller_browsertest.cc +++ b/chrome/browser/ash/login/wizard_controller_browsertest.cc
@@ -488,11 +488,7 @@ } std::string JSExecuteStringExpression(const std::string& expression) { - std::string result; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - GetWebContents(), - "window.domAutomationController.send(" + expression + ");", &result)); - return result; + return content::EvalJs(GetWebContents(), expression).ExtractString(); } void CheckCurrentScreen(OobeScreenId screen) {
diff --git a/chrome/browser/ash/net/apn_migrator.cc b/chrome/browser/ash/net/apn_migrator.cc index 6e51708..a6dbc7e 100644 --- a/chrome/browser/ash/net/apn_migrator.cc +++ b/chrome/browser/ash/net/apn_migrator.cc
@@ -290,6 +290,18 @@ pre_revamp_custom_apn->apn_types = {ApnType::kAttach, ApnType::kDefault}; remote_cros_network_config_->CreateCustomApn( guid, std::move(pre_revamp_custom_apn)); + } else if (!last_connected_attach_apn && last_connected_default_apn && + pre_revamp_custom_apn->access_point_name == + (*last_connected_default_apn)->access_point_name) { + NET_LOG(EVENT) << "Network has no last connected attach APN but has " + "a last connected default APN that matches the " + "saved custom APN, migrating APN: " + << guid << " in the Enabled state with Apn type Default"; + + pre_revamp_custom_apn->state = ApnState::kEnabled; + pre_revamp_custom_apn->apn_types = {ApnType::kDefault}; + remote_cros_network_config_->CreateCustomApn( + guid, std::move(pre_revamp_custom_apn)); } // TODO(b/162365553): Implement other cases of |last_connected_attach_apn| // and |last_connected_default_apn|.
diff --git a/chrome/browser/ash/net/apn_migrator_unittest.cc b/chrome/browser/ash/net/apn_migrator_unittest.cc index d00f43d..ffbd5cef 100644 --- a/chrome/browser/ash/net/apn_migrator_unittest.cc +++ b/chrome/browser/ash/net/apn_migrator_unittest.cc
@@ -1021,4 +1021,78 @@ EXPECT_TRUE(base::Contains(custom_apns[0]->apn_types, ApnType::kDefault)); } +TEST_F( + ApnMigratorTest, + MigrateNonManagedNetwork_NoLastConnectedAttachApn_MatchingLastConnectedDefaultApn) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature(features::kApnRevamp); + + const std::string cellular_service_path_1 = AddTestCellularDeviceAndService( + kCellularName1, kTestCellularPath1, kTestCellularIccid1, + kTestCellularGuid1, /*is_managed=*/false); + + // We will use this delegate to simulate a late async reply + network_handler::PropertiesCallback get_managed_properties_callback; + + // Start the migration process for |cellular_service_path_1|. This will + // trigger a GetManagedProperties call. + EXPECT_CALL(*managed_cellular_pref_handler(), + ContainsApnMigratedIccid(Eq(kTestCellularIccid1))) + .WillRepeatedly(Return(false)); + const std::string access_point_name = "apn_1"; + base::Value::Dict custom_apn; + custom_apn.Set(::onc::cellular_apn::kAccessPointName, access_point_name); + base::Value::List populated_apn_list; + populated_apn_list.Append(std::move(custom_apn)); + EXPECT_CALL(*network_metadata_store(), + GetPreRevampCustomApnList(kTestCellularGuid1)) + .Times(2) + .WillRepeatedly(Return(&populated_apn_list)); + EXPECT_CALL(*managed_network_configuration_handler(), + GetManagedProperties(LoginState::Get()->primary_user_hash(), + cellular_service_path_1, _)) + .Times(1) + .WillOnce( + WithArg<2>(Invoke([&](network_handler::PropertiesCallback callback) { + ASSERT_TRUE(get_managed_properties_callback.is_null()); + get_managed_properties_callback = std::move(callback); + ASSERT_FALSE(get_managed_properties_callback.is_null()); + }))); + // Function under test. + TriggerNetworkListChanged(); + + // Execute the GetManagedProperties callback with no last connected attach + // APN, and a last connected default APN that matches the persisted APN. + // This should trigger a call to CreateCustomApns() with the APN in the + // enabled state with APN types of kDefault. + EXPECT_CALL(*managed_network_configuration_handler(), + SetProperties(cellular_service_path_1, _, _, _)) + .Times(0); + EXPECT_CALL(*managed_cellular_pref_handler(), + AddApnMigratedIccid(Eq(kTestCellularIccid1))) + .Times(1); + EXPECT_TRUE(GetCustomApns().empty()); + + absl::optional<base::Value::Dict> properties = base::Value::Dict(); + + base::Value::Dict last_connected_default_apn_dict; + last_connected_default_apn_dict.Set(::onc::cellular_apn::kAccessPointName, + access_point_name); + + base::Value::Dict cellular; + cellular.Set(::onc::cellular::kLastConnectedDefaultApnProperty, + std::move(last_connected_default_apn_dict)); + + properties->Set(::onc::network_config::kCellular, std::move(cellular)); + std::move(get_managed_properties_callback) + .Run(cellular_service_path_1, std::move(properties), + /*error=*/absl::nullopt); + base::RunLoop().RunUntilIdle(); + const std::vector<ApnPropertiesPtr>& custom_apns = GetCustomApns(); + ASSERT_EQ(1u, custom_apns.size()); + EXPECT_EQ(access_point_name, custom_apns[0]->access_point_name); + EXPECT_EQ(ApnState::kEnabled, custom_apns[0]->state); + EXPECT_FALSE(base::Contains(custom_apns[0]->apn_types, ApnType::kAttach)); + EXPECT_TRUE(base::Contains(custom_apns[0]->apn_types, ApnType::kDefault)); +} } // namespace ash
diff --git a/chrome/browser/ash/system_web_apps/system_web_app_manager_browsertest.cc b/chrome/browser/ash/system_web_apps/system_web_app_manager_browsertest.cc index 61f965c4..09b5c1d 100644 --- a/chrome/browser/ash/system_web_apps/system_web_app_manager_browsertest.cc +++ b/chrome/browser/ash/system_web_apps/system_web_app_manager_browsertest.cc
@@ -336,11 +336,7 @@ std::string GetJsStatementValueAsString(content::WebContents* web_contents, const std::string& js_statement) { - std::string str; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_contents, "domAutomationController.send( " + js_statement + ");", - &str)); - return str; + return content::EvalJs(web_contents, js_statement).ExtractString(); } private: @@ -433,17 +429,14 @@ std::string ReadContentFromJsFileHandle( content::WebContents* web_contents, const std::string& file_handle_or_promise) { - std::string js_file_content; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_contents, - "Promise.resolve(" + file_handle_or_promise + ")" + - ".then(async (fileHandle) => {" - " const file = await fileHandle.getFile();" - " const content = await file.text();" - " window.domAutomationController.send(content);" - "});", - &js_file_content)); - return js_file_content; + return content::EvalJs(web_contents, + "Promise.resolve(" + file_handle_or_promise + ")" + + ".then(async (fileHandle) => {" + " const file = await fileHandle.getFile();" + " const content = await file.text();" + " return content;" + "});") + .ExtractString(); } // Writes |content_to_write| to |file_handle_or_promise| file handle. Returns @@ -749,17 +742,17 @@ CheckFileIsGif(web_contents, "window.launchParams.files[1].getFile()")); // Check we can list the directory. - std::string file_names; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_contents, - "(async function() {" - " let fileNames = [];" - " const files = await window.launchParams.files[0].keys();" - " for await (const name of files)" - " fileNames.push(name);" - " domAutomationController.send(fileNames.sort().join(';'));" - "})();", - &file_names)); + std::string file_names = + content::EvalJs( + web_contents, + "(async function() {" + " let fileNames = [];" + " const files = await window.launchParams.files[0].keys();" + " for await (const name of files)" + " fileNames.push(name);" + " return fileNames.sort().join(';');" + "})();") + .ExtractString(); EXPECT_EQ(base::StrCat({kTestPngFile, ";", kTestGifFile}), file_names); // Verify we can read a file (other than launch file) inside the directory.
diff --git a/chrome/browser/ash/web_applications/media_app/media_app_guest_ui_config.cc b/chrome/browser/ash/web_applications/media_app/media_app_guest_ui_config.cc index be49430..88a30d5 100644 --- a/chrome/browser/ash/web_applications/media_app/media_app_guest_ui_config.cc +++ b/chrome/browser/ash/web_applications/media_app/media_app_guest_ui_config.cc
@@ -16,6 +16,7 @@ #include "chrome/common/channel_info.h" #include "chrome/common/pref_names.h" #include "chrome/common/webui_url_constants.h" +#include "chromeos/constants/chromeos_features.h" #include "components/prefs/pref_service.h" #include "components/services/app_service/public/cpp/app_registry_cache.h" #include "components/services/app_service/public/cpp/types_util.h" @@ -49,6 +50,7 @@ !pref_service->GetBoolean(prefs::kPdfAnnotationsEnabled)); version_info::Channel channel = chrome::GetChannel(); source->AddBoolean("colorThemes", ash::features::IsDarkLightModeEnabled()); + source->AddBoolean("jelly", chromeos::features::IsJellyEnabled()); base::Version min_photos_version("6.12"); bool photos_available = photos_installed && photos_version.IsValid() && photos_version >= min_photos_version;
diff --git a/chrome/browser/autofill/android/BUILD.gn b/chrome/browser/autofill/android/BUILD.gn index 23fe7c7..3f4d132 100644 --- a/chrome/browser/autofill/android/BUILD.gn +++ b/chrome/browser/autofill/android/BUILD.gn
@@ -28,6 +28,7 @@ "//base:base_java", "//base:jni_java", "//build/android:build_java", + "//chrome/android:chrome_app_java_resources", "//chrome/browser/android/customtabs/branding:java", "//chrome/browser/feedback/android:java", "//chrome/browser/feedback/android:java_resources",
diff --git a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillUiUtils.java b/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillUiUtils.java index f9479136..d1ea6cc 100644 --- a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillUiUtils.java +++ b/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillUiUtils.java
@@ -30,6 +30,7 @@ import android.view.View.MeasureSpec; import android.view.ViewGroup; import android.widget.EditText; +import android.widget.ImageView; import android.widget.PopupWindow; import android.widget.TextView; @@ -517,6 +518,22 @@ return R.dimen.settings_page_card_icon_height; } + public static int getCardUnmaskDialogIconWidthId() { + if (ChromeFeatureList.isEnabled( + ChromeFeatureList.AUTOFILL_ENABLE_NEW_CARD_ART_AND_NETWORK_IMAGES)) { + return R.dimen.card_unmask_dialog_credit_card_icon_width_new; + } + return R.dimen.card_unmask_dialog_credit_card_icon_width; + } + + public static int getCardUnmaskDialogIconHeightId() { + if (ChromeFeatureList.isEnabled( + ChromeFeatureList.AUTOFILL_ENABLE_NEW_CARD_ART_AND_NETWORK_IMAGES)) { + return R.dimen.card_unmask_dialog_credit_card_icon_height_new; + } + return R.dimen.card_unmask_dialog_credit_card_icon_height; + } + /** * Resize the bitmap to the required specs, round corners, and add grey border. * @param bitmap to be updated. @@ -559,4 +576,41 @@ return scaledBitmapWithEnhancements; } + + /** + * Adds credit card details in the card details section. + * @param context to get the resources. + * @param parentView View that contains the card details section. + * @param cardName Card's nickname/product name/network name. + * @param cardNumber Card's obfuscated last 4 digits. + * @param cardExpiration Card's expiration. + * @param cardArtUrl URL to fetch custom card art. + * @param defaultIconId Resource Id for the default (network) icon if the card art doesn't exist + * or couldn't be retrieved. + * @param cardNameAndNumberTextAppearance Text appearance Id for the card name and the card + * number. + * @param cardExpirationTextAppearance Text appearance Id for the card expiration. + * @param showCustomIcon If true, custom card icon is shown, else, default icon is shown. + */ + public static void addCardDetails(Context context, View parentView, String cardName, + String cardNumber, String cardExpiration, GURL cardArtUrl, int defaultIconId, + int cardNameAndNumberTextAppearance, int cardExpirationTextAppearance, + boolean showCustomIcon) { + ImageView cardIconView = parentView.findViewById(R.id.card_icon); + cardIconView.setImageDrawable(getCardIcon(context, cardArtUrl, defaultIconId, + getCardUnmaskDialogIconWidthId(), getCardUnmaskDialogIconHeightId(), + R.dimen.card_art_corner_radius, showCustomIcon)); + + TextView cardNameView = parentView.findViewById(R.id.card_name); + cardNameView.setText(cardName); + cardNameView.setTextAppearance(cardNameAndNumberTextAppearance); + + TextView cardNumberView = parentView.findViewById(R.id.card_number); + cardNumberView.setText(cardNumber); + cardNumberView.setTextAppearance(cardNameAndNumberTextAppearance); + + TextView cardExpirationView = parentView.findViewById(R.id.card_expiration); + cardExpirationView.setText(cardExpiration); + cardExpirationView.setTextAppearance(cardExpirationTextAppearance); + } }
diff --git a/chrome/browser/autofill/captured_sites_test_utils.cc b/chrome/browser/autofill/captured_sites_test_utils.cc index ca96acf..b31719d 100644 --- a/chrome/browser/autofill/captured_sites_test_utils.cc +++ b/chrome/browser/autofill/captured_sites_test_utils.cc
@@ -2068,21 +2068,21 @@ const std::string& element_xpath, const std::string& get_property_function_body, std::string* property) { - return ExecuteScriptAndExtractString( - frame, - base::StringPrintf( - "window.domAutomationController.send(" - " (function() {" - " try {" - " var element = function() {" - " return automation_helper.getElementByXpath(`%s`);" - " }();" - " return function(target){%s}(element);" - " } catch (ex) {}" - " return 'Exception encountered';" - " })());", - element_xpath.c_str(), get_property_function_body.c_str()), - property); + *property = + content::EvalJs( + frame, base::StringPrintf( + "(function() {" + " try {" + " var element = function() {" + " return automation_helper.getElementByXpath(`%s`);" + " }();" + " return function(target){%s}(element);" + " } catch (ex) {}" + " return 'Exception encountered';" + "})();", + element_xpath.c_str(), get_property_function_body.c_str())) + .ExtractString(); + return true; } bool TestRecipeReplayer::ExpectElementPropertyEqualsAnyOf( @@ -2194,28 +2194,22 @@ const std::string& target_element_xpath, content::RenderFrameHost* frame, gfx::Rect* output_rect) { - std::string rect_str; const std::string get_element_bounding_rect_js(base::StringPrintf( - "window.domAutomationController.send(" - " (function() {" - " try {" - " const element = automation_helper.getElementByXpath(`%s`);" - " const rect = element.getBoundingClientRect();" - " return Math.round(rect.left) + ',' + " - " Math.round(rect.top) + ',' + " - " Math.round(rect.width) + ',' + " - " Math.round(rect.height);" - " } catch(ex) {}" - " return '';" - " })());", + "(function() {" + " try {" + " const element = automation_helper.getElementByXpath(`%s`);" + " const rect = element.getBoundingClientRect();" + " return Math.round(rect.left) + ',' + " + " Math.round(rect.top) + ',' + " + " Math.round(rect.width) + ',' + " + " Math.round(rect.height);" + " } catch(ex) {}" + " return '';" + "})();", target_element_xpath.c_str())); - if (!content::ExecuteScriptAndExtractString( - frame, get_element_bounding_rect_js, &rect_str)) { - ADD_FAILURE() - << "Failed to run script to extract target element's bounding rect!"; - return false; - } + std::string rect_str = + content::EvalJs(frame, get_element_bounding_rect_js).ExtractString(); if (rect_str.empty()) { ADD_FAILURE() << "Failed to extract target element's bounding rect!";
diff --git a/chrome/browser/banners/android/BUILD.gn b/chrome/browser/banners/android/BUILD.gn index 39582a3..8f5f23aa 100644 --- a/chrome/browser/banners/android/BUILD.gn +++ b/chrome/browser/banners/android/BUILD.gn
@@ -67,7 +67,6 @@ "//chrome/browser/ui/android/strings:ui_strings_grd", "//chrome/browser/webapps/android:java", "//chrome/test/android:chrome_java_integration_test_support", - "//chrome/test/android:chrome_java_integration_test_support_uncommon", "//components/browser_ui/bottomsheet/android:java", "//components/feature_engagement/public:public_java", "//components/infobars/android:java",
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc index abc199a..f4e8faa 100644 --- a/chrome/browser/browser_keyevents_browsertest.cc +++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -33,19 +33,14 @@ const char kTestingPage[] = "/keyevents_test.html"; const char kSuppressEventJS[] = "window.domAutomationController.send(setDefaultAction('%ls', %ls));"; -const char kGetResultJS[] = - "window.domAutomationController.send(keyEventResult[%d]);"; +const char kGetResultJS[] = "keyEventResult[%d];"; const char kGetResultLengthJS[] = "keyEventResult.length;"; -const char kGetFocusedElementJS[] = - "window.domAutomationController.send(focusedElement);"; +const char kGetFocusedElementJS[] = "focusedElement;"; const char kSetFocusedElementJS[] = "window.domAutomationController.send(setFocusedElement('%ls'));"; -const char kGetTextBoxValueJS[] = - "window.domAutomationController.send(" - " document.getElementById('%ls').value);"; +const char kGetTextBoxValueJS[] = "document.getElementById('%ls').value;"; const char kSetTextBoxValueJS[] = - "window.domAutomationController.send(" - " document.getElementById('%ls').value = '%ls');"; + "document.getElementById('%ls').value = '%ls';"; const char kStartTestJS[] = "window.domAutomationController.send(startTest(%d));"; @@ -180,11 +175,11 @@ ASSERT_NO_FATAL_FAILURE(GetResultLength(tab_index, &actual_length)); ASSERT_GE(actual_length, length); for (int i = 0; i < actual_length; ++i) { - std::string actual; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetWebContentsAt(tab_index), - base::StringPrintf(kGetResultJS, i), - &actual)); + std::string actual = + content::EvalJs( + browser()->tab_strip_model()->GetWebContentsAt(tab_index), + base::StringPrintf(kGetResultJS, i)) + .ExtractString(); // If more events were received than expected, then the additional events // must be keyup events. @@ -197,12 +192,10 @@ void CheckFocusedElement(int tab_index, const wchar_t* focused) { ASSERT_LT(tab_index, browser()->tab_strip_model()->count()); - std::string actual; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetWebContentsAt(tab_index), - kGetFocusedElementJS, - &actual)); - ASSERT_EQ(base::WideToUTF8(focused), actual); + ASSERT_EQ(base::WideToUTF8(focused), + content::EvalJs( + browser()->tab_strip_model()->GetWebContentsAt(tab_index), + kGetFocusedElementJS)); } void SetFocusedElement(int tab_index, const wchar_t* focused) { @@ -218,23 +211,19 @@ void CheckTextBoxValue(int tab_index, const wchar_t* id, const wchar_t* value) { ASSERT_LT(tab_index, browser()->tab_strip_model()->count()); - std::string actual; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetWebContentsAt(tab_index), - base::StringPrintf(kGetTextBoxValueJS, id), - &actual)); - ASSERT_EQ(base::WideToUTF8(value), actual); + ASSERT_EQ(base::WideToUTF8(value), + content::EvalJs( + browser()->tab_strip_model()->GetWebContentsAt(tab_index), + base::StringPrintf(kGetTextBoxValueJS, id))); } void SetTextBoxValue(int tab_index, const wchar_t* id, const wchar_t* value) { ASSERT_LT(tab_index, browser()->tab_strip_model()->count()); - std::string actual; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetWebContentsAt(tab_index), - base::StringPrintf(kSetTextBoxValueJS, id, value), - &actual)); - ASSERT_EQ(base::WideToUTF8(value), actual); + ASSERT_EQ(base::WideToUTF8(value), + content::EvalJs( + browser()->tab_strip_model()->GetWebContentsAt(tab_index), + base::StringPrintf(kSetTextBoxValueJS, id, value))); } void StartTest(int tab_index, int result_length) {
diff --git a/chrome/browser/browsing_data/browsing_data_model_browsertest.cc b/chrome/browser/browsing_data/browsing_data_model_browsertest.cc index f6fbd32..65903f1 100644 --- a/chrome/browser/browsing_data/browsing_data_model_browsertest.cc +++ b/chrome/browser/browsing_data/browsing_data_model_browsertest.cc
@@ -330,7 +330,7 @@ try { await fetch("/issue", {privateToken: {version: 1, operation: 'token-request'}}); - return await document.hasPrivateToken($1, 'private-state-token'); + return await document.hasPrivateToken($1); } catch { return false; }
diff --git a/chrome/browser/chrome_do_not_track_browsertest.cc b/chrome/browser/chrome_do_not_track_browsertest.cc index 24613ef..41fbafa 100644 --- a/chrome/browser/chrome_do_not_track_browsertest.cc +++ b/chrome/browser/chrome_do_not_track_browsertest.cc
@@ -27,12 +27,9 @@ } void ExpectPageTextEq(const std::string& expected_content) { - std::string text; - ASSERT_TRUE(ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), - "window.domAutomationController.send(document.body.innerText);", - &text)); - EXPECT_EQ(expected_content, text); + EXPECT_EQ(expected_content, + EvalJs(browser()->tab_strip_model()->GetActiveWebContents(), + "document.body.innerText;")); } content::WebContents* GetWebContents() {
diff --git a/chrome/browser/chrome_navigation_browsertest.cc b/chrome/browser/chrome_navigation_browsertest.cc index 36ef870..04f0fca 100644 --- a/chrome/browser/chrome_navigation_browsertest.cc +++ b/chrome/browser/chrome_navigation_browsertest.cc
@@ -218,11 +218,7 @@ { // Double-check that main_contents has expected window.name set. // This is a sanity check of test setup; this is not a product test. - std::string name_of_main_contents_window; - EXPECT_TRUE(ExecuteScriptAndExtractString( - main_contents, "window.domAutomationController.send(window.name)", - &name_of_main_contents_window)); - EXPECT_EQ("main_contents", name_of_main_contents_window); + EXPECT_EQ("main_contents", EvalJs(main_contents, "window.name")); // Verify that the new contents doesn't have a window.opener set. bool window_opener_cast_to_bool = true; @@ -270,13 +266,10 @@ // Verify that the new contents cannot find the old contents via // window.open. (i.e. window.open should open a new window, rather than // returning a reference to main_contents / old window). - std::string location_of_opened_window; - EXPECT_TRUE(ExecuteScriptAndExtractString( - new_contents, - "w = window.open('', 'main_contents');" - "window.domAutomationController.send(w.location.href);", - &location_of_opened_window)); - EXPECT_EQ(url::kAboutBlankURL, location_of_opened_window); + EXPECT_EQ(url::kAboutBlankURL, + EvalJs(new_contents, + "w = window.open('', 'main_contents');" + "w.location.href;")); } }; @@ -545,17 +538,15 @@ content::RenderFrameHost* error_host = ChildFrameAt(web_contents->GetPrimaryMainFrame(), 0); std::string location; - EXPECT_TRUE(ExecuteScriptAndExtractString( - error_host, - "location='javascript:domAutomationController.send(location.href)';", - &location)); - EXPECT_EQ(location, content::kUnreachableWebDataURL); + EXPECT_EQ( + EvalJs( + error_host, + "location='javascript:domAutomationController.send(location.href)';", + content::EXECUTE_SCRIPT_USE_MANUAL_REPLY), + content::kUnreachableWebDataURL); // The error page should have a unique origin. - std::string origin; - EXPECT_TRUE(ExecuteScriptAndExtractString( - error_host, "domAutomationController.send(self.origin);", &origin)); - EXPECT_EQ("null", origin); + EXPECT_EQ("null", EvalJs(error_host, "self.origin;")); } // Test that web pages can't navigate to an error page URL, either directly or @@ -629,12 +620,9 @@ // the error page content to be populated asynchronously by scripts after // DidFinishLoad. while (true) { - std::string content; - EXPECT_TRUE(ExecuteScriptAndExtractString( - web_contents, - "domAutomationController.send(" - " document.body ? document.body.innerText : '');", - &content)); + std::string content = + EvalJs(web_contents, "document.body ? document.body.innerText : '';") + .ExtractString(); if (content.find("HTTP ERROR 404") != std::string::npos) break; base::RunLoop run_loop;
diff --git a/chrome/browser/chrome_security_exploit_browsertest.cc b/chrome/browser/chrome_security_exploit_browsertest.cc index b33408b5..e89c2b6 100644 --- a/chrome/browser/chrome_security_exploit_browsertest.cc +++ b/chrome/browser/chrome_security_exploit_browsertest.cc
@@ -343,13 +343,12 @@ } else { EXPECT_EQ(GURL(target_origin), rfh->GetSiteInstance()->GetSiteURL()); } - std::string body; std::string script = R"( var textContent = document.body.innerText.replace(/\n+/g, '\n'); - window.domAutomationController.send(textContent); + textContent; )"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString(rfh, script, &body)); + std::string body = content::EvalJs(rfh, script).ExtractString(); EXPECT_EQ( "Your file couldn’t be accessed\n" "It may have been moved, edited, or deleted.\n" @@ -432,10 +431,10 @@ std::string body; std::string script = R"( var textContent = document.body.innerText.replace(/\n+/g, '\n'); - window.domAutomationController.send(textContent); + textContent; )"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString(rfh, script, &body)); + body = content::EvalJs(rfh, script).ExtractString(); EXPECT_EQ( "Your file couldn’t be accessed\n" "It may have been moved, edited, or deleted.\n"
diff --git a/chrome/browser/client_hints/client_hints_browsertest.cc b/chrome/browser/client_hints/client_hints_browsertest.cc index e579fe2..da000fb 100644 --- a/chrome/browser/client_hints/client_hints_browsertest.cc +++ b/chrome/browser/client_hints/client_hints_browsertest.cc
@@ -1903,11 +1903,8 @@ blink::UserAgentOverride::UserAgentOnly("foo"), false); // Not enabled first. ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), kUrl)); - std::string header_value; - EXPECT_TRUE(ExecuteScriptAndExtractString( - web_contents, - "window.domAutomationController.send(document.body.textContent);", - &header_value)); + std::string header_value = + EvalJs(web_contents, "document.body.textContent;").ExtractString(); EXPECT_EQ(std::string::npos, header_value.find("foo")) << header_value; // Actually turn it on. @@ -1916,16 +1913,12 @@ ->SetIsOverridingUserAgent(true); ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), kUrl)); - EXPECT_TRUE(ExecuteScriptAndExtractString( - web_contents, - "window.domAutomationController.send(document.body.textContent);", - &header_value)); + header_value = + EvalJs(web_contents, "document.body.textContent;").ExtractString(); EXPECT_EQ("foo\nNone\nNone", header_value); - EXPECT_TRUE( - ExecuteScriptAndExtractString(web_contents, - "window.domAutomationController.send(JSON." - "stringify(navigator.userAgentData));", - &header_value)); + header_value = + EvalJs(web_contents, "JSON.stringify(navigator.userAgentData);") + .ExtractString(); EXPECT_EQ(R"({"brands":[],"mobile":false,"platform":""})", header_value); // Now actually provide values for the hints. @@ -1937,16 +1930,12 @@ "Foobarnator", "3.14"); web_contents->SetUserAgentOverride(ua_override, false); ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), kUrl)); - EXPECT_TRUE(ExecuteScriptAndExtractString( - web_contents, - "window.domAutomationController.send(document.body.textContent);", - &header_value)); + header_value = + EvalJs(web_contents, "document.body.textContent;").ExtractString(); EXPECT_EQ("foobar\n\"Foobarnator\";v=\"3.14\"\n?1", header_value); - EXPECT_TRUE( - ExecuteScriptAndExtractString(web_contents, - "window.domAutomationController.send(JSON." - "stringify(navigator.userAgentData));", - &header_value)); + header_value = + EvalJs(web_contents, "JSON.stringify(navigator.userAgentData);") + .ExtractString(); const std::string kExpected = "{\"brands\":[{\"brand\":\"Foobarnator\",\"version\":\"3.14\"}]," "\"mobile\":true,\"platform\":\"\"}"; @@ -1986,17 +1975,12 @@ // false values. ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), kUrl)); - std::string header_value; - EXPECT_TRUE(ExecuteScriptAndExtractString( - web_contents, - "window.domAutomationController.send(document.body.textContent);", - &header_value)); + std::string header_value = + EvalJs(web_contents, "document.body.textContent;").ExtractString(); EXPECT_EQ("foo\n\n?0", header_value); - EXPECT_TRUE( - ExecuteScriptAndExtractString(web_contents, - "window.domAutomationController.send(JSON." - "stringify(navigator.userAgentData));", - &header_value)); + header_value = + EvalJs(web_contents, "JSON.stringify(navigator.userAgentData);") + .ExtractString(); EXPECT_EQ(R"({"brands":[],"mobile":false,"platform":""})", header_value); }
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc index d0d4d8f..e4895aec 100644 --- a/chrome/browser/content_settings/content_settings_browsertest.cc +++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -298,12 +298,9 @@ private: // Read a cookie via JavaScript. std::string JSReadCookie(Browser* browser) { - std::string cookies; - bool rv = content::ExecuteScriptAndExtractString( - browser->tab_strip_model()->GetActiveWebContents(), - "window.domAutomationController.send(document.cookie)", &cookies); - CHECK(rv); - return cookies; + return content::EvalJs(browser->tab_strip_model()->GetActiveWebContents(), + "document.cookie") + .ExtractString(); } // Read a cookie with JavaScript cookie-store API
diff --git a/chrome/browser/device_reauth/mac/device_authenticator_mac.mm b/chrome/browser/device_reauth/mac/device_authenticator_mac.mm index 7a2e5f7..f8ae9b4 100644 --- a/chrome/browser/device_reauth/mac/device_authenticator_mac.mm +++ b/chrome/browser/device_reauth/mac/device_authenticator_mac.mm
@@ -37,8 +37,12 @@ base::UmaHistogramBoolean("PasswordManager.CanUseBiometricsMac", is_available); if (is_available) { + // If biometrics is available, we should record that at one point in time + // biometrics was available on this device. This will never be set to false + // after setting to true here as we only record this when biometrics is + // available. g_browser_process->local_state()->SetBoolean( - password_manager::prefs::kHadBiometricsAvailable, is_available); + password_manager::prefs::kHadBiometricsAvailable, /*value=*/true); } return is_available; }
diff --git a/chrome/browser/devtools/device/port_forwarding_browsertest.cc b/chrome/browser/devtools/device/port_forwarding_browsertest.cc index 50faf011..ed785f2 100644 --- a/chrome/browser/devtools/device/port_forwarding_browsertest.cc +++ b/chrome/browser/devtools/device/port_forwarding_browsertest.cc
@@ -113,19 +113,14 @@ content::WebContents* wc = browser()->tab_strip_model()->GetWebContentsAt(0); - std::string result; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - wc, "window.domAutomationController.send(document.title)", &result)); - ASSERT_EQ("Port forwarding test", result) << "Document has not loaded."; + ASSERT_EQ("Port forwarding test", content::EvalJs(wc, "document.title")) + << "Document has not loaded."; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - wc, "window.domAutomationController.send(getBodyTextContent())", - &result)); - ASSERT_EQ("content", result) << "Javascript has not loaded."; + ASSERT_EQ("content", content::EvalJs(wc, "getBodyTextContent()")) + << "Javascript has not loaded."; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - wc, "window.domAutomationController.send(getBodyMarginLeft())", &result)); - ASSERT_EQ("100px", result) << "CSS has not loaded."; + ASSERT_EQ("100px", content::EvalJs(wc, "getBodyMarginLeft()")) + << "CSS has not loaded."; // Test that disabling port forwarding is handled normally. wait_for_port_forwarding.set_skip_empty_devices(false);
diff --git a/chrome/browser/devtools/devtools_browsertest.cc b/chrome/browser/devtools/devtools_browsertest.cc index fb98635e..9c86012a 100644 --- a/chrome/browser/devtools/devtools_browsertest.cc +++ b/chrome/browser/devtools/devtools_browsertest.cc
@@ -202,17 +202,15 @@ void DispatchOnTestSuite(DevToolsWindow* window, const char* method, T... args) { - std::string result; WebContents* wc = DevToolsWindowTesting::Get(window)->main_web_contents(); // At first check that JavaScript part of the front-end is loaded by // checking that global variable uiTests exists(it's created after all js // files have been loaded) and has runTest method. - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - wc, - "window.domAutomationController.send(" - " '' + (window.uiTests && (typeof uiTests.dispatchOnTestSuite)));", - &result)); - ASSERT_EQ("function", result) << "DevTools front-end is broken."; + ASSERT_EQ( + "function", + content::EvalJs( + wc, "'' + (window.uiTests && (typeof uiTests.dispatchOnTestSuite))")) + << "DevTools front-end is broken."; LoadLegacyFilesInFrontend(window); DispatchOnTestSuiteSkipCheck(window, method, args...); } @@ -1570,10 +1568,8 @@ devtools_instance->GetSiteURL().SchemeIs(content::kChromeDevToolsScheme)); EXPECT_EQ(devtools_instance, devtools_iframe_rfh->GetSiteInstance()); - std::string message; - EXPECT_TRUE(ExecuteScriptAndExtractString( - devtools_iframe_rfh, "domAutomationController.send(self.origin)", - &message)); + std::string message = + content::EvalJs(devtools_iframe_rfh, "self.origin").ExtractString(); EXPECT_EQ(devtools_url.DeprecatedGetOriginAsURL().spec(), message + "/"); } @@ -2087,12 +2083,12 @@ IN_PROC_BROWSER_TEST_F(DevToolsTest, TestPageWithNoJavaScript) { OpenDevToolsWindow("about:blank", false); std::string result; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - main_web_contents(), - "window.domAutomationController.send(" - " '' + (window.uiTests && (typeof uiTests.dispatchOnTestSuite)));", - &result)); - ASSERT_EQ("function", result) << "DevTools front-end is broken."; + ASSERT_EQ( + "function", + content::EvalJs( + main_web_contents(), + "'' + (window.uiTests && (typeof uiTests.dispatchOnTestSuite));")) + << "DevTools front-end is broken."; CloseDevToolsWindow(); }
diff --git a/chrome/browser/devtools/devtools_settings.cc b/chrome/browser/devtools/devtools_settings.cc index 5dbc5506..bc14347 100644 --- a/chrome/browser/devtools/devtools_settings.cc +++ b/chrome/browser/devtools/devtools_settings.cc
@@ -64,7 +64,7 @@ remove_update->Remove(name); } -base::Value DevToolsSettings::Get() { +base::Value::Dict DevToolsSettings::Get() { base::Value::Dict settings; PrefService* prefs = profile_->GetPrefs(); @@ -76,7 +76,7 @@ settings.Merge(prefs->GetDict(prefs::kDevToolsPreferences).Clone()); settings.Merge(prefs->GetDict(GetDictionaryNameForSyncedPrefs()).Clone()); - return base::Value(std::move(settings)); + return settings; } absl::optional<base::Value> DevToolsSettings::Get(const std::string& name) {
diff --git a/chrome/browser/devtools/devtools_settings.h b/chrome/browser/devtools/devtools_settings.h index c2bde47..07e0f5ac 100644 --- a/chrome/browser/devtools/devtools_settings.h +++ b/chrome/browser/devtools/devtools_settings.h
@@ -35,7 +35,7 @@ ~DevToolsSettings(); void Register(const std::string& name, const RegisterOptions& options); - base::Value Get(); + base::Value::Dict Get(); absl::optional<base::Value> Get(const std::string& name); void Set(const std::string& name, const std::string& value); void Remove(const std::string& name);
diff --git a/chrome/browser/devtools/devtools_settings_unittest.cc b/chrome/browser/devtools/devtools_settings_unittest.cc index 9d5fc6d..470d9f01 100644 --- a/chrome/browser/devtools/devtools_settings_unittest.cc +++ b/chrome/browser/devtools/devtools_settings_unittest.cc
@@ -28,19 +28,19 @@ settings.Set("setting_a", "foo"); settings.Set("setting_b", "bar"); - base::Value prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey("setting_a"), "foo"); - EXPECT_EQ(*prefs.FindStringKey("setting_b"), "bar"); + base::Value::Dict prefs = settings.Get(); + EXPECT_EQ(*prefs.FindString("setting_a"), "foo"); + EXPECT_EQ(*prefs.FindString("setting_b"), "bar"); settings.Remove("setting_a"); prefs = settings.Get(); - EXPECT_EQ(prefs.FindStringKey("setting_a"), nullptr); + EXPECT_EQ(prefs.FindString("setting_a"), nullptr); settings.Clear(); prefs = settings.Get(); // kSyncDevToolsPreferenceFrontendName is always reported. - EXPECT_EQ(prefs.DictSize(), static_cast<size_t>(1)); - EXPECT_EQ(prefs.FindStringKey("setting_b"), nullptr); + EXPECT_EQ(prefs.size(), static_cast<size_t>(1)); + EXPECT_EQ(prefs.FindString("setting_b"), nullptr); } TEST_F(DevToolsSettingsTest, CanMoveUnsyncedSettingToBeingSynced) { @@ -54,16 +54,16 @@ DevToolsSettings settings(&profile_); settings.Register("setting", {RegisterOptions::SyncMode::kDontSync}); - base::Value prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey("setting"), "value"); + base::Value::Dict prefs = settings.Get(); + EXPECT_EQ(*prefs.FindString("setting"), "value"); settings.Set("setting", "new_value"); prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey("setting"), "new_value"); + EXPECT_EQ(*prefs.FindString("setting"), "new_value"); settings.Remove("setting"); prefs = settings.Get(); - EXPECT_EQ(prefs.FindStringKey("setting"), nullptr); + EXPECT_EQ(prefs.FindString("setting"), nullptr); } TEST_F(DevToolsSettingsTest, CanMoveSyncedSettingToBeingUnsynced) { @@ -77,16 +77,16 @@ DevToolsSettings settings(&profile_); settings.Register("setting", {RegisterOptions::SyncMode::kSync}); - base::Value prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey("setting"), "value"); + base::Value::Dict prefs = settings.Get(); + EXPECT_EQ(*prefs.FindString("setting"), "value"); settings.Set("setting", "new_value"); prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey("setting"), "new_value"); + EXPECT_EQ(*prefs.FindString("setting"), "new_value"); settings.Remove("setting"); prefs = settings.Get(); - EXPECT_EQ(prefs.FindStringKey("setting"), nullptr); + EXPECT_EQ(prefs.FindString("setting"), nullptr); } TEST_F(DevToolsSettingsTest, MovingUnsycnedToSyncedDoesNotOverwrite) { @@ -112,8 +112,8 @@ DevToolsSettings settings(&profile_); settings.Register("setting", {RegisterOptions::SyncMode::kSync}); - base::Value prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey("setting"), "overwritten synced value"); + base::Value::Dict prefs = settings.Get(); + EXPECT_EQ(*prefs.FindString("setting"), "overwritten synced value"); } TEST_F(DevToolsSettingsTest, Set_SetsTheUnderlyingTogglePreference) { @@ -136,15 +136,15 @@ profile_.GetPrefs()->SetBoolean(prefs::kDevToolsSyncPreferences, true); auto prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey( - DevToolsSettings::kSyncDevToolsPreferencesFrontendName), - "true"); + EXPECT_EQ( + *prefs.FindString(DevToolsSettings::kSyncDevToolsPreferencesFrontendName), + "true"); profile_.GetPrefs()->SetBoolean(prefs::kDevToolsSyncPreferences, false); prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey( - DevToolsSettings::kSyncDevToolsPreferencesFrontendName), - "false"); + EXPECT_EQ( + *prefs.FindString(DevToolsSettings::kSyncDevToolsPreferencesFrontendName), + "false"); } TEST_F(DevToolsSettingsTest, Remove_ResetsUnderlyingTogglePreference) { @@ -185,9 +185,9 @@ // 3) Disable sync settings.Set(DevToolsSettings::kSyncDevToolsPreferencesFrontendName, "false"); - base::Value prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey("setting_unsynced"), "unsynced value"); - EXPECT_EQ(*prefs.FindStringKey("setting_synced"), "synced value"); + base::Value::Dict prefs = settings.Get(); + EXPECT_EQ(*prefs.FindString("setting_unsynced"), "unsynced value"); + EXPECT_EQ(*prefs.FindString("setting_synced"), "synced value"); } TEST_F(DevToolsSettingsTest, DisableEnableSyncPreservesSettings) { @@ -204,9 +204,9 @@ // 3) Enable sync settings.Set(DevToolsSettings::kSyncDevToolsPreferencesFrontendName, "true"); - base::Value prefs = settings.Get(); - EXPECT_EQ(*prefs.FindStringKey("setting_unsynced"), "unsynced value"); - EXPECT_EQ(*prefs.FindStringKey("setting_synced"), "synced value"); + base::Value::Dict prefs = settings.Get(); + EXPECT_EQ(*prefs.FindString("setting_unsynced"), "unsynced value"); + EXPECT_EQ(*prefs.FindString("setting_synced"), "synced value"); } TEST_F(DevToolsSettingsTest, GetPreference) {
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc index 8d69d1b22..08e9de5 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.cc +++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -1228,7 +1228,7 @@ } void DevToolsUIBindings::GetPreferences(DispatchCallback callback) { - base::Value settings = settings_.Get(); + base::Value settings = base::Value(settings_.Get()); std::move(callback).Run(&settings); }
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc index c6dcf57..59e81df 100644 --- a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc +++ b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc
@@ -629,7 +629,11 @@ credentials_to_move.push_back(*entry); } - saved_passwords_presenter_.MoveCredentialsToAccount(credentials_to_move); + // Desktop settings only offer bulk move, not invidual moves. + saved_passwords_presenter_.MoveCredentialsToAccount( + credentials_to_move, + password_manager::metrics_util::MoveToAccountStoreTrigger:: + kExplicitlyTriggeredForMultiplePasswordsInSettings); } void PasswordsPrivateDelegateImpl::ImportPasswords(
diff --git a/chrome/browser/extensions/extension_webui_apitest.cc b/chrome/browser/extensions/extension_webui_apitest.cc index c7c193d..00e2dfa2 100644 --- a/chrome/browser/extensions/extension_webui_apitest.cc +++ b/chrome/browser/extensions/extension_webui_apitest.cc
@@ -228,10 +228,12 @@ ASSERT_TRUE(load_listener.WaitUntilSatisfied()); } -// Tests that an <extensionoptions> guest view can access the chrome.storage -// API, a privileged extension API. +// Tests that an <extensionoptions> guest view can access appropriate APIs, +// including chrome.storage (semi-privileged; exposed to trusted contexts and +// contexts like content scripts and embedded resources in platform apps) and +// chrome.tabs (privileged; only exposed to trusted contexts). IN_PROC_BROWSER_TEST_F(ExtensionWebUIEmbeddedOptionsTest, - ExtensionOptionsCanAccessStorage) { + ExtensionOptionsCanAccessAppropriateAPIs) { const Extension* extension = LoadExtension(test_data_dir_.AppendASCII("extension_options") .AppendASCII("extension_with_options_page")); @@ -239,6 +241,8 @@ auto* guest_rfh = OpenExtensionOptions(extension); + // Check access to the storage API, both for getting/setting values and being + // notified of changes. const std::string storage_key = "test"; const int storage_value = 42; @@ -278,6 +282,25 @@ storage_key))); EXPECT_EQ(storage_value, content::EvalJs(guest_rfh, "onChangedPromise;")); + + // Now check access to the tabs API, which is restricted to + // Feature::BLESSED_EXTENSION_CONTEXTs (which this should be). + static constexpr char kTabsExecution[] = + R"(new Promise(r => { + chrome.tabs.create({}, (tab) => { + let message; + // Sanity check that it looks and smells like a tab. + if (tab && tab.index) { + message = 'success'; + } else { + message = chrome.runtime.lastError ? + chrome.runtime.lastError.message : + 'Unknown error'; + } + r(message); + }); + });)"; + EXPECT_EQ("success", content::EvalJs(guest_rfh, kTabsExecution)); } IN_PROC_BROWSER_TEST_F(ExtensionWebUIEmbeddedOptionsTest,
diff --git a/chrome/browser/fast_checkout/fast_checkout_client_impl.cc b/chrome/browser/fast_checkout/fast_checkout_client_impl.cc index 6a4e55a..f8e5403 100644 --- a/chrome/browser/fast_checkout/fast_checkout_client_impl.cc +++ b/chrome/browser/fast_checkout/fast_checkout_client_impl.cc
@@ -7,6 +7,7 @@ #include "base/containers/flat_set.h" #include "base/guid.h" +#include "base/metrics/histogram_functions.h" #include "base/metrics/metrics_hashes.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/fast_checkout/fast_checkout_accessibility_service_impl.h" @@ -173,8 +174,14 @@ return false; } - if (!trigger_validator_->ShouldRun(form, field, fast_checkout_ui_state_, - is_running_, *autofill_manager)) { + FastCheckoutTriggerOutcome trigger_outcome = trigger_validator_->ShouldRun( + form, field, fast_checkout_ui_state_, is_running_, *autofill_manager); + + if (trigger_outcome != FastCheckoutTriggerOutcome::kUnsupportedFieldType) { + base::UmaHistogramEnumeration(kUmaKeyFastCheckoutTriggerOutcome, + trigger_outcome); + } + if (trigger_outcome != FastCheckoutTriggerOutcome::kSuccess) { return false; } @@ -338,7 +345,8 @@ return; } - if (!trigger_validator_->HasValidPersonalData()) { + if (trigger_validator_->HasValidPersonalData() != + FastCheckoutTriggerOutcome::kSuccess) { OnRunComplete(FastCheckoutRunOutcome::kInvalidPersonalData, /*allow_further_runs=*/false); } else { @@ -664,9 +672,10 @@ bool FastCheckoutClientImpl::IsSupported( const autofill::FormData& form, const autofill::FormFieldData& field, - const autofill::AutofillManager& autofill_manager) { + const autofill::AutofillManager& autofill_manager) const { return trigger_validator_->ShouldRun(form, field, fast_checkout_ui_state_, - is_running_, autofill_manager); + is_running_, autofill_manager) == + FastCheckoutTriggerOutcome::kSuccess; } bool FastCheckoutClientImpl::IsNotShownYet() const {
diff --git a/chrome/browser/fast_checkout/fast_checkout_client_impl.h b/chrome/browser/fast_checkout/fast_checkout_client_impl.h index a3542f6f..32bd0825 100644 --- a/chrome/browser/fast_checkout/fast_checkout_client_impl.h +++ b/chrome/browser/fast_checkout/fast_checkout_client_impl.h
@@ -53,9 +53,10 @@ bool IsRunning() const override; bool IsShowing() const override; void OnNavigation(const GURL& url, bool is_cart_or_checkout_url) override; - bool IsSupported(const autofill::FormData& form, - const autofill::FormFieldData& field, - const autofill::AutofillManager& autofill_manager) override; + bool IsSupported( + const autofill::FormData& form, + const autofill::FormFieldData& field, + const autofill::AutofillManager& autofill_manager) const override; bool IsNotShownYet() const override; // FastCheckoutControllerImpl::Delegate:
diff --git a/chrome/browser/fast_checkout/fast_checkout_client_impl_unittest.cc b/chrome/browser/fast_checkout/fast_checkout_client_impl_unittest.cc index aac6f2bf..45a67a1 100644 --- a/chrome/browser/fast_checkout/fast_checkout_client_impl_unittest.cc +++ b/chrome/browser/fast_checkout/fast_checkout_client_impl_unittest.cc
@@ -199,7 +199,7 @@ MockFastCheckoutTriggerValidator() = default; ~MockFastCheckoutTriggerValidator() override = default; - MOCK_METHOD(bool, + MOCK_METHOD(FastCheckoutTriggerOutcome, ShouldRun, (const FormData&, const FormFieldData&, @@ -207,7 +207,7 @@ const bool, const AutofillManager&), (const)); - MOCK_METHOD(bool, HasValidPersonalData, (), (const)); + MOCK_METHOD(FastCheckoutTriggerOutcome, HasValidPersonalData, (), (const)); }; class MockAutofillClient : public autofill::TestContentAutofillClient { @@ -266,7 +266,8 @@ std::make_unique<NiceMock<MockFastCheckoutTriggerValidator>>(); validator_ = trigger_validator.get(); test_client_->trigger_validator_ = std::move(trigger_validator); - ON_CALL(*validator(), ShouldRun).WillByDefault(Return(true)); + ON_CALL(*validator(), ShouldRun) + .WillByDefault(Return(FastCheckoutTriggerOutcome::kSuccess)); test_client_->autofill_client_ = autofill_client(); @@ -348,6 +349,9 @@ EXPECT_TRUE(fast_checkout_client()->TryToStart( GURL(kUrl), autofill::FormData(), autofill::FormFieldData(), autofill_manager()->GetWeakPtr())); + histogram_tester_.ExpectUniqueSample(kUmaKeyFastCheckoutTriggerOutcome, + FastCheckoutTriggerOutcome::kSuccess, + 1u); OnAfterAskForValuesToFill(); fast_checkout_client()->OnOptionsSelected( std::move(autofill_profile_unique_ptr), @@ -472,13 +476,34 @@ // Do not expect Autofill popups to be hidden. EXPECT_CALL(*autofill_client(), HideAutofillPopup).Times(0); + OnBeforeAskForValuesToFill(); EXPECT_FALSE(fast_checkout_client()->TryToStart( GURL(kUrl), autofill::FormData(), autofill::FormFieldData(), nullptr)); EXPECT_TRUE(fast_checkout_client()->IsNotShownYet()); } -TEST_F(FastCheckoutClientImplTest, Start_ShouldRunReturnsFalse_NoRun) { - ON_CALL(*validator(), ShouldRun).WillByDefault(Return(false)); +TEST_F(FastCheckoutClientImplTest, Start_ShouldRunReturnsInvalidData_NoRun) { + ON_CALL(*validator(), ShouldRun) + .WillByDefault( + Return(FastCheckoutTriggerOutcome::kFailureNoValidAutofillProfile)); + + // `FastCheckoutClient` is not running initially. + EXPECT_FALSE(fast_checkout_client()->IsRunning()); + + OnBeforeAskForValuesToFill(); + EXPECT_FALSE(fast_checkout_client()->TryToStart( + GURL(kUrl), autofill::FormData(), autofill::FormFieldData(), + autofill_manager()->GetWeakPtr())); + histogram_tester_.ExpectUniqueSample( + kUmaKeyFastCheckoutTriggerOutcome, + FastCheckoutTriggerOutcome::kFailureNoValidAutofillProfile, 1u); + EXPECT_TRUE(fast_checkout_client()->IsNotShownYet()); +} + +TEST_F(FastCheckoutClientImplTest, + Start_ShouldRunReturnsUnsupportedFile_NoRun) { + ON_CALL(*validator(), ShouldRun) + .WillByDefault(Return(FastCheckoutTriggerOutcome::kUnsupportedFieldType)); // `FastCheckoutClient` is not running initially. EXPECT_FALSE(fast_checkout_client()->IsRunning()); @@ -491,10 +516,13 @@ EXPECT_FALSE(fast_checkout_client()->TryToStart( GURL(kUrl), autofill::FormData(), autofill::FormFieldData(), autofill_manager()->GetWeakPtr())); + // Does not report metrics in case of `kUnsupportedFieldType` trigger outcome. + EXPECT_EQ(histogram_tester_.GetTotalSum(kUmaKeyFastCheckoutTriggerOutcome), + 0); EXPECT_TRUE(fast_checkout_client()->IsNotShownYet()); } -TEST_F(FastCheckoutClientImplTest, Start_ShouldRunReturnsTrue_Run) { +TEST_F(FastCheckoutClientImplTest, Start_ShouldRunReturnsSuccess_Run) { // `FastCheckoutClient` is not running initially. EXPECT_FALSE(fast_checkout_client()->IsRunning()); @@ -524,7 +552,9 @@ TEST_F(FastCheckoutClientImplTest, OnPersonalDataChanged_StopIfInvalidPersonalData) { - ON_CALL(*validator(), HasValidPersonalData).WillByDefault(Return(false)); + ON_CALL(*validator(), HasValidPersonalData) + .WillByDefault( + Return(FastCheckoutTriggerOutcome::kFailureNoValidAutofillProfile)); // `FastCheckoutClient` is not running initially. EXPECT_FALSE(fast_checkout_client()->IsRunning()); @@ -539,6 +569,9 @@ autofill_manager()->GetWeakPtr())); OnAfterAskForValuesToFill(); + histogram_tester_.ExpectUniqueSample(kUmaKeyFastCheckoutTriggerOutcome, + FastCheckoutTriggerOutcome::kSuccess, + 1u); // `FastCheckoutClient` is running. EXPECT_TRUE(fast_checkout_client()->IsRunning()); @@ -555,7 +588,8 @@ TEST_F(FastCheckoutClientImplTest, OnPersonalDataChanged_UpdatesTheUIWithNewData) { - ON_CALL(*validator(), HasValidPersonalData).WillByDefault(Return(true)); + ON_CALL(*validator(), HasValidPersonalData) + .WillByDefault(Return(FastCheckoutTriggerOutcome::kSuccess)); // `FastCheckoutClient` is not running initially. EXPECT_FALSE(fast_checkout_client()->IsRunning());
diff --git a/chrome/browser/fast_checkout/fast_checkout_enums.h b/chrome/browser/fast_checkout/fast_checkout_enums.h index 3ba5f1c..e42a9d9 100644 --- a/chrome/browser/fast_checkout/fast_checkout_enums.h +++ b/chrome/browser/fast_checkout/fast_checkout_enums.h
@@ -28,7 +28,14 @@ kFailureNoValidCreditCard = 5, // The sheet was not shown because there is no valid Autofill profile. kFailureNoValidAutofillProfile = 6, - kMaxValue = kFailureNoValidAutofillProfile + // The sheet was not shown because AutofillProfile setting is disabled. + kFailureAutofillProfileDisabled = 7, + // The sheet was not shown because AutofillCreditCard setting is disabled. + kFailureAutofillCreditCardDisabled = 8, + // FastCheckout is not supported for this field type. This value is not logged + // to UMA. + kUnsupportedFieldType = 9, + kMaxValue = kUnsupportedFieldType }; // Enum defining possible outcomes of a Fast Checkout run.
diff --git a/chrome/browser/fast_checkout/fast_checkout_trigger_validator.h b/chrome/browser/fast_checkout/fast_checkout_trigger_validator.h index b4d0908c..7a41e65 100644 --- a/chrome/browser/fast_checkout/fast_checkout_trigger_validator.h +++ b/chrome/browser/fast_checkout/fast_checkout_trigger_validator.h
@@ -20,18 +20,19 @@ FastCheckoutTriggerValidator& operator=(const FastCheckoutTriggerValidator&) = delete; - // Returns `true` if a Fast Checkout run should be permitted, `false` - // otherwise. Logs outcome to UMA and chrome://autofill-internals. - virtual bool ShouldRun( + // Checks all preconditions that assert whether a Fast Checkout run should be + // permitted. Logs outcome to chrome://autofill-internals. + virtual FastCheckoutTriggerOutcome ShouldRun( const autofill::FormData& form, const autofill::FormFieldData& field, const FastCheckoutUIState ui_state, const bool is_running, const autofill::AutofillManager& autofill_manager) const = 0; - // Returns `true` if the current profile has Autofill data enabled and at - // least one valid Autofill profile and credit card stored, `false` otherwise. - virtual bool HasValidPersonalData() const = 0; + // Returns `FastCheckoutTriggerOutcome::kSuccess` if the current profile has + // Autofill data enabled and at least one valid Autofill profile and credit + // card stored, another `FastCheckoutTriggerOutcome` constant otherwise. + virtual FastCheckoutTriggerOutcome HasValidPersonalData() const = 0; protected: FastCheckoutTriggerValidator() = default;
diff --git a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc index 047ef51..18bed8e 100644 --- a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc +++ b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc
@@ -4,7 +4,6 @@ #include "chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.h" -#include "base/metrics/histogram_functions.h" #include "chrome/browser/fast_checkout/fast_checkout_capabilities_fetcher.h" #include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "components/autofill/core/browser/logging/log_manager.h" @@ -13,13 +12,6 @@ #include "components/autofill/core/common/autofill_internals/logging_scope.h" #include "components/autofill/core/common/logging/log_macros.h" -namespace { -void LogUmaTriggerOutcome(FastCheckoutTriggerOutcome trigger_outcome) { - base::UmaHistogramEnumeration(kUmaKeyFastCheckoutTriggerOutcome, - trigger_outcome); -} -} // namespace - FastCheckoutTriggerValidatorImpl::FastCheckoutTriggerValidatorImpl( autofill::AutofillClient* autofill_client, FastCheckoutCapabilitiesFetcher* capabilities_fetcher, @@ -28,7 +20,7 @@ capabilities_fetcher_(capabilities_fetcher), personal_data_helper_(personal_data_helper) {} -bool FastCheckoutTriggerValidatorImpl::ShouldRun( +FastCheckoutTriggerOutcome FastCheckoutTriggerValidatorImpl::ShouldRun( const autofill::FormData& form, const autofill::FormFieldData& field, const FastCheckoutUIState ui_state, @@ -41,14 +33,14 @@ if (!base::FeatureList::IsEnabled(::features::kFastCheckout)) { LogAutofillInternals( "not triggered because FastCheckout flag is disabled."); - return false; + return FastCheckoutTriggerOutcome::kUnsupportedFieldType; } // Trigger only if there is no ongoing run. if (is_running) { LogAutofillInternals( "not triggered because Fast Checkout is already running."); - return false; + return FastCheckoutTriggerOutcome::kUnsupportedFieldType; } // Trigger only if the URL scheme is cryptographic and security level is not @@ -57,53 +49,47 @@ LogAutofillInternals( "not triggered because context is not secure, e.g. not https or " "dangerous security level."); - return false; + return FastCheckoutTriggerOutcome::kUnsupportedFieldType; } // Trigger only if the form is a trigger form for Fast Checkout. if (!IsTriggerForm(form, field)) { - return false; + return FastCheckoutTriggerOutcome::kUnsupportedFieldType; } // UMA drop out metrics are recorded after this point only to avoid collecting // unnecessary metrics that would dominate the other data points. // Trigger only if not shown before. if (ui_state != FastCheckoutUIState::kNotShownYet) { - LogUmaTriggerOutcome(FastCheckoutTriggerOutcome::kFailureShownBefore); LogAutofillInternals("not triggered because it was shown before."); - return false; + return FastCheckoutTriggerOutcome::kFailureShownBefore; } // Trigger only on focusable fields. if (!field.is_focusable) { - LogUmaTriggerOutcome(FastCheckoutTriggerOutcome::kFailureFieldNotFocusable); LogAutofillInternals("not triggered because field was not focusable."); - return false; + return FastCheckoutTriggerOutcome::kFailureFieldNotFocusable; } // Trigger only on empty fields. if (!field.value.empty()) { - LogUmaTriggerOutcome(FastCheckoutTriggerOutcome::kFailureFieldNotEmpty); LogAutofillInternals("not triggered because field was not empty."); - return false; + return FastCheckoutTriggerOutcome::kFailureFieldNotEmpty; } // Trigger only if the UI is available. if (!autofill_manager.CanShowAutofillUi()) { - LogUmaTriggerOutcome( - FastCheckoutTriggerOutcome::kFailureCannotShowAutofillUi); LogAutofillInternals("not triggered because Autofill UI cannot be shown."); - return false; + return FastCheckoutTriggerOutcome::kFailureCannotShowAutofillUi; } - if (!HasValidPersonalData()) { - return false; + FastCheckoutTriggerOutcome result = HasValidPersonalData(); + if (result != FastCheckoutTriggerOutcome::kSuccess) { + return result; } - LogUmaTriggerOutcome(FastCheckoutTriggerOutcome::kSuccess); LogAutofillInternals("was triggered successfully."); - - return true; + return FastCheckoutTriggerOutcome::kSuccess; } bool FastCheckoutTriggerValidatorImpl::IsTriggerForm( @@ -132,40 +118,38 @@ return is_trigger_form; } -bool FastCheckoutTriggerValidatorImpl::HasValidPersonalData() const { +FastCheckoutTriggerOutcome +FastCheckoutTriggerValidatorImpl::HasValidPersonalData() const { autofill::PersonalDataManager* pdm = personal_data_helper_->GetPersonalDataManager(); if (!pdm->IsAutofillProfileEnabled()) { LogAutofillInternals("not triggered because Autofill profile is disabled."); - return false; + return FastCheckoutTriggerOutcome::kFailureAutofillProfileDisabled; } if (!pdm->IsAutofillCreditCardEnabled()) { LogAutofillInternals( "not triggered because Autofill credit card is disabled."); - return false; + return FastCheckoutTriggerOutcome::kFailureAutofillCreditCardDisabled; } // Trigger only if there is at least 1 valid Autofill profile on file. if (personal_data_helper_->GetValidAddressProfiles().empty()) { - LogUmaTriggerOutcome( - FastCheckoutTriggerOutcome::kFailureNoValidAutofillProfile); LogAutofillInternals( "not triggered because the client does not have at least one valid " "Autofill profile stored."); - return false; + return FastCheckoutTriggerOutcome::kFailureNoValidAutofillProfile; } // Trigger only if there is at least 1 complete valid credit card on file. if (personal_data_helper_->GetValidCreditCards().empty()) { - LogUmaTriggerOutcome(FastCheckoutTriggerOutcome::kFailureNoValidCreditCard); LogAutofillInternals( "not triggered because the client does not have at least one " "valid Autofill credit card stored."); - return false; + return FastCheckoutTriggerOutcome::kFailureNoValidCreditCard; } - return true; + return FastCheckoutTriggerOutcome::kSuccess; } void FastCheckoutTriggerValidatorImpl::LogAutofillInternals(
diff --git a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.h b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.h index 445294b..907667e 100644 --- a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.h +++ b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.h
@@ -24,13 +24,13 @@ const FastCheckoutTriggerValidatorImpl&) = delete; // FastCheckoutTriggerValidator: - bool ShouldRun( + FastCheckoutTriggerOutcome ShouldRun( const autofill::FormData& form, const autofill::FormFieldData& field, const FastCheckoutUIState ui_state, const bool is_running, const autofill::AutofillManager& autofill_manager) const override; - bool HasValidPersonalData() const override; + FastCheckoutTriggerOutcome HasValidPersonalData() const override; private: bool IsTriggerForm(const autofill::FormData& form,
diff --git a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc index 5ac9acf8..b141c00de 100644 --- a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc +++ b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc
@@ -4,7 +4,6 @@ #include "chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.h" -#include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "chrome/browser/fast_checkout/fast_checkout_personal_data_helper.h" @@ -130,7 +129,7 @@ } FastCheckoutTriggerValidatorImpl* validator() { return validator_.get(); } - bool ShouldRun() { + FastCheckoutTriggerOutcome ShouldRun() { return validator()->ShouldRun(form_, field_, ui_state_, is_running_, *autofill_manager()); } @@ -159,134 +158,90 @@ }; TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_AllChecksPass_ReturnsTrue) { - EXPECT_TRUE(ShouldRun()); - histogram_tester_.ExpectUniqueSample(kUmaKeyFastCheckoutTriggerOutcome, - FastCheckoutTriggerOutcome::kSuccess, - 1u); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kSuccess); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_FeatureDisabled_ReturnsFalse) { base::test::ScopedFeatureList feature_list; feature_list.InitAndDisableFeature(::features::kFastCheckout); - - EXPECT_FALSE(ShouldRun()); - EXPECT_EQ(histogram_tester_.GetTotalSum(kUmaKeyFastCheckoutTriggerOutcome), - 0); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kUnsupportedFieldType); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_AlreadyRunning_ReturnsFalse) { is_running_ = true; - - EXPECT_FALSE(ShouldRun()); - EXPECT_EQ(histogram_tester_.GetTotalSum(kUmaKeyFastCheckoutTriggerOutcome), - 0); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kUnsupportedFieldType); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_NotContextSecure_ReturnsFalse) { ON_CALL(*autofill_client(), IsContextSecure).WillByDefault(Return(false)); - - EXPECT_FALSE(ShouldRun()); - EXPECT_EQ(histogram_tester_.GetTotalSum(kUmaKeyFastCheckoutTriggerOutcome), - 0); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kUnsupportedFieldType); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_NoTriggerForm_ReturnsFalse) { ON_CALL(*capabilities_fetcher(), IsTriggerFormSupported) .WillByDefault(Return(false)); - EXPECT_FALSE(ShouldRun()); - EXPECT_EQ(histogram_tester_.GetTotalSum(kUmaKeyFastCheckoutTriggerOutcome), - 0); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kUnsupportedFieldType); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_UiIsShowing_ReturnsFalse) { ui_state_ = FastCheckoutUIState::kIsShowing; - - EXPECT_FALSE(ShouldRun()); - histogram_tester_.ExpectUniqueSample( - kUmaKeyFastCheckoutTriggerOutcome, - FastCheckoutTriggerOutcome::kFailureShownBefore, 1u); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kFailureShownBefore); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_UiWasShown_ReturnsFalse) { ui_state_ = FastCheckoutUIState::kWasShown; - - EXPECT_FALSE(ShouldRun()); - histogram_tester_.ExpectUniqueSample( - kUmaKeyFastCheckoutTriggerOutcome, - FastCheckoutTriggerOutcome::kFailureShownBefore, 1u); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kFailureShownBefore); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_FieldNotFocusable_ReturnsFalse) { field_.is_focusable = false; - - EXPECT_FALSE(ShouldRun()); - histogram_tester_.ExpectUniqueSample( - kUmaKeyFastCheckoutTriggerOutcome, - FastCheckoutTriggerOutcome::kFailureFieldNotFocusable, 1u); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kFailureFieldNotFocusable); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_FieldHasValue_ReturnsFalse) { field_.value = u"value"; - - EXPECT_FALSE(ShouldRun()); - histogram_tester_.ExpectUniqueSample( - kUmaKeyFastCheckoutTriggerOutcome, - FastCheckoutTriggerOutcome::kFailureFieldNotEmpty, 1u); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kFailureFieldNotEmpty); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_CannotShowAutofillUi_ReturnsFalse) { ON_CALL(*autofill_manager(), CanShowAutofillUi).WillByDefault(Return(false)); - - EXPECT_FALSE(ShouldRun()); - histogram_tester_.ExpectUniqueSample( - kUmaKeyFastCheckoutTriggerOutcome, - FastCheckoutTriggerOutcome::kFailureCannotShowAutofillUi, 1u); + EXPECT_EQ(ShouldRun(), + FastCheckoutTriggerOutcome::kFailureCannotShowAutofillUi); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_AutofillProfileDisabled_ReturnsFalse) { ON_CALL(*pdm(), IsAutofillProfileEnabled).WillByDefault(Return(false)); - - EXPECT_FALSE(ShouldRun()); - EXPECT_EQ(histogram_tester_.GetTotalSum(kUmaKeyFastCheckoutTriggerOutcome), - 0); + EXPECT_EQ(ShouldRun(), + FastCheckoutTriggerOutcome::kFailureAutofillProfileDisabled); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_CreditCardDisabled_ReturnsFalse) { ON_CALL(*pdm(), IsAutofillCreditCardEnabled).WillByDefault(Return(false)); - - EXPECT_FALSE(ShouldRun()); - EXPECT_EQ(histogram_tester_.GetTotalSum(kUmaKeyFastCheckoutTriggerOutcome), - 0); + EXPECT_EQ(ShouldRun(), + FastCheckoutTriggerOutcome::kFailureAutofillCreditCardDisabled); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_NoValidAddressProfiles_ReturnsFalse) { ON_CALL(*personal_data_helper(), GetValidAddressProfiles) .WillByDefault(Return(std::vector<autofill::AutofillProfile*>{})); - - EXPECT_FALSE(ShouldRun()); - histogram_tester_.ExpectUniqueSample( - kUmaKeyFastCheckoutTriggerOutcome, - FastCheckoutTriggerOutcome::kFailureNoValidAutofillProfile, 1u); + EXPECT_EQ(ShouldRun(), + FastCheckoutTriggerOutcome::kFailureNoValidAutofillProfile); } TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_NoValidCreditCards_ReturnsFalse) { ON_CALL(*personal_data_helper(), GetValidCreditCards) .WillByDefault(Return(std::vector<autofill::CreditCard*>{})); - - EXPECT_FALSE(ShouldRun()); - histogram_tester_.ExpectUniqueSample( - kUmaKeyFastCheckoutTriggerOutcome, - FastCheckoutTriggerOutcome::kFailureNoValidCreditCard, 1u); + EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kFailureNoValidCreditCard); } } // namespace
diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/signinbottomsheet/SigninBottomSheetCoordinator.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/signinbottomsheet/SigninBottomSheetCoordinator.java index c0139f86..b0abc16e 100644 --- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/signinbottomsheet/SigninBottomSheetCoordinator.java +++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/signinbottomsheet/SigninBottomSheetCoordinator.java
@@ -35,18 +35,20 @@ private final BottomSheetController mController; private final SigninManager mSigninManager; private boolean mSetTestToast; + private final @SigninAccessPoint int mSigninAccessPoint; private AccountPickerBottomSheetCoordinator mAccountPickerBottomSheetCoordinator; private final Runnable mOnSigninSuccessCallback; public SigninBottomSheetCoordinator(WindowAndroid windowAndroid, BottomSheetController controller, Profile profile, - @Nullable Runnable onSigninSuccessCallback) { + @Nullable Runnable onSigninSuccessCallback, @SigninAccessPoint int signinAccessPoint) { mWindowAndroid = windowAndroid; mController = controller; mProfile = profile; mSigninManager = IdentityServicesProvider.get().getSigninManager(mProfile); mSetTestToast = false; mOnSigninSuccessCallback = onSigninSuccessCallback; + mSigninAccessPoint = signinAccessPoint; } @Override @@ -84,7 +86,7 @@ AccountInfoServiceProvider.get().getAccountInfoByEmail(accountEmail).then(accountInfo -> { if (mSigninManager.isSigninAllowed()) { - mSigninManager.signin(account, SigninAccessPoint.NTP_FEED_BOTTOM_PROMO, callback); + mSigninManager.signin(account, mSigninAccessPoint, callback); } else { makeSigninNotAllowedToast(); mController.hideContent(mController.getCurrentSheetContent(), true); @@ -103,6 +105,8 @@ } private void makeSigninNotAllowedToast() { + RecordHistogram.recordEnumeratedHistogram("Signin.SigninDisabledNotificationShown", + mSigninAccessPoint, SigninAccessPoint.MAX); if (mSetTestToast) return; Toast.makeText(mWindowAndroid.getActivity().get(), R.string.sign_in_to_chrome_disabled_by_user_summary, Toast.LENGTH_SHORT)
diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/signinbottomsheet/SigninBottomSheetCoordinatorTest.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/signinbottomsheet/SigninBottomSheetCoordinatorTest.java index 46e670d..2f8bf64 100644 --- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/signinbottomsheet/SigninBottomSheetCoordinatorTest.java +++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/signinbottomsheet/SigninBottomSheetCoordinatorTest.java
@@ -74,8 +74,9 @@ .thenReturn(mSigninManagerMock); when(mSigninManagerMock.isSigninAllowed()).thenReturn(true); mAccountManagerTestRule.addAccount(TEST_EMAIL); - mSigninCoordinator = new SigninBottomSheetCoordinator( - mWindowAndroidMock, mBottomSheetControllerMock, mProfileMock, null); + mSigninCoordinator = + new SigninBottomSheetCoordinator(mWindowAndroidMock, mBottomSheetControllerMock, + mProfileMock, null, SigninAccessPoint.NTP_FEED_CARD_MENU_PROMO); } @Test @@ -89,11 +90,11 @@ }) .when(mSigninManagerMock) .signin(eq(AccountUtils.createAccountFromName(TEST_EMAIL)), - eq(SigninAccessPoint.NTP_FEED_BOTTOM_PROMO), any()); + eq(SigninAccessPoint.NTP_FEED_CARD_MENU_PROMO), any()); mSigninCoordinator.signIn(TEST_EMAIL, error -> {}); verify(mSigninManagerMock) .signin(eq(AccountUtils.createAccountFromName(TEST_EMAIL)), - eq(SigninAccessPoint.NTP_FEED_BOTTOM_PROMO), + eq(SigninAccessPoint.NTP_FEED_CARD_MENU_PROMO), any(SigninManager.SignInCallback.class)); histogramWatcher.assertExpected(); } @@ -109,7 +110,7 @@ }) .when(mSigninManagerMock) .signin(eq(AccountUtils.createAccountFromName(TEST_EMAIL)), - eq(SigninAccessPoint.NTP_FEED_BOTTOM_PROMO), any()); + eq(SigninAccessPoint.NTP_FEED_CARD_MENU_PROMO), any()); mSigninCoordinator.setAccountPickerBottomSheetCoordinator( mAccountPickerBottomSheetCoordinatorMock); mSigninCoordinator.signIn(TEST_EMAIL, error -> {}); @@ -118,18 +119,22 @@ @Test public void testSignInNotAllowed() { + HistogramWatcher watchSigninDisabledToastShownHistogram = + HistogramWatcher.newSingleRecordWatcher("Signin.SigninDisabledNotificationShown", + SigninAccessPoint.NTP_FEED_CARD_MENU_PROMO); when(mSigninManagerMock.isSigninAllowed()).thenReturn(false); mSigninCoordinator.setToastOverrideForTesting(); mSigninCoordinator.signIn(TEST_EMAIL, error -> {}); verify(mSigninManagerMock, never()) .signin(eq(AccountUtils.createAccountFromName(TEST_EMAIL)), anyInt(), any()); + watchSigninDisabledToastShownHistogram.assertExpected(); } @Test public void testSigninCompleted_callSigninSuccessCallback() { - SigninBottomSheetCoordinator coordinator = - new SigninBottomSheetCoordinator(mWindowAndroidMock, mBottomSheetControllerMock, - mProfileMock, mOnSigninSuccessCallbackMock); + SigninBottomSheetCoordinator coordinator = new SigninBottomSheetCoordinator( + mWindowAndroidMock, mBottomSheetControllerMock, mProfileMock, + mOnSigninSuccessCallbackMock, SigninAccessPoint.NTP_FEED_BOTTOM_PROMO); doAnswer(invocation -> { SigninManager.SignInCallback callback = invocation.getArgument(2); callback.onSignInComplete(); @@ -144,9 +149,9 @@ @Test public void testSigninAborted_doesNotCallSigninSuccessCallback() { - SigninBottomSheetCoordinator coordinator = - new SigninBottomSheetCoordinator(mWindowAndroidMock, mBottomSheetControllerMock, - mProfileMock, mOnSigninSuccessCallbackMock); + SigninBottomSheetCoordinator coordinator = new SigninBottomSheetCoordinator( + mWindowAndroidMock, mBottomSheetControllerMock, mProfileMock, + mOnSigninSuccessCallbackMock, SigninAccessPoint.NTP_FEED_BOTTOM_PROMO); doAnswer(invocation -> { SigninManager.SignInCallback callback = invocation.getArgument(2); callback.onSignInAborted();
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index a7391d8..df99534 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -1688,8 +1688,8 @@ }, { "name": "drop-input-events-before-first-paint", - "owners": [ "mehdika", "blink-interactions-team@google.com" ], - "expiry_milestone": 114 + "owners": [ "mustaq", "blink-interactions-team@google.com" ], + "expiry_milestone": 117 }, { "name": "dynamic-color-gamut", @@ -6383,6 +6383,11 @@ "expiry_milestone": 120 }, { + "name": "quick-answers-rich-card", + "owners": [ "croissant-eng" ], + "expiry_milestone": 120 + }, + { "name": "quick-commands", "owners": [ "lgrey" ], "expiry_milestone": 120
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 83f1777..ccecf62 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -6698,6 +6698,10 @@ const char kDisableQuickAnswersV2TranslationDescription[] = "Disable translation services of the Quick Answers."; +const char kQuickAnswersRichCardName[] = "Enable Quick Answers Rich Card"; +const char kQuickAnswersRichCardDescription[] = + "Enable rich card views of the Quick Answers feature."; + const char kSyncChromeOSExplicitPassphraseSharingName[] = "Sync passphrase sharing"; const char kSyncChromeOSExplicitPassphraseSharingDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 5cd94cb..4aeeda6 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -3859,6 +3859,9 @@ extern const char kDisableQuickAnswersV2TranslationName[]; extern const char kDisableQuickAnswersV2TranslationDescription[]; +extern const char kQuickAnswersRichCardName[]; +extern const char kQuickAnswersRichCardDescription[]; + extern const char kSyncChromeOSExplicitPassphraseSharingName[]; extern const char kSyncChromeOSExplicitPassphraseSharingDescription[];
diff --git a/chrome/browser/headless/headless_mode_browsertest_mac.mm b/chrome/browser/headless/headless_mode_browsertest_mac.mm index 87e23f96..456e68d 100644 --- a/chrome/browser/headless/headless_mode_browsertest_mac.mm +++ b/chrome/browser/headless/headless_mode_browsertest_mac.mm
@@ -79,6 +79,29 @@ EXPECT_FALSE(ns_window.visible); } +IN_PROC_BROWSER_TEST_F(HeadlessModeBrowserTest, + MaximizedRestoredWindowVisibility) { + gfx::NativeWindow native_window = browser()->window()->GetNativeWindow(); + NSWindow* ns_window = native_window.GetNativeNSWindow(); + + // Verify initial state. + ASSERT_FALSE(browser()->window()->IsMaximized()); + EXPECT_TRUE(browser()->window()->IsVisible()); + EXPECT_FALSE(ns_window.visible); + + // Verify maximized state. + browser()->window()->Maximize(); + ASSERT_TRUE(browser()->window()->IsMaximized()); + EXPECT_TRUE(browser()->window()->IsVisible()); + EXPECT_FALSE(ns_window.visible); + + // Verify restored state. + browser()->window()->Restore(); + ASSERT_FALSE(browser()->window()->IsMaximized()); + EXPECT_TRUE(browser()->window()->IsVisible()); + EXPECT_FALSE(ns_window.visible); +} + IN_PROC_BROWSER_TEST_F(HeadlessModeBrowserTestWithWindowSize, LargeWindowSize) { gfx::NativeWindow native_window = browser()->window()->GetNativeWindow(); NSWindow* ns_window = native_window.GetNativeNSWindow();
diff --git a/chrome/browser/history_clusters/history_clusters_service_factory.cc b/chrome/browser/history_clusters/history_clusters_service_factory.cc index a895b38..cca54f7e 100644 --- a/chrome/browser/history_clusters/history_clusters_service_factory.cc +++ b/chrome/browser/history_clusters/history_clusters_service_factory.cc
@@ -25,13 +25,13 @@ HistoryClustersServiceFactory::GetForBrowserContext( content::BrowserContext* browser_context) { return static_cast<history_clusters::HistoryClustersService*>( - GetInstance().GetServiceForBrowserContext(browser_context, true)); + GetInstance()->GetServiceForBrowserContext(browser_context, true)); } // static -HistoryClustersServiceFactory& HistoryClustersServiceFactory::GetInstance() { +HistoryClustersServiceFactory* HistoryClustersServiceFactory::GetInstance() { static base::NoDestructor<HistoryClustersServiceFactory> instance; - return *instance; + return instance.get(); } HistoryClustersServiceFactory::HistoryClustersServiceFactory()
diff --git a/chrome/browser/history_clusters/history_clusters_service_factory.h b/chrome/browser/history_clusters/history_clusters_service_factory.h index d1f285a0..98cb2ed 100644 --- a/chrome/browser/history_clusters/history_clusters_service_factory.h +++ b/chrome/browser/history_clusters/history_clusters_service_factory.h
@@ -21,7 +21,7 @@ static history_clusters::HistoryClustersService* GetForBrowserContext( content::BrowserContext* browser_context); - static HistoryClustersServiceFactory& GetInstance(); + static HistoryClustersServiceFactory* GetInstance(); static void EnsureFactoryBuilt();
diff --git a/chrome/browser/lacros/policy_ui_lacros_browsertest.cc b/chrome/browser/lacros/policy_ui_lacros_browsertest.cc index 5878d1c7..060d29b 100644 --- a/chrome/browser/lacros/policy_ui_lacros_browsertest.cc +++ b/chrome/browser/lacros/policy_ui_lacros_browsertest.cc
@@ -73,8 +73,9 @@ // Wait for the status box to appear in case page just loaded. const statusSection = document.getElementById('status-section'); if (statusSection.hidden) { - window.requestIdleCallback(readStatus); - return; + return new Promise(resolve => { + window.requestIdleCallback(resolve); + }).then(readStatus); } const policies = getPolicyFieldsets(); @@ -89,17 +90,17 @@ } statuses[legend.trim()] = entries; } - domAutomationController.send(JSON.stringify(statuses)); - } + return JSON.stringify(statuses); + }; - window.requestIdleCallback(readStatus); + return new Promise(resolve => { + window.requestIdleCallback(resolve); + }).then(readStatus); })(); )JS"; content::WebContents* contents = chrome_test_utils::GetActiveWebContents(this); - std::string json; - ASSERT_TRUE( - content::ExecuteScriptAndExtractString(contents, javascript, &json)); + std::string json = content::EvalJs(contents, javascript).ExtractString(); absl::optional<base::Value> statuses = base::JSONReader::Read(json); ASSERT_TRUE(statuses.has_value() && statuses->is_dict()); const base::Value* actual_entries = statuses->FindDictKey(policy_legend);
diff --git a/chrome/browser/loadtimes_extension_bindings_browsertest.cc b/chrome/browser/loadtimes_extension_bindings_browsertest.cc index 69df75e..b515283 100644 --- a/chrome/browser/loadtimes_extension_bindings_browsertest.cc +++ b/chrome/browser/loadtimes_extension_bindings_browsertest.cc
@@ -28,18 +28,10 @@ "window.after.firstPaintAfterLoadTime = 0;" "window.after.firstPaintTime = 0;")); - std::string before; - std::string after; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - contents, - "window.domAutomationController.send(" - " JSON.stringify(before))", - &before)); - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - contents, - "window.domAutomationController.send(" - " JSON.stringify(after))", - &after)); + std::string before = + content::EvalJs(contents, "JSON.stringify(before)").ExtractString(); + std::string after = + content::EvalJs(contents, "JSON.stringify(after)").ExtractString(); EXPECT_EQ(before, after); } };
diff --git a/chrome/browser/net/profile_network_context_service_browsertest.cc b/chrome/browser/net/profile_network_context_service_browsertest.cc index ee1816f..9500566 100644 --- a/chrome/browser/net/profile_network_context_service_browsertest.cc +++ b/chrome/browser/net/profile_network_context_service_browsertest.cc
@@ -714,7 +714,7 @@ try { await fetch("/issue", {privateToken: {version: 1, operation: 'token-request'}}); - return await document.hasPrivateToken($1, 'private-state-token'); + return await document.hasPrivateToken($1); } catch { return false; }
diff --git a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.cc b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.cc new file mode 100644 index 0000000..da03cb9 --- /dev/null +++ b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.cc
@@ -0,0 +1,253 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.h" + +#include "base/barrier_callback.h" +#include "base/metrics/field_trial_params.h" +#include "base/metrics/histogram_functions.h" +#include "base/strings/string_split.h" +#include "chrome/browser/cart/cart_service.h" +#include "chrome/browser/new_tab_page/new_tab_page_util.h" +#include "components/history_clusters/core/history_clusters_service.h" +#include "components/history_clusters/core/history_clusters_service_task.h" +#include "components/history_clusters/core/history_clusters_types.h" +#include "components/history_clusters/core/history_clusters_util.h" +#include "components/search/ntp_features.h" +#include "components/search_engines/template_url.h" +#include "components/search_engines/template_url_service.h" + +namespace { + +constexpr int kMinRequiredRelatedSearches = 3; + +// The minimum number of visits to render a layout is 2 URL visits plus a SRP +// visit. +constexpr int kMinRequiredVisits = 3; + +// This enum must match the numbering for NTPHistoryClustersIneligibleReason in +// enums.xml. Do not reorder or remove items, and update kMaxValue when new +// items are added. +enum NTPHistoryClustersIneligibleReason { + kNone = 0, + kNoClusters = 1, + kNonProminent = 2, + kNoSRPVisit = 3, + kInsufficientVisits = 4, + kInsufficientImages = 5, + kInsufficientRelatedSearches = 6, + kMaxValue = kInsufficientRelatedSearches, +}; + +base::flat_set<std::string> GetCategories(const char* feature_param) { + std::string categories_string = base::GetFieldTrialParamValueByFeature( + ntp_features::kNtpHistoryClustersModuleCategories, feature_param); + if (categories_string.empty()) { + return {}; + } + + auto categories = base::SplitString(categories_string, ",", + base::WhitespaceHandling::TRIM_WHITESPACE, + base::SplitResult::SPLIT_WANT_NONEMPTY); + + return categories.empty() ? base::flat_set<std::string>() + : base::flat_set<std::string>(categories.begin(), + categories.end()); +} + +int GetMinVisitsToShow() { + static int min_visits = base::GetFieldTrialParamByFeatureAsInt( + ntp_features::kNtpHistoryClustersModuleMinimumVisitsRequired, + ntp_features::kNtpHistoryClustersModuleMinimumVisitsRequiredParam, + kMinRequiredVisits); + if (min_visits < 0) { + return kMinRequiredVisits; + } + return min_visits; +} + +int GetMinImagesToShow() { + static int min_images_to_show = base::GetFieldTrialParamByFeatureAsInt( + ntp_features::kNtpHistoryClustersModuleMinimumImagesRequired, + ntp_features::kNtpHistoryClustersModuleMinimumImagesRequiredParam, 1); + return min_images_to_show; +} + +size_t GetMaxClusters() { + // Even though only one cluster will be shown on the NTP at a time for now, + // set this to greater than that in case the filtering logic does not match + // up. + static int max_clusters = base::GetFieldTrialParamByFeatureAsInt( + ntp_features::kNtpHistoryClustersModuleMaxClusters, + ntp_features::kNtpHistoryClustersModuleMaxClustersParam, 5); + if (max_clusters < 0) { + return 5; + } + return static_cast<size_t>(max_clusters); +} + +history_clusters::QueryClustersFilterParams GetFilterParamsFromFeatureFlags() { + history_clusters::QueryClustersFilterParams filter_params; + filter_params.min_visits = GetMinVisitsToShow(); + filter_params.min_visits_with_images = GetMinImagesToShow(); + filter_params.categories_allowlist = GetCategories( + ntp_features::kNtpHistoryClustersModuleCategoriesAllowlistParam); + filter_params.categories_blocklist = GetCategories( + ntp_features::kNtpHistoryClustersModuleCategoriesBlocklistParam); + filter_params.is_search_initiated = true; + filter_params.has_related_searches = true; + filter_params.is_shown_on_prominent_ui_surfaces = true; + filter_params.max_clusters = GetMaxClusters(); + filter_params.categories_boostlist = GetCategories( + ntp_features::kNtpHistoryClustersModuleCategoriesBoostlistParam); + return filter_params; +} + +base::Time GetBeginTime() { + static int hours_to_look_back = base::GetFieldTrialParamByFeatureAsInt( + ntp_features::kNtpHistoryClustersModuleBeginTimeDuration, + ntp_features::kNtpHistoryClustersModuleBeginTimeDurationHoursParam, 24); + if (hours_to_look_back <= 0) { + hours_to_look_back = 24; + } + + return base::Time::Now() - base::Hours(hours_to_look_back); +} + +} // namespace + +HistoryClustersModuleService::HistoryClustersModuleService( + history_clusters::HistoryClustersService* history_clusters_service, + CartService* cart_service, + TemplateURLService* template_url_service) + : filter_params_(GetFilterParamsFromFeatureFlags()), + history_clusters_service_(history_clusters_service), + cart_service_(cart_service), + template_url_service_(template_url_service) {} +HistoryClustersModuleService::~HistoryClustersModuleService() = default; + +std::unique_ptr<history_clusters::HistoryClustersServiceTask> +HistoryClustersModuleService::GetClusters(GetClustersCallback callback) { + history_clusters::QueryClustersContinuationParams continuation_params; + + return history_clusters_service_->QueryClusters( + history_clusters::ClusteringRequestSource::kNewTabPage, filter_params_, + GetBeginTime(), continuation_params, + /*recluster=*/false, + base::BindOnce(&HistoryClustersModuleService::OnGetClusters, + weak_ptr_factory_.GetWeakPtr(), std::move(callback))); +} + +void HistoryClustersModuleService::OnGetClusters( + GetClustersCallback callback, + std::vector<history::Cluster> clusters, + history_clusters::QueryClustersContinuationParams continuation_params) { + if (!template_url_service_) { + std::move(callback).Run({}); + return; + } + + history_clusters::CoalesceRelatedSearches(clusters); + + // Cull clusters that do not have the minimum number of visits with and + // without images to be eligible for display. + NTPHistoryClustersIneligibleReason ineligible_reason = + clusters.empty() ? kNoClusters : kNone; + base::EraseIf(clusters, [&](auto& cluster) { + // Cull non prominent clusters. + if (!cluster.should_show_on_prominent_ui_surfaces) { + ineligible_reason = kNonProminent; + return true; + } + + // Cull clusters whose visits don't have at least one SRP. + const TemplateURL* default_search_provider = + template_url_service_->GetDefaultSearchProvider(); + auto srp_visits_it = std::find_if( + cluster.visits.begin(), cluster.visits.end(), [&](auto& visit) { + return default_search_provider->IsSearchURL( + visit.normalized_url, template_url_service_->search_terms_data()); + }); + if (srp_visits_it == cluster.visits.end()) { + ineligible_reason = kNoSRPVisit; + return true; + } + + // Ensure visits contains at most one SRP visit and its the first one in the + // list. + history::ClusterVisit first_srp_visit = *srp_visits_it; + base::EraseIf(cluster.visits, [&](auto& visit) { + return default_search_provider->IsSearchURL( + visit.normalized_url, template_url_service_->search_terms_data()); + }); + cluster.visits.insert(cluster.visits.begin(), first_srp_visit); + + // Cull visits that have a zero relevance score. + base::EraseIf(cluster.visits, + [&](auto& visit) { return visit.score == 0.0; }); + + int visits_with_images = std::accumulate( + cluster.visits.begin(), cluster.visits.end(), 0, + [](const auto& i, const auto& v) { + return i + int(v.annotated_visit.content_annotations + .has_url_keyed_image && + v.annotated_visit.visit_row.is_known_to_sync); + }); + + if (cluster.visits.size() < kMinRequiredVisits) { + ineligible_reason = kInsufficientVisits; + return true; + } + + if (visits_with_images < GetMinImagesToShow()) { + ineligible_reason = kInsufficientImages; + return true; + } + + // Cull clusters that do not have the minimum required number of related + // searches to be eligible for display. + if (cluster.related_searches.size() < kMinRequiredRelatedSearches) { + ineligible_reason = kInsufficientRelatedSearches; + return true; + } + + return false; + }); + + base::UmaHistogramEnumeration("NewTabPage.HistoryClusters.IneligibleReason", + ineligible_reason); + base::UmaHistogramBoolean("NewTabPage.HistoryClusters.HasClusterToShow", + !clusters.empty()); + base::UmaHistogramCounts100("NewTabPage.HistoryClusters.NumClusterCandidates", + clusters.size()); + + if (clusters.empty()) { + std::move(callback).Run({}); + return; + } + + history::Cluster top_cluster = clusters.front(); + base::UmaHistogramCounts100("NewTabPage.HistoryClusters.NumVisits", + top_cluster.visits.size()); + base::UmaHistogramCounts100("NewTabPage.HistoryClusters.NumRelatedSearches", + top_cluster.related_searches.size()); + std::move(callback).Run(std::move(clusters)); + + if (!IsCartModuleEnabled() || !cart_service_) { + return; + } + const auto metrics_callback = base::BarrierCallback<bool>( + top_cluster.visits.size(), + base::BindOnce([](const std::vector<bool>& results) { + bool has_cart = false; + for (bool result : results) { + has_cart = has_cart || result; + } + base::UmaHistogramBoolean( + "NewTabPage.HistoryClusters.HasCartForTopCluster", has_cart); + })); + for (auto& visit : top_cluster.visits) { + cart_service_->HasActiveCartForURL(visit.normalized_url, metrics_callback); + } +}
diff --git a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.h b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.h new file mode 100644 index 0000000..9d132c9 --- /dev/null +++ b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.h
@@ -0,0 +1,66 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_NEW_TAB_PAGE_MODULES_HISTORY_CLUSTERS_HISTORY_CLUSTERS_MODULE_SERVICE_H_ +#define CHROME_BROWSER_NEW_TAB_PAGE_MODULES_HISTORY_CLUSTERS_HISTORY_CLUSTERS_MODULE_SERVICE_H_ + +#include "base/functional/callback.h" +#include "base/memory/raw_ptr.h" +#include "base/memory/weak_ptr.h" +#include "components/history_clusters/core/history_clusters_types.h" +#include "components/keyed_service/core/keyed_service.h" + +namespace history { +struct Cluster; +} // namespace history + +namespace history_clusters { +class HistoryClustersService; +class HistoryClustersServiceTask; +struct QueryClustersContinuationParams; +} // namespace history_clusters + +class CartService; +class TemplateURLService; + +// Handles requests to get clusters for the History Clusters Module. +class HistoryClustersModuleService : public KeyedService { + public: + HistoryClustersModuleService(const HistoryClustersModuleService&) = delete; + HistoryClustersModuleService( + history_clusters::HistoryClustersService* history_clusters_service, + CartService* cart_service, + TemplateURLService* template_url_service); + ~HistoryClustersModuleService() override; + + using GetClustersCallback = + base::OnceCallback<void(std::vector<history::Cluster>)>; + + // Returns the pending task to query clusters and invokes `callback` when + // clusters are ready. + // + // Virtual for testing. + virtual std::unique_ptr<history_clusters::HistoryClustersServiceTask> + GetClusters(GetClustersCallback callback); + + private: + // Callback invoked when `history_clusters_service_` returns queried clusters. + void OnGetClusters( + GetClustersCallback callback, + std::vector<history::Cluster> clusters, + history_clusters::QueryClustersContinuationParams continuation_params); + + // The filtering parameters to use for all calls to fetch clusters. + history_clusters::QueryClustersFilterParams filter_params_; + + raw_ptr<history_clusters::HistoryClustersService> history_clusters_service_; + raw_ptr<CartService> cart_service_; + raw_ptr<TemplateURLService> template_url_service_; + + // Weak pointers issued from this factory never get invalidated before the + // service is destroyed. + base::WeakPtrFactory<HistoryClustersModuleService> weak_ptr_factory_{this}; +}; + +#endif // CHROME_BROWSER_NEW_TAB_PAGE_MODULES_HISTORY_CLUSTERS_HISTORY_CLUSTERS_MODULE_SERVICE_H_
diff --git a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.cc b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.cc new file mode 100644 index 0000000..fcf8f28 --- /dev/null +++ b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.cc
@@ -0,0 +1,57 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.h" + +#include "chrome/browser/browser_process.h" +#include "chrome/browser/cart/cart_service_factory.h" +#include "chrome/browser/history_clusters/history_clusters_service_factory.h" +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/search_engines/template_url_service_factory.h" +#include "content/public/browser/browser_context.h" + +HistoryClustersModuleService* +HistoryClustersModuleServiceFactory::GetForProfile(Profile* profile) { + return static_cast<HistoryClustersModuleService*>( + GetInstance()->GetServiceForBrowserContext(profile, true)); +} + +HistoryClustersModuleServiceFactory* +HistoryClustersModuleServiceFactory::GetInstance() { + return base::Singleton<HistoryClustersModuleServiceFactory>::get(); +} + +HistoryClustersModuleServiceFactory::HistoryClustersModuleServiceFactory() + : ProfileKeyedServiceFactory( + "HistoryClustersModuleService", + ProfileSelections::Builder() + .WithRegular(ProfileSelection::kOriginalOnly) + .WithGuest(ProfileSelection::kNone) + .WithAshInternals(ProfileSelection::kNone) + .Build()) { + DependsOn(HistoryClustersServiceFactory::GetInstance()); + DependsOn(CartServiceFactory::GetInstance()); + DependsOn(TemplateURLServiceFactory::GetInstance()); +} + +HistoryClustersModuleServiceFactory::~HistoryClustersModuleServiceFactory() = + default; + +KeyedService* HistoryClustersModuleServiceFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { + // HistoryClustersModule cannot operate without the HistoryClustersService or + // the TemplateURLService. + auto* hcs = HistoryClustersServiceFactory::GetForBrowserContext(context); + if (!hcs) { + return nullptr; + } + auto* profile = Profile::FromBrowserContext(context); + auto* tus = TemplateURLServiceFactory::GetForProfile(profile); + if (!tus) { + return nullptr; + } + return new HistoryClustersModuleService( + hcs, CartServiceFactory::GetForProfile(profile), tus); +}
diff --git a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.h b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.h new file mode 100644 index 0000000..d888020 --- /dev/null +++ b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.h
@@ -0,0 +1,32 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_NEW_TAB_PAGE_MODULES_HISTORY_CLUSTERS_HISTORY_CLUSTERS_MODULE_SERVICE_FACTORY_H_ +#define CHROME_BROWSER_NEW_TAB_PAGE_MODULES_HISTORY_CLUSTERS_HISTORY_CLUSTERS_MODULE_SERVICE_FACTORY_H_ + +#include "base/memory/singleton.h" +#include "chrome/browser/profiles/profile_keyed_service_factory.h" + +class HistoryClustersModuleService; +class Profile; + +class HistoryClustersModuleServiceFactory : public ProfileKeyedServiceFactory { + public: + static HistoryClustersModuleService* GetForProfile(Profile* profile); + static HistoryClustersModuleServiceFactory* GetInstance(); + HistoryClustersModuleServiceFactory( + const HistoryClustersModuleServiceFactory&) = delete; + + private: + friend struct base::DefaultSingletonTraits< + HistoryClustersModuleServiceFactory>; + HistoryClustersModuleServiceFactory(); + ~HistoryClustersModuleServiceFactory() override; + + // ProfileKeyedServiceFactory: + KeyedService* BuildServiceInstanceFor( + content::BrowserContext* context) const override; +}; + +#endif // CHROME_BROWSER_NEW_TAB_PAGE_MODULES_HISTORY_CLUSTERS_HISTORY_CLUSTERS_MODULE_SERVICE_FACTORY_H_
diff --git a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_unittest.cc b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_unittest.cc new file mode 100644 index 0000000..827dde79 --- /dev/null +++ b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_unittest.cc
@@ -0,0 +1,448 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.h" + +#include <string> +#include <vector> + +#include "base/run_loop.h" +#include "base/strings/utf_string_conversions.h" +#include "base/test/metrics/histogram_tester.h" +#include "base/test/mock_callback.h" +#include "base/time/time.h" +#include "chrome/browser/cart/cart_service.h" +#include "chrome/browser/cart/cart_service_factory.h" +#include "chrome/browser/history/history_service_factory.h" +#include "chrome/browser/history_clusters/history_clusters_service_factory.h" +#include "chrome/browser/search_engines/template_url_service_factory.h" +#include "chrome/test/base/testing_profile.h" +#include "components/history/core/browser/history_context.h" +#include "components/history/core/browser/history_types.h" +#include "components/history/core/test/history_service_test_util.h" +#include "components/history_clusters/core/history_clusters_service_task.h" +#include "components/history_clusters/core/history_clusters_types.h" +#include "components/history_clusters/core/test_history_clusters_service.h" +#include "components/history_clusters/public/mojom/history_cluster_types.mojom.h" +#include "components/search/ntp_features.h" +#include "components/search_engines/template_url_service.h" +#include "components/strings/grit/components_strings.h" +#include "content/public/test/browser_task_environment.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/l10n/l10n_util.h" + +namespace { + +class MockCartService : public CartService { + public: + explicit MockCartService(Profile* profile) : CartService(profile) {} + + MOCK_METHOD2(HasActiveCartForURL, + void(const GURL& url, base::OnceCallback<void(bool)> callback)); +}; + +constexpr char kSampleNonSearchUrl[] = "https://www.foo.com/"; +constexpr char kSampleSearchUrl[] = "https://default-engine.com/search?q=foo"; + +const TemplateURLService::Initializer kTemplateURLData[] = { + {"default-engine.com", "http://default-engine.com/search?q={searchTerms}", + "Default"}, + {"non-default-engine.com", "http://non-default-engine.com?q={searchTerms}", + "Not Default"}, +}; + +class HistoryClustersModuleServiceTest : public testing::Test { + public: + HistoryClustersModuleServiceTest() = default; + + void SetUp() override { + testing::Test::SetUp(); + + TestingProfile::Builder profile_builder; + profile_builder.AddTestingFactory( + HistoryServiceFactory::GetInstance(), + HistoryServiceFactory::GetDefaultFactory()); + testing_profile_ = profile_builder.Build(); + + test_history_clusters_service_ = + std::make_unique<history_clusters::TestHistoryClustersService>(); + mock_cart_service_ = + std::make_unique<MockCartService>(testing_profile_.get()); + template_url_service_ = std::make_unique<TemplateURLService>( + kTemplateURLData, std::size(kTemplateURLData)); + history_clusters_module_service_ = + std::make_unique<HistoryClustersModuleService>( + test_history_clusters_service_.get(), mock_cart_service_.get(), + template_url_service_.get()); + } + + history_clusters::TestHistoryClustersService& + test_history_clusters_service() { + return *test_history_clusters_service_; + } + + MockCartService& mock_cart_service() { return *mock_cart_service_; } + + HistoryClustersModuleService& service() { + return *history_clusters_module_service_; + } + + std::vector<history::Cluster> GetClusters() { + std::vector<history::Cluster> clusters; + + base::RunLoop run_loop; + auto task = service().GetClusters(base::BindOnce( + [](base::RunLoop* run_loop, std::vector<history::Cluster>* out_clusters, + std::vector<history::Cluster> clusters) { + *out_clusters = std::move(clusters); + run_loop->Quit(); + }, + &run_loop, &clusters)); + + run_loop.Run(); + + return clusters; + } + + private: + content::BrowserTaskEnvironment task_environment_; + std::unique_ptr<TestingProfile> testing_profile_; + std::unique_ptr<history_clusters::TestHistoryClustersService> + test_history_clusters_service_; + std::unique_ptr<MockCartService> mock_cart_service_; + std::unique_ptr<TemplateURLService> template_url_service_; + std::unique_ptr<HistoryClustersModuleService> + history_clusters_module_service_; +}; + +history::ClusterVisit SampleVisitForURL( + GURL url, + bool has_url_keyed_image = true, + const std::vector<std::string>& related_searches = {}) { + history::VisitRow visit_row; + visit_row.visit_id = 1; + visit_row.visit_time = base::Time::Now(); + visit_row.is_known_to_sync = true; + auto content_annotations = history::VisitContentAnnotations(); + content_annotations.has_url_keyed_image = has_url_keyed_image; + content_annotations.related_searches = related_searches; + history::AnnotatedVisit annotated_visit; + annotated_visit.visit_row = std::move(visit_row); + annotated_visit.content_annotations = std::move(content_annotations); + std::string kSampleUrl = url.spec(); + history::ClusterVisit sample_visit; + sample_visit.url_for_display = base::UTF8ToUTF16(kSampleUrl); + sample_visit.normalized_url = url; + sample_visit.annotated_visit = std::move(annotated_visit); + sample_visit.score = 1.0f; + return sample_visit; +} + +history::Cluster SampleCluster(int id, + int srp_visits, + int non_srp_visits, + const std::vector<std::string> related_searches = + {"fruits", "red fruits", "healthy fruits"}) { + history::ClusterVisit sample_srp_visit = + SampleVisitForURL(GURL(kSampleSearchUrl), false); + history::ClusterVisit sample_non_srp_visit = + SampleVisitForURL(GURL(kSampleNonSearchUrl), true, related_searches); + + std::vector<history::ClusterVisit> visits; + visits.insert(visits.end(), srp_visits, sample_srp_visit); + visits.insert(visits.end(), non_srp_visits, sample_non_srp_visit); + + std::string kSampleLabel = "LabelOne"; + return history::Cluster(id, std::move(visits), + {{u"apples", history::ClusterKeywordData()}, + {u"Red Oranges", history::ClusterKeywordData()}}, + /*should_show_on_prominent_ui_surfaces=*/true, + /*label=*/ + l10n_util::GetStringFUTF16( + IDS_HISTORY_CLUSTERS_CLUSTER_LABEL_SEARCH_TERMS, + base::UTF8ToUTF16(kSampleLabel))); +} + +history::Cluster SampleCluster(int srp_visits, + int non_srp_visits, + const std::vector<std::string> related_searches = + {"fruits", "red fruits", "healthy fruits"}) { + return SampleCluster(1, srp_visits, non_srp_visits, related_searches); +} + +TEST_F(HistoryClustersModuleServiceTest, GetClusters) { + base::HistogramTester histogram_tester; + + const int kSampleClusterCount = 3; + std::vector<history::Cluster> sample_clusters; + for (int i = 0; i < kSampleClusterCount; i++) { + sample_clusters.push_back( + SampleCluster(i, /*srp_visits=*/1, /*non_srp_visits=*/2)); + } + test_history_clusters_service().SetClustersToReturn(sample_clusters); + + std::vector<history::Cluster> clusters = GetClusters(); + ASSERT_EQ(3u, clusters.size()); + + for (unsigned int i = 0; i < kSampleClusterCount; i++) { + const auto& cluster = clusters[i]; + ASSERT_EQ(3u, cluster.visits.size()); + for (size_t u = 1; u < cluster.visits.size(); u++) { + EXPECT_EQ(kSampleNonSearchUrl, + base::UTF16ToASCII(cluster.visits[u].url_for_display)); + } + } + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.IneligibleReason", 0, 1); + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.HasClusterToShow", true, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumClusterCandidates", 3, 1); + + histogram_tester.ExpectUniqueSample("NewTabPage.HistoryClusters.NumVisits", 3, + 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumRelatedSearches", 3, 1); +} + +TEST_F(HistoryClustersModuleServiceTest, ClusterVisitsCulled) { + base::HistogramTester histogram_tester; + + const history::Cluster kSampleCluster = + SampleCluster(/*srp_visits=*/3, /*non_srp_visits=*/3); + const std::vector<history::Cluster> kSampleClusters = {kSampleCluster}; + test_history_clusters_service().SetClustersToReturn(kSampleClusters); + + std::vector<history::Cluster> clusters = GetClusters(); + ASSERT_EQ(1u, clusters.size()); + + auto& cluster = clusters[0]; + ASSERT_EQ(kSampleCluster.label.value(), cluster.label); + ASSERT_EQ(4u, cluster.visits.size()); + ASSERT_EQ(kSampleSearchUrl, + base::UTF16ToASCII(cluster.visits[0].url_for_display)); + for (size_t i = 1; i < cluster.visits.size(); i++) { + ASSERT_EQ(kSampleNonSearchUrl, + base::UTF16ToASCII(cluster.visits[i].url_for_display)); + } + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.HasClusterToShow", true, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumClusterCandidates", 1, 1); + histogram_tester.ExpectUniqueSample("NewTabPage.HistoryClusters.NumVisits", 4, + 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumRelatedSearches", 3, 1); +} + +TEST_F(HistoryClustersModuleServiceTest, IneligibleClusterNonProminent) { + base::HistogramTester histogram_tester; + + const history::Cluster kSampleCluster = history::Cluster( + 1, {}, + {{u"apples", history::ClusterKeywordData()}, + {u"Red Oranges", history::ClusterKeywordData()}}, + /*should_show_on_prominent_ui_surfaces=*/false, + /*label=*/ + l10n_util::GetStringFUTF16( + IDS_HISTORY_CLUSTERS_CLUSTER_LABEL_SEARCH_TERMS, u"Red fruits")); + test_history_clusters_service().SetClustersToReturn({kSampleCluster}); + + std::vector<history::Cluster> clusters = GetClusters(); + ASSERT_TRUE(clusters.empty()); + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.IneligibleReason", 2, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); +} + +TEST_F(HistoryClustersModuleServiceTest, IneligibleClusterNoSRPVisit) { + base::HistogramTester histogram_tester; + + const history::Cluster kSampleCluster = + SampleCluster(/*srp_visits=*/0, /*non_srp_visits=*/3); + test_history_clusters_service().SetClustersToReturn({kSampleCluster}); + + std::vector<history::Cluster> clusters = GetClusters(); + ASSERT_TRUE(clusters.empty()); + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.IneligibleReason", 3, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); +} + +TEST_F(HistoryClustersModuleServiceTest, IneligibleClusterInsufficientVisits) { + base::HistogramTester histogram_tester; + + const history::Cluster kSampleCluster = + SampleCluster(/*srp_visits=*/1, /*non_srp_visits=*/1); + test_history_clusters_service().SetClustersToReturn({kSampleCluster}); + + std::vector<history::Cluster> clusters = GetClusters(); + ASSERT_TRUE(clusters.empty()); + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.IneligibleReason", 4, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); +} + +TEST_F(HistoryClustersModuleServiceTest, IneligibleClusterInsufficientImages) { + base::HistogramTester histogram_tester; + + history::ClusterVisit sample_srp_visit = + SampleVisitForURL(GURL(kSampleSearchUrl), false); + history::ClusterVisit sample_non_srp_visit = + SampleVisitForURL(GURL(kSampleNonSearchUrl), false); + + const history::Cluster kSampleCluster = history::Cluster( + 1, {sample_srp_visit, sample_non_srp_visit, sample_non_srp_visit}, + {{u"apples", history::ClusterKeywordData()}, + {u"Red Oranges", history::ClusterKeywordData()}}, + /*should_show_on_prominent_ui_surfaces=*/true, + /*label=*/ + l10n_util::GetStringFUTF16( + IDS_HISTORY_CLUSTERS_CLUSTER_LABEL_SEARCH_TERMS, u"Red fruits")); + test_history_clusters_service().SetClustersToReturn({kSampleCluster}); + + std::vector<history::Cluster> clusters = GetClusters(); + ASSERT_TRUE(clusters.empty()); + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.IneligibleReason", 5, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); +} + +TEST_F(HistoryClustersModuleServiceTest, + IneligibleClusterInsufficientRelatedSearches) { + base::HistogramTester histogram_tester; + + const history::Cluster kSampleCluster = SampleCluster( + /*id=*/1, /*srp_visits=*/1, /*non_srp_visits=*/2, + /*related_searches=*/{}); + test_history_clusters_service().SetClustersToReturn({kSampleCluster}); + + std::vector<history::Cluster> clusters = GetClusters(); + ASSERT_TRUE(clusters.empty()); + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.IneligibleReason", 6, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); +} + +TEST_F(HistoryClustersModuleServiceTest, NoClusters) { + base::HistogramTester histogram_tester; + + std::vector<history::Cluster> clusters = GetClusters(); + ASSERT_TRUE(clusters.empty()); + + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.IneligibleReason", 1, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); + histogram_tester.ExpectUniqueSample( + "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); +} + +class HistoryClustersPageHandlerCartTest + : public HistoryClustersModuleServiceTest { + public: + HistoryClustersPageHandlerCartTest() { + features_.InitAndEnableFeature(ntp_features::kNtpChromeCartModule); + } + + private: + base::test::ScopedFeatureList features_; +}; + +TEST_F(HistoryClustersPageHandlerCartTest, CheckClusterHasCart) { + base::HistogramTester histogram_tester; + std::string kSampleLabel = "LabelOne"; + const GURL url_A = GURL("https://www.foo.com"); + const GURL url_B = GURL("https://www.bar.com"); + const GURL url_C = GURL("https://www.baz.com"); + MockCartService& cart_service = mock_cart_service(); + + const std::vector<std::string> visit_related_searches = { + "fruits", "red fruits", "healthy fruits"}; + const history::Cluster cluster = + history::Cluster(1, + {SampleVisitForURL(GURL(kSampleSearchUrl), false, {}), + SampleVisitForURL(url_A, true, visit_related_searches), + SampleVisitForURL(url_B, true, visit_related_searches), + SampleVisitForURL(url_C, true, visit_related_searches)}, + {{u"apples", history::ClusterKeywordData()}, + {u"Red Oranges", history::ClusterKeywordData()}}, + /*should_show_on_prominent_ui_surfaces=*/true, + /*label=*/base::UTF8ToUTF16(kSampleLabel)); + test_history_clusters_service().SetClustersToReturn({cluster}); + + // Vectors to capture mocked method args. + std::vector<GURL> urls; + std::vector<base::OnceCallback<void(bool)>> callbacks; + EXPECT_CALL(cart_service, HasActiveCartForURL(testing::_, testing::_)) + .Times(cluster.visits.size()) + .WillRepeatedly(testing::WithArgs<0, 1>(testing::Invoke( + [&urls, &callbacks](GURL url, + base::OnceCallback<void(bool)> callback) -> void { + urls.push_back(url); + callbacks.push_back(std::move(callback)); + }))); + GetClusters(); + // Simulate one URL being identified as having a cart. + std::move(callbacks[0]).Run(true); + for (size_t i = 1; i < callbacks.size(); i++) { + std::move(callbacks[i]).Run(false); + } + + for (size_t i = 0; i < urls.size(); i++) { + EXPECT_EQ(urls[i], cluster.visits[i].normalized_url); + } + histogram_tester.ExpectBucketCount( + "NewTabPage.HistoryClusters.HasCartForTopCluster", true, 1); + + urls.clear(); + callbacks.clear(); + EXPECT_CALL(cart_service, HasActiveCartForURL(testing::_, testing::_)) + .Times(cluster.visits.size()) + .WillRepeatedly(testing::WithArgs<0, 1>(testing::Invoke( + [&urls, &callbacks](GURL url, + base::OnceCallback<void(bool)> callback) -> void { + urls.push_back(url); + callbacks.push_back(std::move(callback)); + }))); + GetClusters(); + // Simulate none URL being identified as having a cart. + for (size_t i = 0; i < callbacks.size(); i++) { + std::move(callbacks[i]).Run(false); + } + + for (size_t i = 0; i < urls.size(); i++) { + EXPECT_EQ(urls[i], cluster.visits[i].normalized_url); + } + histogram_tester.ExpectBucketCount( + "NewTabPage.HistoryClusters.HasCartForTopCluster", false, 1); + histogram_tester.ExpectTotalCount( + "NewTabPage.HistoryClusters.HasCartForTopCluster", 2); +} + +} // namespace
diff --git a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler.cc b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler.cc index 68bc414..6420399 100644 --- a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler.cc +++ b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler.cc
@@ -8,21 +8,16 @@ #include <tuple> #include <vector> -#include "base/barrier_callback.h" -#include "base/feature_list.h" -#include "base/metrics/field_trial_params.h" -#include "base/metrics/histogram_functions.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" -#include "chrome/browser/cart/cart_service.h" #include "chrome/browser/cart/cart_service_factory.h" #include "chrome/browser/history/history_service_factory.h" -#include "chrome/browser/history_clusters/history_clusters_service_factory.h" #include "chrome/browser/new_tab_page/modules/history_clusters/cart/cart_processor.h" #include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters.mojom.h" -#include "chrome/browser/new_tab_page/new_tab_page_util.h" +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.h" +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/ui/browser.h" @@ -36,109 +31,12 @@ #include "components/history_clusters/public/mojom/history_cluster_types.mojom.h" #include "components/keyed_service/core/service_access_type.h" #include "components/search/ntp_features.h" -#include "components/search_engines/template_url.h" -#include "components/search_engines/template_url_service.h" #include "components/strings/grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" #include "url/url_util.h" namespace { -constexpr int kMinRequiredRelatedSearches = 3; - -// The minimum number of visits to render a layout is 2 URL visits plus a SRP -// visit. -constexpr int kMinRequiredVisits = 3; - -// This enum must match the numbering for NTPHistoryClustersIneligibleReason in -// enums.xml. Do not reorder or remove items, and update kMaxValue when new -// items are added. -enum NTPHistoryClustersIneligibleReason { - kNone = 0, - kNoClusters = 1, - kNonProminent = 2, - kNoSRPVisit = 3, - kInsufficientVisits = 4, - kInsufficientImages = 5, - kInsufficientRelatedSearches = 6, - kMaxValue = kInsufficientRelatedSearches, -}; - -base::flat_set<std::string> GetCategories(const char* feature_param) { - std::string categories_string = base::GetFieldTrialParamValueByFeature( - ntp_features::kNtpHistoryClustersModuleCategories, feature_param); - if (categories_string.empty()) { - return {}; - } - - auto categories = base::SplitString(categories_string, ",", - base::WhitespaceHandling::TRIM_WHITESPACE, - base::SplitResult::SPLIT_WANT_NONEMPTY); - - return categories.empty() ? base::flat_set<std::string>() - : base::flat_set<std::string>(categories.begin(), - categories.end()); -} - -int GetMinVisitsToShow() { - static int min_visits = base::GetFieldTrialParamByFeatureAsInt( - ntp_features::kNtpHistoryClustersModuleMinimumVisitsRequired, - ntp_features::kNtpHistoryClustersModuleMinimumVisitsRequiredParam, - kMinRequiredVisits); - if (min_visits < 0) { - return kMinRequiredVisits; - } - return min_visits; -} - -int GetMinImagesToShow() { - static int min_images_to_show = base::GetFieldTrialParamByFeatureAsInt( - ntp_features::kNtpHistoryClustersModuleMinimumImagesRequired, - ntp_features::kNtpHistoryClustersModuleMinimumImagesRequiredParam, 1); - return min_images_to_show; -} - -size_t GetMaxClusters() { - // Even though only one cluster will be shown on the NTP at a time for now, - // set this to greater than that in case the filtering logic does not match - // up. - static int max_clusters = base::GetFieldTrialParamByFeatureAsInt( - ntp_features::kNtpHistoryClustersModuleMaxClusters, - ntp_features::kNtpHistoryClustersModuleMaxClustersParam, 5); - if (max_clusters < 0) { - return 5; - } - return static_cast<size_t>(max_clusters); -} - -history_clusters::QueryClustersFilterParams GetFilterParamsFromFeatureFlags() { - history_clusters::QueryClustersFilterParams filter_params; - filter_params.min_visits = GetMinVisitsToShow(); - filter_params.min_visits_with_images = GetMinImagesToShow(); - filter_params.categories_allowlist = GetCategories( - ntp_features::kNtpHistoryClustersModuleCategoriesAllowlistParam); - filter_params.categories_blocklist = GetCategories( - ntp_features::kNtpHistoryClustersModuleCategoriesBlocklistParam); - filter_params.is_search_initiated = true; - filter_params.has_related_searches = true; - filter_params.is_shown_on_prominent_ui_surfaces = true; - filter_params.max_clusters = GetMaxClusters(); - filter_params.categories_boostlist = GetCategories( - ntp_features::kNtpHistoryClustersModuleCategoriesBoostlistParam); - return filter_params; -} - -base::Time GetBeginTime() { - static int hours_to_look_back = base::GetFieldTrialParamByFeatureAsInt( - ntp_features::kNtpHistoryClustersModuleBeginTimeDuration, - ntp_features::kNtpHistoryClustersModuleBeginTimeDurationHoursParam, 24); - if (hours_to_look_back <= 0) { - hours_to_look_back = 24; - } - - return base::Time::Now() - base::Hours(hours_to_look_back); -} - history::ClusterVisit GenerateSampleVisit( history::VisitID visit_id, const std::string& page_title, @@ -223,12 +121,11 @@ content::WebContents* web_contents) : receiver_(this, std::move(pending_receiver)), profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())), - web_contents_(web_contents), - filter_params_(GetFilterParamsFromFeatureFlags()), - cart_service_(CartServiceFactory::GetForProfile(profile_)) { + web_contents_(web_contents) { if (base::FeatureList::IsEnabled( ntp_features::kNtpChromeCartInHistoryClusterModule)) { - cart_processor_ = std::make_unique<CartProcessor>(cart_service_); + cart_processor_ = std::make_unique<CartProcessor>( + CartServiceFactory::GetForProfile(profile_)); } } @@ -238,123 +135,18 @@ void HistoryClustersPageHandler::CallbackWithClusterData( GetClustersCallback callback, - std::vector<history::Cluster> clusters, - history_clusters::QueryClustersContinuationParams continuation_params) { - const TemplateURLService* template_url_service = - TemplateURLServiceFactory::GetForProfile(profile_); - if (!template_url_service) { - std::move(callback).Run({}); - return; - } - - history_clusters::CoalesceRelatedSearches(clusters); - - // Cull clusters that do not have the minimum number of visits with and - // without images to be eligible for display. - NTPHistoryClustersIneligibleReason ineligible_reason = - clusters.empty() ? kNoClusters : kNone; - base::EraseIf(clusters, [&](auto& cluster) { - // Cull non prominent clusters. - if (!cluster.should_show_on_prominent_ui_surfaces) { - ineligible_reason = kNonProminent; - return true; - } - - // Cull clusters whose visits don't have at least one SRP. - const TemplateURL* default_search_provider = - template_url_service->GetDefaultSearchProvider(); - auto srp_visits_it = std::find_if( - cluster.visits.begin(), cluster.visits.end(), [&](auto& visit) { - return default_search_provider->IsSearchURL( - visit.normalized_url, template_url_service->search_terms_data()); - }); - if (srp_visits_it == cluster.visits.end()) { - ineligible_reason = kNoSRPVisit; - return true; - } - - // Ensure visits contains at most one SRP visit and its the first one in the - // list. - history::ClusterVisit first_srp_visit = *srp_visits_it; - base::EraseIf(cluster.visits, [&](auto& visit) { - return default_search_provider->IsSearchURL( - visit.normalized_url, template_url_service->search_terms_data()); - }); - cluster.visits.insert(cluster.visits.begin(), first_srp_visit); - - // Cull visits that have a zero relevance score. - base::EraseIf(cluster.visits, - [&](auto& visit) { return visit.score == 0.0; }); - - int visits_with_images = std::accumulate( - cluster.visits.begin(), cluster.visits.end(), 0, - [](const auto& i, const auto& v) { - return i + int(v.annotated_visit.content_annotations - .has_url_keyed_image && - v.annotated_visit.visit_row.is_known_to_sync); - }); - - if (cluster.visits.size() < kMinRequiredVisits) { - ineligible_reason = kInsufficientVisits; - return true; - } - - if (visits_with_images < GetMinImagesToShow()) { - ineligible_reason = kInsufficientImages; - return true; - } - - // Cull clusters that do not have the minimum required number of related - // searches to be eligible for display. - if (cluster.related_searches.size() < kMinRequiredRelatedSearches) { - ineligible_reason = kInsufficientRelatedSearches; - return true; - } - - return false; - }); - - base::UmaHistogramEnumeration("NewTabPage.HistoryClusters.IneligibleReason", - ineligible_reason); - base::UmaHistogramBoolean("NewTabPage.HistoryClusters.HasClusterToShow", - !clusters.empty()); - base::UmaHistogramCounts100("NewTabPage.HistoryClusters.NumClusterCandidates", - clusters.size()); - + std::vector<history::Cluster> clusters) { if (clusters.empty()) { std::move(callback).Run({}); return; } - history::Cluster top_cluster = clusters.front(); - base::UmaHistogramCounts100("NewTabPage.HistoryClusters.NumVisits", - top_cluster.visits.size()); - base::UmaHistogramCounts100("NewTabPage.HistoryClusters.NumRelatedSearches", - top_cluster.related_searches.size()); - std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; for (const auto& cluster : clusters) { - clusters_mojom.push_back( - history_clusters::ClusterToMojom(template_url_service, cluster)); + clusters_mojom.push_back(history_clusters::ClusterToMojom( + TemplateURLServiceFactory::GetForProfile(profile_), cluster)); } std::move(callback).Run(std::move(clusters_mojom)); - - if (!IsCartModuleEnabled() || !cart_service_) { - return; - } - const auto metrics_callback = base::BarrierCallback<bool>( - top_cluster.visits.size(), - base::BindOnce([](const std::vector<bool>& results) { - bool has_cart = false; - for (bool result : results) { - has_cart = has_cart || result; - } - base::UmaHistogramBoolean( - "NewTabPage.HistoryClusters.HasCartForTopCluster", has_cart); - })); - for (auto& visit : top_cluster.visits) { - cart_service_->HasActiveCartForURL(visit.normalized_url, metrics_callback); - } } void HistoryClustersPageHandler::GetClusters(GetClustersCallback callback) { @@ -389,16 +181,13 @@ return; } - auto* history_clusters_service = - HistoryClustersServiceFactory::GetForBrowserContext(profile_); - history_clusters::QueryClustersContinuationParams continuation_params; - - // TODO(b/244504329): The first call to QueryClusters may come back with - // empty data though history clusters may exist. - fetch_clusters_task_ = history_clusters_service->QueryClusters( - history_clusters::ClusteringRequestSource::kNewTabPage, filter_params_, - GetBeginTime(), continuation_params, - /*recluster=*/false, + auto* history_clusters_module_service = + HistoryClustersModuleServiceFactory::GetForProfile(profile_); + if (!history_clusters_module_service) { + std::move(callback).Run({}); + return; + } + fetch_clusters_task_ = history_clusters_module_service->GetClusters( base::BindOnce(&HistoryClustersPageHandler::CallbackWithClusterData, weak_ptr_factory_.GetWeakPtr(), std::move(callback))); }
diff --git a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler.h b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler.h index 8a07210d..e9df9f50 100644 --- a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler.h +++ b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler.h
@@ -21,7 +21,6 @@ class Profile; class GURL; -class CartService; class CartProcessor; namespace content { @@ -55,24 +54,18 @@ private: // Forward the most relevant history clusters to the callback if any. - void CallbackWithClusterData( - GetClustersCallback callback, - std::vector<history::Cluster> clusters, - history_clusters::QueryClustersContinuationParams continuation_params); + void CallbackWithClusterData(GetClustersCallback callback, + std::vector<history::Cluster> clusters); mojo::Receiver<ntp::history_clusters::mojom::PageHandler> receiver_; raw_ptr<Profile> profile_; raw_ptr<content::WebContents> web_contents_; - // The filtering parameters to use for all calls to fetch clusters. - history_clusters::QueryClustersFilterParams filter_params_; - // Tracks the current fetch clusters task. Will be `nullptr` or // `Done()` will be true if there is no ongoing task. std::unique_ptr<history_clusters::HistoryClustersServiceTask> fetch_clusters_task_; base::CancelableTaskTracker hide_visits_task_tracker_; - raw_ptr<CartService> cart_service_; std::unique_ptr<CartProcessor> cart_processor_; base::WeakPtrFactory<HistoryClustersPageHandler> weak_ptr_factory_{this};
diff --git a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler_unittest.cc b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler_unittest.cc index fcdc4227..58b471f5 100644 --- a/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler_unittest.cc +++ b/chrome/browser/new_tab_page/modules/history_clusters/history_clusters_page_handler_unittest.cc
@@ -9,6 +9,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/cancelable_task_tracker.h" +#include "base/test/gmock_callback_support.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/mock_callback.h" #include "base/time/time.h" @@ -16,6 +17,8 @@ #include "chrome/browser/cart/cart_service_factory.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/history_clusters/history_clusters_service_factory.h" +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service.h" +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/ui/side_panel/history_clusters/history_clusters_tab_helper.h" #include "chrome/browser/ui/tabs/tab_group_model.h" @@ -26,6 +29,7 @@ #include "components/history/core/browser/history_context.h" #include "components/history/core/browser/history_types.h" #include "components/history/core/test/history_service_test_util.h" +#include "components/history_clusters/core/history_clusters_service_task.h" #include "components/history_clusters/core/history_clusters_types.h" #include "components/history_clusters/core/test_history_clusters_service.h" #include "components/history_clusters/public/mojom/history_cluster_types.mojom.h" @@ -63,6 +67,17 @@ : HistoryClustersTabHelper(web_contents) {} }; +class MockHistoryClustersModuleService : public HistoryClustersModuleService { + public: + MockHistoryClustersModuleService() + : HistoryClustersModuleService(nullptr, nullptr, nullptr) {} + + MOCK_METHOD1( + GetClusters, + std::unique_ptr<history_clusters::HistoryClustersServiceTask>( + base::OnceCallback<void(std::vector<history::Cluster>)> callback)); +}; + class MockHistoryService : public history::HistoryService { public: MockHistoryService() : HistoryService() {} @@ -80,16 +95,12 @@ public: explicit MockCartService(Profile* profile) : CartService(profile) {} - MOCK_METHOD2(HasActiveCartForURL, - void(const GURL& url, base::OnceCallback<void(bool)> callback)); MOCK_METHOD1(LoadAllActiveCarts, void(CartDB::LoadCallback callback)); }; constexpr char kSampleNonSearchUrl[] = "https://www.foo.com/"; constexpr char kSampleSearchUrl[] = "https://www.google.com/search?q=foo"; -} // namespace - class HistoryClustersPageHandlerTest : public BrowserWithTestWindowTest { public: HistoryClustersPageHandlerTest() = default; @@ -97,9 +108,9 @@ void SetUp() override { BrowserWithTestWindowTest::SetUp(); - test_history_clusters_service_ = - static_cast<history_clusters::TestHistoryClustersService*>( - HistoryClustersServiceFactory::GetForBrowserContext(profile())); + mock_history_clusters_module_service_ = + static_cast<MockHistoryClustersModuleService*>( + HistoryClustersModuleServiceFactory::GetForProfile(profile())); web_contents_ = content::WebContents::Create( content::WebContents::CreateParams(profile())); mock_history_clusters_tab_helper_ = @@ -119,29 +130,27 @@ BrowserWithTestWindowTest::TearDown(); } - history_clusters::TestHistoryClustersService& - test_history_clusters_service() { - return *test_history_clusters_service_; + MockHistoryClustersModuleService& mock_history_clusters_module_service() { + return *mock_history_clusters_module_service_; } MockHistoryClustersTabHelper& mock_history_clusters_tab_helper() { return *mock_history_clusters_tab_helper_; } - MockHistoryService& mock_history_service() { return *mock_history_service_; } - MockCartService& mock_cart_service() { return *mock_cart_service_; } + MockHistoryService& mock_history_service() { return *mock_history_service_; } + HistoryClustersPageHandler& handler() { return *handler_; } private: // BrowserWithTestWindowTest: TestingProfile::TestingFactories GetTestingFactories() override { - return {{&HistoryClustersServiceFactory::GetInstance(), + return {{HistoryClustersModuleServiceFactory::GetInstance(), base::BindRepeating([](content::BrowserContext* context) -> std::unique_ptr<KeyedService> { - return std::make_unique< - history_clusters::TestHistoryClustersService>(); + return std::make_unique<MockHistoryClustersModuleService>(); })}, {HistoryServiceFactory::GetInstance(), base::BindRepeating([](content::BrowserContext* context) @@ -158,8 +167,8 @@ })}}; } - raw_ptr<history_clusters::TestHistoryClustersService> - test_history_clusters_service_; + raw_ptr<MockHistoryClustersModuleService> + mock_history_clusters_module_service_; std::unique_ptr<content::WebContents> web_contents_; raw_ptr<MockHistoryClustersTabHelper> mock_history_clusters_tab_helper_; raw_ptr<MockHistoryService> mock_history_service_; @@ -223,15 +232,20 @@ } TEST_F(HistoryClustersPageHandlerTest, GetClusters) { - base::HistogramTester histogram_tester; - const int kSampleClusterCount = 3; std::vector<history::Cluster> sample_clusters; for (int i = 0; i < kSampleClusterCount; i++) { sample_clusters.push_back( SampleCluster(i, /*srp_visits=*/1, /*non_srp_visits=*/2)); } - test_history_clusters_service().SetClustersToReturn(sample_clusters); + EXPECT_CALL(mock_history_clusters_module_service(), GetClusters(testing::_)) + .WillOnce(testing::Invoke( + [&sample_clusters]( + base::OnceCallback<void(std::vector<history::Cluster>)> callback) + -> std::unique_ptr<history_clusters::HistoryClustersServiceTask> { + std::move(callback).Run(sample_clusters); + return nullptr; + })); std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; @@ -255,211 +269,6 @@ ASSERT_EQ(kSampleNonSearchUrl, cluster_mojom->visits[u]->url_for_display); } } - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.IneligibleReason", 0, 1); - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.HasClusterToShow", true, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumClusterCandidates", 3, 1); - - histogram_tester.ExpectUniqueSample("NewTabPage.HistoryClusters.NumVisits", 3, - 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumRelatedSearches", 3, 1); -} - -TEST_F(HistoryClustersPageHandlerTest, ClusterVisitsCulled) { - base::HistogramTester histogram_tester; - - const history::Cluster kSampleCluster = - SampleCluster(/*srp_visits=*/3, /*non_srp_visits=*/3); - const std::vector<history::Cluster> kSampleClusters = {kSampleCluster}; - test_history_clusters_service().SetClustersToReturn(kSampleClusters); - - history_clusters::mojom::ClusterPtr cluster_mojom; - base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; - EXPECT_CALL(callback, Run(testing::_)) - .Times(1) - .WillOnce(testing::Invoke( - [&cluster_mojom]( - std::vector<history_clusters::mojom::ClusterPtr> clusters_arg) { - cluster_mojom = std::move(clusters_arg.front()); - })); - handler().GetClusters(callback.Get()); - ASSERT_TRUE(cluster_mojom); - ASSERT_EQ(1u, cluster_mojom->id); - ASSERT_EQ(base::UTF16ToUTF8(kSampleCluster.label.value()), - cluster_mojom->label); - ASSERT_EQ(4u, cluster_mojom->visits.size()); - ASSERT_EQ(kSampleSearchUrl, cluster_mojom->visits[0]->url_for_display); - for (size_t i = 1; i < cluster_mojom->visits.size(); i++) { - ASSERT_EQ(kSampleNonSearchUrl, cluster_mojom->visits[i]->url_for_display); - } - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.HasClusterToShow", true, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumClusterCandidates", 1, 1); - histogram_tester.ExpectUniqueSample("NewTabPage.HistoryClusters.NumVisits", 4, - 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumRelatedSearches", 3, 1); -} - -TEST_F(HistoryClustersPageHandlerTest, IneligibleClusterNonProminent) { - base::HistogramTester histogram_tester; - - const history::Cluster kSampleCluster = history::Cluster( - 1, {}, - {{u"apples", history::ClusterKeywordData()}, - {u"Red Oranges", history::ClusterKeywordData()}}, - /*should_show_on_prominent_ui_surfaces=*/false, - /*label=*/ - l10n_util::GetStringFUTF16( - IDS_HISTORY_CLUSTERS_CLUSTER_LABEL_SEARCH_TERMS, u"Red fruits")); - test_history_clusters_service().SetClustersToReturn({kSampleCluster}); - - std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; - base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; - EXPECT_CALL(callback, Run(testing::_)) - .Times(1) - .WillOnce(testing::Invoke( - [&clusters_mojom]( - std::vector<history_clusters::mojom::ClusterPtr> clusters_arg) { - clusters_mojom = std::move(clusters_arg); - })); - handler().GetClusters(callback.Get()); - ASSERT_EQ(0u, clusters_mojom.size()); - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.IneligibleReason", 2, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); -} - -TEST_F(HistoryClustersPageHandlerTest, IneligibleClusterNoSRPVisit) { - base::HistogramTester histogram_tester; - - const history::Cluster kSampleCluster = - SampleCluster(/*srp_visits=*/0, /*non_srp_visits=*/3); - test_history_clusters_service().SetClustersToReturn({kSampleCluster}); - - std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; - base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; - EXPECT_CALL(callback, Run(testing::_)) - .Times(1) - .WillOnce(testing::Invoke( - [&clusters_mojom]( - std::vector<history_clusters::mojom::ClusterPtr> clusters_arg) { - clusters_mojom = std::move(clusters_arg); - })); - handler().GetClusters(callback.Get()); - ASSERT_EQ(0u, clusters_mojom.size()); - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.IneligibleReason", 3, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); -} - -TEST_F(HistoryClustersPageHandlerTest, IneligibleClusterInsufficientVisits) { - base::HistogramTester histogram_tester; - - const history::Cluster kSampleCluster = - SampleCluster(/*srp_visits=*/1, /*non_srp_visits=*/1); - test_history_clusters_service().SetClustersToReturn({kSampleCluster}); - - std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; - base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; - EXPECT_CALL(callback, Run(testing::_)) - .Times(1) - .WillOnce(testing::Invoke( - [&clusters_mojom]( - std::vector<history_clusters::mojom::ClusterPtr> clusters_arg) { - clusters_mojom = std::move(clusters_arg); - })); - handler().GetClusters(callback.Get()); - ASSERT_EQ(0u, clusters_mojom.size()); - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.IneligibleReason", 4, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); -} - -TEST_F(HistoryClustersPageHandlerTest, IneligibleClusterInsufficientImages) { - base::HistogramTester histogram_tester; - - history::ClusterVisit sample_srp_visit = - SampleVisitForURL(GURL(kSampleSearchUrl), false); - history::ClusterVisit sample_non_srp_visit = - SampleVisitForURL(GURL(kSampleNonSearchUrl), false); - - const history::Cluster kSampleCluster = history::Cluster( - 1, {sample_srp_visit, sample_non_srp_visit, sample_non_srp_visit}, - {{u"apples", history::ClusterKeywordData()}, - {u"Red Oranges", history::ClusterKeywordData()}}, - /*should_show_on_prominent_ui_surfaces=*/true, - /*label=*/ - l10n_util::GetStringFUTF16( - IDS_HISTORY_CLUSTERS_CLUSTER_LABEL_SEARCH_TERMS, u"Red fruits")); - test_history_clusters_service().SetClustersToReturn({kSampleCluster}); - - std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; - base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; - EXPECT_CALL(callback, Run(testing::_)) - .Times(1) - .WillOnce(testing::Invoke( - [&clusters_mojom]( - std::vector<history_clusters::mojom::ClusterPtr> clusters_arg) { - clusters_mojom = std::move(clusters_arg); - })); - handler().GetClusters(callback.Get()); - ASSERT_EQ(0u, clusters_mojom.size()); - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.IneligibleReason", 5, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); -} - -TEST_F(HistoryClustersPageHandlerTest, - IneligibleClusterInsufficientRelatedSearches) { - base::HistogramTester histogram_tester; - - const history::Cluster kSampleCluster = SampleCluster( - /*id=*/1, /*srp_visits=*/1, /*non_srp_visits=*/2, - /*related_searches=*/{}); - test_history_clusters_service().SetClustersToReturn({kSampleCluster}); - - std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; - base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; - EXPECT_CALL(callback, Run(testing::_)) - .Times(1) - .WillOnce(testing::Invoke( - [&clusters_mojom]( - std::vector<history_clusters::mojom::ClusterPtr> clusters_arg) { - clusters_mojom = std::move(clusters_arg); - })); - handler().GetClusters(callback.Get()); - ASSERT_EQ(0u, clusters_mojom.size()); - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.IneligibleReason", 6, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); } TEST_F(HistoryClustersPageHandlerTest, GetFakeCluster) { @@ -474,7 +283,6 @@ }, {}); - test_history_clusters_service().SetClustersToReturn({}); history_clusters::mojom::ClusterPtr cluster_mojom; base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; EXPECT_CALL(callback, Run(testing::_)) @@ -503,7 +311,8 @@ const history::Cluster kSampleCluster = SampleCluster(/*srp_visits=*/1, /*non_srp_visits=*/2); - test_history_clusters_service().SetClustersToReturn({kSampleCluster}); + EXPECT_CALL(mock_history_clusters_module_service(), GetClusters(testing::_)) + .Times(0); std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; @@ -519,7 +328,13 @@ } TEST_F(HistoryClustersPageHandlerTest, NoClusters) { - base::HistogramTester histogram_tester; + EXPECT_CALL(mock_history_clusters_module_service(), GetClusters(testing::_)) + .WillOnce(testing::Invoke( + [&](base::OnceCallback<void(std::vector<history::Cluster>)> callback) + -> std::unique_ptr<history_clusters::HistoryClustersServiceTask> { + std::move(callback).Run({}); + return nullptr; + })); std::vector<history_clusters::mojom::ClusterPtr> clusters_mojom; base::MockCallback<HistoryClustersPageHandler::GetClustersCallback> callback; @@ -532,13 +347,6 @@ })); handler().GetClusters(callback.Get()); ASSERT_EQ(0u, clusters_mojom.size()); - - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.IneligibleReason", 1, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.HasClusterToShow", false, 1); - histogram_tester.ExpectUniqueSample( - "NewTabPage.HistoryClusters.NumClusterCandidates", 0, 1); } TEST_F(HistoryClustersPageHandlerTest, ShowJourneysSidePanel) { @@ -599,88 +407,6 @@ handler().GetCartForCluster(std::move(cluster_mojom), base::DoNothing()); } -class HistoryClustersPageHandlerCartTest - : public HistoryClustersPageHandlerTest { - public: - HistoryClustersPageHandlerCartTest() { - features_.InitAndEnableFeature(ntp_features::kNtpChromeCartModule); - } - - private: - base::test::ScopedFeatureList features_; -}; - -TEST_F(HistoryClustersPageHandlerCartTest, CheckClusterHasCart) { - base::HistogramTester histogram_tester; - std::string kSampleLabel = "LabelOne"; - const GURL url_A = GURL("https://www.foo.com"); - const GURL url_B = GURL("https://www.bar.com"); - const GURL url_C = GURL("https://www.baz.com"); - MockCartService& cart_service = mock_cart_service(); - - const std::vector<std::string> visit_related_searches = { - "fruits", "red fruits", "healthy fruits"}; - const history::Cluster cluster = - history::Cluster(1, - {SampleVisitForURL(GURL(kSampleSearchUrl), false, {}), - SampleVisitForURL(url_A, true, visit_related_searches), - SampleVisitForURL(url_B, true, visit_related_searches), - SampleVisitForURL(url_C, true, visit_related_searches)}, - {{u"apples", history::ClusterKeywordData()}, - {u"Red Oranges", history::ClusterKeywordData()}}, - /*should_show_on_prominent_ui_surfaces=*/true, - /*label=*/base::UTF8ToUTF16(kSampleLabel)); - test_history_clusters_service().SetClustersToReturn({cluster}); - - // Vectors to capture mocked method args. - std::vector<GURL> urls; - std::vector<base::OnceCallback<void(bool)>> callbacks; - EXPECT_CALL(cart_service, HasActiveCartForURL(testing::_, testing::_)) - .Times(cluster.visits.size()) - .WillRepeatedly(testing::WithArgs<0, 1>(testing::Invoke( - [&urls, &callbacks](GURL url, - base::OnceCallback<void(bool)> callback) -> void { - urls.push_back(url); - callbacks.push_back(std::move(callback)); - }))); - handler().GetClusters(base::DoNothing()); - // Simulate one URL being identified as having a cart. - std::move(callbacks[0]).Run(true); - for (size_t i = 1; i < callbacks.size(); i++) { - std::move(callbacks[i]).Run(false); - } - - for (size_t i = 0; i < urls.size(); i++) { - EXPECT_EQ(urls[i], cluster.visits[i].normalized_url); - } - histogram_tester.ExpectBucketCount( - "NewTabPage.HistoryClusters.HasCartForTopCluster", true, 1); - - urls.clear(); - callbacks.clear(); - EXPECT_CALL(cart_service, HasActiveCartForURL(testing::_, testing::_)) - .Times(cluster.visits.size()) - .WillRepeatedly(testing::WithArgs<0, 1>(testing::Invoke( - [&urls, &callbacks](GURL url, - base::OnceCallback<void(bool)> callback) -> void { - urls.push_back(url); - callbacks.push_back(std::move(callback)); - }))); - handler().GetClusters(base::DoNothing()); - // Simulate none URL being identified as having a cart. - for (size_t i = 0; i < callbacks.size(); i++) { - std::move(callbacks[i]).Run(false); - } - - for (size_t i = 0; i < urls.size(); i++) { - EXPECT_EQ(urls[i], cluster.visits[i].normalized_url); - } - histogram_tester.ExpectBucketCount( - "NewTabPage.HistoryClusters.HasCartForTopCluster", false, 1); - histogram_tester.ExpectTotalCount( - "NewTabPage.HistoryClusters.HasCartForTopCluster", 2); -} - class HistoryClustersPageHandlerCartInQuestTest : public HistoryClustersPageHandlerTest { public: @@ -698,3 +424,5 @@ EXPECT_CALL(mock_cart_service(), LoadAllActiveCarts(testing::_)).Times(1); handler().GetCartForCluster(std::move(cluster_mojom), base::DoNothing()); } + +} // namespace
diff --git a/chrome/browser/password_manager/password_generation_interactive_uitest.cc b/chrome/browser/password_manager/password_generation_interactive_uitest.cc index bdf070bf..5f633a6 100644 --- a/chrome/browser/password_manager/password_generation_interactive_uitest.cc +++ b/chrome/browser/password_manager/password_generation_interactive_uitest.cc
@@ -101,13 +101,8 @@ } std::string GetFocusedElement() { - std::string focused_element; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - WebContents(), - "window.domAutomationController.send(" - " document.activeElement.id)", - &focused_element)); - return focused_element; + return content::EvalJs(WebContents(), "document.activeElement.id") + .ExtractString(); } void FocusPasswordField() {
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc index 588a23a..c5b532ab 100644 --- a/chrome/browser/pdf/pdf_extension_test.cc +++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -2512,15 +2512,11 @@ ASSERT_TRUE(guest_mainframe); const std::string script = - "window.domAutomationController.send(" - " window.getComputedStyle(document.body, null)." - " getPropertyValue('background-color'))"; - std::string outer; - ASSERT_TRUE(content::ExecuteScriptAndExtractString(GetActiveWebContents(), - script, &outer)); - std::string inner; - ASSERT_TRUE( - content::ExecuteScriptAndExtractString(guest_mainframe, script, &inner)); + "window.getComputedStyle(document.body, null)." + "getPropertyValue('background-color')"; + std::string outer = + content::EvalJs(GetActiveWebContents(), script).ExtractString(); + std::string inner = content::EvalJs(guest_mainframe, script).ExtractString(); EXPECT_EQ(inner, outer); }
diff --git a/chrome/browser/policy/chrome_browser_policy_connector.cc b/chrome/browser/policy/chrome_browser_policy_connector.cc index 9926e36..4643664 100644 --- a/chrome/browser/policy/chrome_browser_policy_connector.cc +++ b/chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -30,6 +30,7 @@ #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" #include "components/policy/core/common/command_line_policy_provider.h" #include "components/policy/core/common/configuration_policy_provider.h" +#include "components/policy/core/common/policy_logger.h" #include "components/policy/core/common/policy_map.h" #include "components/policy/core/common/policy_namespace.h" #include "components/policy/core/common/policy_proto_decoders.h" @@ -107,6 +108,9 @@ void ChromeBrowserPolicyConnector::Init( PrefService* local_state, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) { + if (PolicyLogger::GetInstance()->IsPolicyLoggingEnabled()) { + PolicyLogger::GetInstance()->EnableLogDeletion(); + } std::unique_ptr<DeviceManagementService::Configuration> configuration( new DeviceManagementServiceConfiguration(GetDeviceManagementUrl(), GetRealtimeReportingUrl(),
diff --git a/chrome/browser/policy/test/content_settings_policy_browsertest.cc b/chrome/browser/policy/test/content_settings_policy_browsertest.cc index aa1c1f7..a2d2de61 100644 --- a/chrome/browser/policy/test/content_settings_policy_browsertest.cc +++ b/chrome/browser/policy/test/content_settings_policy_browsertest.cc
@@ -204,15 +204,14 @@ POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, base::Value(2), nullptr); UpdateProviderPolicy(policies); - std::string rejection; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_contents, - "navigator.bluetooth.requestDevice({filters: [{name: 'Hello'}]})" - " .then(() => { domAutomationController.send('Success'); }," - " reason => {" - " domAutomationController.send(reason.name + ': ' + reason.message);" - " });", - &rejection)); + std::string rejection = + content::EvalJs( + web_contents, + "navigator.bluetooth.requestDevice({filters: [{name: 'Hello'}]})" + " .then(() => 'Success'," + " reason => reason.name + ': ' + reason.message" + " );") + .ExtractString(); EXPECT_THAT(rejection, testing::MatchesRegex("NotFoundError: .*policy.*")); } @@ -452,17 +451,18 @@ // Set the policy to block Sensors. SetDefault(kBlockAll); - std::string rejection; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_contents, - "const sensor = new AmbientLightSensor();" - "sensor.onreading = () => { domAutomationController.send('Success'); };" - "sensor.onerror = (event) => {" - " domAutomationController.send(event.error.name + ': ' + " - "event.error.message);" - "};" - "sensor.start();", - &rejection)); + std::string rejection = + content::EvalJs( + web_contents, + "const sensor = new AmbientLightSensor();" + "new Promise(resolve => {" + " sensor.onreading = () => { resolve('Success'); };" + " sensor.onerror = (event) => {" + " resolve(event.error.name + ': ' + event.error.message);" + " };" + " sensor.start();" + "});") + .ExtractString(); EXPECT_THAT(rejection, testing::MatchesRegex("NotAllowedError: .*Permissions.*")); }
diff --git a/chrome/browser/policy/test/url_blocklist_policy_browsertest.cc b/chrome/browser/policy/test/url_blocklist_policy_browsertest.cc index 811be5f..5162957 100644 --- a/chrome/browser/policy/test/url_blocklist_policy_browsertest.cc +++ b/chrome/browser/policy/test/url_blocklist_policy_browsertest.cc
@@ -208,10 +208,8 @@ // Ensure the blocking page mentions the scheme. content::WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); - std::string result; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - contents, "domAutomationController.send(document.body.textContent);", - &result)); + std::string result = + content::EvalJs(contents, "document.body.textContent;").ExtractString(); EXPECT_THAT(result, testing::HasSubstr("mailto")); } @@ -307,21 +305,15 @@ UpdateProviderPolicy(policies); FlushBlocklistPolicy(); - std::string blocklisted_image_load_result; ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), main_url)); - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), - "window.domAutomationController.send(imageLoadResult)", - &blocklisted_image_load_result)); - EXPECT_EQ("success", blocklisted_image_load_result); + EXPECT_EQ("success", content::EvalJs( + browser()->tab_strip_model()->GetActiveWebContents(), + "imageLoadResult")); - std::string blocklisted_iframe_load_result; ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), main_url)); - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), - "window.domAutomationController.send(iframeLoadResult)", - &blocklisted_iframe_load_result)); - EXPECT_EQ("error", blocklisted_iframe_load_result); + EXPECT_EQ("error", content::EvalJs( + browser()->tab_strip_model()->GetActiveWebContents(), + "iframeLoadResult")); } IN_PROC_BROWSER_TEST_F(UrlBlockingPolicyTest, URLBlocklistClientRedirect) {
diff --git a/chrome/browser/preloading/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc b/chrome/browser/preloading/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc index 88a2547a..8413bac6 100644 --- a/chrome/browser/preloading/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc +++ b/chrome/browser/preloading/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc
@@ -969,10 +969,11 @@ EXPECT_TRUE(WaitForLoadStop( current_browser()->tab_strip_model()->GetActiveWebContents())); - std::string html_content; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - current_browser()->tab_strip_model()->GetActiveWebContents(), - "domAutomationController.send(document.body.innerHTML)", &html_content)); + std::string html_content = + content::EvalJs( + current_browser()->tab_strip_model()->GetActiveWebContents(), + "document.body.innerHTML") + .ExtractString(); // For any cross origin navigation (including prerender), SameSite Strict // cookies should not be sent, but Lax should. @@ -998,10 +999,11 @@ EXPECT_TRUE(WaitForLoadStop( current_browser()->tab_strip_model()->GetActiveWebContents())); - std::string html_content; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - current_browser()->tab_strip_model()->GetActiveWebContents(), - "domAutomationController.send(document.body.innerHTML)", &html_content)); + std::string html_content = + content::EvalJs( + current_browser()->tab_strip_model()->GetActiveWebContents(), + "document.body.innerHTML") + .ExtractString(); // For any same origin navigation (including prerender), SameSite Strict // cookies should not be sent, but Lax should.
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc index 528a8cf..21c7d70 100644 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -234,6 +234,7 @@ #include "chrome/browser/media_galleries/gallery_watch_manager.h" #include "chrome/browser/metrics/desktop_session_duration/desktop_profile_session_durations_service_factory.h" #include "chrome/browser/new_tab_page/modules/drive/drive_service_factory.h" +#include "chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_service_factory.h" #include "chrome/browser/new_tab_page/modules/recipes/recipes_service_factory.h" #include "chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade_factory.h" #include "chrome/browser/profile_resetter/reset_report_uploader_factory.h" @@ -659,6 +660,9 @@ HidConnectionTrackerFactory::GetInstance(); #endif HistoryClustersServiceFactory::EnsureFactoryBuilt(); +#if !BUILDFLAG(IS_ANDROID) + HistoryClustersModuleServiceFactory::GetInstance(); +#endif HistoryServiceFactory::GetInstance(); HistoryUiFaviconRequestHandlerFactory::GetInstance(); HostContentSettingsMapFactory::GetInstance();
diff --git a/chrome/browser/referrer_policy_browsertest.cc b/chrome/browser/referrer_policy_browsertest.cc index f327c33..a3f9ced 100644 --- a/chrome/browser/referrer_policy_browsertest.cc +++ b/chrome/browser/referrer_policy_browsertest.cc
@@ -674,11 +674,7 @@ content::RenderFrameHost* frame = content::FrameMatchingPredicate( tab->GetPrimaryPage(), base::BindRepeating(&content::FrameIsChildOfMainFrame)); - std::string title; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - frame, - "window.domAutomationController.send(document.title)", - &title)); + std::string title = content::EvalJs(frame, "document.title").ExtractString(); EXPECT_EQ("Referrer is " + https_server_.GetURL("/").spec(), title); // Reload the iframe. @@ -699,10 +695,7 @@ base::BindRepeating(&content::FrameIsChildOfMainFrame)); // Verify that the full url of the iframe was used as referrer. - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - frame, - "window.domAutomationController.send(document.title)", - &title)); + title = content::EvalJs(frame, "document.title").ExtractString(); EXPECT_EQ( "Referrer is " + embedded_test_server() ->GetURL("/referrer_policy/referrer-policy-log.html")
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc index 6e03609..bfff8cf 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
@@ -1200,19 +1200,12 @@ // Verify that it's the correct tab. ASSERT_EQ(echoheader, tab->GetLastCommittedURL()); // Verify that the text on the page matches |kCorrectReferrer|. - std::string actual_referrer; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - tab, - "window.domAutomationController.send(window.document.body.textContent);", - &actual_referrer)); - ASSERT_EQ(kCorrectReferrer, actual_referrer); + ASSERT_EQ(kCorrectReferrer, + content::EvalJs(tab, "window.document.body.textContent;")); // Verify that the referrer on the page matches |kCorrectReferrer|. - std::string page_referrer; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - tab, "window.domAutomationController.send(window.document.referrer);", - &page_referrer)); - ASSERT_EQ(kCorrectReferrer, page_referrer); + ASSERT_EQ(kCorrectReferrer, + content::EvalJs(tab, "window.document.referrer;")); } // Verify that "Open Link in Incognito Window " doesn't send referrer URL. @@ -1228,8 +1221,6 @@ // Set up referrer URL with fragment. const GURL kReferrerWithFragment("http://foo.com/test#fragment"); - const std::string kNoneReferrer("None"); - const std::string kEmptyReferrer(""); // Set up menu with link URL. content::ContextMenuParams context_menu_params; @@ -1250,20 +1241,11 @@ // Verify that it's the correct tab. ASSERT_EQ(echoheader, tab->GetLastCommittedURL()); - // Verify that the text on the page matches |kNoneReferrer|. - std::string actual_referrer; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - tab, - "window.domAutomationController.send(window.document.body.textContent);", - &actual_referrer)); - ASSERT_EQ(kNoneReferrer, actual_referrer); + // Verify that the text on the page is "None". + ASSERT_EQ("None", content::EvalJs(tab, "window.document.body.textContent;")); - // Verify that the referrer on the page matches |kEmptyReferrer|. - std::string page_referrer; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - tab, "window.domAutomationController.send(window.document.referrer);", - &page_referrer)); - ASSERT_EQ(kEmptyReferrer, page_referrer); + // Verify that the referrer on the page is "". + ASSERT_EQ("", content::EvalJs(tab, "window.document.referrer;")); } // Check filename on clicking "Save Link As" via a "real" context menu. @@ -1759,21 +1741,10 @@ ASSERT_EQ(echoheader, tab->GetLastCommittedURL()); // Verify that the header text echoed on the page doesn't reveal `kReferrer`. - const std::string kNoneReferrer("None"); - std::string actual_referrer; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - tab, - "window.domAutomationController.send(window.document.body.textContent);", - &actual_referrer)); - ASSERT_EQ(kNoneReferrer, actual_referrer); + ASSERT_EQ("None", content::EvalJs(tab, "window.document.body.textContent;")); // Verify that the javascript referrer is empty. - std::string page_referrer; - const std::string kEmptyReferrer(""); - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - tab, "window.domAutomationController.send(window.document.referrer);", - &page_referrer)); - ASSERT_EQ(kEmptyReferrer, page_referrer); + ASSERT_EQ("", content::EvalJs(tab, "window.document.referrer;")); } #endif // !BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/resources/chromeos/parent_access/parent_access_app.js b/chrome/browser/resources/chromeos/parent_access/parent_access_app.js index cfbae09..082d368 100644 --- a/chrome/browser/resources/chromeos/parent_access/parent_access_app.js +++ b/chrome/browser/resources/chromeos/parent_access/parent_access_app.js
@@ -68,6 +68,7 @@ this.addEventListener('show-authentication-flow', () => { this.switchScreen_(Screens.AUTHENTICATION_FLOW); + getParentAccessUIHandler().onBeforeScreenDone(); }); this.addEventListener('show-error', () => {
diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn index 9fefe083..88deffac0 100644 --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn
@@ -316,6 +316,7 @@ "reset_page/reset_browser_proxy.ts", "route.ts", "router.ts", + "safety_check_page/extensions_safety_check_browser_proxy.ts", "safety_check_page/safety_check_browser_proxy.ts", "search_engines_page/search_engines_browser_proxy.ts", "search_settings.ts",
diff --git a/chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_entry.html b/chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_entry.html index dbdfcf6..c456d7f 100644 --- a/chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_entry.html +++ b/chrome/browser/resources/settings/chromeos/os_printing_page/cups_printers_entry.html
@@ -1,4 +1,8 @@ <style include="settings-shared"> + :host-context(body.jelly-enabled) .list-item:focus-within { + background-color: var(--cros-sys-hover_on_subtle); + } + .icon-more-vert { background-color: none; }
diff --git a/chrome/browser/resources/settings/controls/controlled_button.html b/chrome/browser/resources/settings/controls/controlled_button.html index c96ebef..5ebfd9f 100644 --- a/chrome/browser/resources/settings/controls/controlled_button.html +++ b/chrome/browser/resources/settings/controls/controlled_button.html
@@ -1,4 +1,8 @@ -<style> +<style +<if expr="chromeos_ash"> + include="cros-color-overrides" +</if> +> :host { --justify-margin: 8px; align-items: center;
diff --git a/chrome/browser/resources/settings/controls/controlled_button.ts b/chrome/browser/resources/settings/controls/controlled_button.ts index 6db8482..bef7709 100644 --- a/chrome/browser/resources/settings/controls/controlled_button.ts +++ b/chrome/browser/resources/settings/controls/controlled_button.ts
@@ -5,6 +5,10 @@ import '//resources/cr_elements/cr_button/cr_button.js'; import '//resources/cr_elements/policy/cr_policy_pref_indicator.js'; import '//resources/cr_elements/cr_shared_vars.css.js'; +// <if expr='chromeos_ash'> +import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; + +// </if> import {PolymerElement} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/browser/resources/settings/controls/controlled_radio_button.html b/chrome/browser/resources/settings/controls/controlled_radio_button.html index 0919f68b..b2c2c28 100644 --- a/chrome/browser/resources/settings/controls/controlled_radio_button.html +++ b/chrome/browser/resources/settings/controls/controlled_radio_button.html
@@ -1,4 +1,11 @@ -<style include="cr-radio-button-style"> +<style +<if expr="not chromeos_ash"> + include="cr-radio-button-style" +</if> +<if expr="chromeos_ash"> + include="cr-radio-button-style cros-color-overrides" +</if> +> :host([disabled]) { opacity: 1; }
diff --git a/chrome/browser/resources/settings/controls/controlled_radio_button.ts b/chrome/browser/resources/settings/controls/controlled_radio_button.ts index d017224e..5e8038f 100644 --- a/chrome/browser/resources/settings/controls/controlled_radio_button.ts +++ b/chrome/browser/resources/settings/controls/controlled_radio_button.ts
@@ -5,6 +5,10 @@ import '//resources/cr_elements/cr_radio_button/cr_radio_button_style.css.js'; import '//resources/cr_elements/cr_shared_vars.css.js'; import '//resources/cr_elements/policy/cr_policy_pref_indicator.js'; +// <if expr='chromeos_ash'> +import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; + +// </if> import {CrRadioButtonMixin, CrRadioButtonMixinInterface} from '//resources/cr_elements/cr_radio_button/cr_radio_button_mixin.js'; import {assert} from '//resources/js/assert_ts.js';
diff --git a/chrome/browser/resources/settings/controls/extension_controlled_indicator.html b/chrome/browser/resources/settings/controls/extension_controlled_indicator.html index f22da11..ceed2f23 100644 --- a/chrome/browser/resources/settings/controls/extension_controlled_indicator.html +++ b/chrome/browser/resources/settings/controls/extension_controlled_indicator.html
@@ -1,4 +1,8 @@ -<style> +<style +<if expr="chromeos_ash"> + include="cros-color-overrides" +</if> +> :host { align-items: center; display: flex;
diff --git a/chrome/browser/resources/settings/controls/extension_controlled_indicator.ts b/chrome/browser/resources/settings/controls/extension_controlled_indicator.ts index 1bffc7d..8f606e4 100644 --- a/chrome/browser/resources/settings/controls/extension_controlled_indicator.ts +++ b/chrome/browser/resources/settings/controls/extension_controlled_indicator.ts
@@ -4,6 +4,10 @@ import '//resources/cr_elements/cr_button/cr_button.js'; import '../strings.m.js'; +// <if expr='chromeos_ash'> +import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; + +// </if> import {assert} from '//resources/js/assert_ts.js'; import {loadTimeData} from '//resources/js/load_time_data.js';
diff --git a/chrome/browser/resources/settings/controls/password_prompt_dialog.html b/chrome/browser/resources/settings/controls/password_prompt_dialog.html index 69b3a50..a531552 100644 --- a/chrome/browser/resources/settings/controls/password_prompt_dialog.html +++ b/chrome/browser/resources/settings/controls/password_prompt_dialog.html
@@ -1,4 +1,11 @@ -<style include="cr-shared-style"> +<style +<if expr="not chromeos_ash"> + include="cr-shared-style" +</if> +<if expr="chromeos_ash"> + include="cr-shared-style cros-color-overrides" +</if> +> cr-dialog::part(dialog) { width: 320px; }
diff --git a/chrome/browser/resources/settings/controls/password_prompt_dialog.ts b/chrome/browser/resources/settings/controls/password_prompt_dialog.ts index 025419c..d6f1e05b 100644 --- a/chrome/browser/resources/settings/controls/password_prompt_dialog.ts +++ b/chrome/browser/resources/settings/controls/password_prompt_dialog.ts
@@ -23,6 +23,10 @@ import '//resources/cr_elements/cr_dialog/cr_dialog.js'; import '//resources/cr_elements/cr_input/cr_input.js'; import '//resources/cr_elements/cr_shared_style.css.js'; +// <if expr='chromeos_ash'> +import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; + +// </if> import {CrDialogElement} from '//resources/cr_elements/cr_dialog/cr_dialog.js'; import {CrInputElement} from '//resources/cr_elements/cr_input/cr_input.js';
diff --git a/chrome/browser/resources/settings/controls/settings_checkbox.html b/chrome/browser/resources/settings/controls/settings_checkbox.html index 30ebd87..439dbdf 100644 --- a/chrome/browser/resources/settings/controls/settings_checkbox.html +++ b/chrome/browser/resources/settings/controls/settings_checkbox.html
@@ -1,4 +1,11 @@ -<style include="cr-shared-style"> +<style +<if expr="not chromeos_ash"> + include="cr-shared-style" +</if> +<if expr="chromeos_ash"> + include="cr-shared-style cros-color-overrides" +</if> +> #outerRow { align-items: center; display: flex;
diff --git a/chrome/browser/resources/settings/controls/settings_checkbox.ts b/chrome/browser/resources/settings/controls/settings_checkbox.ts index 611641e..e6943f27 100644 --- a/chrome/browser/resources/settings/controls/settings_checkbox.ts +++ b/chrome/browser/resources/settings/controls/settings_checkbox.ts
@@ -9,6 +9,10 @@ import 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.js'; import 'chrome://resources/cr_elements/cr_shared_style.css.js'; import 'chrome://resources/cr_elements/policy/cr_policy_pref_indicator.js'; +// <if expr='chromeos_ash'> +import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; + +// </if> import {CrCheckboxElement} from 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.js'; import {sanitizeInnerHtml} from 'chrome://resources/js/parse_html_subset.js';
diff --git a/chrome/browser/resources/settings/controls/settings_dropdown_menu.html b/chrome/browser/resources/settings/controls/settings_dropdown_menu.html index 2c07af8..a49997d 100644 --- a/chrome/browser/resources/settings/controls/settings_dropdown_menu.html +++ b/chrome/browser/resources/settings/controls/settings_dropdown_menu.html
@@ -1,4 +1,11 @@ -<style include="md-select"> +<style +<if expr="not chromeos_ash"> + include="md-select" +</if> +<if expr="chromeos_ash"> + include="md-select cros-color-overrides" +</if> +> :host { align-items: center; display: inline-flex;
diff --git a/chrome/browser/resources/settings/controls/settings_dropdown_menu.ts b/chrome/browser/resources/settings/controls/settings_dropdown_menu.ts index 574ffd3..c6883dc 100644 --- a/chrome/browser/resources/settings/controls/settings_dropdown_menu.ts +++ b/chrome/browser/resources/settings/controls/settings_dropdown_menu.ts
@@ -14,6 +14,10 @@ import '//resources/cr_elements/cr_shared_vars.css.js'; import '//resources/cr_elements/md_select.css.js'; import '//resources/cr_elements/policy/cr_policy_pref_indicator.js'; +// <if expr='chromeos_ash'> +import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; + +// </if> import {assert} from '//resources/js/assert_ts.js'; import {microTask, PolymerElement} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/browser/resources/settings/controls/settings_slider.html b/chrome/browser/resources/settings/controls/settings_slider.html index 9a822c4..12df2daf 100644 --- a/chrome/browser/resources/settings/controls/settings_slider.html +++ b/chrome/browser/resources/settings/controls/settings_slider.html
@@ -1,7 +1,7 @@ <style - <if expr='chromeos_ash'> - include="cros-color-overrides" - </if> +<if expr="chromeos_ash"> + include="cros-color-overrides" +</if> > :host { display: inline-flex;
diff --git a/chrome/browser/resources/settings/controls/settings_slider.ts b/chrome/browser/resources/settings/controls/settings_slider.ts index e51367b..554a1af 100644 --- a/chrome/browser/resources/settings/controls/settings_slider.ts +++ b/chrome/browser/resources/settings/controls/settings_slider.ts
@@ -12,7 +12,7 @@ import '//resources/cr_elements/cr_shared_vars.css.js'; import '//resources/cr_elements/cr_slider/cr_slider.js'; // <if expr='chromeos_ash'> -import 'chrome://resources/cr_elements/chromeos/cros_color_overrides.css.js'; +import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; // </if>
diff --git a/chrome/browser/resources/settings/controls/settings_toggle_button.html b/chrome/browser/resources/settings/controls/settings_toggle_button.html index 21d86717..5358825 100644 --- a/chrome/browser/resources/settings/controls/settings_toggle_button.html +++ b/chrome/browser/resources/settings/controls/settings_toggle_button.html
@@ -1,4 +1,11 @@ -<style include="cr-shared-style cr-actionable-row-style iron-flex action-link"> +<style +<if expr="not chromeos_ash"> + include="cr-shared-style cr-actionable-row-style iron-flex action-link" +</if> +<if expr="chromeos_ash"> + include="cr-shared-style cr-actionable-row-style iron-flex action-link cros-color-overrides" +</if> +> :host { --cr-icon-button-margin-end: 20px; padding: 0 var(--cr-section-padding);
diff --git a/chrome/browser/resources/settings/controls/settings_toggle_button.ts b/chrome/browser/resources/settings/controls/settings_toggle_button.ts index d2cac66..a2b508b 100644 --- a/chrome/browser/resources/settings/controls/settings_toggle_button.ts +++ b/chrome/browser/resources/settings/controls/settings_toggle_button.ts
@@ -12,6 +12,10 @@ import '//resources/cr_elements/cr_toggle/cr_toggle.js'; import '//resources/cr_elements/policy/cr_policy_pref_indicator.js'; import '//resources/polymer/v3_0/iron-flex-layout/iron-flex-layout-classes.js'; +// <if expr='chromeos_ash'> +import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; + +// </if> import {CrToggleElement} from '//resources/cr_elements/cr_toggle/cr_toggle.js'; import {PolymerElement} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/browser/resources/settings/safety_check_page/extensions_safety_check_browser_proxy.ts b/chrome/browser/resources/settings/safety_check_page/extensions_safety_check_browser_proxy.ts new file mode 100644 index 0000000..3186c913 --- /dev/null +++ b/chrome/browser/resources/settings/safety_check_page/extensions_safety_check_browser_proxy.ts
@@ -0,0 +1,28 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import {sendWithPromise} from 'chrome://resources/js/cr.js'; + +// Allows the extensions safety check to get to proper display string +// from the `ExtensionsSafetyCheckHandler`. +export interface ExtensionsSafetyCheckBrowserProxy { + getTriggeringExtensions(): Promise<string>; +} + +export class ExtensionsSafetyCheckBrowserProxyImpl implements + ExtensionsSafetyCheckBrowserProxy { + getTriggeringExtensions() { + return sendWithPromise('getExtensionsThatNeedReview'); + } + + static getInstance(): ExtensionsSafetyCheckBrowserProxy { + return instance || (instance = new ExtensionsSafetyCheckBrowserProxyImpl()); + } + + static setInstance(obj: ExtensionsSafetyCheckBrowserProxy) { + instance = obj; + } +} + +let instance: ExtensionsSafetyCheckBrowserProxy|null = null;
diff --git a/chrome/browser/resources/side_panel/bookmarks/power_bookmarks_list.html b/chrome/browser/resources/side_panel/bookmarks/power_bookmarks_list.html index 30fe7e4..91f9b92a 100644 --- a/chrome/browser/resources/side_panel/bookmarks/power_bookmarks_list.html +++ b/chrome/browser/resources/side_panel/bookmarks/power_bookmarks_list.html
@@ -157,12 +157,16 @@ width: 28px; } - :host-context([chrome-refresh-2023]) cr-toolbar-selection-overlay::part(clearIcon) { margin-inline-end: 0; margin-inline-start: -4px; } + + :host-context([chrome-refresh-2023]):host(:not([has-scrollbars_])) + sp-footer:has(cr-toolbar-selection-overlay[show]) { + border-top: solid 1px var(--color-side-panel-edit-footer-border); + } </style> <div class="column" id="powerBookmarksContainer">
diff --git a/chrome/browser/resources/side_panel/bookmarks/power_bookmarks_list.ts b/chrome/browser/resources/side_panel/bookmarks/power_bookmarks_list.ts index f2b7465..122f423 100644 --- a/chrome/browser/resources/side_panel/bookmarks/power_bookmarks_list.ts +++ b/chrome/browser/resources/side_panel/bookmarks/power_bookmarks_list.ts
@@ -75,6 +75,7 @@ export interface PowerBookmarksListElement { $: { + bookmarks: HTMLElement, contextMenu: PowerBookmarksContextMenuElement, deletionToast: CrLazyRenderElement<CrToastElement>, powerBookmarksContainer: HTMLElement, @@ -178,6 +179,13 @@ type: String, value: '', }, + + /* If container containing shown bookmarks has scrollbars. */ + hasScrollbars_: { + type: Boolean, + value: false, + reflectToAttribute: true, + }, }; } @@ -214,6 +222,7 @@ private renamingId_: string; private deletionDescription_: string; private shownBookmarksResizeObserver_?: ResizeObserver; + private hasScrollbars_: boolean; private contextMenuBookmark_: chrome.bookmarks.BookmarkTreeNode|undefined; constructor() { @@ -250,9 +259,8 @@ if (document.documentElement.hasAttribute('chrome-refresh-2023')) { this.shownBookmarksResizeObserver_ = - new ResizeObserver(this.resizeShownBookmarks_.bind(this)); - this.shownBookmarksResizeObserver_.observe( - this.shadowRoot!.querySelector('#bookmarks')!); + new ResizeObserver(this.onShownBookmarksResize_.bind(this)); + this.shownBookmarksResizeObserver_.observe(this.$.bookmarks); } this.recordMetricsOnConnected_(); @@ -1006,11 +1014,14 @@ } } - private resizeShownBookmarks_() { + private onShownBookmarksResize_() { // The iron-list of `shownBookmarks_` is in a dynamically sized card. // Any time the size changes, let iron-list know so that iron-list can // properly adjust to its possibly new height. this.$.shownBookmarksIronList.notifyResize(); + + this.hasScrollbars_ = + this.$.bookmarks.scrollHeight > this.$.bookmarks.offsetHeight; } }
diff --git a/chrome/browser/resources/tab_strip/tab_strip.html b/chrome/browser/resources/tab_strip/tab_strip.html index 91c605c..aa802ee 100644 --- a/chrome/browser/resources/tab_strip/tab_strip.html +++ b/chrome/browser/resources/tab_strip/tab_strip.html
@@ -1,5 +1,6 @@ <!doctype html> -<html dir="$i18n{textdirection}" lang="$i18n{language}"> +<html dir="$i18n{textdirection}" lang="$i18n{language}" + $i18n{chromeRefresh2023Attribute}> <head> <meta charset="utf-8"> <link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> @@ -21,6 +22,10 @@ overflow: hidden; } + html[chrome-refresh-2023] { + --tabstrip-tab-border-radius: 12px; + } + body { background: var(--color-web-ui-tab-strip-background); height: 100%;
diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc index 1110543..b9e9189 100644 --- a/chrome/browser/sessions/session_restore_browsertest.cc +++ b/chrome/browser/sessions/session_restore_browsertest.cc
@@ -502,12 +502,9 @@ // The middle tab only should have visible disposition. for (int i = 0; i < tab_strip_model->count(); ++i) { content::WebContents* contents = tab_strip_model->GetWebContentsAt(i); - std::string document_visibility_state; - const char kGetStateJS[] = - "window.domAutomationController.send(" - "window.document.visibilityState);"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - contents, kGetStateJS, &document_visibility_state)); + const char kGetStateJS[] = "window.document.visibilityState;"; + std::string document_visibility_state = + content::EvalJs(contents, kGetStateJS).ExtractString(); if (i == 1) { EXPECT_EQ("visible", document_visibility_state); } else {
diff --git a/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc b/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc index 2f96ce9..7ad54fb7 100644 --- a/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc +++ b/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc
@@ -55,10 +55,10 @@ browser, gaia_url, WindowOpenDisposition::SINGLETON_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_LOAD_STOP); - std::string inner_text; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser->tab_strip_model()->GetActiveWebContents(), - "domAutomationController.send(document.body.innerText);", &inner_text)); + std::string inner_text = + content::EvalJs(browser->tab_strip_model()->GetActiveWebContents(), + "document.body.innerText;") + .ExtractString(); // /echoheader returns "None" if the header isn't set. inner_text = (inner_text == "None") ? "" : inner_text; EXPECT_EQ(expected_header_value, inner_text);
diff --git a/chrome/browser/site_isolation/chrome_site_per_process_browsertest.cc b/chrome/browser/site_isolation/chrome_site_per_process_browsertest.cc index da9799e..a7c11570 100644 --- a/chrome/browser/site_isolation/chrome_site_per_process_browsertest.cc +++ b/chrome/browser/site_isolation/chrome_site_per_process_browsertest.cc
@@ -206,11 +206,7 @@ // Check that JS storage APIs can be accessed successfully. EXPECT_TRUE( content::ExecuteScript(frame_host, "localStorage['foo'] = 'bar'")); - std::string result; - EXPECT_TRUE(ExecuteScriptAndExtractString( - frame_host, "window.domAutomationController.send(localStorage['foo']);", - &result)); - EXPECT_EQ(result, "bar"); + EXPECT_EQ(content::EvalJs(frame_host, "localStorage['foo'];"), "bar"); bool is_object_created = false; EXPECT_TRUE(ExecuteScriptAndExtractBool( frame_host,
diff --git a/chrome/browser/speech/speech_recognition_browsertest.cc b/chrome/browser/speech/speech_recognition_browsertest.cc index f5e95dd5..244c002a 100644 --- a/chrome/browser/speech/speech_recognition_browsertest.cc +++ b/chrome/browser/speech/speech_recognition_browsertest.cc
@@ -111,8 +111,7 @@ std::u16string success_title(u"PASS"); std::u16string failure_title(u"FAIL"); - const char kRetriveTranscriptScript[] = - "window.domAutomationController.send(window.getFirstTranscript())"; + const char kRetriveTranscriptScript[] = "window.getFirstTranscript()"; const char kExpectedTranscript[] = "Pictures of the moon"; { @@ -122,10 +121,8 @@ content::ExecuteScript(web_contents, "testSpeechRecognition()")); EXPECT_EQ(success_title, title_watcher.WaitAndGetTitle()); - std::string output; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_contents, kRetriveTranscriptScript, &output)); - EXPECT_EQ(kExpectedTranscript, output); + EXPECT_EQ(kExpectedTranscript, + content::EvalJs(web_contents, kRetriveTranscriptScript)); } // Navigating to an https page will force RFH change within @@ -141,10 +138,8 @@ content::ExecuteScript(web_contents, "testSpeechRecognition()")); EXPECT_EQ(success_title, title_watcher.WaitAndGetTitle()); - std::string output; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - web_contents, kRetriveTranscriptScript, &output)); - EXPECT_EQ(kExpectedTranscript, output); + EXPECT_EQ(kExpectedTranscript, + content::EvalJs(web_contents, kRetriveTranscriptScript)); } // Close the tab to so that we see WCO::WebContentsDestroyed().
diff --git a/chrome/browser/ssl/security_state_tab_helper_browsertest.cc b/chrome/browser/ssl/security_state_tab_helper_browsertest.cc index 425aca3..c43772c 100644 --- a/chrome/browser/ssl/security_state_tab_helper_browsertest.cc +++ b/chrome/browser/ssl/security_state_tab_helper_browsertest.cc
@@ -110,14 +110,16 @@ using safe_browsing::RequestOutcome; const char kCreateFilesystemUrlJavascript[] = - "window.webkitRequestFileSystem(window.TEMPORARY, 4096, function(fs) {" - " fs.root.getFile('test.html', {create: true}, function(fileEntry) {" - " fileEntry.createWriter(function(writer) {" - " writer.onwriteend = function(e) {" - " window.domAutomationController.send(fileEntry.toURL());" - " };" - " var blob = new Blob(['<html>hello</html>'], {type: 'text/html'});" - " writer.write(blob);" + "new Promise(resolve => {" + " window.webkitRequestFileSystem(window.TEMPORARY, 4096, function(fs) {" + " fs.root.getFile('test.html', {create: true}, function(fileEntry) {" + " fileEntry.createWriter(function(writer) {" + " writer.onwriteend = function(e) {" + " resolve(fileEntry.toURL());" + " };" + " var blob = new Blob(['<html>hello</html>'], {type: 'text/html'});" + " writer.write(blob);" + " });" " });" " });" "});"; @@ -125,7 +127,7 @@ const char kCreateBlobUrlJavascript[] = "var blob = new Blob(['<html>hello</html>']," " {type: 'text/html'});" - "window.domAutomationController.send(URL.createObjectURL(blob));"; + "URL.createObjectURL(blob);"; enum CertificateStatus { VALID_CERTIFICATE, INVALID_CERTIFICATE }; @@ -330,9 +332,8 @@ "/empty.html"))); // Create a URL and navigate to it. - std::string blob_or_filesystem_url; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - contents, javascript, &blob_or_filesystem_url)); + std::string blob_or_filesystem_url = + content::EvalJs(contents, javascript).ExtractString(); EXPECT_TRUE(GURL(blob_or_filesystem_url).SchemeIs(scheme)); ASSERT_TRUE(
diff --git a/chrome/browser/tab_contents/view_source_browsertest.cc b/chrome/browser/tab_contents/view_source_browsertest.cc index 65bc6fa7..9788c0e 100644 --- a/chrome/browser/tab_contents/view_source_browsertest.cc +++ b/chrome/browser/tab_contents/view_source_browsertest.cc
@@ -312,17 +312,15 @@ view_source_frame->GetSiteInstance()); // Verify the contents of the view-source tab (should match title1.html). - std::string source_text; std::string view_source_extraction_script = R"( output = ""; document.querySelectorAll(".line-content").forEach(function(elem) { output += elem.innerText; }); - domAutomationController.send(output); )"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - view_source_contents, view_source_extraction_script, &source_text)); - EXPECT_EQ("<html><head></head><body>This page has no title.</body></html>", - source_text); + output; )"; + EXPECT_EQ( + "<html><head></head><body>This page has no title.</body></html>", + content::EvalJs(view_source_contents, view_source_extraction_script)); // Verify the title is derived from the subframe URL. GURL original_url = original_child_frame->GetLastCommittedURL(); @@ -367,12 +365,11 @@ EXPECT_EQ(target_url, current_main_frame->GetLastCommittedURL()); // Extract the response nonce. - std::string response_nonce; - std::string response_nonce_extraction_script = R"( - domAutomationController.send( - document.getElementById('response-nonce').innerText); )"; - EXPECT_TRUE(ExecuteScriptAndExtractString( - current_main_frame, response_nonce_extraction_script, &response_nonce)); + std::string response_nonce_extraction_script = + "document.getElementById('response-nonce').innerText;"; + std::string response_nonce = + EvalJs(current_main_frame, response_nonce_extraction_script) + .ExtractString(); // Open view-source mode tab for the main frame. This tries to mimic the // behavior of RenderViewContextMenu::ExecuteCommand when it handles @@ -388,15 +385,15 @@ // 2) the sources should contain the original response-nonce // (i.e. no new network request should be made - the data should be // retrieved from the cache) - std::string source_text; std::string view_source_extraction_script = R"( output = ""; document.querySelectorAll(".line-content").forEach(function(elem) { output += elem.innerText; }); - domAutomationController.send(output); )"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - view_source_contents, view_source_extraction_script, &source_text)); + output; )"; + std::string source_text = + content::EvalJs(view_source_contents, view_source_extraction_script) + .ExtractString(); EXPECT_THAT(source_text, HasSubstr("<h1>Request Body:</h1><pre>text=value</pre>")); EXPECT_THAT(source_text, @@ -551,12 +548,11 @@ EXPECT_EQ(target_url, original_child_frame->GetLastCommittedURL()); // Extract the response nonce. - std::string response_nonce; - std::string response_nonce_extraction_script = R"( - domAutomationController.send( - document.getElementById('response-nonce').innerText); )"; - EXPECT_TRUE(ExecuteScriptAndExtractString( - original_child_frame, response_nonce_extraction_script, &response_nonce)); + std::string response_nonce_extraction_script = + "document.getElementById('response-nonce').innerText;"; + std::string response_nonce = + EvalJs(original_child_frame, response_nonce_extraction_script) + .ExtractString(); // Open view-source mode tab for the subframe. This tries to mimic the // behavior of RenderViewContextMenu::ExecuteCommand when it handles @@ -572,15 +568,15 @@ // 2) the sources should contain the original response-nonce // (i.e. no new network request should be made - the data should be // retrieved from the cache) - std::string source_text; std::string view_source_extraction_script = R"( output = ""; document.querySelectorAll(".line-content").forEach(function(elem) { output += elem.innerText; }); - domAutomationController.send(output); )"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - view_source_contents, view_source_extraction_script, &source_text)); + output; )"; + std::string source_text = + content::EvalJs(view_source_contents, view_source_extraction_script) + .ExtractString(); EXPECT_THAT(source_text, HasSubstr("<h1>Request Body:</h1><pre>text=value</pre>")); EXPECT_THAT(source_text, @@ -729,12 +725,7 @@ EXPECT_TRUE(WaitForLoadStop(new_contents)); // Validate that no referrer was sent. - std::string response_text; - std::string response_text_extraction_script = - "domAutomationController.send(document.body.innerText);"; - EXPECT_TRUE(ExecuteScriptAndExtractString( - new_contents, response_text_extraction_script, &response_text)); - EXPECT_EQ("None", response_text); + EXPECT_EQ("None", EvalJs(new_contents, "document.body.innerText;")); } // Verify that JavaScript URIs are sanitized to about:blank. @@ -746,15 +737,13 @@ ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), url)); // Get the href of the second link in the view-source markup. - std::string link_href; - std::string link_href_extraction_script = R"( - domAutomationController.send( - document.getElementsByTagName('A')[1].href);)"; + std::string link_href_extraction_script = + "document.getElementsByTagName('A')[1].href;"; - EXPECT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), - link_href_extraction_script, &link_href)); - EXPECT_EQ("about:blank", link_href); + EXPECT_EQ( + "about:blank", + content::EvalJs(browser()->tab_strip_model()->GetActiveWebContents(), + link_href_extraction_script)); } // This test verifies that 'view-source' documents are not affected by vertical @@ -766,24 +755,21 @@ var all_features = document.featurePolicy.allowedFeatures(); var vs = all_features.find((f) => f === 'vertical-scroll'); console.log(vs); - domAutomationController.send("" + vs);)"; + "" + vs;)"; // Sanity-check: 'vertical-scroll' is disabled in the actual page (set by the // mock headers). GURL url(embedded_test_server()->GetURL(kTestHtml)); ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), url)); - std::string response; - ASSERT_TRUE(ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), k_verify_feature, - &response)); - EXPECT_EQ("undefined", response); + EXPECT_EQ("undefined", + EvalJs(browser()->tab_strip_model()->GetActiveWebContents(), + k_verify_feature)); // Ensure the policy is enabled in the view-source version. ASSERT_TRUE(ui_test_utils::NavigateToURL( browser(), GURL(content::kViewSourceScheme + std::string(":") + url.spec()))); - ASSERT_TRUE(ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), k_verify_feature, - &response)); - EXPECT_EQ("vertical-scroll", response); + EXPECT_EQ("vertical-scroll", + EvalJs(browser()->tab_strip_model()->GetActiveWebContents(), + k_verify_feature)); } namespace {
diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc index dd74e02..fb97ae97 100644 --- a/chrome/browser/task_manager/task_manager_browsertest.cc +++ b/chrome/browser/task_manager/task_manager_browsertest.cc
@@ -636,15 +636,16 @@ " 'postMessage(\"okay\");']);\n" "blobURL = window.URL.createObjectURL(blob);\n" "var worker = new Worker(blobURL);\n" - "worker.addEventListener('message', function(e) {\n" - " window.domAutomationController.send(e.data);\n" // e.data == "okay" - "});\n" - "worker.postMessage('go');\n", + "new Promise(resolve => {\n" + " worker.addEventListener('message', function(e) {\n" + " resolve(e.data);\n" // e.data == "okay" + " });\n" + " worker.postMessage('go');\n" + "});\n", static_cast<unsigned long>(minimal_heap_size)); - std::string ok; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), test_js, &ok)); - ASSERT_EQ("okay", ok); + ASSERT_EQ("okay", + content::EvalJs( + browser()->tab_strip_model()->GetActiveWebContents(), test_js)); // The worker has allocated objects of at least |minimal_heap_size| bytes. // Wait for the heap stats to reflect this. @@ -670,12 +671,12 @@ "mem = new Array(%lu);\n" "for (var i = 0; i < mem.length; i += 16)\n" " mem[i] = i;\n" - "window.domAutomationController.send(\"okay\");\n", + "\"okay\";\n", static_cast<unsigned long>(minimal_heap_size)); std::string ok; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), test_js, &ok)); - ASSERT_EQ("okay", ok); + ASSERT_EQ("okay", + content::EvalJs( + browser()->tab_strip_model()->GetActiveWebContents(), test_js)); model()->ToggleColumnVisibility(ColumnSpecifier::V8_MEMORY); @@ -805,19 +806,18 @@ ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GetTestURL())); std::string test_js = - "function myWait() {\n" - " setTimeout(function() { myWait(); }, 1)\n" - "}\n" - "myWait();\n" - "window.domAutomationController.send(\"okay\");\n"; + "function myWait() {\n" + " setTimeout(function() { myWait(); }, 1)\n" + "}\n" + "myWait();\n" + "\"okay\";\n"; - std::string ok; - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - browser()->tab_strip_model()->GetActiveWebContents(), test_js, &ok)); - ASSERT_EQ("okay", ok); + ASSERT_EQ("okay", + content::EvalJs( + browser()->tab_strip_model()->GetActiveWebContents(), test_js)); -// The script above should trigger a lot of idle wakeups - up to 1000 per -// second. Let's make sure we get at least 100 (in case the test runs slow). + // The script above should trigger a lot of idle wakeups - up to 1000 per + // second. Let's make sure we get at least 100 (in case the test runs slow). const int kMinExpectedWakeCount = 100; ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerStatToExceed( MatchTab("title1.html"), ColumnSpecifier::IDLE_WAKEUPS,
diff --git a/chrome/browser/touch_to_fill/payments/android/internal/java/res/layout/touch_to_fill_credit_card_sheet_item.xml b/chrome/browser/touch_to_fill/payments/android/internal/java/res/layout/touch_to_fill_credit_card_sheet_item.xml index a81f5c4..4692d9a 100644 --- a/chrome/browser/touch_to_fill/payments/android/internal/java/res/layout/touch_to_fill_credit_card_sheet_item.xml +++ b/chrome/browser/touch_to_fill/payments/android/internal/java/res/layout/touch_to_fill_credit_card_sheet_item.xml
@@ -34,7 +34,7 @@ android:layout_height="wrap_content" android:orientation="horizontal"> <TextView - android:id="@+id/card_name" + android:id="@+id/touch_to_fill_card_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="end" @@ -42,7 +42,7 @@ android:layout_marginEnd="4dp" android:textAppearance="@style/TextAppearance.TextMedium.Primary" /> <TextView - android:id="@+id/card_number" + android:id="@+id/touch_to_fill_card_number" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1"
diff --git a/chrome/browser/touch_to_fill/payments/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/payments/TouchToFillCreditCardViewBinder.java b/chrome/browser/touch_to_fill/payments/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/payments/TouchToFillCreditCardViewBinder.java index 6aa3745f..d24ee85 100644 --- a/chrome/browser/touch_to_fill/payments/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/payments/TouchToFillCreditCardViewBinder.java +++ b/chrome/browser/touch_to_fill/payments/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/payments/TouchToFillCreditCardViewBinder.java
@@ -72,7 +72,7 @@ /** Binds the item view to the model properties. */ static void bindCardItemView(PropertyModel model, View view, PropertyKey propertyKey) { - TextView cardName = view.findViewById(R.id.card_name); + TextView cardName = view.findViewById(R.id.touch_to_fill_card_name); if (propertyKey == CARD_ICON_ID) { ImageView icon = view.findViewById(R.id.favicon); int iconId = model.get(CARD_ICON_ID); @@ -89,7 +89,7 @@ } else if (propertyKey == CARD_NAME) { cardName.setText(model.get(CARD_NAME)); } else if (propertyKey == CARD_NUMBER) { - TextView cardNumber = view.findViewById(R.id.card_number); + TextView cardNumber = view.findViewById(R.id.touch_to_fill_card_number); cardNumber.setText(model.get(CARD_NUMBER)); } else if (propertyKey == CARD_EXPIRATION) { TextView expirationDate = view.findViewById(R.id.description_line_2);
diff --git a/chrome/browser/touch_to_fill/payments/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/payments/TouchToFillCreditCardViewTest.java b/chrome/browser/touch_to_fill/payments/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/payments/TouchToFillCreditCardViewTest.java index a622b4a..8e81ac4 100644 --- a/chrome/browser/touch_to_fill/payments/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/payments/TouchToFillCreditCardViewTest.java +++ b/chrome/browser/touch_to_fill/payments/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/payments/TouchToFillCreditCardViewTest.java
@@ -232,8 +232,8 @@ }); BottomSheetTestSupport.waitForOpen(mBottomSheetController); - TextView cardName = - mTouchToFillCreditCardView.getContentView().findViewById(R.id.card_name); + TextView cardName = mTouchToFillCreditCardView.getContentView().findViewById( + R.id.touch_to_fill_card_name); assertTrue(cardName.getContentDescription().toString().equals("Best Card visa")); } @@ -247,8 +247,8 @@ }); BottomSheetTestSupport.waitForOpen(mBottomSheetController); - TextView cardName = - mTouchToFillCreditCardView.getContentView().findViewById(R.id.card_name); + TextView cardName = mTouchToFillCreditCardView.getContentView().findViewById( + R.id.touch_to_fill_card_name); assertEquals(cardName.getContentDescription(), null); } @@ -257,11 +257,11 @@ } private TextView getCreditCardNameAt(int index) { - return getCreditCards().getChildAt(index).findViewById(R.id.card_name); + return getCreditCards().getChildAt(index).findViewById(R.id.touch_to_fill_card_name); } private TextView getCreditCardNumberAt(int index) { - return getCreditCards().getChildAt(index).findViewById(R.id.card_number); + return getCreditCards().getChildAt(index).findViewById(R.id.touch_to_fill_card_number); } private TextView getCreditCardExpirationAt(int index) {
diff --git a/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl_unittest.cc b/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl_unittest.cc index cac6c22..126cca72 100644 --- a/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl_unittest.cc +++ b/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl_unittest.cc
@@ -53,7 +53,7 @@ (const autofill::FormData&, const autofill::FormFieldData&, const autofill::AutofillManager&), - (override)); + (const override)); MOCK_METHOD(bool, IsNotShownYet, (), (const, override)); };
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 70f5e3b1..ec9f36b 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -1635,6 +1635,8 @@ "webui/settings/custom_home_pages_table_model.h", "webui/settings/downloads_handler.cc", "webui/settings/downloads_handler.h", + "webui/settings/extensions_safety_check_handler.cc", + "webui/settings/extensions_safety_check_handler.h", "webui/settings/font_handler.cc", "webui/settings/font_handler.h", "webui/settings/hats_handler.cc", @@ -6264,6 +6266,7 @@ "webui/settings/ash/fake_os_settings_sections.h", ] deps += [ + "//ash", "//ash/public/cpp", "//ash/public/mojom", "//chrome/browser/ui/webui/settings/chromeos/constants:mojom",
diff --git a/chrome/browser/ui/ash/test_wallpaper_controller.cc b/chrome/browser/ui/ash/test_wallpaper_controller.cc index de1d3c3..1e09a2b9 100644 --- a/chrome/browser/ui/ash/test_wallpaper_controller.cc +++ b/chrome/browser/ui/ash/test_wallpaper_controller.cc
@@ -9,6 +9,7 @@ #include "ash/public/cpp/wallpaper/wallpaper_controller_observer.h" #include "ash/public/cpp/wallpaper/wallpaper_drivefs_delegate.h" #include "ash/public/cpp/wallpaper/wallpaper_types.h" +#include "ash/wallpaper/wallpaper_drag_drop_delegate.h" #include "base/containers/adapters.h" #include "base/notreached.h" #include "base/ranges/algorithm.h" @@ -50,6 +51,15 @@ was_client_set_ = true; } +ash::WallpaperDragDropDelegate* TestWallpaperController::GetDragDropDelegate() { + return nullptr; +} + +void TestWallpaperController::SetDragDropDelegate( + std::unique_ptr<ash::WallpaperDragDropDelegate> delegate) { + NOTIMPLEMENTED_LOG_ONCE(); +} + void TestWallpaperController::SetDriveFsDelegate( std::unique_ptr<ash::WallpaperDriveFsDelegate> drivefs_delegate) { NOTIMPLEMENTED_LOG_ONCE();
diff --git a/chrome/browser/ui/ash/test_wallpaper_controller.h b/chrome/browser/ui/ash/test_wallpaper_controller.h index 627950d..1088aab5 100644 --- a/chrome/browser/ui/ash/test_wallpaper_controller.h +++ b/chrome/browser/ui/ash/test_wallpaper_controller.h
@@ -90,6 +90,9 @@ // ash::WallpaperController: void SetClient(ash::WallpaperControllerClient* client) override; + ash::WallpaperDragDropDelegate* GetDragDropDelegate() override; + void SetDragDropDelegate( + std::unique_ptr<ash::WallpaperDragDropDelegate> delegate) override; void SetDriveFsDelegate( std::unique_ptr<ash::WallpaperDriveFsDelegate> drivefs_delegate) override; void Init(const base::FilePath& user_data,
diff --git a/chrome/browser/ui/color/chrome_color_id.h b/chrome/browser/ui/color/chrome_color_id.h index a4bc5a6..9f2a08a6 100644 --- a/chrome/browser/ui/color/chrome_color_id.h +++ b/chrome/browser/ui/color/chrome_color_id.h
@@ -329,6 +329,7 @@ E_CPONLY(kColorSidePanelCardBackground) \ E_CPONLY(kColorSidePanelContentAreaSeparator) \ E_CPONLY(kColorSidePanelContentBackground) \ + E_CPONLY(kColorSidePanelEditFooterBorder) \ E_CPONLY(kColorSidePanelFilterChipBorder) \ E_CPONLY(kColorSidePanelFilterChipForeground) \ E_CPONLY(kColorSidePanelFilterChipForegroundSelected) \
diff --git a/chrome/browser/ui/color/chrome_color_mixer.cc b/chrome/browser/ui/color/chrome_color_mixer.cc index d22c3e78..28fcb4e 100644 --- a/chrome/browser/ui/color/chrome_color_mixer.cc +++ b/chrome/browser/ui/color/chrome_color_mixer.cc
@@ -691,7 +691,8 @@ ui::SetAlpha(kColorToolbarInkDrop, kToolbarInkDropHighlightVisibleAlpha); mixer[kColorToolbarInkDropRipple] = ui::SetAlpha(kColorToolbarInkDrop, std::ceil(0.06f * 255.0f)); - mixer[kColorToolbarExtensionSeparatorEnabled] = {kColorToolbarButtonIcon}; + mixer[kColorToolbarExtensionSeparatorEnabled] = { + kColorTabBackgroundInactiveFrameActive}; mixer[kColorToolbarExtensionSeparatorDisabled] = { kColorToolbarButtonIconInactive}; mixer[kColorToolbarSeparator] = {kColorToolbarSeparatorDefault};
diff --git a/chrome/browser/ui/color/material_chrome_color_mixer.cc b/chrome/browser/ui/color/material_chrome_color_mixer.cc index 025f529..6626237 100644 --- a/chrome/browser/ui/color/material_chrome_color_mixer.cc +++ b/chrome/browser/ui/color/material_chrome_color_mixer.cc
@@ -98,7 +98,7 @@ mixer[kColorToolbarFeaturePromoHighlight] = {ui::kColorSysPrimary}; mixer[kColorToolbarInkDropHover] = {ui::kColorSysStateHoverOnSubtle}; mixer[kColorToolbarInkDropRipple] = {ui::kColorSysStateRippleNeutralOnSubtle}; - mixer[kColorToolbarExtensionSeparatorEnabled] = {ui::kColorSysSurfaceVariant}; + mixer[kColorToolbarExtensionSeparatorEnabled] = {ui::kColorSysOnBaseDivider}; mixer[kColorToolbarExtensionSeparatorDisabled] = { kColorToolbarButtonIconInactive}; mixer[kColorToolbarSeparator] = {kColorToolbarSeparatorDefault};
diff --git a/chrome/browser/ui/color/material_side_panel_color_mixer.cc b/chrome/browser/ui/color/material_side_panel_color_mixer.cc index ffa25c9f5..7a0615d9 100644 --- a/chrome/browser/ui/color/material_side_panel_color_mixer.cc +++ b/chrome/browser/ui/color/material_side_panel_color_mixer.cc
@@ -24,6 +24,8 @@ mixer[kColorSidePanelBadgeForegroundUpdated] = { ui::kColorSysOnTertiaryContainer}; + mixer[kColorSidePanelEditFooterBorder] = {ui::kColorSysTonalOutline}; + mixer[kColorSidePanelFilterChipBorder] = {ui::kColorSysTonalOutline}; mixer[kColorSidePanelFilterChipForeground] = {ui::kColorSysOnSurface}; mixer[kColorSidePanelFilterChipForegroundSelected] = {
diff --git a/chrome/browser/ui/views/accessibility/caption_bubble_controller_views_browsertest.cc b/chrome/browser/ui/views/accessibility/caption_bubble_controller_views_browsertest.cc index c08bf7e..44c444d 100644 --- a/chrome/browser/ui/views/accessibility/caption_bubble_controller_views_browsertest.cc +++ b/chrome/browser/ui/views/accessibility/caption_bubble_controller_views_browsertest.cc
@@ -7,6 +7,7 @@ #include "base/functional/callback_forward.h" #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" +#include "base/test/scoped_feature_list.h" #include "base/test/scoped_mock_time_message_loop_task_runner.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -25,6 +26,7 @@ #include "components/prefs/pref_service.h" #include "content/public/browser/browser_accessibility_state.h" #include "content/public/test/browser_test.h" +#include "media/base/media_switches.h" #include "media/mojo/mojom/speech_recognition_service.mojom.h" #include "ui/base/buildflags.h" #include "ui/events/base_event_utils.h" @@ -45,7 +47,10 @@ class CaptionBubbleControllerViewsTest : public InProcessBrowserTest { public: - CaptionBubbleControllerViewsTest() = default; + CaptionBubbleControllerViewsTest() { + scoped_feature_list_.InitAndEnableFeature(media::kLiveTranslate); + } + ~CaptionBubbleControllerViewsTest() override = default; CaptionBubbleControllerViewsTest(const CaptionBubbleControllerViewsTest&) = delete; @@ -55,7 +60,7 @@ CaptionBubbleControllerViews* GetController() { if (!controller_) { controller_ = std::make_unique<CaptionBubbleControllerViews>( - browser()->profile()->GetPrefs()); + browser()->profile()->GetPrefs(), "en-US" /* application_locale */); } return controller_.get(); } @@ -77,6 +82,12 @@ : nullptr; } + views::StyledLabel* GetLiveTranslateLabel() { + return controller_ + ? controller_->caption_bubble_->GetLiveTranslateLabelForTesting() + : nullptr; + } + views::Label* GetTitle() { return controller_ ? controller_->caption_bubble_->title_.get() : nullptr; } @@ -263,6 +274,7 @@ } private: + base::test::ScopedFeatureList scoped_feature_list_; std::unique_ptr<CaptionBubbleControllerViews> controller_; std::unique_ptr<CaptionBubbleContext> caption_bubble_context_; }; @@ -1238,4 +1250,41 @@ EXPECT_EQ("", GetLabelText()); } +IN_PROC_BROWSER_TEST_F(CaptionBubbleControllerViewsTest, LiveTranslateLabel) { + int line_height = 18; + + browser()->profile()->GetPrefs()->SetBoolean(prefs::kLiveTranslateEnabled, + false); + browser()->profile()->GetPrefs()->SetString( + prefs::kLiveTranslateTargetLanguageCode, "en"); + browser()->profile()->GetPrefs()->SetString(prefs::kLiveCaptionLanguageCode, + "fr"); + + OnPartialTranscription("Penguins' feet change colors as they get older."); + EXPECT_TRUE(IsWidgetVisible()); + ASSERT_FALSE(GetLiveTranslateLabel()->GetVisible()); + + browser()->profile()->GetPrefs()->SetBoolean(prefs::kLiveTranslateEnabled, + true); + OnPartialTranscription( + "Sea otters can hold their breath for over 5 minutes."); + ASSERT_TRUE(GetLiveTranslateLabel()->GetVisible()); + EXPECT_EQ("Translating French to English", + base::UTF16ToUTF8(GetLiveTranslateLabel()->GetText())); + EXPECT_EQ(line_height, GetLiveTranslateLabel()->GetLineHeight()); + + ui::CaptionStyle caption_style; + caption_style.text_size = "200%"; + GetController()->UpdateCaptionStyle(caption_style); + EXPECT_EQ(line_height * 2, GetLiveTranslateLabel()->GetLineHeight()); + caption_style.text_size = "50%"; + GetController()->UpdateCaptionStyle(caption_style); + EXPECT_EQ(line_height / 2, GetLiveTranslateLabel()->GetLineHeight()); + + // Disabling Live Translate should hide the Live Translate label. + browser()->profile()->GetPrefs()->SetBoolean(prefs::kLiveTranslateEnabled, + false); + ASSERT_FALSE(GetLiveTranslateLabel()->GetVisible()); +} + } // namespace captions
diff --git a/chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_button.cc b/chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_button.cc index abb9bd9..e57525e 100644 --- a/chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_button.cc +++ b/chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_button.cc
@@ -185,10 +185,6 @@ void SavedTabGroupButton::UpdateButtonLayout() { if (GetText().empty()) { // When the text is empty force the button to have square dimensions. - // Likewise, we already have a constant that denotes the standard button - // height for all elements in the bookmarks bar. As such, we will use - // this constant for the width of the button to create a square that will - // comfortably fit in the bookmarks bar. SetPreferredSize(gfx::Size(kButtonSize, kButtonSize)); } else { SetPreferredSize(CalculatePreferredSize()); @@ -197,7 +193,6 @@ // Relies on logic in theme_helper.cc to determine dark/light palette. ui::ColorId text_and_outline_color = GetTabGroupDialogColorId(tab_group_color_id_); - ui::ColorId background_color = GetTabGroupBookmarkColorId(tab_group_color_id_); @@ -227,18 +222,7 @@ void SavedTabGroupButton::OnThemeChanged() { views::MenuButton::OnThemeChanged(); - - // We don't always have a theme provider (ui tests, for example). - SkColor text_color = gfx::kPlaceholderColor; - const ui::ColorProvider* const cp = GetColorProvider(); - if (cp) { - SkColor background_color = - cp->GetColor(GetTabGroupBookmarkColorId(tab_group_color_id_)); - text_color = cp->GetColor(GetTabGroupDialogColorId(tab_group_color_id_)); - text_color = color_utils::PickGoogleColor( - text_color, background_color, - color_utils::kMinimumReadableContrastRatio); - } + UpdateButtonLayout(); } void SavedTabGroupButton::WriteDragDataForView(View* sender,
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index bb1577b..3c0d1197 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1507,7 +1507,7 @@ ui::ImageModel LocationBarView::GetLocationIcon( LocationIconView::Delegate::IconFetchedCallback on_icon_fetched) const { bool dark_mode = false; - if (features::IsChromeRefresh2023()) { + if (OmniboxFieldTrial::IsChromeRefreshIconsEnabled()) { if (location_icon_view_ && location_icon_view_->GetBackground()) { dark_mode = color_utils::IsDark( location_icon_view_->GetBackground()->get_color());
diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.cc b/chrome/browser/ui/views/location_bar/location_icon_view.cc index e1ecf8a..e36e99e40 100644 --- a/chrome/browser/ui/views/location_bar/location_icon_view.cc +++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc
@@ -76,8 +76,11 @@ views::InkDrop::Get(this)->SetLayerRegion(views::LayerRegion::kAbove); views::InkDrop::Get(this)->SetCreateRippleCallback(base::BindRepeating( [](views::View* host) -> std::unique_ptr<views::InkDropRipple> { + const auto* color_provider = host->GetColorProvider(); const SkColor pressed_color = - host->GetColorProvider()->GetColor(kColorPageInfoIconPressed); + color_provider + ? color_provider->GetColor(kColorPageInfoIconPressed) + : gfx::kPlaceholderColor; const float pressed_alpha = SkColorGetA(pressed_color); return std::make_unique<views::FloodFillInkDropRipple>( @@ -90,8 +93,10 @@ views::InkDrop::Get(this)->SetCreateHighlightCallback(base::BindRepeating( [](views::View* host) { + const auto* color_provider = host->GetColorProvider(); const SkColor hover_color = - host->GetColorProvider()->GetColor(kColorPageInfoIconHover); + color_provider ? color_provider->GetColor(kColorPageInfoIconHover) + : gfx::kPlaceholderColor; const float hover_alpha = SkColorGetA(hover_color); auto ink_drop_highlight = std::make_unique<views::InkDropHighlight>(
diff --git a/chrome/browser/ui/views/page_action/page_action_icon_view.cc b/chrome/browser/ui/views/page_action/page_action_icon_view.cc index 5d05eff7..956ff1e 100644 --- a/chrome/browser/ui/views/page_action/page_action_icon_view.cc +++ b/chrome/browser/ui/views/page_action/page_action_icon_view.cc
@@ -88,8 +88,11 @@ views::InkDrop::Get(this)->SetLayerRegion(views::LayerRegion::kAbove); views::InkDrop::Get(this)->SetCreateRippleCallback(base::BindRepeating( [](views::View* host) -> std::unique_ptr<views::InkDropRipple> { + const auto* color_provider = host->GetColorProvider(); const SkColor pressed_color = - host->GetColorProvider()->GetColor(kColorPageActionIconPressed); + color_provider + ? color_provider->GetColor(kColorPageActionIconPressed) + : gfx::kPlaceholderColor; const float pressed_alpha = SkColorGetA(pressed_color); return std::make_unique<views::FloodFillInkDropRipple>( views::InkDrop::Get(host), host->size(), @@ -101,8 +104,11 @@ views::InkDrop::Get(this)->SetCreateHighlightCallback(base::BindRepeating( [](views::View* host) { + const auto* color_provider = host->GetColorProvider(); const SkColor hover_color = - host->GetColorProvider()->GetColor(kColorPageActionIconHover); + color_provider + ? color_provider->GetColor(kColorPageActionIconHover) + : gfx::kPlaceholderColor; const float hover_alpha = SkColorGetA(hover_color); auto ink_drop_highlight = std::make_unique<views::InkDropHighlight>( host->size(), host->height() / 2,
diff --git a/chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc b/chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc index 04a009c..2c059e1 100644 --- a/chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc +++ b/chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc
@@ -987,8 +987,10 @@ } #endif // !BUILDFLAG(IS_CHROMEOS_LACROS) -// TODO(crbug.com/1289326) Test is flaky on Linux CFI -#if BUILDFLAG(CFI_ICALL_CHECK) && BUILDFLAG(IS_LINUX) +// TODO(crbug.com/1289326) Test is flaky on Linux CFI, Linux dbg, Mac ASan +#if ((BUILDFLAG(CFI_ICALL_CHECK) || !defined(NDEBUG)) && \ + BUILDFLAG(IS_LINUX)) || \ + (BUILDFLAG(IS_MAC) && defined(ADDRESS_SANITIZER)) #define MAYBE_CreateSignedInProfileSettings \ DISABLED_CreateSignedInProfileSettings #else @@ -1415,8 +1417,10 @@ metrics::StartupProfilingFinishReason::kDone, 1); } -// TODO(crbug.com/1289326) Test is flaky on Linux CFI -#if BUILDFLAG(CFI_ICALL_CHECK) && BUILDFLAG(IS_LINUX) +// TODO(crbug.com/1289326) Test is flaky on Linux CFI, Linux dbg, Mac ASan +#if ((BUILDFLAG(CFI_ICALL_CHECK) || !defined(NDEBUG)) && \ + BUILDFLAG(IS_LINUX)) || \ + (BUILDFLAG(IS_MAC) && defined(ADDRESS_SANITIZER)) #define MAYBE_OpenProfile_Settings DISABLED_OpenProfile_Settings #else #define MAYBE_OpenProfile_Settings OpenProfile_Settings
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_font_combobox.cc b/chrome/browser/ui/views/side_panel/read_anything/read_anything_font_combobox.cc index 4d1a565..9e9b3ee4f 100644 --- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_font_combobox.cc +++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_font_combobox.cc
@@ -51,6 +51,7 @@ SetBorderColorId(ui::kColorSidePanelComboboxBorder); SetMenuModel(std::move(new_model)); + SetFocusBehavior(FocusBehavior::ALWAYS); } void ReadAnythingFontCombobox::GetAccessibleNodeData(
diff --git a/chrome/browser/ui/webui/ash/parent_access/parent_access_metrics_utils.cc b/chrome/browser/ui/webui/ash/parent_access/parent_access_metrics_utils.cc index 8d12bc3..2b2faee 100644 --- a/chrome/browser/ui/webui/ash/parent_access/parent_access_metrics_utils.cc +++ b/chrome/browser/ui/webui/ash/parent_access/parent_access_metrics_utils.cc
@@ -9,6 +9,7 @@ namespace { constexpr char kParentAccessSuffixAll[] = "All"; +constexpr char kParentAccessSuffixExtensionApprovals[] = "ExtensionApprovals"; constexpr char kParentAccessSuffixWebApprovals[] = "WebApprovals"; } // namespace @@ -28,8 +29,9 @@ separator); case parent_access_ui::mojom::ParentAccessParams::FlowType:: kExtensionAccess: - // TODO(b/262451256): Implement metrics for extension flow. - return std::string(); + return base::JoinString( + {parent_access_histogram_base, kParentAccessSuffixExtensionApprovals}, + separator); } } } // namespace parent_access
diff --git a/chrome/browser/ui/webui/ash/parent_access/parent_access_state_tracker.cc b/chrome/browser/ui/webui/ash/parent_access/parent_access_state_tracker.cc index 3f69725..f93ec29d 100644 --- a/chrome/browser/ui/webui/ash/parent_access/parent_access_state_tracker.cc +++ b/chrome/browser/ui/webui/ash/parent_access/parent_access_state_tracker.cc
@@ -8,11 +8,25 @@ #include "chrome/browser/ui/webui/ash/parent_access/parent_access_metrics_utils.h" #include "third_party/abseil-cpp/absl/types/optional.h" +namespace { +bool IsDisabledStateAllowed( + parent_access_ui::mojom::ParentAccessParams::FlowType flow_type) { + return flow_type == parent_access_ui::mojom::ParentAccessParams::FlowType:: + kExtensionAccess; +} +} // namespace + namespace ash { ParentAccessStateTracker::ParentAccessStateTracker( - parent_access_ui::mojom::ParentAccessParams::FlowType flow_type) + parent_access_ui::mojom::ParentAccessParams::FlowType flow_type, + bool is_disabled) : flow_type_(flow_type) { + if (is_disabled) { + CHECK(IsDisabledStateAllowed(flow_type_)); + flow_result_ = FlowResult::kRequestsDisabled; + return; + } switch (flow_type_) { case parent_access_ui::mojom::ParentAccessParams::FlowType::kWebsiteAccess: // Initialize flow result to kParentAuthentication for flows without an @@ -31,19 +45,10 @@ parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessFlowResultHistogramBase, absl::nullopt), flow_result_, FlowResult::kNumStates); - - switch (flow_type_) { - case parent_access_ui::mojom::ParentAccessParams::FlowType::kWebsiteAccess: - base::UmaHistogramEnumeration( - parent_access::GetHistogramTitleForFlowType( - parent_access::kParentAccessFlowResultHistogramBase, flow_type_), - flow_result_, FlowResult::kNumStates); - break; - case parent_access_ui::mojom::ParentAccessParams::FlowType:: - kExtensionAccess: - // TODO(b/262451256): Implement metrics for extension flow. - break; - } + base::UmaHistogramEnumeration( + parent_access::GetHistogramTitleForFlowType( + parent_access::kParentAccessFlowResultHistogramBase, flow_type_), + flow_result_, FlowResult::kNumStates); } void ParentAccessStateTracker::OnWebUiStateChanged(FlowResult result) {
diff --git a/chrome/browser/ui/webui/ash/parent_access/parent_access_state_tracker.h b/chrome/browser/ui/webui/ash/parent_access/parent_access_state_tracker.h index d7c7e6ca..63bb96f 100644 --- a/chrome/browser/ui/webui/ash/parent_access/parent_access_state_tracker.h +++ b/chrome/browser/ui/webui/ash/parent_access/parent_access_state_tracker.h
@@ -29,11 +29,17 @@ kAccessDeclined = 4, // State where the error page is shown. kError = 5, - kNumStates = 6 + // State where parent has disabled permission requests. + kRequestsDisabled = 6, + kNumStates = 7 }; + // `flow_type` indicates which Parent Access flow type is being shown. + // `is_disabled` indicates if requests have been disabled by a parent. These + // parameters are used to determine the initial state of the flow. explicit ParentAccessStateTracker( - parent_access_ui::mojom::ParentAccessParams::FlowType flow_type); + parent_access_ui::mojom::ParentAccessParams::FlowType flow_type, + bool is_disabled); ParentAccessStateTracker(const ParentAccessStateTracker&) = delete; ParentAccessStateTracker& operator=(const ParentAccessStateTracker&) = delete; ~ParentAccessStateTracker();
diff --git a/chrome/browser/ui/webui/ash/parent_access/parent_access_ui.mojom b/chrome/browser/ui/webui/ash/parent_access/parent_access_ui.mojom index a746e75..61e893c7 100644 --- a/chrome/browser/ui/webui/ash/parent_access/parent_access_ui.mojom +++ b/chrome/browser/ui/webui/ash/parent_access/parent_access_ui.mojom
@@ -125,4 +125,8 @@ // When called, indicates that that the request has completed with the // specified result, which will cause the Parent Access UI to close. OnParentAccessDone(ParentAccessResult result) => (); + + // Called when the UI has switched from the before screen to the + // ParentAuthentication screen. + OnBeforeScreenDone() => (); };
diff --git a/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl.cc b/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl.cc index 804fc034..3bd4854 100644 --- a/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl.cc +++ b/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl.cc
@@ -83,8 +83,8 @@ // ParentAccess state is only tracked when a dialog is created. i.e. not when // chrome://parent-access is directly accessed. if (delegate_) { - state_tracker_ = - std::make_unique<ParentAccessStateTracker>(params_->flow_type); + state_tracker_ = std::make_unique<ParentAccessStateTracker>( + params_->flow_type, params_->is_disabled); } } @@ -235,6 +235,15 @@ std::move(callback).Run(result.spec()); } +void ParentAccessUIHandlerImpl::OnBeforeScreenDone( + OnBeforeScreenDoneCallback callback) { + if (state_tracker_) { + state_tracker_->OnWebUiStateChanged( + ParentAccessStateTracker::FlowResult::kParentAuthentication); + } + std::move(callback).Run(); +} + const kids::platform::parentaccess::client::proto::ParentAccessToken* ParentAccessUIHandlerImpl::GetParentAccessTokenForTest() { return parent_access_token_.get();
diff --git a/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl.h b/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl.h index 1895b203..ccd899f 100644 --- a/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl.h +++ b/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl.h
@@ -59,6 +59,7 @@ void OnParentAccessDone(parent_access_ui::mojom::ParentAccessResult result, OnParentAccessDoneCallback callback) override; void GetParentAccessURL(GetParentAccessURLCallback callback) override; + void OnBeforeScreenDone(OnBeforeScreenDoneCallback callback) override; // Returns nullptr if the parent was not verified. const kids::platform::parentaccess::client::proto::ParentAccessToken*
diff --git a/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl_unittest.cc b/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl_unittest.cc index 188e7e1..ce80014 100644 --- a/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl_unittest.cc +++ b/chrome/browser/ui/webui/ash/parent_access/parent_access_ui_handler_impl_unittest.cc
@@ -41,11 +41,23 @@ parent_access_ui::mojom::ParentAccessParamsPtr CloneParentAccessParams() override { - return parent_access_ui::mojom::ParentAccessParams::New( - parent_access_ui::mojom::ParentAccessParams::FlowType::kWebsiteAccess, - parent_access_ui::mojom::FlowTypeParams::NewWebApprovalsParams( - parent_access_ui::mojom::WebApprovalsParams::New()), - /*is_disabled=*/false); + switch (flow_type_) { + case parent_access_ui::mojom::ParentAccessParams::FlowType:: + kWebsiteAccess: + return parent_access_ui::mojom::ParentAccessParams::New( + flow_type_, + parent_access_ui::mojom::FlowTypeParams::NewWebApprovalsParams( + parent_access_ui::mojom::WebApprovalsParams::New()), + is_disabled_); + case parent_access_ui::mojom::ParentAccessParams::FlowType:: + kExtensionAccess: + return parent_access_ui::mojom::ParentAccessParams::New( + flow_type_, + parent_access_ui::mojom::FlowTypeParams:: + NewExtensionApprovalsParams( + parent_access_ui::mojom::ExtensionApprovalsParams::New()), + is_disabled_); + } } MOCK_METHOD2(SetApproved, void(const std::string&, const base::Time&)); @@ -53,24 +65,29 @@ MOCK_METHOD0(SetCanceled, void()); MOCK_METHOD0(SetDisabled, void()); MOCK_METHOD0(SetError, void()); + + void set_flow_type( + parent_access_ui::mojom::ParentAccessParams::FlowType flow_type) { + flow_type_ = flow_type; + } + + void set_is_disabled(bool is_disabled) { is_disabled_ = is_disabled; } + + private: + parent_access_ui::mojom::ParentAccessParams::FlowType flow_type_; + bool is_disabled_ = false; }; -class ParentAccessUIHandlerImplTest : public testing::Test { +class ParentAccessUIHandlerImplBaseTest : public testing::Test { public: - ParentAccessUIHandlerImplTest() = default; - ~ParentAccessUIHandlerImplTest() override = default; - - // testing::Test: - void SetUp() override { + ParentAccessUIHandlerImplBaseTest() { identity_test_env_ = std::make_unique<signin::IdentityTestEnvironment>(); identity_test_env_->MakePrimaryAccountAvailable( "testuser@gmail.com", signin::ConsentLevel::kSync); - - parent_access_ui_handler_ = std::make_unique<ParentAccessUIHandlerImpl>( - parent_access_ui_handler_remote_.BindNewPipeAndPassReceiver(), - identity_test_env_->identity_manager(), &delegate_); } + ~ParentAccessUIHandlerImplBaseTest() override = default; + void TearDown() override { parent_access_ui_handler_.reset(); } protected: @@ -82,8 +99,45 @@ FakeParentAccessUIHandlerDelegate delegate_; }; +class ParentAccessUIHandlerImplTestParameterized + : public ParentAccessUIHandlerImplBaseTest, + public testing::WithParamInterface< + parent_access_ui::mojom::ParentAccessParams::FlowType> { + public: + ParentAccessUIHandlerImplTestParameterized() { + delegate_.set_flow_type(GetTestedFlowType()); + parent_access_ui_handler_ = std::make_unique<ParentAccessUIHandlerImpl>( + parent_access_ui_handler_remote_.BindNewPipeAndPassReceiver(), + identity_test_env_->identity_manager(), &delegate_); + } + + ParentAccessStateTracker::FlowResult GetInitialStateForFlow() const { + switch (GetTestedFlowType()) { + case parent_access_ui::mojom::ParentAccessParams::FlowType:: + kWebsiteAccess: + return ParentAccessStateTracker::FlowResult::kParentAuthentication; + case parent_access_ui::mojom::ParentAccessParams::FlowType:: + kExtensionAccess: + return ParentAccessStateTracker::FlowResult::kInitial; + } + } + + parent_access_ui::mojom::ParentAccessParams::FlowType GetTestedFlowType() + const { + return GetParam(); + } +}; + +INSTANTIATE_TEST_SUITE_P( + All, + ParentAccessUIHandlerImplTestParameterized, + testing::Values( + parent_access_ui::mojom::ParentAccessParams::FlowType::kWebsiteAccess, + parent_access_ui::mojom::ParentAccessParams::FlowType:: + kExtensionAccess)); + // Verifies that the webview URL is properly constructed -TEST_F(ParentAccessUIHandlerImplTest, GetParentAccessURL) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, GetParentAccessURL) { base::RunLoop run_loop; parent_access_ui_handler_->GetParentAccessURL( base::BindLambdaForTesting([&](const std::string& url) -> void { @@ -103,7 +157,16 @@ } // Validate the query parameters. - EXPECT_EQ(query_parts.at("callerid"), "39454505"); + switch (GetTestedFlowType()) { + case parent_access_ui::mojom::ParentAccessParams::FlowType:: + kWebsiteAccess: + EXPECT_EQ(query_parts.at("callerid"), "39454505"); + break; + case parent_access_ui::mojom::ParentAccessParams::FlowType:: + kExtensionAccess: + EXPECT_EQ(query_parts.at("callerid"), "12367dff"); + break; + } EXPECT_EQ(query_parts.at("cros-origin"), "chrome://parent-access"); EXPECT_EQ(query_parts.at("platform_version"), base::SysInfo::OperatingSystemVersion()); @@ -114,7 +177,7 @@ } // Verify that the access token is successfully fetched. -TEST_F(ParentAccessUIHandlerImplTest, GetOAuthTokenSuccess) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, GetOAuthTokenSuccess) { identity_test_env_->SetAutomaticIssueOfAccessTokens(true); base::RunLoop run_loop; parent_access_ui_handler_->GetOAuthToken(base::BindLambdaForTesting( @@ -128,7 +191,7 @@ } // Verifies that access token fetch errors are recorded. -TEST_F(ParentAccessUIHandlerImplTest, GetOAuthTokenError) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, GetOAuthTokenError) { base::HistogramTester histogram_tester; base::RunLoop run_loop; parent_access_ui_handler_->GetOAuthToken(base::BindLambdaForTesting( @@ -153,13 +216,13 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessWidgetErrorHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), + GetTestedFlowType()), ParentAccessUIHandlerImpl::ParentAccessWidgetError::kOAuthError, 1); } // Verifies that only one access token fetch is possible at a time. -TEST_F(ParentAccessUIHandlerImplTest, GetOAuthTokenOnlyOneFetchAtATimeError) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, + GetOAuthTokenOnlyOneFetchAtATimeError) { identity_test_env_->SetAutomaticIssueOfAccessTokens(false); parent_access_ui_handler_->GetOAuthToken(base::DoNothing()); @@ -184,7 +247,8 @@ } // Verifies that the parent approvals sequence is handled correctly. -TEST_F(ParentAccessUIHandlerImplTest, OnParentVerifiedAndApproved) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, + OnParentVerifiedAndApproved) { base::HistogramTester histogram_tester; // Construct the ParentAccessCallback kids::platform::parentaccess::client::proto::ParentAccessCallback @@ -247,14 +311,14 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessFlowResultHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), + GetTestedFlowType()), ParentAccessStateTracker::FlowResult::kAccessApproved, 1); } // Verifies that an unparsable parent access callback proto is handled // properly. -TEST_F(ParentAccessUIHandlerImplTest, OnInvalidParentAccessCallback) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, + OnInvalidParentAccessCallback) { // Encode the proto in base64. std::string encoded_parent_access_callback; base::Base64Encode("INVALID_SERIALIZED_CALLBACK", @@ -280,7 +344,8 @@ // Verifies that non-base64 encoded data passed as a parent access callback is // handled properly. -TEST_F(ParentAccessUIHandlerImplTest, OnNonBase64ParentAccessCallback) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, + OnNonBase64ParentAccessCallback) { EXPECT_CALL(delegate_, SetApproved(_, _)).Times(0); base::RunLoop run_loop; @@ -300,7 +365,7 @@ } // Verifies that parent declining is handled correctly. -TEST_F(ParentAccessUIHandlerImplTest, OnParentDeclined) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, OnParentDeclined) { base::HistogramTester histogram_tester; EXPECT_CALL(delegate_, SetDeclined()).Times(1); @@ -321,13 +386,12 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessFlowResultHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), + GetTestedFlowType()), ParentAccessStateTracker::FlowResult::kAccessDeclined, 1); } // Verifies canceling the UI is handled correctly. -TEST_F(ParentAccessUIHandlerImplTest, OnCanceled) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, OnCanceled) { base::HistogramTester histogram_tester; EXPECT_CALL(delegate_, SetCanceled()).Times(1); @@ -344,17 +408,16 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessFlowResultHistogramBase, absl::nullopt), - ParentAccessStateTracker::FlowResult::kParentAuthentication, 1); + GetInitialStateForFlow(), 1); histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessFlowResultHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), - ParentAccessStateTracker::FlowResult::kParentAuthentication, 1); + GetTestedFlowType()), + GetInitialStateForFlow(), 1); } // Verifies errors are handled correctly. -TEST_F(ParentAccessUIHandlerImplTest, OnError) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, OnError) { base::HistogramTester histogram_tester; EXPECT_CALL(delegate_, SetError()).Times(1); @@ -375,13 +438,12 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessFlowResultHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), + GetTestedFlowType()), ParentAccessStateTracker::FlowResult::kError, 1); } // Verifies that the ConsentDeclined status is ignored. -TEST_F(ParentAccessUIHandlerImplTest, ConsentDeclinedParsed) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, ConsentDeclinedParsed) { base::HistogramTester histogram_tester; // Construct the ParentAccessCallback kids::platform::parentaccess::client::proto::ParentAccessCallback @@ -415,13 +477,12 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessWidgetErrorHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), + GetTestedFlowType()), ParentAccessUIHandlerImpl::ParentAccessWidgetError::kUnknownCallback, 1); } // Verifies that the OnPageSizeChanged status is ignored. -TEST_F(ParentAccessUIHandlerImplTest, OnPageSizeChangedIgnored) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, OnPageSizeChangedIgnored) { base::HistogramTester histogram_tester; // Construct the ParentAccessCallback kids::platform::parentaccess::client::proto::ParentAccessCallback @@ -455,13 +516,13 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessWidgetErrorHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), + GetTestedFlowType()), ParentAccessUIHandlerImpl::ParentAccessWidgetError::kUnknownCallback, 1); } // Verifies that the OnCommunicationEstablished status is ignored. -TEST_F(ParentAccessUIHandlerImplTest, OnCommunicationEstablishedIgnored) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, + OnCommunicationEstablishedIgnored) { base::HistogramTester histogram_tester; // Construct the ParentAccessCallback @@ -496,7 +557,8 @@ } // Verifies metric is recorded for no delegate error. -TEST_F(ParentAccessUIHandlerImplTest, NoDelegateErrorMetricRecorded) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, + NoDelegateErrorMetricRecorded) { base::HistogramTester histogram_tester; // Construct a ParentAccessUIHandler without a delegate. @@ -522,8 +584,8 @@ 1); } -// Verifies metric is recorded when received callback cannot be decoded. -TEST_F(ParentAccessUIHandlerImplTest, DecodingErrorMetricRecorded) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, + DecodingErrorMetricRecorded) { base::HistogramTester histogram_tester; base::RunLoop run_loop; @@ -543,13 +605,12 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessWidgetErrorHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), + GetTestedFlowType()), ParentAccessUIHandlerImpl::ParentAccessWidgetError::kDecodingError, 1); } // Verifies metric is recorded when received callback cannot be parsed to proto. -TEST_F(ParentAccessUIHandlerImplTest, ParsingErrorMetricRecorded) { +TEST_P(ParentAccessUIHandlerImplTestParameterized, ParsingErrorMetricRecorded) { base::HistogramTester histogram_tester; // Receive non-parseable callback. @@ -571,8 +632,49 @@ histogram_tester.ExpectUniqueSample( parent_access::GetHistogramTitleForFlowType( parent_access::kParentAccessWidgetErrorHistogramBase, - parent_access_ui::mojom::ParentAccessParams::FlowType:: - kWebsiteAccess), + GetTestedFlowType()), ParentAccessUIHandlerImpl::ParentAccessWidgetError::kParsingError, 1); } + +class ExtensionApprovalsDisabledTest + : public ParentAccessUIHandlerImplBaseTest { + public: + ExtensionApprovalsDisabledTest() { + // Only test extensions flow because disabled state is not allowed for web + // approvals. + delegate_.set_flow_type(parent_access_ui::mojom::ParentAccessParams:: + FlowType::kExtensionAccess); + delegate_.set_is_disabled(true); + parent_access_ui_handler_ = std::make_unique<ParentAccessUIHandlerImpl>( + parent_access_ui_handler_remote_.BindNewPipeAndPassReceiver(), + identity_test_env_->identity_manager(), &delegate_); + } +}; + +// Verifies disabling requests is handled correctly. +TEST_F(ExtensionApprovalsDisabledTest, OnDisabled) { + base::HistogramTester histogram_tester; + EXPECT_CALL(delegate_, SetDisabled()).Times(1); + + // Send the disabled result status. + base::RunLoop run_loop; + parent_access_ui_handler_->OnParentAccessDone( + parent_access_ui::mojom::ParentAccessResult::kDisabled, + base::BindLambdaForTesting([&]() -> void { run_loop.Quit(); })); + + run_loop.Run(); + + // Reset handler to simulate dialog closing. + parent_access_ui_handler_.reset(); + histogram_tester.ExpectUniqueSample( + parent_access::GetHistogramTitleForFlowType( + parent_access::kParentAccessFlowResultHistogramBase, absl::nullopt), + ParentAccessStateTracker::FlowResult::kRequestsDisabled, 1); + histogram_tester.ExpectUniqueSample( + parent_access::GetHistogramTitleForFlowType( + parent_access::kParentAccessFlowResultHistogramBase, + parent_access_ui::mojom::ParentAccessParams::FlowType:: + kExtensionAccess), + ParentAccessStateTracker::FlowResult::kRequestsDisabled, 1); +} } // namespace ash
diff --git a/chrome/browser/ui/webui/settings/OWNERS b/chrome/browser/ui/webui/settings/OWNERS index 23ae3549..d9e34594 100644 --- a/chrome/browser/ui/webui/settings/OWNERS +++ b/chrome/browser/ui/webui/settings/OWNERS
@@ -3,6 +3,7 @@ per-file people_handler*=msalama@chromium.org per-file people_handler*=treib@chromium.org +per-file extensions_safety_check_handler*=psarouthakis@google.com per-file hats_handler*=sauski@google.com per-file privacy_sandbox_handler*=file://components/privacy_sandbox/OWNERS per-file *site_settings*=msramek@chromium.org
diff --git a/chrome/browser/ui/webui/settings/extensions_safety_check_handler.cc b/chrome/browser/ui/webui/settings/extensions_safety_check_handler.cc new file mode 100644 index 0000000..f44a00e --- /dev/null +++ b/chrome/browser/ui/webui/settings/extensions_safety_check_handler.cc
@@ -0,0 +1,46 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/webui/settings/extensions_safety_check_handler.h" + +#include "chrome/grit/generated_resources.h" +#include "ui/base/l10n/l10n_util.h" + +namespace settings { + +ExtensionsSafetyCheckHandler::ExtensionsSafetyCheckHandler() = default; + +ExtensionsSafetyCheckHandler::~ExtensionsSafetyCheckHandler() = default; + +void ExtensionsSafetyCheckHandler::HandleGetExtensionsThatNeedReview( + const base::Value::List& args) { + const base::Value& callback_id = args[0]; + AllowJavascript(); + ResolveJavascriptCallback(callback_id, + base::Value(GetExtensionsThatNeedReview())); +} + +std::u16string ExtensionsSafetyCheckHandler::GetExtensionsThatNeedReview() { + // TODO(psarouthakis): Replace skeleton code to return real number of + // extensions that need to be reviewed via the CWSInfoService and + // update the string ID to use new extensions safety check strings. + return (l10n_util::GetPluralStringFUTF16( + IDS_SETTINGS_SAFETY_CHECK_EXTENSIONS_BLOCKLISTED_OFF, 1)); +} + +void ExtensionsSafetyCheckHandler::OnJavascriptAllowed() {} + +void ExtensionsSafetyCheckHandler::OnJavascriptDisallowed() {} + +void ExtensionsSafetyCheckHandler::RegisterMessages() { + // Usage of base::Unretained(this) is safe, because web_ui() owns `this` and + // won't release ownership until destruction. + web_ui()->RegisterMessageCallback( + "getExtensionsThatNeedReview", + base::BindRepeating( + &ExtensionsSafetyCheckHandler::HandleGetExtensionsThatNeedReview, + base::Unretained(this))); +} + +} // namespace settings
diff --git a/chrome/browser/ui/webui/settings/extensions_safety_check_handler.h b/chrome/browser/ui/webui/settings/extensions_safety_check_handler.h new file mode 100644 index 0000000..d53037d0 --- /dev/null +++ b/chrome/browser/ui/webui/settings/extensions_safety_check_handler.h
@@ -0,0 +1,43 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_EXTENSIONS_SAFETY_CHECK_HANDLER_H_ +#define CHROME_BROWSER_UI_WEBUI_SETTINGS_EXTENSIONS_SAFETY_CHECK_HANDLER_H_ + +#include "base/memory/raw_ptr.h" +#include "base/memory/weak_ptr.h" +#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" + +namespace settings { + +// Settings page UI handler that checks for any extensions that trigger +// a review by the safety check. +class ExtensionsSafetyCheckHandler : public settings::SettingsPageUIHandler { + public: + ExtensionsSafetyCheckHandler(); + ~ExtensionsSafetyCheckHandler() override; + + protected: + // Return the display string that represents how many extensions + // need to be reviewed by the user. + std::u16string GetExtensionsThatNeedReview(); + + private: + // Calculate the number of extensions that need to be reviewed by the + // user. + void HandleGetExtensionsThatNeedReview(const base::Value::List& args); + + // SettingsPageUIHandler implementation. + void OnJavascriptDisallowed() override; + void OnJavascriptAllowed() override; + + // WebUIMessageHandler implementation. + void RegisterMessages() override; + + base::WeakPtrFactory<ExtensionsSafetyCheckHandler> weak_ptr_factory_{this}; +}; + +} // namespace settings + +#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_EXTENSIONS_SAFETY_CHECK_HANDLER_H_
diff --git a/chrome/browser/ui/webui/settings/extensions_safety_check_handler_unittest.cc b/chrome/browser/ui/webui/settings/extensions_safety_check_handler_unittest.cc new file mode 100644 index 0000000..30958e0 --- /dev/null +++ b/chrome/browser/ui/webui/settings/extensions_safety_check_handler_unittest.cc
@@ -0,0 +1,36 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/webui/settings/extensions_safety_check_handler.h" + +#include <string> + +#include "chrome/test/base/testing_profile.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace { +class TestingExtensionsSafetyCheckHandler + : public settings::ExtensionsSafetyCheckHandler { + public: + using ExtensionsSafetyCheckHandler::AllowJavascript; + using ExtensionsSafetyCheckHandler::DisallowJavascript; + using ExtensionsSafetyCheckHandler::GetExtensionsThatNeedReview; +}; + +} // namespace + +class ExtensionsSafetyCheckHandlerTest : public testing::Test { + protected: + std::unique_ptr<TestingProfile> profile_; + std::unique_ptr<TestingExtensionsSafetyCheckHandler> entry_point_handler_; + base::test::ScopedFeatureList feature_list_; +}; + +TEST_F(ExtensionsSafetyCheckHandlerTest, GetExtensionsThatNeedReviewTest) { + // Display string for 1 triggering extension. + std::u16string display_string = + u"1 potentially harmful extension is off. You can also remove it."; + EXPECT_EQ(display_string, + entry_point_handler_->GetExtensionsThatNeedReview()); +}
diff --git a/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc b/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc index 1a3e4a4..e0bd802 100644 --- a/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc +++ b/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc
@@ -30,6 +30,7 @@ #include "content/public/browser/web_ui_message_handler.h" #include "content/public/common/url_constants.h" #include "ui/base/theme_provider.h" +#include "ui/base/ui_base_features.h" #include "ui/base/webui/web_ui_util.h" #include "ui/gfx/color_utils.h" #include "ui/webui/color_change_listener/color_change_handler.h" @@ -57,6 +58,9 @@ html_source->AddString("tabIdDataType", kWebUITabIdDataType); html_source->AddString("tabGroupIdDataType", kWebUITabGroupIdDataType); + html_source->AddString( + "chromeRefresh2023Attribute", + features::IsChromeRefresh2023() ? "chrome-refresh-2023" : ""); static constexpr webui::LocalizedString kStrings[] = { {"tabListTitle", IDS_ACCNAME_TAB_LIST},
diff --git a/chrome/browser/vr/win/graphics_delegate_win.cc b/chrome/browser/vr/win/graphics_delegate_win.cc index f4adb4b..1f683d3 100644 --- a/chrome/browser/vr/win/graphics_delegate_win.cc +++ b/chrome/browser/vr/win/graphics_delegate_win.cc
@@ -189,7 +189,8 @@ gpu_memory_buffer_.get(), gpu_memory_buffer_manager_, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2 | - gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT); + gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT, + "VRGraphicsDelegate"); gl_->WaitSyncTokenCHROMIUM(sii_->GenUnverifiedSyncToken().GetConstData()); }
diff --git a/chrome/browser/wake_lock/wake_lock_browsertest.cc b/chrome/browser/wake_lock/wake_lock_browsertest.cc index 3c2229e1..4f613c8 100644 --- a/chrome/browser/wake_lock/wake_lock_browsertest.cc +++ b/chrome/browser/wake_lock/wake_lock_browsertest.cc
@@ -50,8 +50,8 @@ // Shorthand for starting the embedded web server and navigating to // simple.html. - // Tests calling this usually call content::ExecuteScriptAndExtractString() - // afterwards to run custom code on the dummy page. + // Tests calling this usually call content::EvalJs() afterwards to run custom + // code on the dummy page. void NavigateToSimplePage(); // Registers a handle for "/js-response" in the embedded web server that
diff --git a/chrome/browser/web_applications/web_app_registrar.cc b/chrome/browser/web_applications/web_app_registrar.cc index b9e67b2..4dccf14 100644 --- a/chrome/browser/web_applications/web_app_registrar.cc +++ b/chrome/browser/web_applications/web_app_registrar.cc
@@ -91,8 +91,8 @@ .IsPlaceholderApp(app_id); } - DCHECK(source_type == WebAppManagement::kPolicy || - source_type == WebAppManagement::kKiosk); + CHECK(source_type == WebAppManagement::kPolicy || + source_type == WebAppManagement::kKiosk); const WebApp* web_app = GetAppById(app_id); if (!web_app) return false; @@ -107,6 +107,9 @@ return it->second.is_placeholder; } +// TODO(crbug.com/1434692): Revert changes back to old code +// once the system starts enforcing a single install URL per +// app_id. absl::optional<AppId> WebAppRegistrar::LookupPlaceholderAppId( const GURL& install_url, const WebAppManagement::Type source_type) const { @@ -116,11 +119,22 @@ .LookupPlaceholderAppId(install_url); } - DCHECK(source_type == WebAppManagement::kPolicy || - source_type == WebAppManagement::kKiosk); - absl::optional<AppId> app_id = LookUpAppIdByInstallUrl(install_url); - if (app_id.has_value() && IsPlaceholderApp(app_id.value(), source_type)) - return app_id; + CHECK(source_type == WebAppManagement::kPolicy || + source_type == WebAppManagement::kKiosk); + for (const WebApp& web_app : GetApps()) { + const WebApp::ExternalConfigMap& config_map = + web_app.management_to_external_config_map(); + auto it = config_map.find(source_type); + + if (it == config_map.end()) { + continue; + } + + if (base::Contains(it->second.install_urls, install_url) && + it->second.is_placeholder) { + return web_app.app_id(); + } + } return absl::nullopt; }
diff --git a/chrome/browser/web_applications/web_app_registrar_unittest.cc b/chrome/browser/web_applications/web_app_registrar_unittest.cc index 52d4a74..00966e3 100644 --- a/chrome/browser/web_applications/web_app_registrar_unittest.cc +++ b/chrome/browser/web_applications/web_app_registrar_unittest.cc
@@ -1214,6 +1214,43 @@ registrar().GetAppStartUrl(app_id)); } +TEST_F(WebAppRegistrarTest, VerifyPlaceholderFinderBehavior) { + // Please note, this is a bad state done to test crbug.com/1427340. + // This should not occur once crbug.com/1434692 is implemented. + InitSyncBridge(); + + // Add first app with install_url in the registry as a non-placeholder app, + // verify that the app is not a placeholder. + GURL install_url("https://start_install.com/"); + auto web_app1 = + test::CreateWebApp(GURL("https://start1.com"), WebAppManagement::kPolicy); + const AppId app_id1 = web_app1->app_id(); + RegisterApp(std::move(web_app1)); + test::AddInstallUrlAndPlaceholderData( + profile()->GetPrefs(), &sync_bridge(), app_id1, install_url, + ExternalInstallSource::kExternalPolicy, /*is_placeholder=*/false); + EXPECT_FALSE( + registrar() + .LookupPlaceholderAppId(install_url, WebAppManagement::kPolicy) + .has_value()); + + // Add second app with same install_url in the registrar as a placeholder, + // verify that app shows up as a placeholder. + auto web_app2 = + test::CreateWebApp(GURL("https://start2.com"), WebAppManagement::kPolicy); + const AppId app_id2 = web_app2->app_id(); + RegisterApp(std::move(web_app2)); + test::AddInstallUrlAndPlaceholderData( + profile()->GetPrefs(), &sync_bridge(), app_id2, install_url, + ExternalInstallSource::kExternalPolicy, /*is_placeholder=*/true); + auto placeholder_id = registrar().LookupPlaceholderAppId( + install_url, WebAppManagement::kPolicy); + + // This will fail if the fix for crbug.com/1427340 is reverted. + EXPECT_TRUE(placeholder_id.has_value()); + EXPECT_EQ(placeholder_id.value(), app_id2); +} + #if BUILDFLAG(IS_CHROMEOS_ASH) class WebAppRegistrarAshTest : public WebAppTest, public WithCrosapiParam {
diff --git a/chrome/browser/webapps/web_app_offline_browsertest.cc b/chrome/browser/webapps/web_app_offline_browsertest.cc index 784f5f2..20c2927 100644 --- a/chrome/browser/webapps/web_app_offline_browsertest.cc +++ b/chrome/browser/webapps/web_app_offline_browsertest.cc
@@ -499,11 +499,7 @@ void SetUp() override { #if BUILDFLAG(IS_WIN) - if (base::win::GetVersion() < base::win::Version::WIN10) { - GTEST_SKIP(); - } else { - InProcessBrowserTest::SetUp(); - } + InProcessBrowserTest::SetUp(); #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/1298658): Get this test suite working. GTEST_SKIP(); @@ -546,6 +542,13 @@ #endif IN_PROC_BROWSER_TEST_P(WebAppOfflineDarkModeTest, MAYBE_WebAppOfflineDarkModeNoServiceWorker) { +#if BUILDFLAG(IS_WIN) + if (GetParam() == blink::mojom::PreferredColorScheme::kLight && + ui::NativeTheme::GetInstanceForNativeUi()->ShouldUseDarkColors()) { + GTEST_SKIP() << "Host is in dark mode; skipping test"; + } +#endif // BUILDFLAG(IS_WIN) + ASSERT_TRUE(embedded_test_server()->Start()); // ui::NativeTheme::GetInstanceForNativeUi()->set_use_dark_colors(true); @@ -601,6 +604,13 @@ #endif IN_PROC_BROWSER_TEST_P(WebAppOfflineDarkModeTest, MAYBE_WebAppOfflineDarkModeEmptyServiceWorker) { +#if BUILDFLAG(IS_WIN) + if (GetParam() == blink::mojom::PreferredColorScheme::kLight && + ui::NativeTheme::GetInstanceForNativeUi()->ShouldUseDarkColors()) { + GTEST_SKIP() << "Host is in dark mode; skipping test"; + } +#endif // BUILDFLAG(IS_WIN) + ASSERT_TRUE(embedded_test_server()->Start()); content::WebContents* web_contents = @@ -656,6 +666,13 @@ #endif IN_PROC_BROWSER_TEST_P(WebAppOfflineDarkModeTest, MAYBE_WebAppOfflineNoDarkModeColorsProvided) { +#if BUILDFLAG(IS_WIN) + if (GetParam() == blink::mojom::PreferredColorScheme::kLight && + ui::NativeTheme::GetInstanceForNativeUi()->ShouldUseDarkColors()) { + GTEST_SKIP() << "Host is in dark mode; skipping test"; + } +#endif // BUILDFLAG(IS_WIN) + ASSERT_TRUE(embedded_test_server()->Start()); content::WebContents* web_contents =
diff --git a/chrome/browser/webauth_interactive_uitest.cc b/chrome/browser/webauth_interactive_uitest.cc index 5ad21ed..50e990ff 100644 --- a/chrome/browser/webauth_interactive_uitest.cc +++ b/chrome/browser/webauth_interactive_uitest.cc
@@ -102,34 +102,29 @@ " timeout: 10000," " attestation: '$1'," " pubKeyCredParams: [{type: 'public-key', alg: -7}]" - "}}).then(c => window.domAutomationController.send('OK')," - " e => window.domAutomationController.send(e.toString()));"; + "}}).then(c => 'OK'," + " e => e.toString());"; const std::string register_script = base::ReplaceStringPlaceholders( kRegisterTemplate, std::vector<std::string>{"none"}, nullptr); content::WebContents* const initial_web_contents = browser()->tab_strip_model()->GetActiveWebContents(); - std::string result; // When operating in the foreground, the operation should succeed. - ASSERT_TRUE(content::ExecuteScriptAndExtractString(initial_web_contents, - register_script, &result)); - EXPECT_EQ(result, "OK"); + EXPECT_EQ("OK", content::EvalJs(initial_web_contents, register_script)); // Open a new tab to put the previous page in the background. chrome::NewTab(browser()); // When in the background, the same request should result in a focus error. - ASSERT_TRUE(content::ExecuteScriptAndExtractString(initial_web_contents, - register_script, &result)); + std::string result = + content::EvalJs(initial_web_contents, register_script).ExtractString(); constexpr char kFocusErrorSubstring[] = "the page does not have focus"; EXPECT_THAT(result, ::testing::HasSubstr(kFocusErrorSubstring)); // Close the tab and the action should succeed again. chrome::CloseTab(browser()); - ASSERT_TRUE(content::ExecuteScriptAndExtractString(initial_web_contents, - register_script, &result)); - EXPECT_EQ(result, "OK"); + EXPECT_EQ("OK", content::EvalJs(initial_web_contents, register_script)); // Start the request in the foreground and open a new tab between starting and // finishing the request. This should fail because we don't want foreground @@ -143,24 +138,20 @@ return true; }, browser()); - ASSERT_TRUE(content::ExecuteScriptAndExtractString(initial_web_contents, - register_script, &result)); + result = + content::EvalJs(initial_web_contents, register_script).ExtractString(); EXPECT_THAT(result, ::testing::HasSubstr(kFocusErrorSubstring)); // Close the tab and the action should succeed again. chrome::CloseTab(browser()); virtual_device_factory->mutable_state()->simulate_press_callback.Reset(); - ASSERT_TRUE(content::ExecuteScriptAndExtractString(initial_web_contents, - register_script, &result)); - EXPECT_EQ(result, "OK"); + EXPECT_EQ("OK", content::EvalJs(initial_web_contents, register_script)); // Open dev tools and check that operations still succeed. DevToolsWindow* dev_tools_window = DevToolsWindowTesting::OpenDevToolsWindowSync( initial_web_contents, true /* docked, not a separate window */); - ASSERT_TRUE(content::ExecuteScriptAndExtractString(initial_web_contents, - register_script, &result)); - EXPECT_EQ(result, "OK"); + EXPECT_EQ("OK", content::EvalJs(initial_web_contents, register_script)); DevToolsWindowTesting::CloseDevToolsWindowSync(dev_tools_window); // Open a second browser window. @@ -170,16 +161,12 @@ // Operations in the (now unfocused) window should still succeed, as the // calling tab is still the active tab in that window. - ASSERT_TRUE(content::ExecuteScriptAndExtractString(initial_web_contents, - register_script, &result)); - EXPECT_THAT(result, "OK"); + EXPECT_EQ("OK", content::EvalJs(initial_web_contents, register_script)); // Check that closing the window brings things back to a focused state. chrome::CloseWindow(new_window); ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); - ASSERT_TRUE(content::ExecuteScriptAndExtractString(initial_web_contents, - register_script, &result)); - EXPECT_EQ(result, "OK"); + EXPECT_EQ("OK", content::EvalJs(initial_web_contents, register_script)); // Requesting "direct" attestation will trigger a permissions prompt. virtual_device_factory->mutable_state()->simulate_press_callback = @@ -194,11 +181,10 @@ const std::string get_assertion_with_attestation_script = base::ReplaceStringPlaceholders( kRegisterTemplate, std::vector<std::string>{"direct"}, nullptr); - ASSERT_TRUE(content::ExecuteScriptAndExtractString( - initial_web_contents, get_assertion_with_attestation_script, &result)); + EXPECT_EQ("OK", content::EvalJs(initial_web_contents, + get_assertion_with_attestation_script)); EXPECT_TRUE(permission_requested()); - EXPECT_EQ(result, "OK"); } } // anonymous namespace
diff --git a/chrome/build/lacros64.pgo.txt b/chrome/build/lacros64.pgo.txt index 64a88ca..ce7159e 100644 --- a/chrome/build/lacros64.pgo.txt +++ b/chrome/build/lacros64.pgo.txt
@@ -1 +1 @@ -chrome-chromeos-amd64-generic-main-1681905321-91887b4fed079d571cb9ae7771f02880d63c78e8.profdata +chrome-chromeos-amd64-generic-main-1681919975-c304142f203d34064fb2a7719abafb56a0d480c3.profdata
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index 70bc3b7..77970c4 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1681883793-4ffa3f6177d693d509f3279691a8f03b8099808e.profdata +chrome-linux-main-1681926809-a0ead75701da09b254c49d118f21cc53cbc79d0f.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 40b1b45..31948bc1 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1681912691-19302027aab5c1e02246b17472be41afd745e99c.profdata +chrome-mac-arm-main-1681927219-ed8d035a5429fca5364dc6ae8869847c86b8d473.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index a42f6de..ed31dd9 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1681916303-d269b408415fe1f378aac286513fd7b16464701d.profdata +chrome-win32-main-1681926809-1c2bd94d5c1f938ba2b2416ce846efef4d3d8350.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index aaef168..2acc06c 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1681916303-6f512a46a4f7ded3c1db9f22d48948c677545175.profdata +chrome-win64-main-1681926809-fc5465c0bae93059774fa38b6e8fe9aaf35f603d.profdata
diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni index 0e6df1da..2254e8a 100644 --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni
@@ -110,6 +110,7 @@ "$root_gen_dir/content/aggregation_service_internals_resources.pak", "$root_gen_dir/content/attribution_internals_resources.pak", "$root_gen_dir/content/content_resources.pak", + "$root_gen_dir/content/histograms_resources.pak", "$root_gen_dir/content/indexed_db_resources.pak", "$root_gen_dir/content/quota_internals_resources.pak", "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", @@ -132,10 +133,7 @@ "//components/optimization_guide/optimization_guide_internals/resources", "//components/resources", "//content:content_resources", - "//content/browser/resources/aggregation_service:resources", - "//content/browser/resources/attribution_reporting:resources", - "//content/browser/resources/indexed_db:resources", - "//content/browser/resources/quota:resources", + "//content/browser/resources:resources", "//mojo/public/js:resources", "//net:net_resources", "//skia:skia_resources",
diff --git a/chrome/renderer/accessibility/read_anything_app_controller.cc b/chrome/renderer/accessibility/read_anything_app_controller.cc index 0447d428..a8e5ebe4 100644 --- a/chrome/renderer/accessibility/read_anything_app_controller.cc +++ b/chrome/renderer/accessibility/read_anything_app_controller.cc
@@ -697,6 +697,19 @@ return; } + ui::AXNode* focus_node = model_.GetAXNode(focus_node_id); + ui::AXNode* anchor_node = model_.GetAXNode(anchor_node_id); + // Some text fields, like Gmail, allow a <div> to be returned as a focus + // node for selection, most frequently when a triple click causes an entire + // range of text to be selected, including non-text nodes. This can cause + // inconsistencies in how the selection is handled. e.g. the focus node can + // be before the anchor node and set to a non-text node, which can cause + // page_handler_->OnSelectionChange to be incorrectly triggered, resulting in + // a failing DCHECK. Therefore, return early if this happens. + if (!focus_node->IsText() || !anchor_node->IsText()) { + return; + } + // If the selection change matches the tree's selection, this means it was // set by the controller. Javascript selections set by the controller are // always forward selections. This means the anchor node always comes before
diff --git a/chrome/renderer/accessibility/read_anything_app_controller_browsertest.cc b/chrome/renderer/accessibility/read_anything_app_controller_browsertest.cc index 45e8d27..1365ee4 100644 --- a/chrome/renderer/accessibility/read_anything_app_controller_browsertest.cc +++ b/chrome/renderer/accessibility/read_anything_app_controller_browsertest.cc
@@ -1077,6 +1077,16 @@ } TEST_F(ReadAnythingAppControllerTest, OnSelectionChange) { + ui::AXTreeUpdate update; + SetUpdateTreeID(&update); + update.nodes.resize(3); + update.nodes[0].id = 2; + update.nodes[1].id = 3; + update.nodes[2].id = 4; + update.nodes[0].role = ax::mojom::Role::kStaticText; + update.nodes[1].role = ax::mojom::Role::kStaticText; + update.nodes[2].role = ax::mojom::Role::kStaticText; + AccessibilityEventReceived({update}); ui::AXNodeID anchor_node_id = 2; int anchor_offset = 0; ui::AXNodeID focus_node_id = 3; @@ -1090,6 +1100,15 @@ TEST_F(ReadAnythingAppControllerTest, OnSelectionChange_ClickDoesNotUpdateSelection) { + ui::AXTreeUpdate update; + SetUpdateTreeID(&update); + update.nodes.resize(3); + update.nodes[0].id = 2; + update.nodes[1].id = 3; + update.nodes[2].id = 4; + update.nodes[0].role = ax::mojom::Role::kStaticText; + update.nodes[1].role = ax::mojom::Role::kStaticText; + update.nodes[2].role = ax::mojom::Role::kStaticText; ui::AXNodeID anchor_node_id = 2; int anchor_offset = 15; ui::AXNodeID focus_node_id = 2; @@ -1109,6 +1128,7 @@ SetUpdateTreeID(&update, new_tree_id); update.root_id = 1; update.nodes.resize(1); + update.nodes[0].role = ax::mojom::Role::kStaticText; update.nodes[0].id = 1; AccessibilityEventReceived({update}); EXPECT_CALL(*distiller_, Distill).Times(1); @@ -1120,6 +1140,30 @@ page_handler_.FlushForTesting(); } +TEST_F(ReadAnythingAppControllerTest, + OnSelectionChange_NonTextFieldDoesNotUpdateSelection) { + ui::AXTreeUpdate update; + SetUpdateTreeID(&update); + update.nodes.resize(3); + update.nodes[0].id = 2; + update.nodes[1].id = 3; + update.nodes[2].id = 4; + update.nodes[0].role = ax::mojom::Role::kTextField; + update.nodes[1].role = ax::mojom::Role::kGenericContainer; + update.nodes[2].role = ax::mojom::Role::kTextField; + AccessibilityEventReceived({update}); + ui::AXNodeID anchor_node_id = 2; + int anchor_offset = 0; + ui::AXNodeID focus_node_id = 3; + int focus_offset = 1; + EXPECT_CALL(page_handler_, + OnSelectionChange(tree_id_, anchor_node_id, anchor_offset, + focus_node_id, focus_offset)) + .Times(0); + OnSelectionChange(anchor_node_id, anchor_offset, focus_node_id, focus_offset); + page_handler_.FlushForTesting(); +} + TEST_F(ReadAnythingAppControllerTest, Selection_Forward) { // Create selection from node 3-4. ui::AXTreeUpdate update;
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 12268db..0474d286 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -280,6 +280,7 @@ "//chrome/browser/ui/webui:configs", "//chrome/common/search:mojo_bindings", "//components/autofill/content/renderer:test_support", + "//components/enterprise:enterprise", "//components/reporting/util:test_callbacks_support", "//components/safe_browsing/content/renderer/phishing_classifier:unit_tests_support", "//components/security_interstitials/content:security_interstitial_page", @@ -7177,6 +7178,7 @@ "../browser/ui/webui/realbox/realbox_handler_unittest.cc", "../browser/ui/webui/sanitized_image_source_unittest.cc", "../browser/ui/webui/settings/downloads_handler_unittest.cc", + "../browser/ui/webui/settings/extensions_safety_check_handler_unittest.cc", "../browser/ui/webui/settings/hats_handler_unittest.cc", "../browser/ui/webui/settings/metrics_reporting_handler_unittest.cc", "../browser/ui/webui/settings/on_startup_handler_unittest.cc", @@ -7326,6 +7328,7 @@ "../browser/new_tab_page/modules/drive/drive_service_unittest.cc", "../browser/new_tab_page/modules/feed/feed_handler_unittest.cc", "../browser/new_tab_page/modules/history_clusters/cart/cart_processor_unittest.cc", + "../browser/new_tab_page/modules/history_clusters/history_clusters_module_service_unittest.cc", "../browser/new_tab_page/modules/history_clusters/history_clusters_page_handler_unittest.cc", "../browser/new_tab_page/modules/new_tab_page_modules_unittest.cc", "../browser/new_tab_page/modules/photos/photos_service_unittest.cc",
diff --git a/chrome/test/DEPS b/chrome/test/DEPS index 6c9c9f4..7f790d4a 100644 --- a/chrome/test/DEPS +++ b/chrome/test/DEPS
@@ -21,6 +21,7 @@ "+components/crash/core/app", "+components/domain_reliability", "+components/download/public/common", + "+components/enterprise", "+components/favicon/core", "+components/feature_engagement", "+components/find_in_page",
diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn index 38c127f..1251070d 100644 --- a/chrome/test/android/BUILD.gn +++ b/chrome/test/android/BUILD.gn
@@ -111,10 +111,7 @@ chrome_test_apk_tmpl("chrome_java_test_wpr_tests") { apk_name = "ChromeWPRTests" - sources = [ - "//chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/network_fetch/FeedNewTabPageCardInstrumentationTest.java", - "javatests/src/org/chromium/chrome/test/util/browser/WPRArchiveDirectory.java", - ] + sources = [ "//chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/network_fetch/FeedNewTabPageCardInstrumentationTest.java" ] data = [ "//chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/wpr_tests", "//third_party/webpagereplay/bin", @@ -244,24 +241,42 @@ public_deps = [ ":chrome_java_test_support_common" ] sources = [ + "javatests/src/org/chromium/chrome/browser/history/TestBrowsingHistoryObserver.java", + "javatests/src/org/chromium/chrome/browser/toolbar/top/ButtonHighlightMatcher.java", "javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java", "javatests/src/org/chromium/chrome/test/ChromeBrowserTestRule.java", "javatests/src/org/chromium/chrome/test/ChromeTabbedActivityTestRule.java", "javatests/src/org/chromium/chrome/test/MultiActivityTestRule.java", + "javatests/src/org/chromium/chrome/test/ReducedModeNativeTestRule.java", "javatests/src/org/chromium/chrome/test/TestContentProvider.java", "javatests/src/org/chromium/chrome/test/batch/BlankCTATabInitialStateRule.java", + "javatests/src/org/chromium/chrome/test/gcore/MockChromeGoogleApiClient.java", + "javatests/src/org/chromium/chrome/test/invalidation/IntentSavingContext.java", "javatests/src/org/chromium/chrome/test/util/BookmarkTestRule.java", "javatests/src/org/chromium/chrome/test/util/BookmarkTestUtil.java", "javatests/src/org/chromium/chrome/test/util/ChromeApplicationTestUtils.java", "javatests/src/org/chromium/chrome/test/util/ChromeTabUtils.java", + "javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.java", + "javatests/src/org/chromium/chrome/test/util/InfoBarTestAnimationListener.java", + "javatests/src/org/chromium/chrome/test/util/InfoBarUtil.java", "javatests/src/org/chromium/chrome/test/util/MenuUtils.java", "javatests/src/org/chromium/chrome/test/util/NewTabPageTestUtils.java", + "javatests/src/org/chromium/chrome/test/util/OmniboxTestUtils.java", + "javatests/src/org/chromium/chrome/test/util/RecentTabsPageTestUtils.java", + "javatests/src/org/chromium/chrome/test/util/TabRestoreServiceUtils.java", "javatests/src/org/chromium/chrome/test/util/TabStripUtils.java", + "javatests/src/org/chromium/chrome/test/util/ToolbarTestUtils.java", + "javatests/src/org/chromium/chrome/test/util/TranslateUtil.java", "javatests/src/org/chromium/chrome/test/util/WaitForFocusHelper.java", "javatests/src/org/chromium/chrome/test/util/browser/TabLoadObserver.java", "javatests/src/org/chromium/chrome/test/util/browser/TabTitleObserver.java", + "javatests/src/org/chromium/chrome/test/util/browser/ThemeTestUtils.java", + "javatests/src/org/chromium/chrome/test/util/browser/WPRArchiveDirectory.java", + "javatests/src/org/chromium/chrome/test/util/browser/compositor/layouts/DisableChromeAnimations.java", + "javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java", "javatests/src/org/chromium/chrome/test/util/browser/signin/SigninTestRule.java", "javatests/src/org/chromium/chrome/test/util/browser/signin/SigninTestUtil.java", + "javatests/src/org/chromium/chrome/test/util/browser/sync/SyncTestUtil.java", "javatests/src/org/chromium/chrome/test/util/browser/webapps/WebappTestPage.java", ] @@ -276,31 +291,54 @@ "//chrome/android:browser_java_test_support", "//chrome/android:chrome_app_java_resources", "//chrome/android:chrome_java", + "//chrome/browser/android/browserservices/constants:java", + "//chrome/browser/android/browserservices/intents:java", "//chrome/browser/first_run/android:java", + "//chrome/browser/flags:java", "//chrome/browser/language/android:java", "//chrome/browser/preferences:java", "//chrome/browser/prefetch/android:java", "//chrome/browser/profiles/android:java", + "//chrome/browser/settings:test_support_java", "//chrome/browser/signin/services/android:java", "//chrome/browser/sync/android:java", "//chrome/browser/tab:java", "//chrome/browser/tab_group:java", "//chrome/browser/tabmodel:java", + "//chrome/browser/thumbnail/generator:java", "//chrome/browser/ui/android/appmenu:java", + "//chrome/browser/ui/android/appmenu/test:test_support_java", + "//chrome/browser/ui/android/favicon:java", "//chrome/browser/ui/android/layouts:java", "//chrome/browser/ui/android/omnibox:java", "//chrome/browser/ui/android/theme:java", + "//chrome/browser/ui/android/toolbar:java", + "//chrome/browser/ui/messages/android:java", + "//chrome/browser/util:java", "//components/bookmarks/common/android:bookmarks_java", + "//components/browser_ui/notifications/android:test_support_java", "//components/browser_ui/styles/android:java", + "//components/browser_ui/widget/android:java", "//components/browser_ui/widget/android:test_support_java", "//components/embedder_support/android:util_java", "//components/embedder_support/android:web_contents_delegate_java", + "//components/favicon/android:java", + "//components/infobars/android:java", + "//components/infobars/core:infobar_enums_java", + "//components/location/android:location_java", + "//components/messages/android:java", + "//components/omnibox/browser:browser_java", + "//components/policy/android:policy_java", + "//components/policy/android:policy_java_test_support", "//components/signin/public/android:java", "//components/signin/public/android:signin_java_test_support", "//components/sync/android:sync_java", "//components/translate/content/android:java", + "//components/version_info/android:version_constants_java", + "//components/webapps/browser/android:java", "//content/public/android:content_java", "//content/public/test/android:content_java_test_support", + "//net/android:net_java", "//net/android:net_java_test_support", "//services/device/public/mojom:mojom_java", "//third_party/android_deps:chromium_play_services_availability_java", @@ -327,64 +365,6 @@ ] } -android_library("chrome_java_integration_test_support_uncommon") { - testonly = true - resources_package = "org.chromium.chrome" - - sources = [ - "javatests/src/org/chromium/chrome/browser/history/TestBrowsingHistoryObserver.java", - "javatests/src/org/chromium/chrome/browser/toolbar/top/ButtonHighlightMatcher.java", - "javatests/src/org/chromium/chrome/test/ReducedModeNativeTestRule.java", - "javatests/src/org/chromium/chrome/test/gcore/MockChromeGoogleApiClient.java", - "javatests/src/org/chromium/chrome/test/invalidation/IntentSavingContext.java", - "javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.java", - "javatests/src/org/chromium/chrome/test/util/InfoBarTestAnimationListener.java", - "javatests/src/org/chromium/chrome/test/util/InfoBarUtil.java", - "javatests/src/org/chromium/chrome/test/util/OmniboxTestUtils.java", - "javatests/src/org/chromium/chrome/test/util/RecentTabsPageTestUtils.java", - "javatests/src/org/chromium/chrome/test/util/TabRestoreServiceUtils.java", - "javatests/src/org/chromium/chrome/test/util/ToolbarTestUtils.java", - "javatests/src/org/chromium/chrome/test/util/TranslateUtil.java", - "javatests/src/org/chromium/chrome/test/util/browser/ThemeTestUtils.java", - "javatests/src/org/chromium/chrome/test/util/browser/compositor/layouts/DisableChromeAnimations.java", - "javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java", - "javatests/src/org/chromium/chrome/test/util/browser/sync/SyncTestUtil.java", - ] - - deps = [ - ":chrome_java_test_support_common", - "//base:base_java", - "//base:base_java_test_support", - "//build/android:build_java", - "//chrome/android:chrome_app_java_resources", - "//chrome/android:chrome_java", - "//chrome/browser/language/android:java", - "//chrome/browser/sync/android:java", - "//chrome/browser/tab:java", - "//chrome/browser/tabmodel:java", - "//chrome/browser/ui/android/layouts:java", - "//chrome/browser/ui/android/omnibox:java", - "//chrome/browser/ui/android/theme:java", - "//chrome/browser/ui/android/toolbar:java", - "//components/browser_ui/styles/android:java", - "//components/browser_ui/widget/android:java", - "//components/browser_ui/widget/android:test_support_java", - "//components/infobars/android:java", - "//components/infobars/core:infobar_enums_java", - "//components/omnibox/browser:browser_java", - "//components/translate/content/android:java", - "//content/public/android:content_java", - "//content/public/test/android:content_java_test_support", - "//third_party/android_deps:espresso_java", - "//third_party/androidx:androidx_annotation_annotation_java", - "//third_party/androidx:androidx_recyclerview_recyclerview_java", - "//third_party/androidx:androidx_test_monitor_java", - "//third_party/hamcrest:hamcrest_java", - "//third_party/junit:junit", - "//ui/android:ui_no_recycler_view_java", - ] -} - # Rules, utilities and fakes common to unit and integration tests. android_library("chrome_java_test_support_common") { resources_package = "org.chromium.chrome" @@ -432,12 +412,16 @@ "//chrome/browser/flags:java", "//chrome/browser/preferences:java", "//chrome/browser/profiles/android:java", + "//chrome/browser/signin/services/android:java", "//chrome/browser/tab:java", "//chrome/browser/tabmodel:java", "//chrome/browser/thumbnail/generator:java", "//chrome/browser/ui/android/toolbar:java", + "//chrome/browser/util:java", + "//components/browser_ui/styles/android:java", "//components/browser_ui/widget/android:java", "//components/browser_ui/widget/android:test_support_java", + "//components/embedder_support/android:util_java", "//components/favicon/android:java", "//components/location/android:location_java", "//components/policy/android:policy_java_test_support",
diff --git a/chrome/test/base/chrome_unit_test_suite.cc b/chrome/test/base/chrome_unit_test_suite.cc index 9af00a3..1a0be26fc 100644 --- a/chrome/test/base/chrome_unit_test_suite.cc +++ b/chrome/test/base/chrome_unit_test_suite.cc
@@ -85,7 +85,7 @@ } void OnTestEnd(const testing::TestInfo& test_info) override { - TestingBrowserProcess::DeleteInstance(); + TestingBrowserProcess::TearDownAndDeleteInstance(); // Some tests cause ChildThreadImpl to initialize a PowerMonitor. base::PowerMonitor::ShutdownForTesting(); #if BUILDFLAG(IS_WIN)
diff --git a/chrome/test/base/chromeos/ash_browser_test_starter.cc b/chrome/test/base/chromeos/ash_browser_test_starter.cc index 37a8bd3..2401373 100644 --- a/chrome/test/base/chromeos/ash_browser_test_starter.cc +++ b/chrome/test/base/chromeos/ash_browser_test_starter.cc
@@ -42,28 +42,6 @@ env->SetVar("XDG_RUNTIME_DIR", scoped_temp_dir_xdg_.GetPath().AsUTF8Unsafe()); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - // Put lacros logs in CAS outputs on bots. - if (command_line->HasSwitch("test-launcher-summary-output")) { - std::string test_name = base::JoinString( - {::testing::UnitTest::GetInstance() - ->current_test_info() - ->test_suite_name(), - ::testing::UnitTest::GetInstance()->current_test_info()->name()}, - "."); - base::FilePath output_file_path = - command_line->GetSwitchValuePath("test-launcher-summary-output"); - base::FilePath test_output_folder = - output_file_path.DirName().Append(test_name); - command_line->AppendSwitchPath(switches::kUserDataDir, test_output_folder); - } else { - LOG(WARNING) - << "By default, lacros logs are in some random folder. If you need " - << "lacros log, please run with --test-launcher-summary-output. e.g. " - << "Run with --test-launcher-summary-output=/tmp/default/output.json. " - << "For each lacros in a test, the log will be in " - << "/tmp/default/test_suite.test_name folder."; - } - scoped_feature_list_.InitWithFeatures( {ash::features::kLacrosSupport, ash::features::kLacrosPrimary, ash::features::kLacrosOnly},
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc index 8e8e30a..197d847 100644 --- a/chrome/test/base/testing_browser_process.cc +++ b/chrome/test/base/testing_browser_process.cc
@@ -77,6 +77,9 @@ #endif // BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/serial/serial_policy_allowed_ports.h" #include "components/keep_alive_registry/keep_alive_registry.h" +#if !BUILDFLAG(IS_CHROMEOS_ASH) +#include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" +#endif // !BUILDFLAG(IS_CHROMEOS_ASH) #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_CHROMEOS_ASH) @@ -119,6 +122,20 @@ delete browser_process; } +// static +void TestingBrowserProcess::StartTearDown() { + TestingBrowserProcess* browser_process = TestingBrowserProcess::GetGlobal(); + if (browser_process) { + browser_process->ShutdownBrowserPolicyConnector(); + } +} + +// static +void TestingBrowserProcess::TearDownAndDeleteInstance() { + TestingBrowserProcess::StartTearDown(); + TestingBrowserProcess::DeleteInstance(); +} + TestingBrowserProcess::TestingBrowserProcess() : app_locale_("en"), platform_part_(std::make_unique<TestingBrowserProcessPlatformPart>()) { @@ -131,7 +148,6 @@ TestingBrowserProcess::~TestingBrowserProcess() { EXPECT_FALSE(local_state_); - ShutdownBrowserPolicyConnector(); #if BUILDFLAG(ENABLE_EXTENSIONS) extensions::ExtensionsBrowserClient::Set(nullptr); extensions::AppWindowClient::Set(nullptr); @@ -555,8 +571,20 @@ } void TestingBrowserProcess::ShutdownBrowserPolicyConnector() { - if (browser_policy_connector_) + if (browser_policy_connector_) { +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) + // Initial cleanup for ChromeBrowserCloudManagement, shutdown components + // that depend on profile and notification system. For example, + // ProfileManager observer and KeyServices observer need to be removed + // before profiles. + auto* cloud_management_controller = + browser_policy_connector_->chrome_browser_cloud_management_controller(); + if (cloud_management_controller) { + cloud_management_controller->ShutDown(); + } +#endif browser_policy_connector_->Shutdown(); + } browser_policy_connector_.reset(); } @@ -598,5 +626,5 @@ } TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { - TestingBrowserProcess::DeleteInstance(); + TestingBrowserProcess::TearDownAndDeleteInstance(); }
diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h index d099cd01..a8b2ce52 100644 --- a/chrome/test/base/testing_browser_process.h +++ b/chrome/test/base/testing_browser_process.h
@@ -77,6 +77,10 @@ // Convenience method to get g_browser_process as a TestingBrowserProcess*. static TestingBrowserProcess* GetGlobal(); + // Convenience method to both teardown and destroy the TestingBrowserProcess + // instance + static void TearDownAndDeleteInstance(); + TestingBrowserProcess(const TestingBrowserProcess&) = delete; TestingBrowserProcess& operator=(const TestingBrowserProcess&) = delete; @@ -182,6 +186,9 @@ #endif private: + // Perform necessary cleanup prior to destruction of |g_browser_process| + static void StartTearDown(); + // See CreateInstance() and DestoryInstance() above. TestingBrowserProcess(); ~TestingBrowserProcess() override;
diff --git a/chrome/test/data/webui/chromeos/parent_access/parent_access_app_test.js b/chrome/test/data/webui/chromeos/parent_access/parent_access_app_test.js index a7899e5..ceba3d5 100644 --- a/chrome/test/data/webui/chromeos/parent_access/parent_access_app_test.js +++ b/chrome/test/data/webui/chromeos/parent_access/parent_access_app_test.js
@@ -97,6 +97,7 @@ const askParentButton = parentAccessBefore.shadowRoot.querySelector('.action-button'); askParentButton.click(); + assertEquals(handler.getCallCount('onBeforeScreenDone'), 1); await flushTasks(); // Verify online flow is showing and switch to the after screen.
diff --git a/chrome/test/data/webui/chromeos/parent_access/test_parent_access_ui_handler.js b/chrome/test/data/webui/chromeos/parent_access/test_parent_access_ui_handler.js index bafc92f..234378150 100644 --- a/chrome/test/data/webui/chromeos/parent_access/test_parent_access_ui_handler.js +++ b/chrome/test/data/webui/chromeos/parent_access/test_parent_access_ui_handler.js
@@ -14,6 +14,7 @@ 'getParentAccessParams', 'getParentAccessURL', 'onParentAccessDone', + 'onBeforeScreenDone', ]); /** @private {?ParentAccessParams} */ @@ -57,6 +58,11 @@ this.methodCalled('onParentAccessDone', parentAccessResult); } + /** @override */ + onBeforeScreenDone() { + this.methodCalled('onBeforeScreenDone'); + } + /** * @param {!ParentAccessParams} params */
diff --git a/chromeos/ash/components/nearby/presence/credentials/BUILD.gn b/chromeos/ash/components/nearby/presence/credentials/BUILD.gn index 5031e11a..b2783107 100644 --- a/chromeos/ash/components/nearby/presence/credentials/BUILD.gn +++ b/chromeos/ash/components/nearby/presence/credentials/BUILD.gn
@@ -52,11 +52,14 @@ sources = [ "fake_local_device_data_provider.cc", "fake_local_device_data_provider.h", + "fake_nearby_presence_server_client.cc", + "fake_nearby_presence_server_client.h", ] deps = [ ":credentials", "//base", + "//chromeos/ash/components/nearby/common/client", "//chromeos/ash/components/nearby/presence/proto", "//components/prefs", "//components/signin/public/identity_manager", @@ -75,6 +78,7 @@ deps = [ ":credentials", + ":test_support", "//base", "//base/test:test_support", "//chromeos/ash/components/nearby/common/client",
diff --git a/chromeos/ash/components/nearby/presence/credentials/fake_nearby_presence_server_client.cc b/chromeos/ash/components/nearby/presence/credentials/fake_nearby_presence_server_client.cc new file mode 100644 index 0000000..e773144f --- /dev/null +++ b/chromeos/ash/components/nearby/presence/credentials/fake_nearby_presence_server_client.cc
@@ -0,0 +1,77 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chromeos/ash/components/nearby/presence/credentials/fake_nearby_presence_server_client.h" + +namespace ash::nearby::presence { + +FakeNearbyPresenceServerClient::Factory::Factory() = default; + +FakeNearbyPresenceServerClient::Factory::~Factory() = default; + +std::unique_ptr<NearbyPresenceServerClient> +FakeNearbyPresenceServerClient::Factory::CreateInstance( + std::unique_ptr<NearbyApiCallFlow> api_call_flow, + signin::IdentityManager* identity_manager, + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) { + auto instance = std::make_unique<FakeNearbyPresenceServerClient>(); + last_created_fake_server_client_ = instance.get(); + return instance; +} + +FakeNearbyPresenceServerClient::FakeNearbyPresenceServerClient() = default; + +FakeNearbyPresenceServerClient::~FakeNearbyPresenceServerClient() = default; + +void FakeNearbyPresenceServerClient::SetAccessTokenUsed( + const std::string& token) { + access_token_used_ = token; +} + +void FakeNearbyPresenceServerClient::InvokeUpdateDeviceSuccessCallback( + const ash::nearby::proto::UpdateDeviceResponse& response) { + CHECK(update_device_callback_); + std::move(update_device_callback_).Run(response); +} + +void FakeNearbyPresenceServerClient::InvokeUpdateDeviceErrorCallback( + ash::nearby::NearbyHttpError error) { + CHECK(update_device_error_callback_); + std::move(update_device_error_callback_).Run(error); +} + +void FakeNearbyPresenceServerClient:: + InvokeListPublicCertificatesSuccessCallback( + const ash::nearby::proto::ListPublicCertificatesResponse& response) { + CHECK(list_public_certificates_callback_); + std::move(list_public_certificates_callback_).Run(response); +} + +void FakeNearbyPresenceServerClient::InvokeListPublicCertificatesErrorCallback( + ash::nearby::NearbyHttpError error) { + CHECK(list_public_certificates_error_callback_); + std::move(list_public_certificates_error_callback_).Run(error); +} + +void FakeNearbyPresenceServerClient::UpdateDevice( + const ash::nearby::proto::UpdateDeviceRequest& request, + UpdateDeviceCallback callback, + ErrorCallback error_callback) { + update_device_callback_ = std::move(callback); + update_device_error_callback_ = std::move(error_callback); +} + +void FakeNearbyPresenceServerClient::ListPublicCertificates( + const ash::nearby::proto::ListPublicCertificatesRequest& request, + ListPublicCertificatesCallback callback, + ErrorCallback error_callback) { + list_public_certificates_callback_ = std::move(callback); + list_public_certificates_error_callback_ = std::move(error_callback); +} + +std::string FakeNearbyPresenceServerClient::GetAccessTokenUsed() { + return access_token_used_; +} + +} // namespace ash::nearby::presence
diff --git a/chromeos/ash/components/nearby/presence/credentials/fake_nearby_presence_server_client.h b/chromeos/ash/components/nearby/presence/credentials/fake_nearby_presence_server_client.h new file mode 100644 index 0000000..3a311bd --- /dev/null +++ b/chromeos/ash/components/nearby/presence/credentials/fake_nearby_presence_server_client.h
@@ -0,0 +1,79 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROMEOS_ASH_COMPONENTS_NEARBY_PRESENCE_CREDENTIALS_FAKE_NEARBY_PRESENCE_SERVER_CLIENT_H_ +#define CHROMEOS_ASH_COMPONENTS_NEARBY_PRESENCE_CREDENTIALS_FAKE_NEARBY_PRESENCE_SERVER_CLIENT_H_ + +#include <memory> +#include <string> + +#include "base/functional/callback.h" +#include "chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client.h" +#include "chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.h" +#include "chromeos/ash/components/nearby/presence/proto/list_public_certificates_rpc.pb.h" +#include "chromeos/ash/components/nearby/presence/proto/update_device_rpc.pb.h" + +namespace ash::nearby::presence { + +// A fake implementation of the Nearby Presence HTTP client that stores all +// request data. Only use in unit tests. +class FakeNearbyPresenceServerClient : public NearbyPresenceServerClient { + public: + // Factory that creates FakeNearbyPresenceServerClient instances. Use in + // NearbyPresenceServerClientImpl::Factory::SetFactoryForTesting() in unit + // tests. + class Factory : public NearbyPresenceServerClientImpl::Factory { + public: + Factory(); + ~Factory() override; + + FakeNearbyPresenceServerClient* fake_server_client() { + return last_created_fake_server_client_; + } + + private: + // NearbyPresenceServerClientImpl::Factory: + std::unique_ptr<NearbyPresenceServerClient> CreateInstance( + std::unique_ptr<NearbyApiCallFlow> api_call_flow, + signin::IdentityManager* identity_manager, + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) + override; + + FakeNearbyPresenceServerClient* last_created_fake_server_client_ = nullptr; + }; + + FakeNearbyPresenceServerClient(); + ~FakeNearbyPresenceServerClient() override; + + void SetAccessTokenUsed(const std::string& token); + + void InvokeUpdateDeviceSuccessCallback( + const ash::nearby::proto::UpdateDeviceResponse& response); + void InvokeUpdateDeviceErrorCallback(ash::nearby::NearbyHttpError error); + void InvokeListPublicCertificatesSuccessCallback( + const ash::nearby::proto::ListPublicCertificatesResponse& response); + void InvokeListPublicCertificatesErrorCallback( + ash::nearby::NearbyHttpError error); + + private: + // NearbyPresenceServerClient: + void UpdateDevice(const ash::nearby::proto::UpdateDeviceRequest& request, + UpdateDeviceCallback callback, + ErrorCallback error_callback) override; + void ListPublicCertificates( + const ash::nearby::proto::ListPublicCertificatesRequest& request, + ListPublicCertificatesCallback callback, + ErrorCallback error_callback) override; + std::string GetAccessTokenUsed() override; + + std::string access_token_used_; + UpdateDeviceCallback update_device_callback_; + ListPublicCertificatesCallback list_public_certificates_callback_; + ErrorCallback update_device_error_callback_; + ErrorCallback list_public_certificates_error_callback_; +}; + +} // namespace ash::nearby::presence + +#endif // CHROMEOS_ASH_COMPONENTS_NEARBY_PRESENCE_CREDENTIALS_FAKE_NEARBY_PRESENCE_SERVER_CLIENT_H_
diff --git a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.cc b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.cc index 4d1e8beb..963e576 100644 --- a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.cc +++ b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.cc
@@ -5,6 +5,8 @@ #include "chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.h" #include "base/functional/callback.h" +#include "chromeos/ash/components/nearby/presence/credentials/local_device_data_provider.h" +#include "chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl.h" #include "components/prefs/pref_service.h" #include "components/signin/public/identity_manager/identity_manager.h" @@ -12,17 +14,34 @@ NearbyPresenceCredentialManagerImpl::NearbyPresenceCredentialManagerImpl( PrefService* pref_service, - signin::IdentityManager* identity_manager) { + signin::IdentityManager* identity_manager, + std::unique_ptr<LocalDeviceDataProvider> local_device_data_provider) + : pref_service_(pref_service), + identity_manager_(identity_manager), + local_device_data_provider_(std::move(local_device_data_provider)) { + // TODO(b/276307539): Add mojo remote as a parameter once implemented. + CHECK(pref_service_); + CHECK(identity_manager_); + CHECK(local_device_data_provider_); +} + +NearbyPresenceCredentialManagerImpl::NearbyPresenceCredentialManagerImpl( + PrefService* pref_service, + signin::IdentityManager* identity_manager) + : pref_service_(pref_service), identity_manager_(identity_manager) { // TODO (b/276307539): Add mojo remote as a parameter once implemented. + CHECK(pref_service_); + CHECK(identity_manager_); + + local_device_data_provider_ = std::make_unique<LocalDeviceDataProviderImpl>( + pref_service, identity_manager); } NearbyPresenceCredentialManagerImpl::~NearbyPresenceCredentialManagerImpl() = default; bool NearbyPresenceCredentialManagerImpl::IsLocalDeviceRegistered() { - // TODO (b/276307539): Implement `IsLocalDeviceRegistered`, this - // default implementation is to get the skeleton class to compile. - return false; + return local_device_data_provider_->IsUserRegistrationInfoSaved(); } void NearbyPresenceCredentialManagerImpl::RegisterPresence(
diff --git a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.h b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.h index d44c47ae..1796324 100644 --- a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.h +++ b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.h
@@ -7,6 +7,8 @@ #include "chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager.h" +#include "base/memory/raw_ptr.h" + class PrefService; namespace signin { @@ -15,12 +17,22 @@ namespace ash::nearby::presence { +class LocalDeviceDataProvider; + class NearbyPresenceCredentialManagerImpl : public NearbyPresenceCredentialManager { public: NearbyPresenceCredentialManagerImpl( PrefService* pref_service, signin::IdentityManager* identity_manager); + + // For unit tests only. |local_device_data_provider| parameter is used to + // inject a FakeLocalDeviceDataProvider. + NearbyPresenceCredentialManagerImpl( + PrefService* pref_service, + signin::IdentityManager* identity_manager, + std::unique_ptr<LocalDeviceDataProvider> local_device_data_provider); + ~NearbyPresenceCredentialManagerImpl() override; NearbyPresenceCredentialManagerImpl(NearbyPresenceCredentialManagerImpl&) = @@ -33,6 +45,11 @@ void RegisterPresence( base::OnceCallback<void(bool)> on_registered_callback) override; void UpdateCredentials() override; + + private: + const raw_ptr<PrefService> pref_service_; + const raw_ptr<signin::IdentityManager> identity_manager_; + std::unique_ptr<LocalDeviceDataProvider> local_device_data_provider_; }; } // namespace ash::nearby::presence
diff --git a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc index 9468e65f..bd85f88ce 100644 --- a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc +++ b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc
@@ -5,6 +5,7 @@ #include "chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl.h" #include "base/test/gtest_util.h" #include "base/test/task_environment.h" +#include "chromeos/ash/components/nearby/presence/credentials/fake_local_device_data_provider.h" #include "chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager.h" #include "components/prefs/testing_pref_service.h" #include "components/signin/public/identity_manager/identity_test_environment.h" @@ -16,19 +17,34 @@ class NearbyPresenceCredentialManagerImplTest : public testing::Test { protected: void SetUp() override { + std::unique_ptr<LocalDeviceDataProvider> local_device_data_provider = + std::make_unique<FakeLocalDeviceDataProvider>(); + fake_local_device_data_provider_ = + static_cast<FakeLocalDeviceDataProvider*>( + local_device_data_provider.get()); + credential_manager_ = std::make_unique<NearbyPresenceCredentialManagerImpl>( - &pref_service_, identity_test_env_.identity_manager()); + &pref_service_, identity_test_env_.identity_manager(), + std::move(local_device_data_provider)); } protected: base::test::TaskEnvironment task_environment_; + FakeLocalDeviceDataProvider* fake_local_device_data_provider_ = nullptr; TestingPrefServiceSimple pref_service_; signin::IdentityTestEnvironment identity_test_env_; std::unique_ptr<NearbyPresenceCredentialManager> credential_manager_; }; -TEST_F(NearbyPresenceCredentialManagerImplTest, ObjectConstructionSuccess) { - ASSERT_TRUE(credential_manager_); +TEST_F(NearbyPresenceCredentialManagerImplTest, PresenceRegistered) { + EXPECT_FALSE(credential_manager_->IsLocalDeviceRegistered()); + + // Simulate the user information not saved in the `LocalDeviceDataProvider`. + // + // TODO(b/276307539): Instead of using the fake, change this test to + // reflect `RegisterPresence` once implemented. + fake_local_device_data_provider_->SetIsUserRegistrationInfoSaved(true); + EXPECT_TRUE(credential_manager_->IsLocalDeviceRegistered()); } } // namespace ash::nearby::presence
diff --git a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client.h b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client.h index 35a5449..b8b647d3 100644 --- a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client.h +++ b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client.h
@@ -26,18 +26,6 @@ // instance for each request you make. DO NOT REUSE. class NearbyPresenceServerClient { public: - // Interface for creating NearbyPresenceServerClient instances. Because each - // NearbyPresenceServerClient instance can only be used for one API call, a - // factory makes it easier to make multiple requests in sequence or in - // parallel. - class Factory { - public: - Factory() = default; - virtual ~Factory() = default; - - virtual std::unique_ptr<NearbyPresenceServerClient> CreateInstance() = 0; - }; - using ErrorCallback = base::OnceCallback<void(ash::nearby::NearbyHttpError)>; using ListPublicCertificatesCallback = base::OnceCallback<void( const ash::nearby::proto::ListPublicCertificatesResponse&)>;
diff --git a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.cc b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.cc index 3f49fcf..feb4c29e 100644 --- a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.cc +++ b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.cc
@@ -183,6 +183,35 @@ namespace ash::nearby::presence { +// static +NearbyPresenceServerClientImpl::Factory* + NearbyPresenceServerClientImpl::Factory::g_test_factory_ = nullptr; + +// static +std::unique_ptr<NearbyPresenceServerClient> +NearbyPresenceServerClientImpl::Factory::Create( + std::unique_ptr<NearbyApiCallFlow> api_call_flow, + signin::IdentityManager* identity_manager, + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) { + if (g_test_factory_) { + return g_test_factory_->CreateInstance(std::move(api_call_flow), + identity_manager, + std::move(url_loader_factory)); + } + + return base::WrapUnique(new NearbyPresenceServerClientImpl( + std::move(api_call_flow), identity_manager, + std::move(url_loader_factory))); +} + +// static +void NearbyPresenceServerClientImpl::Factory::SetFactoryForTesting( + Factory* test_factory) { + g_test_factory_ = test_factory; +} + +NearbyPresenceServerClientImpl::Factory::~Factory() = default; + NearbyPresenceServerClientImpl::NearbyPresenceServerClientImpl( std::unique_ptr<NearbyApiCallFlow> api_call_flow, signin::IdentityManager* identity_manager, @@ -326,19 +355,4 @@ std::move(error_callback_).Run(error); } -NearbyPresenceServerClientImpl::FactoryImpl::FactoryImpl( - signin::IdentityManager* identity_manager, - scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) - : identity_manager_(identity_manager), - url_loader_factory_(std::move(url_loader_factory)) {} - -NearbyPresenceServerClientImpl::FactoryImpl::~FactoryImpl() = default; - -std::unique_ptr<NearbyPresenceServerClient> -NearbyPresenceServerClientImpl::FactoryImpl::CreateInstance() { - return std::make_unique<NearbyPresenceServerClientImpl>( - std::make_unique<NearbyApiCallFlowImpl>(), identity_manager_, - url_loader_factory_); -} - } // namespace ash::nearby::presence
diff --git a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.h b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.h index 66371c3..0338fd91 100644 --- a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.h +++ b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.h
@@ -45,36 +45,30 @@ // will be deleted in favor of this class. class NearbyPresenceServerClientImpl : public NearbyPresenceServerClient { public: - // Implementation of NearbyPresenceServerClientFactory. - class FactoryImpl : public NearbyPresenceServerClient::Factory { + // Interface for creating NearbyPresenceServerClient instances. Because each + // NearbyPresenceServerClient instance can only be used for one API call, a + // factory makes it easier to make multiple requests in sequence or in + // parallel. + class Factory { public: - // |identity_manager|: Gets the user's access token. - // Not owned, so |identity_manager| needs to outlive this object. - // |url_loader_factory|: Used to make the HTTP requests. - FactoryImpl( + static std::unique_ptr<NearbyPresenceServerClient> Create( + std::unique_ptr<NearbyApiCallFlow> api_call_flow, signin::IdentityManager* identity_manager, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); - ~FactoryImpl() override; + static void SetFactoryForTesting(Factory* test_factory); - FactoryImpl(FactoryImpl&) = delete; - FactoryImpl& operator=(FactoryImpl&) = delete; - - // NearbyPresenceServerClient::Factory: - std::unique_ptr<NearbyPresenceServerClient> CreateInstance() override; + protected: + virtual ~Factory(); + virtual std::unique_ptr<NearbyPresenceServerClient> CreateInstance( + std::unique_ptr<NearbyApiCallFlow> api_call_flow, + signin::IdentityManager* identity_manager, + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) = 0; private: - const raw_ptr<signin::IdentityManager> identity_manager_; - const scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; + static Factory* g_test_factory_; }; - // Creates the client using |url_loader_factory| to make the HTTP request - // through |api_call_flow|. - NearbyPresenceServerClientImpl( - std::unique_ptr<ash::nearby::NearbyApiCallFlow> api_call_flow, - signin::IdentityManager* identity_manager, - scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); ~NearbyPresenceServerClientImpl() override; - NearbyPresenceServerClientImpl(NearbyPresenceServerClientImpl&) = delete; NearbyPresenceServerClientImpl& operator=(NearbyPresenceServerClientImpl&) = delete; @@ -90,6 +84,13 @@ std::string GetAccessTokenUsed() override; private: + // Creates the client using |url_loader_factory| to make the HTTP request + // through |api_call_flow|. + NearbyPresenceServerClientImpl( + std::unique_ptr<ash::nearby::NearbyApiCallFlow> api_call_flow, + signin::IdentityManager* identity_manager, + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + enum class RequestType { kGet, kPost, kPatch }; // Starts a call to the API given by |request_url|. The client first fetches
diff --git a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl_unittest.cc b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl_unittest.cc index e93c4bc3..d27b075a344 100644 --- a/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl_unittest.cc +++ b/chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl_unittest.cc
@@ -170,16 +170,19 @@ std::make_unique<FakeNearbyApiCallFlow>(); api_call_flow_ = api_call_flow.get(); - client_ = std::make_unique<NearbyPresenceServerClientImpl>( + client_ = NearbyPresenceServerClientImpl::Factory::Create( std::move(api_call_flow), identity_test_environment_.identity_manager(), shared_factory_); } const std::string& http_method() { return api_call_flow_->http_method_; } + const GURL& request_url() { return api_call_flow_->request_url_; } + const std::string& serialized_request() { return api_call_flow_->serialized_request_; } + const NearbyApiCallFlow::QueryParameters& request_as_query_parameters() { return api_call_flow_->request_as_query_parameters_; }
diff --git a/chromeos/ash/components/phonehub/cros_state_sender.cc b/chromeos/ash/components/phonehub/cros_state_sender.cc index 2992659..b12961b 100644 --- a/chromeos/ash/components/phonehub/cros_state_sender.cc +++ b/chromeos/ash/components/phonehub/cros_state_sender.cc
@@ -5,6 +5,7 @@ #include "chromeos/ash/components/phonehub/cros_state_sender.h" #include "ash/constants/ash_features.h" +#include "base/metrics/histogram_functions.h" #include "chromeos/ash/components/multidevice/logging/logging.h" #include "chromeos/ash/components/phonehub/message_sender.h" #include "chromeos/ash/components/phonehub/phone_model.h" @@ -103,6 +104,7 @@ return; } + attestation_generating_start_time_ = base::Time::Now(); attestation_certificate_generator_->GenerateCertificate( base::BindRepeating(&CrosStateSender::OnAttestationCertificateGenerated, weak_ptr_factory_.GetWeakPtr())); @@ -112,10 +114,16 @@ const std::vector<std::string>& attestation_certs, bool is_valid) { if (!is_valid) { + base::UmaHistogramLongTimes( + "PhoneHub.Attestation.GeneratingTime.Invalid", + base::Time::Now() - attestation_generating_start_time_); SendCrosStateMessage(/*attestation_certs=*/nullptr); return; } + base::UmaHistogramLongTimes( + "PhoneHub.Attestation.GeneratingTime", + base::Time::Now() - attestation_generating_start_time_); SendCrosStateMessage(std::move(&attestation_certs)); }
diff --git a/chromeos/ash/components/phonehub/cros_state_sender.h b/chromeos/ash/components/phonehub/cros_state_sender.h index 4ced4c1..543fb05 100644 --- a/chromeos/ash/components/phonehub/cros_state_sender.h +++ b/chromeos/ash/components/phonehub/cros_state_sender.h
@@ -71,6 +71,7 @@ base::TimeDelta retry_delay_; std::unique_ptr<AttestationCertificateGenerator> attestation_certificate_generator_; + base::Time attestation_generating_start_time_; base::WeakPtrFactory<CrosStateSender> weak_ptr_factory_{this}; };
diff --git a/chromeos/tast_control.gni b/chromeos/tast_control.gni index dbf626e..4a72c3d 100644 --- a/chromeos/tast_control.gni +++ b/chromeos/tast_control.gni
@@ -323,6 +323,16 @@ "inputs.VirtualKeyboardHandwriting.floating", "inputs.VirtualKeyboardTypingUserMode.incognito", + # https://crbug.com/1434601 + "apps.LaunchHelpAppFromShortcut.stable_guest", + "apps.LaunchHelpLanguage", + "arc.GuestPlayStore", + "inputs.InputMethodManagement.guest", + "inputs.InputMethodShelfInputs", + "inputs.PhysicalKeyboardEmojiSuggestion.guest", + "inputs.VirtualKeyboardTypingOmnibox.guest", + "inputs.VirtualKeyboardTypingUserMode.guest", + # READ COMMENT AT TOP BEFORE ADDING NEW TESTS HERE. ]
diff --git a/components/autofill/core/browser/ui/fast_checkout_client.h b/components/autofill/core/browser/ui/fast_checkout_client.h index fc71133..73695d6 100644 --- a/components/autofill/core/browser/ui/fast_checkout_client.h +++ b/components/autofill/core/browser/ui/fast_checkout_client.h
@@ -43,11 +43,10 @@ virtual void OnNavigation(const GURL& url, bool is_cart_or_checkout_url) = 0; // Returns `true` if a run could be launched on `form` and `field`. - // TODO(crbug.com/1379149): Remove once bug is resolved. virtual bool IsSupported( const autofill::FormData& form, const autofill::FormFieldData& field, - const autofill::AutofillManager& autofill_manager) = 0; + const autofill::AutofillManager& autofill_manager) const = 0; virtual bool IsNotShownYet() const = 0;
diff --git a/components/autofill/core/browser/ui/mock_fast_checkout_client.h b/components/autofill/core/browser/ui/mock_fast_checkout_client.h index 751aaa6..afe6ea1 100644 --- a/components/autofill/core/browser/ui/mock_fast_checkout_client.h +++ b/components/autofill/core/browser/ui/mock_fast_checkout_client.h
@@ -33,7 +33,7 @@ (const autofill::FormData&, const autofill::FormFieldData&, const autofill::AutofillManager&), - (override)); + (const override)); MOCK_METHOD(bool, IsNotShownYet, (), (const override)); };
diff --git a/components/exo/buffer.cc b/components/exo/buffer.cc index 491774b2b..ec5a3527 100644 --- a/components/exo/buffer.cc +++ b/components/exo/buffer.cc
@@ -155,7 +155,7 @@ mailbox_ = sii->CreateSharedImage(viz::SinglePlaneFormat::kRGBA_8888, size, color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, usage, + kPremul_SkAlphaType, usage, "ExoTexture", gpu::kNullSurfaceHandle); DCHECK(!mailbox_.IsZero()); gpu::raster::RasterInterface* ri = context_provider_->RasterInterface(); @@ -193,7 +193,7 @@ } mailbox_ = sii->CreateSharedImage( gpu_memory_buffer_, gpu_memory_buffer_manager, color_space, - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage); + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, "ExoTexture"); DCHECK(!mailbox_.IsZero()); gpu::raster::RasterInterface* ri = context_provider_->RasterInterface(); sync_token_out = sii->GenUnverifiedSyncToken();
diff --git a/components/exo/extended_drag_source.cc b/components/exo/extended_drag_source.cc index f38c42c..b5219104 100644 --- a/components/exo/extended_drag_source.cc +++ b/components/exo/extended_drag_source.cc
@@ -323,7 +323,6 @@ if (auto* window_holder = self->dragged_window_holder_.get()) { if (auto* toplevel = window_holder->toplevel_window()) { toplevel->ClearProperty(ash::kIsDraggingTabsKey); - toplevel->ClearProperty(ash::kTabDraggingSourceWindowKey); } } self->dragged_window_holder_.reset(); @@ -357,10 +356,6 @@ aura::Window* toplevel = dragged_window_holder_->toplevel_window(); DCHECK(toplevel); toplevel->SetProperty(ash::kIsDraggingTabsKey, true); - if (drag_source_window_ && drag_source_window_ != toplevel) { - toplevel->SetProperty(ash::kTabDraggingSourceWindowKey, - drag_source_window_); - } } void ExtendedDragSource::OnDraggedWindowVisibilityChanged(bool visible) {
diff --git a/components/fuchsia_legacymetrics/OWNERS b/components/fuchsia_legacymetrics/OWNERS index fd58a1c25..e7034ea 100644 --- a/components/fuchsia_legacymetrics/OWNERS +++ b/components/fuchsia_legacymetrics/OWNERS
@@ -1,2 +1 @@ -kmarshall@chromium.org file://build/fuchsia/OWNERS
diff --git a/components/live_caption/caption_bubble_controller.h b/components/live_caption/caption_bubble_controller.h index c93f88ca..32d1fc1 100644 --- a/components/live_caption/caption_bubble_controller.h +++ b/components/live_caption/caption_bubble_controller.h
@@ -40,7 +40,8 @@ CaptionBubbleController& operator=(const CaptionBubbleController&) = delete; static std::unique_ptr<CaptionBubbleController> Create( - PrefService* profile_prefs); + PrefService* profile_prefs, + const std::string& application_locale); // Called when a transcription is received from the service. Returns whether // the transcription result was set on the caption bubble successfully.
diff --git a/components/live_caption/live_caption_controller.cc b/components/live_caption/live_caption_controller.cc index 990f45eb..5bca6b4 100644 --- a/components/live_caption/live_caption_controller.cc +++ b/components/live_caption/live_caption_controller.cc
@@ -41,10 +41,12 @@ LiveCaptionController::LiveCaptionController( PrefService* profile_prefs, PrefService* global_prefs, + const std::string& application_locale, content::BrowserContext* browser_context) : profile_prefs_(profile_prefs), global_prefs_(global_prefs), - browser_context_(browser_context) { + browser_context_(browser_context), + application_locale_(application_locale) { base::UmaHistogramBoolean("Accessibility.LiveCaption.FeatureEnabled2", IsLiveCaptionFeatureSupported()); @@ -185,7 +187,8 @@ is_ui_constructed_ = true; - caption_bubble_controller_ = CaptionBubbleController::Create(profile_prefs_); + caption_bubble_controller_ = + CaptionBubbleController::Create(profile_prefs_, application_locale_); caption_bubble_controller_->UpdateCaptionStyle(caption_style_); // Observe native theme changes for caption style updates.
diff --git a/components/live_caption/live_caption_controller.h b/components/live_caption/live_caption_controller.h index f91f8a6..fcec207 100644 --- a/components/live_caption/live_caption_controller.h +++ b/components/live_caption/live_caption_controller.h
@@ -45,9 +45,10 @@ public speech::SodaInstaller::Observer, public ui::NativeThemeObserver { public: - explicit LiveCaptionController(PrefService* profile_prefs, - PrefService* global_prefs, - content::BrowserContext* browser_context); + LiveCaptionController(PrefService* profile_prefs, + PrefService* global_prefs, + const std::string& application_locale, + content::BrowserContext* browser_context); ~LiveCaptionController() override; LiveCaptionController(const LiveCaptionController&) = delete; LiveCaptionController& operator=(const LiveCaptionController&) = delete; @@ -110,6 +111,8 @@ std::unique_ptr<CaptionBubbleController> caption_bubble_controller_; absl::optional<ui::CaptionStyle> caption_style_; + const std::string application_locale_; + // Whether Live Caption is enabled. bool enabled_ = false;
diff --git a/components/live_caption/views/caption_bubble.cc b/components/live_caption/views/caption_bubble.cc index 9056e408..5b3f770f 100644 --- a/components/live_caption/views/caption_bubble.cc +++ b/components/live_caption/views/caption_bubble.cc
@@ -10,6 +10,7 @@ #include <utility> #include <vector> +#include "base/feature_list.h" #include "base/functional/bind.h" #include "base/memory/raw_ptr.h" #include "base/metrics/histogram_functions.h" @@ -19,9 +20,11 @@ #include "build/build_config.h" #include "components/live_caption/caption_bubble_context.h" #include "components/live_caption/pref_names.h" +#include "components/prefs/pref_change_registrar.h" #include "components/prefs/pref_service.h" #include "components/strings/grit/components_strings.h" #include "components/vector_icons/vector_icons.h" +#include "media/base/media_switches.h" #include "third_party/re2/src/re2/re2.h" #include "ui/accessibility/ax_action_data.h" #include "ui/accessibility/ax_enums.mojom.h" @@ -75,6 +78,7 @@ // Formatting constants static constexpr int kLineHeightDip = 24; +static constexpr int kLiveTranslateLabelLineHeightDip = 18; static constexpr int kNumLinesCollapsed = 2; static constexpr int kNumLinesExpanded = 8; static constexpr int kCornerRadiusDip = 4; @@ -88,6 +92,7 @@ static constexpr char kSecondaryFont[] = "Arial"; static constexpr char kTertiaryFont[] = "sans-serif"; static constexpr int kFontSizePx = 16; +static constexpr int kLiveTranslateLabelFontSizePx = 11; static constexpr double kDefaultRatioInParentX = 0.5; static constexpr double kDefaultRatioInParentY = 1; static constexpr int kErrorImageSizeDip = 20; @@ -405,9 +410,11 @@ #endif CaptionBubble::CaptionBubble(PrefService* profile_prefs, + const std::string& application_locale, base::OnceClosure destroyed_callback) : profile_prefs_(profile_prefs), destroyed_callback_(std::move(destroyed_callback)), + application_locale_(application_locale), is_expanded_( profile_prefs_->GetBoolean(prefs::kLiveCaptionBubbleExpanded)), is_pinned_(profile_prefs_->GetBoolean(prefs::kLiveCaptionBubblePinned)), @@ -422,6 +429,13 @@ SetTitle(IDS_LIVE_CAPTION_BUBBLE_TITLE); set_has_parent(false); + pref_change_registrar_ = std::make_unique<PrefChangeRegistrar>(); + pref_change_registrar_->Init(profile_prefs_); + pref_change_registrar_->Add( + prefs::kLiveTranslateEnabled, + base::BindRepeating(&CaptionBubble::OnLiveTranslateEnabledChanged, + base::Unretained(this))); + inactivity_timer_ = std::make_unique<base::RetainingOneShotTimer>( FROM_HERE, base::Seconds(kNoActivityIntervalSeconds), base::BindRepeating(&CaptionBubble::OnInactivityTimeout, @@ -539,6 +553,9 @@ const std::u16string link = l10n_util::GetStringUTF16(IDS_LIVE_CAPTION_BUBBLE_CONTENT_SETTINGS); + media_foundation_renderer_error_text->SetText(l10n_util::GetStringFUTF16( + IDS_LIVE_CAPTION_BUBBLE_MEDIA_FOUNDATION_RENDERER_ERROR, link)); + auto media_foundation_renderer_error_checkbox = std::make_unique<views::Checkbox>( l10n_util::GetStringUTF16( @@ -621,6 +638,36 @@ content_container->AddChildView(std::move(collapse_button)); AddChildView(std::move(header_container)); + if (base::FeatureList::IsEnabled(media::kLiveTranslate)) { + views::View* live_translate_container = new views::View(); + live_translate_container->SetLayoutManager( + std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kHorizontal, + gfx::Insets::TLBR(0, kSidePaddingDip, 0, kSidePaddingDip))); + + auto live_translate_label = std::make_unique<views::StyledLabel>(); + live_translate_label->SetVisible( + profile_prefs_->GetBoolean(prefs::kLiveTranslateEnabled)); + live_translate_label->SetDisplayedOnBackgroundColor(SK_ColorTRANSPARENT); + live_translate_label->SetHorizontalAlignment( + gfx::HorizontalAlignment::ALIGN_LEFT); + live_translate_label->GetViewAccessibility().OverrideIsIgnored(true); + + source_language_ = speech::GetLanguageDisplayName( + profile_prefs_->GetString(prefs::kLiveCaptionLanguageCode), + application_locale_); + target_language_ = speech::GetLanguageDisplayName( + profile_prefs_->GetString(prefs::kLiveTranslateTargetLanguageCode), + application_locale_); + std::u16string label_text = l10n_util::GetStringFUTF16( + IDS_LIVE_CAPTION_TRANSLATED_CAPTIONS, source_language_, + target_language_, &live_translate_label_offsets_); + live_translate_label->SetText(label_text); + live_translate_label_ = + live_translate_container->AddChildView(std::move(live_translate_label)); + AddChildView(std::move(live_translate_container)); + } + AddChildView(std::move(content_container)); UpdateContentSize(); @@ -669,6 +716,12 @@ ResetInactivityTimer(); } +void CaptionBubble::OnLiveTranslateEnabledChanged() { + live_translate_label_->SetVisible( + profile_prefs_->GetBoolean(prefs::kLiveTranslateEnabled)); + Redraw(); +} + void CaptionBubble::GetAccessibleNodeData(ui::AXNodeData* node_data) { node_data->role = ax::mojom::Role::kDialog; node_data->SetNameChecked(title_->GetText()); @@ -892,7 +945,7 @@ } return textScaleFactor; } -const gfx::FontList CaptionBubble::GetFontList() { +const gfx::FontList CaptionBubble::GetFontList(int font_size) { std::vector<std::string> font_names; if (caption_style_) { std::string font_family = @@ -906,14 +959,13 @@ const gfx::FontList font_list = gfx::FontList( font_names, gfx::Font::FontStyle::NORMAL, - kFontSizePx * GetTextScaleFactor(), gfx::Font::Weight::NORMAL); + font_size * GetTextScaleFactor(), gfx::Font::Weight::NORMAL); return font_list; } void CaptionBubble::SetTextSizeAndFontFamily() { double textScaleFactor = GetTextScaleFactor(); - const gfx::FontList font_list = GetFontList(); - + const gfx::FontList font_list = GetFontList(kFontSizePx); label_->SetFontList(font_list); title_->SetFontList(font_list.DeriveWithStyle(gfx::Font::FontStyle::ITALIC)); generic_error_text_->SetFontList(font_list); @@ -921,6 +973,10 @@ label_->SetLineHeight(kLineHeightDip * textScaleFactor); label_->SetMaximumWidth(kMaxWidthDip * textScaleFactor - kSidePaddingDip * 2); title_->SetLineHeight(kLineHeightDip * textScaleFactor); + if (base::FeatureList::IsEnabled(media::kLiveTranslate)) { + live_translate_label_->SetLineHeight(kLiveTranslateLabelLineHeightDip * + textScaleFactor); + } generic_error_text_->SetLineHeight(kLineHeightDip * textScaleFactor); generic_error_icon_->SetImageSize( gfx::Size(kErrorImageSizeDip * textScaleFactor, @@ -952,14 +1008,33 @@ generic_error_icon_->SetImage( gfx::CreateVectorIcon(vector_icons::kErrorOutlineIcon, text_color)); + + // Update Live Translate label style + if (base::FeatureList::IsEnabled(media::kLiveTranslate)) { + const gfx::FontList live_translate_font_list = + GetFontList(kLiveTranslateLabelFontSizePx); + + views::StyledLabel::RangeStyleInfo live_translate_label_style; + live_translate_label_style.custom_font = live_translate_font_list; + live_translate_label_style.override_color = color_provider->GetColor( + ui::kColorLiveCaptionBubbleForegroundSecondary); + + views::StyledLabel::RangeStyleInfo live_translate_language_style; + live_translate_language_style.custom_font = live_translate_font_list; + live_translate_language_style.override_color = text_color; + + UpdateLiveTranslateLabelStyle(live_translate_label_style, + live_translate_language_style); + } #if BUILDFLAG(IS_WIN) const std::u16string link = l10n_util::GetStringUTF16(IDS_LIVE_CAPTION_BUBBLE_CONTENT_SETTINGS); size_t offset; const std::u16string text = l10n_util::GetStringFUTF16( - IDS_LIVE_CAPTION_BUBBLE_MEDIA_FOUNDATION_RENDERER_ERROR, link, &offset); - media_foundation_renderer_error_text_->SetText(text); + IDS_LIVE_CAPTION_BUBBLE_MEDIA_FOUNDATION_RENDERER_ERROR, + l10n_util::GetStringUTF16(IDS_LIVE_CAPTION_BUBBLE_CONTENT_SETTINGS), + &offset); media_foundation_renderer_error_text_->ClearStyleRanges(); views::StyledLabel::RangeStyleInfo error_message_style; @@ -1019,6 +1094,25 @@ set_color(background_color); } +void CaptionBubble::UpdateLiveTranslateLabelStyle( + views::StyledLabel::RangeStyleInfo label_style, + views::StyledLabel::RangeStyleInfo languages_style) { + live_translate_label_->AddStyleRange( + gfx::Range(0, live_translate_label_offsets_[0]), label_style); + live_translate_label_->AddStyleRange( + gfx::Range(live_translate_label_offsets_[0], + live_translate_label_offsets_[0] + source_language_.length()), + languages_style); + live_translate_label_->AddStyleRange( + gfx::Range(live_translate_label_offsets_[0] + source_language_.length(), + live_translate_label_offsets_[1]), + label_style); + live_translate_label_->AddStyleRange( + gfx::Range(live_translate_label_offsets_[1], + live_translate_label_offsets_[1] + target_language_.length()), + languages_style); +} + void CaptionBubble::RepositionInContextRect(CaptionBubbleModel::Id model_id, const gfx::Rect& context_rect) { // We shouldn't reposition ourselves into the context rect of a model that is @@ -1051,6 +1145,7 @@ int width = kMaxWidthDip * text_scale_factor; int content_height = kLineHeightDip * GetNumLinesVisible() * text_scale_factor; + // The title takes up 1 line. int label_height = title_->GetVisible() ? content_height - kLineHeightDip * text_scale_factor @@ -1067,6 +1162,16 @@ } #endif + // The Live Translate label takes up 1 line. + if (base::FeatureList::IsEnabled(media::kLiveTranslate) && + live_translate_label_->GetVisible()) { + int live_translate_label_height = + kLiveTranslateLabelLineHeightDip * text_scale_factor; + live_translate_label_->SetPreferredSize( + gfx::Size(width - kSidePaddingDip, live_translate_label_height)); + content_height += live_translate_label_height; + } + // The header height is the same as the close button height. The footer height // is the same as the expand button height. SetPreferredSize(gfx::Size( @@ -1161,6 +1266,10 @@ return static_cast<views::Label*>(label_); } +views::StyledLabel* CaptionBubble::GetLiveTranslateLabelForTesting() { + return static_cast<views::StyledLabel*>(live_translate_label_); +} + bool CaptionBubble::IsGenericErrorMessageVisibleForTesting() const { return generic_error_message_->GetVisible(); }
diff --git a/components/live_caption/views/caption_bubble.h b/components/live_caption/views/caption_bubble.h index e607a28..a6fc867b 100644 --- a/components/live_caption/views/caption_bubble.h +++ b/components/live_caption/views/caption_bubble.h
@@ -23,6 +23,8 @@ #include "ui/views/controls/styled_label.h" #include "ui/views/metadata/view_factory.h" +class PrefChangeRegistrar; + namespace base { class RetainingOneShotTimer; class TickClock; @@ -70,6 +72,7 @@ public: METADATA_HEADER(CaptionBubble); CaptionBubble(PrefService* profile_prefs, + const std::string& application_locale, base::OnceClosure destroyed_callback); CaptionBubble(const CaptionBubble&) = delete; CaptionBubble& operator=(const CaptionBubble&) = delete; @@ -93,6 +96,7 @@ bool HasActivity(); views::Label* GetLabelForTesting(); + views::StyledLabel* GetLiveTranslateLabelForTesting(); bool IsGenericErrorMessageVisibleForTesting() const; base::RetainingOneShotTimer* GetInactivityTimerForTesting(); void set_tick_clock_for_testing(const base::TickClock* tick_clock) { @@ -119,6 +123,7 @@ void OnWidgetBoundsChanged(views::Widget* widget, const gfx::Rect& new_bounds) override; void OnWidgetActivationChanged(views::Widget* widget, bool active) override; + void OnLiveTranslateEnabledChanged(); void GetAccessibleNodeData(ui::AXNodeData* node_data) override; std::u16string GetAccessibleWindowTitle() const override; void OnThemeChanged() override; @@ -174,10 +179,13 @@ // The following methods set the caption bubble style based on the user's // preferences, which are stored in `caption_style_`. double GetTextScaleFactor(); - const gfx::FontList GetFontList(); + const gfx::FontList GetFontList(int font_size); void SetTextSizeAndFontFamily(); void SetTextColor(); void SetBackgroundColor(); + void UpdateLiveTranslateLabelStyle( + views::StyledLabel::RangeStyleInfo label_style, + views::StyledLabel::RangeStyleInfo languages_style); // Places the bubble at the bottom center of the context widget for the active // model, ensuring that it's positioned where the user will spot it. If there @@ -203,10 +211,16 @@ void LogSessionEvent(SessionEvent event); + std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; + // Unowned. Owned by views hierarchy. raw_ptr<CaptionBubbleLabel> label_; raw_ptr<views::Label> title_; raw_ptr<views::Label> generic_error_text_; + raw_ptr<views::StyledLabel> live_translate_label_; + std::u16string source_language_; + std::u16string target_language_; + std::vector<size_t> live_translate_label_offsets_; raw_ptr<views::ImageView> generic_error_icon_; raw_ptr<views::View> generic_error_message_; raw_ptr<views::ImageButton> back_to_tab_button_; @@ -235,6 +249,8 @@ OnDoNotShowAgainClickedCallback error_silenced_callback_; base::ScopedClosureRunner destroyed_callback_; + const std::string application_locale_; + // Whether the caption bubble is expanded to show more lines of text. bool is_expanded_;
diff --git a/components/live_caption/views/caption_bubble_controller_views.cc b/components/live_caption/views/caption_bubble_controller_views.cc index 3060d93d..16621f7f 100644 --- a/components/live_caption/views/caption_bubble_controller_views.cc +++ b/components/live_caption/views/caption_bubble_controller_views.cc
@@ -20,14 +20,17 @@ // Static std::unique_ptr<CaptionBubbleController> CaptionBubbleController::Create( - PrefService* profile_prefs) { - return std::make_unique<CaptionBubbleControllerViews>(profile_prefs); + PrefService* profile_prefs, + const std::string& application_locale) { + return std::make_unique<CaptionBubbleControllerViews>(profile_prefs, + application_locale); } CaptionBubbleControllerViews::CaptionBubbleControllerViews( - PrefService* profile_prefs) { + PrefService* profile_prefs, + const std::string& application_locale) { caption_bubble_ = new CaptionBubble( - profile_prefs, + profile_prefs, application_locale, base::BindOnce(&CaptionBubbleControllerViews::OnCaptionBubbleDestroyed, base::Unretained(this))); caption_widget_ =
diff --git a/components/live_caption/views/caption_bubble_controller_views.h b/components/live_caption/views/caption_bubble_controller_views.h index c724937..29a27085 100644 --- a/components/live_caption/views/caption_bubble_controller_views.h +++ b/components/live_caption/views/caption_bubble_controller_views.h
@@ -34,7 +34,8 @@ // class CaptionBubbleControllerViews : public CaptionBubbleController { public: - explicit CaptionBubbleControllerViews(PrefService* profile_prefs); + CaptionBubbleControllerViews(PrefService* profile_prefs, + const std::string& application_locale); ~CaptionBubbleControllerViews() override; CaptionBubbleControllerViews(const CaptionBubbleControllerViews&) = delete; CaptionBubbleControllerViews& operator=(const CaptionBubbleControllerViews&) =
diff --git a/components/live_caption_strings.grdp b/components/live_caption_strings.grdp index f4fb054..a4563c9 100644 --- a/components/live_caption_strings.grdp +++ b/components/live_caption_strings.grdp
@@ -37,4 +37,7 @@ <message name="IDS_LIVE_CAPTION_BUBBLE_APPEAR_SCREENREADER_ANNOUNCEMENT" desc="Announcement to screen readers on ChromeOS when the Live Caption bubble appears to inform users of how to focus the bubble."> Live Caption visible, use window switcher to focus </message> + <message name="IDS_LIVE_CAPTION_TRANSLATED_CAPTIONS" desc="Label for the Live Caption bubble displaying the source and target translation languages."> + Translating <ph name="SOURCE">$1<ex>Spanish</ex></ph> to <ph name="TARGET">$2<ex>English</ex></ph> + </message> </grit-part>
diff --git a/components/live_caption_strings_grdp/IDS_LIVE_CAPTION_TRANSLATED_CAPTIONS.png.sha1 b/components/live_caption_strings_grdp/IDS_LIVE_CAPTION_TRANSLATED_CAPTIONS.png.sha1 new file mode 100644 index 0000000..109ab13 --- /dev/null +++ b/components/live_caption_strings_grdp/IDS_LIVE_CAPTION_TRANSLATED_CAPTIONS.png.sha1
@@ -0,0 +1 @@ +3ea726ebacfffec6d4f2188c1c871c8927abb3af \ No newline at end of file
diff --git a/components/metrics/url_constants.cc b/components/metrics/url_constants.cc index eb1b5b6..a0460f6 100644 --- a/components/metrics/url_constants.cc +++ b/components/metrics/url_constants.cc
@@ -16,4 +16,8 @@ const char kDefaultMetricsMimeType[] = "application/vnd.chrome.uma"; +const char kDefaultUkmServerUrl[] = "https://clients4.google.com/ukm"; + +const char kUkmMimeType[] = "application/vnd.chrome.ukm"; + } // namespace metrics
diff --git a/components/metrics/url_constants.h b/components/metrics/url_constants.h index d06f0aa4..92fd0ef7 100644 --- a/components/metrics/url_constants.h +++ b/components/metrics/url_constants.h
@@ -19,6 +19,12 @@ // The default MIME type for the uploaded metrics data. extern const char kDefaultMetricsMimeType[]; +// The UKM server's URL. +extern const char kDefaultUkmServerUrl[]; + +// The UKM server's MIME type. +extern const char kUkmMimeType[]; + } // namespace metrics #endif // COMPONENTS_METRICS_URL_CONSTANTS_H_
diff --git a/components/omnibox/browser/omnibox_view.cc b/components/omnibox/browser/omnibox_view.cc index 6db2f6d1..f7827a6e 100644 --- a/components/omnibox/browser/omnibox_view.cc +++ b/components/omnibox/browser/omnibox_view.cc
@@ -213,7 +213,7 @@ // For search queries, display default search engine's favicon. If the // default search engine is google return the icon instead of favicon for // search queries with the chrome refresh feature. - if (features::IsChromeRefresh2023()) { + if (OmniboxFieldTrial::IsChromeRefreshIconsEnabled()) { if (search::DefaultSearchProviderIsGoogle( model_->client()->GetTemplateURLService())) { // For non chrome builds this would return an empty image model. In
diff --git a/components/password_manager/core/browser/ui/saved_passwords_presenter.cc b/components/password_manager/core/browser/ui/saved_passwords_presenter.cc index 2977a3c..32741ea 100644 --- a/components/password_manager/core/browser/ui/saved_passwords_presenter.cc +++ b/components/password_manager/core/browser/ui/saved_passwords_presenter.cc
@@ -359,7 +359,8 @@ } void SavedPasswordsPresenter::MoveCredentialsToAccount( - const std::vector<CredentialUIEntry>& credentials) { + const std::vector<CredentialUIEntry>& credentials, + metrics_util::MoveToAccountStoreTrigger trigger) { for (const auto& credential : credentials) { std::vector<PasswordForm> move_form_candidates = GetCorrespondingPasswordForms(credential); @@ -387,8 +388,7 @@ base::UmaHistogramEnumeration( "PasswordManager.AccountStorage.MoveToAccountStoreFlowAccepted2", - metrics_util::MoveToAccountStoreTrigger:: - kExplicitlyTriggeredForMultiplePasswordsInSettings); + trigger); } std::vector<CredentialUIEntry> SavedPasswordsPresenter::GetSavedCredentials()
diff --git a/components/password_manager/core/browser/ui/saved_passwords_presenter.h b/components/password_manager/core/browser/ui/saved_passwords_presenter.h index a32ec5d..60b1033 100644 --- a/components/password_manager/core/browser/ui/saved_passwords_presenter.h +++ b/components/password_manager/core/browser/ui/saved_passwords_presenter.h
@@ -21,6 +21,10 @@ namespace password_manager { +namespace metrics_util { +enum class MoveToAccountStoreTrigger; +} + class AffiliationService; class PasswordUndoHelper; class PasswordsGrouper; @@ -151,9 +155,11 @@ const CredentialUIEntry& updated_credential); // Moves credential to an account by deleting them from profile password store - // and adding them to the account password store. + // and adding them to the account password store. `trigger` is used to record + // per entry point metrics. void MoveCredentialsToAccount( - const std::vector<CredentialUIEntry>& credentials); + const std::vector<CredentialUIEntry>& credentials, + metrics_util::MoveToAccountStoreTrigger trigger); // Returns a list of unique passwords which includes normal credentials, // federated credentials and blocked forms. If a same form is present both on
diff --git a/components/password_manager/core/browser/ui/saved_passwords_presenter_unittest.cc b/components/password_manager/core/browser/ui/saved_passwords_presenter_unittest.cc index f5518b4..ce46da7 100644 --- a/components/password_manager/core/browser/ui/saved_passwords_presenter_unittest.cc +++ b/components/password_manager/core/browser/ui/saved_passwords_presenter_unittest.cc
@@ -1709,7 +1709,9 @@ EXPECT_CALL(*profile_store(), RemoveLogin(form_1)); EXPECT_CALL(*profile_store(), RemoveLogin(form_2)); - presenter().MoveCredentialsToAccount(credentials); + presenter().MoveCredentialsToAccount( + credentials, + metrics_util::MoveToAccountStoreTrigger::kExplicitlyTriggeredInSettings); } TEST_F(SavedPasswordsPresenterMoveToAccountTest, @@ -1742,7 +1744,9 @@ EXPECT_CALL(*account_store(), AddLogin).Times(0); EXPECT_CALL(*profile_store(), RemoveLogin(form_profile)); - presenter().MoveCredentialsToAccount(credentials); + presenter().MoveCredentialsToAccount( + credentials, + metrics_util::MoveToAccountStoreTrigger::kExplicitlyTriggeredInSettings); } } // namespace password_manager
diff --git a/components/policy/core/common/BUILD.gn b/components/policy/core/common/BUILD.gn index 4bbc223..b914486e 100644 --- a/components/policy/core/common/BUILD.gn +++ b/components/policy/core/common/BUILD.gn
@@ -268,6 +268,8 @@ "management/platform_management_status_provider_win.h", "policy_loader_win.cc", "policy_loader_win.h", + "scoped_critical_policy_section.cc", + "scoped_critical_policy_section.h", ] libs = [ "netapi32.lib", @@ -621,7 +623,10 @@ data = [ "//chrome/test/data/policy/" ] } if (is_win) { - sources += [ "policy_loader_win_unittest.cc" ] + sources += [ + "policy_loader_win_unittest.cc", + "scoped_critical_policy_section_unittest.cc", + ] } if (is_chromeos_lacros) { sources += [ "policy_loader_lacros_unittest.cc" ]
diff --git a/components/policy/core/common/async_policy_loader.cc b/components/policy/core/common/async_policy_loader.cc index f22b9ada..4720c11 100644 --- a/components/policy/core/common/async_policy_loader.cc +++ b/components/policy/core/common/async_policy_loader.cc
@@ -67,8 +67,7 @@ // `management_service_` must be called on the main thread. // base::Unretained is okay here since `management_service_` is an instance of // PlatformManagementService which is a singleton that outlives this class. - if (!platform_management_trustworthiness_.has_value() && - management_service_) { + if (NeedManagementBitBeforeLoad()) { DCHECK_EQ(management_service_, PlatformManagementService::GetInstance()); ui_thread_task_runner_->PostTaskAndReplyWithResult( FROM_HERE, @@ -125,6 +124,11 @@ Reload(force); } +bool AsyncPolicyLoader::NeedManagementBitBeforeLoad() { + return !platform_management_trustworthiness_.has_value() && + management_service_; +} + PolicyBundle AsyncPolicyLoader::InitialLoad( const scoped_refptr<SchemaMap>& schema_map) { // This is the first load, early during startup. Use this to record the
diff --git a/components/policy/core/common/async_policy_loader.h b/components/policy/core/common/async_policy_loader.h index 7ee411f..c77212b9 100644 --- a/components/policy/core/common/async_policy_loader.h +++ b/components/policy/core/common/async_policy_loader.h
@@ -51,7 +51,9 @@ virtual ~AsyncPolicyLoader(); // Gets a SequencedTaskRunner backed by the background thread. - base::SequencedTaskRunner* task_runner() const { return task_runner_.get(); } + const scoped_refptr<base::SequencedTaskRunner>& task_runner() const { + return task_runner_; + } // Returns the currently configured policies. Load() is always invoked on // the background thread, except for the initial Load() at startup which is @@ -81,7 +83,7 @@ // When |periodic_updates_| is true a reload is posted periodically, if it // hasn't been triggered recently. This makes sure the policies are reloaded // if the update events aren't triggered. - void Reload(bool force); + virtual void Reload(bool force); // Returns `true` and only if the platform is not managed by a trusted source. bool ShouldFilterSensitivePolicies(); @@ -97,6 +99,11 @@ reload_interval_ = reload_interval; } + protected: + // Return true if we need to asynchronously get + //`platform_management_trustworthiness_` bit before reloading policies. + bool NeedManagementBitBeforeLoad(); + private: // Allow AsyncPolicyProvider to call Init(). friend class AsyncPolicyProvider;
diff --git a/components/policy/core/common/policy_loader_win.cc b/components/policy/core/common/policy_loader_win.cc index 0714452d..8283bd7 100644 --- a/components/policy/core/common/policy_loader_win.cc +++ b/components/policy/core/common/policy_loader_win.cc
@@ -3,6 +3,8 @@ // found in the LICENSE file. #include "components/policy/core/common/policy_loader_win.h" +#include "base/feature_list.h" +#include "components/policy/core/common/async_policy_loader.h" // Must be included before lm.h #include <windows.h> @@ -50,6 +52,7 @@ #include "components/policy/core/common/policy_types.h" #include "components/policy/core/common/registry_dict.h" #include "components/policy/core/common/schema.h" +#include "components/policy/core/common/scoped_critical_policy_section.h" #include "components/policy/policy_constants.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -61,6 +64,11 @@ const char kKeyRecommended[] = "recommended"; const char kKeyThirdParty[] = "3rdparty"; +// Kill switcher for critical policy section API usage. +BASE_FEATURE(kCriticalPolicySection, + "CriticalPolicySection", + base::FEATURE_ENABLED_BY_DEFAULT); + // The list of possible errors that can occur while collecting information about // the current enterprise environment. // This enum is used to define the buckets for an enumerated UMA histogram. @@ -321,6 +329,29 @@ return bundle; } +void PolicyLoaderWin::Reload(bool force) { + if (!base::FeatureList::IsEnabled(kCriticalPolicySection)) { + AsyncPolicyLoader::Reload(force); + return; + } + + // If we need to get management bit first, no need to enter the critical + // section as we won't actual read the policy. + if (NeedManagementBitBeforeLoad()) { + AsyncPolicyLoader::Reload(force); + return; + } + + ScopedCriticalPolicySection::Enter( + base::BindOnce(&PolicyLoaderWin::OnSectionEntered, + weak_factory_.GetWeakPtr(), force), + task_runner()); +} + +void PolicyLoaderWin::OnSectionEntered(bool force) { + AsyncPolicyLoader::Reload(force); +} + void PolicyLoaderWin::LoadChromePolicy(const RegistryDict* gpo_dict, PolicyLevel level, PolicyScope scope,
diff --git a/components/policy/core/common/policy_loader_win.h b/components/policy/core/common/policy_loader_win.h index 4902c3a..1af6916 100644 --- a/components/policy/core/common/policy_loader_win.h +++ b/components/policy/core/common/policy_loader_win.h
@@ -46,8 +46,12 @@ // AsyncPolicyLoader implementation. void InitOnBackgroundThread() override; PolicyBundle Load() override; + void Reload(bool force) override; private: + // Called after critical policy section being entered. + void OnSectionEntered(bool force); + // Parses Chrome policy from |gpo_dict| for the given |scope| and |level| and // merges it into |chrome_policy_map|. void LoadChromePolicy(const RegistryDict* gpo_dict, @@ -75,6 +79,8 @@ base::win::ObjectWatcher machine_policy_watcher_; bool user_policy_watcher_failed_; bool machine_policy_watcher_failed_; + + base::WeakPtrFactory<PolicyLoaderWin> weak_factory_{this}; }; } // namespace policy
diff --git a/components/policy/core/common/policy_logger.cc b/components/policy/core/common/policy_logger.cc index 416c7a32..1b45e8b 100644 --- a/components/policy/core/common/policy_logger.cc +++ b/components/policy/core/common/policy_logger.cc
@@ -179,7 +179,7 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(logs_list_sequence_checker_); logs_.emplace_back(std::move(new_log)); - if (!is_log_deletion_scheduled_) { + if (!is_log_deletion_scheduled_ && is_log_deletion_enabled_) { ScheduleOldLogsDeletion(); } } @@ -225,6 +225,10 @@ #endif // BUILDFLAG(IS_ANDROID) } +void PolicyLogger::EnableLogDeletion() { + is_log_deletion_enabled_ = true; +} + size_t PolicyLogger::GetPolicyLogsSizeForTesting() const { DCHECK_CALLED_ON_VALID_SEQUENCE(logs_list_sequence_checker_); return logs_.size(); @@ -234,6 +238,7 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(logs_list_sequence_checker_); logs_.erase(logs_.begin(), logs_.end()); is_log_deletion_scheduled_ = false; + is_log_deletion_enabled_ = false; } } // namespace policy
diff --git a/components/policy/core/common/policy_logger.h b/components/policy/core/common/policy_logger.h index 9171b9a..2886fda 100644 --- a/components/policy/core/common/policy_logger.h +++ b/components/policy/core/common/policy_logger.h
@@ -161,6 +161,9 @@ // Checks if browser is running on Android. bool IsPolicyLoggingEnabled() const; + // Sets `is_log_deletion_enabled_` to allow scheduling old log deletion. + void EnableLogDeletion(); + // Returns the logs size for testing purposes. size_t GetPolicyLogsSizeForTesting() const; @@ -181,6 +184,13 @@ // flag. void ScheduleOldLogsDeletion(); + // Log deletion scheduling fails in unit tests when there is no task + // environment (See crbug.com/1434241). To avoid having a task environment in + // every existing and new unit test that calls a function with logs, this flag + // is disabled in unit tests, and enabled everywhere else early in the policy + // stack initialization from `BrowserPolicyConnector::Init`. + bool is_log_deletion_enabled_{false}; + bool is_log_deletion_scheduled_{false}; std::vector<Log> logs_ GUARDED_BY_CONTEXT(logs_list_sequence_checker_);
diff --git a/components/policy/core/common/policy_logger_unittest.cc b/components/policy/core/common/policy_logger_unittest.cc index ff1c75f..a6ffbac 100644 --- a/components/policy/core/common/policy_logger_unittest.cc +++ b/components/policy/core/common/policy_logger_unittest.cc
@@ -72,6 +72,7 @@ // Checks that the deletion of expired logs works as expected. TEST_F(PolicyLoggerTest, DeleteOldLogs) { PolicyLogger* policy_logger = policy::PolicyLogger::GetInstance(); + policy_logger->EnableLogDeletion(); size_t logs_size_before_adding = policy_logger->GetPolicyLogsSizeForTesting(); AddLogs("First log at t=0.", policy_logger);
diff --git a/components/policy/core/common/scoped_critical_policy_section.cc b/components/policy/core/common/scoped_critical_policy_section.cc new file mode 100644 index 0000000..99a5af1 --- /dev/null +++ b/components/policy/core/common/scoped_critical_policy_section.cc
@@ -0,0 +1,119 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/policy/core/common/scoped_critical_policy_section.h" + +#include <userenv.h> +#include <windows.h> + +#include "base/functional/bind.h" +#include "base/logging.h" +#include "base/task/bind_post_task.h" +#include "base/task/sequenced_task_runner.h" +#include "base/task/task_traits.h" +#include "base/task/thread_pool.h" +#include "base/time/time.h" +#include "components/policy/core/common/policy_types.h" + +namespace policy { + +namespace { + +void EnterSection( + ScopedCriticalPolicySection::OnSectionEnteredCallback callback) { + ScopedCriticalPolicySection::Handles handles; + // We need both user and machine handles. Based on MSFT doc, user handle must + // be acquired first to prevent dead lock. + // https://learn.microsoft.com/en-us/windows/win32/api/userenv/nf-userenv-entercriticalpolicysection + // + // If we failed to aquire lock or the API is timeout, we will read the policy + // regardless, as we used to have. + handles.user_handle = ::EnterCriticalPolicySection(false); + if (!handles.user_handle) { + PLOG(WARNING) << "Failed to enter user critical policy section."; + } + handles.machine_handle = ::EnterCriticalPolicySection(true); + if (!handles.machine_handle) { + PLOG(WARNING) << "Failed to enter machine critical policy section."; + } + std::move(callback).Run(handles); +} + +} // namespace + +// static +void ScopedCriticalPolicySection::Enter( + base::OnceClosure callback, + const scoped_refptr<base::SequencedTaskRunner>& task_runner) { + DCHECK(task_runner->RunsTasksInCurrentSequence()); + EnterWithEnterSectionCallback(std::move(callback), EnterSectionCallback(), + task_runner); +} + +// static +void ScopedCriticalPolicySection::EnterWithEnterSectionCallback( + base::OnceClosure callback, + EnterSectionCallback enter_section_callback, + const scoped_refptr<base::SequencedTaskRunner>& task_runner) { + auto scoped_section = + std::make_unique<ScopedCriticalPolicySection>(task_runner); + + scoped_section->enter_section_callback_ = + enter_section_callback ? std::move(enter_section_callback) + : base::BindOnce(&EnterSection); + scoped_section->Init(base::BindOnce( + [](std::unique_ptr<ScopedCriticalPolicySection> scoped_section, + base::OnceClosure callback) { std::move(callback).Run(); }, + std::move(scoped_section), std::move(callback))); +} + +ScopedCriticalPolicySection::ScopedCriticalPolicySection( + const scoped_refptr<base::SequencedTaskRunner>& task_runner) + : task_runner_(task_runner) {} + +ScopedCriticalPolicySection::~ScopedCriticalPolicySection() { + if (machine_handle_) { + ::LeaveCriticalPolicySection(machine_handle_); + } + + if (user_handle_) { + ::LeaveCriticalPolicySection(user_handle_); + } +} + +void ScopedCriticalPolicySection::Init(base::OnceClosure callback) { + DCHECK(!callback_); + callback_ = std::move(callback); + + if (enter_section_callback_) { + // Call ::EnterCriticalPolicySection in a different thread as the API could + // take minutes to return. + // Using `PostTask` instead of `PostTaskAndReplyWithResult` allows unit test + // mimic blocking function easily. + auto on_section_entered = base::BindPostTask( + task_runner_, + base::BindOnce(&ScopedCriticalPolicySection::OnSectionEntered, + weak_factory_.GetWeakPtr())); + base::ThreadPool::PostTask( + FROM_HERE, {base::MayBlock()}, + base::BindOnce(std::move(enter_section_callback_), + std::move(on_section_entered))); + } + + // Based on UMA data, 15 seconds timeout is enough for 99.9% cases. + task_runner_->PostDelayedTask( + FROM_HERE, + base::BindOnce(&ScopedCriticalPolicySection::OnSectionEntered, + weak_factory_.GetWeakPtr(), Handles()), + base::Seconds(15)); +} + +void ScopedCriticalPolicySection::OnSectionEntered(Handles handles) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + machine_handle_ = handles.machine_handle; + user_handle_ = handles.user_handle; + std::move(callback_).Run(); +} + +} // namespace policy
diff --git a/components/policy/core/common/scoped_critical_policy_section.h b/components/policy/core/common/scoped_critical_policy_section.h new file mode 100644 index 0000000..cc3d246 --- /dev/null +++ b/components/policy/core/common/scoped_critical_policy_section.h
@@ -0,0 +1,72 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_POLICY_CORE_COMMON_SCOPED_CRITICAL_POLICY_SECTION_H_ +#define COMPONENTS_POLICY_CORE_COMMON_SCOPED_CRITICAL_POLICY_SECTION_H_ + +#include "base/functional/callback.h" +#include "base/memory/weak_ptr.h" +#include "components/policy/policy_export.h" + +namespace base { +class SequencedTaskRunner; +} + +namespace policy { + +// Scoped class for ::EnterCriticalPolicySection API. The class make sure we try +// to acquire the section before reading the policy values. It will leave the +// section in the end and self destory. +class POLICY_EXPORT ScopedCriticalPolicySection { + public: + struct Handles { + HANDLE machine_handle; + HANDLE user_handle; + }; + + using OnSectionEnteredCallback = base::OnceCallback<void(Handles)>; + using EnterSectionCallback = + base::OnceCallback<void(OnSectionEnteredCallback)>; + + // Create and own `ScopedCriticalPolicySection` instance. And destory itself + // after `callback` being invoked. + // This must be called on the background thread. When loading policy on the + // main thread, we can't wait for the API as everything must be returned + // synchronously. + static void Enter( + base::OnceClosure callback, + const scoped_refptr<base::SequencedTaskRunner>& task_runner); + + // Same but with custome function to enter critical policy section`. Only + // used for testing purposes. + static void EnterWithEnterSectionCallback( + base::OnceClosure callback, + EnterSectionCallback enter_section_callback, + const scoped_refptr<base::SequencedTaskRunner>& task_runner); + + ScopedCriticalPolicySection( + const scoped_refptr<base::SequencedTaskRunner>& task_runner); + ScopedCriticalPolicySection(const ScopedCriticalPolicySection&) = delete; + ScopedCriticalPolicySection& operator=(const ScopedCriticalPolicySection&) = + delete; + ~ScopedCriticalPolicySection(); + + void Init(base::OnceClosure callback); + + private: + void OnSectionEntered(Handles handles); + + HANDLE machine_handle_ = nullptr; + HANDLE user_handle_ = nullptr; + const scoped_refptr<base::SequencedTaskRunner> task_runner_; + base::OnceClosure callback_; + + EnterSectionCallback enter_section_callback_; + + base::WeakPtrFactory<ScopedCriticalPolicySection> weak_factory_{this}; +}; + +} // namespace policy + +#endif // COMPONENTS_POLICY_CORE_COMMON_SCOPED_CRITICAL_POLICY_SECTION_H_
diff --git a/components/policy/core/common/scoped_critical_policy_section_unittest.cc b/components/policy/core/common/scoped_critical_policy_section_unittest.cc new file mode 100644 index 0000000..07d1718 --- /dev/null +++ b/components/policy/core/common/scoped_critical_policy_section_unittest.cc
@@ -0,0 +1,72 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/policy/core/common/scoped_critical_policy_section.h" + +#include "base/functional/bind.h" +#include "base/functional/callback_helpers.h" +#include "base/memory/scoped_refptr.h" +#include "base/task/sequenced_task_runner.h" +#include "base/task/thread_pool.h" +#include "base/test/mock_callback.h" +#include "base/test/task_environment.h" +#include "base/threading/thread_restrictions.h" +#include "base/time/time.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace policy { + +class ScopedCriticalPolicySectionTest : public ::testing::Test { + public: + ScopedCriticalPolicySectionTest() + : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME), + task_runner_(base::ThreadPool::CreateSequencedTaskRunner({})) {} + + ~ScopedCriticalPolicySectionTest() override = default; + base::SequencedTaskRunner* task_runner() { return task_runner_.get(); } + + base::test::TaskEnvironment* task_environment() { return &task_environment_; } + + private: + base::test::TaskEnvironment task_environment_; + scoped_refptr<base::SequencedTaskRunner> task_runner_; +}; + +TEST_F(ScopedCriticalPolicySectionTest, Normal) { + ::testing::StrictMock<base::MockOnceClosure> mock_callback; + EXPECT_CALL(mock_callback, Run()).Times(1); + ScopedCriticalPolicySection::EnterWithEnterSectionCallback( + mock_callback.Get(), + base::BindOnce( + [](ScopedCriticalPolicySection::OnSectionEnteredCallback callback) { + std::move(callback).Run(ScopedCriticalPolicySection::Handles()); + }), + task_runner()); + task_environment()->RunUntilIdle(); +} + +TEST_F(ScopedCriticalPolicySectionTest, Timeout) { + auto fake_enter_section_function = base::BindOnce( + [](ScopedCriticalPolicySection::OnSectionEnteredCallback callback) { + base::ThreadPool::PostDelayedTask( + FROM_HERE, + base::BindOnce(std::move(callback), + ScopedCriticalPolicySection::Handles()), + base::Seconds(30)); + }); + + ::testing::StrictMock<base::MockOnceClosure> mock_callback; + EXPECT_CALL(mock_callback, Run()).Times(0); + ScopedCriticalPolicySection::EnterWithEnterSectionCallback( + mock_callback.Get(), std::move(fake_enter_section_function), + task_runner()); + task_environment()->RunUntilIdle(); + ::testing::Mock::VerifyAndClearExpectations(&mock_callback); + + EXPECT_CALL(mock_callback, Run()).Times(1); + task_environment()->FastForwardBy(base::Seconds(15)); +} + +} // namespace policy
diff --git a/components/safe_browsing/core/browser/tailored_security_service/tailored_security_service.cc b/components/safe_browsing/core/browser/tailored_security_service/tailored_security_service.cc index 38754e6..f7019a66 100644 --- a/components/safe_browsing/core/browser/tailored_security_service/tailored_security_service.cc +++ b/components/safe_browsing/core/browser/tailored_security_service/tailored_security_service.cc
@@ -28,6 +28,7 @@ #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/primary_account_access_token_fetcher.h" #include "components/signin/public/identity_manager/scope_set.h" +#include "google_apis/gaia/gaia_constants.h" #include "google_apis/gaia/gaia_urls.h" #include "google_apis/gaia/google_service_auth_error.h" #include "net/base/load_flags.h" @@ -46,9 +47,6 @@ const int kRepeatingCheckTailoredSecurityBitDelayInMinutes = 5; -constexpr char kAPIScope[] = - "https://www.googleapis.com/auth/chrome-safe-browsing"; - const char kQueryTailoredSecurityServiceUrl[] = "https://history.google.com/history/api/lookup?client=aesb"; @@ -145,7 +143,8 @@ access_token_fetcher_ = identity_manager_->CreateAccessTokenFetcherForAccount( GetAccountForRequest(identity_manager_), - /*oauth_consumer_name=*/"tailored_security_service", {kAPIScope}, + /*oauth_consumer_name=*/"tailored_security_service", + {GaiaConstants::kChromeSafeBrowsingOAuth2Scope}, base::BindOnce(&RequestImpl::OnAccessTokenFetchComplete, base::Unretained(this)), signin::AccessTokenFetcher::Mode::kImmediate); @@ -172,7 +171,7 @@ // invalidate the token and try again. if (response_code_ == net::HTTP_UNAUTHORIZED && ++auth_retry_count_ <= 1) { signin::ScopeSet oauth_scopes; - oauth_scopes.insert(kAPIScope); + oauth_scopes.insert(GaiaConstants::kChromeSafeBrowsingOAuth2Scope); identity_manager_->RemoveAccessTokenFromCache( GetAccountForRequest(identity_manager_), oauth_scopes, access_token_); access_token_.clear(); @@ -306,7 +305,7 @@ void TailoredSecurityService::RemoveQueryRequest() { DCHECK(!is_shut_down_); - DCHECK(active_query_request_ >= 0); + DCHECK_GE(active_query_request_, 0UL); active_query_request_--; if (active_query_request_ == 0) { timer_.Stop();
diff --git a/components/ukm/ukm_reporting_service.cc b/components/ukm/ukm_reporting_service.cc index dfddf0a..bad7f467 100644 --- a/components/ukm/ukm_reporting_service.cc +++ b/components/ukm/ukm_reporting_service.cc
@@ -15,6 +15,7 @@ #include "build/build_config.h" #include "components/metrics/metrics_service_client.h" #include "components/metrics/metrics_switches.h" +#include "components/metrics/url_constants.h" #include "components/prefs/pref_registry_simple.h" #include "components/ukm/ukm_pref_names.h" #include "components/ukm/ukm_service.h" @@ -29,12 +30,6 @@ namespace { -// The UKM server's URL. -constexpr char kDefaultServerUrl[] = "https://clients4.google.com/ukm"; - -// The UKM server's MIME type. -constexpr char kMimeType[] = "application/vnd.chrome.ukm"; - // The number of UKM logs that will be stored in UnsentLogStore before logs // start being dropped. constexpr int kMinUnsentLogCount = 8; @@ -66,7 +61,7 @@ base::GetFieldTrialParamValueByFeature(kUkmFeature, "ServerUrl"); if (!server_url.empty()) return GURL(server_url); - return GURL(kDefaultServerUrl); + return GURL(metrics::kDefaultUkmServerUrl); } } // namespace @@ -109,7 +104,7 @@ } base::StringPiece UkmReportingService::upload_mime_type() const { - return kMimeType; + return metrics::kUkmMimeType; } metrics::MetricsLogUploader::MetricServiceType
diff --git a/components/url_rewrite/OWNERS b/components/url_rewrite/OWNERS index 60629555..b209218a 100644 --- a/components/url_rewrite/OWNERS +++ b/components/url_rewrite/OWNERS
@@ -1,6 +1,4 @@ -fdegans@chromium.org vigeni@google.com -kmarshall@chromium.org # Backup reviewers. file://build/fuchsia/OWNERS
diff --git a/components/viz/client/client_resource_provider_unittest.cc b/components/viz/client/client_resource_provider_unittest.cc index 64f2015..b110e31 100644 --- a/components/viz/client/client_resource_provider_unittest.cc +++ b/components/viz/client/client_resource_provider_unittest.cc
@@ -512,7 +512,7 @@ SinglePlaneFormat::kRGBA_8888, gfx::Size(1, 1), gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2 | gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, - gpu::kNullSurfaceHandle); + "TestLabel", gpu::kNullSurfaceHandle); gpu::SyncToken sync_token = sii->GenUnverifiedSyncToken(); constexpr gfx::Size size(64, 64);
diff --git a/components/viz/service/display/renderer_perftest.cc b/components/viz/service/display/renderer_perftest.cc index 4924f32..138d6a8d 100644 --- a/components/viz/service/display/renderer_perftest.cc +++ b/components/viz/service/display/renderer_perftest.cc
@@ -175,7 +175,7 @@ gpu::Mailbox mailbox = sii->CreateSharedImage( SinglePlaneFormat::kRGBA_8888, size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, MakePixelSpan(pixels)); + gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, "TestLabel", MakePixelSpan(pixels)); gpu::SyncToken sync_token = sii->GenVerifiedSyncToken(); TransferableResource gl_resource = TransferableResource::MakeGpu(
diff --git a/components/viz/service/display/renderer_pixeltest.cc b/components/viz/service/display/renderer_pixeltest.cc index 9440d63..474d318 100644 --- a/components/viz/service/display/renderer_pixeltest.cc +++ b/components/viz/service/display/renderer_pixeltest.cc
@@ -124,7 +124,7 @@ DCHECK(sii); gpu::Mailbox mailbox = sii->CreateSharedImage( format, size, color_space, kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, pixels); + gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, "TestLabel", pixels); gpu::SyncToken sync_token = sii->GenUnverifiedSyncToken(); TransferableResource gl_resource = TransferableResource::MakeGpu(
diff --git a/components/viz/service/display/skia_output_surface.h b/components/viz/service/display/skia_output_surface.h index 17f5186..f51db8b 100644 --- a/components/viz/service/display/skia_output_surface.h +++ b/components/viz/service/display/skia_output_surface.h
@@ -6,6 +6,7 @@ #define COMPONENTS_VIZ_SERVICE_DISPLAY_SKIA_OUTPUT_SURFACE_H_ #include <memory> +#include <string> #include <vector> #include "build/build_config.h" @@ -207,6 +208,7 @@ const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) = 0; // Enqueue a GPU task to create a 1x1 shared image of the specified color.
diff --git a/components/viz/service/display/skia_readback_pixeltest.cc b/components/viz/service/display/skia_readback_pixeltest.cc index 8510b07..23af6a1 100644 --- a/components/viz/service/display/skia_readback_pixeltest.cc +++ b/components/viz/service/display/skia_readback_pixeltest.cc
@@ -369,7 +369,8 @@ DCHECK(sii); gpu::Mailbox mailbox = sii->CreateSharedImage( format, size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, pixels); + kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, "TestPixels", + pixels); gpu::SyncToken sync_token = sii->GenUnverifiedSyncToken(); TransferableResource gl_resource = TransferableResource::MakeGpu( @@ -661,7 +662,7 @@ child_context_provider_->SharedImageInterface()->CreateSharedImage( format, plane_size, gfx::ColorSpace::CreateREC709(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, pixels); + gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, "TestLabels", pixels); DCHECK(!mailboxes[i].mailbox.IsZero()); }
diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc index 3191a7e..dc12429 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc
@@ -3223,7 +3223,7 @@ auto mailbox = skia_output_surface_->CreateSharedImage( requirements.format, requirements.size, requirements.color_space, usage, - gpu::kNullSurfaceHandle); + "RenderPassBacking", gpu::kNullSurfaceHandle); render_pass_backings_.emplace( render_pass_id, RenderPassBacking({requirements.size, requirements.generate_mipmap, @@ -3346,7 +3346,7 @@ gpu::SHARED_IMAGE_USAGE_DISPLAY_WRITE | gpu::SHARED_IMAGE_USAGE_RASTER; auto mailbox = skia_output_surface_->CreateSharedImage( buffer_format, buffer_size, color_space, kOverlayUsage, - gpu::kNullSurfaceHandle); + "RenderPassOverlay", gpu::kNullSurfaceHandle); overlay_params.render_pass_backing = {buffer_size, /*generate_mipmap=*/false, color_space,
diff --git a/components/viz/service/display_embedder/buffer_queue.cc b/components/viz/service/display_embedder/buffer_queue.cc index 332400c2..89e5577 100644 --- a/components/viz/service/display_embedder/buffer_queue.cc +++ b/components/viz/service/display_embedder/buffer_queue.cc
@@ -156,7 +156,7 @@ available_buffers_.reserve(available_buffers_.size() + n); for (size_t i = 0; i < n; ++i) { const gpu::Mailbox mailbox = skia_output_surface_->CreateSharedImage( - format, size_, color_space_, usage, surface_handle_); + format, size_, color_space_, usage, "VizBufferQueue", surface_handle_); DCHECK(!mailbox.IsZero()); available_buffers_.push_back(
diff --git a/components/viz/service/display_embedder/buffer_queue_unittest.cc b/components/viz/service/display_embedder/buffer_queue_unittest.cc index 77b8c13e..f7cbb30 100644 --- a/components/viz/service/display_embedder/buffer_queue_unittest.cc +++ b/components/viz/service/display_embedder/buffer_queue_unittest.cc
@@ -9,6 +9,7 @@ #include <memory> #include <set> +#include <string> #include <utility> #include "build/build_config.h" @@ -141,11 +142,12 @@ class MockedSkiaOutputSurface : public FakeSkiaOutputSurface { public: MockedSkiaOutputSurface() : FakeSkiaOutputSurface(nullptr) {} - MOCK_METHOD5(CreateSharedImage, + MOCK_METHOD6(CreateSharedImage, gpu::Mailbox(SharedImageFormat format, const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle)); MOCK_METHOD1(DestroySharedImage, void(const gpu::Mailbox& mailbox)); }; @@ -163,7 +165,7 @@ gpu::SHARED_IMAGE_USAGE_SCANOUT | gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_DISPLAY_WRITE, - _)) + _, _)) .WillOnce(Return(expected_mailbox)); EXPECT_CALL(*mock_skia_output_surface, DestroySharedImage(expected_mailbox));
diff --git a/components/viz/service/display_embedder/output_presenter.h b/components/viz/service/display_embedder/output_presenter.h index 91d84514..9836e23 100644 --- a/components/viz/service/display_embedder/output_presenter.h +++ b/components/viz/service/display_embedder/output_presenter.h
@@ -102,8 +102,9 @@ virtual void InitializeCapabilities( OutputSurface::Capabilities* capabilities) = 0; - virtual bool Reshape(const SkSurfaceCharacterization& characterization, + virtual bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) = 0; virtual std::vector<std::unique_ptr<Image>> AllocateImages(
diff --git a/components/viz/service/display_embedder/output_presenter_fuchsia.cc b/components/viz/service/display_embedder/output_presenter_fuchsia.cc index 6f07a364..e16f1778 100644 --- a/components/viz/service/display_embedder/output_presenter_fuchsia.cc +++ b/components/viz/service/display_embedder/output_presenter_fuchsia.cc
@@ -66,11 +66,11 @@ kRGBA_8888_SkColorType; } -bool OutputPresenterFuchsia::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool OutputPresenterFuchsia::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { return true; }
diff --git a/components/viz/service/display_embedder/output_presenter_fuchsia.h b/components/viz/service/display_embedder/output_presenter_fuchsia.h index bf46a53e..188c27cf 100644 --- a/components/viz/service/display_embedder/output_presenter_fuchsia.h +++ b/components/viz/service/display_embedder/output_presenter_fuchsia.h
@@ -32,8 +32,9 @@ // OutputPresenter implementation: void InitializeCapabilities(OutputSurface::Capabilities* capabilities) final; - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) final; std::vector<std::unique_ptr<Image>> AllocateImages(
diff --git a/components/viz/service/display_embedder/output_presenter_gl.cc b/components/viz/service/display_embedder/output_presenter_gl.cc index c6a37e2..60323ec 100644 --- a/components/viz/service/display_embedder/output_presenter_gl.cc +++ b/components/viz/service/display_embedder/output_presenter_gl.cc
@@ -176,16 +176,15 @@ kRGBA_F16_SkColorType; } -bool OutputPresenterGL::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { - const gfx::Size size = gfx::SkISizeToSize(characterization.dimensions()); +bool OutputPresenterGL::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { + const gfx::Size size = gfx::SkISizeToSize(image_info.dimensions()); image_format_ = SharedImageFormat::SinglePlane( - SkColorTypeToResourceFormat(characterization.colorType())); - const bool has_alpha = - !SkAlphaTypeIsOpaque(characterization.imageInfo().alphaType()); + SkColorTypeToResourceFormat(image_info.colorType())); + const bool has_alpha = !image_info.isOpaque(); return presenter_->Resize(size, device_scale_factor, color_space, has_alpha); }
diff --git a/components/viz/service/display_embedder/output_presenter_gl.h b/components/viz/service/display_embedder/output_presenter_gl.h index a1918f6..1e9144a1 100644 --- a/components/viz/service/display_embedder/output_presenter_gl.h +++ b/components/viz/service/display_embedder/output_presenter_gl.h
@@ -36,8 +36,9 @@ // OutputPresenter implementation: void InitializeCapabilities(OutputSurface::Capabilities* capabilities) final; - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) final; std::vector<std::unique_ptr<Image>> AllocateImages(
diff --git a/components/viz/service/display_embedder/skia_output_device.h b/components/viz/service/display_embedder/skia_output_device.h index 79050511..31ba845 100644 --- a/components/viz/service/display_embedder/skia_output_device.h +++ b/components/viz/service/display_embedder/skia_output_device.h
@@ -112,8 +112,9 @@ virtual std::unique_ptr<SkiaOutputDevice::ScopedPaint> BeginScopedPaint(); // Changes the size of draw surface and invalidates it's contents. - virtual bool Reshape(const SkSurfaceCharacterization& characterization, + virtual bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) = 0;
diff --git a/components/viz/service/display_embedder/skia_output_device_buffer_queue.cc b/components/viz/service/display_embedder/skia_output_device_buffer_queue.cc index c4e3535e..74ef823 100644 --- a/components/viz/service/display_embedder/skia_output_device_buffer_queue.cc +++ b/components/viz/service/display_embedder/skia_output_device_buffer_queue.cc
@@ -599,14 +599,14 @@ } } -bool SkiaOutputDeviceBufferQueue::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool SkiaOutputDeviceBufferQueue::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { DCHECK(pending_overlay_mailboxes_.empty()); - if (!presenter_->Reshape(characterization, color_space, device_scale_factor, - transform)) { + if (!presenter_->Reshape(image_info, color_space, sample_count, + device_scale_factor, transform)) { LOG(ERROR) << "Failed to resize."; CheckForLoopFailuresBufferQueue(); // To prevent tail call, so we can see the stack. @@ -615,12 +615,12 @@ } overlay_transform_ = transform; - gfx::Size size = gfx::SkISizeToSize(characterization.dimensions()); + gfx::Size size = gfx::SkISizeToSize(image_info.dimensions()); if (color_space_ == color_space && image_size_ == size) return true; color_space_ = color_space; image_size_ = size; - sample_count_ = characterization.sampleCount(); + sample_count_ = sample_count; bool success = RecreateImages(); if (!success) {
diff --git a/components/viz/service/display_embedder/skia_output_device_buffer_queue.h b/components/viz/service/display_embedder/skia_output_device_buffer_queue.h index 8b4a15d..1bc2dee 100644 --- a/components/viz/service/display_embedder/skia_output_device_buffer_queue.h +++ b/components/viz/service/display_embedder/skia_output_device_buffer_queue.h
@@ -45,8 +45,9 @@ void Present(const absl::optional<gfx::Rect>& update_rect, BufferPresentedCallback feedback, OutputSurfaceFrame frame) override; - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; void SetViewportSize(const gfx::Size& viewport_size) override;
diff --git a/components/viz/service/display_embedder/skia_output_device_buffer_queue_unittest.cc b/components/viz/service/display_embedder/skia_output_device_buffer_queue_unittest.cc index 4674695..34dc716 100644 --- a/components/viz/service/display_embedder/skia_output_device_buffer_queue_unittest.cc +++ b/components/viz/service/display_embedder/skia_output_device_buffer_queue_unittest.cc
@@ -437,24 +437,9 @@ void PageFlipComplete() { presenter_->SwapComplete(); } - SkSurfaceCharacterization CreateSkSurfaceCharacterization( - const gfx::Size size = kScreenSize) { - auto* gr_context = dependency_->GetSharedContextState()->gr_context(); - auto gr_context_thread_safe_proxy = gr_context->threadSafeProxy(); - - auto image_info = - SkImageInfo::Make(size.width(), size.height(), kDefaultColorType, - kPremul_SkAlphaType, nullptr); - const auto backend_format = - gr_context_thread_safe_proxy->defaultBackendFormat(kDefaultColorType, - GrRenderable::kYes); - SkSurfaceProps surface_props{0, kUnknown_SkPixelGeometry}; - auto cache_max_resource_bytes = gr_context->getResourceCacheLimit(); - return gr_context_thread_safe_proxy->createCharacterization( - cache_max_resource_bytes, image_info, backend_format, - /*sampleCount=*/1, kTopLeft_GrSurfaceOrigin, surface_props, - /*isMipMapped=*/false, - /*willUseGLFBO0=*/false, /*isTextureable=*/true); + SkImageInfo CreateSkImageInfo(const gfx::Size size = kScreenSize) { + return SkImageInfo::Make(size.width(), size.height(), kDefaultColorType, + kPremul_SkAlphaType, nullptr); } void FirstReshape() { @@ -466,7 +451,8 @@ output_device_->EnsureMinNumberOfBuffers( output_device_->capabilities().number_of_buffers); } - output_device_->Reshape(CreateSkSurfaceCharacterization(), {}, 1.0f, + output_device_->Reshape(CreateSkImageInfo(), gfx::ColorSpace(), + /*sample_count=*/1, /*device_scale_factor=*/1.0f, gfx::OVERLAY_TRANSFORM_NONE); } @@ -762,9 +748,10 @@ Present(); output_device_->Reshape( - CreateSkSurfaceCharacterization( + CreateSkImageInfo( gfx::Size(kScreenSize.width() - 1, kScreenSize.height() - 1)), - {}, 1.0f, gfx::OVERLAY_TRANSFORM_NONE); + gfx::ColorSpace(), /*sample_count=*/1, /*device_scale_factor=*/1.0f, + gfx::OVERLAY_TRANSFORM_NONE); // swap completion callbacks should not be cleared. EXPECT_EQ(1u, swap_completion_callbacks().size());
diff --git a/components/viz/service/display_embedder/skia_output_device_dawn.cc b/components/viz/service/display_embedder/skia_output_device_dawn.cc index ba1e578b..c644c0a8 100644 --- a/components/viz/service/display_embedder/skia_output_device_dawn.cc +++ b/components/viz/service/display_embedder/skia_output_device_dawn.cc
@@ -71,16 +71,16 @@ return child_window_.window(); } -bool SkiaOutputDeviceDawn::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool SkiaOutputDeviceDawn::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { DCHECK_EQ(transform, gfx::OVERLAY_TRANSFORM_NONE); - size_ = gfx::SkISizeToSize(characterization.dimensions()); - sk_color_space_ = characterization.refColorSpace(); - sample_count_ = characterization.sampleCount(); + size_ = gfx::SkISizeToSize(image_info.dimensions()); + sk_color_space_ = image_info.refColorSpace(); + sample_count_ = sample_count; wgpu::SwapChainDescriptor swap_chain_desc; swap_chain_desc.format = kSwapChainFormat;
diff --git a/components/viz/service/display_embedder/skia_output_device_dawn.h b/components/viz/service/display_embedder/skia_output_device_dawn.h index 342b5e3..d461432 100644 --- a/components/viz/service/display_embedder/skia_output_device_dawn.h +++ b/components/viz/service/display_embedder/skia_output_device_dawn.h
@@ -38,8 +38,9 @@ gpu::SurfaceHandle GetChildSurfaceHandle() const; // SkiaOutputDevice implementation: - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; void Present(const absl::optional<gfx::Rect>& update_rect,
diff --git a/components/viz/service/display_embedder/skia_output_device_dcomp.cc b/components/viz/service/display_embedder/skia_output_device_dcomp.cc index df376b2e..2368ba89 100644 --- a/components/viz/service/display_embedder/skia_output_device_dcomp.cc +++ b/components/viz/service/display_embedder/skia_output_device_dcomp.cc
@@ -271,17 +271,16 @@ memory_type_tracker_->TrackMemFree(backbuffer_estimated_size_); } -bool SkiaOutputDeviceDCompGLSurface::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool SkiaOutputDeviceDCompGLSurface::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { DCHECK_EQ(transform, gfx::OVERLAY_TRANSFORM_NONE); - const gfx::Size size = gfx::SkISizeToSize(characterization.dimensions()); - const SkColorType color_type = characterization.colorType(); - const bool has_alpha = - !SkAlphaTypeIsOpaque(characterization.imageInfo().alphaType()); + const gfx::Size size = gfx::SkISizeToSize(image_info.dimensions()); + const SkColorType color_type = image_info.colorType(); + const bool has_alpha = !image_info.isOpaque(); if (!gl_surface_->Resize(size, device_scale_factor, color_space, has_alpha)) { CheckForLoopFailures(); @@ -314,15 +313,14 @@ NOTREACHED() << "color_type: " << color_type; } - GrBackendRenderTarget render_target(size.width(), size.height(), - characterization.sampleCount(), + GrBackendRenderTarget render_target(size.width(), size.height(), sample_count, /*stencilBits=*/0, framebuffer_info); auto origin = (gl_surface_->GetOrigin() == gfx::SurfaceOrigin::kTopLeft) ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; sk_surface_ = SkSurface::MakeFromBackendRenderTarget( context_state_->gr_context(), render_target, origin, color_type, - characterization.refColorSpace(), &surface_props); + image_info.refColorSpace(), &surface_props); if (!sk_surface_) { LOG(ERROR) << "Couldn't create surface:" << "\n abandoned()=" @@ -417,26 +415,20 @@ SkiaOutputDeviceDCompPresenter::~SkiaOutputDeviceDCompPresenter() = default; -bool SkiaOutputDeviceDCompPresenter::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool SkiaOutputDeviceDCompPresenter::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { DCHECK_EQ(transform, gfx::OVERLAY_TRANSFORM_NONE); - if (!characterization.isValid()) { - DLOG(ERROR) << "Invalid SkSurfaceCharacterization"; - return false; - } - - auto size = gfx::SkISizeToSize(characterization.dimensions()); + auto size = gfx::SkISizeToSize(image_info.dimensions()); // DCompPresenter calls SetWindowPos on resize, so we call it to reflect the // newly allocated root surface. // Note, we could inline SetWindowPos here, but we need access to the HWND. - if (!presenter_->Resize( - size, device_scale_factor, color_space, - !SkAlphaTypeIsOpaque(characterization.imageInfo().alphaType()))) { + if (!presenter_->Resize(size, device_scale_factor, color_space, + /*has_alpha=*/!image_info.isOpaque())) { CheckForLoopFailures(); // To prevent tail call, so we can see the stack. base::debug::Alias(nullptr);
diff --git a/components/viz/service/display_embedder/skia_output_device_dcomp.h b/components/viz/service/display_embedder/skia_output_device_dcomp.h index 1642eed3..a8f634f 100644 --- a/components/viz/service/display_embedder/skia_output_device_dcomp.h +++ b/components/viz/service/display_embedder/skia_output_device_dcomp.h
@@ -113,8 +113,9 @@ ~SkiaOutputDeviceDCompGLSurface() override; // SkiaOutputDevice implementation: - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; bool SetDrawRectangle(const gfx::Rect& draw_rectangle) override; @@ -158,8 +159,9 @@ ~SkiaOutputDeviceDCompPresenter() override; // SkiaOutputDevice implementation: - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; bool SetDrawRectangle(const gfx::Rect& draw_rectangle) override;
diff --git a/components/viz/service/display_embedder/skia_output_device_gl.cc b/components/viz/service/display_embedder/skia_output_device_gl.cc index db2440ad..ed078e8c 100644 --- a/components/viz/service/display_embedder/skia_output_device_gl.cc +++ b/components/viz/service/display_embedder/skia_output_device_gl.cc
@@ -154,19 +154,18 @@ memory_type_tracker_->TrackMemFree(backbuffer_estimated_size_); } -bool SkiaOutputDeviceGL::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool SkiaOutputDeviceGL::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { #if !BUILDFLAG(IS_CHROMEOS_ASH) DCHECK_EQ(transform, gfx::OVERLAY_TRANSFORM_NONE); #endif // !BUILDFLAG(IS_CHROMEOS_ASH) - const gfx::Size size = gfx::SkISizeToSize(characterization.dimensions()); - const SkColorType color_type = characterization.colorType(); - const bool has_alpha = - !SkAlphaTypeIsOpaque(characterization.imageInfo().alphaType()); + const gfx::Size size = gfx::SkISizeToSize(image_info.dimensions()); + const SkColorType color_type = image_info.colorType(); + const bool has_alpha = !image_info.isOpaque(); if (!gl_surface_->Resize(size, device_scale_factor, color_space, has_alpha)) { CheckForLoopFailures(); @@ -186,15 +185,14 @@ DCHECK(backend_format.isValid()) << "color_type: " << color_type; framebuffer_info.fFormat = backend_format.asGLFormatEnum(); - GrBackendRenderTarget render_target(size.width(), size.height(), - characterization.sampleCount(), + GrBackendRenderTarget render_target(size.width(), size.height(), sample_count, /*stencilBits=*/0, framebuffer_info); auto origin = (gl_surface_->GetOrigin() == gfx::SurfaceOrigin::kTopLeft) ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; sk_surface_ = SkSurface::MakeFromBackendRenderTarget( - gr_context, render_target, origin, color_type, - characterization.refColorSpace(), &surface_props); + gr_context, render_target, origin, color_type, image_info.refColorSpace(), + &surface_props); if (!sk_surface_) { LOG(ERROR) << "Couldn't create surface:" << "\n abandoned()=" << gr_context->abandoned()
diff --git a/components/viz/service/display_embedder/skia_output_device_gl.h b/components/viz/service/display_embedder/skia_output_device_gl.h index 1424d06..50ab8b7 100644 --- a/components/viz/service/display_embedder/skia_output_device_gl.h +++ b/components/viz/service/display_embedder/skia_output_device_gl.h
@@ -43,8 +43,9 @@ ~SkiaOutputDeviceGL() override; // SkiaOutputDevice implementation: - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; void Present(const absl::optional<gfx::Rect>& update_rect,
diff --git a/components/viz/service/display_embedder/skia_output_device_offscreen.cc b/components/viz/service/display_embedder/skia_output_device_offscreen.cc index 6096655..02fa129 100644 --- a/components/viz/service/display_embedder/skia_output_device_offscreen.cc +++ b/components/viz/service/display_embedder/skia_output_device_offscreen.cc
@@ -50,18 +50,18 @@ DiscardBackbuffer(); } -bool SkiaOutputDeviceOffscreen::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool SkiaOutputDeviceOffscreen::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { DCHECK_EQ(transform, gfx::OVERLAY_TRANSFORM_NONE); DiscardBackbuffer(); - size_ = gfx::SkISizeToSize(characterization.dimensions()); - sk_color_type_ = characterization.colorType(); - sk_color_space_ = characterization.refColorSpace(); - sample_count_ = characterization.sampleCount(); + size_ = gfx::SkISizeToSize(image_info.dimensions()); + sk_color_type_ = image_info.colorType(); + sk_color_space_ = image_info.refColorSpace(); + sample_count_ = sample_count; EnsureBackbuffer(); return true; }
diff --git a/components/viz/service/display_embedder/skia_output_device_offscreen.h b/components/viz/service/display_embedder/skia_output_device_offscreen.h index 6ea3db2..2835131 100644 --- a/components/viz/service/display_embedder/skia_output_device_offscreen.h +++ b/components/viz/service/display_embedder/skia_output_device_offscreen.h
@@ -30,8 +30,9 @@ ~SkiaOutputDeviceOffscreen() override; // SkiaOutputDevice implementation: - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; void Present(const absl::optional<gfx::Rect>& update_rect,
diff --git a/components/viz/service/display_embedder/skia_output_device_vulkan.cc b/components/viz/service/display_embedder/skia_output_device_vulkan.cc index 5013328..8e758f9 100644 --- a/components/viz/service/display_embedder/skia_output_device_vulkan.cc +++ b/components/viz/service/display_embedder/skia_output_device_vulkan.cc
@@ -83,17 +83,17 @@ } #endif -bool SkiaOutputDeviceVulkan::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool SkiaOutputDeviceVulkan::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { DCHECK(!scoped_write_); if (UNLIKELY(!vulkan_surface_)) return false; - return RecreateSwapChain(characterization, transform); + return RecreateSwapChain(image_info, sample_count, transform); } void SkiaOutputDeviceVulkan::Submit(bool sync_cpu, base::OnceClosure callback) { @@ -330,20 +330,22 @@ } bool SkiaOutputDeviceVulkan::RecreateSwapChain( - const SkSurfaceCharacterization& characterization, + const SkImageInfo& image_info, + int sample_count, gfx::OverlayTransform transform) { auto generation = vulkan_surface_->swap_chain_generation(); // Call vulkan_surface_->Reshape() will recreate vulkan swapchain if it is // necessary. if (UNLIKELY(!vulkan_surface_->Reshape( - gfx::SkISizeToSize(characterization.dimensions()), transform))) + gfx::SkISizeToSize(image_info.dimensions()), transform))) { return false; + } - bool recreate = vulkan_surface_->swap_chain_generation() != generation || - !SkColorSpace::Equals(characterization.colorSpace(), - color_space_.get()) || - sample_count_ != characterization.sampleCount(); + bool recreate = + vulkan_surface_->swap_chain_generation() != generation || + !SkColorSpace::Equals(image_info.colorSpace(), color_space_.get()) || + sample_count_ != sample_count; if (LIKELY(recreate)) { // swapchain is changed, we need recreate all cached sk surfaces. for (const auto& sk_surface_size_pair : sk_surface_size_pairs_) { @@ -352,9 +354,9 @@ auto num_images = vulkan_surface_->swap_chain()->num_images(); sk_surface_size_pairs_.clear(); sk_surface_size_pairs_.resize(num_images); - color_type_ = characterization.colorType(); - color_space_ = characterization.refColorSpace(); - sample_count_ = characterization.sampleCount(); + color_type_ = image_info.colorType(); + color_space_ = image_info.refColorSpace(); + sample_count_ = sample_count; damage_of_images_.resize(num_images); for (auto& damage : damage_of_images_) damage = gfx::Rect(vulkan_surface_->image_size());
diff --git a/components/viz/service/display_embedder/skia_output_device_vulkan.h b/components/viz/service/display_embedder/skia_output_device_vulkan.h index 633cfffd..4e451786 100644 --- a/components/viz/service/display_embedder/skia_output_device_vulkan.h +++ b/components/viz/service/display_embedder/skia_output_device_vulkan.h
@@ -50,8 +50,9 @@ #endif // SkiaOutputDevice implementation: void Submit(bool sync_cpu, base::OnceClosure callback) override; - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; void Present(const absl::optional<gfx::Rect>& update_rect, @@ -72,7 +73,8 @@ }; bool Initialize(); - bool RecreateSwapChain(const SkSurfaceCharacterization& characterization, + bool RecreateSwapChain(const SkImageInfo& image_info, + int sample_count, gfx::OverlayTransform transform); void OnPostSubBufferFinished(OutputSurfaceFrame frame, gfx::SwapResult result);
diff --git a/components/viz/service/display_embedder/skia_output_device_vulkan_secondary_cb.cc b/components/viz/service/display_embedder/skia_output_device_vulkan_secondary_cb.cc index 47ef348..a8dbaa7 100644 --- a/components/viz/service/display_embedder/skia_output_device_vulkan_secondary_cb.cc +++ b/components/viz/service/display_embedder/skia_output_device_vulkan_secondary_cb.cc
@@ -64,12 +64,13 @@ } bool SkiaOutputDeviceVulkanSecondaryCB::Reshape( - const SkSurfaceCharacterization& characterization, + const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) { // No-op - size_ = gfx::SkISizeToSize(characterization.dimensions()); + size_ = gfx::SkISizeToSize(image_info.dimensions()); return true; }
diff --git a/components/viz/service/display_embedder/skia_output_device_vulkan_secondary_cb.h b/components/viz/service/display_embedder/skia_output_device_vulkan_secondary_cb.h index b8cd2f5..730096d 100644 --- a/components/viz/service/display_embedder/skia_output_device_vulkan_secondary_cb.h +++ b/components/viz/service/display_embedder/skia_output_device_vulkan_secondary_cb.h
@@ -24,8 +24,9 @@ std::unique_ptr<SkiaOutputDevice::ScopedPaint> BeginScopedPaint() override; void Submit(bool sync_cpu, base::OnceClosure callback) override; - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; void Present(const absl::optional<gfx::Rect>& update_rect,
diff --git a/components/viz/service/display_embedder/skia_output_device_webview.cc b/components/viz/service/display_embedder/skia_output_device_webview.cc index 48209d4..141466e 100644 --- a/components/viz/service/display_embedder/skia_output_device_webview.cc +++ b/components/viz/service/display_embedder/skia_output_device_webview.cc
@@ -50,14 +50,14 @@ SkiaOutputDeviceWebView::~SkiaOutputDeviceWebView() = default; -bool SkiaOutputDeviceWebView::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +bool SkiaOutputDeviceWebView::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { DCHECK_EQ(transform, gfx::OVERLAY_TRANSFORM_NONE); - gfx::Size size = gfx::SkISizeToSize(characterization.dimensions()); + gfx::Size size = gfx::SkISizeToSize(image_info.dimensions()); if (!gl_surface_->Resize(size, device_scale_factor, color_space, /*has_alpha=*/true)) { DLOG(ERROR) << "Failed to resize."; @@ -65,7 +65,7 @@ } size_ = size; - sk_color_space_ = characterization.refColorSpace(); + sk_color_space_ = image_info.refColorSpace(); InitSkiaSurface(gl_surface_->GetBackingFramebufferObject()); return !!sk_surface_; }
diff --git a/components/viz/service/display_embedder/skia_output_device_webview.h b/components/viz/service/display_embedder/skia_output_device_webview.h index cd461c5..93dc5f89 100644 --- a/components/viz/service/display_embedder/skia_output_device_webview.h +++ b/components/viz/service/display_embedder/skia_output_device_webview.h
@@ -34,8 +34,9 @@ ~SkiaOutputDeviceWebView() override; // SkiaOutputDevice implementation: - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; void Present(const absl::optional<gfx::Rect>& update_rect,
diff --git a/components/viz/service/display_embedder/skia_output_device_x11.cc b/components/viz/service/display_embedder/skia_output_device_x11.cc index c25aa85..66f3479 100644 --- a/components/viz/service/display_embedder/skia_output_device_x11.cc +++ b/components/viz/service/display_embedder/skia_output_device_x11.cc
@@ -70,17 +70,17 @@ connection_->FreeGC({gc_}); } -bool SkiaOutputDeviceX11::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { - if (!SkiaOutputDeviceOffscreen::Reshape(characterization, color_space, +bool SkiaOutputDeviceX11::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { + if (!SkiaOutputDeviceOffscreen::Reshape(image_info, color_space, sample_count, device_scale_factor, transform)) { return false; } - auto ii = SkImageInfo::MakeN32( - characterization.width(), characterization.height(), kOpaque_SkAlphaType); + auto ii = SkImageInfo::MakeN32(image_info.width(), image_info.height(), + kOpaque_SkAlphaType); std::vector<uint8_t> mem(ii.computeMinByteSize()); pixels_ = base::RefCountedBytes::TakeVector(&mem); return true;
diff --git a/components/viz/service/display_embedder/skia_output_device_x11.h b/components/viz/service/display_embedder/skia_output_device_x11.h index e1a2cda..0385e91 100644 --- a/components/viz/service/display_embedder/skia_output_device_x11.h +++ b/components/viz/service/display_embedder/skia_output_device_x11.h
@@ -37,8 +37,9 @@ gpu::MemoryTracker* memory_tracker, DidSwapBufferCompleteCallback did_swap_buffer_complete_callback); - bool Reshape(const SkSurfaceCharacterization& characterization, + bool Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform) override; void Present(const absl::optional<gfx::Rect>& update_rect,
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl.cc b/components/viz/service/display_embedder/skia_output_surface_impl.cc index f4845f6c..9641438 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl.cc +++ b/components/viz/service/display_embedder/skia_output_surface_impl.cc
@@ -5,6 +5,7 @@ #include "components/viz/service/display_embedder/skia_output_surface_impl.h" #include <memory> +#include <string> #include <tuple> #include <utility> #include <vector> @@ -351,6 +352,7 @@ << "SkColorType is invalid for buffer format_index: " << format_index; auto sk_color_space = params.color_space.ToSkColorSpace(); + // TODO(sunnyps): Localize SkSurfaceCharacterization creation to DDL recorder. characterization_ = CreateSkSurfaceCharacterizationCurrentFrame( params.size, color_type, params.alpha_type, /*mipmap=*/false, std::move(sk_color_space)); @@ -359,7 +361,8 @@ // SkiaOutputSurfaceImpl::dtor. So it is safe to use base::Unretained. auto task = base::BindOnce(&SkiaOutputSurfaceImplOnGpu::Reshape, base::Unretained(impl_on_gpu_.get()), - characterization_, params.color_space, + characterization_.imageInfo(), params.color_space, + characterization_.sampleCount(), params.device_scale_factor, GetDisplayTransform()); EnqueueGpuTask(std::move(task), {}, /*make_current=*/true, /*need_framebuffer=*/!dependency_->IsOffscreen()); @@ -1437,12 +1440,14 @@ const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) { gpu::Mailbox mailbox = gpu::Mailbox::GenerateForSharedImage(); auto task = base::BindOnce(&SkiaOutputSurfaceImplOnGpu::CreateSharedImage, base::Unretained(impl_on_gpu_.get()), mailbox, - format, size, color_space, usage, surface_handle); + format, size, color_space, usage, + std::string(debug_label), surface_handle); EnqueueGpuTask(std::move(task), {}, /*make_current=*/true, /*need_framebuffer=*/false);
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl.h b/components/viz/service/display_embedder/skia_output_surface_impl.h index f343b46..f9f154ae 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl.h +++ b/components/viz/service/display_embedder/skia_output_surface_impl.h
@@ -6,6 +6,7 @@ #define COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SKIA_OUTPUT_SURFACE_IMPL_H_ #include <memory> +#include <string> #include <vector> #include "base/containers/circular_deque.h" @@ -159,6 +160,7 @@ const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) override; gpu::Mailbox CreateSolidColorSharedImage( const SkColor4f& color,
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc index 182c9e7..d97db24e 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc +++ b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
@@ -5,6 +5,7 @@ #include "components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h" #include <memory> +#include <string> #include <utility> #include <vector> @@ -355,6 +356,9 @@ << "We must have a valid context if copy requests were serviced"; copy_output_images_.clear(); + // |scoped_output_device_paint_| needs |output_device_|, so release it first. + scoped_output_device_paint_.reset(); + // |output_device_| may still need |shared_image_factory_|, so release it // first. output_device_.reset(); @@ -406,11 +410,11 @@ ReleaseAsyncReadResultHelpers(); } -void SkiaOutputSurfaceImplOnGpu::Reshape( - const SkSurfaceCharacterization& characterization, - const gfx::ColorSpace& color_space, - float device_scale_factor, - gfx::OverlayTransform transform) { +void SkiaOutputSurfaceImplOnGpu::Reshape(const SkImageInfo& image_info, + const gfx::ColorSpace& color_space, + int sample_count, + float device_scale_factor, + gfx::OverlayTransform transform) { TRACE_EVENT0("viz", "SkiaOutputSurfaceImplOnGpu::Reshape"); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK(gr_context()); @@ -418,8 +422,8 @@ if (context_is_lost_) return; - size_ = gfx::SkISizeToSize(characterization.dimensions()); - if (!output_device_->Reshape(characterization, color_space, + size_ = gfx::SkISizeToSize(image_info.dimensions()); + if (!output_device_->Reshape(image_info, color_space, sample_count, device_scale_factor, transform)) { MarkContextLost(CONTEXT_LOST_RESHAPE_FAILED); } @@ -764,7 +768,8 @@ SkiaOutputSurfaceImplOnGpu::CreateSharedImageRepresentationSkia( SharedImageFormat format, const gfx::Size& size, - const gfx::ColorSpace& color_space) { + const gfx::ColorSpace& color_space, + base::StringPiece debug_label) { constexpr uint32_t kUsage = gpu::SHARED_IMAGE_USAGE_GLES2 | gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT | gpu::SHARED_IMAGE_USAGE_RASTER | @@ -775,7 +780,7 @@ bool result = shared_image_factory_->CreateSharedImage( mailbox, format, size, color_space, kBottomLeft_GrSurfaceOrigin, kUnpremul_SkAlphaType, gpu::kNullSurfaceHandle, kUsage, - "SkiaOutputSurface"); + std::string(debug_label)); if (!result) { DLOG(ERROR) << "Failed to create shared image."; return nullptr; @@ -839,7 +844,7 @@ SinglePlaneFormat::kRGBA_8888, gfx::Size(geometry.result_bounds.width(), geometry.result_bounds.height()), - color_space); + color_space, "CopyOutputInMemory"); if (!representation) { DLOG(ERROR) << "Failed to create shared image."; @@ -979,7 +984,8 @@ const auto resource_format = (i == 0) ? SinglePlaneFormat::kR_8 : SinglePlaneFormat::kRG_88; auto representation = CreateSharedImageRepresentationSkia( - resource_format, gfx::SkISizeToSize(plane_size), color_space); + resource_format, gfx::SkISizeToSize(plane_size), color_space, + "SurfacesForNV12Planes"); if (!representation) { return false; } @@ -2344,11 +2350,12 @@ const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage, + std::string debug_label, gpu::SurfaceHandle surface_handle) { shared_image_factory_->CreateSharedImage( mailbox, format, size, color_space, kTopLeft_GrSurfaceOrigin, format.HasAlpha() ? kPremul_SkAlphaType : kOpaque_SkAlphaType, - surface_handle, usage, "SkiaOutputSurface"); + surface_handle, usage, std::move(debug_label)); skia_representations_.emplace(mailbox, nullptr); }
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h index 411eba5..e7bb5e4 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h +++ b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h
@@ -6,6 +6,7 @@ #define COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SKIA_OUTPUT_SURFACE_IMPL_ON_GPU_H_ #include <memory> +#include <string> #include <utility> #include <vector> @@ -146,8 +147,9 @@ return weak_ptr_; } - void Reshape(const SkSurfaceCharacterization& characterization, + void Reshape(const SkImageInfo& image_info, const gfx::ColorSpace& color_space, + int sample_count, float device_scale_factor, gfx::OverlayTransform transform); void FinishPaintCurrentFrame( @@ -266,6 +268,7 @@ const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage, + std::string debug_label, gpu::SurfaceHandle surface_handle); void CreateSolidColorSharedImage(gpu::Mailbox mailbox, const SkColor4f& color, @@ -351,7 +354,8 @@ std::unique_ptr<gpu::SkiaImageRepresentation> CreateSharedImageRepresentationSkia(SharedImageFormat format, const gfx::Size& size, - const gfx::ColorSpace& color_space); + const gfx::ColorSpace& color_space, + base::StringPiece debug_label); // Helper for `CopyOutputNV12()` & `CopyOutputRGBA()` methods, renders // |surface| into |dest_surface|'s canvas, cropping and scaling the results
diff --git a/components/viz/service/frame_sinks/gmb_video_frame_pool_context_provider_impl.cc b/components/viz/service/frame_sinks/gmb_video_frame_pool_context_provider_impl.cc index b88f32c..aeb89670 100644 --- a/components/viz/service/frame_sinks/gmb_video_frame_pool_context_provider_impl.cc +++ b/components/viz/service/frame_sinks/gmb_video_frame_pool_context_provider_impl.cc
@@ -86,7 +86,7 @@ gpu::SyncToken& sync_token) override { mailbox = sii_in_process_->CreateSharedImage( gpu_memory_buffer, gpu_memory_buffer_manager_, plane, color_space, - surface_origin, alpha_type, usage); + surface_origin, alpha_type, usage, "VizGmbVideoFramePool"); sync_token = sii_in_process_->GenVerifiedSyncToken(); }
diff --git a/components/viz/test/fake_skia_output_surface.cc b/components/viz/test/fake_skia_output_surface.cc index b9b1b8e..379b15d 100644 --- a/components/viz/test/fake_skia_output_surface.cc +++ b/components/viz/test/fake_skia_output_surface.cc
@@ -283,7 +283,7 @@ gpu::Mailbox local_mailbox = sii->CreateSharedImage( SinglePlaneFormat::kRGBA_8888, geometry.result_selection.size(), color_space, kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - gpu::SHARED_IMAGE_USAGE_GLES2, gpu::kNullSurfaceHandle); + gpu::SHARED_IMAGE_USAGE_GLES2, "CopyOutput", gpu::kNullSurfaceHandle); CopyOutputResult::ReleaseCallbacks release_callbacks; release_callbacks.push_back(base::BindPostTaskToCurrentDefault( @@ -404,6 +404,7 @@ const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) { return gpu::Mailbox::GenerateForSharedImage(); }
diff --git a/components/viz/test/fake_skia_output_surface.h b/components/viz/test/fake_skia_output_surface.h index 3f4c520..d31f8f8 100644 --- a/components/viz/test/fake_skia_output_surface.h +++ b/components/viz/test/fake_skia_output_surface.h
@@ -6,6 +6,7 @@ #define COMPONENTS_VIZ_TEST_FAKE_SKIA_OUTPUT_SURFACE_H_ #include <memory> +#include <string> #include <utility> #include <vector> @@ -108,6 +109,7 @@ const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) override; gpu::Mailbox CreateSolidColorSharedImage( const SkColor4f& color,
diff --git a/components/viz/test/test_context_provider.cc b/components/viz/test/test_context_provider.cc index 1ce887a..b4625c8 100644 --- a/components/viz/test/test_context_provider.cc +++ b/components/viz/test/test_context_provider.cc
@@ -135,6 +135,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) { base::AutoLock locked(lock_); auto mailbox = gpu::Mailbox::GenerateForSharedImage(); @@ -150,6 +151,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) { base::AutoLock locked(lock_); auto mailbox = gpu::Mailbox::GenerateForSharedImage(); @@ -164,6 +166,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) { base::AutoLock locked(lock_); auto mailbox = gpu::Mailbox::GenerateForSharedImage(); @@ -179,7 +182,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) { + uint32_t usage, + base::StringPiece debug_label) { base::AutoLock locked(lock_); auto mailbox = gpu::Mailbox::GenerateForSharedImage(); shared_images_.insert(mailbox);
diff --git a/components/viz/test/test_context_provider.h b/components/viz/test/test_context_provider.h index d2d84cd..0433bf1 100644 --- a/components/viz/test/test_context_provider.h +++ b/components/viz/test/test_context_provider.h
@@ -47,6 +47,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) override; gpu::Mailbox CreateSharedImage(SharedImageFormat format, @@ -55,6 +56,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) override; gpu::Mailbox CreateSharedImage( @@ -64,6 +66,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) override; gpu::Mailbox CreateSharedImage( @@ -73,7 +76,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) override; + uint32_t usage, + base::StringPiece debug_label) override; void UpdateSharedImage(const gpu::SyncToken& sync_token, const gpu::Mailbox& mailbox) override;
diff --git a/components/webxr/android/BUILD.gn b/components/webxr/android/BUILD.gn index 092ca8a7..31b324c 100644 --- a/components/webxr/android/BUILD.gn +++ b/components/webxr/android/BUILD.gn
@@ -72,13 +72,8 @@ } } -# In order to be able to be included in WebView/WebLayer targets; though this -# does link in ARCore, it does not link in the necessary ARCore manifest changes -# and due to other restrictions does not link in the native code required by -# arcore. Consumers will need to link the native arcore libraries themselves and -# will likely need to include the -# "//third_party/arcore-android-sdk-client:com_google_ar_core_java__ignored_manifest" -# target themselves somewhere in their build. +# Does not cause the necessary .so files to be bundled. +# Look for "libarcore_sdk_c.so" for examples of how to add it in. android_library("xr_java") { # Contains interfaces that should be permanently, and publicly, available and # can thus be depended on outside of this directory, regardless of whether xr
diff --git a/components/webxr/mailbox_to_surface_bridge_impl.cc b/components/webxr/mailbox_to_surface_bridge_impl.cc index 30dbb8c4..22664aa 100644 --- a/components/webxr/mailbox_to_surface_bridge_impl.cc +++ b/components/webxr/mailbox_to_surface_bridge_impl.cc
@@ -373,9 +373,9 @@ DCHECK(sii); gpu::MailboxHolder mailbox_holder; - mailbox_holder.mailbox = sii->CreateSharedImage(buffer, nullptr, color_space, - kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, usage); + mailbox_holder.mailbox = sii->CreateSharedImage( + buffer, nullptr, color_space, kTopLeft_GrSurfaceOrigin, + kPremul_SkAlphaType, usage, "WebXrMailboxToSurfaceBridge"); mailbox_holder.sync_token = sii->GenVerifiedSyncToken(); DCHECK(!gpu::NativeBufferNeedsPlatformSpecificTextureTarget( buffer->GetFormat()));
diff --git a/content/BUILD.gn b/content/BUILD.gn index f569ec4..27141a8 100644 --- a/content/BUILD.gn +++ b/content/BUILD.gn
@@ -96,7 +96,6 @@ ] deps = [ "//components/ukm/debug:build_ts", - "//content/browser/resources/histograms:build_ts", "//gpu/ipc/common:vulkan_interface_js__generator", ]
diff --git a/content/browser/attribution_reporting/aggregatable_attribution_utils.cc b/content/browser/attribution_reporting/aggregatable_attribution_utils.cc index a94637f78..b807d24 100644 --- a/content/browser/attribution_reporting/aggregatable_attribution_utils.cc +++ b/content/browser/attribution_reporting/aggregatable_attribution_utils.cc
@@ -9,7 +9,9 @@ #include <vector> #include "base/check.h" +#include "base/functional/overloaded.h" #include "base/metrics/histogram_functions.h" +#include "base/notreached.h" #include "base/numerics/safe_conversions.h" #include "base/ranges/algorithm.h" #include "base/strings/string_number_conversions.h" @@ -120,33 +122,47 @@ absl::optional<AggregatableReportRequest> CreateAggregatableReportRequest( const AttributionReport& report) { - const auto* data = - absl::get_if<AttributionReport::AggregatableAttributionData>( - &report.data()); - DCHECK(data); + base::Time source_time; + absl::optional<uint64_t> source_debug_key; + std::vector<blink::mojom::AggregatableReportHistogramContribution> + contributions; + ::aggregation_service::mojom::AggregationCoordinator aggregation_coordinator; + + absl::visit( + base::Overloaded{ + [](const AttributionReport::EventLevelData&) { NOTREACHED(); }, + [&](const AttributionReport::AggregatableAttributionData& data) { + source_time = data.source.common_info().source_time(); + source_debug_key = data.source.debug_key(); + aggregation_coordinator = data.common_data.aggregation_coordinator; + base::ranges::transform( + data.contributions, std::back_inserter(contributions), + [](const auto& contribution) { + return blink::mojom::AggregatableReportHistogramContribution( + /*bucket=*/contribution.key(), + /*value=*/base::checked_cast<int32_t>( + contribution.value())); + }); + }, + [&](const AttributionReport::NullAggregatableData& data) { + source_time = data.fake_source_time; + aggregation_coordinator = data.common_data.aggregation_coordinator; + contributions.emplace_back(/*bucket=*/0, /*value=*/0); + }, + }, + report.data()); const AttributionInfo& attribution_info = report.attribution_info(); AggregatableReportSharedInfo::DebugMode debug_mode = - data->source.debug_key().has_value() && - attribution_info.debug_key.has_value() + source_debug_key.has_value() && attribution_info.debug_key.has_value() ? AggregatableReportSharedInfo::DebugMode::kEnabled : AggregatableReportSharedInfo::DebugMode::kDisabled; - std::vector<blink::mojom::AggregatableReportHistogramContribution> - contributions; - base::ranges::transform( - data->contributions, std::back_inserter(contributions), - [](const auto& contribution) { - return blink::mojom::AggregatableReportHistogramContribution( - /*bucket=*/contribution.key(), - /*value=*/base::checked_cast<int32_t>(contribution.value())); - }); - base::Value::Dict additional_fields; - additional_fields.Set("source_registration_time", - SerializeTimeRoundedDownToWholeDayInSeconds( - data->source.common_info().source_time())); + additional_fields.Set( + "source_registration_time", + SerializeTimeRoundedDownToWholeDayInSeconds(source_time)); additional_fields.Set( "attribution_destination", net::SchemefulSite(attribution_info.context_origin).Serialize()); @@ -155,13 +171,12 @@ AggregationServicePayloadContents::Operation::kHistogram, std::move(contributions), blink::mojom::AggregationServiceMode::kDefault, - data->aggregation_coordinator), + aggregation_coordinator), AggregatableReportSharedInfo( report.initial_report_time(), report.external_report_id(), - data->source.common_info().reporting_origin(), debug_mode, - std::move(additional_fields), - AttributionReport::AggregatableAttributionData::kVersion, - AttributionReport::AggregatableAttributionData::kApiIdentifier)); + report.GetReportingOrigin(), debug_mode, std::move(additional_fields), + AttributionReport::CommonAggregatableData::kVersion, + AttributionReport::CommonAggregatableData::kApiIdentifier)); } } // namespace content
diff --git a/content/browser/attribution_reporting/aggregatable_attribution_utils_unittest.cc b/content/browser/attribution_reporting/aggregatable_attribution_utils_unittest.cc index ad3e9d8..dd1e9122 100644 --- a/content/browser/attribution_reporting/aggregatable_attribution_utils_unittest.cc +++ b/content/browser/attribution_reporting/aggregatable_attribution_utils_unittest.cc
@@ -19,12 +19,14 @@ #include "components/attribution_reporting/aggregation_keys.h" #include "components/attribution_reporting/filters.h" #include "components/attribution_reporting/source_type.mojom.h" +#include "content/browser/aggregation_service/aggregatable_report.h" #include "content/browser/attribution_reporting/aggregatable_histogram_contribution.h" #include "content/browser/attribution_reporting/attribution_report.h" #include "content/browser/attribution_reporting/attribution_test_utils.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/numeric/int128.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/blink/public/mojom/private_aggregation/aggregatable_report.mojom.h" namespace content { @@ -182,4 +184,24 @@ } } +TEST(AggregatableAttributionUtilsTest, AggregatableReportRequestForNullReport) { + absl::optional<AggregatableReportRequest> request = + CreateAggregatableReportRequest( + ReportBuilder(AttributionInfoBuilder().Build(), + SourceBuilder(base::Time::FromJavaTime(1234567890123)) + .BuildStored()) + .BuildNullAggregatable()); + ASSERT_TRUE(request.has_value()); + EXPECT_THAT(request->payload_contents().contributions, + ElementsAre(blink::mojom::AggregatableReportHistogramContribution( + /*bucket=*/0, /*value=*/0))); + EXPECT_EQ(request->payload_contents().aggregation_coordinator, + ::aggregation_service::mojom::AggregationCoordinator::kAwsCloud); + const std::string* source_registration_time = + request->shared_info().additional_fields.FindString( + "source_registration_time"); + ASSERT_TRUE(source_registration_time); + EXPECT_EQ(*source_registration_time, "1234483200"); +} + } // namespace content
diff --git a/content/browser/attribution_reporting/attribution_aggregatable_report_golden_unittest.cc b/content/browser/attribution_reporting/attribution_aggregatable_report_golden_unittest.cc index bab84c0..182b196 100644 --- a/content/browser/attribution_reporting/attribution_aggregatable_report_golden_unittest.cc +++ b/content/browser/attribution_reporting/attribution_aggregatable_report_golden_unittest.cc
@@ -125,7 +125,7 @@ absl::get_if<AttributionReport::AggregatableAttributionData>( &report.data()); ASSERT_TRUE(data); - data->assembled_report = std::move(*assembled_report); + data->common_data.assembled_report = std::move(*assembled_report); EXPECT_TRUE(VerifyReport( report.ReportBody(), std::move(expected_report).TakeDict(), *base64_encoded_expected_cleartext_payload))
diff --git a/content/browser/attribution_reporting/attribution_internals_handler_impl.cc b/content/browser/attribution_reporting/attribution_internals_handler_impl.cc index a30ad155..c1ef987 100644 --- a/content/browser/attribution_reporting/attribution_internals_handler_impl.cc +++ b/content/browser/attribution_reporting/attribution_internals_handler_impl.cc
@@ -176,13 +176,24 @@ return ai_mojom::WebUIReportData::NewAggregatableAttributionData( ai_mojom::WebUIReportAggregatableAttributionData::New( std::move(contributions), - aggregatable_data.attestation_token, + aggregatable_data.common_data.attestation_token, aggregation_service::SerializeAggregationCoordinator( - aggregatable_data.aggregation_coordinator))); + aggregatable_data.common_data + .aggregation_coordinator))); + }, + + [](const AttributionReport::NullAggregatableData&) + -> ai_mojom::WebUIReportDataPtr { + // TODO(crbug.com/1432558): Display null reports in internals UI. + return nullptr; }, }, report.data()); + if (!data) { + return nullptr; + } + return attribution_internals::mojom::WebUIReport::New( report.id(), report.ReportURL(is_debug_report), /*trigger_time=*/attribution_info.time.ToJsTime(), @@ -197,9 +208,12 @@ std::vector<attribution_internals::mojom::WebUIReportPtr> web_ui_reports; web_ui_reports.reserve(pending_reports.size()); for (const AttributionReport& report : pending_reports) { - web_ui_reports.push_back( + attribution_internals::mojom::WebUIReportPtr web_report = WebUIReport(report, /*is_debug_report=*/false, - ReportStatus::NewPending(Empty::New()))); + ReportStatus::NewPending(Empty::New())); + if (web_report) { + web_ui_reports.push_back(std::move(web_report)); + } } std::move(web_ui_callback).Run(std::move(web_ui_reports)); @@ -362,8 +376,11 @@ break; } - observer_->OnReportSent( - WebUIReport(report, is_debug_report, std::move(status))); + attribution_internals::mojom::WebUIReportPtr web_report = + WebUIReport(report, is_debug_report, std::move(status)); + if (web_report) { + observer_->OnReportSent(std::move(web_report)); + } } void AttributionInternalsHandlerImpl::OnDebugReportSent( @@ -531,12 +548,14 @@ AttributionTrigger::EventLevelResult::kSuccessDroppedLowerPriority); DCHECK(result.new_event_level_report().has_value()); - observer_->OnReportDropped( + attribution_internals::mojom::WebUIReportPtr web_report = WebUIReport(*report, /*is_debug_report=*/false, ReportStatus::NewReplacedByHigherPriorityReport( result.new_event_level_report() ->external_report_id() - .AsLowercaseString()))); + .AsLowercaseString())); + DCHECK(web_report); + observer_->OnReportDropped(std::move(web_report)); } }
diff --git a/content/browser/attribution_reporting/attribution_interop_runner.cc b/content/browser/attribution_reporting/attribution_interop_runner.cc index a50f604..fcebb86 100644 --- a/content/browser/attribution_reporting/attribution_interop_runner.cc +++ b/content/browser/attribution_reporting/attribution_interop_runner.cc
@@ -20,6 +20,7 @@ #include "base/functional/overloaded.h" #include "base/json/json_reader.h" #include "base/memory/raw_ptr.h" +#include "base/notreached.h" #include "base/numerics/safe_conversions.h" #include "base/ranges/algorithm.h" #include "base/strings/string_number_conversions.h" @@ -123,6 +124,9 @@ report.initial_report_time()); DCHECK(ok); }, + [](const AttributionReport::NullAggregatableData&) { + NOTREACHED(); + }, }, report.data()); @@ -320,6 +324,9 @@ reports = is_debug_report ? &debug_aggregatable_reports_ : &aggregatable_reports_; break; + case AttributionReport::Type::kNullAggregatable: + // TODO(linnan): Consider supporting null reports in interop tests. + return; } reports->Append(json_converter_.ToJson(report, is_debug_report));
diff --git a/content/browser/attribution_reporting/attribution_manager_impl.cc b/content/browser/attribution_reporting/attribution_manager_impl.cc index 3a68ad3..adcbe83 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl.cc +++ b/content/browser/attribution_reporting/attribution_manager_impl.cc
@@ -236,6 +236,8 @@ "Conversions.AggregatableReport.NetworkConnectionTypeOnFailure", connection_type); break; + case AttributionReport::Type::kNullAggregatable: + break; } } @@ -288,6 +290,8 @@ now - report.report_time(), base::Seconds(1), base::Days(1), 50); break; } + case AttributionReport::Type::kNullAggregatable: + break; } } @@ -305,6 +309,8 @@ "Conversions.AggregatableReport.ReportSendOutcome2", ConvertToConversionReportSendOutcome(status)); break; + case AttributionReport::Type::kNullAggregatable: + break; } } @@ -339,6 +345,8 @@ time_since_original_report_time, base::Seconds(1), base::Days(24), /*bucket_count=*/50); break; + case AttributionReport::Type::kNullAggregatable: + break; } } @@ -420,13 +428,25 @@ bool AttributionManagerImpl::IsReportAllowed( const AttributionReport& report) const { - const CommonSourceInfo& common_info = report.GetStoredSource().common_info(); + const attribution_reporting::SuitableOrigin* source_origin = absl::visit( + base::Overloaded{ + [](const AttributionReport::EventLevelData& data) { + return &data.source.common_info().source_origin(); + }, + [](const AttributionReport::AggregatableAttributionData& data) { + return &data.source.common_info().source_origin(); + }, + [&](const AttributionReport::NullAggregatableData&) { + return &report.attribution_info().context_origin; + }, + }, + report.data()); return IsOperationAllowed( storage_partition_.get(), ContentBrowserClient::AttributionReportingOperation::kReport, - /*rfh=*/nullptr, &*common_info.source_origin(), + /*rfh=*/nullptr, &**source_origin, &*report.attribution_info().context_origin, - &*common_info.reporting_origin()); + &*report.GetReportingOrigin()); } // static @@ -594,6 +614,13 @@ cleared_debug_key, is_debug_cookie_set)); } +void AttributionManagerImpl::StoreAttributionReportForTesting( + AttributionReport report) { + attribution_storage_ + .AsyncCall(&AttributionStorage::StoreAttributionReportForTesting) + .WithArgs(std::move(report)); +} + void AttributionManagerImpl::RecordPendingAggregatableReportsTimings() { const base::Time now = base::Time::Now(); @@ -809,7 +836,9 @@ void AttributionManagerImpl::MaybeSendDebugReport(AttributionReport&& report) { const AttributionInfo& attribution_info = report.attribution_info(); - if (!attribution_info.debug_key || !report.GetStoredSource().debug_key() || + const StoredSource* source = report.GetStoredSource(); + DCHECK(source); + if (!attribution_info.debug_key || !source->debug_key() || !IsReportAllowed(report)) { return; } @@ -1014,6 +1043,7 @@ std::move(callback)); break; case AttributionReport::Type::kAggregatableAttribution: + case AttributionReport::Type::kNullAggregatable: AssembleAggregatableReport(std::move(report), is_debug_report, std::move(callback)); break; @@ -1146,10 +1176,18 @@ return; } - auto* data = absl::get_if<AttributionReport::AggregatableAttributionData>( - &report.data()); - DCHECK(data); - data->assembled_report = std::move(assembled_report); + absl::visit( + base::Overloaded{ + [](const AttributionReport::EventLevelData&) { NOTREACHED(); }, + [&](AttributionReport::AggregatableAttributionData& data) { + data.common_data.assembled_report = std::move(assembled_report); + }, + [&](AttributionReport::NullAggregatableData& data) { + data.common_data.assembled_report = std::move(assembled_report); + }, + }, + report.data()); + RecordAssembleAggregatableReportStatus( AssembleAggregatableReportStatus::kSuccess);
diff --git a/content/browser/attribution_reporting/attribution_manager_impl.h b/content/browser/attribution_reporting/attribution_manager_impl.h index a1d2878..5084671 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl.h +++ b/content/browser/attribution_reporting/attribution_manager_impl.h
@@ -266,6 +266,8 @@ bool success); #endif // BUILDFLAG(IS_ANDROID) + void StoreAttributionReportForTesting(AttributionReport); + // Never null. const raw_ptr<StoragePartitionImpl> storage_partition_;
diff --git a/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc b/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc index 3a6529822..cebba748 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc +++ b/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc
@@ -386,6 +386,10 @@ task_environment_.RunUntilIdle(); } + void StoreAttributionReport(AttributionReport report) { + attribution_manager_->StoreAttributionReportForTesting(std::move(report)); + } + protected: // Override this in order to modify the delegate before it is passed // irretrievably to storage. @@ -3049,4 +3053,70 @@ task_environment_.RunUntilIdle(); } +TEST_F(AttributionManagerImplTest, NullAggregatableReport_ReportSent) { + StoreAttributionReport(ReportBuilder(AttributionInfoBuilder().Build(), + SourceBuilder().BuildStored()) + .SetReportTime(base::Time::Now()) + .BuildNullAggregatable()); + + base::RunLoop run_loop; + + EXPECT_CALL(*aggregation_service_, AssembleReport) + .WillOnce([](AggregatableReportRequest request, + AggregationService::AssemblyCallback callback) { + std::move(callback).Run(std::move(request), + CreateExampleAggregatableReport(), + AggregationService::AssemblyStatus::kOk); + }); + + EXPECT_CALL( + *report_sender_, + SendReport(ReportTypeIs(AttributionReport::Type::kNullAggregatable), + /*is_debug_report=*/false, _)) + .WillOnce(base::test::RunOnceClosure(run_loop.QuitClosure())); + + ForceGetReportsToSend(); + run_loop.Run(); +} + +TEST_F(AttributionManagerImplTest, + EmbedderDisallowsReporting_NullReportNotSent) { + StoreAttributionReport(ReportBuilder(AttributionInfoBuilder().Build(), + SourceBuilder().BuildStored()) + .SetReportTime(base::Time::Now()) + .BuildNullAggregatable()); + + MockAttributionReportingContentBrowserClient browser_client; + EXPECT_CALL( + browser_client, + IsAttributionReportingOperationAllowed( + _, ContentBrowserClient::AttributionReportingOperation::kReport, _, + Pointee(url::Origin::Create(GURL("https://conversion.test/"))), + Pointee(url::Origin::Create(GURL("https://conversion.test/"))), + Pointee(url::Origin::Create(GURL("https://report.test/"))))) + .WillOnce(Return(false)); + ScopedContentBrowserClientSetting setting(&browser_client); + + EXPECT_CALL(*aggregation_service_, AssembleReport).Times(0); + + MockAttributionObserver observer; + base::ScopedObservation<AttributionManager, AttributionObserver> observation( + &observer); + observation.Observe(attribution_manager_.get()); + + base::RunLoop run_loop; + + EXPECT_CALL( + observer, + OnReportSent(ReportTypeIs(AttributionReport::Type::kNullAggregatable), + /*is_debug_report=*/false, + Field(&SendResult::status, SendResult::Status::kDropped))) + .WillOnce(base::test::RunOnceClosure(run_loop.QuitClosure())); + + ForceGetReportsToSend(); + run_loop.Run(); + + EXPECT_THAT(StoredReports(), IsEmpty()); +} + } // namespace content
diff --git a/content/browser/attribution_reporting/attribution_report.cc b/content/browser/attribution_reporting/attribution_report.cc index c8304033..c022cb4 100644 --- a/content/browser/attribution_reporting/attribution_report.cc +++ b/content/browser/attribution_reporting/attribution_report.cc
@@ -29,6 +29,32 @@ namespace content { +namespace { + +base::Value::Dict GetReportBody( + const AttributionReport::CommonAggregatableData& data, + absl::optional<uint64_t> trigger_debug_key) { + base::Value::Dict dict; + + if (const auto& assembled_report = data.assembled_report; + assembled_report.has_value()) { + dict = assembled_report->GetAsJson(); + } else { + // This generally should only be called when displaying the report + // for debugging/internals. + dict.Set("shared_info", "not generated prior to send"); + dict.Set("aggregation_service_payloads", "not generated prior to send"); + } + + if (trigger_debug_key) { + dict.Set("trigger_debug_key", base::NumberToString(*trigger_debug_key)); + } + + return dict; +} + +} // namespace + AttributionReport::EventLevelData::EventLevelData( uint64_t trigger_data, int64_t priority, @@ -55,15 +81,37 @@ AttributionReport::EventLevelData::~EventLevelData() = default; -AttributionReport::AggregatableAttributionData::AggregatableAttributionData( - std::vector<AggregatableHistogramContribution> contributions, +AttributionReport::CommonAggregatableData::CommonAggregatableData( ::aggregation_service::mojom::AggregationCoordinator aggregation_coordinator, - absl::optional<std::string> attestation_token, + absl::optional<std::string> attestation_token) + : aggregation_coordinator(aggregation_coordinator), + attestation_token(std::move(attestation_token)) {} + +AttributionReport::CommonAggregatableData::CommonAggregatableData() = default; + +AttributionReport::CommonAggregatableData::CommonAggregatableData( + const CommonAggregatableData&) = default; + +AttributionReport::CommonAggregatableData& +AttributionReport::CommonAggregatableData::operator=( + const CommonAggregatableData&) = default; + +AttributionReport::CommonAggregatableData::CommonAggregatableData( + CommonAggregatableData&&) = default; + +AttributionReport::CommonAggregatableData& +AttributionReport::CommonAggregatableData::operator=(CommonAggregatableData&&) = + default; + +AttributionReport::CommonAggregatableData::~CommonAggregatableData() = default; + +AttributionReport::AggregatableAttributionData::AggregatableAttributionData( + CommonAggregatableData common_data, + std::vector<AggregatableHistogramContribution> contributions, StoredSource source) - : contributions(std::move(contributions)), - attestation_token(std::move(attestation_token)), - aggregation_coordinator(aggregation_coordinator), + : common_data(std::move(common_data)), + contributions(std::move(contributions)), source(std::move(source)) {} AttributionReport::AggregatableAttributionData::AggregatableAttributionData( @@ -92,6 +140,30 @@ return budget_required; } +AttributionReport::NullAggregatableData::NullAggregatableData( + CommonAggregatableData common_data, + attribution_reporting::SuitableOrigin reporting_origin, + base::Time fake_source_time) + : common_data(std::move(common_data)), + reporting_origin(std::move(reporting_origin)), + fake_source_time(fake_source_time) {} + +AttributionReport::NullAggregatableData::NullAggregatableData( + const NullAggregatableData&) = default; + +AttributionReport::NullAggregatableData::NullAggregatableData( + NullAggregatableData&&) = default; + +AttributionReport::NullAggregatableData& +AttributionReport::NullAggregatableData::operator=( + const NullAggregatableData&) = default; + +AttributionReport::NullAggregatableData& +AttributionReport::NullAggregatableData::operator=(NullAggregatableData&&) = + default; + +AttributionReport::NullAggregatableData::~NullAggregatableData() = default; + AttributionReport::AttributionReport(AttributionInfo attribution_info, Id id, base::Time report_time, @@ -131,6 +203,7 @@ endpoint_path = "report-event-attribution"; break; case Type::kAggregatableAttribution: + case Type::kNullAggregatable: endpoint_path = "report-aggregate-attribution"; break; } @@ -140,11 +213,7 @@ GURL::Replacements replacements; replacements.SetPathStr(path); - return GetStoredSource() - .common_info() - .reporting_origin() - ->GetURL() - .ReplaceComponents(replacements); + return GetReportingOrigin()->GetURL().ReplaceComponents(replacements); } base::Value::Dict AttributionReport::ReportBody() const { @@ -192,30 +261,20 @@ }, [this](const AggregatableAttributionData& data) { - base::Value::Dict dict; - - if (data.assembled_report.has_value()) { - dict = data.assembled_report->GetAsJson(); - } else { - // This generally should only be called when displaying the report - // for debugging/internals. - dict.Set("shared_info", "not generated prior to send"); - dict.Set("aggregation_service_payloads", - "not generated prior to send"); - } + base::Value::Dict dict = GetReportBody( + data.common_data, this->attribution_info().debug_key); if (absl::optional<uint64_t> debug_key = data.source.debug_key()) { dict.Set("source_debug_key", base::NumberToString(*debug_key)); } - if (absl::optional<uint64_t> debug_key = - this->attribution_info().debug_key) { - dict.Set("trigger_debug_key", base::NumberToString(*debug_key)); - } - return dict; }, - }, + + [this](const NullAggregatableData& data) { + return GetReportBody(data.common_data, + this->attribution_info().debug_key); + }}, data_); } @@ -247,16 +306,41 @@ void AttributionReport::PopulateAdditionalHeaders( net::HttpRequestHeaders& headers) const { if (const auto* data = absl::get_if<AggregatableAttributionData>(&data_); - data && data->attestation_token.has_value()) { + data && data->common_data.attestation_token.has_value()) { headers.SetHeader("Sec-Attribution-Reporting-Private-State-Token", - *data->attestation_token); + *data->common_data.attestation_token); } } -const StoredSource& AttributionReport::GetStoredSource() const { +const StoredSource* AttributionReport::GetStoredSource() const { return absl::visit( - [](const auto& data) -> const StoredSource& { return data.source; }, + base::Overloaded{ + [](const EventLevelData& data) { return &data.source; }, + [](const AggregatableAttributionData& data) { return &data.source; }, + [](const NullAggregatableData& data) -> const StoredSource* { + return nullptr; + }, + }, data_); } +const attribution_reporting::SuitableOrigin& +AttributionReport::GetReportingOrigin() const { + return absl::visit(base::Overloaded{ + [](const EventLevelData& data) + -> const attribution_reporting::SuitableOrigin& { + return data.source.common_info().reporting_origin(); + }, + [](const AggregatableAttributionData& data) + -> const attribution_reporting::SuitableOrigin& { + return data.source.common_info().reporting_origin(); + }, + [](const NullAggregatableData& data) + -> const attribution_reporting::SuitableOrigin& { + return data.reporting_origin; + }, + }, + data_); +} + } // namespace content
diff --git a/content/browser/attribution_reporting/attribution_report.h b/content/browser/attribution_reporting/attribution_report.h index 85a8e10..9630b89 100644 --- a/content/browser/attribution_reporting/attribution_report.h +++ b/content/browser/attribution_reporting/attribution_report.h
@@ -71,13 +71,44 @@ // `attribution_test_utils.h` should also be updated. }; + struct CONTENT_EXPORT CommonAggregatableData { + CommonAggregatableData(::aggregation_service::mojom::AggregationCoordinator, + absl::optional<std::string> attestation_token); + CommonAggregatableData(); + CommonAggregatableData(const CommonAggregatableData&); + CommonAggregatableData(CommonAggregatableData&&); + CommonAggregatableData& operator=(const CommonAggregatableData&); + CommonAggregatableData& operator=(CommonAggregatableData&&); + ~CommonAggregatableData(); + + // When updating the string, update the goldens and version history too, see + // //content/test/data/attribution_reporting/aggregatable_report_goldens/README.md + static constexpr char kVersion[] = "0.1"; + + // Enum string identifying this API for use in reports. + static constexpr char kApiIdentifier[] = "attribution-reporting"; + + // The report assembled by the aggregation service. If null, the report has + // not been assembled yet. + absl::optional<AggregatableReport> assembled_report; + + ::aggregation_service::mojom::AggregationCoordinator + aggregation_coordinator = + ::aggregation_service::mojom::AggregationCoordinator::kDefault; + + // A token that can be sent alongside the report to complete trigger + // attestation. + absl::optional<std::string> attestation_token; + + // When adding new members, the corresponding `operator==()` definition in + // `attribution_test_utils.h` should also be updated. + }; + // Struct that contains the data specific to the aggregatable report. struct CONTENT_EXPORT AggregatableAttributionData { AggregatableAttributionData( + CommonAggregatableData, std::vector<AggregatableHistogramContribution> contributions, - ::aggregation_service::mojom::AggregationCoordinator - aggregation_coordinator, - absl::optional<std::string> attestation_token, StoredSource); AggregatableAttributionData(const AggregatableAttributionData&); AggregatableAttributionData& operator=(const AggregatableAttributionData&); @@ -88,34 +119,38 @@ // Returns the sum of the contributions (values) across all buckets. base::CheckedNumeric<int64_t> BudgetRequired() const; - // When updating the string, update the goldens and version history too, see - // //content/test/data/attribution_reporting/aggregatable_report_goldens/README.md - static constexpr char kVersion[] = "0.1"; - - // Enum string identifying this API for use in reports. - static constexpr char kApiIdentifier[] = "attribution-reporting"; + CommonAggregatableData common_data; // The historgram contributions. std::vector<AggregatableHistogramContribution> contributions; - // The report assembled by the aggregation service. If null, the report has - // not been assembled yet. - absl::optional<AggregatableReport> assembled_report; - - // A token that can be sent alongside the report to complete trigger - // attestation. - absl::optional<std::string> attestation_token; - - ::aggregation_service::mojom::AggregationCoordinator - aggregation_coordinator; - StoredSource source; // When adding new members, the corresponding `operator==()` definition in // `attribution_test_utils.h` should also be updated. }; - using Data = absl::variant<EventLevelData, AggregatableAttributionData>; + struct CONTENT_EXPORT NullAggregatableData { + NullAggregatableData(CommonAggregatableData, + attribution_reporting::SuitableOrigin reporting_origin, + base::Time fake_source_time); + NullAggregatableData(const NullAggregatableData&); + NullAggregatableData(NullAggregatableData&&); + NullAggregatableData& operator=(const NullAggregatableData&); + NullAggregatableData& operator=(NullAggregatableData&&); + ~NullAggregatableData(); + + CommonAggregatableData common_data; + attribution_reporting::SuitableOrigin reporting_origin; + base::Time fake_source_time; + + // When adding new members, the corresponding `operator==()` definition in + // `attribution_test_utils.h` should also be updated. + }; + + using Data = absl::variant<EventLevelData, + AggregatableAttributionData, + NullAggregatableData>; // Returns the minimum non-null time of `a` and `b`, or `absl::nullopt` if // both are null. @@ -161,7 +196,9 @@ Type GetReportType() const { return static_cast<Type>(data_.index()); } - const StoredSource& GetStoredSource() const; + const StoredSource* GetStoredSource() const; + + const attribution_reporting::SuitableOrigin& GetReportingOrigin() const; void set_id(Id id) { id_ = id; }
diff --git a/content/browser/attribution_reporting/attribution_report_network_sender.cc b/content/browser/attribution_reporting/attribution_report_network_sender.cc index ddcf66b7..3aa5d47 100644 --- a/content/browser/attribution_reporting/attribution_report_network_sender.cc +++ b/content/browser/attribution_reporting/attribution_report_network_sender.cc
@@ -167,9 +167,9 @@ : !internal_ok ? Status::kInternalError : Status::kExternalError; - const char* status_metric; - const char* http_response_or_net_error_code_metric; - const char* retry_succeed_metric; + const char* status_metric = nullptr; + const char* http_response_or_net_error_code_metric = nullptr; + const char* retry_succeed_metric = nullptr; switch (report.GetReportType()) { case AttributionReport::Type::kEventLevel: @@ -198,17 +198,21 @@ ? "Conversions.DebugReport.ReportRetrySucceedAggregatable" : "Conversions.ReportRetrySucceedAggregatable"; break; + case AttributionReport::Type::kNullAggregatable: + break; } - base::UmaHistogramEnumeration(status_metric, status); + if (status_metric) { + base::UmaHistogramEnumeration(status_metric, status); - // Since net errors are always negative and HTTP errors are always positive, - // it is fine to combine these in a single histogram. - base::UmaHistogramSparse(http_response_or_net_error_code_metric, - internal_ok ? response_code : net_error); + // Since net errors are always negative and HTTP errors are always positive, + // it is fine to combine these in a single histogram. + base::UmaHistogramSparse(http_response_or_net_error_code_metric, + internal_ok ? response_code : net_error); - if (loader->GetNumRetries() > 0) { - base::UmaHistogramBoolean(retry_succeed_metric, status == Status::kOk); + if (loader->GetNumRetries() > 0) { + base::UmaHistogramBoolean(retry_succeed_metric, status == Status::kOk); + } } loaders_in_progress_.erase(it);
diff --git a/content/browser/attribution_reporting/attribution_report_unittest.cc b/content/browser/attribution_reporting/attribution_report_unittest.cc index e26d8e0..e28ab7b 100644 --- a/content/browser/attribution_reporting/attribution_report_unittest.cc +++ b/content/browser/attribution_reporting/attribution_report_unittest.cc
@@ -13,6 +13,8 @@ #include "base/time/time.h" #include "base/values.h" #include "components/attribution_reporting/source_type.mojom.h" +#include "content/browser/aggregation_service/aggregatable_report.h" +#include "content/browser/aggregation_service/aggregation_service_test_utils.h" #include "content/browser/attribution_reporting/attribution_info.h" #include "content/browser/attribution_reporting/attribution_report.h" #include "content/browser/attribution_reporting/attribution_test_utils.h" @@ -260,5 +262,37 @@ } } +TEST(AttributionReportTest, NullAggregatableReport) { + base::Value::Dict expected = base::test::ParseJsonDict(R"json({ + "aggregation_coordinator_identifier": "aws-cloud", + "aggregation_service_payloads": [{ + "key_id": "key", + "payload": "ABCD1234" + }], + "shared_info":"example_shared_info" + })json"); + + AttributionReport report = ReportBuilder(AttributionInfoBuilder().Build(), + SourceBuilder().BuildStored()) + .BuildNullAggregatable(); + EXPECT_EQ(report.ReportURL(), + GURL("https://report.test/.well-known/attribution-reporting/" + "report-aggregate-attribution")); + + auto& data = + absl::get<AttributionReport::NullAggregatableData>(report.data()); + data.common_data.assembled_report = AggregatableReport( + {AggregatableReport::AggregationServicePayload( + /*payload=*/kABCD1234AsBytes, + /*key_id=*/"key", + /*debug_cleartext_payload=*/absl::nullopt)}, + "example_shared_info", + /*debug_key=*/absl::nullopt, + /*additional_fields=*/{}, + ::aggregation_service::mojom::AggregationCoordinator::kDefault); + + EXPECT_THAT(report.ReportBody(), IsJson(expected)); +} + } // namespace } // namespace content
diff --git a/content/browser/attribution_reporting/attribution_reporting.mojom b/content/browser/attribution_reporting/attribution_reporting.mojom index 5cfaf584..e246be2 100644 --- a/content/browser/attribution_reporting/attribution_reporting.mojom +++ b/content/browser/attribution_reporting/attribution_reporting.mojom
@@ -11,6 +11,8 @@ // An aggregatable report. // https://github.com/WICG/attribution-reporting-api/blob/main/AGGREGATE.md kAggregatableAttribution = 1, + // A null aggregatable report. + kNullAggregatable = 2, }; enum OsRegistrationType {
diff --git a/content/browser/attribution_reporting/attribution_reporting.proto b/content/browser/attribution_reporting/attribution_reporting.proto index e983967..0e64103 100644 --- a/content/browser/attribution_reporting/attribution_reporting.proto +++ b/content/browser/attribution_reporting/attribution_reporting.proto
@@ -31,17 +31,27 @@ optional int64 priority = 2; } -message AttributionAggregatableMetadata { +message AttributionCommonAggregatableMetadata { enum Coordinator { AWS_CLOUD = 0; } optional Coordinator coordinator = 1; optional string attestation_token = 2; +} + +message AttributionAggregatableMetadata { + optional AttributionCommonAggregatableMetadata common_data = 1; message Contribution { optional AttributionAggregationKey key = 1; optional uint32 value = 2; } - repeated Contribution contributions = 3; + repeated Contribution contributions = 2; +} + +message AttributionNullAggregatableMetadata { + optional AttributionCommonAggregatableMetadata common_data = 1; + // Stored as microseconds since the Windows epoch (1601-01-01 00:00:00 UTC). + optional int64 fake_source_time = 2; }
diff --git a/content/browser/attribution_reporting/attribution_storage.h b/content/browser/attribution_reporting/attribution_storage.h index 2789a1d..11b10b7 100644 --- a/content/browser/attribution_reporting/attribution_storage.h +++ b/content/browser/attribution_reporting/attribution_storage.h
@@ -117,6 +117,8 @@ base::Time delete_end, StoragePartition::StorageKeyMatcherFunction filter, bool delete_rate_limit_data = true) = 0; + + virtual void StoreAttributionReportForTesting(AttributionReport) = 0; }; } // namespace content
diff --git a/content/browser/attribution_reporting/attribution_storage_delegate.cc b/content/browser/attribution_reporting/attribution_storage_delegate.cc index dd0cb0d..81ac2fa 100644 --- a/content/browser/attribution_reporting/attribution_storage_delegate.cc +++ b/content/browser/attribution_reporting/attribution_storage_delegate.cc
@@ -5,6 +5,7 @@ #include "content/browser/attribution_reporting/attribution_storage_delegate.h" #include "base/check.h" +#include "base/notreached.h" #include "components/attribution_reporting/source_type.mojom.h" #include "content/browser/attribution_reporting/attribution_reporting.mojom.h" @@ -44,6 +45,9 @@ return config_.event_level_limit.max_reports_per_destination; case attribution_reporting::mojom::ReportType::kAggregatableAttribution: return config_.aggregate_limit.max_reports_per_destination; + case attribution_reporting::mojom::ReportType::kNullAggregatable: + NOTREACHED(); + return 0; } }
diff --git a/content/browser/attribution_reporting/attribution_storage_delegate_impl_unittest.cc b/content/browser/attribution_reporting/attribution_storage_delegate_impl_unittest.cc index e6de6ae..5990675 100644 --- a/content/browser/attribution_reporting/attribution_storage_delegate_impl_unittest.cc +++ b/content/browser/attribution_reporting/attribution_storage_delegate_impl_unittest.cc
@@ -112,7 +112,7 @@ GetReport(source_time, /*trigger_time=*/source_time); EXPECT_EQ(source_time + base::Days(2) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, @@ -122,7 +122,7 @@ const AttributionReport report = GetReport(source_time, trigger_time); EXPECT_EQ(source_time + base::Days(2) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, @@ -135,7 +135,7 @@ const AttributionReport report = GetReport(source_time, trigger_time); EXPECT_EQ(source_time + base::Days(7) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, @@ -148,7 +148,7 @@ /*expiry=*/base::Hours(2)); EXPECT_EQ(source_time + base::Hours(3), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, @@ -162,7 +162,7 @@ EXPECT_EQ(source_time + base::Days(4) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, @@ -177,7 +177,7 @@ // The expiry window is reported one hour after expiry time. EXPECT_EQ(source_time + base::Days(9) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, @@ -190,7 +190,7 @@ /*report_window=*/base::Days(1), SourceType::kEvent); EXPECT_EQ(source_time + base::Days(1) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, @@ -203,7 +203,7 @@ /*report_window=*/base::Days(4), SourceType::kEvent); EXPECT_EQ(source_time + base::Days(4) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, @@ -217,7 +217,7 @@ /*report_window=*/base::Days(4)); EXPECT_EQ(source_time + base::Days(4) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST(AttributionStorageDelegateImplTest, GetAggregatableReportTime) { @@ -576,7 +576,7 @@ GetReport(source_time, /*trigger_time=*/source_time); EXPECT_EQ(source_time + base::Days(1) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST_F(AttributionStorageDelegateImplTestFeatureConfigured, @@ -589,7 +589,7 @@ const AttributionReport report = GetReport(source_time, trigger_time); EXPECT_EQ(source_time + base::Days(5) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST_F(AttributionStorageDelegateImplTestFeatureConfigured, @@ -626,7 +626,7 @@ GetReport(source_time, /*trigger_time=*/source_time); EXPECT_EQ(source_time + base::Days(2) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST_F(AttributionStorageDelegateImplTestInvalidFeatureConfigured, @@ -636,7 +636,7 @@ const AttributionReport report = GetReport(source_time, trigger_time); EXPECT_EQ(source_time + base::Days(7) + base::Hours(1), AttributionStorageDelegateImpl().GetEventLevelReportTime( - report.GetStoredSource(), report.attribution_info().time)); + *report.GetStoredSource(), report.attribution_info().time)); } TEST_F(AttributionStorageDelegateImplTestInvalidFeatureConfigured,
diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc index a72c64b..8106ca5 100644 --- a/content/browser/attribution_reporting/attribution_storage_sql.cc +++ b/content/browser/attribution_reporting/attribution_storage_sql.cc
@@ -86,7 +86,7 @@ const base::FilePath::CharType kDatabasePath[] = FILE_PATH_LITERAL("Conversions"); -constexpr int64_t kUnsetReportId = -1; +constexpr int64_t kUnsetRecordId = -1; void RecordInitializationStatus( const AttributionStorageSql::InitStatus status) { @@ -169,6 +169,8 @@ return AttributionReport::Type::kEventLevel; case static_cast<int>(AttributionReport::Type::kAggregatableAttribution): return AttributionReport::Type::kAggregatableAttribution; + case static_cast<int>(AttributionReport::Type::kNullAggregatable): + return AttributionReport::Type::kNullAggregatable; default: return absl::nullopt; } @@ -286,9 +288,9 @@ return str; } -bool DeserializeReportMetadata(const std::string& str, - uint64_t& trigger_data, - int64_t& priority) { +[[nodiscard]] bool DeserializeReportMetadata(const std::string& str, + uint64_t& trigger_data, + int64_t& priority) { proto::AttributionEventLevelMetadata msg; if (!msg.ParseFromString(str) || !msg.has_trigger_data() || !msg.has_priority()) { @@ -300,19 +302,49 @@ return true; } +void SerializeCommonAggregatableData( + const AttributionReport::CommonAggregatableData& data, + proto::AttributionCommonAggregatableMetadata& msg) { + switch (data.aggregation_coordinator) { + case AggregationCoordinator::kAwsCloud: + msg.set_coordinator( + proto::AttributionCommonAggregatableMetadata::AWS_CLOUD); + break; + } + + if (const auto& attestation_token = data.attestation_token; + attestation_token.has_value()) { + msg.set_attestation_token(*attestation_token); + } +} + +[[nodiscard]] bool DeserializeCommonAggregatableData( + const proto::AttributionCommonAggregatableMetadata& msg, + AttributionReport::CommonAggregatableData& data) { + if (!msg.has_coordinator()) { + return false; + } + + switch (msg.coordinator()) { + case proto::AttributionCommonAggregatableMetadata::AWS_CLOUD: + data.aggregation_coordinator = AggregationCoordinator::kAwsCloud; + break; + default: + return false; + } + + if (msg.has_attestation_token()) { + data.attestation_token = msg.attestation_token(); + } + + return true; +} + std::string SerializeReportMetadata( const AttributionReport::AggregatableAttributionData& data) { proto::AttributionAggregatableMetadata msg; - switch (data.aggregation_coordinator) { - case AggregationCoordinator::kAwsCloud: - msg.set_coordinator(proto::AttributionAggregatableMetadata::AWS_CLOUD); - break; - } - - if (data.attestation_token) { - msg.set_attestation_token(*data.attestation_token); - } + SerializeCommonAggregatableData(data.common_data, *msg.mutable_common_data()); msg.mutable_contributions()->Reserve(data.contributions.size()); for (const auto& contribution : data.contributions) { @@ -331,28 +363,17 @@ return str; } -bool DeserializeReportMetadata( +[[nodiscard]] bool DeserializeReportMetadata( const std::string& str, int64_t max_value, AttributionReport::AggregatableAttributionData& data) { proto::AttributionAggregatableMetadata msg; - if (!msg.ParseFromString(str) || !msg.has_coordinator() || - msg.contributions().empty()) { + if (!msg.ParseFromString(str) || msg.contributions().empty() || + !msg.has_common_data() || + !DeserializeCommonAggregatableData(msg.common_data(), data.common_data)) { return false; } - switch (msg.coordinator()) { - case proto::AttributionAggregatableMetadata::AWS_CLOUD: - data.aggregation_coordinator = AggregationCoordinator::kAwsCloud; - break; - default: - return false; - } - - if (msg.has_attestation_token()) { - data.attestation_token = msg.attestation_token(); - } - data.contributions.reserve(msg.contributions().size()); for (const auto& contribution_msg : msg.contributions()) { if (!contribution_msg.has_key() || !contribution_msg.has_value() || @@ -369,6 +390,37 @@ return true; } +std::string SerializeReportMetadata( + const AttributionReport::NullAggregatableData& data) { + proto::AttributionNullAggregatableMetadata msg; + + SerializeCommonAggregatableData(data.common_data, *msg.mutable_common_data()); + + msg.set_fake_source_time( + data.fake_source_time.ToDeltaSinceWindowsEpoch().InMicroseconds()); + + std::string str; + bool success = msg.SerializeToString(&str); + DCHECK(success); + return str; +} + +[[nodiscard]] bool DeserializeReportMetadata( + const std::string& str, + AttributionReport::NullAggregatableData& data) { + proto::AttributionNullAggregatableMetadata msg; + if (!msg.ParseFromString(str) || !msg.has_fake_source_time() || + !msg.has_common_data() || + !DeserializeCommonAggregatableData(msg.common_data(), data.common_data)) { + return false; + } + + data.fake_source_time = base::Time::FromDeltaSinceWindowsEpoch( + base::Microseconds(msg.fake_source_time())); + + return true; +} + absl::optional<StoredSource::ActiveState> GetSourceActiveState( bool event_level_active, bool aggregatable_active) { @@ -422,6 +474,10 @@ int col = 0; + if (statement.GetColumnType(col) == sql::ColumnType::kNull) { + return absl::nullopt; + } + StoredSource::Id source_id(statement.ColumnInt64(col++)); uint64_t source_event_id = DeserializeUint64(statement.ColumnInt64(col++)); absl::optional<SuitableOrigin> source_origin = @@ -757,7 +813,7 @@ AttributionInfo(fake_report.trigger_time, /*debug_key=*/absl::nullopt, /*context_origin=*/common_info.source_origin()), - AttributionReport::Id(kUnsetReportId), fake_report.report_time, + AttributionReport::Id(kUnsetRecordId), fake_report.report_time, /*initial_report_time=*/fake_report.report_time, delegate_->NewReportID(), /*failed_send_attempts=*/0, AttributionReport::EventLevelData(fake_report.trigger_data, @@ -1298,7 +1354,7 @@ // TODO(apaseltiner): Consider informing the manager if the trigger // data was out of range for DevTools issue reporting. report = AttributionReport( - attribution_info, AttributionReport::Id(kUnsetReportId), report_time, + attribution_info, AttributionReport::Id(kUnsetRecordId), report_time, /*initial_report_time=*/report_time, delegate_->NewReportID(), /*failed_send_attempts=*/0, AttributionReport::EventLevelData( @@ -1415,7 +1471,7 @@ // ordering of columns used for the input to this function. absl::optional<AttributionReport> AttributionStorageSql::ReadReportFromStatement(sql::Statement& statement) { - DCHECK_EQ(statement.ColumnCount(), kSourceColumnCount + 10); + DCHECK_EQ(statement.ColumnCount(), kSourceColumnCount + 11); absl::optional<StoredSourceData> source_data = ReadSourceFromStatement(statement, db_); @@ -1432,6 +1488,8 @@ ColumnUint64OrNull(statement, col++); auto context_origin = SuitableOrigin::Deserialize(statement.ColumnString(col++)); + auto reporting_origin = + SuitableOrigin::Deserialize(statement.ColumnString(col++)); absl::optional<AttributionReport::Type> report_type = DeserializeReportType(statement.ColumnInt(col++)); @@ -1445,7 +1503,7 @@ // TODO(apaseltiner): Consider verifying that `context_origin` is valid for // the associated source. if (failed_send_attempts < 0 || !external_report_id.is_valid() || - !source_data.has_value() || !context_origin.has_value() || + !context_origin.has_value() || !reporting_origin.has_value() || !report_type.has_value()) { return absl::nullopt; } @@ -1458,6 +1516,9 @@ absl::optional<AttributionReport::Data> data; switch (*report_type) { case AttributionReport::Type::kEventLevel: { + if (!source_data) { + return absl::nullopt; + } uint64_t trigger_data; int64_t priority; if (!DeserializeReportMetadata(metadata, trigger_data, priority)) { @@ -1471,9 +1532,12 @@ break; } case AttributionReport::Type::kAggregatableAttribution: { + if (!source_data) { + return absl::nullopt; + } data = AttributionReport::AggregatableAttributionData( - /*contributions=*/{}, AggregationCoordinator::kDefault, - /*attestation_token=*/absl::nullopt, std::move(source_data->source)); + AttributionReport::CommonAggregatableData(), + /*contributions=*/{}, std::move(source_data->source)); if (!DeserializeReportMetadata( metadata, delegate_->GetAggregatableBudgetPerSource(), absl::get<AttributionReport::AggregatableAttributionData>( @@ -1482,8 +1546,23 @@ } break; } + case AttributionReport::Type::kNullAggregatable: + if (source_data) { + return absl::nullopt; + } + data = AttributionReport::NullAggregatableData( + AttributionReport::CommonAggregatableData(), + /*reporting_origin=*/std::move(*reporting_origin), + /*fake_source_time=*/base::Time()); + if (!DeserializeReportMetadata( + metadata, + absl::get<AttributionReport::NullAggregatableData>(*data))) { + return absl::nullopt; + } + break; } + DCHECK(data.has_value()); return AttributionReport(AttributionInfo(trigger_time, trigger_debug_key, std::move(*context_origin)), AttributionReport::Id(report_id), report_time, @@ -1811,6 +1890,8 @@ case AttributionReport::Type::kAggregatableAttribution: ++num_aggregatable_reports_deleted; break; + case AttributionReport::Type::kNullAggregatable: + break; } } @@ -2451,6 +2532,8 @@ case AttributionReport::Type::kAggregatableAttribution: ++num_aggregatable_reports_deleted; break; + case AttributionReport::Type::kNullAggregatable: + break; } } if (!DeleteReport( @@ -2495,6 +2578,8 @@ case AttributionReport::Type::kAggregatableAttribution: ++num_aggregatable_reports_deleted; break; + case AttributionReport::Type::kNullAggregatable: + break; } } @@ -2632,17 +2717,29 @@ ? trigger.attestation()->aggregatable_report_id() : delegate_->NewReportID(); report = AttributionReport( - attribution_info, AttributionReport::Id(kUnsetReportId), report_time, + attribution_info, AttributionReport::Id(kUnsetRecordId), report_time, /*initial_report_time=*/report_time, std::move(external_report_id), /*failed_send_attempts=*/0, AttributionReport::AggregatableAttributionData( - std::move(contributions), - trigger_registration.aggregation_coordinator, - std::move(attestation_token), source)); + AttributionReport::CommonAggregatableData( + trigger_registration.aggregation_coordinator, + std::move(attestation_token)), + std::move(contributions), source)); return AggregatableResult::kSuccess; } +void AttributionStorageSql::StoreAttributionReportForTesting( + AttributionReport report) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + if (!LazyInit(DbCreationPolicy::kCreateIfAbsent)) { + return; + } + + std::ignore = StoreAttributionReport(report); +} + bool AttributionStorageSql::StoreAttributionReport(AttributionReport& report) { static constexpr char kStoreReportSql[] = "INSERT INTO reports" @@ -2654,9 +2751,15 @@ db_.GetCachedStatement(SQL_FROM_HERE, kStoreReportSql)); const AttributionInfo& attribution_info = report.attribution_info(); - const StoredSource& source = report.GetStoredSource(); - store_report_statement.BindInt64(0, *source.source_id()); + const StoredSource* source = report.GetStoredSource(); + + // Per https://www.sqlite.org/autoinc.html, if no negative ROWID values are + // inserted explicitly, then automatically generated ROWID values will always + // be greater than zero. Therefore it's fine to use -1 as sentinel value for a + // null source. + store_report_statement.BindInt64( + 0, source ? *source->source_id() : kUnsetRecordId); store_report_statement.BindTime(1, attribution_info.time); store_report_statement.BindTime(2, report.report_time()); store_report_statement.BindTime(3, report.initial_report_time()); @@ -2665,8 +2768,7 @@ BindUint64OrNull(store_report_statement, 5, attribution_info.debug_key); store_report_statement.BindString( 6, attribution_info.context_origin.Serialize()); - store_report_statement.BindString( - 7, source.common_info().reporting_origin().Serialize()); + store_report_statement.BindString(7, report.GetReportingOrigin().Serialize()); store_report_statement.BindInt(8, SerializeReportType(report.GetReportType())); @@ -2760,6 +2862,8 @@ keys.emplace_back(std::move(reporting_origin)); } + // TODO(crbug.com/1432558): Get data keys for null aggregatable reports. + rate_limit_table_.AppendRateLimitDataKeys(&db_, keys); return base::flat_set<AttributionDataModel::DataKey>(std::move(keys)) .extract();
diff --git a/content/browser/attribution_reporting/attribution_storage_sql.h b/content/browser/attribution_reporting/attribution_storage_sql.h index 13eaff9..df9d090 100644 --- a/content/browser/attribution_reporting/attribution_storage_sql.h +++ b/content/browser/attribution_reporting/attribution_storage_sql.h
@@ -323,6 +323,8 @@ [[nodiscard]] bool StoreAttributionReport(AttributionReport& report) VALID_CONTEXT_REQUIRED(sequence_checker_); + void StoreAttributionReportForTesting(AttributionReport) override; + // If set, database errors will not crash the client when run in debug mode. bool ignore_errors_for_testing_ = false;
diff --git a/content/browser/attribution_reporting/attribution_storage_sql_unittest.cc b/content/browser/attribution_reporting/attribution_storage_sql_unittest.cc index 33cdf46c..be01bd5 100644 --- a/content/browser/attribution_reporting/attribution_storage_sql_unittest.cc +++ b/content/browser/attribution_reporting/attribution_storage_sql_unittest.cc
@@ -98,6 +98,13 @@ std::vector<Contribution> contributions; }; +struct AttributionNullAggregatableMetadataRecord { + absl::optional<::aggregation_service::mojom::AggregationCoordinator> + coordinator = + ::aggregation_service::mojom::AggregationCoordinator::kAwsCloud; + absl::optional<int64_t> fake_source_time; +}; + std::string CreateSerializedFilterData( const attribution_reporting::FilterValues& filter_values) { proto::AttributionFilterData msg; @@ -138,8 +145,8 @@ proto::AttributionAggregatableMetadata msg; if (record.coordinator) { - msg.set_coordinator( - static_cast<proto::AttributionAggregatableMetadata_Coordinator>( + msg.mutable_common_data()->set_coordinator( + static_cast<proto::AttributionCommonAggregatableMetadata_Coordinator>( *record.coordinator)); } @@ -163,6 +170,26 @@ return str; } +std::string SerializeReportMetadata( + const AttributionNullAggregatableMetadataRecord& record) { + proto::AttributionNullAggregatableMetadata msg; + + if (record.coordinator) { + msg.mutable_common_data()->set_coordinator( + static_cast<proto::AttributionCommonAggregatableMetadata_Coordinator>( + *record.coordinator)); + } + + if (record.fake_source_time) { + msg.set_fake_source_time(*record.fake_source_time); + } + + std::string str; + bool success = msg.SerializeToString(&str); + CHECK(success); + return str; +} + class AttributionStorageSqlTest : public testing::Test { public: AttributionStorageSqlTest() = default; @@ -408,7 +435,8 @@ const auto* data = absl::get_if<AttributionReport::AggregatableAttributionData>( &aggregatable_report.data()); - EXPECT_EQ(data->attestation_token.value(), trigger_attestation->token()); + EXPECT_EQ(data->common_data.attestation_token.value(), + trigger_attestation->token()); CloseDatabase(); } @@ -442,7 +470,7 @@ const auto* data = absl::get_if<AttributionReport::AggregatableAttributionData>( &aggregatable_report.data()); - EXPECT_FALSE(data->attestation_token.has_value()); + EXPECT_FALSE(data->common_data.attestation_token.has_value()); CloseDatabase(); } @@ -478,7 +506,7 @@ const auto* data = absl::get_if<AttributionReport::AggregatableAttributionData>( &aggregatable_report.data()); - EXPECT_FALSE(data->attestation_token.has_value()); + EXPECT_FALSE(data->common_data.attestation_token.has_value()); CloseDatabase(); } @@ -1635,5 +1663,79 @@ } } +TEST_F(AttributionStorageSqlTest, + InvalidNullAggregatableMetadata_FailsDeserialization) { + const struct { + const char* desc; + absl::variant<AttributionNullAggregatableMetadataRecord, std::string> + record; + bool valid; + } kTestCases[] = { + { + .desc = "invalid_proto", + .record = "!", + .valid = false, + }, + { + .desc = "missing_fake_source_time", + .record = AttributionNullAggregatableMetadataRecord(), + .valid = false, + }, + { + .desc = "missing_coordinator", + .record = + AttributionNullAggregatableMetadataRecord{ + .coordinator = absl::nullopt, + .fake_source_time = 12345678900, + }, + .valid = false, + }, + { + .desc = "valid", + .record = + AttributionNullAggregatableMetadataRecord{ + .fake_source_time = 12345678900, + }, + .valid = true, + }, + }; + + for (auto test_case : kTestCases) { + OpenDatabase(); + // Create the tables. + storage()->StoreSource(SourceBuilder().Build()); + auto sources = storage()->GetActiveSources(); + ASSERT_THAT(sources, SizeIs(1)); + CloseDatabase(); + + std::string metadata = absl::visit( + base::Overloaded{ + [](const AttributionNullAggregatableMetadataRecord& record) { + return SerializeReportMetadata(record); + }, + [](const std::string& str) { return str; }, + }, + test_case.record); + + StoreAttributionReport(AttributionReportRecord{ + .report_id = 1, + .source_id = -1, + .external_report_id = DefaultExternalReportID().AsLowercaseString(), + .report_type = + static_cast<int>(AttributionReport::Type::kNullAggregatable), + .metadata = metadata, + }); + + OpenDatabase(); + EXPECT_THAT( + storage()->GetAttributionReports(/*max_report_time=*/base::Time::Max()), + SizeIs(test_case.valid)) + << test_case.desc; + storage()->ClearData(base::Time::Min(), base::Time::Max(), + base::NullCallback()); + CloseDatabase(); + } +} + } // namespace } // namespace content
diff --git a/content/browser/attribution_reporting/attribution_storage_unittest.cc b/content/browser/attribution_reporting/attribution_storage_unittest.cc index 3aea60d..7de212e 100644 --- a/content/browser/attribution_reporting/attribution_storage_unittest.cc +++ b/content/browser/attribution_reporting/attribution_storage_unittest.cc
@@ -3455,4 +3455,13 @@ EXPECT_THAT(storage()->GetAttributionReports(base::Time::Now()), IsEmpty()); } +TEST_F(AttributionStorageTest, StoreNullAggregatableReport) { + AttributionReport report = ReportBuilder(AttributionInfoBuilder().Build(), + SourceBuilder().BuildStored()) + .BuildNullAggregatable(); + storage()->StoreAttributionReportForTesting(report); + EXPECT_THAT(storage()->GetAttributionReports(base::Time::Now()), + ElementsAre(report)); +} + } // namespace content
diff --git a/content/browser/attribution_reporting/attribution_test_utils.cc b/content/browser/attribution_reporting/attribution_test_utils.cc index ae43e53..e9a23e5f 100644 --- a/content/browser/attribution_reporting/attribution_test_utils.cc +++ b/content/browser/attribution_reporting/attribution_test_utils.cc
@@ -476,13 +476,26 @@ } AttributionReport ReportBuilder::BuildAggregatableAttribution() const { - return AttributionReport(attribution_info_, report_id_, report_time_, - /*initial_report_time=*/report_time_, - external_report_id_, - /*failed_send_attempts=*/0, - AttributionReport::AggregatableAttributionData( - contributions_, aggregation_coordinator_, - attestation_token_, source_)); + return AttributionReport( + attribution_info_, report_id_, report_time_, + /*initial_report_time=*/report_time_, external_report_id_, + /*failed_send_attempts=*/0, + AttributionReport::AggregatableAttributionData( + AttributionReport::CommonAggregatableData(aggregation_coordinator_, + attestation_token_), + contributions_, source_)); +} + +AttributionReport ReportBuilder::BuildNullAggregatable() const { + return AttributionReport( + attribution_info_, report_id_, report_time_, + /*initial_report_time=*/report_time_, external_report_id_, + /*failed_send_attempts=*/0, + AttributionReport::NullAggregatableData( + AttributionReport::CommonAggregatableData(aggregation_coordinator_, + attestation_token_), + source_.common_info().reporting_origin(), + source_.common_info().source_time())); } bool operator==(const AttributionTrigger& a, const AttributionTrigger& b) { @@ -569,16 +582,34 @@ // Does not compare the assembled report as it is returned by the // aggregation service from all the other data. +bool operator==(const AttributionReport::CommonAggregatableData& a, + const AttributionReport::CommonAggregatableData& b) { + const auto tie = [](const AttributionReport::CommonAggregatableData& data) { + return std::make_tuple(data.attestation_token, + data.aggregation_coordinator); + }; + return tie(a) == tie(b); +} + bool operator==(const AttributionReport::AggregatableAttributionData& a, const AttributionReport::AggregatableAttributionData& b) { const auto tie = [](const AttributionReport::AggregatableAttributionData& data) { - return std::make_tuple(data.contributions, data.attestation_token, - data.aggregation_coordinator, data.source); + return std::make_tuple(data.common_data, data.contributions, + data.source); }; return tie(a) == tie(b); } +bool operator==(const AttributionReport::NullAggregatableData& a, + const AttributionReport::NullAggregatableData& b) { + const auto tie = [](const AttributionReport::NullAggregatableData& data) { + return std::make_tuple(data.common_data, data.reporting_origin, + data.fake_source_time); + }; + return tie(a) == tie(b); +} + // Does not compare source or report IDs, as they are set by the underlying // sqlite DB and should not be tested. bool operator==(const AttributionReport& a, const AttributionReport& b) { @@ -806,8 +837,24 @@ std::ostream& operator<<( std::ostream& out, + const AttributionReport::CommonAggregatableData& data) { + out << "{aggregation_coordinator=" << data.aggregation_coordinator + << ",attestation_token="; + + if (const auto& attestation_token = data.attestation_token; + attestation_token.has_value()) { + out << *attestation_token; + } else { + out << "(null)"; + } + + return out << "}"; +} + +std::ostream& operator<<( + std::ostream& out, const AttributionReport::AggregatableAttributionData& data) { - out << "{contributions=["; + out << "{common_data=" << data.common_data << ",contributions=["; const char* separator = ""; for (const auto& contribution : data.contributions) { @@ -816,21 +863,20 @@ } out << "]"; - if (data.attestation_token.has_value()) { - out << ",attestation_token=" << data.attestation_token.value(); - } else { - out << ",attestation_token=(null)"; - } - return out << ",aggregation_coordinator=" << data.aggregation_coordinator - << ",source=" << data.source << "}"; + return out << ",source=" << data.source << "}"; +} + +std::ostream& operator<<(std::ostream& out, + const AttributionReport::NullAggregatableData& data) { + return out << "{common_data=" << data.common_data + << ",reporting_origin=" << data.reporting_origin + << ",fake_source_time=" << data.fake_source_time << "}"; } namespace { -std::ostream& operator<<( - std::ostream& out, - const absl::variant<AttributionReport::EventLevelData, - AttributionReport::AggregatableAttributionData>& data) { +std::ostream& operator<<(std::ostream& out, + const AttributionReport::Data& data) { absl::visit([&out](const auto& v) { out << v; }, data); return out; } @@ -846,16 +892,6 @@ << ",data=" << report.data() << "}"; } -std::ostream& operator<<(std::ostream& out, - AttributionReport::Type report_type) { - switch (report_type) { - case AttributionReport::Type::kEventLevel: - return out << "kEventLevel"; - case AttributionReport::Type::kAggregatableAttribution: - return out << "kAggregatableAttribution"; - } -} - std::ostream& operator<<(std::ostream& out, SendResult::Status status) { switch (status) { case SendResult::Status::kSent:
diff --git a/content/browser/attribution_reporting/attribution_test_utils.h b/content/browser/attribution_reporting/attribution_test_utils.h index f8849354..91726cb 100644 --- a/content/browser/attribution_reporting/attribution_test_utils.h +++ b/content/browser/attribution_reporting/attribution_test_utils.h
@@ -285,6 +285,8 @@ AttributionReport BuildAggregatableAttribution() const; + AttributionReport BuildNullAggregatable() const; + private: AttributionInfo attribution_info_; StoredSource source_; @@ -323,9 +325,15 @@ bool operator==(const AttributionReport::EventLevelData& a, const AttributionReport::EventLevelData& b); +bool operator==(const AttributionReport::CommonAggregatableData& a, + const AttributionReport::CommonAggregatableData& b); + bool operator==(const AttributionReport::AggregatableAttributionData& a, const AttributionReport::AggregatableAttributionData& b); +bool operator==(const AttributionReport::NullAggregatableData& a, + const AttributionReport::NullAggregatableData& b); + bool operator==(const AttributionReport& a, const AttributionReport& b); bool operator==(const SendResult& a, const SendResult& b); @@ -359,14 +367,17 @@ std::ostream& operator<<(std::ostream& out, const AttributionReport::EventLevelData& data); +std::ostream& operator<<(std::ostream& out, + const AttributionReport::CommonAggregatableData&); + std::ostream& operator<<( std::ostream& out, const AttributionReport::AggregatableAttributionData& data); -std::ostream& operator<<(std::ostream& out, const AttributionReport& report); - std::ostream& operator<<(std::ostream& out, - AttributionReport::Type report_type); + const AttributionReport::NullAggregatableData&); + +std::ostream& operator<<(std::ostream& out, const AttributionReport& report); std::ostream& operator<<(std::ostream& out, SendResult::Status status); @@ -454,7 +465,7 @@ // Report matchers MATCHER_P(ReportSourceIs, matcher, "") { - return ExplainMatchResult(matcher, arg.GetStoredSource(), result_listener); + return ExplainMatchResult(matcher, *arg.GetStoredSource(), result_listener); } MATCHER_P(ReportTimeIs, matcher, "") { @@ -515,7 +526,7 @@ } MATCHER_P(AggregationCoordinatorIs, matcher, "") { - return ExplainMatchResult(matcher, arg.aggregation_coordinator, + return ExplainMatchResult(matcher, arg.common_data.aggregation_coordinator, result_listener); }
diff --git a/content/browser/attribution_reporting/sql_queries.h b/content/browser/attribution_reporting/sql_queries.h index 5d457b6..dfd9d1c 100644 --- a/content/browser/attribution_reporting/sql_queries.h +++ b/content/browser/attribution_reporting/sql_queries.h
@@ -131,9 +131,9 @@ ATTRIBUTION_SOURCE_COLUMNS_SQL("I.") \ ",R.report_id,R.trigger_time,R.report_time,R.initial_report_time," \ "R.failed_send_attempts,R.external_report_id,R.debug_key,R.context_origin," \ - "R.report_type,R.metadata " \ + "R.reporting_origin,R.report_type,R.metadata " \ "FROM reports R " \ - "JOIN sources I ON R.source_id=I.source_id " + "LEFT JOIN sources I ON R.source_id=I.source_id " inline constexpr const char kGetReportsSql[] = ATTRIBUTION_SELECT_REPORT_AND_SOURCE_COLUMNS_SQL
diff --git a/content/browser/attribution_reporting/test/configurable_storage_delegate.cc b/content/browser/attribution_reporting/test/configurable_storage_delegate.cc index 8a241e5..35d8cdb4 100644 --- a/content/browser/attribution_reporting/test/configurable_storage_delegate.cc +++ b/content/browser/attribution_reporting/test/configurable_storage_delegate.cc
@@ -12,6 +12,7 @@ #include "base/check.h" #include "base/check_op.h" +#include "base/notreached.h" #include "base/ranges/algorithm.h" #include "base/sequence_checker.h" #include "base/time/time.h" @@ -161,6 +162,9 @@ case AttributionReport::Type::kAggregatableAttribution: config_.aggregate_limit.max_reports_per_destination = max; break; + case AttributionReport::Type::kNullAggregatable: + NOTREACHED(); + break; } }
diff --git a/content/browser/back_forward_cache_browsertest.cc b/content/browser/back_forward_cache_browsertest.cc index 03a1b07a..12f81c39 100644 --- a/content/browser/back_forward_cache_browsertest.cc +++ b/content/browser/back_forward_cache_browsertest.cc
@@ -2854,9 +2854,9 @@ })); // 3) Start navigation in subframe to |subframe_url|. - EXPECT_TRUE(ExecJs( + ExecuteScriptAsync( main_frame, - JsReplace("document.querySelector('#child').src = $1;", subframe_url))); + JsReplace("document.querySelector('#child').src = $1;", subframe_url)); // 4) Wait until subframe navigation is pending commit. commit_message_delayer.Wait(); }
diff --git a/content/browser/cache_storage/background_fetch_cache_entry_handler_impl.cc b/content/browser/cache_storage/background_fetch_cache_entry_handler_impl.cc index 5c5a417..83cd9a6 100644 --- a/content/browser/cache_storage/background_fetch_cache_entry_handler_impl.cc +++ b/content/browser/cache_storage/background_fetch_cache_entry_handler_impl.cc
@@ -4,7 +4,6 @@ #include "content/browser/cache_storage/background_fetch_cache_entry_handler_impl.h" -#include "base/guid.h" #include "mojo/public/cpp/bindings/remote.h" #include "third_party/blink/public/common/blob/blob_utils.h"
diff --git a/content/browser/cache_storage/cache_storage.cc b/content/browser/cache_storage/cache_storage.cc index 6116795..077b498 100644 --- a/content/browser/cache_storage/cache_storage.cc +++ b/content/browser/cache_storage/cache_storage.cc
@@ -18,7 +18,6 @@ #include "base/files/memory_mapped_file.h" #include "base/functional/bind.h" #include "base/functional/callback_helpers.h" -#include "base/guid.h" #include "base/hash/sha1.h" #include "base/location.h" #include "base/memory/ptr_util.h" @@ -33,6 +32,7 @@ #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "base/trace_event/traced_value.h" +#include "base/uuid.h" #include "build/build_config.h" #include "components/services/storage/public/cpp/buckets/bucket_locator.h" #include "content/browser/cache_storage/cache_storage.pb.h" @@ -287,7 +287,7 @@ std::string cache_dir; base::FilePath cache_path; do { - cache_dir = base::GenerateGUID(); + cache_dir = base::Uuid::GenerateRandomV4().AsLowercaseString(); cache_path = directory_path.AppendASCII(cache_dir); } while (base::PathExists(cache_path)); @@ -541,7 +541,7 @@ std::string cache_dir; base::FilePath cache_path; do { - cache_dir = base::GenerateGUID(); + cache_dir = base::Uuid::GenerateRandomV4().AsLowercaseString(); cache_path = directory_path.AppendASCII(cache_dir); } while (base::PathExists(cache_path));
diff --git a/content/browser/cache_storage/cache_storage_cache.cc b/content/browser/cache_storage/cache_storage_cache.cc index cd1daca..a757fe2 100644 --- a/content/browser/cache_storage/cache_storage_cache.cc +++ b/content/browser/cache_storage/cache_storage_cache.cc
@@ -18,7 +18,6 @@ #include "base/files/file_path.h" #include "base/functional/bind.h" #include "base/functional/callback_helpers.h" -#include "base/guid.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h"
diff --git a/content/browser/cache_storage/cache_storage_cache_entry_handler.cc b/content/browser/cache_storage/cache_storage_cache_entry_handler.cc index b4c4352..7f95384 100644 --- a/content/browser/cache_storage/cache_storage_cache_entry_handler.cc +++ b/content/browser/cache_storage/cache_storage_cache_entry_handler.cc
@@ -5,7 +5,7 @@ #include "content/browser/cache_storage/cache_storage_cache_entry_handler.h" #include "base/functional/callback_helpers.h" -#include "base/guid.h" +#include "base/uuid.h" #include "components/services/storage/public/mojom/blob_storage_context.mojom.h" #include "content/browser/cache_storage/background_fetch_cache_entry_handler_impl.h" #include "content/browser/cache_storage/cache_storage.h" @@ -381,7 +381,7 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); auto blob = blink::mojom::SerializedBlob::New(); blob->size = blob_entry->GetSize(disk_cache_index); - blob->uuid = base::GenerateGUID(); + blob->uuid = base::Uuid::GenerateRandomV4().AsLowercaseString(); auto element = storage::mojom::BlobDataItem::New(); element->size = blob_entry->GetSize(disk_cache_index);
diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc index 95fa19e..b141d0f 100644 --- a/content/browser/cache_storage/cache_storage_manager_unittest.cc +++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
@@ -16,7 +16,6 @@ #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/functional/bind.h" -#include "base/guid.h" #include "base/memory/ptr_util.h" #include "base/memory/scoped_refptr.h" #include "base/path_service.h" @@ -28,6 +27,7 @@ #include "base/test/scoped_feature_list.h" #include "base/test/test_future.h" #include "base/time/time.h" +#include "base/uuid.h" #include "build/build_config.h" #include "components/services/storage/public/cpp/buckets/bucket_info.h" #include "components/services/storage/public/cpp/buckets/bucket_locator.h" @@ -626,7 +626,7 @@ int status_code, FetchResponseType response_type = FetchResponseType::kDefault, ResponseHeaderMap response_headers = ResponseHeaderMap()) { - std::string blob_uuid = base::GenerateGUID(); + std::string blob_uuid = base::Uuid::GenerateRandomV4().AsLowercaseString(); auto blob = blink::mojom::SerializedBlob::New(); blob->uuid = blob_uuid;
diff --git a/content/browser/metrics/histograms_internals_ui.cc b/content/browser/metrics/histograms_internals_ui.cc index ecae327..3306604 100644 --- a/content/browser/metrics/histograms_internals_ui.cc +++ b/content/browser/metrics/histograms_internals_ui.cc
@@ -16,7 +16,8 @@ #include "base/values.h" #include "content/browser/metrics/histogram_synchronizer.h" #include "content/browser/metrics/histograms_monitor.h" -#include "content/grit/content_resources.h" +#include "content/grit/histograms_resources.h" +#include "content/grit/histograms_resources_map.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" @@ -28,8 +29,6 @@ namespace content { namespace { -const char kHistogramsUIJs[] = "histograms_internals.js"; -const char kHistogramsUICss[] = "histograms_internals.css"; const char kHistogramsUIRequestHistograms[] = "requestHistograms"; const char kHistogramsUIStartMonitoring[] = "startMonitoring"; const char kHistogramsUIFetchDiff[] = "fetchDiff"; @@ -45,9 +44,9 @@ WebUIDataSource* source = WebUIDataSource::CreateAndAdd(browser_context, kChromeUIHistogramHost); - source->AddResourcePath(kHistogramsUIJs, IDR_HISTOGRAMS_INTERNALS_JS); - source->AddResourcePath(kHistogramsUICss, IDR_HISTOGRAMS_INTERNALS_CSS); - source->SetDefaultResource(IDR_HISTOGRAMS_INTERNALS_HTML); + source->AddResourcePaths( + base::make_span(kHistogramsResources, kHistogramsResourcesSize)); + source->SetDefaultResource(IDR_HISTOGRAMS_HISTOGRAMS_INTERNALS_HTML); } // This class receives javascript messages from the renderer.
diff --git a/content/browser/network/trust_token_browsertest.cc b/content/browser/network/trust_token_browsertest.cc index ef21769..755fcdd 100644 --- a/content/browser/network/trust_token_browsertest.cc +++ b/content/browser/network/trust_token_browsertest.cc
@@ -334,7 +334,7 @@ fail_to_execute_op_via_iframe("/issue", R"({"type": "token-request"})"); std::string command = JsReplace(R"( (async () => { - return await document.hasPrivateToken($1, 'private-state-token'); + return await document.hasPrivateToken($1); })();)", IssuanceOriginFromHost("a.test")); @@ -351,7 +351,7 @@ fail_to_execute_op_via_iframe("/bad", R"({"type": "bad-type"})"); command = JsReplace(R"( (async () => { - return await document.hasPrivateToken($1, 'private-state-token') + return await document.hasPrivateToken($1) || document.hasRedemptionRecord($1); })();)", IssuanceOriginFromHost("a.test")); @@ -371,7 +371,7 @@ (async () => { await fetch("/issue", {privateToken: {version: 1, operation: 'token-request'}}); - return await document.hasPrivateToken($1, 'private-state-token'); + return await document.hasPrivateToken($1); })();)", IssuanceOriginFromHost("a.test")); @@ -814,11 +814,9 @@ // context's list of associated issuers. for (int i = 0; i < network::kTrustTokenPerToplevelMaxNumberOfAssociatedIssuers; ++i) { - ASSERT_EQ( - "Success", - EvalJs(shell(), - "document.hasPrivateToken('https://a" + base::NumberToString(i) + - ".test', 'private-state-token').then(()=>'Success');")); + ASSERT_EQ("Success", EvalJs(shell(), "document.hasPrivateToken('https://a" + + base::NumberToString(i) + + ".test').then(()=>'Success');")); } EXPECT_EQ("OperationError", EvalJs(shell(), R"( @@ -857,16 +855,11 @@ JsReplace(command, server_.GetURL("a.test", "/cross-site/b.test/issue")))); - EXPECT_EQ( - true, - EvalJs(shell(), - JsReplace("document.hasPrivateToken($1, 'private-state-token');", - IssuanceOriginFromHost("b.test")))); - EXPECT_EQ( - false, - EvalJs(shell(), - JsReplace("document.hasPrivateToken($1, 'private-state-token');", - IssuanceOriginFromHost("a.test")))); + EXPECT_EQ(true, EvalJs(shell(), JsReplace("document.hasPrivateToken($1);", + IssuanceOriginFromHost("b.test")))); + EXPECT_EQ(false, + EvalJs(shell(), JsReplace("document.hasPrivateToken($1);", + IssuanceOriginFromHost("a.test")))); // Expect two accesses for issues. EXPECT_EQ(2, access_count_); @@ -900,16 +893,11 @@ JsReplace(command, server_.GetURL("a.test", "/cross-site/b.test/issue")))); - EXPECT_EQ( - true, - EvalJs(shell(), - JsReplace("document.hasPrivateToken($1, 'private-state-token');", - IssuanceOriginFromHost("a.test")))); - EXPECT_EQ( - false, - EvalJs(shell(), - JsReplace("document.hasPrivateToken($1, 'private-state-token');", - IssuanceOriginFromHost("b.test")))); + EXPECT_EQ(true, EvalJs(shell(), JsReplace("document.hasPrivateToken($1);", + IssuanceOriginFromHost("a.test")))); + EXPECT_EQ(false, + EvalJs(shell(), JsReplace("document.hasPrivateToken($1);", + IssuanceOriginFromHost("b.test")))); // Expect one access for issue. EXPECT_EQ(1, access_count_); @@ -940,7 +928,7 @@ EXPECT_EQ( false, EvalJs(shell(), - JsReplace("document.hasPrivateToken($1, 'private-state-token');", + JsReplace("document.hasPrivateToken($1);", url::Origin::Create(server_.base_url()).Serialize()))); // Expect one access for issue. @@ -989,11 +977,9 @@ ASSERT_TRUE(file_url.SchemeIsFile()); ASSERT_TRUE(NavigateToURL(shell(), file_url)); - EXPECT_EQ( - "NotAllowedError", - EvalJs( - shell(), - R"(document.hasPrivateToken('https://issuer.example', 'private-state-token') + EXPECT_EQ("NotAllowedError", + EvalJs(shell(), + R"(document.hasPrivateToken('https://issuer.example') .catch(error => error.name);)")); EXPECT_EQ(0, access_count_); @@ -1011,11 +997,9 @@ ->GetPrimaryFrameTree() .root(); - EXPECT_EQ( - "Success", - EvalJs( - root->child_at(0)->current_frame_host(), - R"(document.hasPrivateToken('https://davids.website', 'private-state-token') + EXPECT_EQ("Success", + EvalJs(root->child_at(0)->current_frame_host(), + R"(document.hasPrivateToken('https://davids.website') .then(()=>'Success');)")); EXPECT_EQ(0, access_count_);
diff --git a/content/browser/preloading/prefetch/prefetch_canary_checker.cc b/content/browser/preloading/prefetch/prefetch_canary_checker.cc index a076405..6fc90b2 100644 --- a/content/browser/preloading/prefetch/prefetch_canary_checker.cc +++ b/content/browser/preloading/prefetch/prefetch_canary_checker.cc
@@ -11,7 +11,6 @@ #include "base/base64.h" #include "base/functional/bind.h" #include "base/functional/callback_helpers.h" -#include "base/guid.h" #include "base/metrics/histogram.h" #include "base/metrics/histogram_functions.h" #include "base/strings/string_number_conversions.h"
diff --git a/content/browser/resources/BUILD.gn b/content/browser/resources/BUILD.gn index 71f06675..009b87e5 100644 --- a/content/browser/resources/BUILD.gn +++ b/content/browser/resources/BUILD.gn
@@ -6,6 +6,7 @@ public_deps = [ "aggregation_service:resources", "attribution_reporting:resources", + "histograms:resources", "indexed_db:resources", "quota:resources", ]
diff --git a/content/browser/resources/histograms/BUILD.gn b/content/browser/resources/histograms/BUILD.gn index f5fb327..d214a67 100644 --- a/content/browser/resources/histograms/BUILD.gn +++ b/content/browser/resources/histograms/BUILD.gn
@@ -2,7 +2,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//tools/grit/grit_rule.gni") import("//tools/typescript/ts_library.gni") +import("//ui/webui/resources/tools/generate_grd.gni") + +generated_grd = "$target_gen_dir/resources.grd" ts_library("build_ts") { root_dir = "." @@ -10,3 +14,30 @@ in_files = [ "histograms_internals.ts" ] deps = [ "//ui/webui/resources/js:build_ts" ] } + +generate_grd("build_grd") { + out_grd = generated_grd + grd_prefix = "histograms" + input_files = [ + "histograms_internals.css", + "histograms_internals.html", + ] + input_files_base_dir = rebase_path(".", "//") + deps = [ ":build_ts" ] + manifest_files = + filter_include(get_target_outputs(":build_ts"), [ "*.manifest" ]) +} + +grit("resources") { + source = generated_grd + enable_input_discovery_for_gn_analyze = false + deps = [ ":build_grd" ] + + outputs = [ + "grit/histograms_resources.h", + "grit/histograms_resources_map.cc", + "grit/histograms_resources_map.h", + "histograms_resources.pak", + ] + output_dir = "$root_gen_dir/content" +}
diff --git a/content/browser/shared_storage/OWNERS b/content/browser/shared_storage/OWNERS index 166a4407..6826614 100644 --- a/content/browser/shared_storage/OWNERS +++ b/content/browser/shared_storage/OWNERS
@@ -1 +1 @@ -file://content/services/shared_storage_worklet/OWNERS +file://third_party/blink/renderer/modules/shared_storage/OWNERS
diff --git a/content/browser/webauth/webauth_browsertest.cc b/content/browser/webauth/webauth_browsertest.cc index 37f6b978..5b2bee5e 100644 --- a/content/browser/webauth/webauth_browsertest.cc +++ b/content/browser/webauth/webauth_browsertest.cc
@@ -1428,9 +1428,8 @@ EXPECT_TRUE(NavigateToURL( shell(), GetHttpsURL("www.acme.com", "/page_with_iframe.html"))); - // The plain ExecuteScriptAndExtractString cannot be used because - // NavigateIframeToURL uses it internally and they get confused about which - // message is for whom. + // The plain EvalJs cannot be used because NavigateIframeToURL uses it + // internally and they get confused about which message is for whom. absl::optional<std::string> result = ExecuteScriptAndExtractPrefixedString( shell()->web_contents(), SendViaDomAutomationController( @@ -1489,9 +1488,8 @@ CreateParameters parameters; parameters.attestation = "direct"; - // The plain ExecuteScriptAndExtractString cannot be used because - // NavigateIframeToURL uses it internally and they get confused about which - // message is for whom. + // The plain EvalJs cannot be used because NavigateIframeToURL uses it + // internally and they get confused about which message is for whom. absl::optional<std::string> result = ExecuteScriptAndExtractPrefixedString( shell()->web_contents(), SendViaDomAutomationController(
diff --git a/content/browser/webrtc/webrtc_internals_browsertest.cc b/content/browser/webrtc/webrtc_internals_browsertest.cc index 4646ac86..d2d8bbc 100644 --- a/content/browser/webrtc/webrtc_internals_browsertest.cc +++ b/content/browser/webrtc/webrtc_internals_browsertest.cc
@@ -239,12 +239,8 @@ // Verifies the JS Array of userMediaRequests matches |requests|. void VerifyMediaRequest(const std::vector<UserMediaRequestEntry>& requests) { - string json_requests; - ASSERT_TRUE( - ExecuteScriptAndExtractString(shell(), - "window.domAutomationController.send(" - " JSON.stringify(userMediaRequests));", - &json_requests)); + string json_requests = + EvalJs(shell(), "JSON.stringify(userMediaRequests);").ExtractString(); base::Value::List list_request = base::test::ParseJsonList(json_requests); EXPECT_EQ(requests.size(), list_request.size()); @@ -306,9 +302,9 @@ << (i + 1) << "];" "var cell = row.lastChild;" - "window.domAutomationController.send(cell.firstChild.textContent);"; - ASSERT_TRUE(ExecuteScriptAndExtractString(shell(), ss.str(), &result)); - EXPECT_EQ(pc.events_[i].type + pc.events_[i].value, result); + "cell.firstChild.textContent;"; + EXPECT_EQ(pc.events_[i].type + pc.events_[i].value, + EvalJs(shell(), ss.str())); } } @@ -371,16 +367,13 @@ const string& value) { VerifyElementWithId(table_id + "-" + name); - string result; - ASSERT_TRUE(ExecuteScriptAndExtractString( - shell(), - "var row = document.getElementById('" + table_id + "-" + name + - "');" - "var name = row.cells[0].textContent;" - "var value = row.cells[1].textContent;" - "window.domAutomationController.send(name + ':' + value)", - &result)); - EXPECT_EQ(name + ":" + value, result); + EXPECT_EQ(name + ":" + value, + EvalJs(shell(), "var row = document.getElementById('" + table_id + + "-" + name + + "');" + "var name = row.cells[0].textContent;" + "var value = row.cells[1].textContent;" + "name + ':' + value")); } // Verifies that the graph data series consistent with pc.stats_. @@ -418,24 +411,22 @@ EXPECT_TRUE(result); std::stringstream ss; - ss << "var dp = peerConnectionDataStore['" << pc_id << "']" - ".getDataSeries('" << graph_id << "').dataPoints_[" << index << "];" - "window.domAutomationController.send(dp.value.toString())"; - string actual_value; - ASSERT_TRUE( - ExecuteScriptAndExtractString(shell(), ss.str(), &actual_value)); - EXPECT_EQ(value, actual_value); + ss << "var dp = peerConnectionDataStore['" << pc_id + << "']" + ".getDataSeries('" + << graph_id << "').dataPoints_[" << index + << "];" + "dp.value.toString()"; + EXPECT_EQ(value, EvalJs(shell(), ss.str())); } // Get the JSON string of the ssrc info from the page. string GetSsrcInfo(const string& ssrc_id) { - string result; - EXPECT_TRUE(ExecuteScriptAndExtractString( - shell(), - "window.domAutomationController.send(JSON.stringify(" - "ssrcInfoManager.streamInfoContainer_['" + ssrc_id + "']))", - &result)); - return result; + return EvalJs(shell(), + "JSON.stringify(" + "ssrcInfoManager.streamInfoContainer_['" + + ssrc_id + "'])") + .ExtractString(); } int GetSsrcInfoBlockCount(Shell* shell) { @@ -763,12 +754,8 @@ ");")); // Verifies the peer connection data store can be created without stats. - string dump_json; - ASSERT_TRUE(ExecuteScriptAndExtractString( - shell(), - "window.domAutomationController.send(" - " JSON.stringify(peerConnectionDataStore));", - &dump_json)); + string dump_json = EvalJs(shell(), "JSON.stringify(peerConnectionDataStore);") + .ExtractString(); VerifyPageDumpStructure(base::test::ParseJsonDict(dump_json), 2 /*peer_connection_number*/, 2 /*update_number*/, 0 /*stats_number*/); @@ -781,11 +768,8 @@ stats.values["framerate"] = "30"; ExecuteAndVerifyAddStats(pc_0, type, id, stats); - ASSERT_TRUE(ExecuteScriptAndExtractString( - shell(), - "window.domAutomationController.send(" - " JSON.stringify(peerConnectionDataStore));", - &dump_json)); + dump_json = EvalJs(shell(), "JSON.stringify(peerConnectionDataStore);") + .ExtractString(); VerifyStatsDump(base::test::ParseJsonDict(dump_json), pc_0, type, id, stats); }
diff --git a/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc b/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc index 66eabe2..ef7c240 100644 --- a/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc +++ b/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc
@@ -211,7 +211,7 @@ gpu::SHARED_IMAGE_USAGE_OOP_RASTERIZATION | gpu::SHARED_IMAGE_USAGE_GLES2 | gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT, - gpu::kNullSurfaceHandle); + "TestLabel", gpu::kNullSurfaceHandle); gpu::SyncToken sii_token = sii->GenVerifiedSyncToken(); gl->WaitSyncTokenCHROMIUM(sii_token.GetConstData());
diff --git a/content/content_resources.grd b/content/content_resources.grd index 7e2ee4d..16999d8 100644 --- a/content/content_resources.grd +++ b/content/content_resources.grd
@@ -24,9 +24,6 @@ <include name="IDR_DEVTOOLS_PINCH_CURSOR_ICON_2X" file="browser/resources/devtools/devtools_pinch_cursor_2x.png" type="BINDATA" /> <include name="IDR_DEVTOOLS_TOUCH_CURSOR_ICON" file="browser/resources/devtools/devtools_touch_cursor.png" type="BINDATA" /> <include name="IDR_DEVTOOLS_TOUCH_CURSOR_ICON_2X" file="browser/resources/devtools/devtools_touch_cursor_2x.png" type="BINDATA" /> - <include name="IDR_HISTOGRAMS_INTERNALS_HTML" file="browser/resources/histograms/histograms_internals.html" type="BINDATA" /> - <include name="IDR_HISTOGRAMS_INTERNALS_JS" file="${root_gen_dir}/content/browser/resources/histograms/tsc/histograms_internals.js" resource_path="histograms_internals.js" use_base_dir="false" type="BINDATA" /> - <include name="IDR_HISTOGRAMS_INTERNALS_CSS" file="browser/resources/histograms/histograms_internals.css" type="BINDATA" /> <include name="IDR_UKM_INTERNALS_HTML" file="../components/ukm/debug/ukm_internals.html" type="BINDATA" /> <include name="IDR_UKM_INTERNALS_JS" file="${root_gen_dir}/components/ukm/debug/tsc/ukm_internals.js" use_base_dir="false" resource_path="ukm_internals.js" type="BINDATA" /> <include name="IDR_UKM_INTERNALS_CSS" file="../components/ukm/debug/ukm_internals.css" type="BINDATA" />
diff --git a/content/public/test/commit_message_delayer.cc b/content/public/test/commit_message_delayer.cc index 863c3451..1fdc8d6 100644 --- a/content/public/test/commit_message_delayer.cc +++ b/content/public/test/commit_message_delayer.cc
@@ -29,6 +29,8 @@ Impl& operator=(const Impl&) = delete; void Wait() { + CHECK(deferred_action_) + << "The deferred action was already run before calling Wait()."; run_loop_ = std::make_unique<base::RunLoop>(); run_loop_->Run(); run_loop_.reset();
diff --git a/content/renderer/media/win/dcomp_texture_wrapper_impl.cc b/content/renderer/media/win/dcomp_texture_wrapper_impl.cc index b28ff405..2914dd3 100644 --- a/content/renderer/media/win/dcomp_texture_wrapper_impl.cc +++ b/content/renderer/media/win/dcomp_texture_wrapper_impl.cc
@@ -219,7 +219,7 @@ gpu::MailboxHolder holder[media::VideoFrame::kMaxPlanes]; gpu::Mailbox mailbox = sii->CreateSharedImage( gmb.get(), nullptr, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, usage); + kPremul_SkAlphaType, usage, "DCOMPTextureWrapperImpl"); gpu::SyncToken sync_token = sii->GenVerifiedSyncToken(); holder[0] = gpu::MailboxHolder(mailbox, sync_token, GL_TEXTURE_2D);
diff --git a/content/renderer/media/win/dcomp_texture_wrapper_unittest.cc b/content/renderer/media/win/dcomp_texture_wrapper_unittest.cc index dc5e6f5..e36e74ea 100644 --- a/content/renderer/media/win/dcomp_texture_wrapper_unittest.cc +++ b/content/renderer/media/win/dcomp_texture_wrapper_unittest.cc
@@ -36,7 +36,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) override { + uint32_t usage, + base::StringPiece debug_label) override { return gpu::Mailbox(); } };
diff --git a/content/renderer/pepper/pepper_graphics_2d_host.cc b/content/renderer/pepper/pepper_graphics_2d_host.cc index 8db738c..4f835c9fc 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.cc +++ b/content/renderer/pepper/pepper_graphics_2d_host.cc
@@ -690,7 +690,8 @@ usage |= gpu::SHARED_IMAGE_USAGE_SCANOUT; gpu_mailbox = sii->CreateSharedImage( format, size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, usage, gpu::kNullSurfaceHandle); + kPremul_SkAlphaType, usage, "PepperGraphics2DHost", + gpu::kNullSurfaceHandle); in_sync_token = sii->GenUnverifiedSyncToken(); }
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc index 60874cb..e5e47f2 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.cc +++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc
@@ -107,7 +107,7 @@ : viz::SinglePlaneFormat::kRGBX_8888, shared_image_size, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kUnpremul_SkAlphaType, usage, - gpu::SurfaceHandle()); + "PPBGraphics3DImpl", gpu::SurfaceHandle()); sync_token_ = sii_->GenVerifiedSyncToken(); }
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn index b76e4927..5c0f75b 100644 --- a/content/shell/BUILD.gn +++ b/content/shell/BUILD.gn
@@ -478,6 +478,7 @@ "$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak", "$root_gen_dir/content/content_resources.pak", "$root_gen_dir/content/dev_ui_content_resources.pak", + "$root_gen_dir/content/histograms_resources.pak", "$root_gen_dir/content/quota_internals_resources.pak", "$root_gen_dir/content/shell/shell_resources.pak", "$root_gen_dir/content/test/web_ui_mojo_test_resources.pak",
diff --git a/content/web_test/renderer/test_plugin.cc b/content/web_test/renderer/test_plugin.cc index 26bb2d0..dd427e72 100644 --- a/content/web_test/renderer/test_plugin.cc +++ b/content/web_test/renderer/test_plugin.cc
@@ -255,7 +255,7 @@ viz::SinglePlaneFormat::kRGBA_8888, rect_.size(), gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2 | gpu::SHARED_IMAGE_USAGE_DISPLAY_READ, - gpu::kNullSurfaceHandle); + "TestLabel", gpu::kNullSurfaceHandle); gl_->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData()); GLuint color_texture =
diff --git a/device/vr/openxr/openxr_api_wrapper.cc b/device/vr/openxr/openxr_api_wrapper.cc index af17529..45af0fd 100644 --- a/device/vr/openxr/openxr_api_wrapper.cc +++ b/device/vr/openxr/openxr_api_wrapper.cc
@@ -756,7 +756,8 @@ gpu_memory_buffer.get(), nullptr, gfx::ColorSpace(gfx::ColorSpace::PrimaryID::BT709, gfx::ColorSpace::TransferID::LINEAR), - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, shared_image_usage); + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, shared_image_usage, + "OpenXrSwapChain"); mailbox_holder.sync_token = shared_image_interface->GenVerifiedSyncToken(); mailbox_holder.texture_target = GL_TEXTURE_2D; }
diff --git a/docs/mojo_ipc_conversion.md b/docs/mojo_ipc_conversion.md index a58d4e9..9b10a4f 100644 --- a/docs/mojo_ipc_conversion.md +++ b/docs/mojo_ipc_conversion.md
@@ -85,9 +85,10 @@ this message arriving *before* some other tangentially related message sent to the same frame shortly after the same navigation event. -Mojo does not (and in fact cannot) make any strict ordering guarantees between -separate message pipes, as message pipes may be freely moved across process -boundaries and thus cannot necessarily share a common FIFO at all times. +While Mojo guarantees strict ordering within each message pipe, Mojo does not +(and in fact cannot) make any strict ordering guarantees between separate +message pipes, as message pipes may be freely moved across process boundaries +and thus cannot necessarily share a common FIFO at all times. If the two messages described above were moved to separate Mojo interfaces on separate message pipes, renderer behavior could break as the first message may
diff --git a/extensions/renderer/api/automation/automation_internal_custom_bindings.cc b/extensions/renderer/api/automation/automation_internal_custom_bindings.cc index 2921628..42c6ffe 100644 --- a/extensions/renderer/api/automation/automation_internal_custom_bindings.cc +++ b/extensions/renderer/api/automation/automation_internal_custom_bindings.cc
@@ -159,8 +159,7 @@ CHECK(extension); const AutomationInfo* automation_info = AutomationInfo::Get(extension); CHECK(automation_info); - args.GetReturnValue().Set( - v8::Boolean::New(GetIsolate(), automation_info->interact)); + args.GetReturnValue().Set(automation_info->interact); } void AutomationInternalCustomBindings::StartCachingAccessibilityTrees() {
diff --git a/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc b/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc index 74b9c83..0c4e18e 100644 --- a/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc +++ b/extensions/renderer/guest_view/guest_view_internal_custom_bindings.cc
@@ -215,7 +215,7 @@ args.GetIsolate()); guest_view_container->IssueRequest(std::move(request)); - args.GetReturnValue().Set(v8::Boolean::New(context()->isolate(), true)); + args.GetReturnValue().Set(true); } void GuestViewInternalCustomBindings::DestroyContainer( @@ -282,7 +282,7 @@ guest_view_container->RegisterDestructionCallback(args[1].As<v8::Function>(), args.GetIsolate()); - args.GetReturnValue().Set(v8::Boolean::New(context()->isolate(), true)); + args.GetReturnValue().Set(true); } void GuestViewInternalCustomBindings::RegisterView(
diff --git a/extensions/renderer/user_gestures_native_handler.cc b/extensions/renderer/user_gestures_native_handler.cc index 9cd7f22..83aa143 100644 --- a/extensions/renderer/user_gestures_native_handler.cc +++ b/extensions/renderer/user_gestures_native_handler.cc
@@ -32,10 +32,9 @@ void UserGesturesNativeHandler::IsProcessingUserGesture( const v8::FunctionCallbackInfo<v8::Value>& args) { - args.GetReturnValue().Set(v8::Boolean::New( - args.GetIsolate(), + args.GetReturnValue().Set( ExtensionInteractionProvider::HasActiveExtensionInteraction( - context()->v8_context()))); + context()->v8_context())); } void UserGesturesNativeHandler::RunWithUserActivationForTest(
diff --git a/extensions/renderer/utils_native_handler.cc b/extensions/renderer/utils_native_handler.cc index ea4fc85..42b706de 100644 --- a/extensions/renderer/utils_native_handler.cc +++ b/extensions/renderer/utils_native_handler.cc
@@ -38,8 +38,7 @@ const v8::FunctionCallbackInfo<v8::Value>& args) { CHECK_EQ(0, args.Length()); const bool is_in_service_worker = context()->IsForServiceWorker(); - args.GetReturnValue().Set( - v8::Boolean::New(args.GetIsolate(), is_in_service_worker)); + args.GetReturnValue().Set(is_in_service_worker); } } // namespace extensions
diff --git a/gpu/command_buffer/client/shared_image_interface.cc b/gpu/command_buffer/client/shared_image_interface.cc index db32f29..9025640e 100644 --- a/gpu/command_buffer/client/shared_image_interface.cc +++ b/gpu/command_buffer/client/shared_image_interface.cc
@@ -21,10 +21,11 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) { + uint32_t usage, + base::StringPiece debug_label) { return CreateSharedImage(gpu_memory_buffer, gpu_memory_buffer_manager, gfx::BufferPlane::DEFAULT, color_space, - surface_origin, alpha_type, usage); + surface_origin, alpha_type, usage, debug_label); } void SharedImageInterface::CopyToGpuMemoryBuffer(const SyncToken& sync_token,
diff --git a/gpu/command_buffer/client/shared_image_interface.h b/gpu/command_buffer/client/shared_image_interface.h index b3aec09d..34eca52e 100644 --- a/gpu/command_buffer/client/shared_image_interface.h +++ b/gpu/command_buffer/client/shared_image_interface.h
@@ -58,12 +58,15 @@ // The |SharedImageInterface| keeps ownership of the image until // |DestroySharedImage| is called or the interface itself is destroyed (e.g. // the GPU channel is lost). + // |debug_label| is retained for heap dumps and passed to graphics APIs for + // tracing tools. Pick a name that is unique to the allocation site. virtual Mailbox CreateSharedImage(viz::SharedImageFormat format, const gfx::Size& size, const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) = 0; // Same behavior as the above, except that this version takes |pixel_data| @@ -76,6 +79,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) = 0; // Creates a shared image out an existing buffer. The buffer described by @@ -96,6 +100,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) = 0; // Creates a shared image out of a GpuMemoryBuffer, using |color_space|. @@ -122,7 +127,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) = 0; + uint32_t usage, + base::StringPiece debug_label) = 0; // Same as the above, but specifies gfx::BufferPlane::DEFAULT for |plane|. Mailbox CreateSharedImage(gfx::GpuMemoryBuffer* gpu_memory_buffer, @@ -130,7 +136,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage); + uint32_t usage, + base::StringPiece debug_label); // Updates a shared image after its GpuMemoryBuffer (if any) was modified on // the CPU or through external devices, after |sync_token| has been released.
diff --git a/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing.cc b/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing.cc index c0d02ee..5b56e3d 100644 --- a/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing.cc +++ b/gpu/command_buffer/service/shared_image/angle_vulkan_image_backing.cc
@@ -62,13 +62,13 @@ } // namespace class AngleVulkanImageBacking::SkiaAngleVulkanImageRepresentation - : public SkiaImageRepresentation { + : public SkiaGaneshImageRepresentation { public: SkiaAngleVulkanImageRepresentation(GrDirectContext* gr_context, SharedImageManager* manager, AngleVulkanImageBacking* backing, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(gr_context, manager, backing, tracker), + : SkiaGaneshImageRepresentation(gr_context, manager, backing, tracker), context_state_(backing_impl()->context_state_) {} ~SkiaAngleVulkanImageRepresentation() override = default;
diff --git a/gpu/command_buffer/service/shared_image/compound_image_backing.cc b/gpu/command_buffer/service/shared_image/compound_image_backing.cc index 7a27e64..fa38b67 100644 --- a/gpu/command_buffer/service/shared_image/compound_image_backing.cc +++ b/gpu/command_buffer/service/shared_image/compound_image_backing.cc
@@ -156,7 +156,8 @@ std::unique_ptr<GLTexturePassthroughImageRepresentation> wrapped_; }; -class WrappedSkiaCompoundImageRepresentation : public SkiaImageRepresentation { +class WrappedSkiaCompoundImageRepresentation + : public SkiaGaneshImageRepresentation { public: WrappedSkiaCompoundImageRepresentation( GrDirectContext* gr_context, @@ -164,7 +165,7 @@ SharedImageBacking* backing, MemoryTypeTracker* tracker, std::unique_ptr<SkiaImageRepresentation> wrapped) - : SkiaImageRepresentation(gr_context, manager, backing, tracker), + : SkiaGaneshImageRepresentation(gr_context, manager, backing, tracker), wrapped_(std::move(wrapped)) { DCHECK(wrapped_); }
diff --git a/gpu/command_buffer/service/shared_image/d3d_image_backing_factory.cc b/gpu/command_buffer/service/shared_image/d3d_image_backing_factory.cc index bb5679c..3b51e95 100644 --- a/gpu/command_buffer/service/shared_image/d3d_image_backing_factory.cc +++ b/gpu/command_buffer/service/shared_image/d3d_image_backing_factory.cc
@@ -339,7 +339,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, - std::string debug_label_client, + std::string debug_label, bool is_thread_safe) { DCHECK(!is_thread_safe); @@ -417,8 +417,7 @@ return nullptr; } - const std::string debug_label = - "SharedImage_Texture2D" + CreateLabelForSharedImageUsage(usage); + debug_label = "D3DSharedImage_" + debug_label; d3d11_texture->SetPrivateData(WKPDID_D3DDebugObjectName, debug_label.length(), debug_label.c_str());
diff --git a/gpu/command_buffer/service/shared_image/dcomp_surface_image_representation.cc b/gpu/command_buffer/service/shared_image/dcomp_surface_image_representation.cc index 9f36528b..c656ad9 100644 --- a/gpu/command_buffer/service/shared_image/dcomp_surface_image_representation.cc +++ b/gpu/command_buffer/service/shared_image/dcomp_surface_image_representation.cc
@@ -47,10 +47,10 @@ SharedImageManager* manager, SharedImageBacking* backing, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(context_state->gr_context(), - manager, - backing, - tracker), + : SkiaGaneshImageRepresentation(context_state->gr_context(), + manager, + backing, + tracker), context_state_(std::move(context_state)) { DCHECK(context_state_); }
diff --git a/gpu/command_buffer/service/shared_image/dcomp_surface_image_representation.h b/gpu/command_buffer/service/shared_image/dcomp_surface_image_representation.h index c5bbd69..0218c55 100644 --- a/gpu/command_buffer/service/shared_image/dcomp_surface_image_representation.h +++ b/gpu/command_buffer/service/shared_image/dcomp_surface_image_representation.h
@@ -28,7 +28,7 @@ // See DCompSurfaceImageBacking::ProduceSkia for more information. class DCompSurfaceSkiaImageRepresentation - : public gpu::SkiaImageRepresentation { + : public SkiaGaneshImageRepresentation { public: DCompSurfaceSkiaImageRepresentation( scoped_refptr<SharedContextState> context_state,
diff --git a/gpu/command_buffer/service/shared_image/external_vk_image_skia_representation.cc b/gpu/command_buffer/service/shared_image/external_vk_image_skia_representation.cc index 3aa31d3d..a80f8cdc 100644 --- a/gpu/command_buffer/service/shared_image/external_vk_image_skia_representation.cc +++ b/gpu/command_buffer/service/shared_image/external_vk_image_skia_representation.cc
@@ -22,7 +22,7 @@ SharedImageManager* manager, SharedImageBacking* backing, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(gr_context, manager, backing, tracker), + : SkiaGaneshImageRepresentation(gr_context, manager, backing, tracker), context_state_(backing_impl()->context_state()) {} ExternalVkImageSkiaImageRepresentation::
diff --git a/gpu/command_buffer/service/shared_image/external_vk_image_skia_representation.h b/gpu/command_buffer/service/shared_image/external_vk_image_skia_representation.h index e040167..d30eafbe 100644 --- a/gpu/command_buffer/service/shared_image/external_vk_image_skia_representation.h +++ b/gpu/command_buffer/service/shared_image/external_vk_image_skia_representation.h
@@ -13,7 +13,8 @@ namespace gpu { -class ExternalVkImageSkiaImageRepresentation : public SkiaImageRepresentation { +class ExternalVkImageSkiaImageRepresentation + : public SkiaGaneshImageRepresentation { public: ExternalVkImageSkiaImageRepresentation(GrDirectContext* gr_context, SharedImageManager* manager,
diff --git a/gpu/command_buffer/service/shared_image/gl_texture_common_representations.cc b/gpu/command_buffer/service/shared_image/gl_texture_common_representations.cc index 6ae98604..8eac198 100644 --- a/gpu/command_buffer/service/shared_image/gl_texture_common_representations.cc +++ b/gpu/command_buffer/service/shared_image/gl_texture_common_representations.cc
@@ -110,10 +110,10 @@ scoped_refptr<SharedContextState> context_state, std::vector<sk_sp<SkPromiseImageTexture>> promise_textures, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(context_state->gr_context(), - manager, - backing, - tracker), + : SkiaGaneshImageRepresentation(context_state->gr_context(), + manager, + backing, + tracker), client_(client), context_state_(std::move(context_state)), promise_textures_(std::move(promise_textures)) {
diff --git a/gpu/command_buffer/service/shared_image/gl_texture_common_representations.h b/gpu/command_buffer/service/shared_image/gl_texture_common_representations.h index 15bfadd..b2522f9 100644 --- a/gpu/command_buffer/service/shared_image/gl_texture_common_representations.h +++ b/gpu/command_buffer/service/shared_image/gl_texture_common_representations.h
@@ -73,7 +73,7 @@ }; // Skia representation for both GLTextureImageBackingHelper. -class SkiaGLCommonRepresentation : public SkiaImageRepresentation { +class SkiaGLCommonRepresentation : public SkiaGaneshImageRepresentation { public: class Client { public:
diff --git a/gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc b/gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc index 9b8b826..2e42a9f 100644 --- a/gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc +++ b/gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc
@@ -216,11 +216,13 @@ const std::vector<GLCommonImageBackingFactory::FormatInfo>& format_info, base::span<const uint8_t> pixel_data, gl::ProgressReporter* progress_reporter, - bool framebuffer_attachment_angle) { + bool framebuffer_attachment_angle, + std::string debug_label_from_client) { + // If the extension does not exist, pass an empty debug label to avoid + // subsequent crashes. std::string debug_label; if (gl::g_current_gl_driver->ext.b_GL_KHR_debug) { - debug_label = - "SharedImage_GLTexture" + CreateLabelForSharedImageUsage(usage()); + debug_label = "GLSharedImage_" + debug_label_from_client; } int num_planes = format().NumberOfPlanes();
diff --git a/gpu/command_buffer/service/shared_image/gl_texture_image_backing.h b/gpu/command_buffer/service/shared_image/gl_texture_image_backing.h index de21d87..871b89a 100644 --- a/gpu/command_buffer/service/shared_image/gl_texture_image_backing.h +++ b/gpu/command_buffer/service/shared_image/gl_texture_image_backing.h
@@ -33,7 +33,8 @@ const std::vector<GLCommonImageBackingFactory::FormatInfo>& format_info, base::span<const uint8_t> pixel_data, gl::ProgressReporter* progress_reporter, - bool framebuffer_attachment_angle); + bool framebuffer_attachment_angle, + std::string debug_label); private: // SharedImageBacking:
diff --git a/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc b/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc index b3aae30..67a4cc5 100644 --- a/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc +++ b/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc
@@ -71,9 +71,9 @@ std::string debug_label, bool is_thread_safe) { DCHECK(!is_thread_safe); - return CreateSharedImageInternal(mailbox, format, surface_handle, size, - color_space, surface_origin, alpha_type, - usage, base::span<const uint8_t>()); + return CreateSharedImageInternal( + mailbox, format, surface_handle, size, color_space, surface_origin, + alpha_type, usage, std::move(debug_label), base::span<const uint8_t>()); } std::unique_ptr<SharedImageBacking> @@ -89,7 +89,7 @@ base::span<const uint8_t> pixel_data) { return CreateSharedImageInternal(mailbox, format, kNullSurfaceHandle, size, color_space, surface_origin, alpha_type, - usage, pixel_data); + usage, std::move(debug_label), pixel_data); } std::unique_ptr<SharedImageBacking> @@ -184,6 +184,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + std::string debug_label, base::span<const uint8_t> pixel_data) { DCHECK(CanCreateTexture(format, size, pixel_data, GL_TEXTURE_2D)); @@ -197,7 +198,8 @@ mailbox, format, size, color_space, surface_origin, alpha_type, usage, use_passthrough_); result->InitializeGLTexture(GetFormatInfo(format), pixel_data, - progress_reporter_, framebuffer_attachment_angle); + progress_reporter_, framebuffer_attachment_angle, + std::move(debug_label)); return std::move(result); }
diff --git a/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.h b/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.h index 93b56bd..94a5009 100644 --- a/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.h +++ b/gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.h
@@ -91,6 +91,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + std::string debug_label, base::span<const uint8_t> pixel_data); const bool for_cpu_upload_usage_;
diff --git a/gpu/command_buffer/service/shared_image/iosurface_image_backing.h b/gpu/command_buffer/service/shared_image/iosurface_image_backing.h index dffbe677..f13e283 100644 --- a/gpu/command_buffer/service/shared_image/iosurface_image_backing.h +++ b/gpu/command_buffer/service/shared_image/iosurface_image_backing.h
@@ -112,7 +112,7 @@ }; // Skia representation for both GLTextureImageBackingHelper. -class SkiaIOSurfaceRepresentation : public SkiaImageRepresentation { +class SkiaIOSurfaceRepresentation : public SkiaGaneshImageRepresentation { public: SkiaIOSurfaceRepresentation( SharedImageManager* manager,
diff --git a/gpu/command_buffer/service/shared_image/iosurface_image_backing.mm b/gpu/command_buffer/service/shared_image/iosurface_image_backing.mm index da8a9db3..dc3b762 100644 --- a/gpu/command_buffer/service/shared_image/iosurface_image_backing.mm +++ b/gpu/command_buffer/service/shared_image/iosurface_image_backing.mm
@@ -200,10 +200,10 @@ scoped_refptr<SharedContextState> context_state, std::vector<sk_sp<SkPromiseImageTexture>> promise_textures, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(context_state->gr_context(), - manager, - backing, - tracker), + : SkiaGaneshImageRepresentation(context_state->gr_context(), + manager, + backing, + tracker), egl_state_(egl_state), context_state_(std::move(context_state)), promise_textures_(promise_textures) {
diff --git a/gpu/command_buffer/service/shared_image/raw_draw_image_backing.cc b/gpu/command_buffer/service/shared_image/raw_draw_image_backing.cc index 032d4844..bbb60b3 100644 --- a/gpu/command_buffer/service/shared_image/raw_draw_image_backing.cc +++ b/gpu/command_buffer/service/shared_image/raw_draw_image_backing.cc
@@ -56,13 +56,13 @@ }; class RawDrawImageBacking::SkiaRawDrawImageRepresentation - : public SkiaImageRepresentation { + : public SkiaGaneshImageRepresentation { public: SkiaRawDrawImageRepresentation(GrDirectContext* gr_context, SharedImageManager* manager, SharedImageBacking* backing, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(gr_context, manager, backing, tracker) {} + : SkiaGaneshImageRepresentation(gr_context, manager, backing, tracker) {} bool SupportsMultipleConcurrentReadAccess() override { return true; }
diff --git a/gpu/command_buffer/service/shared_image/shared_image_representation.h b/gpu/command_buffer/service/shared_image/shared_image_representation.h index 9831e4ea..4890b780 100644 --- a/gpu/command_buffer/service/shared_image/shared_image_representation.h +++ b/gpu/command_buffer/service/shared_image/shared_image_representation.h
@@ -474,6 +474,19 @@ }; /////////////////////////////////////////////////////////////////////////////// +// SkiaGaneshImageRepresentation + +class GPU_GLES2_EXPORT SkiaGaneshImageRepresentation + : public SkiaImageRepresentation { + public: + SkiaGaneshImageRepresentation(GrDirectContext* gr_context, + SharedImageManager* manager, + SharedImageBacking* backing, + MemoryTypeTracker* tracker) + : SkiaImageRepresentation(gr_context, manager, backing, tracker) {} +}; + +/////////////////////////////////////////////////////////////////////////////// // DawnImageRepresentation class GPU_GLES2_EXPORT DawnImageRepresentation
diff --git a/gpu/command_buffer/service/shared_image/skia_gl_image_representation.cc b/gpu/command_buffer/service/shared_image/skia_gl_image_representation.cc index 688d39c..bb4d6fe 100644 --- a/gpu/command_buffer/service/shared_image/skia_gl_image_representation.cc +++ b/gpu/command_buffer/service/shared_image/skia_gl_image_representation.cc
@@ -97,10 +97,10 @@ SharedImageManager* manager, SharedImageBacking* backing, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(context_state->gr_context(), - manager, - backing, - tracker), + : SkiaGaneshImageRepresentation(context_state->gr_context(), + manager, + backing, + tracker), gl_representation_(std::move(gl_representation)), promise_textures_(std::move(promise_textures)), context_state_(std::move(context_state)) {
diff --git a/gpu/command_buffer/service/shared_image/skia_gl_image_representation.h b/gpu/command_buffer/service/shared_image/skia_gl_image_representation.h index c2ee018..4b5dd40 100644 --- a/gpu/command_buffer/service/shared_image/skia_gl_image_representation.h +++ b/gpu/command_buffer/service/shared_image/skia_gl_image_representation.h
@@ -10,14 +10,14 @@ #include "ui/gl/gl_context.h" namespace gpu { -// This is a wrapper class for SkiaImageRepresentation to be used in GL +// This is a wrapper class for SkiaGaneshImageRepresentation to be used in GL // mode. For most of the SharedImageBackings, GLTextureImageRepresentation -// and SkiaImageRepresentation implementations do the same work which +// and SkiaGaneshImageRepresentation implementations do the same work which // results in duplicate code. Hence instead of implementing -// SkiaImageRepresentation, this wrapper can be directly used or +// SkiaGaneshImageRepresentation, this wrapper can be directly used or // implemented by the backings. class GPU_GLES2_EXPORT SkiaGLImageRepresentation - : public SkiaImageRepresentation { + : public SkiaGaneshImageRepresentation { public: static std::unique_ptr<SkiaGLImageRepresentation> Create( std::unique_ptr<GLTextureImageRepresentationBase> gl_representation,
diff --git a/gpu/command_buffer/service/shared_image/skia_vk_android_image_representation.cc b/gpu/command_buffer/service/shared_image/skia_vk_android_image_representation.cc index 3289273..2f399281 100644 --- a/gpu/command_buffer/service/shared_image/skia_vk_android_image_representation.cc +++ b/gpu/command_buffer/service/shared_image/skia_vk_android_image_representation.cc
@@ -34,10 +34,10 @@ AndroidImageBacking* backing, scoped_refptr<SharedContextState> context_state, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(context_state->gr_context(), - manager, - backing, - tracker), + : SkiaGaneshImageRepresentation(context_state->gr_context(), + manager, + backing, + tracker), context_state_(std::move(context_state)) { DCHECK(backing); DCHECK(context_state_);
diff --git a/gpu/command_buffer/service/shared_image/skia_vk_android_image_representation.h b/gpu/command_buffer/service/shared_image/skia_vk_android_image_representation.h index a5802b6..687f930 100644 --- a/gpu/command_buffer/service/shared_image/skia_vk_android_image_representation.h +++ b/gpu/command_buffer/service/shared_image/skia_vk_android_image_representation.h
@@ -20,7 +20,7 @@ // A generic Skia vulkan representation which can be used by any backing on // Android. -class SkiaVkAndroidImageRepresentation : public SkiaImageRepresentation { +class SkiaVkAndroidImageRepresentation : public SkiaGaneshImageRepresentation { public: SkiaVkAndroidImageRepresentation( SharedImageManager* manager,
diff --git a/gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.cc b/gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.cc index 212769e9..1a35842 100644 --- a/gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.cc +++ b/gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.cc
@@ -34,10 +34,10 @@ scoped_refptr<SharedContextState> context_state, std::unique_ptr<VulkanImage> vulkan_image, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(context_state->gr_context(), - manager, - backing, - tracker), + : SkiaGaneshImageRepresentation(context_state->gr_context(), + manager, + backing, + tracker), vulkan_image_(std::move(vulkan_image)), context_state_(std::move(context_state)) { DCHECK(backing);
diff --git a/gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.h b/gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.h index 32c99d1..9d1f9b3 100644 --- a/gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.h +++ b/gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.h
@@ -19,7 +19,7 @@ class VulkanImplementation; // A generic Skia vulkan representation which can be used by Ozone backing. -class SkiaVkOzoneImageRepresentation : public SkiaImageRepresentation { +class SkiaVkOzoneImageRepresentation : public SkiaGaneshImageRepresentation { public: SkiaVkOzoneImageRepresentation( SharedImageManager* manager,
diff --git a/gpu/command_buffer/service/shared_image/test_image_backing.cc b/gpu/command_buffer/service/shared_image/test_image_backing.cc index 38849293..3fca7c1 100644 --- a/gpu/command_buffer/service/shared_image/test_image_backing.cc +++ b/gpu/command_buffer/service/shared_image/test_image_backing.cc
@@ -61,13 +61,13 @@ const scoped_refptr<gles2::TexturePassthrough> texture_; }; -class TestSkiaImageRepresentation : public SkiaImageRepresentation { +class TestSkiaImageRepresentation : public SkiaGaneshImageRepresentation { public: TestSkiaImageRepresentation(GrDirectContext* gr_context, SharedImageManager* manager, SharedImageBacking* backing, MemoryTypeTracker* tracker) - : SkiaImageRepresentation(gr_context, manager, backing, tracker) {} + : SkiaGaneshImageRepresentation(gr_context, manager, backing, tracker) {} protected: std::vector<sk_sp<SkSurface>> BeginWriteAccess(
diff --git a/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc b/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc index fe224bc..cd0f8f9 100644 --- a/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc +++ b/gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc
@@ -31,26 +31,25 @@ namespace { -// Given a usage and debug label string from the client, construct a string we -// can pass to debugging tools. -std::string GetLabel(uint32_t usage, const std::string& debug_label) { - return std::string("WrappedSkImage(" + CreateLabelForSharedImageUsage(usage) + - ")" + "_" + debug_label); +// Given a debug label string from the client, construct a string we can pass to +// debugging tools. +std::string GetLabel(const std::string& debug_label) { + return std::string("WrappedSkImage_" + debug_label); } } // namespace class WrappedSkImageBacking::SkiaImageRepresentationImpl - : public SkiaImageRepresentation { + : public SkiaGaneshImageRepresentation { public: SkiaImageRepresentationImpl(SharedImageManager* manager, SharedImageBacking* backing, MemoryTypeTracker* tracker, scoped_refptr<SharedContextState> context_state) - : SkiaImageRepresentation(context_state->gr_context(), - manager, - backing, - tracker), + : SkiaGaneshImageRepresentation(context_state->gr_context(), + manager, + backing, + tracker), context_state_(std::move(context_state)) {} ~SkiaImageRepresentationImpl() override { DCHECK(write_surfaces_.empty()); } @@ -226,13 +225,12 @@ context_state_->gr_context()->createBackendTexture( plane_size.width(), plane_size.height(), GetSkColorType(plane), fallback_color, mipmap, is_renderable, is_protected, nullptr, - nullptr, GetLabel(usage(), debug_label)); + nullptr, GetLabel(debug_label)); #else texture.backend_texture = context_state_->gr_context()->createBackendTexture( plane_size.width(), plane_size.height(), GetSkColorType(plane), - mipmap, is_renderable, is_protected, - GetLabel(usage(), debug_label)); + mipmap, is_renderable, is_protected, GetLabel(debug_label)); #endif if (!texture.backend_texture.isValid()) { @@ -277,7 +275,7 @@ textures_[0].backend_texture = context_state_->gr_context()->createBackendTexture( pixmap, GrRenderable::kYes, GrProtected::kNo, nullptr, nullptr, - GetLabel(usage(), debug_label)); + GetLabel(debug_label)); } if (!textures_[0].backend_texture.isValid()) {
diff --git a/gpu/command_buffer/service/shared_image_interface_in_process.cc b/gpu/command_buffer/service/shared_image_interface_in_process.cc index 029bcec..cc683de 100644 --- a/gpu/command_buffer/service/shared_image_interface_in_process.cc +++ b/gpu/command_buffer/service/shared_image_interface_in_process.cc
@@ -176,6 +176,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) { DCHECK(gpu::IsValidClientUsage(usage)); auto mailbox = Mailbox::GenerateForSharedImage(); @@ -190,6 +191,7 @@ &SharedImageInterfaceInProcess::CreateSharedImageOnGpuThread, base::Unretained(this), mailbox, format, surface_handle, size, color_space, surface_origin, alpha_type, usage, + std::string(debug_label), MakeSyncToken(next_fence_sync_release_++)), {}); } @@ -205,6 +207,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + std::string debug_label, const SyncToken& sync_token) { DCHECK_CALLED_ON_VALID_SEQUENCE(gpu_sequence_checker_); if (!LazyCreateSharedImageFactory()) @@ -216,7 +219,7 @@ DCHECK(shared_image_factory_); if (!shared_image_factory_->CreateSharedImage( mailbox, format, size, color_space, surface_origin, alpha_type, - surface_handle, usage, "Viz")) { + surface_handle, usage, std::string(debug_label))) { context_state_->MarkContextLost(); return; } @@ -230,6 +233,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) { DCHECK(gpu::IsValidClientUsage(usage)); auto mailbox = Mailbox::GenerateForSharedImage(); @@ -240,14 +244,14 @@ // the release ids as seen by the service. Unretained is safe because // InProcessCommandBuffer synchronizes with the GPU thread at destruction // time, cancelling tasks, before |this| is destroyed. - ScheduleGpuTask( - base::BindOnce(&SharedImageInterfaceInProcess:: - CreateSharedImageWithDataOnGpuThread, - base::Unretained(this), mailbox, format, size, - color_space, surface_origin, alpha_type, usage, - MakeSyncToken(next_fence_sync_release_++), - std::move(pixel_data_copy)), - {}); + ScheduleGpuTask(base::BindOnce(&SharedImageInterfaceInProcess:: + CreateSharedImageWithDataOnGpuThread, + base::Unretained(this), mailbox, format, + size, color_space, surface_origin, + alpha_type, usage, std::string(debug_label), + MakeSyncToken(next_fence_sync_release_++), + std::move(pixel_data_copy)), + {}); } return mailbox; } @@ -260,6 +264,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + std::string debug_label, const SyncToken& sync_token, std::vector<uint8_t> pixel_data) { DCHECK_CALLED_ON_VALID_SEQUENCE(gpu_sequence_checker_); @@ -272,7 +277,7 @@ DCHECK(shared_image_factory_); if (!shared_image_factory_->CreateSharedImage( mailbox, format, size, color_space, surface_origin, alpha_type, usage, - "Viz", pixel_data)) { + std::move(debug_label), pixel_data)) { context_state_->MarkContextLost(); return; } @@ -286,6 +291,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) { NOTREACHED(); return Mailbox(); @@ -298,7 +304,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) { + uint32_t usage, + base::StringPiece debug_label) { DCHECK(gpu::IsValidClientUsage(usage)); // TODO(piman): DCHECK GMB format support. DCHECK(IsImageSizeValidForGpuMemoryBufferFormat( @@ -320,7 +327,8 @@ &SharedImageInterfaceInProcess::CreateGMBSharedImageOnGpuThread, base::Unretained(this), mailbox, std::move(handle), gpu_memory_buffer->GetFormat(), plane, gpu_memory_buffer->GetSize(), - color_space, surface_origin, alpha_type, usage, sync_token), + color_space, surface_origin, alpha_type, usage, + std::string(debug_label), sync_token), {}); } @@ -337,6 +345,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + std::string debug_label, const SyncToken& sync_token) { DCHECK_CALLED_ON_VALID_SEQUENCE(gpu_sequence_checker_); if (!LazyCreateSharedImageFactory()) @@ -348,7 +357,7 @@ DCHECK(shared_image_factory_); if (!shared_image_factory_->CreateSharedImage( mailbox, std::move(handle), format, plane, size, color_space, - surface_origin, alpha_type, usage, "Viz")) { + surface_origin, alpha_type, usage, std::move(debug_label))) { context_state_->MarkContextLost(); return; }
diff --git a/gpu/command_buffer/service/shared_image_interface_in_process.h b/gpu/command_buffer/service/shared_image_interface_in_process.h index d741339..119a79f 100644 --- a/gpu/command_buffer/service/shared_image_interface_in_process.h +++ b/gpu/command_buffer/service/shared_image_interface_in_process.h
@@ -73,6 +73,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) override; // Same behavior as the above, except that this version takes |pixel_data| @@ -85,6 +86,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) override; Mailbox CreateSharedImage(viz::SharedImageFormat format, @@ -93,6 +95,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) override; // |usage| is a combination of |SharedImageUsage| bits that describes which @@ -112,7 +115,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) override; + uint32_t usage, + base::StringPiece debug_label) override; // Updates a shared image after its GpuMemoryBuffer (if any) was modified on // the CPU or through external devices, after |sync_token| has been released. @@ -197,6 +201,9 @@ // Only called on the gpu thread. bool MakeContextCurrent(bool needs_gl = false); bool LazyCreateSharedImageFactory(); + // The "OnGpuThread" version of the methods accept a std::string for + // debug_label so it can be safely passed (copied) between threads without + // UAF. void CreateSharedImageOnGpuThread(const Mailbox& mailbox, viz::SharedImageFormat format, gpu::SurfaceHandle surface_handle, @@ -205,6 +212,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + std::string debug_label, const SyncToken& sync_token); void CreateSharedImageWithDataOnGpuThread(const Mailbox& mailbox, viz::SharedImageFormat format, @@ -213,6 +221,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + std::string debug_label, const SyncToken& sync_token, std::vector<uint8_t> pixel_data); @@ -225,6 +234,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + std::string debug_label, const SyncToken& sync_token); void UpdateSharedImageOnGpuThread(const Mailbox& mailbox, const SyncToken& sync_token);
diff --git a/gpu/command_buffer/tests/shared_image_gl_backing_produce_dawn_unittest.cc b/gpu/command_buffer/tests/shared_image_gl_backing_produce_dawn_unittest.cc index 9929bb0..5717536 100644 --- a/gpu/command_buffer/tests/shared_image_gl_backing_produce_dawn_unittest.cc +++ b/gpu/command_buffer/tests/shared_image_gl_backing_produce_dawn_unittest.cc
@@ -106,7 +106,7 @@ Mailbox gl_mailbox = sii->CreateSharedImage( viz::SinglePlaneFormat::kRGBA_8888, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_GLES2, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); SyncToken mailbox_produced_token = sii->GenVerifiedSyncToken(); gl()->WaitSyncTokenCHROMIUM(mailbox_produced_token.GetConstData()); GLuint texture =
diff --git a/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc b/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc index 3429261..f2bae7c 100644 --- a/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc +++ b/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc
@@ -236,7 +236,7 @@ Mailbox mailbox = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); webgpu::ReservedTexture reservation = webgpu()->ReserveTexture(device_.Get()); @@ -423,7 +423,7 @@ Mailbox mailbox = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); webgpu::ReservedTexture reservation = webgpu()->ReserveTexture(device_.Get()); @@ -459,7 +459,7 @@ Mailbox mailbox = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); webgpu::ReservedTexture reservation = webgpu()->ReserveTexture(device_.Get()); @@ -526,7 +526,7 @@ Mailbox mailbox = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); SyncToken mailbox_produced_token = sii->GenVerifiedSyncToken(); webgpu()->WaitSyncTokenCHROMIUM(mailbox_produced_token.GetConstData()); @@ -600,7 +600,7 @@ Mailbox mailbox = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); SyncToken mailbox_produced_token = sii->GenVerifiedSyncToken(); webgpu()->WaitSyncTokenCHROMIUM(mailbox_produced_token.GetConstData()); @@ -671,7 +671,7 @@ Mailbox mailbox = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); SyncToken mailbox_produced_token = sii->GenVerifiedSyncToken(); webgpu()->WaitSyncTokenCHROMIUM(mailbox_produced_token.GetConstData()); @@ -756,7 +756,7 @@ Mailbox mailbox = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); SyncToken mailbox_produced_token = sii->GenVerifiedSyncToken(); webgpu()->WaitSyncTokenCHROMIUM(mailbox_produced_token.GetConstData()); @@ -829,11 +829,11 @@ Mailbox mailbox_a = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); Mailbox mailbox_b = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); // Associate both mailboxes gpu::webgpu::ReservedTexture reservation_a = @@ -868,12 +868,12 @@ Mailbox mailbox_a = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); Mailbox mailbox_b = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); // Two WebGPU devices to associate the shared images to. wgpu::Device device_a = GetNewDevice(); @@ -958,11 +958,11 @@ Mailbox mailbox1 = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); Mailbox mailbox2 = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); webgpu()->AssociateMailbox( reservation1.deviceId, reservation1.deviceGeneration, reservation1.id, reservation1.generation, static_cast<WGPUTextureUsage>(desc1.usage), @@ -983,7 +983,7 @@ Mailbox mailbox = sii->CreateSharedImage( GetParam().format, {1, 1}, gfx::ColorSpace::CreateSRGB(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, SHARED_IMAGE_USAGE_WEBGPU, - kNullSurfaceHandle); + "TestLabel", kNullSurfaceHandle); scoped_refptr<gl::GLContext> gl_context1; scoped_refptr<gl::GLContext> gl_context2;
diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json index 29163fe..f897542c 100644 --- a/gpu/config/gpu_driver_bug_list.json +++ b/gpu/config/gpu_driver_bug_list.json
@@ -3411,7 +3411,7 @@ "type": "win" }, "vendor_id": "0x1002", - "device_id": ["0x98e4", "0x15dd"], + "device_id": ["0x98e4"], "features": [ "disable_d3d11_video_decoder" ],
diff --git a/gpu/ipc/client/client_shared_image_interface.cc b/gpu/ipc/client/client_shared_image_interface.cc index 39312a9..1d5dbbf 100644 --- a/gpu/ipc/client/client_shared_image_interface.cc +++ b/gpu/ipc/client/client_shared_image_interface.cc
@@ -83,11 +83,13 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) { DCHECK_EQ(surface_handle, kNullSurfaceHandle); DCHECK(gpu::IsValidClientUsage(usage)); - return AddMailbox(proxy_->CreateSharedImage( - format, size, color_space, surface_origin, alpha_type, usage)); + return AddMailbox(proxy_->CreateSharedImage(format, size, color_space, + surface_origin, alpha_type, usage, + debug_label)); } Mailbox ClientSharedImageInterface::CreateSharedImage( @@ -97,13 +99,14 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) { // Pixel upload path only supports single-planar formats. DCHECK(format.is_single_plane()); DCHECK(gpu::IsValidClientUsage(usage)); return AddMailbox(proxy_->CreateSharedImage(format, size, color_space, surface_origin, alpha_type, usage, - pixel_data)); + debug_label, pixel_data)); } Mailbox ClientSharedImageInterface::CreateSharedImage( @@ -113,13 +116,14 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) { DCHECK(gpu::IsValidClientUsage(usage)); DCHECK(viz::HasEquivalentBufferFormat(format)); DCHECK(format.is_multi_plane()); - return AddMailbox(proxy_->CreateSharedImage(format, size, color_space, - surface_origin, alpha_type, usage, - std::move(buffer_handle))); + return AddMailbox(proxy_->CreateSharedImage( + format, size, color_space, surface_origin, alpha_type, usage, debug_label, + std::move(buffer_handle))); } Mailbox ClientSharedImageInterface::CreateSharedImage( @@ -129,11 +133,12 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) { + uint32_t usage, + base::StringPiece debug_label) { DCHECK(gpu::IsValidClientUsage(usage)); return AddMailbox(proxy_->CreateSharedImage( gpu_memory_buffer->GetFormat(), plane, gpu_memory_buffer->GetSize(), - color_space, surface_origin, alpha_type, usage, + color_space, surface_origin, alpha_type, usage, debug_label, gpu_memory_buffer->CloneHandle())); }
diff --git a/gpu/ipc/client/client_shared_image_interface.h b/gpu/ipc/client/client_shared_image_interface.h index 50057a2..c8846df3 100644 --- a/gpu/ipc/client/client_shared_image_interface.h +++ b/gpu/ipc/client/client_shared_image_interface.h
@@ -51,6 +51,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) override; Mailbox CreateSharedImage(viz::SharedImageFormat format, const gfx::Size& size, @@ -58,6 +59,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) override; Mailbox CreateSharedImage(viz::SharedImageFormat format, const gfx::Size& size, @@ -65,6 +67,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) override; Mailbox CreateSharedImage(gfx::GpuMemoryBuffer* gpu_memory_buffer, GpuMemoryBufferManager* gpu_memory_buffer_manager, @@ -72,7 +75,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) override; + uint32_t usage, + base::StringPiece debug_label) override; #if BUILDFLAG(IS_WIN) void CopyToGpuMemoryBuffer(const SyncToken& sync_token, const Mailbox& mailbox) override;
diff --git a/gpu/ipc/client/raster_in_process_context_tests.cc b/gpu/ipc/client/raster_in_process_context_tests.cc index c4ad43e3..22f5425 100644 --- a/gpu/ipc/client/raster_in_process_context_tests.cc +++ b/gpu/ipc/client/raster_in_process_context_tests.cc
@@ -89,7 +89,7 @@ gpu::SHARED_IMAGE_USAGE_OOP_RASTERIZATION; gpu::Mailbox mailbox = sii->CreateSharedImage( kSharedImageFormat, kBufferSize, color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, flags, kNullSurfaceHandle); + kPremul_SkAlphaType, flags, "TestLabel", kNullSurfaceHandle); ri_->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData()); // Call BeginRasterCHROMIUM.
diff --git a/gpu/ipc/client/shared_image_interface_proxy.cc b/gpu/ipc/client/shared_image_interface_proxy.cc index 5e99fe10..f53bcbe 100644 --- a/gpu/ipc/client/shared_image_interface_proxy.cc +++ b/gpu/ipc/client/shared_image_interface_proxy.cc
@@ -85,7 +85,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) { + uint32_t usage, + base::StringPiece debug_label) { auto mailbox = Mailbox::GenerateForSharedImage(); auto params = mojom::CreateSharedImageParams::New(); params->mailbox = mailbox; @@ -93,6 +94,7 @@ params->size = size; params->color_space = color_space; params->usage = usage; + params->debug_label = std::string(debug_label); params->surface_origin = surface_origin; params->alpha_type = alpha_type; { @@ -117,6 +119,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) { // Pixel data's size must fit into a uint32_t to be sent in // CreateSharedImageWithDataParams. @@ -145,6 +148,7 @@ params->size = size; params->color_space = color_space; params->usage = usage; + params->debug_label = std::string(debug_label); params->pixel_data_offset = shm_offset; params->pixel_data_size = pixel_data.size(); params->done_with_shm = done_with_shm; @@ -166,6 +170,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) { // TODO(kylechar): Verify buffer_handle works for size+format. @@ -178,6 +183,7 @@ params->format = format; params->color_space = color_space; params->usage = usage; + params->debug_label = std::string(debug_label); params->surface_origin = surface_origin; params->alpha_type = alpha_type; @@ -203,6 +209,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) { auto mailbox = Mailbox::GenerateForSharedImage(); @@ -214,6 +221,7 @@ params->plane = plane; params->color_space = color_space; params->usage = usage; + params->debug_label = std::string(debug_label); params->surface_origin = surface_origin; params->alpha_type = alpha_type;
diff --git a/gpu/ipc/client/shared_image_interface_proxy.h b/gpu/ipc/client/shared_image_interface_proxy.h index dcf788184..a3c57a5 100644 --- a/gpu/ipc/client/shared_image_interface_proxy.h +++ b/gpu/ipc/client/shared_image_interface_proxy.h
@@ -31,13 +31,15 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage); + uint32_t usage, + base::StringPiece debug_label); Mailbox CreateSharedImage(viz::SharedImageFormat format, const gfx::Size& size, const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data); Mailbox CreateSharedImage(viz::SharedImageFormat format, const gfx::Size& size, @@ -45,6 +47,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle handle); Mailbox CreateSharedImage(gfx::BufferFormat format, gfx::BufferPlane plane, @@ -53,6 +56,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle); #if BUILDFLAG(IS_WIN)
diff --git a/gpu/ipc/common/gpu_channel.mojom b/gpu/ipc/common/gpu_channel.mojom index 90ef2028..d5a75f4 100644 --- a/gpu/ipc/common/gpu_channel.mojom +++ b/gpu/ipc/common/gpu_channel.mojom
@@ -556,6 +556,10 @@ // gpu/command_buffer/common/shared_image_usage.h. uint32 usage; + // Retained for heap dumps and passed to graphics APIs for tracing tools. + // Pick a name that is unique to the allocation site. + string debug_label; + // The fence to release once the image is created. uint32 release_id; @@ -585,6 +589,10 @@ // gpu/command_buffer/common/shared_image_usage.h. uint32 usage; + // Retained for heap dumps and passed to graphics APIs for tracing tools. + // Pick a name that is unique to the allocation site. + string debug_label; + // The fence to release once the image is created. uint32 release_id; @@ -628,6 +636,10 @@ // gpu/command_buffer/common/shared_image_usage.h. uint32 usage; + // Retained for heap dumps and passed to graphics APIs for tracing tools. + // Pick a name that is unique to the allocation site. + string debug_label; + // The fence to release once the image is created. uint32 release_id; @@ -662,6 +674,10 @@ // gpu/command_buffer/common/shared_image_usage.h. uint32 usage; + // Retained for heap dumps and passed to graphics APIs for tracing tools. + // Pick a name that is unique to the allocation site. + string debug_label; + // The fence to release once the image is created. uint32 release_id;
diff --git a/gpu/ipc/service/image_decode_accelerator_stub.cc b/gpu/ipc/service/image_decode_accelerator_stub.cc index e2dda199..ec79cf9 100644 --- a/gpu/ipc/service/image_decode_accelerator_stub.cc +++ b/gpu/ipc/service/image_decode_accelerator_stub.cc
@@ -299,7 +299,8 @@ mailbox, std::move(plane_handle), plane_format, gfx::BufferPlane::DEFAULT, plane_size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kOpaque_SkAlphaType, - SHARED_IMAGE_USAGE_RASTER | SHARED_IMAGE_USAGE_OOP_RASTERIZATION)) { + SHARED_IMAGE_USAGE_RASTER | SHARED_IMAGE_USAGE_OOP_RASTERIZATION, + "ImageDecodeAccelerator")) { DLOG(ERROR) << "Could not create SharedImage"; return; }
diff --git a/gpu/ipc/service/shared_image_stub.cc b/gpu/ipc/service/shared_image_stub.cc index 878cc916..558428af 100644 --- a/gpu/ipc/service/shared_image_stub.cc +++ b/gpu/ipc/service/shared_image_stub.cc
@@ -138,7 +138,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) { + uint32_t usage, + std::string debug_label) { TRACE_EVENT2("gpu", "SharedImageStub::CreateSharedImage", "width", size.width(), "height", size.height()); if (!mailbox.IsSharedImage()) { @@ -152,10 +153,9 @@ return false; } - const std::string debug_label = GetLabel(); if (!factory_->CreateSharedImage(mailbox, std::move(handle), format, plane, size, color_space, surface_origin, - alpha_type, usage, std::move(debug_label))) { + alpha_type, usage, GetLabel(debug_label))) { LOG(ERROR) << "SharedImageStub: Unable to create shared image"; OnError(); return false; @@ -170,7 +170,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) { + uint32_t usage, + std::string debug_label) { TRACE_EVENT2("gpu", "SharedImageStub::CreateSharedImage", "width", size.width(), "height", size.height()); // TODO(kylechar): Add support for single-planar formats and remove this. @@ -190,10 +191,9 @@ return false; } - const std::string debug_label = GetLabel(); if (!factory_->CreateSharedImage(mailbox, format, size, color_space, surface_origin, alpha_type, usage, - std::move(debug_label), std::move(handle))) { + GetLabel(debug_label), std::move(handle))) { LOG(ERROR) << "SharedImageStub: Unable to create shared image with " "multiplanar format"; OnError(); @@ -244,11 +244,10 @@ return; } - const std::string debug_label = GetLabel(); if (!factory_->CreateSharedImage( params->mailbox, params->format, params->size, params->color_space, params->surface_origin, params->alpha_type, gpu::kNullSurfaceHandle, - params->usage, std::move(debug_label))) { + params->usage, GetLabel(params->debug_label))) { LOG(ERROR) << "SharedImageStub: Unable to create shared image"; OnError(); return; @@ -294,11 +293,10 @@ auto subspan = memory.subspan(params->pixel_data_offset, params->pixel_data_size); - const std::string debug_label = GetLabel(); if (!factory_->CreateSharedImage( params->mailbox, params->format, params->size, params->color_space, params->surface_origin, params->alpha_type, params->usage, - std::move(debug_label), subspan)) { + GetLabel(params->debug_label), subspan)) { LOG(ERROR) << "SharedImageStub: Unable to create shared image"; OnError(); return; @@ -320,7 +318,7 @@ if (!CreateSharedImage(params->mailbox, std::move(params->buffer_handle), params->format, params->size, params->color_space, params->surface_origin, params->alpha_type, - params->usage)) { + params->usage, GetLabel(params->debug_label))) { return; } @@ -334,7 +332,8 @@ if (!CreateSharedImage(params->mailbox, std::move(params->buffer_handle), params->format, params->plane, params->size, params->color_space, params->surface_origin, - params->alpha_type, params->usage)) { + params->alpha_type, params->usage, + GetLabel(params->debug_label))) { return; } @@ -596,10 +595,10 @@ std::vector<gpu::SyncToken>({sync_token}))); } -std::string SharedImageStub::GetLabel() const { +std::string SharedImageStub::GetLabel(const std::string& debug_label) const { // For cross process shared images, compose the label from the client id and // client pid for easier identification in debug tools. - return "Cid:" + base::NumberToString(channel_->client_id()) + + return debug_label + "_Cid:" + base::NumberToString(channel_->client_id()) + "_Pid:" + base::NumberToString(channel_->client_pid()); }
diff --git a/gpu/ipc/service/shared_image_stub.h b/gpu/ipc/service/shared_image_stub.h index 22e520aa..bb01f2b0 100644 --- a/gpu/ipc/service/shared_image_stub.h +++ b/gpu/ipc/service/shared_image_stub.h
@@ -57,7 +57,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage); + uint32_t usage, + std::string debug_label); bool CreateSharedImage(const Mailbox& mailbox, gfx::GpuMemoryBufferHandle handle, viz::SharedImageFormat format, @@ -65,7 +66,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage); + uint32_t usage, + std::string debug_label); bool UpdateSharedImage(const Mailbox& mailbox, gfx::GpuFenceHandle in_fence_handle); @@ -107,7 +109,7 @@ // Wait on the sync token if any and destroy the shared image. void DestroySharedImage(const Mailbox& mailbox, const SyncToken& sync_token); - std::string GetLabel() const; + std::string GetLabel(const std::string& debug_label) const; raw_ptr<GpuChannel> channel_;
diff --git a/headless/lib/browser/policy/headless_browser_policy_connector.cc b/headless/lib/browser/policy/headless_browser_policy_connector.cc index 76e5a82..bb8f775c5 100644 --- a/headless/lib/browser/policy/headless_browser_policy_connector.cc +++ b/headless/lib/browser/policy/headless_browser_policy_connector.cc
@@ -17,6 +17,7 @@ #include "components/policy/core/browser/configuration_policy_handler.h" // nogncheck http://crbug.com/1227148 #include "components/policy/core/browser/url_blocklist_policy_handler.h" // nogncheck http://crbug.com/1227148 #include "components/policy/core/common/async_policy_provider.h" // nogncheck http://crbug.com/1227148 +#include "components/policy/core/common/policy_logger.h" #include "components/policy/core/common/policy_pref_names.h" #include "components/policy/policy_constants.h" #include "headless/lib/browser/policy/headless_prefs.h" @@ -81,7 +82,11 @@ void HeadlessBrowserPolicyConnector::Init( PrefService* local_state, - scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) {} + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) { + if (PolicyLogger::GetInstance()->IsPolicyLoggingEnabled()) { + PolicyLogger::GetInstance()->EnableLogDeletion(); + } +} bool HeadlessBrowserPolicyConnector::IsDeviceEnterpriseManaged() const { return false;
diff --git "a/infra/config/generated/builders/ci/Mac Retina Release \050AMD\051/properties.json" "b/infra/config/generated/builders/ci/Mac Retina Release \050AMD\051/properties.json" index bc3a6bb..a89e92f0 100644 --- "a/infra/config/generated/builders/ci/Mac Retina Release \050AMD\051/properties.json" +++ "b/infra/config/generated/builders/ci/Mac Retina Release \050AMD\051/properties.json"
@@ -74,6 +74,10 @@ { "builder": "mac-inverse-fieldtrials-fyi-rel", "group": "tryserver.chromium.mac" + }, + { + "builder": "mac-rel", + "group": "tryserver.chromium.mac" } ] }
diff --git a/infra/config/generated/builders/try/mac-rel-compilator/properties.json b/infra/config/generated/builders/try/mac-rel-compilator/properties.json index 343accc..8466450b 100644 --- a/infra/config/generated/builders/try/mac-rel-compilator/properties.json +++ b/infra/config/generated/builders/try/mac-rel-compilator/properties.json
@@ -92,6 +92,36 @@ { "builder_id": { "bucket": "ci", + "builder": "Mac Retina Release (AMD)", + "project": "chromium" + }, + "builder_spec": { + "build_gs_bucket": "chromium-gpu-archive", + "builder_group": "chromium.gpu", + "execution_mode": "TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "goma_use_local" + ], + "build_config": "Release", + "config": "chromium", + "target_bits": 64, + "target_platform": "mac" + }, + "legacy_gclient_config": { + "config": "chromium" + }, + "parent": { + "bucket": "ci", + "builder": "GPU Mac Builder", + "project": "chromium" + } + } + }, + { + "builder_id": { + "bucket": "ci", "builder": "Mac12 Tests", "project": "chromium" }, @@ -140,6 +170,11 @@ }, { "bucket": "ci", + "builder": "Mac Retina Release (AMD)", + "project": "chromium" + }, + { + "bucket": "ci", "builder": "Mac12 Tests", "project": "chromium" }
diff --git a/infra/config/generated/builders/try/mac-rel/properties.json b/infra/config/generated/builders/try/mac-rel/properties.json index 56c65ab2..413e91c 100644 --- a/infra/config/generated/builders/try/mac-rel/properties.json +++ b/infra/config/generated/builders/try/mac-rel/properties.json
@@ -96,6 +96,36 @@ { "builder_id": { "bucket": "ci", + "builder": "Mac Retina Release (AMD)", + "project": "chromium" + }, + "builder_spec": { + "build_gs_bucket": "chromium-gpu-archive", + "builder_group": "chromium.gpu", + "execution_mode": "TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb", + "goma_use_local" + ], + "build_config": "Release", + "config": "chromium", + "target_bits": 64, + "target_platform": "mac" + }, + "legacy_gclient_config": { + "config": "chromium" + }, + "parent": { + "bucket": "ci", + "builder": "GPU Mac Builder", + "project": "chromium" + } + } + }, + { + "builder_id": { + "bucket": "ci", "builder": "Mac12 Tests", "project": "chromium" }, @@ -144,6 +174,11 @@ }, { "bucket": "ci", + "builder": "Mac Retina Release (AMD)", + "project": "chromium" + }, + { + "bucket": "ci", "builder": "Mac12 Tests", "project": "chromium" }
diff --git a/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star b/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star index e88b00a..f858ac7 100644 --- a/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star +++ b/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star
@@ -118,9 +118,7 @@ "ci/Mac12 Tests", "ci/GPU Mac Builder", "ci/Mac Release (Intel)", - # TODO(crbug.com/1380184) Once the GPU test capacity situation is - # resolved, restore this mirror. - # "ci/Mac Retina Release (AMD)", + "ci/Mac Retina Release (AMD)", ], try_settings = builder_config.try_settings( rts_config = builder_config.rts_config(
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd index 4eccd265..358c1321c 100644 --- a/ios/chrome/app/strings/ios_strings.grd +++ b/ios/chrome/app/strings/ios_strings.grd
@@ -1855,7 +1855,7 @@ other {After {COUNT} Days}} </message> <message name="IDS_IOS_OPTIONS_MOVE_INACTIVE_TABS" desc="Title for opening the setting for when tabs should be considered inactive. (Title case)"> - Move Inactive Tabs + Inactive </message> <message name="IDS_IOS_OPTIONS_PRELOAD_WEBPAGES" desc="Title for opening the setting for if/when to preload webpages. [Length: 20em] [iOS only]"> Preload Webpages @@ -2225,7 +2225,7 @@ Passwords are saved in your Google Account so you can use them on any device. </message> <message name="IDS_SAVE_PASSWORD_FOOTER_DISPLAYING_USER_EMAIL" desc="The footer text of the infobar that offers user to save/update a password to Chrome; also display's current user's email."> - You can use saved passwords on any device. They're saved to Google Password Manager for <ph name="EMAIL">$1<ex>johndoe@gmail.com</ex></ph> + You can use saved passwords on any device. They're saved to Google Password Manager for <ph name="EMAIL">$1<ex>johndoe@gmail.com</ex></ph>. </message> <message name="IDS_IOS_PERMISSIONS_CAMERA" desc="Usually used to show whether user has enabled a site's permission to use the device camera."> Camera @@ -2986,6 +2986,15 @@ <message name="IDS_IOS_CHANGE_COMPROMISED_PASSWORD" desc="Button which is shown on Password Details Screen when password is compromised. [iOS only]" meaning="Telling user to change password on a website since it is compromised."> Change Password on Website </message> + <message name="IDS_IOS_DISMISS_WARNING" desc="Button or dialog title which is shown on Password Details Screen to allow the user to dismiss a compromised password warning. [iOS only]" meaning="Title-cased"> + Dismiss Warning + </message> + <message name="IDS_IOS_DISMISS_WARNING_DIALOG_MESSAGE" desc="Message of the dialog presented to the user when they want to dismiss a compromised password warning. [iOS only]"> + The warning can be found again later under Dismissed Warnings in Compromised Passwords section. + </message> + <message name="IDS_IOS_DISMISS_WARNING_DIALOG_DISMISS_BUTTON" desc="Button of the dialog presented to the user when they want to dismiss a compromised password warning. Button is used to confirm that they want to dismiss the warning. [iOS only]"> + Dismiss + </message> <message name="IDS_IOS_DELETE_PASSWORD_DESCRIPTION" desc="Message at the top of the confirmation alert when the user tapped delete password button. [iOS only]" meaning="Explaining to the user that deleting password locally won't delete account on a website."> Deleting this password will not delete your account on <ph name="WEBSITE">$1<ex>twitter.com</ex></ph>. </message>
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING.png.sha1 new file mode 100644 index 0000000..bc2044d --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING.png.sha1
@@ -0,0 +1 @@ +64c36a88e6f5e689ce5154410db744c6c95696a4 \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING_DIALOG_DISMISS_BUTTON.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING_DIALOG_DISMISS_BUTTON.png.sha1 new file mode 100644 index 0000000..bc2044d --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING_DIALOG_DISMISS_BUTTON.png.sha1
@@ -0,0 +1 @@ +64c36a88e6f5e689ce5154410db744c6c95696a4 \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING_DIALOG_MESSAGE.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING_DIALOG_MESSAGE.png.sha1 new file mode 100644 index 0000000..bc2044d --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_DISMISS_WARNING_DIALOG_MESSAGE.png.sha1
@@ -0,0 +1 @@ +64c36a88e6f5e689ce5154410db744c6c95696a4 \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_OPTIONS_MOVE_INACTIVE_TABS.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_OPTIONS_MOVE_INACTIVE_TABS.png.sha1 index 37596922e..6e27933 100644 --- a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_OPTIONS_MOVE_INACTIVE_TABS.png.sha1 +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_OPTIONS_MOVE_INACTIVE_TABS.png.sha1
@@ -1 +1 @@ -f73129a844d5a8a2d05ad234a798128769c7e0d0 \ No newline at end of file +832bbb21df79b3786be78915a9e8e25e1f259fa2 \ No newline at end of file
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_SAVE_PASSWORD_FOOTER_DISPLAYING_USER_EMAIL.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_SAVE_PASSWORD_FOOTER_DISPLAYING_USER_EMAIL.png.sha1 index bfb92ac..3154db3 100644 --- a/ios/chrome/app/strings/ios_strings_grd/IDS_SAVE_PASSWORD_FOOTER_DISPLAYING_USER_EMAIL.png.sha1 +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_SAVE_PASSWORD_FOOTER_DISPLAYING_USER_EMAIL.png.sha1
@@ -1 +1 @@ -4d1fcabf1d28f26730edb4babaa3e5d0848de7a5 \ No newline at end of file +2c2572855d737e0739b2acc5f86baa71d71a90e6 \ No newline at end of file
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_check_manager.h b/ios/chrome/browser/passwords/ios_chrome_password_check_manager.h index 32fe4843..ef255ba 100644 --- a/ios/chrome/browser/passwords/ios_chrome_password_check_manager.h +++ b/ios/chrome/browser/passwords/ios_chrome_password_check_manager.h
@@ -74,6 +74,9 @@ return &saved_passwords_presenter_; } + // Mutes the provided compromised credential. + void MuteCredential(const password_manager::CredentialUIEntry& credential); + private: friend class base::RefCounted<IOSChromePasswordCheckManager>; friend class IOSChromePasswordCheckManagerProxy;
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_check_manager.mm b/ios/chrome/browser/passwords/ios_chrome_password_check_manager.mm index 0dd4f19..2cdea946 100644 --- a/ios/chrome/browser/passwords/ios_chrome_password_check_manager.mm +++ b/ios/chrome/browser/passwords/ios_chrome_password_check_manager.mm
@@ -233,3 +233,8 @@ observer.PasswordCheckStatusChanged(GetPasswordCheckState()); } } + +void IOSChromePasswordCheckManager::MuteCredential( + const CredentialUIEntry& credential) { + insecure_credentials_manager_.MuteCredential(credential); +}
diff --git a/ios/chrome/browser/policy/browser_policy_connector_ios.mm b/ios/chrome/browser/policy/browser_policy_connector_ios.mm index f88c6d2..00dd667 100644 --- a/ios/chrome/browser/policy/browser_policy_connector_ios.mm +++ b/ios/chrome/browser/policy/browser_policy_connector_ios.mm
@@ -18,6 +18,7 @@ #import "components/policy/core/common/cloud/machine_level_user_cloud_policy_manager.h" #import "components/policy/core/common/configuration_policy_provider.h" #import "components/policy/core/common/policy_loader_ios.h" +#import "components/policy/core/common/policy_logger.h" #import "ios/chrome/browser/policy/chrome_browser_cloud_management_controller_ios.h" #import "ios/chrome/browser/policy/device_management_service_configuration_ios.h" #import "services/network/public/cpp/shared_url_loader_factory.h" @@ -53,6 +54,9 @@ void BrowserPolicyConnectorIOS::Init( PrefService* local_state, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) { + if (policy::PolicyLogger::GetInstance()->IsPolicyLoggingEnabled()) { + policy::PolicyLogger::GetInstance()->EnableLogDeletion(); + } std::unique_ptr<policy::DeviceManagementService::Configuration> configuration( new policy::DeviceManagementServiceConfigurationIOS( GetDeviceManagementUrl(), GetRealtimeReportingUrl(),
diff --git a/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_coordinator.mm b/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_coordinator.mm index e63002629..7c70ca39 100644 --- a/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_coordinator.mm +++ b/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_coordinator.mm
@@ -57,6 +57,14 @@ #pragma mark - ChromeCoordinator - (void)start { + // If the bottom sheet has no suggestion to show, do not show the bottom + // sheet. Instead, re-focus the field which triggered the bottom sheet and + // disable it. + if (![self.mediator hasSuggestions]) { + [self.mediator refocus]; + return; + } + [self.baseViewController presentViewController:self.viewController animated:YES completion:nil];
diff --git a/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_mediator.h b/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_mediator.h index 74df955..5ed847b 100644 --- a/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_mediator.h +++ b/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_mediator.h
@@ -32,6 +32,9 @@ // Disconnects the mediator. - (void)disconnect; +// Whether the mediator has any suggestions for the user. +- (BOOL)hasSuggestions; + // The bottom sheet suggestions consumer. @property(nonatomic, strong) id<PasswordSuggestionBottomSheetConsumer> consumer;
diff --git a/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_mediator.mm b/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_mediator.mm index 2a62e829..86002a3 100644 --- a/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_mediator.mm +++ b/ios/chrome/browser/ui/passwords/bottom_sheet/password_suggestion_bottom_sheet_mediator.mm
@@ -116,11 +116,15 @@ _observer = nullptr; } +- (BOOL)hasSuggestions { + return [self.suggestions count] > 0; +} + #pragma mark - Accessors - (void)setConsumer:(id<PasswordSuggestionBottomSheetConsumer>)consumer { _consumer = consumer; - if ([self.suggestions count] > 0) { + if ([self hasSuggestions]) { [consumer setSuggestions:self.suggestions]; } else { [consumer dismiss];
diff --git a/ios/chrome/browser/ui/settings/password/password_details/BUILD.gn b/ios/chrome/browser/ui/settings/password/password_details/BUILD.gn index 98c401e..5fc3f01 100644 --- a/ios/chrome/browser/ui/settings/password/password_details/BUILD.gn +++ b/ios/chrome/browser/ui/settings/password/password_details/BUILD.gn
@@ -16,6 +16,7 @@ "password_details_coordinator_delegate.h", "password_details_mediator.h", "password_details_mediator.mm", + "password_details_mediator_delegate.h", ] deps = [ ":password_details_ui",
diff --git a/ios/chrome/browser/ui/settings/password/password_details/password_details_coordinator.mm b/ios/chrome/browser/ui/settings/password/password_details/password_details_coordinator.mm index e617eb6..4a1e179b 100644 --- a/ios/chrome/browser/ui/settings/password/password_details/password_details_coordinator.mm +++ b/ios/chrome/browser/ui/settings/password/password_details/password_details_coordinator.mm
@@ -34,6 +34,7 @@ #import "ios/chrome/browser/ui/settings/password/password_details/password_details_coordinator_delegate.h" #import "ios/chrome/browser/ui/settings/password/password_details/password_details_handler.h" #import "ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.h" +#import "ios/chrome/browser/ui/settings/password/password_details/password_details_mediator_delegate.h" #import "ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller.h" #import "ios/chrome/browser/ui/settings/utils/password_utils.h" #import "ios/chrome/browser/web_state_list/web_state_list.h" @@ -45,7 +46,8 @@ #error "This file requires ARC support." #endif -@interface PasswordDetailsCoordinator () <PasswordDetailsHandler> { +@interface PasswordDetailsCoordinator () <PasswordDetailsHandler, + PasswordDetailsMediatorDelegate> { password_manager::AffiliatedGroup _affiliatedGroup; password_manager::CredentialUIEntry _credential; @@ -143,7 +145,8 @@ .get() prefService:browserState->GetPrefs() syncService:SyncServiceFactory::GetForBrowserState(browserState) - context:_context]; + context:_context + delegate:self]; self.mediator.consumer = self.viewController; self.viewController.handler = self; self.viewController.delegate = self.mediator; @@ -350,4 +353,35 @@ [self.baseNavigationController popViewControllerAnimated:YES]; } +#pragma mark - PasswordDetailsMediatorDelegate + +- (void)showDismissWarningDialogWithPasswordDetails:(PasswordDetails*)password { + NSString* title = l10n_util::GetNSString(IDS_IOS_DISMISS_WARNING); + NSString* message = + l10n_util::GetNSString(IDS_IOS_DISMISS_WARNING_DIALOG_MESSAGE); + self.alertCoordinator = + [[AlertCoordinator alloc] initWithBaseViewController:self.viewController + browser:self.browser + title:title + message:message]; + + NSString* cancelButtonText = l10n_util::GetNSString(IDS_CANCEL); + [self.alertCoordinator addItemWithTitle:cancelButtonText + action:nil + style:UIAlertActionStyleDefault]; + + NSString* dismissButtonText = + l10n_util::GetNSString(IDS_IOS_DISMISS_WARNING_DIALOG_DISMISS_BUTTON); + __weak __typeof(self.mediator) weakMediator = self.mediator; + [self.alertCoordinator + addItemWithTitle:dismissButtonText + action:^{ + [weakMediator didConfirmWarningDismissalForPassword:password]; + } + style:UIAlertActionStyleDefault + preferred:YES + enabled:YES]; + [self.alertCoordinator start]; +} + @end
diff --git a/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.h b/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.h index f64e7c9..e2e85744a 100644 --- a/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.h +++ b/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.h
@@ -20,9 +20,9 @@ } // namespace syncer class PrefService; - class IOSChromePasswordCheckManager; @protocol PasswordDetailsConsumer; +@protocol PasswordDetailsMediatorDelegate; // This mediator fetches and organises the credentials for its consumer. @interface PasswordDetailsMediator @@ -31,14 +31,16 @@ // Vector of CredentialUIEntry is converted to an array of PasswordDetails and // passed to a consumer with the display name (title) for the Password Details // view. -- (instancetype) - initWithPasswords: - (const std::vector<password_manager::CredentialUIEntry>&)credentials - displayName:(NSString*)displayName - passwordCheckManager:(IOSChromePasswordCheckManager*)manager - prefService:(PrefService*)prefService - syncService:(syncer::SyncService*)syncService - context:(DetailsContext)context NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithPasswords: + (const std::vector<password_manager::CredentialUIEntry>&) + credentials + displayName:(NSString*)displayName + passwordCheckManager:(IOSChromePasswordCheckManager*)manager + prefService:(PrefService*)prefService + syncService:(syncer::SyncService*)syncService + context:(DetailsContext)context + delegate:(id<PasswordDetailsMediatorDelegate>)delegate + NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; @@ -64,6 +66,9 @@ // different password, NO otherwise. - (BOOL)hasPasswordConflictInAccount:(PasswordDetails*)password; +// Dismisses the compromised credential warning. +- (void)didConfirmWarningDismissalForPassword:(PasswordDetails*)password; + @end #endif // IOS_CHROME_BROWSER_UI_SETTINGS_PASSWORD_PASSWORD_DETAILS_PASSWORD_DETAILS_MEDIATOR_H_
diff --git a/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.mm b/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.mm index 5163e562..d9c3addba 100644 --- a/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.mm +++ b/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator.mm
@@ -28,6 +28,7 @@ #import "ios/chrome/browser/ui/settings/password/password_checkup/password_checkup_utils.h" #import "ios/chrome/browser/ui/settings/password/password_details/password_details.h" #import "ios/chrome/browser/ui/settings/password/password_details/password_details_consumer.h" +#import "ios/chrome/browser/ui/settings/password/password_details/password_details_mediator_delegate.h" #import "ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_delegate.h" #if !defined(__has_feature) || !__has_feature(objc_arc) @@ -70,6 +71,11 @@ } } +bool SupportsMuteOperation(password_manager::InsecureType insecure_type) { + return (insecure_type == password_manager::InsecureType::kLeaked || + insecure_type == password_manager::InsecureType::kPhished); +} + } // namespace @interface PasswordDetailsMediator () < @@ -92,6 +98,9 @@ // The sync service. raw_ptr<syncer::SyncService> _syncService; + + // Delegate for this mediator. + id<PasswordDetailsMediatorDelegate> _delegate; } // Dictionary of usernames of a same domain. Key: domain and value: NSSet of @@ -107,13 +116,14 @@ @implementation PasswordDetailsMediator -- (instancetype)initWithPasswords: - (const std::vector<CredentialUIEntry>&)credentials - displayName:(NSString*)displayName - passwordCheckManager:(IOSChromePasswordCheckManager*)manager - prefService:(PrefService*)prefService - syncService:(syncer::SyncService*)syncService - context:(DetailsContext)context { +- (instancetype) + initWithPasswords:(const std::vector<CredentialUIEntry>&)credentials + displayName:(NSString*)displayName + passwordCheckManager:(IOSChromePasswordCheckManager*)manager + prefService:(PrefService*)prefService + syncService:(syncer::SyncService*)syncService + context:(DetailsContext)context + delegate:(id<PasswordDetailsMediatorDelegate>)delegate { DCHECK(manager); DCHECK(!credentials.empty()); @@ -130,6 +140,7 @@ _context = context; _prefService = prefService; _syncService = syncService; + _delegate = delegate; // TODO(crbug.com/1400692): Improve saved passwords logic when helper is // available in SavedPasswordsPresenter. @@ -230,7 +241,9 @@ } it->stored_in = {password_manager::PasswordForm::Store::kAccountStore}; - _manager->GetSavedPasswordsPresenter()->MoveCredentialsToAccount({*it}); + _manager->GetSavedPasswordsPresenter()->MoveCredentialsToAccount( + {*it}, password_manager::metrics_util::MoveToAccountStoreTrigger:: + kExplicitlyTriggeredInSettings); [self providePasswordsToConsumer]; } @@ -256,6 +269,37 @@ return [self conflictingAccountPassword:password].has_value(); } +- (void)didConfirmWarningDismissalForPassword:(PasswordDetails*)password { + // Map from PasswordDetails to CredentialUIEntry. + auto it = base::ranges::find_if( + _credentials, + [password](const password_manager::CredentialUIEntry& credential) { + return MatchesRealmUsernameAndPassword(password, credential); + }); + + if (it == _credentials.end()) { + return; + } + + _manager->MuteCredential(*it); + + // TODO(crbug.com/1359392). Once kPasswordsGrouping launches, the mediator + // should update the passwords model and receive the updates via + // SavedPasswordsPresenterObserver, instead of replicating the updates to its + // own copy and calling [self providePasswordsToConsumer:]. Today when the + // flag is disabled and the password is edited, it's impossible to identify + // the new object to show (sign-on realm can't be used as an id, there might + // be multiple credentials; nor username/password since the values changed). + // The lines below should be removed once this is fixed. + for (auto& password_issue : it->password_issues) { + if (!password_issue.second.is_muted.value() && + SupportsMuteOperation(password_issue.first)) { + password_issue.second.is_muted = password_manager::IsMuted(true); + } + } + [self providePasswordsToConsumer]; +} + #pragma mark - PasswordDetailsTableViewControllerDelegate - (void)passwordDetailsViewController: @@ -355,6 +399,11 @@ containsObject:newUsername]; } +- (void)dismissWarningForPassword:(PasswordDetails*)password { + // Show confirmation dialog. + [_delegate showDismissWarningDialogWithPasswordDetails:password]; +} + #pragma mark - PasswordCheckObserver - (void)passwordCheckStateDidChange:(PasswordCheckState)state {
diff --git a/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator_delegate.h b/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator_delegate.h new file mode 100644 index 0000000..0eaf935 --- /dev/null +++ b/ios/chrome/browser/ui/settings/password/password_details/password_details_mediator_delegate.h
@@ -0,0 +1,16 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_CHROME_BROWSER_UI_SETTINGS_PASSWORD_PASSWORD_DETAILS_PASSWORD_DETAILS_MEDIATOR_DELEGATE_H_ +#define IOS_CHROME_BROWSER_UI_SETTINGS_PASSWORD_PASSWORD_DETAILS_PASSWORD_DETAILS_MEDIATOR_DELEGATE_H_ + +// Delegate for the PasswordDetailsMediator. +@protocol PasswordDetailsMediatorDelegate + +// Called when the user wants to dismiss a compromised credential warning. +- (void)showDismissWarningDialogWithPasswordDetails:(PasswordDetails*)password; + +@end + +#endif // IOS_CHROME_BROWSER_UI_SETTINGS_PASSWORD_PASSWORD_DETAILS_PASSWORD_DETAILS_MEDIATOR_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_constants.h b/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_constants.h index 93fc1947..1ae4b0c 100644 --- a/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_constants.h +++ b/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_constants.h
@@ -26,6 +26,7 @@ PasswordDetailsItemTypeFederation, PasswordDetailsItemTypeChangePasswordButton, PasswordDetailsItemTypeChangePasswordRecommendation, + PasswordDetailsItemTypeDismissWarningButton, PasswordDetailsItemTypeDeleteButton, PasswordDetailsItemTypeMoveToAccountButton, PasswordDetailsItemTypeMoveToAccountRecommendation,
diff --git a/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller.mm b/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller.mm index b0fa179..64325f7a 100644 --- a/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller.mm
@@ -91,11 +91,24 @@ const int kMinNoteCharAmountForWarning = 901; // Returns the index of a password in the `passwords` array. -int GetPasswordIndex(int section) { +NSUInteger GetPasswordIndex(NSUInteger section) { // Only one password at position 0 shows if no grouping applied. return IsPasswordGroupingEnabled() ? section : 0; } +// Returns true if the "Dismiss Warning" button should be shown. +bool ShouldAllowToDismissWarning(DetailsContext context) { + switch (context) { + case DetailsContext::kGeneral: + case DetailsContext::kCompromisedIssues: + return password_manager::features::IsPasswordCheckupEnabled(); + case DetailsContext::kDismissedWarnings: + case DetailsContext::kReusedIssues: + case DetailsContext::kWeakIssues: + return false; + } +} + } // namespace #pragma mark - PasswordDetailsInfoItem @@ -397,6 +410,17 @@ return item; } +- (TableViewTextItem*)dismissWarningItem { + TableViewTextItem* item = [[TableViewTextItem alloc] + initWithType:PasswordDetailsItemTypeDismissWarningButton]; + item.text = l10n_util::GetNSString(IDS_IOS_DISMISS_WARNING); + item.textColor = self.tableView.editing + ? [UIColor colorNamed:kTextSecondaryColor] + : [UIColor colorNamed:kBlueColor]; + item.accessibilityTraits = UIAccessibilityTraitButton; + return item; +} + - (TableViewTextItem*)deleteButtonItemForPasswordDetails: (PasswordDetails*)passwordDetails { TableViewTextItem* item = [[TableViewTextItem alloc] @@ -520,6 +544,15 @@ [textFieldCell.textView becomeFirstResponder]; break; } + case PasswordDetailsItemTypeDismissWarningButton: + if (!self.tableView.editing) { + [self didTapDismissWarningButtonAtPasswordIndex:GetPasswordIndex( + indexPath.section)]; + [self.tableView + deselectRowAtIndexPath:self.tableView.indexPathForSelectedRow + animated:YES]; + } + break; case PasswordDetailsItemTypeDeleteButton: if (self.tableView.editing) { UITableViewCell* cell = @@ -681,6 +714,7 @@ case PasswordDetailsItemTypeWebsite: case PasswordDetailsItemTypeFederation: case PasswordDetailsItemTypeChangePasswordButton: + case PasswordDetailsItemTypeDismissWarningButton: case PasswordDetailsItemTypeDeleteButton: break; } @@ -976,6 +1010,7 @@ case PasswordDetailsItemTypeFederation: case PasswordDetailsItemTypeChangePasswordButton: case PasswordDetailsItemTypeChangePasswordRecommendation: + case PasswordDetailsItemTypeDismissWarningButton: case PasswordDetailsItemTypeDeleteButton: case PasswordDetailsItemTypeMoveToAccountButton: case PasswordDetailsItemTypeMoveToAccountRecommendation: @@ -1192,6 +1227,11 @@ [model addItem:[self changePasswordItem] toSectionWithIdentifier:sectionForCompromisedInfo]; } + + if (ShouldAllowToDismissWarning(passwordDetails.context)) { + [model addItem:[self dismissWarningItem] + toSectionWithIdentifier:sectionForCompromisedInfo]; + } } break; } @@ -1411,10 +1451,16 @@ } } +- (void)didTapDismissWarningButtonAtPasswordIndex:(NSUInteger)passwordIndex { + CHECK(passwordIndex >= 0 && passwordIndex < self.passwords.count); + CHECK(self.delegate); + [self.delegate dismissWarningForPassword:self.passwords[passwordIndex]]; +} + - (void)didTapDeleteButton:(UITableViewCell*)cell - atPasswordIndex:(int)passwordIndex { - DCHECK(passwordIndex >= 0); - DCHECK(self.handler); + atPasswordIndex:(NSUInteger)passwordIndex { + CHECK(passwordIndex >= 0 && passwordIndex < self.passwords.count); + CHECK(self.handler); [self.handler showPasswordDeleteDialogWithPasswordDetails:self.passwords[passwordIndex] anchorView:cell];
diff --git a/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_delegate.h b/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_delegate.h index 67dccf2..873d90b1 100644 --- a/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_delegate.h +++ b/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_delegate.h
@@ -51,6 +51,10 @@ // Checks if the username is reused for the same domain. - (BOOL)isUsernameReused:(NSString*)newUsername forDomain:(NSString*)domain; +// Called by the view controller when the user wants to dismiss a compromised +// password warning. +- (void)dismissWarningForPassword:(PasswordDetails*)password; + @end #endif // IOS_CHROME_BROWSER_UI_SETTINGS_PASSWORD_PASSWORD_DETAILS_PASSWORD_DETAILS_TABLE_VIEW_CONTROLLER_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_unittest.mm b/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_unittest.mm index 861fb2e24..3d56cf42 100644 --- a/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_unittest.mm +++ b/ios/chrome/browser/ui/settings/password/password_details/password_details_table_view_controller_unittest.mm
@@ -108,6 +108,8 @@ @property(nonatomic, strong) PasswordDetails* password; +@property(nonatomic, assign) BOOL dismissWarningCalled; + @end @implementation FakePasswordDetailsDelegate @@ -154,6 +156,10 @@ return NO; } +- (void)dismissWarningForPassword:(PasswordDetails*)password { + self.dismissWarningCalled = YES; +} + @end @interface FakeSnackbarImplementation : NSObject <SnackbarCommands> @@ -538,8 +544,15 @@ CheckEditCellText(kMaskedPassword, 1, 1); } -// Tests that compromised password is displayed properly. -TEST_F(PasswordDetailsTableViewControllerTest, TestCompromisedPassword) { +// Tests that compromised password is displayed properly when +// kIOSPasswordCheckup feature is disabled. +TEST_F(PasswordDetailsTableViewControllerTest, + TestCompromisedPasswordWithoutKIOSPasswordCheckup) { + // Disable Password Checkup feature. + base::test::ScopedFeatureList feature_list; + feature_list.InitAndDisableFeature( + password_manager::features::kIOSPasswordCheckup); + SetPassword(kExampleCom, kUsername, kPassword, kNote, true); EXPECT_EQ(3, NumberOfSections()); EXPECT_EQ(1, NumberOfItemsInSection(0)); @@ -554,17 +567,41 @@ CheckTextCellTextWithId(IDS_IOS_CHANGE_COMPROMISED_PASSWORD, 2, 1); } -// Tests the “Change Password on Website” button +// Tests that compromised password is displayed properly when +// kIOSPasswordCheckup feature is enabled. +TEST_F(PasswordDetailsTableViewControllerTest, + TestCompromisedPasswordWithKIOSPasswordCheckup) { + // Enable Password Checkup feature. + base::test::ScopedFeatureList feature_list( + password_manager::features::kIOSPasswordCheckup); + + SetPassword(kExampleCom, kUsername, kPassword, kNote, true); + EXPECT_EQ(3, NumberOfSections()); + EXPECT_EQ(1, NumberOfItemsInSection(0)); + EXPECT_EQ(2, NumberOfItemsInSection(1)); + EXPECT_EQ(3, NumberOfItemsInSection(2)); + CheckStackedDetailsCellDetails(@[ @"http://www.example.com/" ], 0, 0); + CheckEditCellText(@"test@egmail.com", 1, 0); + CheckEditCellText(kMaskedPassword, 1, 1); + + CheckDetailItemTextWithId( + IDS_IOS_CHANGE_COMPROMISED_PASSWORD_DESCRIPTION_BRANDED, 2, 0); + CheckTextCellTextWithId(IDS_IOS_CHANGE_COMPROMISED_PASSWORD, 2, 1); + + CheckTextCellTextWithId(IDS_IOS_DISMISS_WARNING, 2, 2); +} + +// Tests the “Change Password on Website” button. TEST_P(PasswordGroupingTest, TestChangePasswordOnWebsite) { SetPassword(kExampleCom, kUsername, kPassword, kNote, true); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); id applicationCommandsMock = OCMProtocolMock(@protocol(ApplicationCommands)); - passwordDetails.applicationCommandsHandler = applicationCommandsMock; + password_details.applicationCommandsHandler = applicationCommandsMock; - TableViewModel* model = passwordDetails.tableViewModel; + TableViewModel* model = password_details.tableViewModel; NSIndexPath* indexPath = [model indexPathForItemType:PasswordDetailsItemTypeChangePasswordButton]; @@ -577,11 +614,34 @@ return (((OpenNewTabCommand*)value).URL.spec().find(kExampleCom) != std::string::npos); }]]); - [passwordDetails tableView:passwordDetails.tableView + [password_details tableView:password_details.tableView didSelectRowAtIndexPath:indexPath]; EXPECT_OCMOCK_VERIFY(applicationCommandsMock); } +// Tests the “Dismiss Warning” button. kIOSPasswordCheckup feature needs to be +// enabled. +TEST_F(PasswordDetailsTableViewControllerTest, TestDismissWarning) { + // Enable Password Checkup feature. + base::test::ScopedFeatureList feature_list( + password_manager::features::kIOSPasswordCheckup); + + SetPassword(kExampleCom, kUsername, kPassword, kNote, true); + PasswordDetailsTableViewController* password_details = + base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( + controller()); + + EXPECT_FALSE(delegate().dismissWarningCalled); + + TableViewModel* model = password_details.tableViewModel; + NSIndexPath* indexPath = + [model indexPathForItemType:PasswordDetailsItemTypeDismissWarningButton]; + [password_details tableView:password_details.tableView + didSelectRowAtIndexPath:indexPath]; + + EXPECT_TRUE(delegate().dismissWarningCalled); +} + // Tests that password is shown/hidden. TEST_F(PasswordDetailsTableViewControllerTest, TestShowHidePassword) { SetPassword(); @@ -636,16 +696,16 @@ CheckEditCellText(kMaskedPassword, 1, 1); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails editButtonPressed]; - EXPECT_TRUE(passwordDetails.tableView.editing); + [password_details editButtonPressed]; + EXPECT_TRUE(password_details.tableView.editing); CheckEditCellText(@"test", 1, 1); - [passwordDetails editButtonPressed]; - EXPECT_FALSE(passwordDetails.tableView.editing); + [password_details editButtonPressed]; + EXPECT_FALSE(password_details.tableView.editing); CheckEditCellText(kMaskedPassword, 1, 1); } @@ -656,11 +716,11 @@ CheckEditCellText(kMaskedPassword, 1, 1); reauth().expectedResult = ReauthenticationResult::kFailure; - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails editButtonPressed]; - EXPECT_FALSE(passwordDetails.tableView.editing); + [password_details editButtonPressed]; + EXPECT_FALSE(password_details.tableView.editing); CheckEditCellText(kMaskedPassword, 1, 1); } @@ -669,13 +729,13 @@ SetPassword(); EXPECT_FALSE(handler().deletionCalled); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails editButtonPressed]; + [password_details editButtonPressed]; [[UIApplication sharedApplication] - sendAction:passwordDetails.deleteButton.action - to:passwordDetails.deleteButton.target + sendAction:password_details.deleteButton.action + to:password_details.deleteButton.target from:nil forEvent:nil]; EXPECT_TRUE(handler().deletionCalled); @@ -687,13 +747,13 @@ SetPassword(kExampleCom, kUsername, kPassword, kNote, true); EXPECT_FALSE(handler().deletionCalled); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails editButtonPressed]; + [password_details editButtonPressed]; [[UIApplication sharedApplication] - sendAction:passwordDetails.deleteButton.action - to:passwordDetails.deleteButton.target + sendAction:password_details.deleteButton.action + to:password_details.deleteButton.target from:nil forEvent:nil]; EXPECT_TRUE(handler().deletionCalled); @@ -704,48 +764,53 @@ TEST_F(PasswordDetailsTableViewControllerTest, TestEditPasswordConfirmed) { SetPassword(); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails editButtonPressed]; + [password_details editButtonPressed]; EXPECT_FALSE(handler().editingCalled); EXPECT_FALSE(delegate().password); - EXPECT_TRUE(passwordDetails.tableView.editing); + EXPECT_TRUE(password_details.tableView.editing); SetEditCellText(@"new_password", 1, 1); - [passwordDetails editButtonPressed]; + [password_details editButtonPressed]; EXPECT_TRUE(handler().editingCalled); - [passwordDetails passwordEditingConfirmed]; + [password_details passwordEditingConfirmed]; EXPECT_TRUE(delegate().password); EXPECT_NSEQ(@"new_password", delegate().password.password); - EXPECT_FALSE(passwordDetails.tableView.editing); + EXPECT_FALSE(password_details.tableView.editing); } // Tests password editing. User cancelled this action. TEST_F(PasswordDetailsTableViewControllerTest, TestEditPasswordCancel) { SetPassword(); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails editButtonPressed]; + [password_details editButtonPressed]; EXPECT_FALSE(delegate().password); - EXPECT_TRUE(passwordDetails.tableView.editing); + EXPECT_TRUE(password_details.tableView.editing); SetEditCellText(@"new_password", 1, 1); - [passwordDetails editButtonPressed]; + [password_details editButtonPressed]; EXPECT_FALSE(delegate().password); - EXPECT_TRUE(passwordDetails.tableView.editing); + EXPECT_TRUE(password_details.tableView.editing); } // Tests android compromised credential is displayed without change password -// button. +// button when kIOSPasswordCheckup feature is disabled. TEST_F(PasswordDetailsTableViewControllerTest, - TestAndroidCompromisedCredential) { + TestAndroidCompromisedCredentialWithoutKIOSPasswordCheckup) { + // Disable Password Checkup feature. + base::test::ScopedFeatureList feature_list; + feature_list.InitAndDisableFeature( + password_manager::features::kIOSPasswordCheckup); + SetPassword(kAndroid, kUsername, kPassword, kNote, true); EXPECT_EQ(3, NumberOfSections()); @@ -761,6 +826,31 @@ IDS_IOS_CHANGE_COMPROMISED_PASSWORD_DESCRIPTION_BRANDED, 2, 0); } +// Tests android compromised credential is displayed without change password +// button when kIOSPasswordCheckup feature is enabled. +TEST_F(PasswordDetailsTableViewControllerTest, + TestAndroidCompromisedCredentialWithKIOSPasswordCheckup) { + // Enable Password Checkup feature. + base::test::ScopedFeatureList feature_list( + password_manager::features::kIOSPasswordCheckup); + + SetPassword(kAndroid, kUsername, kPassword, kNote, true); + + EXPECT_EQ(3, NumberOfSections()); + EXPECT_EQ(1, NumberOfItemsInSection(0)); + EXPECT_EQ(2, NumberOfItemsInSection(1)); + EXPECT_EQ(2, NumberOfItemsInSection(2)); + + CheckStackedDetailsCellDetails(@[ @"com.example.my.app" ], 0, 0); + CheckEditCellText(@"test@egmail.com", 1, 0); + CheckEditCellText(kMaskedPassword, 1, 1); + + CheckDetailItemTextWithId( + IDS_IOS_CHANGE_COMPROMISED_PASSWORD_DESCRIPTION_BRANDED, 2, 0); + + CheckTextCellTextWithId(IDS_IOS_DISMISS_WARNING, 2, 1); +} + // Tests federated credential is shown without password value and editing // doesn't require reauth. TEST_F(PasswordDetailsTableViewControllerTest, TestFederatedCredential) { @@ -775,11 +865,11 @@ CheckEditCellText(@"www.example.com", 1, 1); reauth().expectedResult = ReauthenticationResult::kFailure; - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails editButtonPressed]; - EXPECT_TRUE(passwordDetails.tableView.editing); + [password_details editButtonPressed]; + EXPECT_TRUE(password_details.tableView.editing); } // Tests blocked website is shown without password and username values and @@ -794,11 +884,11 @@ CheckStackedDetailsCellDetails(@[ @"http://www.example.com/" ], 0, 0); reauth().expectedResult = ReauthenticationResult::kFailure; - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails editButtonPressed]; - EXPECT_TRUE(passwordDetails.tableView.editing); + [password_details editButtonPressed]; + EXPECT_TRUE(password_details.tableView.editing); } // Tests copy website works as intended. @@ -840,16 +930,16 @@ TEST_F(PasswordDetailsTableViewControllerTest, CopyUsername) { base::HistogramTester histogram_tester; SetPassword(); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails tableView:passwordDetails.tableView + [password_details tableView:password_details.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1]]; UIMenuController* menu = [UIMenuController sharedMenuController]; EXPECT_EQ(1u, menu.menuItems.count); - [passwordDetails copyPasswordDetails:menu]; + [password_details copyPasswordDetails:menu]; UIPasteboard* generalPasteboard = [UIPasteboard generalPasteboard]; EXPECT_NSEQ(@"test@egmail.com", generalPasteboard.string); @@ -869,16 +959,16 @@ base::HistogramTester histogram_tester; SetPassword(); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); - [passwordDetails tableView:passwordDetails.tableView + [password_details tableView:password_details.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]]; UIMenuController* menu = [UIMenuController sharedMenuController]; EXPECT_EQ(1u, menu.menuItems.count); - [passwordDetails copyPasswordDetails:menu]; + [password_details copyPasswordDetails:menu]; EXPECT_TRUE(handler().passwordCopiedByUserCalled); @@ -900,17 +990,17 @@ base::HistogramTester histogram_tester; SetPassword(); - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); reauth().expectedResult = ReauthenticationResult::kFailure; - [passwordDetails tableView:passwordDetails.tableView + [password_details tableView:password_details.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]]; UIMenuController* menu = [UIMenuController sharedMenuController]; EXPECT_EQ(1u, menu.menuItems.count); - [passwordDetails copyPasswordDetails:menu]; + [password_details copyPasswordDetails:menu]; EXPECT_NSEQ( l10n_util::GetNSString(IDS_IOS_SETTINGS_PASSWORD_WAS_NOT_COPIED_MESSAGE), @@ -927,13 +1017,13 @@ TEST_F(PasswordDetailsTableViewControllerTest, CopyDetailsFailedEmitted) { base::HistogramTester histogram_tester; - PasswordDetailsTableViewController* passwordDetails = + PasswordDetailsTableViewController* password_details = base::mac::ObjCCastStrict<PasswordDetailsTableViewController>( controller()); // When no menu controller is passed, there's no way of knowing which field // should be copied to the pasteboard and thus copying should fail. - [passwordDetails copyPasswordDetails:nil]; + [password_details copyPasswordDetails:nil]; // Verify that the error histogram was emitted to the failure bucket. histogram_tester.ExpectUniqueSample(
diff --git a/ios/chrome/browser/ui/settings/password/password_issues/password_issues_table_view_controller.mm b/ios/chrome/browser/ui/settings/password/password_issues/password_issues_table_view_controller.mm index 31f73461..5b695d0 100644 --- a/ios/chrome/browser/ui/settings/password/password_issues/password_issues_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/password/password_issues/password_issues_table_view_controller.mm
@@ -216,7 +216,7 @@ return item; } -// Creates the item acting as a buton for presenting dismissed compromised +// Creates the item acting as a button for presenting dismissed compromised // credential warnings. Returns nil when `_dismissedWarningsButtonText` is nil. - (TableViewTextItem*)dismissedWarningsItem { // The button is not visible either because there aren't dismissed compromised
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc index b40122f..aaec091 100644 --- a/media/base/media_switches.cc +++ b/media/base/media_switches.cc
@@ -1110,7 +1110,7 @@ // Enables software rate controller encoding acceleration for Windows. const base::Feature MEDIA_EXPORT kMediaFoundationUseSoftwareRateCtrl{ - "MediaFoundationUseSoftwareRateCtrl", base::FEATURE_DISABLED_BY_DEFAULT}; + "MediaFoundationUseSoftwareRateCtrl", base::FEATURE_ENABLED_BY_DEFAULT}; // Enables MediaFoundation based video capture BASE_FEATURE(kMediaFoundationVideoCapture,
diff --git a/media/base/wall_clock_time_source.cc b/media/base/wall_clock_time_source.cc index 7feca1f..7fab242e 100644 --- a/media/base/wall_clock_time_source.cc +++ b/media/base/wall_clock_time_source.cc
@@ -9,9 +9,10 @@ namespace media { WallClockTimeSource::WallClockTimeSource() - : tick_clock_(base::DefaultTickClock::GetInstance()), - ticking_(false), - playback_rate_(1.0) {} + : tick_clock_(base::DefaultTickClock::GetInstance()) {} + +WallClockTimeSource::WallClockTimeSource(const base::TickClock* tick_clock) + : tick_clock_(tick_clock) {} WallClockTimeSource::~WallClockTimeSource() = default; @@ -81,12 +82,6 @@ return playback_rate_ && ticking_; } -void WallClockTimeSource::SetTickClockForTesting( - const base::TickClock* tick_clock) { - base::AutoLock auto_lock(lock_); - tick_clock_ = tick_clock; -} - base::TimeDelta WallClockTimeSource::CurrentMediaTime_Locked() { lock_.AssertAcquired(); if (!ticking_ || !playback_rate_)
diff --git a/media/base/wall_clock_time_source.h b/media/base/wall_clock_time_source.h index bfe13c3..785e355 100644 --- a/media/base/wall_clock_time_source.h +++ b/media/base/wall_clock_time_source.h
@@ -34,20 +34,24 @@ const std::vector<base::TimeDelta>& media_timestamps, std::vector<base::TimeTicks>* wall_clock_times) override; - void SetTickClockForTesting(const base::TickClock* tick_clock); - private: + friend class VideoRendererAlgorithmTest; + friend class VideoRendererImplTest; + friend class WallClockTimeSourceTest; + + // Construct a time source with an alternate clock for testing. + explicit WallClockTimeSource(const base::TickClock* tick_clock); + base::TimeDelta CurrentMediaTime_Locked() EXCLUSIVE_LOCKS_REQUIRED(lock_); - // Allow for an injectable tick clock for testing. - raw_ptr<const base::TickClock> tick_clock_ GUARDED_BY(lock_); + const raw_ptr<const base::TickClock> tick_clock_; - bool ticking_ GUARDED_BY(lock_); + bool ticking_ GUARDED_BY(lock_) = false; // While ticking we can interpolate the current media time by measuring the // delta between our reference ticks and the current system ticks and scaling // that time by the playback rate. - double playback_rate_ GUARDED_BY(lock_); + double playback_rate_ GUARDED_BY(lock_) = 1.0; base::TimeDelta base_timestamp_ GUARDED_BY(lock_); base::TimeTicks reference_time_ GUARDED_BY(lock_);
diff --git a/media/base/wall_clock_time_source_unittest.cc b/media/base/wall_clock_time_source_unittest.cc index 7335ffcea..d66420e2 100644 --- a/media/base/wall_clock_time_source_unittest.cc +++ b/media/base/wall_clock_time_source_unittest.cc
@@ -13,8 +13,9 @@ class WallClockTimeSourceTest : public testing::Test { public: - WallClockTimeSourceTest() : tick_clock_(new base::SimpleTestTickClock()) { - time_source_.SetTickClockForTesting(tick_clock_.get()); + WallClockTimeSourceTest() + : tick_clock_(new base::SimpleTestTickClock()), + time_source_(tick_clock_.get()) { AdvanceTimeInSeconds(1); } @@ -57,8 +58,8 @@ } protected: - WallClockTimeSource time_source_; std::unique_ptr<base::SimpleTestTickClock> tick_clock_; + WallClockTimeSource time_source_; }; TEST_F(WallClockTimeSourceTest, InitialTimeIsZero) {
diff --git a/media/filters/video_renderer_algorithm_unittest.cc b/media/filters/video_renderer_algorithm_unittest.cc index 030055d..a825a7f 100644 --- a/media/filters/video_renderer_algorithm_unittest.cc +++ b/media/filters/video_renderer_algorithm_unittest.cc
@@ -74,13 +74,13 @@ public: VideoRendererAlgorithmTest() : tick_clock_(std::make_unique<base::SimpleTestTickClock>()), + time_source_(tick_clock_.get()), algorithm_(base::BindRepeating(&WallClockTimeSource::GetWallClockTimes, base::Unretained(&time_source_)), &media_log_) { // Always start the TickClock at a non-zero value since null values have // special connotations. tick_clock_->Advance(base::Microseconds(10000)); - time_source_.SetTickClockForTesting(tick_clock_.get()); } VideoRendererAlgorithmTest(const VideoRendererAlgorithmTest&) = delete;
diff --git a/media/fuchsia/video/fuchsia_video_decoder.cc b/media/fuchsia/video/fuchsia_video_decoder.cc index 34d78313..9285966 100644 --- a/media/fuchsia/video/fuchsia_video_decoder.cc +++ b/media/fuchsia/video/fuchsia_video_decoder.cc
@@ -121,7 +121,7 @@ mailbox_ = raster_context_provider_->SharedImageInterface()->CreateSharedImage( gmb.get(), nullptr, color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, usage); + kPremul_SkAlphaType, usage, "FuchsiaVideoDecoder"); create_sync_token_ = raster_context_provider_->SharedImageInterface() ->GenVerifiedSyncToken(); }
diff --git a/media/fuchsia/video/fuchsia_video_decoder_unittest.cc b/media/fuchsia/video/fuchsia_video_decoder_unittest.cc index fe4ae66d..a331cfc 100644 --- a/media/fuchsia/video/fuchsia_video_decoder_unittest.cc +++ b/media/fuchsia/video/fuchsia_video_decoder_unittest.cc
@@ -108,6 +108,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gpu::SurfaceHandle surface_handle) override { ADD_FAILURE(); return gpu::Mailbox(); @@ -120,6 +121,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, base::span<const uint8_t> pixel_data) override { ADD_FAILURE(); return gpu::Mailbox(); @@ -132,6 +134,7 @@ GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, uint32_t usage, + base::StringPiece debug_label, gfx::GpuMemoryBufferHandle buffer_handle) override { ADD_FAILURE(); return gpu::Mailbox(); @@ -144,7 +147,8 @@ const gfx::ColorSpace& color_space, GrSurfaceOrigin surface_origin, SkAlphaType alpha_type, - uint32_t usage) override { + uint32_t usage, + base::StringPiece debug_label) override { gfx::GpuMemoryBufferHandle handle = gpu_memory_buffer->CloneHandle(); CHECK_EQ(handle.type, gfx::GpuMemoryBufferType::NATIVE_PIXMAP);
diff --git a/media/gpu/chromeos/mailbox_video_frame_converter.cc b/media/gpu/chromeos/mailbox_video_frame_converter.cc index c9a2d78..55d9d34d 100644 --- a/media/gpu/chromeos/mailbox_video_frame_converter.cc +++ b/media/gpu/chromeos/mailbox_video_frame_converter.cc
@@ -68,7 +68,7 @@ if (!shared_image_stub->CreateSharedImage( mailbox, std::move(handle), format, plane, size, color_space, - surface_origin, alpha_type, usage)) { + surface_origin, alpha_type, usage, "MailboxVideoFrameConverter")) { return base::NullCallback(); }
diff --git a/media/gpu/mac/vt_video_decode_accelerator_mac.cc b/media/gpu/mac/vt_video_decode_accelerator_mac.cc index d79a289..ea7c4ba 100644 --- a/media/gpu/mac/vt_video_decode_accelerator_mac.cc +++ b/media/gpu/mac/vt_video_decode_accelerator_mac.cc
@@ -2290,15 +2290,17 @@ gpu::Mailbox mailbox = gpu::Mailbox::GenerateForSharedImage(); bool success; + constexpr char kDebugLabel[] = "VTVideoDecodeAccelerator"; if (IsMultiPlaneFormatForHardwareVideoEnabled()) { success = shared_image_stub->CreateSharedImage( mailbox, std::move(handle), si_format_, frame_size, color_space, - kTopLeft_GrSurfaceOrigin, kOpaque_SkAlphaType, shared_image_usage); + kTopLeft_GrSurfaceOrigin, kOpaque_SkAlphaType, shared_image_usage, + kDebugLabel); } else { success = shared_image_stub->CreateSharedImage( mailbox, std::move(handle), ToBufferFormat(si_format_), planes[plane], frame_size, color_space, kTopLeft_GrSurfaceOrigin, - kOpaque_SkAlphaType, shared_image_usage); + kOpaque_SkAlphaType, shared_image_usage, kDebugLabel); } if (!success) { DLOG(ERROR) << "Failed to create shared image";
diff --git a/media/gpu/v4l2/test/av1_decoder.cc b/media/gpu/v4l2/test/av1_decoder.cc index 90896d8..31c3f5a7 100644 --- a/media/gpu/v4l2/test/av1_decoder.cc +++ b/media/gpu/v4l2/test/av1_decoder.cc
@@ -963,7 +963,7 @@ return VideoDecoder::kEOStream; } - const bool isOUTPUTQueueNew = !OUTPUT_queue_; + const bool is_OUTPUT_queue_new = !OUTPUT_queue_; if (!OUTPUT_queue_) { CreateOUTPUTQueue(kDriverCodecFourcc); } @@ -1070,7 +1070,7 @@ // dimensions and format will be ready. Specifying V4L2_CTRL_WHICH_CUR_VAL // when VIDIOC_S_EXT_CTRLS processes the request immediately so that the frame // is parsed by the driver and the state is readied. - v4l2_ioctl_->SetExtCtrls(OUTPUT_queue_, &ext_ctrls, isOUTPUTQueueNew); + v4l2_ioctl_->SetExtCtrls(OUTPUT_queue_, &ext_ctrls, is_OUTPUT_queue_new); v4l2_ioctl_->MediaRequestIocQueue(OUTPUT_queue_); if (!CAPTURE_queue_) {
diff --git a/media/gpu/v4l2/test/h264_decoder.cc b/media/gpu/v4l2/test/h264_decoder.cc index a0f54b1..bae2a570 100644 --- a/media/gpu/v4l2/test/h264_decoder.cc +++ b/media/gpu/v4l2/test/h264_decoder.cc
@@ -497,7 +497,7 @@ v4l2_ctrl_h264_decode_params v4l2_decode_param = {}; - const bool isOUTPUTQueueNew = !OUTPUT_queue_; + const bool is_OUTPUT_queue_new = !OUTPUT_queue_; if (!OUTPUT_queue_) { CreateOUTPUTQueue(kDriverCodecFourcc); } @@ -514,7 +514,7 @@ // transmitted yet, hence FinishFrame() needs to be called. if (slice_metadata.frame_num >= 0) { FinishFrame(*pending_slice_header_, frame_number, v4l2_decode_param, - slice_metadata, isOUTPUTQueueNew); + slice_metadata, is_OUTPUT_queue_new); break; } return H264Parser::kOk; @@ -558,7 +558,7 @@ reached_end_of_frame = true; FinishFrame(*pending_slice_header_, frame_number, v4l2_decode_param, - slice_metadata, isOUTPUTQueueNew); + slice_metadata, is_OUTPUT_queue_new); *resulting_slice_header = std::move(pending_slice_header_); pending_slice_header_ = std::move(curr_slice_header); @@ -583,7 +583,7 @@ // needs to be finished. if (slice_metadata.frame_num >= 0) { FinishFrame(*pending_slice_header_, frame_number, v4l2_decode_param, - slice_metadata, isOUTPUTQueueNew); + slice_metadata, is_OUTPUT_queue_new); reached_end_of_frame = true; } break; @@ -598,7 +598,7 @@ // needs to be finished. if (slice_metadata.frame_num >= 0) { FinishFrame(*pending_slice_header_, frame_number, v4l2_decode_param, - slice_metadata, isOUTPUTQueueNew); + slice_metadata, is_OUTPUT_queue_new); reached_end_of_frame = true; } break; @@ -611,7 +611,7 @@ // needs to be finished. if (slice_metadata.frame_num >= 0) { FinishFrame(*pending_slice_header_, frame_number, v4l2_decode_param, - slice_metadata, isOUTPUTQueueNew); + slice_metadata, is_OUTPUT_queue_new); reached_end_of_frame = true; } break; @@ -638,7 +638,7 @@ const int frame_num, v4l2_ctrl_h264_decode_params& v4l2_decode_param, H264SliceMetadata& slice_metadata, - bool isOUTPUTQueueNew) { + bool is_OUTPUT_queue_new) { SetupDecodeParams(curr_slice, slice_metadata, &v4l2_decode_param); struct v4l2_ext_control ctrls[] = { @@ -650,7 +650,7 @@ struct v4l2_ext_controls ext_ctrls = { .count = (sizeof(ctrls) / sizeof(ctrls[0])), .controls = ctrls}; - v4l2_ioctl_->SetExtCtrls(OUTPUT_queue_, &ext_ctrls, isOUTPUTQueueNew); + v4l2_ioctl_->SetExtCtrls(OUTPUT_queue_, &ext_ctrls, is_OUTPUT_queue_new); // Picture is a reference picture. // H.264 section 8.2.4.
diff --git a/media/gpu/v4l2/test/h264_decoder.h b/media/gpu/v4l2/test/h264_decoder.h index c4a2a41..690f966 100644 --- a/media/gpu/v4l2/test/h264_decoder.h +++ b/media/gpu/v4l2/test/h264_decoder.h
@@ -122,7 +122,7 @@ int frame_num, v4l2_ctrl_h264_decode_params& v4l2_decode_param, H264SliceMetadata& slice_metadata, - bool isOUTPUTQueueNew); + bool is_OUTPUT_queue_new); // Initializes H264 Slice Metadata based on slice header and // based on H264 specifications which it calculates its pic order count.
diff --git a/media/gpu/v4l2/test/vp8_decoder.cc b/media/gpu/v4l2/test/vp8_decoder.cc index 599ab4ef..bcdff3b7 100644 --- a/media/gpu/v4l2/test/vp8_decoder.cc +++ b/media/gpu/v4l2/test/vp8_decoder.cc
@@ -531,7 +531,7 @@ break; } - const bool isOUTPUTQueueNew = !OUTPUT_queue_; + const bool is_OUTPUT_queue_new = !OUTPUT_queue_; if (!OUTPUT_queue_) { CreateOUTPUTQueue(kDriverCodecFourcc); } @@ -580,7 +580,7 @@ // when VIDIOC_S_EXT_CTRLS processes the request immediately so that the frame // is parsed by the driver and the state is readied. v4l2_ioctl_->SetExtCtrls(OUTPUT_queue_, &ext_ctrls, - isOUTPUTQueueNew && cur_val_is_supported_); + is_OUTPUT_queue_new && cur_val_is_supported_); v4l2_ioctl_->MediaRequestIocQueue(OUTPUT_queue_); if (!CAPTURE_queue_) {
diff --git a/media/gpu/v4l2/test/vp9_decoder.cc b/media/gpu/v4l2/test/vp9_decoder.cc index 408b6ac1..95bdb95 100644 --- a/media/gpu/v4l2/test/vp9_decoder.cc +++ b/media/gpu/v4l2/test/vp9_decoder.cc
@@ -447,7 +447,7 @@ break; } - const bool isOUTPUTQueueNew = !OUTPUT_queue_; + const bool is_OUTPUT_queue_new = !OUTPUT_queue_; if (!OUTPUT_queue_) { CreateOUTPUTQueue(kDriverCodecFourcc); } @@ -493,7 +493,7 @@ // when VIDIOC_S_EXT_CTRLS processes the request immediately so that the frame // is parsed by the driver and the state is readied. v4l2_ioctl_->SetExtCtrls(OUTPUT_queue_, &ext_ctrls, - isOUTPUTQueueNew && cur_val_is_supported_); + is_OUTPUT_queue_new && cur_val_is_supported_); v4l2_ioctl_->MediaRequestIocQueue(OUTPUT_queue_); if (!CAPTURE_queue_) {
diff --git a/media/mojo/services/mojo_video_encode_accelerator_provider.cc b/media/mojo/services/mojo_video_encode_accelerator_provider.cc index 5fbc7a5..e250a7a4 100644 --- a/media/mojo/services/mojo_video_encode_accelerator_provider.cc +++ b/media/mojo/services/mojo_video_encode_accelerator_provider.cc
@@ -73,8 +73,7 @@ if (base::FeatureList::IsEnabled(kUseTaskRunnerForMojoVEAService)) { #if BUILDFLAG(IS_WIN) - base::ThreadPool::CreateCOMSTATaskRunner({base::MayBlock()}, - base::SingleThreadTaskRunnerThreadMode::DEDICATED) + base::ThreadPool::CreateCOMSTATaskRunner({base::MayBlock()}) #else base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()}) #endif
diff --git a/media/renderers/paint_canvas_video_renderer.cc b/media/renderers/paint_canvas_video_renderer.cc index 78581e3..5579f37 100644 --- a/media/renderers/paint_canvas_video_renderer.cc +++ b/media/renderers/paint_canvas_video_renderer.cc
@@ -1770,7 +1770,7 @@ SHARED_IMAGE_FORMAT, video_frame->coded_size(), GetVideoFrameRGBColorSpacePreferringSRGB(video_frame.get()), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, - gpu::kNullSurfaceHandle); + "PaintCanvasVideoRenderer", gpu::kNullSurfaceHandle); token = sii->GenUnverifiedSyncToken(); } @@ -1983,7 +1983,7 @@ SHARED_IMAGE_FORMAT, video_frame->coded_size(), GetVideoFrameRGBColorSpacePreferringSRGB(video_frame.get()), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, flags, - gpu::kNullSurfaceHandle); + "PaintCanvasVideoRenderer", gpu::kNullSurfaceHandle); ri->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData()); }
diff --git a/media/renderers/shared_image_video_frame_test_utils.cc b/media/renderers/shared_image_video_frame_test_utils.cc index d728d7f..b8747bf 100644 --- a/media/renderers/shared_image_video_frame_test_utils.cc +++ b/media/renderers/shared_image_video_frame_test_utils.cc
@@ -95,7 +95,7 @@ gpu::Mailbox mailbox = sii->CreateSharedImage( viz::SinglePlaneFormat::kRGBA_8888, coded_size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - gpu::SHARED_IMAGE_USAGE_GLES2, pixels); + gpu::SHARED_IMAGE_USAGE_GLES2, "RGBAVideoFrame", pixels); return CreateSharedImageFrame( std::move(context_provider), VideoPixelFormat::PIXEL_FORMAT_ABGR, @@ -142,13 +142,16 @@ auto* sii = context_provider->SharedImageInterface(); gpu::Mailbox y_mailbox = sii->CreateSharedImage( plane_format, coded_size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2, y_pixels); + kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2, "I420Frame_Y", + y_pixels); gpu::Mailbox u_mailbox = sii->CreateSharedImage( plane_format, uv_size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2, u_pixels); + kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2, "I420Frame_U", + u_pixels); gpu::Mailbox v_mailbox = sii->CreateSharedImage( plane_format, uv_size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2, v_pixels); + kPremul_SkAlphaType, gpu::SHARED_IMAGE_USAGE_GLES2, "I420Frame_V", + v_pixels); return CreateSharedImageFrame( std::move(context_provider), VideoPixelFormat::PIXEL_FORMAT_I420, @@ -197,11 +200,11 @@ gpu::Mailbox y_mailbox = sii->CreateSharedImage( viz::SinglePlaneFormat::kR_8, coded_size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - gpu::SHARED_IMAGE_USAGE_GLES2, y_pixels); + gpu::SHARED_IMAGE_USAGE_GLES2, "NV12Frame_Y", y_pixels); gpu::Mailbox uv_mailbox = sii->CreateSharedImage( viz::SinglePlaneFormat::kRG_88, uv_size, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - gpu::SHARED_IMAGE_USAGE_GLES2, uv_pixels); + gpu::SHARED_IMAGE_USAGE_GLES2, "NV12Frame_UV", uv_pixels); return CreateSharedImageFrame( std::move(context_provider), VideoPixelFormat::PIXEL_FORMAT_NV12, {y_mailbox, uv_mailbox}, {}, GL_TEXTURE_2D, coded_size, visible_rect,
diff --git a/media/renderers/video_frame_yuv_mailboxes_holder.cc b/media/renderers/video_frame_yuv_mailboxes_holder.cc index 67e80ac..f5029ab 100644 --- a/media/renderers/video_frame_yuv_mailboxes_holder.cc +++ b/media/renderers/video_frame_yuv_mailboxes_holder.cc
@@ -139,7 +139,8 @@ PlaneSharedImageFormat(num_channels, caps.texture_rg); holders_[plane].mailbox = sii->CreateSharedImage( format, tex_size, video_frame->ColorSpace(), kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, mailbox_usage, gpu::kNullSurfaceHandle); + kPremul_SkAlphaType, mailbox_usage, "VideoFrameYUV", + gpu::kNullSurfaceHandle); holders_[plane].texture_target = GL_TEXTURE_2D; }
diff --git a/media/renderers/video_renderer_impl_unittest.cc b/media/renderers/video_renderer_impl_unittest.cc index c3bb669..60fbbb2 100644 --- a/media/renderers/video_renderer_impl_unittest.cc +++ b/media/renderers/video_renderer_impl_unittest.cc
@@ -84,7 +84,8 @@ decoder_(nullptr), demuxer_stream_(DemuxerStream::VIDEO), simulate_decode_delay_(false), - expect_init_success_(true) { + expect_init_success_(true), + time_source_(&tick_clock_) { null_video_sink_ = std::make_unique<NullVideoSink>( false, base::Seconds(1.0 / 60), base::BindRepeating(&MockCB::FrameReceived, @@ -99,7 +100,6 @@ true, &media_log_, nullptr, 0); renderer_->SetTickClockForTesting(&tick_clock_); null_video_sink_->set_tick_clock_for_testing(&tick_clock_); - time_source_.SetTickClockForTesting(&tick_clock_); // Start wallclock time at a non-zero value. AdvanceWallclockTimeInMs(12345);
diff --git a/media/renderers/video_resource_updater.cc b/media/renderers/video_resource_updater.cc index e49d3e1a..1d7727ce 100644 --- a/media/renderers/video_resource_updater.cc +++ b/media/renderers/video_resource_updater.cc
@@ -537,7 +537,8 @@ auto* sii = SharedImageInterface(); mailbox_ = sii->CreateSharedImage( format, size, color_space, kTopLeft_GrSurfaceOrigin, - kPremul_SkAlphaType, shared_image_usage, gpu::kNullSurfaceHandle); + kPremul_SkAlphaType, shared_image_usage, "VideoResourceUpdater", + gpu::kNullSurfaceHandle); ContextGL()->WaitSyncTokenCHROMIUM( sii->GenUnverifiedSyncToken().GetConstData()); }
diff --git a/media/video/gpu_memory_buffer_video_frame_pool.cc b/media/video/gpu_memory_buffer_video_frame_pool.cc index 8096c35..e9ea16e 100644 --- a/media/video/gpu_memory_buffer_video_frame_pool.cc +++ b/media/video/gpu_memory_buffer_video_frame_pool.cc
@@ -1211,17 +1211,18 @@ } #endif + constexpr char kDebugLabel[] = "MediaGmbVideoFramePool"; if (multi_planar_format) { DCHECK_EQ(NumSharedImages(output_format_), 1u); plane_resource.mailbox = sii->CreateSharedImage( *multi_planar_format, gpu_memory_buffer->GetSize(), color_space, - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, kDebugLabel, gpu_memory_buffer->CloneHandle()); } else { plane_resource.mailbox = sii->CreateSharedImage( gpu_memory_buffer, gpu_factories_->GpuMemoryBufferManager(), GetSharedImageBufferPlane(output_format_, plane), color_space, - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage); + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, kDebugLabel); } } else if (!plane_resource.mailbox.IsZero()) { sii->UpdateSharedImage(frame_resources->sync_token,
diff --git a/net/cert/cert_verify_proc.h b/net/cert/cert_verify_proc.h index 31401d4..923a6e8 100644 --- a/net/cert/cert_verify_proc.h +++ b/net/cert/cert_verify_proc.h
@@ -60,7 +60,8 @@ // Disable network fetches during verification. This will override // VERIFY_REV_CHECKING_ENABLED and // VERIFY_REV_CHECKING_REQUIRED_LOCAL_ANCHORS if they are also specified. - // TODO(https://crbug.com/1432793): This should also disable AIA fetching. + // (Note that this entirely disables the online revocation/AIA code paths. + // Theoretically we could still check for cached results.) VERIFY_DISABLE_NETWORK_FETCHES = 1 << 4, };
diff --git a/net/cert/cert_verify_proc_android.cc b/net/cert/cert_verify_proc_android.cc index 8bacf58..e467ed7ef8 100644 --- a/net/cert/cert_verify_proc_android.cc +++ b/net/cert/cert_verify_proc_android.cc
@@ -244,6 +244,7 @@ bool VerifyFromAndroidTrustManager( const std::vector<std::string>& cert_bytes, const std::string& hostname, + int flags, scoped_refptr<CertNetFetcher> cert_net_fetcher, CertVerifyResult* verify_result) { android::CertVerifyStatusAndroid status; @@ -255,7 +256,8 @@ // If verification resulted in a NO_TRUSTED_ROOT error, then fetch // intermediates and retry. - if (status == android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT) { + if (status == android::CERT_VERIFY_STATUS_ANDROID_NO_TRUSTED_ROOT && + !(flags & CertVerifyProc::VERIFY_DISABLE_NETWORK_FETCHES)) { status = TryVerifyWithAIAFetching(cert_bytes, hostname, std::move(cert_net_fetcher), verify_result, &verified_chain); @@ -362,8 +364,8 @@ const NetLogWithSource& net_log) { std::vector<std::string> cert_bytes; GetChainDEREncodedBytes(cert, &cert_bytes); - if (!VerifyFromAndroidTrustManager(cert_bytes, hostname, cert_net_fetcher_, - verify_result)) { + if (!VerifyFromAndroidTrustManager(cert_bytes, hostname, flags, + cert_net_fetcher_, verify_result)) { return ERR_FAILED; }
diff --git a/net/cert/cert_verify_proc_builtin.cc b/net/cert/cert_verify_proc_builtin.cc index 4720947..c36d964 100644 --- a/net/cert/cert_verify_proc_builtin.cc +++ b/net/cert/cert_verify_proc_builtin.cc
@@ -39,6 +39,7 @@ #include "net/der/encode_values.h" #include "net/log/net_log_values.h" #include "net/log/net_log_with_source.h" +#include "third_party/abseil-cpp/absl/types/optional.h" namespace net { @@ -591,6 +592,8 @@ crl_set, net_fetcher, verification_type, digest_policy, flags, trust_store, ocsp_response, ev_metadata, checked_revocation, deadline); + absl::optional<CertIssuerSourceAia> aia_cert_issuer_source; + // Initialize the path builder. CertPathBuilder path_builder( target, trust_store->trust_store(), &path_builder_delegate, @@ -604,12 +607,13 @@ // Allow the path builder to discover intermediates through AIA fetching. // TODO(crbug.com/634484): hook up netlog to AIA. - std::unique_ptr<CertIssuerSourceAia> aia_cert_issuer_source; - if (net_fetcher) { - aia_cert_issuer_source = std::make_unique<CertIssuerSourceAia>(net_fetcher); - path_builder.AddCertIssuerSource(aia_cert_issuer_source.get()); - } else { - LOG(ERROR) << "No net_fetcher for performing AIA chasing."; + if (!(flags & CertVerifyProc::VERIFY_DISABLE_NETWORK_FETCHES)) { + if (net_fetcher) { + aia_cert_issuer_source.emplace(net_fetcher); + path_builder.AddCertIssuerSource(&aia_cert_issuer_source.value()); + } else { + LOG(ERROR) << "No net_fetcher for performing AIA chasing."; + } } path_builder.SetIterationLimit(kPathBuilderIterationLimit);
diff --git a/net/cert/cert_verify_proc_unittest.cc b/net/cert/cert_verify_proc_unittest.cc index 566a9a130..9616eda 100644 --- a/net/cert/cert_verify_proc_unittest.cc +++ b/net/cert/cert_verify_proc_unittest.cc
@@ -3071,15 +3071,28 @@ // intermediate and root). ASSERT_EQ(0u, leaf->intermediate_buffers().size()); - const int flags = 0; - int error; - CertVerifyResult verify_result; + // VERIFY_DISABLE_NETWORK_FETCHES flag is not implemented in + // CertVerifyProcIOS, only test it on other verifiers. + if (verify_proc_type() != CERT_VERIFY_PROC_IOS) { + CertVerifyResult verify_result; + // If VERIFY_DISABLE_NETWORK_FETCHES is specified, AIA should not be + // attempted and verifying the chain should fail since the intermediate + // can't be found. + int error = Verify(leaf.get(), kHostname, + CertVerifyProc::VERIFY_DISABLE_NETWORK_FETCHES, + CertificateList(), &verify_result); + EXPECT_THAT(error, IsError(ERR_CERT_AUTHORITY_INVALID)); + EXPECT_EQ(0u, verify_result.verified_cert->intermediate_buffers().size()); + } - // Verifying the chain should succeed as the missing intermediate can be - // fetched via AIA. - error = - Verify(leaf.get(), kHostname, flags, CertificateList(), &verify_result); - EXPECT_THAT(error, IsOk()); + { + CertVerifyResult verify_result; + // Verifying the chain should succeed as the missing intermediate can be + // fetched via AIA. + int error = Verify(leaf.get(), kHostname, /*flags=*/0, CertificateList(), + &verify_result); + EXPECT_THAT(error, IsOk()); + } } // This test is the same as IntermediateFromAia200Der, except the certificate is
diff --git a/net/tools/root_store_tool/root_store_tool.cc b/net/tools/root_store_tool/root_store_tool.cc index d7be02dd..5be48e6 100644 --- a/net/tools/root_store_tool/root_store_tool.cc +++ b/net/tools/root_store_tool/root_store_tool.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <inttypes.h> + #include <iostream> #include <map> #include <set> @@ -147,20 +149,16 @@ CHECK_GT(root_store.trust_anchors_size(), 0); std::string string_to_write = - "// This file is auto-generated, DO NOT EDIT.\n\n" - "const ChromeRootCertInfo kChromeRootCertList[] = {\n"; + "// This file is auto-generated, DO NOT EDIT.\n\n"; - for (auto& anchor : root_store.trust_anchors()) { + for (int i = 0; i < root_store.trust_anchors_size(); i++) { + const auto& anchor = root_store.trust_anchors(i); // Every trust anchor at this point should have a DER. CHECK(!anchor.der().empty()); std::string der = anchor.der(); - // Begin struct. Assumed type of ChromeRootCertInfo: - // - // struct { - // base::span<const uint8_t> der; - // }; - string_to_write += " {{{"; + base::StringAppendF(&string_to_write, + "constexpr uint8_t kChromeRootCert%d[] = {", i); // Convert each character to hex representation, escaped. for (auto c : der) { @@ -169,12 +167,20 @@ } // End struct - string_to_write += "}}},\n"; + string_to_write += "};\n"; + } + + string_to_write += "constexpr ChromeRootCertInfo kChromeRootCertList[] = {\n"; + + for (int i = 0; i < root_store.trust_anchors_size(); i++) { + base::StringAppendF(&string_to_write, " {kChromeRootCert%d},\n", i); } string_to_write += "};"; - string_to_write += "\n\n\nstatic const int64_t kRootStoreVersion = " + - base::NumberToString(root_store.version_major()) + ";\n"; + base::StringAppendF(&string_to_write, + "\n\n\nstatic const int64_t kRootStoreVersion = %" PRId64 + ";\n", + root_store.version_major()); if (!base::WriteFile(cpp_path, string_to_write)) { return false; }
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h index ed3be50..7840a6e0 100644 --- a/skia/config/SkUserConfig.h +++ b/skia/config/SkUserConfig.h
@@ -233,9 +233,6 @@ #define SK_USE_LEGACY_MIPMAP_BUILDER -#define SK_USE_LEGACY_XFERMODE_SPRITE_BLITTERS -#define SK_USE_LEGACY_XFERMODE_SHADER_BLITTERS - #define SK_SUPPORT_LEGACY_CONIC_CHOP // Use the original std::vector based serializer
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index f9645f1..cad1585 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -5585,9 +5585,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5598,8 +5598,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -5752,9 +5752,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5765,8 +5765,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -5901,9 +5901,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5914,8 +5914,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [
diff --git a/testing/buildbot/chromium.coverage.json b/testing/buildbot/chromium.coverage.json index bbcfc9d0..fdf27b7 100644 --- a/testing/buildbot/chromium.coverage.json +++ b/testing/buildbot/chromium.coverage.json
@@ -25211,9 +25211,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25224,8 +25224,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -25378,9 +25378,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25391,8 +25391,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -25527,9 +25527,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25540,8 +25540,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 2a47a172..f217fefa 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -33947,9 +33947,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -33959,8 +33959,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -34114,9 +34114,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -34126,8 +34126,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -34263,9 +34263,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -34275,8 +34275,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -35705,9 +35705,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -35717,8 +35717,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -35872,9 +35872,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -35884,8 +35884,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -36021,9 +36021,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -36033,8 +36033,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -36752,9 +36752,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -36764,8 +36764,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index a9ea3d3f..c5cc5b1 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -17723,12 +17723,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -17739,8 +17739,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -17910,12 +17910,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -17926,8 +17926,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [ @@ -18074,12 +18074,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 114.0.5721.0", + "description": "Run with ash-chrome version 114.0.5722.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -18090,8 +18090,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v114.0.5721.0", - "revision": "version:114.0.5721.0" + "location": "lacros_version_skew_tests_v114.0.5722.0", + "revision": "version:114.0.5722.0" } ], "dimension_sets": [
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 8178d557..832c8a14 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -22,16 +22,16 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5721.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v114.0.5722.0/test_ash_chrome', ], - 'description': 'Run with ash-chrome version 114.0.5721.0', + 'description': 'Run with ash-chrome version 114.0.5722.0', 'identifier': 'Lacros version skew testing ash canary', 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v114.0.5721.0', - 'revision': 'version:114.0.5721.0', + 'location': 'lacros_version_skew_tests_v114.0.5722.0', + 'revision': 'version:114.0.5722.0', }, ], },
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index f12defb..a29cd37 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1242,6 +1242,29 @@ ] } ], + "AutofillLogUKMEventsWithSampleRate": [ + { + "platforms": [ + "android", + "android_weblayer", + "chromeos", + "chromeos_lacros", + "fuchsia", + "ios", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "AutofillLogUKMEventsWithSampleRate" + ] + } + ] + } + ], "AutofillMoreProminentPopup": [ { "platforms": [ @@ -8658,6 +8681,8 @@ { "name": "AndroidExperiments", "params": { + "AdditionalRelatedQueries": "5", + "AdditionalTrendingQueries": "5", "RepeatableQueriesIgnoreDuplicateVisits": "true", "RepeatableQueriesMaxAgeDays": "7", "RepeatableQueriesMinVisitCount": "12" @@ -8667,7 +8692,9 @@ "NewTabPageTilesTitleWrapAround", "OmniboxDynamicMaxAutocomplete", "OmniboxFocusTriggersSRPZeroSuggest", + "OmniboxGroupingFrameworkForZPS", "OmniboxHeaderPaddingUpdate", + "OmniboxInspireMe", "OmniboxMaxURLMatches", "OmniboxMostVisitedTilesDynamicSpacing", "OmniboxMostVisitedTilesFadingOnTablet",
diff --git a/third_party/arcore-android-sdk-client/AndroidManifest_basesplit.xml b/third_party/arcore-android-sdk-client/AndroidManifest_basesplit.xml new file mode 100644 index 0000000..635c9fe --- /dev/null +++ b/third_party/arcore-android-sdk-client/AndroidManifest_basesplit.xml
@@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright 2023 The Chromium Authors +Use of this source code is governed by a BSD-style license that can be +found in the LICENSE file. +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="org.chromium.arcore.basesplit"> + <queries> + <package android:name="com.google.ar.core" /> + </queries> + <application> + <meta-data android:name="com.google.ar.core.min_apk_version" android:value="221020000" /> + </application> +</manifest>
diff --git a/third_party/arcore-android-sdk-client/AndroidManifest_install_activity.xml b/third_party/arcore-android-sdk-client/AndroidManifest_install_activity.xml new file mode 100644 index 0000000..128d0c14 --- /dev/null +++ b/third_party/arcore-android-sdk-client/AndroidManifest_install_activity.xml
@@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright 2023 The Chromium Authors +Use of this source code is governed by a BSD-style license that can be +found in the LICENSE file. +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.google.ar.core.install_activity"> + <application> + <!-- This activity is critical for installing ARCore when it is not already present. --> + <activity + android:name="com.google.ar.core.InstallActivity" + android:configChanges="keyboardHidden|orientation|screenSize" + android:excludeFromRecents="true" + android:exported="false" + android:launchMode="singleTop" + android:theme="@android:style/Theme.Material.Light.Dialog.Alert" /> + </application> +</manifest>
diff --git a/third_party/arcore-android-sdk-client/BUILD.gn b/third_party/arcore-android-sdk-client/BUILD.gn index 9ea78fa..bc4aa380 100644 --- a/third_party/arcore-android-sdk-client/BUILD.gn +++ b/third_party/arcore-android-sdk-client/BUILD.gn
@@ -8,12 +8,19 @@ aar_path = "core-1.32.0.aar" info_path = "core-1.32.0.info" extract_native_libraries = true - - # Don't merge the manifest by default so we can exclude it for targets like - # WebView. Note that you can still include the manifest changes by adding a - # dependency on "com_google_ar_core_java__ignored_manifest". ignore_manifest = true - ignore_proguard_configs = true proguard_configs = [ "proguard.txt" ] + + # Listing AndroidManifest_basesplit.xml twice is fine since the build system + # will ensure it's merged only once. + mergeable_android_manifests = [ + "AndroidManifest_basesplit.xml", + "AndroidManifest_install_activity.xml", + ] +} + +# <meta-data> that needs to go in the base module's AndroidManifest.xml. +java_group("arcore_base_manifest_java") { + mergeable_android_manifests = [ "AndroidManifest_basesplit.xml" ] }
diff --git a/third_party/arcore-android-sdk-client/README.chromium b/third_party/arcore-android-sdk-client/README.chromium index 19be233..afb81a4 100644 --- a/third_party/arcore-android-sdk-client/README.chromium +++ b/third_party/arcore-android-sdk-client/README.chromium
@@ -16,17 +16,18 @@ https://goto.google.com/arcore-chrome-client-update Local Modifications: -Added files required for consumption in Chrome (LICENSE, OWNERS, BUILD.gn, -cipd.yaml, *.info). - -Added override for proguard configs brought by ARCore SDK's .aar. -The override should be removed once ARCore SDK includes the change upstream and -the version of SDK gets rolled. +* Added files required for consumption in Chrome (LICENSE, OWNERS, BUILD.gn, + cipd.yaml, *.info). +* Extracted AndroidManifest.xml and split into two separate .xml files. +* Added override for proguard configs brought by ARCore SDK's .aar. + * The override should be removed once ARCore SDK includes the change upstream and + the version of SDK gets rolled. The LICENSE file is taken from * https://www.apache.org/licenses/LICENSE-2.0.txt Changes: +2023-04-18 - Split AndroidManifest.xml into two separate files. 2022-07-18 - Upgraded SDK binaries to v1.32. 2021-06-23 - Ignoring Manifest changes so we don't include them in WebView. 2021-02-01 - Upgraded SDK binaries to v1.22.
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc index 5b78a6d..708f81e3 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc
@@ -6607,7 +6607,6 @@ ScriptPromise Document::hasPrivateToken(ScriptState* script_state, const String& issuer, - const String& type, ExceptionState& exception_state) { ScriptPromiseResolver* resolver = MakeGarbageCollected<ScriptPromiseResolver>( script_state, exception_state.GetContext()); @@ -6629,14 +6628,6 @@ return promise; } - if (type != "private-state-token") { - exception_state.ThrowTypeError( - "hasPrivateToken: Private Token types other than " - "private-state-token are unsupported."); - resolver->Reject(exception_state); - return promise; - } - scoped_refptr<const SecurityOrigin> top_frame_origin = TopFrameOrigin(); if (!top_frame_origin) { // Note: One case where there might be no top frame origin is if this
diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h index c46f5c83..795721e 100644 --- a/third_party/blink/renderer/core/dom/document.h +++ b/third_party/blink/renderer/core/dom/document.h
@@ -1213,7 +1213,6 @@ // service is unavailable). ScriptPromise hasPrivateToken(ScriptState* script_state, const String& issuer, - const String& type, ExceptionState&); // Sends a query via Mojo to ask whether the user has a redemption record.
diff --git a/third_party/blink/renderer/core/dom/document.idl b/third_party/blink/renderer/core/dom/document.idl index c121d4f..c3e677e 100644 --- a/third_party/blink/renderer/core/dom/document.idl +++ b/third_party/blink/renderer/core/dom/document.idl
@@ -199,7 +199,7 @@ [MeasureAs=PrefixedPageVisibility, ImplementedAs=hidden] readonly attribute boolean webkitHidden; // Private Token API (https://github.com/wicg/trust-token-api) - [CallWith=ScriptState, Measure, RaisesException, NewObject, SecureContext, RuntimeEnabled=PrivateStateTokens] Promise<boolean> hasPrivateToken(USVString issuer, USVString type); + [CallWith=ScriptState, Measure, RaisesException, NewObject, SecureContext, RuntimeEnabled=PrivateStateTokens] Promise<boolean> hasPrivateToken(USVString issuer); [CallWith=ScriptState, Measure, RaisesException, NewObject, SecureContext, RuntimeEnabled=PrivateStateTokens] Promise<boolean> hasRedemptionRecord(USVString issuer);
diff --git a/third_party/blink/renderer/core/dom/document_test.cc b/third_party/blink/renderer/core/dom/document_test.cc index 1cb743d..456721d 100644 --- a/third_party/blink/renderer/core/dom/document_test.cc +++ b/third_party/blink/renderer/core/dom/document_test.cc
@@ -1128,9 +1128,9 @@ Document& document = scope.GetDocument(); - auto promise = document.hasPrivateToken( - scope.GetScriptState(), "https://issuer.example", "private-state-token", - scope.GetExceptionState()); + auto promise = + document.hasPrivateToken(scope.GetScriptState(), "https://issuer.example", + scope.GetExceptionState()); DocumentTest::SimulateTrustTokenQueryAnswererConnectionError(&document); ASSERT_TRUE(promise.IsAssociatedWith(scope.GetScriptState())); @@ -1153,9 +1153,8 @@ ExceptionState::kExecutionContext, "Document", "hasPrivateToken"); - auto promise = - document.hasPrivateToken(script_state, "https://issuer.example", - "private-state-token", exception_state); + auto promise = document.hasPrivateToken( + script_state, "https://issuer.example", exception_state); ScriptPromiseTester promise_tester(script_state, promise); promise_tester.WaitUntilSettled(); @@ -1269,9 +1268,8 @@ ExceptionState::kExecutionContext, "Document", "hasPrivateToken"); - auto promise = - document.hasPrivateToken(script_state, "https://issuer.example", - "private-state-token", exception_state); + auto promise = document.hasPrivateToken( + script_state, "https://issuer.example", exception_state); ScriptPromiseTester promise_tester(script_state, promise); promise_tester.WaitUntilSettled(); @@ -1298,9 +1296,8 @@ ExceptionState::kExecutionContext, "Document", "hasPrivateToken"); - auto promise = - document.hasPrivateToken(script_state, "https://issuer.example", - "private-state-token", exception_state); + auto promise = document.hasPrivateToken( + script_state, "https://issuer.example", exception_state); ScriptPromiseTester promise_tester(script_state, promise); promise_tester.WaitUntilSettled(); @@ -1327,9 +1324,8 @@ ExceptionState::kExecutionContext, "Document", "hasPrivateToken"); - auto promise = - document.hasPrivateToken(script_state, "https://issuer.example", - "private-state-token", exception_state); + auto promise = document.hasPrivateToken( + script_state, "https://issuer.example", exception_state); ScriptPromiseTester promise_tester(script_state, promise); promise_tester.WaitUntilSettled(); @@ -1358,9 +1354,8 @@ ExceptionState::kExecutionContext, "Document", "hasPrivateToken"); - auto promise = - document.hasPrivateToken(script_state, "https://issuer.example", - "private-state-token", exception_state); + auto promise = document.hasPrivateToken( + script_state, "https://issuer.example", exception_state); ScriptPromiseTester promise_tester(script_state, promise); promise_tester.WaitUntilSettled(); @@ -1389,9 +1384,8 @@ ExceptionState::kExecutionContext, "Document", "hasPrivateToken"); - auto promise = - document.hasPrivateToken(script_state, "https://issuer.example", - "private-state-token", exception_state); + auto promise = document.hasPrivateToken( + script_state, "https://issuer.example", exception_state); ScriptPromiseTester promise_tester(script_state, promise); promise_tester.WaitUntilSettled();
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.cc b/third_party/blink/renderer/core/frame/local_frame_view.cc index 0842bab..4e55ca8 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view.cc +++ b/third_party/blink/renderer/core/frame/local_frame_view.cc
@@ -673,7 +673,6 @@ return false; } - LayoutState layout_state(root); if (scroll_anchoring_scrollable_areas_) { for (auto& scrollable_area : *scroll_anchoring_scrollable_areas_) { if (scrollable_area->GetScrollAnchor() && @@ -727,14 +726,8 @@ if (!in_subtree_layout) { ClearLayoutSubtreeRootsAndMarkContainingBlocks(); Node* body = document->body(); - if (body && body->GetLayoutObject()) { - if (IsA<HTMLFrameSetElement>(*body)) { - body->GetLayoutObject()->SetChildNeedsLayout(); - } else if (IsA<HTMLBodyElement>(*body)) { - if (!first_layout_ && size_.Height() != GetLayoutSize().height() && - body->GetLayoutObject()->EnclosingBox()->StretchesToViewport()) - body->GetLayoutObject()->SetChildNeedsLayout(); - } + if (IsA<HTMLFrameSetElement>(body) && body->GetLayoutObject()) { + body->GetLayoutObject()->SetChildNeedsLayout(); } first_layout_ = false; @@ -750,23 +743,7 @@ } } - LayoutSize old_size = size_; - size_ = LayoutSize(GetLayoutSize()); - - if (old_size != size_) { - LayoutBox* root_layout_object = - document->documentElement() - ? document->documentElement()->GetLayoutBox() - : nullptr; - LayoutBox* body_layout_object = root_layout_object && document->body() - ? document->body()->GetLayoutBox() - : nullptr; - if (body_layout_object && body_layout_object->StretchesToViewport()) - body_layout_object->SetChildNeedsLayout(); - else if (root_layout_object && root_layout_object->StretchesToViewport()) - root_layout_object->SetChildNeedsLayout(); - } } TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
diff --git a/third_party/blink/renderer/core/layout/build.gni b/third_party/blink/renderer/core/layout/build.gni index 3e342b8..7515115 100644 --- a/third_party/blink/renderer/core/layout/build.gni +++ b/third_party/blink/renderer/core/layout/build.gni
@@ -141,8 +141,6 @@ "layout_shift_region.h", "layout_shift_tracker.cc", "layout_shift_tracker.h", - "layout_state.cc", - "layout_state.h", "layout_text.cc", "layout_text.h", "layout_text_control.cc",
diff --git a/third_party/blink/renderer/core/layout/layout_box.cc b/third_party/blink/renderer/core/layout/layout_box.cc index 50a6f62..6146fe6 100644 --- a/third_party/blink/renderer/core/layout/layout_box.cc +++ b/third_party/blink/renderer/core/layout/layout_box.cc
@@ -1030,7 +1030,6 @@ return; } - LayoutState state(*this); while (child) { child->LayoutIfNeeded(); DCHECK(!child->NeedsLayout());
diff --git a/third_party/blink/renderer/core/layout/layout_media.cc b/third_party/blink/renderer/core/layout/layout_media.cc index 05a42975b..baefeb8 100644 --- a/third_party/blink/renderer/core/layout/layout_media.cc +++ b/third_party/blink/renderer/core/layout/layout_media.cc
@@ -66,8 +66,6 @@ auto new_rect = PhysicalContentBoxRect().ToLayoutRect(); - LayoutState state(*this); - // Iterate the children in reverse order so that the media controls are laid // out before the text track container. This is to ensure that the text // track rendering has an up-to-date position of the media controls for
diff --git a/third_party/blink/renderer/core/layout/layout_state.cc b/third_party/blink/renderer/core/layout/layout_state.cc deleted file mode 100644 index 0762a3e..0000000 --- a/third_party/blink/renderer/core/layout/layout_state.cc +++ /dev/null
@@ -1,70 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "third_party/blink/renderer/core/layout/layout_state.h" - -#include "third_party/blink/renderer/core/layout/layout_inline.h" -#include "third_party/blink/renderer/core/layout/layout_view.h" - -namespace blink { - -LayoutState::LayoutState(LayoutView& view) - : containing_block_logical_width_changed_(false), - next_(nullptr), - layout_object_(&view) { - DCHECK(!view.GetLayoutState()); - view.PushLayoutState(*this); -} - -LayoutState::LayoutState(LayoutBox& layout_object, - bool containing_block_logical_width_changed) - : containing_block_logical_width_changed_( - containing_block_logical_width_changed), - next_(layout_object.View()->GetLayoutState()), - layout_object_(&layout_object) { - layout_object.View()->PushLayoutState(*this); -} - -LayoutState::LayoutState(LayoutObject& root) - : containing_block_logical_width_changed_(false), - next_(root.View()->GetLayoutState()), - layout_object_(&root) { - DCHECK(!next_); - DCHECK(!IsA<LayoutView>(root)); - root.View()->PushLayoutState(*this); -} - -LayoutState::~LayoutState() { - if (layout_object_->View()->GetLayoutState()) { - DCHECK_EQ(layout_object_->View()->GetLayoutState(), this); - layout_object_->View()->PopLayoutState(); - } -} - -void LayoutState::Trace(Visitor* visitor) const { - visitor->Trace(layout_object_); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/core/layout/layout_state.h b/third_party/blink/renderer/core/layout/layout_state.h deleted file mode 100644 index 7853426..0000000 --- a/third_party/blink/renderer/core/layout/layout_state.h +++ /dev/null
@@ -1,99 +0,0 @@ -/* - * Copyright (C) 2007 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_STATE_H_ -#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_STATE_H_ - -#include "third_party/blink/renderer/platform/geometry/layout_rect.h" -#include "third_party/blink/renderer/platform/heap/garbage_collected.h" -#include "third_party/blink/renderer/platform/heap/member.h" -#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" -#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" - -namespace blink { - -class LayoutBox; -class LayoutObject; -class LayoutView; - -// LayoutState is an optimization used during layout. -// -// LayoutState's purpose is to cache information as we walk down the container -// block chain during layout. In particular, the absolute layout offset for the -// current LayoutObject is O(1) when using LayoutState, when it is -// O(depthOfTree) without it (thus potentially making layout O(N^2)). -// LayoutState incurs some memory overhead and is pretty intrusive (see next -// paragraphs about those downsides). -// -// To use LayoutState, the layout() functions have to allocate a new LayoutState -// object on the stack whenever the LayoutObject creates a new coordinate system -// (which is pretty much all objects but LayoutTableRow). -// -// LayoutStates are linked together with a single linked list, acting in -// practice like a stack that we push / pop. LayoutView holds the top-most -// pointer to this stack. -// -// See the layout() functions on how to set it up during layout. -// See e.g LayoutBox::offsetFromLogicalTopOfFirstPage on how to use LayoutState -// for computations. -class LayoutState { - // LayoutState is always allocated on the stack. - // The reason is that it is scoped to layout, thus we can avoid expensive - // mallocs. - DISALLOW_NEW(); - - public: - // Constructor for root LayoutState created by LayoutView - explicit LayoutState(LayoutView&); - // Constructor for sub-tree layout and orthogonal writing-mode roots - explicit LayoutState(LayoutObject& root); - - LayoutState(LayoutBox&, bool containing_block_logical_width_changed = false); - LayoutState(const LayoutState&) = delete; - LayoutState& operator=(const LayoutState&) = delete; - - ~LayoutState(); - - bool ContainingBlockLogicalWidthChanged() const { - return containing_block_logical_width_changed_; - } - - LayoutState* Next() const { return next_; } - - LayoutObject& GetLayoutObject() const { return *layout_object_; } - - void Trace(Visitor*) const; - - private: - bool containing_block_logical_width_changed_ : 1; - - LayoutState* next_; - - const Member<LayoutObject> layout_object_; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_LAYOUT_STATE_H_
diff --git a/third_party/blink/renderer/core/layout/layout_view.cc b/third_party/blink/renderer/core/layout/layout_view.cc index 40408c22..b3293581 100644 --- a/third_party/blink/renderer/core/layout/layout_view.cc +++ b/third_party/blink/renderer/core/layout/layout_view.cc
@@ -103,7 +103,6 @@ LayoutView::LayoutView(ContainerNode* document) : LayoutBlockFlow(document), frame_view_(To<Document>(document)->View()), - layout_state_(nullptr), layout_quote_head_(nullptr), layout_counter_count_(0), hit_test_count_(0), @@ -270,13 +269,6 @@ return !owner->IsDisplayNone(); } -#if DCHECK_IS_ON() -void LayoutView::CheckLayoutState() { - NOT_DESTROYED(); - DCHECK(!layout_state_->Next()); -} -#endif - bool LayoutView::ShouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { NOT_DESTROYED(); LocalFrame& frame = GetFrameView()->GetFrame(); @@ -353,9 +345,6 @@ fragmentation_context_.Clear(); } - DCHECK(!layout_state_); - LayoutState root_layout_state(*this); - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // The font code in FontPlatformData does not have a direct connection to the // document, the frame or anything from which we could retrieve the device @@ -371,10 +360,6 @@ #endif LayoutBlockFlow::UpdateLayout(); - -#if DCHECK_IS_ON() - CheckLayoutState(); -#endif ClearNeedsLayout(); }
diff --git a/third_party/blink/renderer/core/layout/layout_view.h b/third_party/blink/renderer/core/layout/layout_view.h index 4c8c7c2..10d1350 100644 --- a/third_party/blink/renderer/core/layout/layout_view.h +++ b/third_party/blink/renderer/core/layout/layout_view.h
@@ -30,7 +30,6 @@ #include "third_party/blink/renderer/core/layout/hit_test_result.h" #include "third_party/blink/renderer/core/layout/layout_block_flow.h" #include "third_party/blink/renderer/core/layout/layout_quote.h" -#include "third_party/blink/renderer/core/layout/layout_state.h" #include "third_party/blink/renderer/core/scroll/scrollable_area.h" #include "third_party/blink/renderer/platform/graphics/overlay_scrollbar_clip_behavior.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" @@ -178,11 +177,6 @@ void CalculateScrollbarModes(mojom::blink::ScrollbarMode& h_mode, mojom::blink::ScrollbarMode& v_mode) const; - LayoutState* GetLayoutState() const { - NOT_DESTROYED(); - return layout_state_; - } - bool CanHaveAdditionalCompositingReasons() const override { NOT_DESTROYED(); return true; @@ -277,16 +271,6 @@ // https://drafts.csswg.org/css-values-4/#dynamic-viewport-size gfx::SizeF DynamicViewportSizeForViewportUnits() const; - void PushLayoutState(LayoutState& layout_state) { - NOT_DESTROYED(); - layout_state_ = &layout_state; - } - void PopLayoutState() { - NOT_DESTROYED(); - DCHECK(layout_state_); - layout_state_ = layout_state_->Next(); - } - PhysicalRect LocalVisualRectIgnoringVisibility() const override; // Invalidates paint for the entire view, including composited descendants, @@ -358,13 +342,7 @@ private: bool CanHaveChildren() const override; - void UpdateBlockLayout(bool relayout_children) override; - -#if DCHECK_IS_ON() - void CheckLayoutState(); -#endif - void UpdateFromStyle() override; Member<LocalFrameView> frame_view_; @@ -374,12 +352,6 @@ // Outside of printing, this is 0x0. PhysicalSize page_size_; - // LayoutState is an optimization used during layout. - // |m_layoutState| will be nullptr outside of layout. - // - // See the class comment for more details. - LayoutState* layout_state_; - Member<ViewFragmentationContext> fragmentation_context_; Member<LayoutQuote> layout_quote_head_;
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc index a373962..867d65b 100644 --- a/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc +++ b/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
@@ -298,12 +298,11 @@ DCHECK(this->CreatesNewFormattingContext()); const NGLayoutResult* previous_result = Base::GetSingleCachedLayoutResult(); - bool is_layout_root = !Base::View()->GetLayoutState()->Next(); // If we are a layout root, use the previous space if available. This will // include any stretched sizes if applicable. NGConstraintSpace constraint_space = - is_layout_root && CanUseConstraintSpaceForCaching(previous_result, *this) + CanUseConstraintSpaceForCaching(previous_result, *this) ? previous_result->GetConstraintSpaceForCaching() : NGConstraintSpace::CreateFromLayoutObject(*this); @@ -320,7 +319,7 @@ // Even if we are a layout root, our baseline may have shifted. In this // (rare) case, mark our containing-block for layout. - if (is_layout_root && previous_result) { + if (previous_result) { if (To<NGPhysicalBoxFragment>(previous_result->PhysicalFragment()) .FirstBaseline() != physical_fragment.FirstBaseline()) { if (auto* containing_block = Base::ContainingBlock()) {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc index 5e414cbcf..1cdab931f 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
@@ -2834,14 +2834,10 @@ ax::mojom::blink::Action event_from_action, const BlinkAXEventIntentsSet& event_intents) { #if DCHECK_IS_ON() - // Make sure none of the layout views are in the process of being laid out. - // Notifications should only be sent after the layoutObject has finished - auto* ax_layout_object = DynamicTo<AXLayoutObject>(obj); - if (ax_layout_object) { - LayoutObject* layout_object = ax_layout_object->GetLayoutObject(); - if (layout_object && layout_object->View()) - DCHECK(!layout_object->View()->GetLayoutState()); - } + // Make sure that we're not in the process of being laid out. Notifications + // should only be sent after the LayoutObject has finished + DCHECK(GetDocument().Lifecycle().GetState() != + DocumentLifecycle::kInPerformLayout); SCOPED_DISALLOW_LIFECYCLE_TRANSITION(); #endif // DCHECK_IS_ON()
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource.cc b/third_party/blink/renderer/platform/graphics/canvas_resource.cc index 7e7a905..a3675e2 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource.cc
@@ -453,11 +453,13 @@ if (gpu_memory_buffer_) { shared_image_mailbox = shared_image_interface->CreateSharedImage( gpu_memory_buffer_.get(), gpu_memory_buffer_manager, GetColorSpace(), - surface_origin, surface_alpha_type, shared_image_usage_flags); + surface_origin, surface_alpha_type, shared_image_usage_flags, + "CanvasResourceRasterGmb"); } else { shared_image_mailbox = shared_image_interface->CreateSharedImage( GetSharedImageFormat(), Size(), GetColorSpace(), surface_origin, - surface_alpha_type, shared_image_usage_flags, gpu::kNullSurfaceHandle); + surface_alpha_type, shared_image_usage_flags, "CanvasResourceRaster", + gpu::kNullSurfaceHandle); } // Wait for the mailbox to be ready to be used.
diff --git a/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc b/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc index de66f3b0..407793c 100644 --- a/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc +++ b/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
@@ -1878,7 +1878,8 @@ gpu_memory_buffer->SetColorSpace(color_space_); back_buffer_mailbox = sii->CreateSharedImage( gpu_memory_buffer.get(), gpu_memory_buffer_manager, color_space_, - origin, back_buffer_alpha_type, usage | additional_usage_flags); + origin, back_buffer_alpha_type, usage | additional_usage_flags, + "WebGLDrawingBuffer"); #if BUILDFLAG(IS_MAC) // A CHROMIUM_image backed texture requires a specialized set of // parameters on OSX. @@ -1899,9 +1900,10 @@ back_buffer_alpha_type = kUnpremul_SkAlphaType; } - back_buffer_mailbox = sii->CreateSharedImage( - color_buffer_format_, size, color_space_, origin, - back_buffer_alpha_type, usage, gpu::kNullSurfaceHandle); + back_buffer_mailbox = + sii->CreateSharedImage(color_buffer_format_, size, color_space_, + origin, back_buffer_alpha_type, usage, + "WebGLDrawingBuffer", gpu::kNullSurfaceHandle); } }
diff --git a/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc b/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc index 23b497b..f88e7be 100644 --- a/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc +++ b/third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc
@@ -179,7 +179,8 @@ } gpu::Mailbox mailbox = sii->CreateSharedImage( Format(), size, PredefinedColorSpaceToGfxColorSpace(color_space_), - kTopLeft_GrSurfaceOrigin, alpha_mode, usage, gpu::kNullSurfaceHandle); + kTopLeft_GrSurfaceOrigin, alpha_mode, usage, "WebGPUSwapBufferProvider", + gpu::kNullSurfaceHandle); gpu::SyncToken creation_token = sii->GenUnverifiedSyncToken(); unused_swap_buffers_.push_back(base::MakeRefCounted<SwapBuffer>(
diff --git a/third_party/blink/renderer/platform/graphics/gpu/xr_webgl_drawing_buffer.cc b/third_party/blink/renderer/platform/graphics/gpu/xr_webgl_drawing_buffer.cc index c233d7a..41341d9 100644 --- a/third_party/blink/renderer/platform/graphics/gpu/xr_webgl_drawing_buffer.cc +++ b/third_party/blink/renderer/platform/graphics/gpu/xr_webgl_drawing_buffer.cc
@@ -463,7 +463,7 @@ alpha_ ? viz::SinglePlaneFormat::kRGBA_8888 : viz::SinglePlaneFormat::kRGBX_8888, size_, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - usage, gpu::kNullSurfaceHandle); + usage, "XRWebGLDrawingBuffer", gpu::kNullSurfaceHandle); gpu::gles2::GLES2Interface* gl = drawing_buffer_->ContextGL(); gl->WaitSyncTokenCHROMIUM(sii->GenUnverifiedSyncToken().GetConstData());
diff --git a/third_party/blink/renderer/platform/graphics/gpu_memory_buffer_image_copy.cc b/third_party/blink/renderer/platform/graphics/gpu_memory_buffer_image_copy.cc index ce7107e..c44d02d 100644 --- a/third_party/blink/renderer/platform/graphics/gpu_memory_buffer_image_copy.cc +++ b/third_party/blink/renderer/platform/graphics/gpu_memory_buffer_image_copy.cc
@@ -49,7 +49,7 @@ dest_mailbox_ = sii_->CreateSharedImage( gpu_memory_buffer_.get(), gpu_memory_buffer_manager, gfx::ColorSpace(), kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, - gpu::SHARED_IMAGE_USAGE_GLES2); + gpu::SHARED_IMAGE_USAGE_GLES2, "GpuMemoryBufferImageCopy"); gl_->WaitSyncTokenCHROMIUM(sii_->GenUnverifiedSyncToken().GetConstData()); } return true;
diff --git a/third_party/blink/renderer/platform/graphics/web_graphics_context_3d_video_frame_pool.cc b/third_party/blink/renderer/platform/graphics/web_graphics_context_3d_video_frame_pool.cc index b2a9782a..62ece0d 100644 --- a/third_party/blink/renderer/platform/graphics/web_graphics_context_3d_video_frame_pool.cc +++ b/third_party/blink/renderer/platform/graphics/web_graphics_context_3d_video_frame_pool.cc
@@ -53,9 +53,9 @@ auto* sii = SharedImageInterface(); if (!sii || !gmb_manager_) return; - mailbox = - sii->CreateSharedImage(gpu_memory_buffer, gmb_manager_, plane, - color_space, surface_origin, alpha_type, usage); + mailbox = sii->CreateSharedImage( + gpu_memory_buffer, gmb_manager_, plane, color_space, surface_origin, + alpha_type, usage, "WebGraphicsContext2DVideoFramePool"); sync_token = sii->GenVerifiedSyncToken(); }
diff --git a/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc b/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc index 3f939ab..1a826c9 100644 --- a/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc +++ b/third_party/blink/renderer/platform/video_capture/video_capture_impl.cc
@@ -547,7 +547,8 @@ gpu_memory_buffer_.get(), buffer_context_->gpu_factories()->GpuMemoryBufferManager(), planes[plane], *(frame_info_->color_space), - kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage); + kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, usage, + "VideoCaptureFrameBuffer"); } else { sii->UpdateSharedImage( buffer_context_->gmb_resources()->release_sync_token,
diff --git a/third_party/blink/renderer/platform/webrtc/webrtc_video_frame_adapter.cc b/third_party/blink/renderer/platform/webrtc/webrtc_video_frame_adapter.cc index 9e0e9e5..d4d8271 100644 --- a/third_party/blink/renderer/platform/webrtc/webrtc_video_frame_adapter.cc +++ b/third_party/blink/renderer/platform/webrtc/webrtc_video_frame_adapter.cc
@@ -80,7 +80,7 @@ return; mailbox = sii->CreateSharedImage( gpu_memory_buffer, GpuMemoryBufferManager(), plane, color_space, - surface_origin, alpha_type, usage); + surface_origin, alpha_type, usage, "WebRTCVideoFramePool"); sync_token = sii->GenVerifiedSyncToken(); }
diff --git a/third_party/blink/web_tests/css3/blending/background-blend-mode-default-value-expected.png b/third_party/blink/web_tests/css3/blending/background-blend-mode-default-value-expected.png index f5bc0d9..9ef3d03 100644 --- a/third_party/blink/web_tests/css3/blending/background-blend-mode-default-value-expected.png +++ b/third_party/blink/web_tests/css3/blending/background-blend-mode-default-value-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/css3/blending/background-blend-mode-different-image-formats-expected.png b/third_party/blink/web_tests/css3/blending/background-blend-mode-different-image-formats-expected.png index afda319..8681a46 100644 --- a/third_party/blink/web_tests/css3/blending/background-blend-mode-different-image-formats-expected.png +++ b/third_party/blink/web_tests/css3/blending/background-blend-mode-different-image-formats-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/css3/blending/background-blend-mode-image-svg-expected.png b/third_party/blink/web_tests/css3/blending/background-blend-mode-image-svg-expected.png index a5db4c3..d83fa9c 100644 --- a/third_party/blink/web_tests/css3/blending/background-blend-mode-image-svg-expected.png +++ b/third_party/blink/web_tests/css3/blending/background-blend-mode-image-svg-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/css3/blending/background-blend-mode-multiple-background-layers-expected.png b/third_party/blink/web_tests/css3/blending/background-blend-mode-multiple-background-layers-expected.png index 8846410..4fdfd58 100644 --- a/third_party/blink/web_tests/css3/blending/background-blend-mode-multiple-background-layers-expected.png +++ b/third_party/blink/web_tests/css3/blending/background-blend-mode-multiple-background-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/css3/blending/background-blend-mode-single-layer-no-blending-expected.png b/third_party/blink/web_tests/css3/blending/background-blend-mode-single-layer-no-blending-expected.png index fd3d5521..1a9eaed 100644 --- a/third_party/blink/web_tests/css3/blending/background-blend-mode-single-layer-no-blending-expected.png +++ b/third_party/blink/web_tests/css3/blending/background-blend-mode-single-layer-no-blending-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/css3/blending/effect-background-blend-mode-stacking-expected.png b/third_party/blink/web_tests/css3/blending/effect-background-blend-mode-stacking-expected.png index e8f3a8b..e0c31a1 100644 --- a/third_party/blink/web_tests/css3/blending/effect-background-blend-mode-stacking-expected.png +++ b/third_party/blink/web_tests/css3/blending/effect-background-blend-mode-stacking-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/css3/blending/svg-blend-screen.html b/third_party/blink/web_tests/css3/blending/svg-blend-screen.html index 2aba973..da5a48424 100644 --- a/third_party/blink/web_tests/css3/blending/svg-blend-screen.html +++ b/third_party/blink/web_tests/css3/blending/svg-blend-screen.html
@@ -1,4 +1,5 @@ <!DOCTYPE HTML> +<meta name=fuzzy content="maxDifference=0-1;totalPixels=0-1600"> <html> <body> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400px" height="400px" >
diff --git a/third_party/blink/web_tests/css3/filters/effect-reference-zoom-expected.png b/third_party/blink/web_tests/css3/filters/effect-reference-zoom-expected.png index 78a0e0e..4ddfc50a 100644 --- a/third_party/blink/web_tests/css3/filters/effect-reference-zoom-expected.png +++ b/third_party/blink/web_tests/css3/filters/effect-reference-zoom-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json index b5ae7c9..8e6ecbb17 100644 --- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json +++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json
@@ -124695,7 +124695,7 @@ ] ], "font-variant-alternates-03.html": [ - "4270e2e0d3c62d87d18a45e3ed0919b07d51e973", + "1027363726771e9619a005be0d4ad125ed34fa95", [ null, [ @@ -124734,7 +124734,7 @@ ] ], "font-variant-alternates-06.html": [ - "bbeca548f6392ded819280fe55b85d976e69fe83", + "c3f315723cbbc8c7e7affe3d973c221d4571a512", [ null, [ @@ -124773,7 +124773,7 @@ ] ], "font-variant-alternates-09.html": [ - "7cc6a1a30aa12f28903ed7dab5138076f3eb19b3", + "2c67b1439e6de429e3749466ab4714898367a58c", [ null, [ @@ -124812,7 +124812,7 @@ ] ], "font-variant-alternates-12.html": [ - "12f1cc759555e81f8f6bf97952cec07d2a70fa3b", + "0f2b9d317b95a41c82f3a2d792f66c86146822fb", [ null, [ @@ -124851,7 +124851,7 @@ ] ], "font-variant-alternates-15.html": [ - "becb4d40b80aa366cb56fa3a188d1eef5992ce9f", + "58a58d3cd153cdd6e3c50fbc2484ad44c9a03ba2", [ null, [ @@ -124890,7 +124890,7 @@ ] ], "font-variant-alternates-18.html": [ - "8dfe0b8650319c2616f06ab7a9e07896c1e6aed1", + "26e1ecd0c222260114afee112e391d46481b9fc9", [ null, [ @@ -269813,11 +269813,11 @@ "support": { ".cache": { "gitignore2.json": [ - "d61b28b5f9bc94eac1ecbb1d0ce8aa1659e69b29", + "32c079baa62d30363e0c7c6df8f8e0dcefbc8505", [] ], "mtime.json": [ - "90847976db7fb31236cc41ee0f25a2ae554b25b8", + "faa20345fed4508dac76c376f4956f53422ee1a3", [] ] }, @@ -326914,6 +326914,10 @@ "1e55e271c6c6f134ac658bcefa5369580ea553da", [] ], + "kind-of-widget-fallback-input-submit-border-start-start-radius-001.html.ini": [ + "7df7d274d7a0b91fd8dd0a4169cd2da62df60762", + [] + ], "kind-of-widget-fallback-input-submit-border-top-color-001.html.ini": [ "8f6cdb84c0bbeceff6df85dfaca7729445b74cf4", [] @@ -439051,7 +439055,7 @@ ] ], "content-visibility-077.html": [ - "a684bdddb00b43e119c2ba7f3ab3f1e4a72ac52c", + "9f2c69e9cf853b267e0f60b75c4f770b54a19e35", [ null, {} @@ -453514,7 +453518,7 @@ ], "parsing": { "contain-intrinsic-size-computed.html": [ - "c03b282699777728e36dba774ecd455d98745532", + "18461c0ed2e818b40584c85fbcb70d3a760b8d3e", [ null, {}
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-03.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-03.html index 4270e2e0..1027363 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-03.html +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-03.html
@@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: character-variant(doesnt-exist) styleset(doesnt-exist); } .high { font-variant-alternates: stylistic(foo);
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-06.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-06.html index bbeca548..c3f31572 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-06.html +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-06.html
@@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: styleset(doesnt-exist); } .high { font-variant-alternates: styleset(foo);
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-09.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-09.html index 7cc6a1a..2c67b14 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-09.html +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-09.html
@@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: character-variant(doesnt-exist); } .high { font-variant-alternates: character-variant(foo);
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-12.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-12.html index 12f1cc7..0f2b9d3 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-12.html +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-12.html
@@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: swash(doesnt-exist); } .high { font-variant-alternates: swash(foo);
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-15.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-15.html index becb4d40..58a58d3 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-15.html +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-15.html
@@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: ornaments(doesnt-exist); } .high { font-variant-alternates: ornaments(foo);
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-18.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-18.html index 8dfe0b8..26e1ecd0 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-18.html +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-variant-alternates-18.html
@@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: annotation(doesnt-exist); } .high { font-variant-alternates: annotation(foo);
diff --git a/third_party/blink/web_tests/external/wpt/css/css-ui/compute-kind-widget-generated/kind-of-widget-fallback-input-submit-border-start-start-radius-001.html.ini b/third_party/blink/web_tests/external/wpt/css/css-ui/compute-kind-widget-generated/kind-of-widget-fallback-input-submit-border-start-start-radius-001.html.ini new file mode 100644 index 0000000..7df7d274 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-ui/compute-kind-widget-generated/kind-of-widget-fallback-input-submit-border-start-start-radius-001.html.ini
@@ -0,0 +1,3 @@ +[kind-of-widget-fallback-input-submit-border-start-start-radius-001.html] + expected: + if (product == "content_shell") and (os == "win") and (port == "win11"): FAIL
diff --git a/third_party/blink/web_tests/external/wpt/trust-tokens/end-to-end/has-trust-token-with-no-top-frame.tentative.https.html b/third_party/blink/web_tests/external/wpt/trust-tokens/end-to-end/has-trust-token-with-no-top-frame.tentative.https.html index 587c641..a384bec3 100644 --- a/third_party/blink/web_tests/external/wpt/trust-tokens/end-to-end/has-trust-token-with-no-top-frame.tentative.https.html +++ b/third_party/blink/web_tests/external/wpt/trust-tokens/end-to-end/has-trust-token-with-no-top-frame.tentative.https.html
@@ -15,7 +15,7 @@ frame.remove(); test(() => { - assert_equals(cachedDocument.hasPrivateToken("https://issuer.example", 'private-state-token'), undefined, + assert_equals(cachedDocument.hasPrivateToken("https://issuer.example"), undefined, "Can't construct a Promise in a destroyed execution context."); }, 'hasPrivateToken in a destroyed document.'); </script>
diff --git a/third_party/blink/web_tests/fast/backgrounds/mask-box-image-expected.png b/third_party/blink/web_tests/fast/backgrounds/mask-box-image-expected.png index d8e89b31..ded2a3d 100644 --- a/third_party/blink/web_tests/fast/backgrounds/mask-box-image-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/mask-box-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize05-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize05-expected.png index 50d0c4e9..8ca8d4b 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize05-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize05-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize09-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize09-expected.png index 5045e48..00e56b8e 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize09-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize09-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize10-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize10-expected.png index 18c7735..0b6c2842 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize10-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize10-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize11-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize11-expected.png index ef16225..053ba24 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize11-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize11-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize18-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize18-expected.png index b16289d8..68cbafb 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize18-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize18-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize19-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize19-expected.png index 88ae889..1d800c4 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize19-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize19-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize21-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize21-expected.png index b16289d8..68cbafb 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize21-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize21-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize22-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize22-expected.png index d6a8962..65dc4da 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize22-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/backgroundSize22-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/contain-and-cover-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/contain-and-cover-expected.png index 0afb9b40..5783d9d 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/contain-and-cover-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/contain-and-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/backgrounds/size/contain-and-cover-zoomed-expected.png b/third_party/blink/web_tests/fast/backgrounds/size/contain-and-cover-zoomed-expected.png index 3e5e91d..7fb906b8 100644 --- a/third_party/blink/web_tests/fast/backgrounds/size/contain-and-cover-zoomed-expected.png +++ b/third_party/blink/web_tests/fast/backgrounds/size/contain-and-cover-zoomed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-composite-transformclip-expected.png b/third_party/blink/web_tests/fast/canvas/canvas-composite-transformclip-expected.png index 46c6cfce..54ce94a 100644 --- a/third_party/blink/web_tests/fast/canvas/canvas-composite-transformclip-expected.png +++ b/third_party/blink/web_tests/fast/canvas/canvas-composite-transformclip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/forms/input-common/input-intrinsic-size.html b/third_party/blink/web_tests/fast/forms/input-common/input-intrinsic-size.html new file mode 100644 index 0000000..16226bce --- /dev/null +++ b/third_party/blink/web_tests/fast/forms/input-common/input-intrinsic-size.html
@@ -0,0 +1,71 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/1432386"> +<link rel="help" href="https://crbug.com/1432710"> +<link rel="help" href="https://crbug.com/1433510"> +<link rel="help" href="https://crbug.com/1434198"> +<body> +<script src="../../../resources/testharness.js"></script> +<script src="../../../resources/testharnessreport.js"></script> +<script> +const types = ['hidden', 'text', 'search', 'tel', 'url', 'email', 'password', + 'date', 'month', 'week', 'time', 'datetime-local', 'number', 'range', + 'color', 'checkbox', 'radio', 'file', 'submit', 'image', 'reset', 'button']; +for (let type of types) { + const input = document.createElement('input'); + input.type = type; + document.body.append(input); + const originalRect = input.getBoundingClientRect(); + if (type == 'image') { + // The behavior of type=image without an image is not similar to other + // types. + } else if (type == 'hidden') { + test(() => { + assert_equals(originalRect.width, 0); + assert_equals(originalRect.height, 0); + }, 'Hidden size should be 0x0'); + } else { + test(() => { + const i = document.body.appendChild(input.cloneNode()); + i.style.position = 'absolute'; + const rect = i.getBoundingClientRect(); + assert_equals(rect.width, originalRect.width); + assert_equals(rect.height, originalRect.height); + }, `${type}: absolute posistion`); + + test(() => { + const c = document.createElement('div'); + document.body.append(c); + const i = c.appendChild(input.cloneNode()); + i.style.height = '100%'; + const rect = i.getBoundingClientRect(); + assert_equals(rect.width, originalRect.width); + assert_equals(rect.height, originalRect.height); + }, `${type}: percent height`); + + test(() => { + const i = document.body.appendChild(input.cloneNode()); + i.style.height = 'auto'; + i.style.minHeight = '4px'; + const rect = i.getBoundingClientRect(); + assert_equals(rect.width, originalRect.width); + assert_equals(rect.height, originalRect.height); + }, `${type}: min-height`); + + test(() => { + const i = document.body.appendChild(input.cloneNode()); + i.style.appearance = 'none'; + i.style.display = 'inline'; + const rect = i.getBoundingClientRect(); + if (type == 'checkbox' || type == 'radio') { + // These types without appearance work as inline elements. + assert_equals(rect.width, 0); + } else { + assert_equals(rect.width, originalRect.width); + assert_equals(rect.height, originalRect.height); + } + }, `${type}: display:inline`); + } +} +</script> +</body> +
diff --git a/third_party/blink/web_tests/fast/reflections/reflection-masks-expected.png b/third_party/blink/web_tests/fast/reflections/reflection-masks-expected.png index 173f521..fe3a00a6 100644 --- a/third_party/blink/web_tests/fast/reflections/reflection-masks-expected.png +++ b/third_party/blink/web_tests/fast/reflections/reflection-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/reflections/reflection-masks-opacity-expected.png b/third_party/blink/web_tests/fast/reflections/reflection-masks-opacity-expected.png index a494426..3d069fe0 100644 --- a/third_party/blink/web_tests/fast/reflections/reflection-masks-opacity-expected.png +++ b/third_party/blink/web_tests/fast/reflections/reflection-masks-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/reflections/reflection-with-zoom-expected.png b/third_party/blink/web_tests/fast/reflections/reflection-with-zoom-expected.png index b6bf52f..04ce746 100644 --- a/third_party/blink/web_tests/fast/reflections/reflection-with-zoom-expected.png +++ b/third_party/blink/web_tests/fast/reflections/reflection-with-zoom-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-blob-resize-expected.png b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-blob-resize-expected.png index 3b06f5d..a8f6ad2 100644 --- a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-blob-resize-expected.png +++ b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-blob-resize-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-canvas-resize-expected.png b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-canvas-resize-expected.png index 3b06f5d..a8f6ad2 100644 --- a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-canvas-resize-expected.png +++ b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-canvas-resize-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-image-resize-expected.png b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-image-resize-expected.png index 3b06f5d..a8f6ad2 100644 --- a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-image-resize-expected.png +++ b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-image-resize-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize-expected.png b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize-expected.png index 3b06f5d..a8f6ad2 100644 --- a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize-expected.png +++ b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-offscreen-canvas-resize-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-video-resize-expected.png b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-video-resize-expected.png index e0b51357..0fc3e0e 100644 --- a/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-video-resize-expected.png +++ b/third_party/blink/web_tests/fast/webgl/texImage-imageBitmap-from-video-resize-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/compositing/masks/masked-ancestor-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/compositing/masks/masked-ancestor-expected.png new file mode 100644 index 0000000..a055084 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/compositing/masks/simple-composited-mask-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/compositing/masks/simple-composited-mask-expected.png new file mode 100644 index 0000000..7591c4a --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/compositing/masks/simple-composited-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png index dbda4cc..15f0fa2 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png new file mode 100644 index 0000000..c1da17cb --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/paint/masks/fieldset-mask-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/paint/masks/fieldset-mask-expected.png index beef076..4e42bc8 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/paint/masks/fieldset-mask-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/paint/masks/fieldset-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png new file mode 100644 index 0000000..bb96c69 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/batik/masking/maskRegions-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/svg/batik/masking/maskRegions-expected.png new file mode 100644 index 0000000..8247aba --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/grayscale-gradient-mask-2-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/grayscale-gradient-mask-2-expected.png new file mode 100644 index 0000000..e0dd2b4 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/grayscale-gradient-mask-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/grayscale-gradient-mask-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/grayscale-gradient-mask-expected.png new file mode 100644 index 0000000..f78adab6 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/grayscale-gradient-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/filters/filter-clip-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/svg/filters/filter-clip-expected.png new file mode 100644 index 0000000..5a45a64 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/filters/filter-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/svg/zoom/page/zoom-mask-with-percentages-expected.png new file mode 100644 index 0000000..cd88696 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/tables/mozilla/bugs/bug4427-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/tables/mozilla/bugs/bug4427-expected.png new file mode 100644 index 0000000..ec83a623 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/tables/mozilla/bugs/bug4427-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-auto1-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-auto1-expected.png index 79bf6ba9..5092258 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-auto1-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-auto1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-border-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-border-expected.png index 0dd01a1d..a49ecafe 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-border-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-border-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-content-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-content-expected.png index 4e3c22d..070c10d5 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-content-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-content-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-padding-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-padding-expected.png index c2aa977..3963bd6 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-padding-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/background/background-repeat-round-padding-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/background-blend-mode-multiple-background-layers-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/background-blend-mode-multiple-background-layers-expected.png index 316441c9..f3dfdc2 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/background-blend-mode-multiple-background-layers-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/background-blend-mode-multiple-background-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/background-blend-mode-single-layer-no-blending-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/background-blend-mode-single-layer-no-blending-expected.png index 3f7533c..907d9b7 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/background-blend-mode-single-layer-no-blending-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/background-blend-mode-single-layer-no-blending-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/effect-background-blend-mode-stacking-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/effect-background-blend-mode-stacking-expected.png index 186469b..46f6da4 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/effect-background-blend-mode-stacking-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/effect-background-blend-mode-stacking-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/mix-blend-mode-isolated-group-3-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/mix-blend-mode-isolated-group-3-expected.png index 3b5f425..330bfed 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/mix-blend-mode-isolated-group-3-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/blending/mix-blend-mode-isolated-group-3-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-auto1-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-auto1-expected.png index 45c4ee7..25c1427 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-auto1-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-auto1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-border-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-border-expected.png index fa09eaa..407a3ed 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-border-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-border-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-content-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-content-expected.png index bfe7d48..434ba06 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-content-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-content-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-padding-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-padding-expected.png index 47ceeca..09d0dabc 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-padding-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/css3/masking/mask-repeat-round-padding-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/http/tests/loading/trust-tokens/has-trust-token.tentative.https.html b/third_party/blink/web_tests/http/tests/loading/trust-tokens/has-trust-token.tentative.https.html index b0274d4..05b3ba7 100644 --- a/third_party/blink/web_tests/http/tests/loading/trust-tokens/has-trust-token.tentative.https.html +++ b/third_party/blink/web_tests/http/tests/loading/trust-tokens/has-trust-token.tentative.https.html
@@ -10,22 +10,16 @@ promise_test((t) => { return promise_rejects_js(t, TypeError, document.hasPrivateToken( - "http://not-a-secure-url.example", 'private-state-token')); + "http://not-a-secure-url.example")); }, 'hasPrivateToken requires a secure URL as its issuer argument.'); promise_test((t) => { return promise_rejects_js(t, TypeError, document.hasPrivateToken( - "file:///", 'private-state-token')); + "file:///")); }, 'hasPrivateToken requires a HTTP(S) URL as its issuer argument.'); - promise_test((t) => { - return promise_rejects_js(t, TypeError, document.hasPrivateToken( - "https://issuer.example/", 'some-other-token')); - }, - 'hasPrivateToken type must be private-state-token.'); - // These hasPrivateToken calls all affect global state: each call in the form // of hasPrivateToken(issuer) will result in |issuer| becoming associated in // persistent storage with the calling top frame's origin. @@ -39,23 +33,23 @@ await new Promise(res => window.testRunner.clearTrustTokenState(res)); }); - let result = await document.hasPrivateToken("https://issuer.example/", 'private-state-token'); + let result = await document.hasPrivateToken("https://issuer.example/"); assert_false(result, "The client should not possess any private state tokens for " + "https://issuer.example since it has not executed an issuance operation" + " against that issuer."); - result = await document.hasPrivateToken("https://issuer2.example/", 'private-state-token'); + result = await document.hasPrivateToken("https://issuer2.example/"); assert_false(result, "The client should not possess any private state tokens for" + " https://issuer2.example since it has not executed an issuance " + "operation against that issuer."); await promise_rejects_dom(t, "OperationError", document.hasPrivateToken( - "https://issuer3.example/", 'private-state-token'), + "https://issuer3.example/"), "The first two hasPrivateToken operations associated this top-level" + " origin with the maximum number of issuers (2), so an attempt to " + " execute hasPrivateToken against another issuer should fail."); - result = await document.hasPrivateToken("https://issuer2.example/", 'private-state-token'); + result = await document.hasPrivateToken("https://issuer2.example/"); assert_false(result, "Since this top-level origin is already associated " + "with https://issuer2.example, subsequent hasPrivateToken operations should " + "not error out even though the top-level origin is at its " + @@ -65,7 +59,7 @@ await new Promise(res => window.testRunner.clearTrustTokenState(res) ); - result = await document.hasPrivateToken("https://issuer3.example/", 'private-state-token'); + result = await document.hasPrivateToken("https://issuer3.example/"); assert_false(result, "Since state was cleared, it should be possible to" + "run hasPrivateToken against more issuers."); }
diff --git a/third_party/blink/web_tests/images/color-profile-background-image-cover-expected.png b/third_party/blink/web_tests/images/color-profile-background-image-cover-expected.png index d6f8669..e1bae9f0 100644 --- a/third_party/blink/web_tests/images/color-profile-background-image-cover-expected.png +++ b/third_party/blink/web_tests/images/color-profile-background-image-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/images/cross-fade-tiled-expected.png b/third_party/blink/web_tests/images/cross-fade-tiled-expected.png index 908810c..16465d9 100644 --- a/third_party/blink/web_tests/images/cross-fade-tiled-expected.png +++ b/third_party/blink/web_tests/images/cross-fade-tiled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png b/third_party/blink/web_tests/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png index cff12fe..cd00b26f 100644 --- a/third_party/blink/web_tests/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png +++ b/third_party/blink/web_tests/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/paint/invalidation/svg/js-update-image-expected.png b/third_party/blink/web_tests/paint/invalidation/svg/js-update-image-expected.png index c93cffd..9d58a536 100644 --- a/third_party/blink/web_tests/paint/invalidation/svg/js-update-image-expected.png +++ b/third_party/blink/web_tests/paint/invalidation/svg/js-update-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/paint/masks/fieldset-mask-expected.png b/third_party/blink/web_tests/paint/masks/fieldset-mask-expected.png index 6c74deb..8315143 100644 --- a/third_party/blink/web_tests/paint/masks/fieldset-mask-expected.png +++ b/third_party/blink/web_tests/paint/masks/fieldset-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/compositing/img-layer-object-fit-expected.png b/third_party/blink/web_tests/platform/linux/compositing/img-layer-object-fit-expected.png index 6952879..90fce73 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/img-layer-object-fit-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/img-layer-object-fit-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/compositing/masks/direct-image-mask-expected.png b/third_party/blink/web_tests/platform/linux/compositing/masks/direct-image-mask-expected.png index af2e6bcd..f6eac64b 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/masks/direct-image-mask-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/masks/direct-image-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/compositing/masks/mask-with-added-filters-expected.png b/third_party/blink/web_tests/platform/linux/compositing/masks/mask-with-added-filters-expected.png index 21965a3..eee50fd 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/masks/mask-with-added-filters-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/masks/mask-with-added-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/compositing/masks/mask-with-removed-filters-expected.png b/third_party/blink/web_tests/platform/linux/compositing/masks/mask-with-removed-filters-expected.png index f8555856..0dcae1b 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/masks/mask-with-removed-filters-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/masks/mask-with-removed-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/compositing/masks/masked-ancestor-expected.png b/third_party/blink/web_tests/platform/linux/compositing/masks/masked-ancestor-expected.png index a055084..64e06cc 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/masks/masked-ancestor-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/compositing/masks/multiple-masks-expected.png b/third_party/blink/web_tests/platform/linux/compositing/masks/multiple-masks-expected.png index d01220c..ea02cfc 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/masks/multiple-masks-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/masks/multiple-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/compositing/masks/simple-composited-mask-expected.png b/third_party/blink/web_tests/platform/linux/compositing/masks/simple-composited-mask-expected.png index 7591c4a..290d75f 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/masks/simple-composited-mask-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/masks/simple-composited-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png index 272164f..d8ec334 100644 --- a/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png +++ b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-gradient-image-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-gradient-image-expected.png index 689061e..1144c0b2 100644 --- a/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-gradient-image-expected.png +++ b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-gradient-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-image-color-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-image-color-expected.png new file mode 100644 index 0000000..cb62a66 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-image-color-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-image-image-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-image-image-expected.png new file mode 100644 index 0000000..b7529481 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-image-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-tiled-gradient-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-tiled-gradient-expected.png index 290256ac..b9c929e 100644 --- a/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-tiled-gradient-expected.png +++ b/third_party/blink/web_tests/platform/linux/css3/blending/background-blend-mode-tiled-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/effect-background-blend-mode-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/effect-background-blend-mode-expected.png index d703a14..2383b51 100644 --- a/third_party/blink/web_tests/platform/linux/css3/blending/effect-background-blend-mode-expected.png +++ b/third_party/blink/web_tests/platform/linux/css3/blending/effect-background-blend-mode-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/effect-background-blend-mode-tiled-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/effect-background-blend-mode-tiled-expected.png index d2e9d1e..fdef74a 100644 --- a/third_party/blink/web_tests/platform/linux/css3/blending/effect-background-blend-mode-tiled-expected.png +++ b/third_party/blink/web_tests/platform/linux/css3/blending/effect-background-blend-mode-tiled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-1-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-1-expected.png index 26e37aa..89591df 100644 --- a/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-1-expected.png +++ b/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-2-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-2-expected.png index ee2cc4f..9621add0 100644 --- a/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-2-expected.png +++ b/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-3-expected.png b/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-3-expected.png index f89025a..468d8cf 100644 --- a/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-3-expected.png +++ b/third_party/blink/web_tests/platform/linux/css3/blending/mix-blend-mode-isolated-group-3-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/backgroundSize16-expected.png b/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/backgroundSize16-expected.png index f0e8a7a..061fe8f 100644 --- a/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/backgroundSize16-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/backgroundSize16-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/contain-and-cover-expected.png b/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/contain-and-cover-expected.png index 56160fcc..0d8ea56 100644 --- a/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/contain-and-cover-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/contain-and-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/contain-and-cover-zoomed-expected.png b/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/contain-and-cover-zoomed-expected.png index d4b19944..99dee24 100644 --- a/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/contain-and-cover-zoomed-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/backgrounds/size/contain-and-cover-zoomed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/borders/block-mask-overlay-image-expected.png b/third_party/blink/web_tests/platform/linux/fast/borders/block-mask-overlay-image-expected.png index f9c9c4d6..92e04f5 100644 --- a/third_party/blink/web_tests/platform/linux/fast/borders/block-mask-overlay-image-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/borders/block-mask-overlay-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/borders/block-mask-overlay-image-outset-expected.png b/third_party/blink/web_tests/platform/linux/fast/borders/block-mask-overlay-image-outset-expected.png index c6eaa89..3a52a1a3 100644 --- a/third_party/blink/web_tests/platform/linux/fast/borders/block-mask-overlay-image-outset-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/borders/block-mask-overlay-image-outset-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/borders/inline-mask-overlay-image-expected.png b/third_party/blink/web_tests/platform/linux/fast/borders/inline-mask-overlay-image-expected.png index 044f151..08fe0f7 100644 --- a/third_party/blink/web_tests/platform/linux/fast/borders/inline-mask-overlay-image-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/borders/inline-mask-overlay-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/borders/inline-mask-overlay-image-outset-expected.png b/third_party/blink/web_tests/platform/linux/fast/borders/inline-mask-overlay-image-outset-expected.png index 42a7f6b..473420f 100644 --- a/third_party/blink/web_tests/platform/linux/fast/borders/inline-mask-overlay-image-outset-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/borders/inline-mask-overlay-image-outset-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-expected.png index e3d21377c..913823b1 100644 --- a/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part1-expected.png b/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part1-expected.png index 5277f6f..8554db71 100644 --- a/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part1-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part2-expected.png b/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part2-expected.png index 6271b83..b9eb8f7d 100644 --- a/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part2-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/canvas/canvas-composite-shadow-part2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/forms/input-common/input-intrinsic-size-expected.txt b/third_party/blink/web_tests/platform/linux/fast/forms/input-common/input-intrinsic-size-expected.txt new file mode 100644 index 0000000..61d86be2 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/fast/forms/input-common/input-intrinsic-size-expected.txt
@@ -0,0 +1,84 @@ +This is a testharness.js-based test. +PASS Hidden size should be 0x0 +PASS text: absolute posistion +PASS text: percent height +PASS text: min-height +PASS text: display:inline +PASS search: absolute posistion +PASS search: percent height +PASS search: min-height +PASS search: display:inline +PASS tel: absolute posistion +PASS tel: percent height +PASS tel: min-height +PASS tel: display:inline +PASS url: absolute posistion +PASS url: percent height +PASS url: min-height +PASS url: display:inline +PASS email: absolute posistion +PASS email: percent height +PASS email: min-height +PASS email: display:inline +PASS password: absolute posistion +PASS password: percent height +PASS password: min-height +PASS password: display:inline +PASS date: absolute posistion +PASS date: percent height +PASS date: min-height +FAIL date: display:inline assert_equals: expected 124.328125 but got 784 +PASS month: absolute posistion +PASS month: percent height +PASS month: min-height +FAIL month: display:inline assert_equals: expected 154.328125 but got 784 +PASS week: absolute posistion +PASS week: percent height +PASS week: min-height +FAIL week: display:inline assert_equals: expected 146.328125 but got 784 +PASS time: absolute posistion +PASS time: percent height +PASS time: min-height +FAIL time: display:inline assert_equals: expected 99 but got 769 +PASS datetime-local: absolute posistion +PASS datetime-local: percent height +PASS datetime-local: min-height +FAIL datetime-local: display:inline assert_equals: expected 206.328125 but got 769 +PASS number: absolute posistion +PASS number: percent height +PASS number: min-height +PASS number: display:inline +PASS range: absolute posistion +PASS range: percent height +PASS range: min-height +PASS range: display:inline +PASS color: absolute posistion +FAIL color: percent height assert_equals: expected 27 but got 14 +FAIL color: min-height assert_equals: expected 27 but got 14 +FAIL color: display:inline assert_equals: expected 50 but got 769 +PASS checkbox: absolute posistion +PASS checkbox: percent height +PASS checkbox: min-height +PASS checkbox: display:inline +PASS radio: absolute posistion +PASS radio: percent height +PASS radio: min-height +PASS radio: display:inline +PASS file: absolute posistion +PASS file: percent height +PASS file: min-height +PASS file: display:inline +PASS submit: absolute posistion +PASS submit: percent height +PASS submit: min-height +PASS submit: display:inline +PASS reset: absolute posistion +PASS reset: percent height +PASS reset: min-height +PASS reset: display:inline +PASS button: absolute posistion +PASS button: percent height +PASS button: min-height +PASS button: display:inline +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index c1da17cb..7f305274 100644 --- a/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png b/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png index 7b48a462..e08a502d 100644 --- a/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png +++ b/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/paint/masks/fieldset-mask-expected.png b/third_party/blink/web_tests/platform/linux/paint/masks/fieldset-mask-expected.png index 44e0fbcc..f26ffbdc 100644 --- a/third_party/blink/web_tests/platform/linux/paint/masks/fieldset-mask-expected.png +++ b/third_party/blink/web_tests/platform/linux/paint/masks/fieldset-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png index 554ec64a..ac03f6dc 100644 --- a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png index c606f4ec..2dc2ba3 100644 --- a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index 9db6e597..7bcacc87 100644 --- a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png index bb96c69..4f3bfdc9 100644 --- a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png index 62bc0c3e..ed7feb2f 100644 --- a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-path-04-b-expected.png b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-path-04-b-expected.png index acec20a..aa9882a 100644 --- a/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-path-04-b-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/W3C-SVG-1.1/masking-path-04-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png b/third_party/blink/web_tests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png index 144e126..a7e00a0 100644 --- a/third_party/blink/web_tests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/batik/masking/maskRegions-expected.png b/third_party/blink/web_tests/platform/linux/svg/batik/masking/maskRegions-expected.png index 8247aba..ecfe10d2 100644 --- a/third_party/blink/web_tests/platform/linux/svg/batik/masking/maskRegions-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/batik/text/textEffect2-expected.png b/third_party/blink/web_tests/platform/linux/svg/batik/text/textEffect2-expected.png index 838214b..561f00f 100644 --- a/third_party/blink/web_tests/platform/linux/svg/batik/text/textEffect2-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/batik/text/textEffect2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/batik/text/textProperties-expected.png b/third_party/blink/web_tests/platform/linux/svg/batik/text/textProperties-expected.png index a41f0d2..cfce306 100644 --- a/third_party/blink/web_tests/platform/linux/svg/batik/text/textProperties-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/batik/text/textProperties-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/carto.net/selectionlist-expected.png b/third_party/blink/web_tests/platform/linux/svg/carto.net/selectionlist-expected.png index d6fdd70ca..e8db286f 100644 --- a/third_party/blink/web_tests/platform/linux/svg/carto.net/selectionlist-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/carto.net/selectionlist-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/custom/clip-mask-negative-scale-expected.png b/third_party/blink/web_tests/platform/linux/svg/custom/clip-mask-negative-scale-expected.png index 4fa1bb6..d5cf659 100644 --- a/third_party/blink/web_tests/platform/linux/svg/custom/clip-mask-negative-scale-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/custom/createImageElement2-expected.png b/third_party/blink/web_tests/platform/linux/svg/custom/createImageElement2-expected.png index 48aa65b..898a880 100644 --- a/third_party/blink/web_tests/platform/linux/svg/custom/createImageElement2-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/custom/createImageElement2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/custom/image-parent-translation-expected.png b/third_party/blink/web_tests/platform/linux/svg/custom/image-parent-translation-expected.png index d01bd140..9aae007d 100644 --- a/third_party/blink/web_tests/platform/linux/svg/custom/image-parent-translation-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/custom/image-parent-translation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/custom/image-small-width-height-expected.png b/third_party/blink/web_tests/platform/linux/svg/custom/image-small-width-height-expected.png index a804d0e..2dc9bb18 100644 --- a/third_party/blink/web_tests/platform/linux/svg/custom/image-small-width-height-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/custom/image-small-width-height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/custom/pointer-events-image-css-transform-expected.png b/third_party/blink/web_tests/platform/linux/svg/custom/pointer-events-image-css-transform-expected.png index 8846ef94..60e8e7b7 100644 --- a/third_party/blink/web_tests/platform/linux/svg/custom/pointer-events-image-css-transform-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/custom/pointer-events-image-css-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/custom/pointer-events-image-expected.png b/third_party/blink/web_tests/platform/linux/svg/custom/pointer-events-image-expected.png index 8846ef94..60e8e7b7 100644 --- a/third_party/blink/web_tests/platform/linux/svg/custom/pointer-events-image-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/custom/pointer-events-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/custom/text-image-opacity-expected.png b/third_party/blink/web_tests/platform/linux/svg/custom/text-image-opacity-expected.png index 6a1bcfe..8432059 100644 --- a/third_party/blink/web_tests/platform/linux/svg/custom/text-image-opacity-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/custom/text-image-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/blink/web_tests/platform/linux/svg/transforms/text-with-mask-with-svg-transform-expected.png index 7833ecc9..22bbd80 100644 --- a/third_party/blink/web_tests/platform/linux/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/wicd/test-rightsizing-b-expected.png b/third_party/blink/web_tests/platform/linux/svg/wicd/test-rightsizing-b-expected.png index eb457cbe..5b55ca0 100644 --- a/third_party/blink/web_tests/platform/linux/svg/wicd/test-rightsizing-b-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/wicd/test-rightsizing-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/blink/web_tests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png index cd88696..9bc9999 100644 --- a/third_party/blink/web_tests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug101674-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug101674-expected.png index da98207a..14e78866 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug101674-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug101674-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug11026-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug11026-expected.png index c1de732..4e4ac61 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug11026-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug11026-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug1296-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug1296-expected.png index a760f37c..0a77fed 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug1296-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug1296-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug1430-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug1430-expected.png index 3f79ad3b..0e00909 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug1430-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug1430-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug4093-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug4093-expected.png index cedbf63..68718ca 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug4093-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug4093-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug4427-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug4427-expected.png index ec83a623..f68abce 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug4427-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug4427-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug625-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug625-expected.png index 179ba16..2081afd 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug625-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug625-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png index e987397f..4e4f892 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png index c141a3d..d553186 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/cross-fade-tiled-expected.png b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/cross-fade-tiled-expected.png index 8253623..4f776a4d 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/cross-fade-tiled-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/cross-fade-tiled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png index 84e82a8..f013fad2 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png b/third_party/blink/web_tests/platform/linux/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png deleted file mode 100644 index 1dc4ee9..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/linux/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png index bdc645b4..71d5c5d0 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/text-antialias/colrv1-expected.png b/third_party/blink/web_tests/platform/linux/virtual/text-antialias/colrv1-expected.png index c3fa015..7a8c8dc 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/text-antialias/colrv1-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/text-antialias/colrv1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/text-antialias/colrv1-variable-expected.png b/third_party/blink/web_tests/platform/linux/virtual/text-antialias/colrv1-variable-expected.png index c93938a1..382151b1 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/text-antialias/colrv1-variable-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/text-antialias/colrv1-variable-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png new file mode 100644 index 0000000..d2657489 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png new file mode 100644 index 0000000..a9c51d83 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png new file mode 100644 index 0000000..d2bf2d1 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png new file mode 100644 index 0000000..0fd1ef8 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/text-antialias/colrv1-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/text-antialias/colrv1-expected.png index be45727..e49fe5ec 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/text-antialias/colrv1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/text-antialias/colrv1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/text-antialias/colrv1-variable-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/text-antialias/colrv1-variable-expected.png index 1fcb9d2..c01aa6f 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/text-antialias/colrv1-variable-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/text-antialias/colrv1-variable-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug4093-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug4093-expected.png index d62eda0..9304457 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug4093-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug4093-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png new file mode 100644 index 0000000..d2657489 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png new file mode 100644 index 0000000..a9c51d83 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png new file mode 100644 index 0000000..d2bf2d1 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png new file mode 100644 index 0000000..0fd1ef8 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/oopr-canvas2d/fast/canvas/canvas-composite-video-shadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/direct-image-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/direct-image-mask-expected.png new file mode 100644 index 0000000..091e5e72 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/direct-image-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/mask-with-added-filters-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/mask-with-added-filters-expected.png new file mode 100644 index 0000000..3a4d00e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/mask-with-added-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/mask-with-removed-filters-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/mask-with-removed-filters-expected.png new file mode 100644 index 0000000..2df70a3 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/mask-with-removed-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/masked-ancestor-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/masked-ancestor-expected.png new file mode 100644 index 0000000..33245f2 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/multiple-masks-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/multiple-masks-expected.png new file mode 100644 index 0000000..47bbb0e2 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/multiple-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/simple-composited-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/simple-composited-mask-expected.png new file mode 100644 index 0000000..324c154 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/masks/simple-composited-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/reflections/nested-reflection-transformed-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/reflections/nested-reflection-transformed-expected.png index cd6d214b..9cd5e595 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/reflections/nested-reflection-transformed-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/reflections/nested-reflection-transformed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/reflections/nested-reflection-transformed2-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/reflections/nested-reflection-transformed2-expected.png index 9517ed2a..63ca2bab 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/reflections/nested-reflection-transformed2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/compositing/reflections/nested-reflection-transformed2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png index fd93080..6517ff81 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-default-value-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-default-value-expected.png index 136cf094..963ce47f1 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-default-value-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-default-value-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-gradient-image-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-gradient-image-expected.png index 8f9c329..45e1cc1 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-gradient-image-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-gradient-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-color-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-color-expected.png index c6fe0273..cb1ce20b8 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-color-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-color-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-image-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-image-expected.png index a359a901..94de201 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-image-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-svg-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-svg-expected.png index b8db093..7712738d 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-svg-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-image-svg-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png new file mode 100644 index 0000000..9393153b --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png index 0844fc2..13ed6c28 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-expected.png index 336b69e..518d091 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png index e09a109..9855e19 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png index bfb8d65a2..a6186014 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png index b6df961..fb5f1dc 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-colorspace-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-colorspace-expected.png index ce4788d..ac54075 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-colorspace-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-colorspace-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-composite-expected.png new file mode 100644 index 0000000..2a99c1d --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-expected.png index 6231976..668a681 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-subregion-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-subregion-expected.png index 5952f66..69c6c3f 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-subregion-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-subregion-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-zoom-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-zoom-expected.png index d9050d8..e9e0e89 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-zoom-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/css3/filters/effect-reference-zoom-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/mask-box-image-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/mask-box-image-expected.png new file mode 100644 index 0000000..8c51e74 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/mask-box-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/backgroundSize16-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/backgroundSize16-expected.png index 20c6164..776b5f1 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/backgroundSize16-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/backgroundSize16-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/contain-and-cover-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/contain-and-cover-expected.png index 4e617fb..97234d3d 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/contain-and-cover-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/contain-and-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png index 3396b25..bcb93a1 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-expected.png index 178bbd0..69fd2366 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png index a91f202..d096a1f 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-transformclip-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-transformclip-expected.png index 0ae4c0a..b1d2285 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-transformclip-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-transformclip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-expected.png index 42092b84..2dd39edc 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-shadow-expected.png index bbddf25f..c4e5e82b 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-shadow-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/canvas/canvas-composite-video-shadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/css/transformed-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/css/transformed-mask-expected.png index 6735bae..d14a828 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/css/transformed-mask-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/css/transformed-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-masks-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-masks-expected.png new file mode 100644 index 0000000..0b760203 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-masks-opacity-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-masks-opacity-expected.png new file mode 100644 index 0000000..afee756 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-masks-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-with-zoom-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-with-zoom-expected.png new file mode 100644 index 0000000..412b621 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/fast/reflections/reflection-with-zoom-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/images/color-profile-background-image-cross-fade-png-expected.png new file mode 100644 index 0000000..5990498 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png new file mode 100644 index 0000000..27fd4525 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png index 1fd2e37..7333ec2 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png new file mode 100644 index 0000000..6c1187d4 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png index 4b068753..44c8e40 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index 3723bdb..a6c4a5d 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png new file mode 100644 index 0000000..8b5a4ce --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png new file mode 100644 index 0000000..e506bec --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/as-background-image/svg-as-background-6-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/as-background-image/svg-as-background-6-expected.png index 6e6f24c..c954493 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/batik/masking/maskRegions-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/batik/masking/maskRegions-expected.png new file mode 100644 index 0000000..ecd43b2c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/clip-path/clip-path-childs-clipped-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/clip-path/clip-path-childs-clipped-expected.png index 78f78d0..f51f93d 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/clip-path/clip-path-childs-clipped-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/clip-path/clip-path-childs-clipped-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/clip-mask-negative-scale-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/clip-mask-negative-scale-expected.png new file mode 100644 index 0000000..3fe10baa --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/grayscale-gradient-mask-2-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/grayscale-gradient-mask-2-expected.png index ad10be623..713cf4b 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/grayscale-gradient-mask-2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/grayscale-gradient-mask-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/grayscale-gradient-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/grayscale-gradient-mask-expected.png new file mode 100644 index 0000000..3f79c65 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/custom/grayscale-gradient-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png index dffea6f6..385291d 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png index e4227c8..2e00b46 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png index dffea6f6..385291d 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png index e4227c8..2e00b46 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/filters/filter-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/filters/filter-clip-expected.png new file mode 100644 index 0000000..9a7b28c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/filters/filter-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/filters/innershadow-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/filters/innershadow-expected.png new file mode 100644 index 0000000..0acc1ed --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/filters/innershadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png index 4ed12f8..e95af9a1f 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png index cff10f6..55f2788 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png index 014ea41..10bcf99 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png new file mode 100644 index 0000000..1686d75 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png index 1bb39aa..3dd3d88 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png index bf99dff..fcb2f83 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/text-antialias/colrv1-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/text-antialias/colrv1-expected.png index 17bcc48..26b00ac 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/text-antialias/colrv1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/text-antialias/colrv1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/text-antialias/colrv1-variable-expected.png b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/text-antialias/colrv1-variable-expected.png index fce4d79e..681ec00a 100644 --- a/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/text-antialias/colrv1-variable-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11-arm64/virtual/text-antialias/colrv1-variable-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac11/svg/custom/image-small-width-height-expected.png b/third_party/blink/web_tests/platform/mac-mac11/svg/custom/image-small-width-height-expected.png index 0659874..161323f8 100644 --- a/third_party/blink/web_tests/platform/mac-mac11/svg/custom/image-small-width-height-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac11/svg/custom/image-small-width-height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/direct-image-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/direct-image-mask-expected.png new file mode 100644 index 0000000..091e5e72 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/direct-image-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/mask-with-added-filters-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/mask-with-added-filters-expected.png new file mode 100644 index 0000000..3a4d00e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/mask-with-added-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/mask-with-removed-filters-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/mask-with-removed-filters-expected.png new file mode 100644 index 0000000..2df70a3 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/mask-with-removed-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/masked-ancestor-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/masked-ancestor-expected.png new file mode 100644 index 0000000..33245f2 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/multiple-masks-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/multiple-masks-expected.png new file mode 100644 index 0000000..47bbb0e2 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/multiple-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/simple-composited-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/simple-composited-mask-expected.png new file mode 100644 index 0000000..324c154 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/masks/simple-composited-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/reflections/nested-reflection-transformed-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/reflections/nested-reflection-transformed-expected.png index cd6d214b..9cd5e595 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/reflections/nested-reflection-transformed-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/reflections/nested-reflection-transformed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/reflections/nested-reflection-transformed2-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/reflections/nested-reflection-transformed2-expected.png index 9517ed2a..63ca2bab 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/reflections/nested-reflection-transformed2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/compositing/reflections/nested-reflection-transformed2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png index fd93080..6517ff81 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-default-value-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-default-value-expected.png index 136cf094..963ce47f1 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-default-value-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-default-value-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-gradient-image-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-gradient-image-expected.png index 8f9c329..45e1cc1 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-gradient-image-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-gradient-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-color-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-color-expected.png index c6fe0273..cb1ce20b8 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-color-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-color-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-image-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-image-expected.png index a359a901..94de201 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-image-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-svg-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-svg-expected.png index b8db093..7712738d 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-svg-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-image-svg-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png new file mode 100644 index 0000000..9393153b --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png index 0844fc2..13ed6c28 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-expected.png index 336b69e..518d091 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png index e09a109..9855e19 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png index bfb8d65a2..a6186014 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png index b6df961..fb5f1dc 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-colorspace-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-colorspace-expected.png index ce4788d..ac54075 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-colorspace-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-colorspace-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-composite-expected.png new file mode 100644 index 0000000..2a99c1d --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-expected.png index 6231976..668a681 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-subregion-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-subregion-expected.png index 5952f66..69c6c3f 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-subregion-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-subregion-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-zoom-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-zoom-expected.png index d9050d8..e9e0e89 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-zoom-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/css3/filters/effect-reference-zoom-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/mask-box-image-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/mask-box-image-expected.png new file mode 100644 index 0000000..8c51e74 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/mask-box-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/backgroundSize16-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/backgroundSize16-expected.png index 20c6164..776b5f1 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/backgroundSize16-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/backgroundSize16-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/contain-and-cover-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/contain-and-cover-expected.png index 4e617fb..97234d3d 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/contain-and-cover-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/contain-and-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png index 3396b25..bcb93a1 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-expected.png index 178bbd0..69fd2366 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png index a91f202..d096a1f 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-transformclip-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-transformclip-expected.png index 0ae4c0a..b1d2285 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-transformclip-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-transformclip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-expected.png index 42092b84..2dd39edc 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-shadow-expected.png index bbddf25f..c4e5e82b 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-shadow-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/canvas/canvas-composite-video-shadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/css/transformed-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/css/transformed-mask-expected.png index 6735bae..d14a828 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/css/transformed-mask-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/css/transformed-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-masks-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-masks-expected.png new file mode 100644 index 0000000..0b760203 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-masks-opacity-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-masks-opacity-expected.png new file mode 100644 index 0000000..afee756 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-masks-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-with-zoom-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-with-zoom-expected.png new file mode 100644 index 0000000..412b621 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/fast/reflections/reflection-with-zoom-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/images/color-profile-background-image-cross-fade-png-expected.png new file mode 100644 index 0000000..5990498 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png new file mode 100644 index 0000000..27fd4525 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png index 1fd2e37..7333ec2 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png new file mode 100644 index 0000000..6c1187d4 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png index 4b068753..44c8e40 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index 3723bdb..a6c4a5d 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png new file mode 100644 index 0000000..8b5a4ce --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png new file mode 100644 index 0000000..e506bec --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/as-background-image/svg-as-background-6-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/as-background-image/svg-as-background-6-expected.png index 6e6f24c..c954493 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/batik/masking/maskRegions-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/batik/masking/maskRegions-expected.png new file mode 100644 index 0000000..ecd43b2c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/clip-path/clip-path-childs-clipped-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/clip-path/clip-path-childs-clipped-expected.png index 78f78d0..f51f93d 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/clip-path/clip-path-childs-clipped-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/clip-path/clip-path-childs-clipped-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/clip-mask-negative-scale-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/clip-mask-negative-scale-expected.png new file mode 100644 index 0000000..3fe10baa --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/grayscale-gradient-mask-2-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/grayscale-gradient-mask-2-expected.png index ad10be623..713cf4b 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/grayscale-gradient-mask-2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/grayscale-gradient-mask-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/grayscale-gradient-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/grayscale-gradient-mask-expected.png new file mode 100644 index 0000000..3f79c65 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/custom/grayscale-gradient-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png index dffea6f6..385291d 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png index e4227c8..2e00b46 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png index dffea6f6..385291d 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png index e4227c8..2e00b46 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/filters/filter-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/filters/filter-clip-expected.png new file mode 100644 index 0000000..9a7b28c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/filters/filter-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/filters/innershadow-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/filters/innershadow-expected.png new file mode 100644 index 0000000..0acc1ed --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/filters/innershadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png index 4ed12f8..e95af9a1f 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png index cff10f6..55f2788 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png index b6873b6..a68ff9c 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png index 014ea41..10bcf99 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png new file mode 100644 index 0000000..1686d75 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png index 1bb39aa..3dd3d88 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png index bf99dff..fcb2f83 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/text-antialias/colrv1-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/text-antialias/colrv1-expected.png index 17bcc48..26b00ac 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/text-antialias/colrv1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/text-antialias/colrv1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/text-antialias/colrv1-variable-expected.png b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/text-antialias/colrv1-variable-expected.png index fce4d79e..681ec00a 100644 --- a/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/text-antialias/colrv1-variable-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac12-arm64/virtual/text-antialias/colrv1-variable-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/direct-image-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/direct-image-mask-expected.png new file mode 100644 index 0000000..091e5e72 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/direct-image-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/mask-with-added-filters-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/mask-with-added-filters-expected.png new file mode 100644 index 0000000..3a4d00e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/mask-with-added-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/mask-with-removed-filters-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/mask-with-removed-filters-expected.png new file mode 100644 index 0000000..2df70a3 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/mask-with-removed-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/masked-ancestor-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/masked-ancestor-expected.png new file mode 100644 index 0000000..33245f2 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/multiple-masks-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/multiple-masks-expected.png new file mode 100644 index 0000000..47bbb0e2 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/multiple-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/simple-composited-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/simple-composited-mask-expected.png new file mode 100644 index 0000000..324c154 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/masks/simple-composited-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/reflections/nested-reflection-transformed-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/reflections/nested-reflection-transformed-expected.png index cd6d214b..9cd5e595 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/reflections/nested-reflection-transformed-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/reflections/nested-reflection-transformed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/reflections/nested-reflection-transformed2-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/reflections/nested-reflection-transformed2-expected.png index 9517ed2a..63ca2bab 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/reflections/nested-reflection-transformed2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/compositing/reflections/nested-reflection-transformed2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png index fd93080..6517ff81 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-default-value-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-default-value-expected.png index 136cf094..963ce47f1 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-default-value-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-default-value-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-gradient-image-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-gradient-image-expected.png index 8f9c329..45e1cc1 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-gradient-image-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-gradient-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-color-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-color-expected.png index c6fe0273..cb1ce20b8 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-color-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-color-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-image-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-image-expected.png index a359a901..94de201 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-image-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-svg-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-svg-expected.png index b8db093..7712738d 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-svg-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-image-svg-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png new file mode 100644 index 0000000..9393153b --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-multiple-background-layers-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png index 0844fc2..13ed6c28 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/background-blend-mode-tiled-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-expected.png index 336b69e..518d091 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png index e09a109..9855e19 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-stacking-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png index bfb8d65a2..a6186014 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/effect-background-blend-mode-tiled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-1-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-1-expected.png index 7d68e2f..8491d33 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png index b6df961..fb5f1dc 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-3-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-3-expected.png index 849d6bce..f283034 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-3-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/blending/mix-blend-mode-isolated-group-3-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-colorspace-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-colorspace-expected.png index ce4788d..ac54075 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-colorspace-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-colorspace-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-composite-expected.png new file mode 100644 index 0000000..2a99c1d --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-expected.png index 6231976..668a681 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-subregion-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-subregion-expected.png index 5952f66..69c6c3f 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-subregion-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-subregion-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-zoom-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-zoom-expected.png index d9050d8..e9e0e89 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-zoom-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/css3/filters/effect-reference-zoom-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/mask-box-image-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/mask-box-image-expected.png new file mode 100644 index 0000000..8c51e74 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/mask-box-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/backgroundSize16-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/backgroundSize16-expected.png index 20c6164..776b5f1 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/backgroundSize16-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/backgroundSize16-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/contain-and-cover-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/contain-and-cover-expected.png index 4e617fb..97234d3d 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/contain-and-cover-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/contain-and-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png index 3396b25..bcb93a1 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/backgrounds/size/contain-and-cover-zoomed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-expected.png index 178bbd0..69fd2366 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png index a91f202..d096a1f 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-shadow-part1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-transformclip-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-transformclip-expected.png index 0ae4c0a..b1d2285 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-transformclip-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-transformclip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-video-expected.png index 42092b84..2dd39edc 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-video-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-video-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-video-shadow-expected.png index bbddf25f..c4e5e82b 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-video-shadow-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/canvas/canvas-composite-video-shadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/css/transformed-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/css/transformed-mask-expected.png index 6735bae..d14a828 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/css/transformed-mask-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/css/transformed-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-masks-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-masks-expected.png new file mode 100644 index 0000000..0b760203 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-masks-opacity-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-masks-opacity-expected.png new file mode 100644 index 0000000..afee756 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-masks-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-with-zoom-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-with-zoom-expected.png new file mode 100644 index 0000000..412b621 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/fast/reflections/reflection-with-zoom-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/images/color-profile-background-image-cross-fade-png-expected.png new file mode 100644 index 0000000..5990498 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png new file mode 100644 index 0000000..27fd4525 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png index 1fd2e37..7333ec2 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png new file mode 100644 index 0000000..6c1187d4 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png index 4b068753..44c8e40 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index 3723bdb..a6c4a5d 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png new file mode 100644 index 0000000..8b5a4ce --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png new file mode 100644 index 0000000..e506bec --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/as-background-image/svg-as-background-6-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/as-background-image/svg-as-background-6-expected.png index 6e6f24c..c954493 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/batik/masking/maskRegions-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/batik/masking/maskRegions-expected.png new file mode 100644 index 0000000..ecd43b2c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/clip-path/clip-path-childs-clipped-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/clip-path/clip-path-childs-clipped-expected.png index 78f78d0..f51f93d 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/clip-path/clip-path-childs-clipped-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/clip-path/clip-path-childs-clipped-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/clip-mask-negative-scale-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/clip-mask-negative-scale-expected.png new file mode 100644 index 0000000..3fe10baa --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/grayscale-gradient-mask-2-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/grayscale-gradient-mask-2-expected.png index ad10be623..713cf4b 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/grayscale-gradient-mask-2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/grayscale-gradient-mask-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/grayscale-gradient-mask-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/grayscale-gradient-mask-expected.png new file mode 100644 index 0000000..3f79c65 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/custom/grayscale-gradient-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png new file mode 100644 index 0000000..41e77dd --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png index dffea6f6..385291d 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png index e4227c8..2e00b46 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png index dffea6f6..385291d 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png index e4227c8..2e00b46 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png index 8c65005..4f52176 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/filters/filter-clip-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/filters/filter-clip-expected.png new file mode 100644 index 0000000..9a7b28c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/filters/filter-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/filters/innershadow-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/filters/innershadow-expected.png new file mode 100644 index 0000000..0acc1ed --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/filters/innershadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png index 4ed12f8..e95af9a1f 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png index cff10f6..55f2788 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png index 1a9259d9..3bde252 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png index b6873b6..a68ff9c 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png index 014ea41..10bcf99 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-colorspace-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png new file mode 100644 index 0000000..1686d75 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png index 1bb39aa..3dd3d88 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png index bf99dff..fcb2f83 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/scalefactor200/css3/filters/effect-reference-subregion-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/text-antialias/colrv1-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/text-antialias/colrv1-expected.png index 17bcc48..26b00ac 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/text-antialias/colrv1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/text-antialias/colrv1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/text-antialias/colrv1-variable-expected.png b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/text-antialias/colrv1-variable-expected.png index fce4d79e..681ec00a 100644 --- a/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/text-antialias/colrv1-variable-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac13-arm64/virtual/text-antialias/colrv1-variable-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/img-layer-object-fit-expected.png b/third_party/blink/web_tests/platform/mac/compositing/img-layer-object-fit-expected.png index f69e39e4..d9b7248 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/img-layer-object-fit-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/img-layer-object-fit-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/masks/direct-image-mask-expected.png b/third_party/blink/web_tests/platform/mac/compositing/masks/direct-image-mask-expected.png index 7843e25..352937a 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/masks/direct-image-mask-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/masks/direct-image-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/masks/mask-with-added-filters-expected.png b/third_party/blink/web_tests/platform/mac/compositing/masks/mask-with-added-filters-expected.png index dce4a9b3..ff1b35c 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/masks/mask-with-added-filters-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/masks/mask-with-added-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/masks/mask-with-removed-filters-expected.png b/third_party/blink/web_tests/platform/mac/compositing/masks/mask-with-removed-filters-expected.png index 0c16142..aa5f78f 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/masks/mask-with-removed-filters-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/masks/mask-with-removed-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/masks/masked-ancestor-expected.png b/third_party/blink/web_tests/platform/mac/compositing/masks/masked-ancestor-expected.png index f0ab5bf..044eef1 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/masks/masked-ancestor-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/masks/multiple-masks-expected.png b/third_party/blink/web_tests/platform/mac/compositing/masks/multiple-masks-expected.png index 7b4d089..38ca239 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/masks/multiple-masks-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/masks/multiple-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/masks/simple-composited-mask-expected.png b/third_party/blink/web_tests/platform/mac/compositing/masks/simple-composited-mask-expected.png index 160346d..8012646 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/masks/simple-composited-mask-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/masks/simple-composited-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png index 272164f..d8ec334 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-crossfade-image-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-gradient-image-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-gradient-image-expected.png index 689061e..1144c0b2 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-gradient-image-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-gradient-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-image-color-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-image-color-expected.png new file mode 100644 index 0000000..cb62a66 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-image-color-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-image-image-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-image-image-expected.png new file mode 100644 index 0000000..b7529481 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-image-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-tiled-gradient-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-tiled-gradient-expected.png index 290256ac..b9c929e 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-tiled-gradient-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/background-blend-mode-tiled-gradient-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/effect-background-blend-mode-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/effect-background-blend-mode-expected.png index d703a14..2383b51 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/effect-background-blend-mode-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/effect-background-blend-mode-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/effect-background-blend-mode-tiled-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/effect-background-blend-mode-tiled-expected.png index d2e9d1e..fdef74a 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/effect-background-blend-mode-tiled-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/effect-background-blend-mode-tiled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-1-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-1-expected.png index 26e37aa..89591df 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-1-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-2-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-2-expected.png index ee2cc4f..9621add0 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-2-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-3-expected.png b/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-3-expected.png index f89025a..468d8cf 100644 --- a/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-3-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/blending/mix-blend-mode-isolated-group-3-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/mac/css3/filters/effect-reference-composite-expected.png index 680f0ef..f403581 100644 --- a/third_party/blink/web_tests/platform/mac/css3/filters/effect-reference-composite-expected.png +++ b/third_party/blink/web_tests/platform/mac/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/backgrounds/size/backgroundSize15-expected.png b/third_party/blink/web_tests/platform/mac/fast/backgrounds/size/backgroundSize15-expected.png index 97e1451..1c24bf4 100644 --- a/third_party/blink/web_tests/platform/mac/fast/backgrounds/size/backgroundSize15-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/backgrounds/size/backgroundSize15-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/backgrounds/size/backgroundSize16-expected.png b/third_party/blink/web_tests/platform/mac/fast/backgrounds/size/backgroundSize16-expected.png index 71bdbd4..349aabb 100644 --- a/third_party/blink/web_tests/platform/mac/fast/backgrounds/size/backgroundSize16-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/backgrounds/size/backgroundSize16-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/borders/inline-mask-overlay-image-outset-expected.png b/third_party/blink/web_tests/platform/mac/fast/borders/inline-mask-overlay-image-outset-expected.png index 10a6893d..3edd113 100644 --- a/third_party/blink/web_tests/platform/mac/fast/borders/inline-mask-overlay-image-outset-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/borders/inline-mask-overlay-image-outset-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/borders/inline-mask-overlay-image-outset-vertical-rl-expected.png b/third_party/blink/web_tests/platform/mac/fast/borders/inline-mask-overlay-image-outset-vertical-rl-expected.png index ea97d79..11405bd 100644 --- a/third_party/blink/web_tests/platform/mac/fast/borders/inline-mask-overlay-image-outset-vertical-rl-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/borders/inline-mask-overlay-image-outset-vertical-rl-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-expected.png index 4195fe55..dd6f072 100644 --- a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part1-expected.png b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part1-expected.png index 7e036e66..30eab1f 100644 --- a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part1-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part2-expected.png b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part2-expected.png index 79dd026..ac9be292 100644 --- a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part2-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-shadow-part2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-video-expected.png index bdf28646..d2bf2d1 100644 --- a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-video-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-video-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-video-shadow-expected.png index 7b5272ed..0fd1ef8 100644 --- a/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-video-shadow-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/canvas/canvas-composite-video-shadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/forms/input-common/input-intrinsic-size-expected.txt b/third_party/blink/web_tests/platform/mac/fast/forms/input-common/input-intrinsic-size-expected.txt new file mode 100644 index 0000000..26e394e --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/fast/forms/input-common/input-intrinsic-size-expected.txt
@@ -0,0 +1,84 @@ +This is a testharness.js-based test. +PASS Hidden size should be 0x0 +PASS text: absolute posistion +PASS text: percent height +PASS text: min-height +PASS text: display:inline +PASS search: absolute posistion +PASS search: percent height +PASS search: min-height +PASS search: display:inline +PASS tel: absolute posistion +PASS tel: percent height +PASS tel: min-height +PASS tel: display:inline +PASS url: absolute posistion +PASS url: percent height +PASS url: min-height +PASS url: display:inline +PASS email: absolute posistion +PASS email: percent height +PASS email: min-height +PASS email: display:inline +PASS password: absolute posistion +PASS password: percent height +PASS password: min-height +PASS password: display:inline +PASS date: absolute posistion +PASS date: percent height +PASS date: min-height +FAIL date: display:inline assert_equals: expected 124.328125 but got 784 +PASS month: absolute posistion +PASS month: percent height +PASS month: min-height +FAIL month: display:inline assert_equals: expected 154.328125 but got 784 +PASS week: absolute posistion +PASS week: percent height +PASS week: min-height +FAIL week: display:inline assert_equals: expected 146.328125 but got 784 +PASS time: absolute posistion +PASS time: percent height +PASS time: min-height +FAIL time: display:inline assert_equals: expected 103 but got 769 +PASS datetime-local: absolute posistion +PASS datetime-local: percent height +PASS datetime-local: min-height +FAIL datetime-local: display:inline assert_equals: expected 210.328125 but got 769 +PASS number: absolute posistion +PASS number: percent height +PASS number: min-height +PASS number: display:inline +PASS range: absolute posistion +PASS range: percent height +PASS range: min-height +PASS range: display:inline +PASS color: absolute posistion +FAIL color: percent height assert_equals: expected 27 but got 14 +FAIL color: min-height assert_equals: expected 27 but got 14 +FAIL color: display:inline assert_equals: expected 50 but got 769 +PASS checkbox: absolute posistion +PASS checkbox: percent height +PASS checkbox: min-height +PASS checkbox: display:inline +PASS radio: absolute posistion +PASS radio: percent height +PASS radio: min-height +PASS radio: display:inline +PASS file: absolute posistion +PASS file: percent height +PASS file: min-height +PASS file: display:inline +PASS submit: absolute posistion +PASS submit: percent height +PASS submit: min-height +PASS submit: display:inline +PASS reset: absolute posistion +PASS reset: percent height +PASS reset: min-height +PASS reset: display:inline +PASS button: absolute posistion +PASS button: percent height +PASS button: min-height +PASS button: display:inline +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/mac/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/blink/web_tests/platform/mac/images/color-profile-background-image-cross-fade-png-expected.png index 5990498..a3eff9f 100644 --- a/third_party/blink/web_tests/platform/mac/images/color-profile-background-image-cross-fade-png-expected.png +++ b/third_party/blink/web_tests/platform/mac/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/media/video-poster-scale-expected.png b/third_party/blink/web_tests/platform/mac/media/video-poster-scale-expected.png index 026f161e..3ed2ebc 100644 --- a/third_party/blink/web_tests/platform/mac/media/video-poster-scale-expected.png +++ b/third_party/blink/web_tests/platform/mac/media/video-poster-scale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index 50f1325..a170c1f0 100644 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png index 070bd747..cb9f108 100644 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png index abc1d63..4b9ed08 100644 --- a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png index 51c3a7c..8f0d54c 100644 --- a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index a0ba0c7..51a2169 100644 --- a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png index 81519f6..5b6f9d62 100644 --- a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png index 21ccc3c..a4f25d7 100644 --- a/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png b/third_party/blink/web_tests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png index 47cb8f8..7f080f3 100644 --- a/third_party/blink/web_tests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/batik/masking/maskRegions-expected.png b/third_party/blink/web_tests/platform/mac/svg/batik/masking/maskRegions-expected.png index 53b9bf8..4a60dc1 100644 --- a/third_party/blink/web_tests/platform/mac/svg/batik/masking/maskRegions-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/carto.net/selectionlist-expected.png b/third_party/blink/web_tests/platform/mac/svg/carto.net/selectionlist-expected.png index 02737e0..00ff838a 100644 --- a/third_party/blink/web_tests/platform/mac/svg/carto.net/selectionlist-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/carto.net/selectionlist-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/custom/clip-mask-negative-scale-expected.png b/third_party/blink/web_tests/platform/mac/svg/custom/clip-mask-negative-scale-expected.png index a41e949..543bd8b 100644 --- a/third_party/blink/web_tests/platform/mac/svg/custom/clip-mask-negative-scale-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/custom/createImageElement2-expected.png b/third_party/blink/web_tests/platform/mac/svg/custom/createImageElement2-expected.png index e8414fa1..8cdf4057 100644 --- a/third_party/blink/web_tests/platform/mac/svg/custom/createImageElement2-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/custom/createImageElement2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/custom/image-parent-translation-expected.png b/third_party/blink/web_tests/platform/mac/svg/custom/image-parent-translation-expected.png index 5b93bd5b..466f9686 100644 --- a/third_party/blink/web_tests/platform/mac/svg/custom/image-parent-translation-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/custom/image-parent-translation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/custom/image-small-width-height-expected.png b/third_party/blink/web_tests/platform/mac/svg/custom/image-small-width-height-expected.png index b40d6e8..0adf4c9 100644 --- a/third_party/blink/web_tests/platform/mac/svg/custom/image-small-width-height-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/custom/image-small-width-height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/custom/pointer-events-image-css-transform-expected.png b/third_party/blink/web_tests/platform/mac/svg/custom/pointer-events-image-css-transform-expected.png index 324d16e..7070395 100644 --- a/third_party/blink/web_tests/platform/mac/svg/custom/pointer-events-image-css-transform-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/custom/pointer-events-image-css-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/custom/pointer-events-image-expected.png b/third_party/blink/web_tests/platform/mac/svg/custom/pointer-events-image-expected.png index 324d16e..7070395 100644 --- a/third_party/blink/web_tests/platform/mac/svg/custom/pointer-events-image-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/custom/pointer-events-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/custom/text-image-opacity-expected.png b/third_party/blink/web_tests/platform/mac/svg/custom/text-image-opacity-expected.png index 264c19c..9231b12 100644 --- a/third_party/blink/web_tests/platform/mac/svg/custom/text-image-opacity-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/custom/text-image-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/blink/web_tests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png index cda9a71..25aa2dd 100644 --- a/third_party/blink/web_tests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/wicd/test-rightsizing-b-expected.png b/third_party/blink/web_tests/platform/mac/svg/wicd/test-rightsizing-b-expected.png index d0cc635..95f62cb 100644 --- a/third_party/blink/web_tests/platform/mac/svg/wicd/test-rightsizing-b-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/wicd/test-rightsizing-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/blink/web_tests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png index dc3ef699..05a26b2 100644 --- a/third_party/blink/web_tests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug101674-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug101674-expected.png index d4034c73..10a72ba 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug101674-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug101674-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug11026-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug11026-expected.png index e3c6d78..412a224 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug11026-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug11026-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug1296-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug1296-expected.png index 0b1b2c41..0ffc285 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug1296-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug1296-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug1430-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug1430-expected.png index 8779b37..e6a17fc 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug1430-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug1430-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug4093-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug4093-expected.png index 570e2c2..a471354 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug4093-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug4093-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug4427-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug4427-expected.png index c73d28e3..35c45d3 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug4427-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug4427-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug625-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug625-expected.png index 98fb2c8..e2b08bf 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug625-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug625-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/blink/web_tests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png index cfb4321c..1c845dc 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png +++ b/third_party/blink/web_tests/platform/mac/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png b/third_party/blink/web_tests/platform/mac/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png index b5f95fe..d9d1121 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png +++ b/third_party/blink/web_tests/platform/mac/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/mac/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png new file mode 100644 index 0000000..71d5c5d0 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/text-antialias/colrv1-expected.png b/third_party/blink/web_tests/platform/mac/virtual/text-antialias/colrv1-expected.png index 6a74b0d7..e2b28d2 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/text-antialias/colrv1-expected.png +++ b/third_party/blink/web_tests/platform/mac/virtual/text-antialias/colrv1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/text-antialias/colrv1-variable-expected.png b/third_party/blink/web_tests/platform/mac/virtual/text-antialias/colrv1-variable-expected.png index ec95c20..03b2964 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/text-antialias/colrv1-variable-expected.png +++ b/third_party/blink/web_tests/platform/mac/virtual/text-antialias/colrv1-variable-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/img-layer-object-fit-expected.png b/third_party/blink/web_tests/platform/win/compositing/img-layer-object-fit-expected.png index 750a14fd..49025cb3 100644 --- a/third_party/blink/web_tests/platform/win/compositing/img-layer-object-fit-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/img-layer-object-fit-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/masks/direct-image-mask-expected.png b/third_party/blink/web_tests/platform/win/compositing/masks/direct-image-mask-expected.png index 32f36c5..ba7de06 100644 --- a/third_party/blink/web_tests/platform/win/compositing/masks/direct-image-mask-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/masks/direct-image-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/masks/mask-with-added-filters-expected.png b/third_party/blink/web_tests/platform/win/compositing/masks/mask-with-added-filters-expected.png index 19f6247..c9ad346 100644 --- a/third_party/blink/web_tests/platform/win/compositing/masks/mask-with-added-filters-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/masks/mask-with-added-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/masks/mask-with-removed-filters-expected.png b/third_party/blink/web_tests/platform/win/compositing/masks/mask-with-removed-filters-expected.png index 6c8f9d5..8fe85e2 100644 --- a/third_party/blink/web_tests/platform/win/compositing/masks/mask-with-removed-filters-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/masks/mask-with-removed-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/masks/masked-ancestor-expected.png b/third_party/blink/web_tests/platform/win/compositing/masks/masked-ancestor-expected.png index cae409c..9cf4e62 100644 --- a/third_party/blink/web_tests/platform/win/compositing/masks/masked-ancestor-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/masks/multiple-masks-expected.png b/third_party/blink/web_tests/platform/win/compositing/masks/multiple-masks-expected.png index 599f99c..8ab75b8 100644 --- a/third_party/blink/web_tests/platform/win/compositing/masks/multiple-masks-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/masks/multiple-masks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/masks/simple-composited-mask-expected.png b/third_party/blink/web_tests/platform/win/compositing/masks/simple-composited-mask-expected.png index 97fc1793..f9f14897 100644 --- a/third_party/blink/web_tests/platform/win/compositing/masks/simple-composited-mask-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/masks/simple-composited-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/win/css3/filters/effect-reference-composite-expected.png index fbd82ffe..f270e773 100644 --- a/third_party/blink/web_tests/platform/win/css3/filters/effect-reference-composite-expected.png +++ b/third_party/blink/web_tests/platform/win/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/backgrounds/size/backgroundSize15-expected.png b/third_party/blink/web_tests/platform/win/fast/backgrounds/size/backgroundSize15-expected.png index c216689..21275a8 100644 --- a/third_party/blink/web_tests/platform/win/fast/backgrounds/size/backgroundSize15-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/backgrounds/size/backgroundSize15-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/backgrounds/size/backgroundSize16-expected.png b/third_party/blink/web_tests/platform/win/fast/backgrounds/size/backgroundSize16-expected.png index 4209f86..8a6ebd1 100644 --- a/third_party/blink/web_tests/platform/win/fast/backgrounds/size/backgroundSize16-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/backgrounds/size/backgroundSize16-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/borders/inline-mask-overlay-image-outset-expected.png b/third_party/blink/web_tests/platform/win/fast/borders/inline-mask-overlay-image-outset-expected.png index 3f49e19..0318379 100644 --- a/third_party/blink/web_tests/platform/win/fast/borders/inline-mask-overlay-image-outset-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/borders/inline-mask-overlay-image-outset-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-expected.png b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-expected.png index 51e5736..b58628c 100644 --- a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part1-expected.png b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part1-expected.png index 3556549..921b40d 100644 --- a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part1-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part2-expected.png b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part2-expected.png index 082e5b0..94938e2 100644 --- a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part2-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-shadow-part2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-video-expected.png b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-video-expected.png index b835217..93f7d9f 100644 --- a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-video-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-video-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-video-shadow-expected.png b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-video-shadow-expected.png index 8fc59e3..32a40d3 100644 --- a/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-video-shadow-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/canvas/canvas-composite-video-shadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/forms/input-common/input-intrinsic-size-expected.txt b/third_party/blink/web_tests/platform/win/fast/forms/input-common/input-intrinsic-size-expected.txt new file mode 100644 index 0000000..ca066c0 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/fast/forms/input-common/input-intrinsic-size-expected.txt
@@ -0,0 +1,84 @@ +This is a testharness.js-based test. +PASS Hidden size should be 0x0 +PASS text: absolute posistion +PASS text: percent height +PASS text: min-height +PASS text: display:inline +PASS search: absolute posistion +PASS search: percent height +PASS search: min-height +PASS search: display:inline +PASS tel: absolute posistion +PASS tel: percent height +PASS tel: min-height +PASS tel: display:inline +PASS url: absolute posistion +PASS url: percent height +PASS url: min-height +PASS url: display:inline +PASS email: absolute posistion +PASS email: percent height +PASS email: min-height +PASS email: display:inline +PASS password: absolute posistion +PASS password: percent height +PASS password: min-height +PASS password: display:inline +PASS date: absolute posistion +PASS date: percent height +PASS date: min-height +FAIL date: display:inline assert_equals: expected 124.328125 but got 784 +PASS month: absolute posistion +PASS month: percent height +PASS month: min-height +FAIL month: display:inline assert_equals: expected 154.328125 but got 784 +PASS week: absolute posistion +PASS week: percent height +PASS week: min-height +FAIL week: display:inline assert_equals: expected 146.328125 but got 784 +PASS time: absolute posistion +PASS time: percent height +PASS time: min-height +FAIL time: display:inline assert_equals: expected 103 but got 769 +PASS datetime-local: absolute posistion +PASS datetime-local: percent height +PASS datetime-local: min-height +FAIL datetime-local: display:inline assert_equals: expected 202.328125 but got 769 +PASS number: absolute posistion +PASS number: percent height +PASS number: min-height +PASS number: display:inline +PASS range: absolute posistion +PASS range: percent height +PASS range: min-height +PASS range: display:inline +PASS color: absolute posistion +FAIL color: percent height assert_equals: expected 27 but got 14 +FAIL color: min-height assert_equals: expected 27 but got 14 +FAIL color: display:inline assert_equals: expected 50 but got 769 +PASS checkbox: absolute posistion +PASS checkbox: percent height +PASS checkbox: min-height +PASS checkbox: display:inline +PASS radio: absolute posistion +PASS radio: percent height +PASS radio: min-height +PASS radio: display:inline +PASS file: absolute posistion +PASS file: percent height +PASS file: min-height +PASS file: display:inline +PASS submit: absolute posistion +PASS submit: percent height +PASS submit: min-height +PASS submit: display:inline +PASS reset: absolute posistion +PASS reset: percent height +PASS reset: min-height +PASS reset: display:inline +PASS button: absolute posistion +PASS button: percent height +PASS button: min-height +PASS button: display:inline +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/blink/web_tests/platform/win/images/color-profile-background-image-cross-fade-png-expected.png index 633e4e2..74b1be1 100644 --- a/third_party/blink/web_tests/platform/win/images/color-profile-background-image-cross-fade-png-expected.png +++ b/third_party/blink/web_tests/platform/win/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/media/video-poster-scale-expected.png b/third_party/blink/web_tests/platform/win/media/video-poster-scale-expected.png index cc44af8..8792bbc5 100644 --- a/third_party/blink/web_tests/platform/win/media/video-poster-scale-expected.png +++ b/third_party/blink/web_tests/platform/win/media/video-poster-scale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png b/third_party/blink/web_tests/platform/win/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png index c2b1c64..08904d9 100644 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png +++ b/third_party/blink/web_tests/platform/win/paint/invalidation/svg/absolute-sized-content-with-resources-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png b/third_party/blink/web_tests/platform/win/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png index f98ed21f..5ea9bc9 100644 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png +++ b/third_party/blink/web_tests/platform/win/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-color-01-b-expected.png b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-color-01-b-expected.png index a50cc27..37daa95b 100644 --- a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-color-01-b-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-color-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png index 431db18..8ca7917 100644 --- a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png index 94481ab..dae7a049 100644 --- a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png index 970c838..a5314648 100644 --- a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png index 51acc3c3..c928840 100644 --- a/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/as-background-image/svg-as-background-6-expected.png b/third_party/blink/web_tests/platform/win/svg/as-background-image/svg-as-background-6-expected.png index 1e2c228..2ef258e 100644 --- a/third_party/blink/web_tests/platform/win/svg/as-background-image/svg-as-background-6-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/as-background-image/svg-as-background-6-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/batik/masking/maskRegions-expected.png b/third_party/blink/web_tests/platform/win/svg/batik/masking/maskRegions-expected.png index 17e264a..49a7b75 100644 --- a/third_party/blink/web_tests/platform/win/svg/batik/masking/maskRegions-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/batik/masking/maskRegions-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/carto.net/selectionlist-expected.png b/third_party/blink/web_tests/platform/win/svg/carto.net/selectionlist-expected.png index 01264a2e..9e01b1e 100644 --- a/third_party/blink/web_tests/platform/win/svg/carto.net/selectionlist-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/carto.net/selectionlist-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/custom/clip-mask-negative-scale-expected.png b/third_party/blink/web_tests/platform/win/svg/custom/clip-mask-negative-scale-expected.png index a3a2e995..fa6993b8 100644 --- a/third_party/blink/web_tests/platform/win/svg/custom/clip-mask-negative-scale-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/custom/clip-mask-negative-scale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/custom/createImageElement2-expected.png b/third_party/blink/web_tests/platform/win/svg/custom/createImageElement2-expected.png index 4a834963..24443f324 100644 --- a/third_party/blink/web_tests/platform/win/svg/custom/createImageElement2-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/custom/createImageElement2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/custom/image-parent-translation-expected.png b/third_party/blink/web_tests/platform/win/svg/custom/image-parent-translation-expected.png index 4ee9d8b..39aea4e 100644 --- a/third_party/blink/web_tests/platform/win/svg/custom/image-parent-translation-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/custom/image-parent-translation-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/custom/image-small-width-height-expected.png b/third_party/blink/web_tests/platform/win/svg/custom/image-small-width-height-expected.png index 290e16f..43292d6d 100644 --- a/third_party/blink/web_tests/platform/win/svg/custom/image-small-width-height-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/custom/image-small-width-height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/custom/pointer-events-image-css-transform-expected.png b/third_party/blink/web_tests/platform/win/svg/custom/pointer-events-image-css-transform-expected.png index f290187..bfd70c5 100644 --- a/third_party/blink/web_tests/platform/win/svg/custom/pointer-events-image-css-transform-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/custom/pointer-events-image-css-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/custom/pointer-events-image-expected.png b/third_party/blink/web_tests/platform/win/svg/custom/pointer-events-image-expected.png index f290187..bfd70c5 100644 --- a/third_party/blink/web_tests/platform/win/svg/custom/pointer-events-image-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/custom/pointer-events-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/custom/text-image-opacity-expected.png b/third_party/blink/web_tests/platform/win/svg/custom/text-image-opacity-expected.png index e840fe6..ae99112 100644 --- a/third_party/blink/web_tests/platform/win/svg/custom/text-image-opacity-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/custom/text-image-opacity-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png b/third_party/blink/web_tests/platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png index f8005dc5..8a2bdcef 100644 --- a/third_party/blink/web_tests/platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/wicd/test-rightsizing-b-expected.png b/third_party/blink/web_tests/platform/win/svg/wicd/test-rightsizing-b-expected.png index 78efe94..07d076e 100644 --- a/third_party/blink/web_tests/platform/win/svg/wicd/test-rightsizing-b-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/wicd/test-rightsizing-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png b/third_party/blink/web_tests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png index 5bc59da..1c2ddf4 100644 --- a/third_party/blink/web_tests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug101674-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug101674-expected.png index f4b8e99..d9be87f 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug101674-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug101674-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug11026-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug11026-expected.png index 0bc1bb5..18fc56d0 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug11026-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug11026-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug1296-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug1296-expected.png index ff3226219..101e32c 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug1296-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug1296-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug1430-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug1430-expected.png index 1384698..0d7ac22 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug1430-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug1430-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug4093-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug4093-expected.png index 6d11e0b6..99f5b9cc 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug4093-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug4093-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug4427-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug4427-expected.png index e9d98ad..a1ad8727 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug4427-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug4427-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug625-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug625-expected.png index e4c500c..2352d467 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug625-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug625-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png b/third_party/blink/web_tests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png index 2762228..a72abf50 100644 --- a/third_party/blink/web_tests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png +++ b/third_party/blink/web_tests/platform/win/virtual/exotic-color-space/images/color-profile-background-image-cross-fade-png-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png b/third_party/blink/web_tests/platform/win/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png index 8fa8ad3..8943c7f96 100644 --- a/third_party/blink/web_tests/platform/win/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png +++ b/third_party/blink/web_tests/platform/win/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/platform/win/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png index e7806794..683b7b8 100644 --- a/third_party/blink/web_tests/platform/win/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png +++ b/third_party/blink/web_tests/platform/win/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/text-antialias/colrv1-expected.png b/third_party/blink/web_tests/platform/win/virtual/text-antialias/colrv1-expected.png index 23962c0..a9fee7f 100644 --- a/third_party/blink/web_tests/platform/win/virtual/text-antialias/colrv1-expected.png +++ b/third_party/blink/web_tests/platform/win/virtual/text-antialias/colrv1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/text-antialias/colrv1-variable-expected.png b/third_party/blink/web_tests/platform/win/virtual/text-antialias/colrv1-variable-expected.png index ce0a2e2..e90236e 100644 --- a/third_party/blink/web_tests/platform/win/virtual/text-antialias/colrv1-variable-expected.png +++ b/third_party/blink/web_tests/platform/win/virtual/text-antialias/colrv1-variable-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win10/virtual/attribution-reporting-debug-mode/wpt_internal/attribution-reporting/source-registration.sub.https_method=a_eligible-expected.txt b/third_party/blink/web_tests/platform/win10/virtual/attribution-reporting-debug-mode/wpt_internal/attribution-reporting/source-registration.sub.https_method=a_eligible-expected.txt new file mode 100644 index 0000000..5cbe11f --- /dev/null +++ b/third_party/blink/web_tests/platform/win10/virtual/attribution-reporting-debug-mode/wpt_internal/attribution-reporting/source-registration.sub.https_method=a_eligible-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +PASS Source registration succeeds. +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/svg/clip-path/clip-path-childs-clipped-expected.png b/third_party/blink/web_tests/svg/clip-path/clip-path-childs-clipped-expected.png index 1332d2f1..86239d4 100644 --- a/third_party/blink/web_tests/svg/clip-path/clip-path-childs-clipped-expected.png +++ b/third_party/blink/web_tests/svg/clip-path/clip-path-childs-clipped-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/custom/convolution-crash-expected.png b/third_party/blink/web_tests/svg/custom/convolution-crash-expected.png index 1adac69..de1e165 100644 --- a/third_party/blink/web_tests/svg/custom/convolution-crash-expected.png +++ b/third_party/blink/web_tests/svg/custom/convolution-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/custom/createImageElement-expected.png b/third_party/blink/web_tests/svg/custom/createImageElement-expected.png index 3f310b22..38b780a 100644 --- a/third_party/blink/web_tests/svg/custom/createImageElement-expected.png +++ b/third_party/blink/web_tests/svg/custom/createImageElement-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/custom/grayscale-gradient-mask-2-expected.png b/third_party/blink/web_tests/svg/custom/grayscale-gradient-mask-2-expected.png index e0dd2b4..b98c1aad 100644 --- a/third_party/blink/web_tests/svg/custom/grayscale-gradient-mask-2-expected.png +++ b/third_party/blink/web_tests/svg/custom/grayscale-gradient-mask-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/custom/grayscale-gradient-mask-expected.png b/third_party/blink/web_tests/svg/custom/grayscale-gradient-mask-expected.png index f78adab6..a56f9cbc 100644 --- a/third_party/blink/web_tests/svg/custom/grayscale-gradient-mask-expected.png +++ b/third_party/blink/web_tests/svg/custom/grayscale-gradient-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/custom/js-update-image-and-display-expected.png b/third_party/blink/web_tests/svg/custom/js-update-image-and-display-expected.png index c93cffd..9d58a536 100644 --- a/third_party/blink/web_tests/svg/custom/js-update-image-and-display-expected.png +++ b/third_party/blink/web_tests/svg/custom/js-update-image-and-display-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/custom/js-update-image-and-display2-expected.png b/third_party/blink/web_tests/svg/custom/js-update-image-and-display2-expected.png index c93cffd..9d58a536 100644 --- a/third_party/blink/web_tests/svg/custom/js-update-image-and-display2-expected.png +++ b/third_party/blink/web_tests/svg/custom/js-update-image-and-display2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/custom/js-update-image-and-display3-expected.png b/third_party/blink/web_tests/svg/custom/js-update-image-and-display3-expected.png index c93cffd..9d58a536 100644 --- a/third_party/blink/web_tests/svg/custom/js-update-image-and-display3-expected.png +++ b/third_party/blink/web_tests/svg/custom/js-update-image-and-display3-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/custom/use-on-g-containing-foreignObject-and-image-expected.png b/third_party/blink/web_tests/svg/custom/use-on-g-containing-foreignObject-and-image-expected.png index 6ba300a..222641d 100644 --- a/third_party/blink/web_tests/svg/custom/use-on-g-containing-foreignObject-and-image-expected.png +++ b/third_party/blink/web_tests/svg/custom/use-on-g-containing-foreignObject-and-image-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png index bc80e1c..38a052a 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png index bc80e1c..38a052a 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png index bc80e1c..38a052a 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png index bc80e1c..38a052a 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png index bc80e1c..38a052a 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png index bc80e1c..38a052a 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png index 1c099ea..0927d7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png index 05cdf9df..de955a0 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png index 1c099ea..0927d7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png index 05cdf9df..de955a0 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png index 5db269c..70c2a7f 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-preserveAspectRatio-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-preserveAspectRatio-attr-expected.png index 682509b..c1d3569 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-preserveAspectRatio-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-preserveAspectRatio-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-width-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-width-attr-expected.png index 3a6c4546..3a8876f2 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-width-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-width-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-x-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-x-attr-expected.png index 3a6c4546..3a8876f2 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-x-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-x-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-y-attr-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-y-attr-expected.png index 3a6c4546..3a8876f2 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-y-attr-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-dom-y-attr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-height-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-height-prop-expected.png index 3a6c4546..3a8876f2 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-height-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-height-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-preserveAspectRatio-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-preserveAspectRatio-prop-expected.png index 3a6c4546..3a8876f2 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-preserveAspectRatio-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-preserveAspectRatio-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-width-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-width-prop-expected.png index 3a6c4546..3a8876f2 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-width-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-width-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-x-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-x-prop-expected.png index 3a6c4546..3a8876f2 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-x-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-x-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-y-prop-expected.png b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-y-prop-expected.png index 3a6c4546..3a8876f2 100644 --- a/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-y-prop-expected.png +++ b/third_party/blink/web_tests/svg/dynamic-updates/SVGImageElement-svgdom-y-prop-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/filters/feTile-expected.png b/third_party/blink/web_tests/svg/filters/feTile-expected.png index ef47c96..d32b4eec 100644 --- a/third_party/blink/web_tests/svg/filters/feTile-expected.png +++ b/third_party/blink/web_tests/svg/filters/feTile-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/filters/filter-clip-expected.png b/third_party/blink/web_tests/svg/filters/filter-clip-expected.png index 5a45a64..a44edc7 100644 --- a/third_party/blink/web_tests/svg/filters/filter-clip-expected.png +++ b/third_party/blink/web_tests/svg/filters/filter-clip-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/filters/innershadow-expected.png b/third_party/blink/web_tests/svg/filters/innershadow-expected.png index 0acc1ed..e98093f8 100644 --- a/third_party/blink/web_tests/svg/filters/innershadow-expected.png +++ b/third_party/blink/web_tests/svg/filters/innershadow-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png b/third_party/blink/web_tests/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png index a652b51..d2657489 100644 --- a/third_party/blink/web_tests/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png +++ b/third_party/blink/web_tests/virtual/exotic-color-space/images/color-profile-background-image-cover-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/virtual/exotic-color-space/images/cross-fade-tiled-expected.png b/third_party/blink/web_tests/virtual/exotic-color-space/images/cross-fade-tiled-expected.png index 25905bd..7b556b9 100644 --- a/third_party/blink/web_tests/virtual/exotic-color-space/images/cross-fade-tiled-expected.png +++ b/third_party/blink/web_tests/virtual/exotic-color-space/images/cross-fade-tiled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png b/third_party/blink/web_tests/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png index 094dc16..a9c51d83 100644 --- a/third_party/blink/web_tests/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png +++ b/third_party/blink/web_tests/virtual/exotic-color-space/images/yuv-decode-eligible/jpeg-missing-eoi-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png b/third_party/blink/web_tests/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png deleted file mode 100644 index bdc645b4..0000000 --- a/third_party/blink/web_tests/virtual/scalefactor200/css3/filters/effect-reference-composite-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/wpt_internal/attribution-reporting/resources/helpers.js b/third_party/blink/web_tests/wpt_internal/attribution-reporting/resources/helpers.js index 2769f357..73b1ce6 100644 --- a/third_party/blink/web_tests/wpt_internal/attribution-reporting/resources/helpers.js +++ b/third_party/blink/web_tests/wpt_internal/attribution-reporting/resources/helpers.js
@@ -13,14 +13,17 @@ return f(t); }, name); -const resetWptServerStash = () => Promise.all([ - resetAttributionReports(eventLevelReportsUrl), - resetAttributionReports(aggregatableReportsUrl), - resetAttributionReports(eventLevelDebugReportsUrl), - resetAttributionReports(aggregatableDebugReportsUrl), - resetAttributionReports(verboseDebugReportsUrl), - resetRegisteredSources(), -]); +const resetWptServerStash = () => + Promise + .all([ + resetAttributionReports(eventLevelReportsUrl), + resetAttributionReports(aggregatableReportsUrl), + resetAttributionReports(eventLevelDebugReportsUrl), + resetAttributionReports(aggregatableDebugReportsUrl), + resetAttributionReports(verboseDebugReportsUrl), + resetRegisteredSources(), + ]) + .then(() => console.log('stash reset')); const eventLevelReportsUrl = '/.well-known/attribution-reporting/report-event-attribution'; @@ -228,6 +231,7 @@ } document.body.appendChild(a); await test_driver.click(a); + console.log('test driver click completed'); return 'navigation'; case 'open': await test_driver.bless('open window', () => { @@ -239,6 +243,7 @@ open(url, '_blank', 'attributionsrc'); } }); + console.log('test driver open completed'); return 'navigation'; case 'fetch': const headers = {}; @@ -278,17 +283,18 @@ const delay = ms => new Promise(resolve => step_timeout(resolve, ms)); /** - * Method that polls a particular URL every interval for reports. Once reports + * Method that polls a particular URL for reports. Once reports * are received, returns the payload as promise. */ -const pollAttributionReports = async (url, origin = location.origin, interval = 100) => { - const resp = await fetch(new URL(url, origin)); - const payload = await resp.json(); - if (payload.reports.length === 0) { - await delay(interval); - return pollAttributionReports(url, origin, interval); +const pollAttributionReports = async (url, origin = location.origin) => { + while (true) { + const resp = await fetch(new URL(url, origin)); + const payload = await resp.json(); + if (payload.reports.length > 0) { + return payload; + } + await delay(/*ms=*/ 100); } - return payload; }; /** @@ -310,16 +316,16 @@ throw new Error(`Timeout polling source ${sourceId} registration`); }; -const pollEventLevelReports = (origin, interval) => - pollAttributionReports(eventLevelReportsUrl, origin, interval); -const pollEventLevelDebugReports = (origin, interval) => - pollAttributionReports(eventLevelDebugReportsUrl, origin, interval); -const pollAggregatableReports = (origin, interval) => - pollAttributionReports(aggregatableReportsUrl, origin, interval); -const pollAggregatableDebugReports = (origin, interval) => - pollAttributionReports(aggregatableDebugReportsUrl, origin, interval); -const pollVerboseDebugReports = (origin, interval) => - pollAttributionReports(verboseDebugReportsUrl, origin, interval); +const pollEventLevelReports = (origin) => + pollAttributionReports(eventLevelReportsUrl, origin); +const pollEventLevelDebugReports = (origin) => + pollAttributionReports(eventLevelDebugReportsUrl, origin); +const pollAggregatableReports = (origin) => + pollAttributionReports(aggregatableReportsUrl, origin); +const pollAggregatableDebugReports = (origin) => + pollAttributionReports(aggregatableDebugReportsUrl, origin); +const pollVerboseDebugReports = (origin) => + pollAttributionReports(verboseDebugReportsUrl, origin); const validateReportHeaders = headers => { assert_array_equals(headers['content-type'], ['application/json']);
diff --git a/third_party/blink/web_tests/wpt_internal/attribution-reporting/source-registration.sub.https.html b/third_party/blink/web_tests/wpt_internal/attribution-reporting/source-registration.sub.https.html index 265e01d..492f33b 100644 --- a/third_party/blink/web_tests/wpt_internal/attribution-reporting/source-registration.sub.https.html +++ b/third_party/blink/web_tests/wpt_internal/attribution-reporting/source-registration.sub.https.html
@@ -37,6 +37,8 @@ console.log('source-event-id', source.source_event_id); await waitForSourceToBeRegistered(source.source_event_id); + console.log('source registered'); + await registerAttributionSrc(t, { trigger: { event_trigger_data: [{}], @@ -44,6 +46,8 @@ reportingOrigin, }); + console.log('trigger registered'); + const payload = await pollEventLevelReports(reportingOrigin); console.log('event-level-reports', JSON.stringify(payload)); assert_equals(payload.reports.length, 1); @@ -52,6 +56,8 @@ assert_equals(report.source_event_id, source.source_event_id); assert_equals(report.source_type, sourceType); + console.log('event-level report received and checked'); + const debugReportPayload = await pollVerboseDebugReports(reportingOrigin); console.log('verbose-debug-reports', JSON.stringify(debugReportPayload)); assert_equals(debugReportPayload.reports.length, 1);
diff --git a/third_party/libaom/README.chromium b/third_party/libaom/README.chromium index 09c77d5..951355f7 100644 --- a/third_party/libaom/README.chromium +++ b/third_party/libaom/README.chromium
@@ -2,8 +2,8 @@ Short Name: libaom URL: https://aomedia.googlesource.com/aom/ Version: 0 -Date: Monday April 03 2023 -Revision: 61fa302827b1673de5c3a63cb391682c7abb414b +Date: Tuesday April 18 2023 +Revision: 5a0903824082f41123e8365b5b99ddb6ced8971c CPEPrefix: cpe:/a:aomedia:aomedia:3.6.0 License: BSD License File: source/libaom/LICENSE
diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs.gni index dea1166..8481fc4 100644 --- a/third_party/libaom/libaom_srcs.gni +++ b/third_party/libaom/libaom_srcs.gni
@@ -69,15 +69,12 @@ "//third_party/libaom/source/libaom/av1/common/x86/resize_ssse3.c", ] -aom_av1_common_intrin_vsx = [ - "//third_party/libaom/source/libaom/av1/common/ppc/cfl_ppc.c", -] +aom_av1_common_intrin_vsx = + [ "//third_party/libaom/source/libaom/av1/common/ppc/cfl_ppc.c" ] aom_av1_common_sources = [ - "//third_party/libaom/source/libaom/common/args_helper.h", - "//third_party/libaom/source/libaom/common/args_helper.c", - "//third_party/libaom/source/libaom/av1/arg_defs.h", "//third_party/libaom/source/libaom/av1/arg_defs.c", + "//third_party/libaom/source/libaom/av1/arg_defs.h", "//third_party/libaom/source/libaom/av1/av1_iface_common.h", "//third_party/libaom/source/libaom/av1/common/alloccommon.c", "//third_party/libaom/source/libaom/av1/common/alloccommon.h", @@ -151,6 +148,8 @@ "//third_party/libaom/source/libaom/av1/common/txb_common.h", "//third_party/libaom/source/libaom/av1/common/warped_motion.c", "//third_party/libaom/source/libaom/av1/common/warped_motion.h", + "//third_party/libaom/source/libaom/common/args_helper.c", + "//third_party/libaom/source/libaom/common/args_helper.h", ] aom_av1_decoder_sources = [ @@ -168,8 +167,8 @@ "//third_party/libaom/source/libaom/av1/decoder/dthread.h", "//third_party/libaom/source/libaom/av1/decoder/grain_synthesis.c", "//third_party/libaom/source/libaom/av1/decoder/grain_synthesis.h", - "//third_party/libaom/source/libaom/av1/decoder/obu.h", "//third_party/libaom/source/libaom/av1/decoder/obu.c", + "//third_party/libaom/source/libaom/av1/decoder/obu.h", ] aom_av1_encoder_asm_sse2 = [ @@ -177,13 +176,10 @@ "//third_party/libaom/source/libaom/av1/encoder/x86/error_sse2.asm", ] -aom_av1_encoder_asm_ssse3_x86_64 = [ - "//third_party/libaom/source/libaom/av1/encoder/x86/av1_quantize_ssse3_x86_64.asm", -] +aom_av1_encoder_asm_ssse3_x86_64 = [ "//third_party/libaom/source/libaom/av1/encoder/x86/av1_quantize_ssse3_x86_64.asm" ] -aom_av1_encoder_intrin_arm_crc32 = [ - "//third_party/libaom/source/libaom/av1/encoder/arm/crc32/hash_crc32.c", -] +aom_av1_encoder_intrin_arm_crc32 = + [ "//third_party/libaom/source/libaom/av1/encoder/arm/crc32/hash_crc32.c" ] aom_av1_encoder_intrin_avx2 = [ "//third_party/libaom/source/libaom/av1/encoder/x86/av1_quantize_avx2.c", @@ -227,9 +223,8 @@ "//third_party/libaom/source/libaom/av1/encoder/x86/av1_temporal_denoiser_sse2.c", ] -aom_av1_encoder_intrin_sse3 = [ - "//third_party/libaom/source/libaom/av1/encoder/x86/ml_sse3.c", -] +aom_av1_encoder_intrin_sse3 = + [ "//third_party/libaom/source/libaom/av1/encoder/x86/ml_sse3.c" ] aom_av1_encoder_intrin_sse4_1 = [ "//third_party/libaom/source/libaom/av1/encoder/x86/av1_fwd_txfm1d_sse4.c", @@ -239,9 +234,8 @@ "//third_party/libaom/source/libaom/av1/encoder/x86/rdopt_sse4.c", ] -aom_av1_encoder_intrin_sse4_2 = [ - "//third_party/libaom/source/libaom/av1/encoder/x86/hash_sse42.c", -] +aom_av1_encoder_intrin_sse4_2 = + [ "//third_party/libaom/source/libaom/av1/encoder/x86/hash_sse42.c" ] aom_av1_encoder_intrin_ssse3 = [ "//third_party/libaom/source/libaom/av1/encoder/x86/reconinter_enc_ssse3.c", @@ -250,21 +244,24 @@ aom_av1_encoder_sources = [ "//third_party/libaom/source/libaom/av1/av1_cx_iface.c", "//third_party/libaom/source/libaom/av1/av1_cx_iface.h", + "//third_party/libaom/source/libaom/av1/encoder/allintra_vis.c", + "//third_party/libaom/source/libaom/av1/encoder/allintra_vis.h", "//third_party/libaom/source/libaom/av1/encoder/aq_complexity.c", "//third_party/libaom/source/libaom/av1/encoder/aq_complexity.h", "//third_party/libaom/source/libaom/av1/encoder/aq_cyclicrefresh.c", "//third_party/libaom/source/libaom/av1/encoder/aq_cyclicrefresh.h", "//third_party/libaom/source/libaom/av1/encoder/aq_variance.c", "//third_party/libaom/source/libaom/av1/encoder/aq_variance.h", - "//third_party/libaom/source/libaom/av1/encoder/allintra_vis.c", - "//third_party/libaom/source/libaom/av1/encoder/allintra_vis.h", - "//third_party/libaom/source/libaom/av1/encoder/enc_enums.h", "//third_party/libaom/source/libaom/av1/encoder/av1_fwd_txfm1d.c", "//third_party/libaom/source/libaom/av1/encoder/av1_fwd_txfm1d.h", "//third_party/libaom/source/libaom/av1/encoder/av1_fwd_txfm1d_cfg.h", "//third_party/libaom/source/libaom/av1/encoder/av1_fwd_txfm2d.c", + "//third_party/libaom/source/libaom/av1/encoder/av1_noise_estimate.c", + "//third_party/libaom/source/libaom/av1/encoder/av1_noise_estimate.h", "//third_party/libaom/source/libaom/av1/encoder/av1_quantize.c", "//third_party/libaom/source/libaom/av1/encoder/av1_quantize.h", + "//third_party/libaom/source/libaom/av1/encoder/av1_temporal_denoiser.c", + "//third_party/libaom/source/libaom/av1/encoder/av1_temporal_denoiser.h", "//third_party/libaom/source/libaom/av1/encoder/bitstream.c", "//third_party/libaom/source/libaom/av1/encoder/bitstream.h", "//third_party/libaom/source/libaom/av1/encoder/block.h", @@ -274,6 +271,11 @@ "//third_party/libaom/source/libaom/av1/encoder/context_tree.h", "//third_party/libaom/source/libaom/av1/encoder/cost.c", "//third_party/libaom/source/libaom/av1/encoder/cost.h", + "//third_party/libaom/source/libaom/av1/encoder/dwt.c", + "//third_party/libaom/source/libaom/av1/encoder/dwt.h", + "//third_party/libaom/source/libaom/av1/encoder/enc_enums.h", + "//third_party/libaom/source/libaom/av1/encoder/encode_strategy.c", + "//third_party/libaom/source/libaom/av1/encoder/encode_strategy.h", "//third_party/libaom/source/libaom/av1/encoder/encodeframe.c", "//third_party/libaom/source/libaom/av1/encoder/encodeframe.h", "//third_party/libaom/source/libaom/av1/encoder/encodeframe_utils.c", @@ -282,8 +284,6 @@ "//third_party/libaom/source/libaom/av1/encoder/encodemb.h", "//third_party/libaom/source/libaom/av1/encoder/encodemv.c", "//third_party/libaom/source/libaom/av1/encoder/encodemv.h", - "//third_party/libaom/source/libaom/av1/encoder/encode_strategy.c", - "//third_party/libaom/source/libaom/av1/encoder/encode_strategy.h", "//third_party/libaom/source/libaom/av1/encoder/encoder.c", "//third_party/libaom/source/libaom/av1/encoder/encoder.h", "//third_party/libaom/source/libaom/av1/encoder/encoder_alloc.h", @@ -306,6 +306,9 @@ "//third_party/libaom/source/libaom/av1/encoder/hybrid_fwd_txfm.h", "//third_party/libaom/source/libaom/av1/encoder/interp_search.c", "//third_party/libaom/source/libaom/av1/encoder/interp_search.h", + "//third_party/libaom/source/libaom/av1/encoder/intra_mode_search.c", + "//third_party/libaom/source/libaom/av1/encoder/intra_mode_search.h", + "//third_party/libaom/source/libaom/av1/encoder/intra_mode_search_utils.h", "//third_party/libaom/source/libaom/av1/encoder/level.c", "//third_party/libaom/source/libaom/av1/encoder/level.h", "//third_party/libaom/source/libaom/av1/encoder/lookahead.c", @@ -320,12 +323,15 @@ "//third_party/libaom/source/libaom/av1/encoder/motion_search_facade.h", "//third_party/libaom/source/libaom/av1/encoder/mv_prec.c", "//third_party/libaom/source/libaom/av1/encoder/mv_prec.h", + "//third_party/libaom/source/libaom/av1/encoder/nonrd_opt.c", + "//third_party/libaom/source/libaom/av1/encoder/nonrd_opt.h", + "//third_party/libaom/source/libaom/av1/encoder/nonrd_pickmode.c", "//third_party/libaom/source/libaom/av1/encoder/palette.c", "//third_party/libaom/source/libaom/av1/encoder/palette.h", - "//third_party/libaom/source/libaom/av1/encoder/partition_search.h", "//third_party/libaom/source/libaom/av1/encoder/partition_search.c", - "//third_party/libaom/source/libaom/av1/encoder/partition_strategy.h", + "//third_party/libaom/source/libaom/av1/encoder/partition_search.h", "//third_party/libaom/source/libaom/av1/encoder/partition_strategy.c", + "//third_party/libaom/source/libaom/av1/encoder/partition_strategy.h", "//third_party/libaom/source/libaom/av1/encoder/pass2_strategy.h", "//third_party/libaom/source/libaom/av1/encoder/pickcdef.c", "//third_party/libaom/source/libaom/av1/encoder/pickcdef.h", @@ -337,9 +343,6 @@ "//third_party/libaom/source/libaom/av1/encoder/rd.c", "//third_party/libaom/source/libaom/av1/encoder/rd.h", "//third_party/libaom/source/libaom/av1/encoder/rdopt.c", - "//third_party/libaom/source/libaom/av1/encoder/nonrd_pickmode.c", - "//third_party/libaom/source/libaom/av1/encoder/nonrd_opt.c", - "//third_party/libaom/source/libaom/av1/encoder/nonrd_opt.h", "//third_party/libaom/source/libaom/av1/encoder/rdopt.h", "//third_party/libaom/source/libaom/av1/encoder/rdopt_data_defs.h", "//third_party/libaom/source/libaom/av1/encoder/rdopt_utils.h", @@ -363,24 +366,15 @@ "//third_party/libaom/source/libaom/av1/encoder/txb_rdopt.c", "//third_party/libaom/source/libaom/av1/encoder/txb_rdopt.h", "//third_party/libaom/source/libaom/av1/encoder/txb_rdopt_utils.h", - "//third_party/libaom/source/libaom/av1/encoder/intra_mode_search.c", - "//third_party/libaom/source/libaom/av1/encoder/intra_mode_search.h", - "//third_party/libaom/source/libaom/av1/encoder/intra_mode_search_utils.h", - "//third_party/libaom/source/libaom/av1/encoder/wedge_utils.c", "//third_party/libaom/source/libaom/av1/encoder/var_based_part.c", "//third_party/libaom/source/libaom/av1/encoder/var_based_part.h", - "//third_party/libaom/source/libaom/av1/encoder/av1_noise_estimate.c", - "//third_party/libaom/source/libaom/av1/encoder/av1_noise_estimate.h", + "//third_party/libaom/source/libaom/av1/encoder/wedge_utils.c", "//third_party/libaom/source/libaom/third_party/fastfeat/fast.c", "//third_party/libaom/source/libaom/third_party/fastfeat/fast.h", "//third_party/libaom/source/libaom/third_party/fastfeat/fast_9.c", "//third_party/libaom/source/libaom/third_party/fastfeat/nonmax.c", "//third_party/libaom/source/libaom/third_party/vector/vector.c", "//third_party/libaom/source/libaom/third_party/vector/vector.h", - "//third_party/libaom/source/libaom/av1/encoder/dwt.c", - "//third_party/libaom/source/libaom/av1/encoder/dwt.h", - "//third_party/libaom/source/libaom/av1/encoder/av1_temporal_denoiser.c", - "//third_party/libaom/source/libaom/av1/encoder/av1_temporal_denoiser.h", ] aom_dsp_common_asm_sse2 = [ @@ -424,6 +418,7 @@ "//third_party/libaom/source/libaom/aom_dsp/arm/intrapred_neon.c", "//third_party/libaom/source/libaom/aom_dsp/arm/subtract_neon.c", "//third_party/libaom/source/libaom/aom_dsp/arm/blend_a64_mask_neon.c", + "//third_party/libaom/source/libaom/aom_dsp/arm/avg_pred_neon.c", ] aom_dsp_common_intrin_sse2 = [ @@ -513,18 +508,16 @@ "//third_party/libaom/source/libaom/aom_dsp/x86/subtract_sse2.asm", ] -aom_dsp_encoder_asm_sse2_x86_64 = [ - "//third_party/libaom/source/libaom/aom_dsp/x86/ssim_sse2_x86_64.asm", -] +aom_dsp_encoder_asm_sse2_x86_64 = + [ "//third_party/libaom/source/libaom/aom_dsp/x86/ssim_sse2_x86_64.asm" ] aom_dsp_encoder_asm_ssse3_x86_64 = [ "//third_party/libaom/source/libaom/aom_dsp/x86/fwd_txfm_ssse3_x86_64.asm", "//third_party/libaom/source/libaom/aom_dsp/x86/quantize_ssse3_x86_64.asm", ] -aom_dsp_encoder_intrin_avx = [ - "//third_party/libaom/source/libaom/aom_dsp/x86/aom_quantize_avx.c", -] +aom_dsp_encoder_intrin_avx = + [ "//third_party/libaom/source/libaom/aom_dsp/x86/aom_quantize_avx.c" ] aom_dsp_encoder_intrin_avx2 = [ "//third_party/libaom/source/libaom/aom_dsp/x86/avg_intrin_avx2.c", @@ -567,6 +560,7 @@ "//third_party/libaom/source/libaom/aom_dsp/x86/blk_sse_sum_sse2.c", "//third_party/libaom/source/libaom/aom_dsp/x86/sum_squares_sse2.c", "//third_party/libaom/source/libaom/aom_dsp/x86/variance_sse2.c", + "//third_party/libaom/source/libaom/aom_dsp/x86/jnt_sad_sse2.c", ] aom_dsp_encoder_intrin_sse4_1 = [ @@ -583,7 +577,6 @@ "//third_party/libaom/source/libaom/aom_dsp/x86/quantize_ssse3.c", "//third_party/libaom/source/libaom/aom_dsp/x86/variance_impl_ssse3.c", "//third_party/libaom/source/libaom/aom_dsp/x86/jnt_variance_ssse3.c", - "//third_party/libaom/source/libaom/aom_dsp/x86/jnt_sad_ssse3.c", ] aom_dsp_encoder_sources = [ @@ -629,9 +622,7 @@ "//third_party/libaom/source/libaom/aom_mem/include/aom_mem_intrnl.h", ] -aom_ports_asm_x86 = [ - "//third_party/libaom/source/libaom/aom_ports/float.asm", -] +aom_ports_asm_x86 = [ "//third_party/libaom/source/libaom/aom_ports/float.asm" ] aom_rtcd_sources = [ "//third_party/libaom/source/libaom/aom_dsp/aom_dsp_rtcd.c", @@ -697,6 +688,5 @@ "//third_party/libaom/source/libaom/config/aom_config.h", ] -aom_version_sources_gen = [ - "//third_party/libaom/source/libaom/config/aom_version.h", -] +aom_version_sources_gen = + [ "//third_party/libaom/source/libaom/config/aom_version.h" ]
diff --git a/third_party/libaom/source/config/config/aom_version.h b/third_party/libaom/source/config/config/aom_version.h index 21a0137..0ab93ec 100644 --- a/third_party/libaom/source/config/config/aom_version.h +++ b/third_party/libaom/source/config/config/aom_version.h
@@ -12,8 +12,8 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 6 #define VERSION_PATCH 0 -#define VERSION_EXTRA "446-g61fa30282" +#define VERSION_EXTRA "516-g5a0903824" #define VERSION_PACKED \ ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | (VERSION_PATCH)) -#define VERSION_STRING_NOSP "3.6.0-446-g61fa30282" -#define VERSION_STRING " 3.6.0-446-g61fa30282" +#define VERSION_STRING_NOSP "3.6.0-516-g5a0903824" +#define VERSION_STRING " 3.6.0-516-g5a0903824"
diff --git a/third_party/libaom/source/config/ios/arm-neon/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/ios/arm-neon/config/aom_dsp_rtcd.h index 67f3637..cc9741db 100644 --- a/third_party/libaom/source/config/ios/arm-neon/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/ios/arm-neon/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -46,7 +45,13 @@ #define aom_blend_a64_vmask aom_blend_a64_vmask_neon void aom_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define aom_comp_avg_pred aom_comp_avg_pred_c +void aom_comp_avg_pred_neon(uint8_t* comp_pred, + const uint8_t* pred, + int width, + int height, + const uint8_t* ref, + int ref_stride); +#define aom_comp_avg_pred aom_comp_avg_pred_neon void aom_comp_mask_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask); #define aom_comp_mask_pred aom_comp_mask_pred_c @@ -110,7 +115,11 @@ #define aom_dc_128_predictor_64x32 aom_dc_128_predictor_64x32_c void aom_dc_128_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_c +void aom_dc_128_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_neon void aom_dc_128_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_128_predictor_8x16 aom_dc_128_predictor_8x16_c @@ -171,7 +180,11 @@ #define aom_dc_left_predictor_64x32 aom_dc_left_predictor_64x32_c void aom_dc_left_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_c +void aom_dc_left_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_neon void aom_dc_left_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_left_predictor_8x16 aom_dc_left_predictor_8x16_c @@ -232,7 +245,11 @@ #define aom_dc_predictor_64x32 aom_dc_predictor_64x32_c void aom_dc_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_c +void aom_dc_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_neon void aom_dc_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_predictor_8x16 aom_dc_predictor_8x16_c @@ -293,7 +310,11 @@ #define aom_dc_top_predictor_64x32 aom_dc_top_predictor_64x32_c void aom_dc_top_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_c +void aom_dc_top_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_neon void aom_dc_top_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_top_predictor_8x16 aom_dc_top_predictor_8x16_c @@ -430,14 +451,6 @@ void aom_fft8x8_float_c(const float *input, float *temp, float *output); #define aom_fft8x8_float aom_fft8x8_float_c -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_neon - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_neon - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); #define aom_get_blk_sse_sum aom_get_blk_sse_sum_c @@ -825,7 +838,13 @@ #define aom_masked_sub_pixel_variance8x8 aom_masked_sub_pixel_variance8x8_c void aom_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define aom_minmax_8x8 aom_minmax_8x8_c +void aom_minmax_8x8_neon(const uint8_t* s, + int p, + const uint8_t* d, + int dp, + int* min, + int* max); +#define aom_minmax_8x8 aom_minmax_8x8_neon unsigned int aom_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); unsigned int aom_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); @@ -926,9 +945,6 @@ void aom_paeth_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_paeth_predictor_8x8 aom_paeth_predictor_8x8_neon -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_c - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); #define aom_quantize_b aom_quantize_b_neon @@ -977,9 +993,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_c - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_neon @@ -1034,9 +1047,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_c - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad32x16 aom_sad32x16_neon @@ -1091,9 +1101,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_c - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_neon @@ -1130,9 +1137,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_c - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad64x128 aom_sad64x128_neon @@ -1187,9 +1191,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_c - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_neon @@ -1244,9 +1245,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_c - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad_skip_128x128 aom_sad_skip_128x128_neon
diff --git a/third_party/libaom/source/config/ios/arm-neon/config/av1_rtcd.h b/third_party/libaom/source/config/ios/arm-neon/config/av1_rtcd.h index 2bda09b..6dfd871 100644 --- a/third_party/libaom/source/config/ios/arm-neon/config/av1_rtcd.h +++ b/third_party/libaom/source/config/ios/arm-neon/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/ios/arm64/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/ios/arm64/config/aom_dsp_rtcd.h index 67f3637..cc9741db 100644 --- a/third_party/libaom/source/config/ios/arm64/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/ios/arm64/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -46,7 +45,13 @@ #define aom_blend_a64_vmask aom_blend_a64_vmask_neon void aom_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define aom_comp_avg_pred aom_comp_avg_pred_c +void aom_comp_avg_pred_neon(uint8_t* comp_pred, + const uint8_t* pred, + int width, + int height, + const uint8_t* ref, + int ref_stride); +#define aom_comp_avg_pred aom_comp_avg_pred_neon void aom_comp_mask_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask); #define aom_comp_mask_pred aom_comp_mask_pred_c @@ -110,7 +115,11 @@ #define aom_dc_128_predictor_64x32 aom_dc_128_predictor_64x32_c void aom_dc_128_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_c +void aom_dc_128_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_neon void aom_dc_128_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_128_predictor_8x16 aom_dc_128_predictor_8x16_c @@ -171,7 +180,11 @@ #define aom_dc_left_predictor_64x32 aom_dc_left_predictor_64x32_c void aom_dc_left_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_c +void aom_dc_left_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_neon void aom_dc_left_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_left_predictor_8x16 aom_dc_left_predictor_8x16_c @@ -232,7 +245,11 @@ #define aom_dc_predictor_64x32 aom_dc_predictor_64x32_c void aom_dc_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_c +void aom_dc_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_neon void aom_dc_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_predictor_8x16 aom_dc_predictor_8x16_c @@ -293,7 +310,11 @@ #define aom_dc_top_predictor_64x32 aom_dc_top_predictor_64x32_c void aom_dc_top_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_c +void aom_dc_top_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_neon void aom_dc_top_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_top_predictor_8x16 aom_dc_top_predictor_8x16_c @@ -430,14 +451,6 @@ void aom_fft8x8_float_c(const float *input, float *temp, float *output); #define aom_fft8x8_float aom_fft8x8_float_c -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_neon - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_neon - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); #define aom_get_blk_sse_sum aom_get_blk_sse_sum_c @@ -825,7 +838,13 @@ #define aom_masked_sub_pixel_variance8x8 aom_masked_sub_pixel_variance8x8_c void aom_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define aom_minmax_8x8 aom_minmax_8x8_c +void aom_minmax_8x8_neon(const uint8_t* s, + int p, + const uint8_t* d, + int dp, + int* min, + int* max); +#define aom_minmax_8x8 aom_minmax_8x8_neon unsigned int aom_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); unsigned int aom_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); @@ -926,9 +945,6 @@ void aom_paeth_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_paeth_predictor_8x8 aom_paeth_predictor_8x8_neon -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_c - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); #define aom_quantize_b aom_quantize_b_neon @@ -977,9 +993,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_c - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_neon @@ -1034,9 +1047,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_c - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad32x16 aom_sad32x16_neon @@ -1091,9 +1101,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_c - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_neon @@ -1130,9 +1137,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_c - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad64x128 aom_sad64x128_neon @@ -1187,9 +1191,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_c - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_neon @@ -1244,9 +1245,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_c - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad_skip_128x128 aom_sad_skip_128x128_neon
diff --git a/third_party/libaom/source/config/ios/arm64/config/av1_rtcd.h b/third_party/libaom/source/config/ios/arm64/config/av1_rtcd.h index 2bda09b..6dfd871 100644 --- a/third_party/libaom/source/config/ios/arm64/config/av1_rtcd.h +++ b/third_party/libaom/source/config/ios/arm64/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_dsp_rtcd.h index 0820de6..01cd0b5fe 100644 --- a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -46,7 +45,18 @@ RTCD_EXTERN void (*aom_blend_a64_vmask)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int w, int h); void aom_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define aom_comp_avg_pred aom_comp_avg_pred_c +void aom_comp_avg_pred_neon(uint8_t* comp_pred, + const uint8_t* pred, + int width, + int height, + const uint8_t* ref, + int ref_stride); +RTCD_EXTERN void (*aom_comp_avg_pred)(uint8_t* comp_pred, + const uint8_t* pred, + int width, + int height, + const uint8_t* ref, + int ref_stride); void aom_comp_mask_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask); #define aom_comp_mask_pred aom_comp_mask_pred_c @@ -110,7 +120,14 @@ #define aom_dc_128_predictor_64x32 aom_dc_128_predictor_64x32_c void aom_dc_128_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_c +void aom_dc_128_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +RTCD_EXTERN void (*aom_dc_128_predictor_64x64)(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); void aom_dc_128_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_128_predictor_8x16 aom_dc_128_predictor_8x16_c @@ -171,7 +188,14 @@ #define aom_dc_left_predictor_64x32 aom_dc_left_predictor_64x32_c void aom_dc_left_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_c +void aom_dc_left_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +RTCD_EXTERN void (*aom_dc_left_predictor_64x64)(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); void aom_dc_left_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_left_predictor_8x16 aom_dc_left_predictor_8x16_c @@ -232,7 +256,14 @@ #define aom_dc_predictor_64x32 aom_dc_predictor_64x32_c void aom_dc_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_c +void aom_dc_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +RTCD_EXTERN void (*aom_dc_predictor_64x64)(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); void aom_dc_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_predictor_8x16 aom_dc_predictor_8x16_c @@ -293,7 +324,14 @@ #define aom_dc_top_predictor_64x32 aom_dc_top_predictor_64x32_c void aom_dc_top_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_c +void aom_dc_top_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +RTCD_EXTERN void (*aom_dc_top_predictor_64x64)(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); void aom_dc_top_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_top_predictor_8x16 aom_dc_top_predictor_8x16_c @@ -430,14 +468,6 @@ void aom_fft8x8_float_c(const float *input, float *temp, float *output); #define aom_fft8x8_float aom_fft8x8_float_c -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*aom_get16x16var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -RTCD_EXTERN void (*aom_get8x8var)(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); #define aom_get_blk_sse_sum aom_get_blk_sse_sum_c @@ -825,7 +855,18 @@ #define aom_masked_sub_pixel_variance8x8 aom_masked_sub_pixel_variance8x8_c void aom_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define aom_minmax_8x8 aom_minmax_8x8_c +void aom_minmax_8x8_neon(const uint8_t* s, + int p, + const uint8_t* d, + int dp, + int* min, + int* max); +RTCD_EXTERN void (*aom_minmax_8x8)(const uint8_t* s, + int p, + const uint8_t* d, + int dp, + int* min, + int* max); unsigned int aom_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); unsigned int aom_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); @@ -926,9 +967,6 @@ void aom_paeth_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); RTCD_EXTERN void (*aom_paeth_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_c - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); RTCD_EXTERN void (*aom_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); @@ -977,9 +1015,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_c - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); RTCD_EXTERN unsigned int (*aom_sad16x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1034,9 +1069,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_c - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); RTCD_EXTERN unsigned int (*aom_sad32x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1091,9 +1123,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_c - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); RTCD_EXTERN unsigned int (*aom_sad4x4)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1130,9 +1159,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_c - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); RTCD_EXTERN unsigned int (*aom_sad64x128)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1187,9 +1213,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_c - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); RTCD_EXTERN unsigned int (*aom_sad8x16)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1244,9 +1267,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_c - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); RTCD_EXTERN unsigned int (*aom_sad_skip_128x128)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1927,6 +1947,10 @@ if (flags & HAS_NEON) aom_blend_a64_hmask = aom_blend_a64_hmask_neon; aom_blend_a64_vmask = aom_blend_a64_vmask_c; if (flags & HAS_NEON) aom_blend_a64_vmask = aom_blend_a64_vmask_neon; + aom_comp_avg_pred = aom_comp_avg_pred_c; + if (flags & HAS_NEON) { + aom_comp_avg_pred = aom_comp_avg_pred_neon; + } aom_convolve_copy = aom_convolve_copy_c; if (flags & HAS_NEON) aom_convolve_copy = aom_convolve_copy_neon; aom_dc_128_predictor_16x16 = aom_dc_128_predictor_16x16_c; @@ -1935,6 +1959,10 @@ if (flags & HAS_NEON) aom_dc_128_predictor_32x32 = aom_dc_128_predictor_32x32_neon; aom_dc_128_predictor_4x4 = aom_dc_128_predictor_4x4_c; if (flags & HAS_NEON) aom_dc_128_predictor_4x4 = aom_dc_128_predictor_4x4_neon; + aom_dc_128_predictor_64x64 = aom_dc_128_predictor_64x64_c; + if (flags & HAS_NEON) { + aom_dc_128_predictor_64x64 = aom_dc_128_predictor_64x64_neon; + } aom_dc_128_predictor_8x8 = aom_dc_128_predictor_8x8_c; if (flags & HAS_NEON) aom_dc_128_predictor_8x8 = aom_dc_128_predictor_8x8_neon; aom_dc_left_predictor_16x16 = aom_dc_left_predictor_16x16_c; @@ -1943,6 +1971,10 @@ if (flags & HAS_NEON) aom_dc_left_predictor_32x32 = aom_dc_left_predictor_32x32_neon; aom_dc_left_predictor_4x4 = aom_dc_left_predictor_4x4_c; if (flags & HAS_NEON) aom_dc_left_predictor_4x4 = aom_dc_left_predictor_4x4_neon; + aom_dc_left_predictor_64x64 = aom_dc_left_predictor_64x64_c; + if (flags & HAS_NEON) { + aom_dc_left_predictor_64x64 = aom_dc_left_predictor_64x64_neon; + } aom_dc_left_predictor_8x8 = aom_dc_left_predictor_8x8_c; if (flags & HAS_NEON) aom_dc_left_predictor_8x8 = aom_dc_left_predictor_8x8_neon; aom_dc_predictor_16x16 = aom_dc_predictor_16x16_c; @@ -1951,6 +1983,10 @@ if (flags & HAS_NEON) aom_dc_predictor_32x32 = aom_dc_predictor_32x32_neon; aom_dc_predictor_4x4 = aom_dc_predictor_4x4_c; if (flags & HAS_NEON) aom_dc_predictor_4x4 = aom_dc_predictor_4x4_neon; + aom_dc_predictor_64x64 = aom_dc_predictor_64x64_c; + if (flags & HAS_NEON) { + aom_dc_predictor_64x64 = aom_dc_predictor_64x64_neon; + } aom_dc_predictor_8x8 = aom_dc_predictor_8x8_c; if (flags & HAS_NEON) aom_dc_predictor_8x8 = aom_dc_predictor_8x8_neon; aom_dc_top_predictor_16x16 = aom_dc_top_predictor_16x16_c; @@ -1959,16 +1995,18 @@ if (flags & HAS_NEON) aom_dc_top_predictor_32x32 = aom_dc_top_predictor_32x32_neon; aom_dc_top_predictor_4x4 = aom_dc_top_predictor_4x4_c; if (flags & HAS_NEON) aom_dc_top_predictor_4x4 = aom_dc_top_predictor_4x4_neon; + aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_c; + if (flags & HAS_NEON) { + aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_neon; + } aom_dc_top_predictor_8x8 = aom_dc_top_predictor_8x8_c; if (flags & HAS_NEON) aom_dc_top_predictor_8x8 = aom_dc_top_predictor_8x8_neon; aom_fdct4x4 = aom_fdct4x4_c; if (flags & HAS_NEON) aom_fdct4x4 = aom_fdct4x4_neon; aom_fdct4x4_lp = aom_fdct4x4_lp_c; - if (flags & HAS_NEON) aom_fdct4x4_lp = aom_fdct4x4_lp_neon; - aom_get16x16var = aom_get16x16var_c; - if (flags & HAS_NEON) aom_get16x16var = aom_get16x16var_neon; - aom_get8x8var = aom_get8x8var_c; - if (flags & HAS_NEON) aom_get8x8var = aom_get8x8var_neon; + if (flags & HAS_NEON) { + aom_fdct4x4_lp = aom_fdct4x4_lp_neon; + } aom_get_var_sse_sum_16x16_dual = aom_get_var_sse_sum_16x16_dual_c; if (flags & HAS_NEON) aom_get_var_sse_sum_16x16_dual = aom_get_var_sse_sum_16x16_dual_neon; aom_get_var_sse_sum_8x8_quad = aom_get_var_sse_sum_8x8_quad_c; @@ -2081,6 +2119,10 @@ if (flags & HAS_NEON) aom_masked_sad8x4 = aom_masked_sad8x4_neon; aom_masked_sad8x8 = aom_masked_sad8x8_c; if (flags & HAS_NEON) aom_masked_sad8x8 = aom_masked_sad8x8_neon; + aom_minmax_8x8 = aom_minmax_8x8_c; + if (flags & HAS_NEON) { + aom_minmax_8x8 = aom_minmax_8x8_neon; + } aom_mse16x16 = aom_mse16x16_c; if (flags & HAS_NEON) aom_mse16x16 = aom_mse16x16_neon; aom_mse16x8 = aom_mse16x8_c;
diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/av1_rtcd.h b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/av1_rtcd.h index ce3445e..37a8f71 100644 --- a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/av1_rtcd.h +++ b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/arm-neon/config/aom_dsp_rtcd.h index 67f3637..cc9741db 100644 --- a/third_party/libaom/source/config/linux/arm-neon/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/linux/arm-neon/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -46,7 +45,13 @@ #define aom_blend_a64_vmask aom_blend_a64_vmask_neon void aom_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define aom_comp_avg_pred aom_comp_avg_pred_c +void aom_comp_avg_pred_neon(uint8_t* comp_pred, + const uint8_t* pred, + int width, + int height, + const uint8_t* ref, + int ref_stride); +#define aom_comp_avg_pred aom_comp_avg_pred_neon void aom_comp_mask_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask); #define aom_comp_mask_pred aom_comp_mask_pred_c @@ -110,7 +115,11 @@ #define aom_dc_128_predictor_64x32 aom_dc_128_predictor_64x32_c void aom_dc_128_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_c +void aom_dc_128_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_neon void aom_dc_128_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_128_predictor_8x16 aom_dc_128_predictor_8x16_c @@ -171,7 +180,11 @@ #define aom_dc_left_predictor_64x32 aom_dc_left_predictor_64x32_c void aom_dc_left_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_c +void aom_dc_left_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_neon void aom_dc_left_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_left_predictor_8x16 aom_dc_left_predictor_8x16_c @@ -232,7 +245,11 @@ #define aom_dc_predictor_64x32 aom_dc_predictor_64x32_c void aom_dc_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_c +void aom_dc_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_neon void aom_dc_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_predictor_8x16 aom_dc_predictor_8x16_c @@ -293,7 +310,11 @@ #define aom_dc_top_predictor_64x32 aom_dc_top_predictor_64x32_c void aom_dc_top_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_c +void aom_dc_top_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_neon void aom_dc_top_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_top_predictor_8x16 aom_dc_top_predictor_8x16_c @@ -430,14 +451,6 @@ void aom_fft8x8_float_c(const float *input, float *temp, float *output); #define aom_fft8x8_float aom_fft8x8_float_c -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_neon - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_neon - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); #define aom_get_blk_sse_sum aom_get_blk_sse_sum_c @@ -825,7 +838,13 @@ #define aom_masked_sub_pixel_variance8x8 aom_masked_sub_pixel_variance8x8_c void aom_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define aom_minmax_8x8 aom_minmax_8x8_c +void aom_minmax_8x8_neon(const uint8_t* s, + int p, + const uint8_t* d, + int dp, + int* min, + int* max); +#define aom_minmax_8x8 aom_minmax_8x8_neon unsigned int aom_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); unsigned int aom_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); @@ -926,9 +945,6 @@ void aom_paeth_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_paeth_predictor_8x8 aom_paeth_predictor_8x8_neon -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_c - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); #define aom_quantize_b aom_quantize_b_neon @@ -977,9 +993,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_c - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_neon @@ -1034,9 +1047,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_c - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad32x16 aom_sad32x16_neon @@ -1091,9 +1101,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_c - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_neon @@ -1130,9 +1137,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_c - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad64x128 aom_sad64x128_neon @@ -1187,9 +1191,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_c - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_neon @@ -1244,9 +1245,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_c - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad_skip_128x128 aom_sad_skip_128x128_neon
diff --git a/third_party/libaom/source/config/linux/arm-neon/config/av1_rtcd.h b/third_party/libaom/source/config/linux/arm-neon/config/av1_rtcd.h index 2bda09b..6dfd871 100644 --- a/third_party/libaom/source/config/linux/arm-neon/config/av1_rtcd.h +++ b/third_party/libaom/source/config/linux/arm-neon/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/linux/arm/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/arm/config/aom_dsp_rtcd.h index baa3004..8eb32b8 100644 --- a/third_party/libaom/source/config/linux/arm/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/linux/arm/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -406,12 +405,6 @@ void aom_fft8x8_float_c(const float *input, float *temp, float *output); #define aom_fft8x8_float aom_fft8x8_float_c -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_c - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_c - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); #define aom_get_blk_sse_sum aom_get_blk_sse_sum_c @@ -820,9 +813,6 @@ void aom_paeth_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_paeth_predictor_8x8 aom_paeth_predictor_8x8_c -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_c - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); #define aom_quantize_b aom_quantize_b_c @@ -862,9 +852,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_c - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_c @@ -910,9 +897,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_c - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad32x16 aom_sad32x16_c @@ -958,9 +942,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_c - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_c @@ -991,9 +972,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_c - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad64x128 aom_sad64x128_c @@ -1039,9 +1017,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_c - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_c @@ -1087,9 +1062,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_c - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad_skip_128x128 aom_sad_skip_128x128_c
diff --git a/third_party/libaom/source/config/linux/arm/config/av1_rtcd.h b/third_party/libaom/source/config/linux/arm/config/av1_rtcd.h index 5de60fa..37b426a 100644 --- a/third_party/libaom/source/config/linux/arm/config/av1_rtcd.h +++ b/third_party/libaom/source/config/linux/arm/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/arm64/config/aom_dsp_rtcd.h index 67f3637..cc9741db 100644 --- a/third_party/libaom/source/config/linux/arm64/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/linux/arm64/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -46,7 +45,13 @@ #define aom_blend_a64_vmask aom_blend_a64_vmask_neon void aom_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define aom_comp_avg_pred aom_comp_avg_pred_c +void aom_comp_avg_pred_neon(uint8_t* comp_pred, + const uint8_t* pred, + int width, + int height, + const uint8_t* ref, + int ref_stride); +#define aom_comp_avg_pred aom_comp_avg_pred_neon void aom_comp_mask_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask); #define aom_comp_mask_pred aom_comp_mask_pred_c @@ -110,7 +115,11 @@ #define aom_dc_128_predictor_64x32 aom_dc_128_predictor_64x32_c void aom_dc_128_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_c +void aom_dc_128_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_neon void aom_dc_128_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_128_predictor_8x16 aom_dc_128_predictor_8x16_c @@ -171,7 +180,11 @@ #define aom_dc_left_predictor_64x32 aom_dc_left_predictor_64x32_c void aom_dc_left_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_c +void aom_dc_left_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_neon void aom_dc_left_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_left_predictor_8x16 aom_dc_left_predictor_8x16_c @@ -232,7 +245,11 @@ #define aom_dc_predictor_64x32 aom_dc_predictor_64x32_c void aom_dc_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_c +void aom_dc_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_neon void aom_dc_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_predictor_8x16 aom_dc_predictor_8x16_c @@ -293,7 +310,11 @@ #define aom_dc_top_predictor_64x32 aom_dc_top_predictor_64x32_c void aom_dc_top_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_c +void aom_dc_top_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_neon void aom_dc_top_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_top_predictor_8x16 aom_dc_top_predictor_8x16_c @@ -430,14 +451,6 @@ void aom_fft8x8_float_c(const float *input, float *temp, float *output); #define aom_fft8x8_float aom_fft8x8_float_c -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_neon - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_neon - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); #define aom_get_blk_sse_sum aom_get_blk_sse_sum_c @@ -825,7 +838,13 @@ #define aom_masked_sub_pixel_variance8x8 aom_masked_sub_pixel_variance8x8_c void aom_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define aom_minmax_8x8 aom_minmax_8x8_c +void aom_minmax_8x8_neon(const uint8_t* s, + int p, + const uint8_t* d, + int dp, + int* min, + int* max); +#define aom_minmax_8x8 aom_minmax_8x8_neon unsigned int aom_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); unsigned int aom_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); @@ -926,9 +945,6 @@ void aom_paeth_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_paeth_predictor_8x8 aom_paeth_predictor_8x8_neon -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_c - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); #define aom_quantize_b aom_quantize_b_neon @@ -977,9 +993,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_c - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_neon @@ -1034,9 +1047,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_c - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad32x16 aom_sad32x16_neon @@ -1091,9 +1101,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_c - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_neon @@ -1130,9 +1137,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_c - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad64x128 aom_sad64x128_neon @@ -1187,9 +1191,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_c - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_neon @@ -1244,9 +1245,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_c - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad_skip_128x128 aom_sad_skip_128x128_neon
diff --git a/third_party/libaom/source/config/linux/arm64/config/av1_rtcd.h b/third_party/libaom/source/config/linux/arm64/config/av1_rtcd.h index 2bda09b..6dfd871 100644 --- a/third_party/libaom/source/config/linux/arm64/config/av1_rtcd.h +++ b/third_party/libaom/source/config/linux/arm64/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/linux/generic/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/generic/config/aom_dsp_rtcd.h index 11d752f..109eda4 100644 --- a/third_party/libaom/source/config/linux/generic/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/linux/generic/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -406,12 +405,6 @@ void aom_fft8x8_float_c(const float *input, float *temp, float *output); #define aom_fft8x8_float aom_fft8x8_float_c -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_c - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_c - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); #define aom_get_blk_sse_sum aom_get_blk_sse_sum_c @@ -820,9 +813,6 @@ void aom_paeth_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_paeth_predictor_8x8 aom_paeth_predictor_8x8_c -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_c - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); #define aom_quantize_b aom_quantize_b_c @@ -862,9 +852,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_c - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_c @@ -910,9 +897,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_c - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad32x16 aom_sad32x16_c @@ -958,9 +942,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_c - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_c @@ -991,9 +972,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_c - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad64x128 aom_sad64x128_c @@ -1039,9 +1017,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_c - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_c @@ -1087,9 +1062,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_c - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad_skip_128x128 aom_sad_skip_128x128_c
diff --git a/third_party/libaom/source/config/linux/generic/config/av1_rtcd.h b/third_party/libaom/source/config/linux/generic/config/av1_rtcd.h index 47cad8c..77657a9 100644 --- a/third_party/libaom/source/config/linux/generic/config/av1_rtcd.h +++ b/third_party/libaom/source/config/linux/generic/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/linux/ia32/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/ia32/config/aom_dsp_rtcd.h index c2ac5c87..56fb931 100644 --- a/third_party/libaom/source/config/linux/ia32/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/linux/ia32/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -410,68 +409,164 @@ RTCD_EXTERN void (*aom_dist_wtd_comp_avg_pred)(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const DIST_WTD_COMP_PARAMS *jcp_param); unsigned int aom_dist_wtd_sad128x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad128x128_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad128x128_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad128x128_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad128x128_avg aom_dist_wtd_sad128x128_avg_sse2 unsigned int aom_dist_wtd_sad128x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad128x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad128x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad128x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad128x64_avg aom_dist_wtd_sad128x64_avg_sse2 unsigned int aom_dist_wtd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x16_avg aom_dist_wtd_sad16x16_avg_sse2 unsigned int aom_dist_wtd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x32_avg aom_dist_wtd_sad16x32_avg_sse2 unsigned int aom_dist_wtd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x8_avg aom_dist_wtd_sad16x8_avg_sse2 unsigned int aom_dist_wtd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x16_avg aom_dist_wtd_sad32x16_avg_sse2 unsigned int aom_dist_wtd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x32_avg aom_dist_wtd_sad32x32_avg_sse2 unsigned int aom_dist_wtd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x64_avg aom_dist_wtd_sad32x64_avg_sse2 unsigned int aom_dist_wtd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad4x4_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad4x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad4x4_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad4x4_avg aom_dist_wtd_sad4x4_avg_sse2 unsigned int aom_dist_wtd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad4x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad4x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad4x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad4x8_avg aom_dist_wtd_sad4x8_avg_sse2 unsigned int aom_dist_wtd_sad64x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x128_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x128_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x128_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x128_avg aom_dist_wtd_sad64x128_avg_sse2 unsigned int aom_dist_wtd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x32_avg aom_dist_wtd_sad64x32_avg_sse2 unsigned int aom_dist_wtd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x64_avg aom_dist_wtd_sad64x64_avg_sse2 unsigned int aom_dist_wtd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x16_avg aom_dist_wtd_sad8x16_avg_sse2 unsigned int aom_dist_wtd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x4_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x4_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x4_avg aom_dist_wtd_sad8x4_avg_sse2 unsigned int aom_dist_wtd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x8_avg aom_dist_wtd_sad8x8_avg_sse2 uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); @@ -567,13 +662,6 @@ void aom_fft8x8_float_avx2(const float *input, float *temp, float *output); RTCD_EXTERN void (*aom_fft8x8_float)(const float *input, float *temp, float *output); -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_c - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_sse2 - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); void aom_get_blk_sse_sum_sse2(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); void aom_get_blk_sse_sum_avx2(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); @@ -1164,10 +1252,6 @@ void aom_paeth_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); RTCD_EXTERN void (*aom_paeth_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -void aom_pixel_scale_sse2(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_sse2 - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); @@ -1228,10 +1312,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad128xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_sse2 - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_sse2 @@ -1292,10 +1372,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad16xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_sse2 - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1362,10 +1438,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad32xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_sse2 - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_sse2 @@ -1402,10 +1474,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad4xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_sse2 - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1472,10 +1540,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad64xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_sse2 - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_sse2 @@ -1530,10 +1594,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad8xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_sse2 - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -2387,39 +2447,9 @@ aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_sse2; if (flags & HAS_AVX2) aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_avx2; aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_c; - if (flags & HAS_SSSE3) aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_ssse3; - aom_dist_wtd_sad128x128_avg = aom_dist_wtd_sad128x128_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad128x128_avg = aom_dist_wtd_sad128x128_avg_ssse3; - aom_dist_wtd_sad128x64_avg = aom_dist_wtd_sad128x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad128x64_avg = aom_dist_wtd_sad128x64_avg_ssse3; - aom_dist_wtd_sad16x16_avg = aom_dist_wtd_sad16x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x16_avg = aom_dist_wtd_sad16x16_avg_ssse3; - aom_dist_wtd_sad16x32_avg = aom_dist_wtd_sad16x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x32_avg = aom_dist_wtd_sad16x32_avg_ssse3; - aom_dist_wtd_sad16x8_avg = aom_dist_wtd_sad16x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x8_avg = aom_dist_wtd_sad16x8_avg_ssse3; - aom_dist_wtd_sad32x16_avg = aom_dist_wtd_sad32x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x16_avg = aom_dist_wtd_sad32x16_avg_ssse3; - aom_dist_wtd_sad32x32_avg = aom_dist_wtd_sad32x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x32_avg = aom_dist_wtd_sad32x32_avg_ssse3; - aom_dist_wtd_sad32x64_avg = aom_dist_wtd_sad32x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x64_avg = aom_dist_wtd_sad32x64_avg_ssse3; - aom_dist_wtd_sad4x4_avg = aom_dist_wtd_sad4x4_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad4x4_avg = aom_dist_wtd_sad4x4_avg_ssse3; - aom_dist_wtd_sad4x8_avg = aom_dist_wtd_sad4x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad4x8_avg = aom_dist_wtd_sad4x8_avg_ssse3; - aom_dist_wtd_sad64x128_avg = aom_dist_wtd_sad64x128_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x128_avg = aom_dist_wtd_sad64x128_avg_ssse3; - aom_dist_wtd_sad64x32_avg = aom_dist_wtd_sad64x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x32_avg = aom_dist_wtd_sad64x32_avg_ssse3; - aom_dist_wtd_sad64x64_avg = aom_dist_wtd_sad64x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x64_avg = aom_dist_wtd_sad64x64_avg_ssse3; - aom_dist_wtd_sad8x16_avg = aom_dist_wtd_sad8x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x16_avg = aom_dist_wtd_sad8x16_avg_ssse3; - aom_dist_wtd_sad8x4_avg = aom_dist_wtd_sad8x4_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x4_avg = aom_dist_wtd_sad8x4_avg_ssse3; - aom_dist_wtd_sad8x8_avg = aom_dist_wtd_sad8x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x8_avg = aom_dist_wtd_sad8x8_avg_ssse3; + if (flags & HAS_SSSE3) { + aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_ssse3; + } aom_dist_wtd_sub_pixel_avg_variance128x128 = aom_dist_wtd_sub_pixel_avg_variance128x128_c; if (flags & HAS_SSSE3) aom_dist_wtd_sub_pixel_avg_variance128x128 = aom_dist_wtd_sub_pixel_avg_variance128x128_ssse3; aom_dist_wtd_sub_pixel_avg_variance128x64 = aom_dist_wtd_sub_pixel_avg_variance128x64_c;
diff --git a/third_party/libaom/source/config/linux/ia32/config/av1_rtcd.h b/third_party/libaom/source/config/linux/ia32/config/av1_rtcd.h index 5d5643ab3..0f4e73f 100644 --- a/third_party/libaom/source/config/linux/ia32/config/av1_rtcd.h +++ b/third_party/libaom/source/config/linux/ia32/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/linux/x64/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/x64/config/aom_dsp_rtcd.h index 1463e97..b98b07b 100644 --- a/third_party/libaom/source/config/linux/x64/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/linux/x64/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -410,68 +409,164 @@ RTCD_EXTERN void (*aom_dist_wtd_comp_avg_pred)(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const DIST_WTD_COMP_PARAMS *jcp_param); unsigned int aom_dist_wtd_sad128x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad128x128_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad128x128_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad128x128_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad128x128_avg aom_dist_wtd_sad128x128_avg_sse2 unsigned int aom_dist_wtd_sad128x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad128x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad128x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad128x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad128x64_avg aom_dist_wtd_sad128x64_avg_sse2 unsigned int aom_dist_wtd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x16_avg aom_dist_wtd_sad16x16_avg_sse2 unsigned int aom_dist_wtd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x32_avg aom_dist_wtd_sad16x32_avg_sse2 unsigned int aom_dist_wtd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x8_avg aom_dist_wtd_sad16x8_avg_sse2 unsigned int aom_dist_wtd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x16_avg aom_dist_wtd_sad32x16_avg_sse2 unsigned int aom_dist_wtd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x32_avg aom_dist_wtd_sad32x32_avg_sse2 unsigned int aom_dist_wtd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x64_avg aom_dist_wtd_sad32x64_avg_sse2 unsigned int aom_dist_wtd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad4x4_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad4x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad4x4_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad4x4_avg aom_dist_wtd_sad4x4_avg_sse2 unsigned int aom_dist_wtd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad4x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad4x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad4x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad4x8_avg aom_dist_wtd_sad4x8_avg_sse2 unsigned int aom_dist_wtd_sad64x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x128_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x128_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x128_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x128_avg aom_dist_wtd_sad64x128_avg_sse2 unsigned int aom_dist_wtd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x32_avg aom_dist_wtd_sad64x32_avg_sse2 unsigned int aom_dist_wtd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x64_avg aom_dist_wtd_sad64x64_avg_sse2 unsigned int aom_dist_wtd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x16_avg aom_dist_wtd_sad8x16_avg_sse2 unsigned int aom_dist_wtd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x4_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x4_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x4_avg aom_dist_wtd_sad8x4_avg_sse2 unsigned int aom_dist_wtd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x8_avg aom_dist_wtd_sad8x8_avg_sse2 uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); @@ -567,13 +662,6 @@ void aom_fft8x8_float_avx2(const float *input, float *temp, float *output); RTCD_EXTERN void (*aom_fft8x8_float)(const float *input, float *temp, float *output); -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_c - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_sse2 - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); void aom_get_blk_sse_sum_sse2(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); void aom_get_blk_sse_sum_avx2(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); @@ -1164,10 +1252,6 @@ void aom_paeth_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); RTCD_EXTERN void (*aom_paeth_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -void aom_pixel_scale_sse2(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_sse2 - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); @@ -1230,10 +1314,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad128xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_sse2 - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_sse2 @@ -1294,10 +1374,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad16xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_sse2 - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1364,10 +1440,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad32xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_sse2 - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_sse2 @@ -1404,10 +1476,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad4xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_sse2 - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1474,10 +1542,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad64xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_sse2 - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_sse2 @@ -1532,10 +1596,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad8xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_sse2 - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -2390,39 +2450,9 @@ aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_sse2; if (flags & HAS_AVX2) aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_avx2; aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_c; - if (flags & HAS_SSSE3) aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_ssse3; - aom_dist_wtd_sad128x128_avg = aom_dist_wtd_sad128x128_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad128x128_avg = aom_dist_wtd_sad128x128_avg_ssse3; - aom_dist_wtd_sad128x64_avg = aom_dist_wtd_sad128x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad128x64_avg = aom_dist_wtd_sad128x64_avg_ssse3; - aom_dist_wtd_sad16x16_avg = aom_dist_wtd_sad16x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x16_avg = aom_dist_wtd_sad16x16_avg_ssse3; - aom_dist_wtd_sad16x32_avg = aom_dist_wtd_sad16x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x32_avg = aom_dist_wtd_sad16x32_avg_ssse3; - aom_dist_wtd_sad16x8_avg = aom_dist_wtd_sad16x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x8_avg = aom_dist_wtd_sad16x8_avg_ssse3; - aom_dist_wtd_sad32x16_avg = aom_dist_wtd_sad32x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x16_avg = aom_dist_wtd_sad32x16_avg_ssse3; - aom_dist_wtd_sad32x32_avg = aom_dist_wtd_sad32x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x32_avg = aom_dist_wtd_sad32x32_avg_ssse3; - aom_dist_wtd_sad32x64_avg = aom_dist_wtd_sad32x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x64_avg = aom_dist_wtd_sad32x64_avg_ssse3; - aom_dist_wtd_sad4x4_avg = aom_dist_wtd_sad4x4_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad4x4_avg = aom_dist_wtd_sad4x4_avg_ssse3; - aom_dist_wtd_sad4x8_avg = aom_dist_wtd_sad4x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad4x8_avg = aom_dist_wtd_sad4x8_avg_ssse3; - aom_dist_wtd_sad64x128_avg = aom_dist_wtd_sad64x128_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x128_avg = aom_dist_wtd_sad64x128_avg_ssse3; - aom_dist_wtd_sad64x32_avg = aom_dist_wtd_sad64x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x32_avg = aom_dist_wtd_sad64x32_avg_ssse3; - aom_dist_wtd_sad64x64_avg = aom_dist_wtd_sad64x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x64_avg = aom_dist_wtd_sad64x64_avg_ssse3; - aom_dist_wtd_sad8x16_avg = aom_dist_wtd_sad8x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x16_avg = aom_dist_wtd_sad8x16_avg_ssse3; - aom_dist_wtd_sad8x4_avg = aom_dist_wtd_sad8x4_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x4_avg = aom_dist_wtd_sad8x4_avg_ssse3; - aom_dist_wtd_sad8x8_avg = aom_dist_wtd_sad8x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x8_avg = aom_dist_wtd_sad8x8_avg_ssse3; + if (flags & HAS_SSSE3) { + aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_ssse3; + } aom_dist_wtd_sub_pixel_avg_variance128x128 = aom_dist_wtd_sub_pixel_avg_variance128x128_c; if (flags & HAS_SSSE3) aom_dist_wtd_sub_pixel_avg_variance128x128 = aom_dist_wtd_sub_pixel_avg_variance128x128_ssse3; aom_dist_wtd_sub_pixel_avg_variance128x64 = aom_dist_wtd_sub_pixel_avg_variance128x64_c;
diff --git a/third_party/libaom/source/config/linux/x64/config/av1_rtcd.h b/third_party/libaom/source/config/linux/x64/config/av1_rtcd.h index 5d5643ab3..0f4e73f 100644 --- a/third_party/libaom/source/config/linux/x64/config/av1_rtcd.h +++ b/third_party/libaom/source/config/linux/x64/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/win/arm64/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/win/arm64/config/aom_dsp_rtcd.h index 67f3637..cc9741db 100644 --- a/third_party/libaom/source/config/win/arm64/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/win/arm64/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -46,7 +45,13 @@ #define aom_blend_a64_vmask aom_blend_a64_vmask_neon void aom_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride); -#define aom_comp_avg_pred aom_comp_avg_pred_c +void aom_comp_avg_pred_neon(uint8_t* comp_pred, + const uint8_t* pred, + int width, + int height, + const uint8_t* ref, + int ref_stride); +#define aom_comp_avg_pred aom_comp_avg_pred_neon void aom_comp_mask_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask); #define aom_comp_mask_pred aom_comp_mask_pred_c @@ -110,7 +115,11 @@ #define aom_dc_128_predictor_64x32 aom_dc_128_predictor_64x32_c void aom_dc_128_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_c +void aom_dc_128_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_128_predictor_64x64 aom_dc_128_predictor_64x64_neon void aom_dc_128_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_128_predictor_8x16 aom_dc_128_predictor_8x16_c @@ -171,7 +180,11 @@ #define aom_dc_left_predictor_64x32 aom_dc_left_predictor_64x32_c void aom_dc_left_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_c +void aom_dc_left_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_left_predictor_64x64 aom_dc_left_predictor_64x64_neon void aom_dc_left_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_left_predictor_8x16 aom_dc_left_predictor_8x16_c @@ -232,7 +245,11 @@ #define aom_dc_predictor_64x32 aom_dc_predictor_64x32_c void aom_dc_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_c +void aom_dc_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_predictor_64x64 aom_dc_predictor_64x64_neon void aom_dc_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_predictor_8x16 aom_dc_predictor_8x16_c @@ -293,7 +310,11 @@ #define aom_dc_top_predictor_64x32 aom_dc_top_predictor_64x32_c void aom_dc_top_predictor_64x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_c +void aom_dc_top_predictor_64x64_neon(uint8_t* dst, + ptrdiff_t y_stride, + const uint8_t* above, + const uint8_t* left); +#define aom_dc_top_predictor_64x64 aom_dc_top_predictor_64x64_neon void aom_dc_top_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_dc_top_predictor_8x16 aom_dc_top_predictor_8x16_c @@ -430,14 +451,6 @@ void aom_fft8x8_float_c(const float *input, float *temp, float *output); #define aom_fft8x8_float aom_fft8x8_float_c -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get16x16var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_neon - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_neon - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); #define aom_get_blk_sse_sum aom_get_blk_sse_sum_c @@ -825,7 +838,13 @@ #define aom_masked_sub_pixel_variance8x8 aom_masked_sub_pixel_variance8x8_c void aom_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max); -#define aom_minmax_8x8 aom_minmax_8x8_c +void aom_minmax_8x8_neon(const uint8_t* s, + int p, + const uint8_t* d, + int dp, + int* min, + int* max); +#define aom_minmax_8x8 aom_minmax_8x8_neon unsigned int aom_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); unsigned int aom_mse16x16_neon(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); @@ -926,9 +945,6 @@ void aom_paeth_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); #define aom_paeth_predictor_8x8 aom_paeth_predictor_8x8_neon -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_c - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); #define aom_quantize_b aom_quantize_b_neon @@ -977,9 +993,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_c - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_neon @@ -1034,9 +1047,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_c - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad32x16 aom_sad32x16_neon @@ -1091,9 +1101,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_c - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_neon @@ -1130,9 +1137,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_c - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad64x128 aom_sad64x128_neon @@ -1187,9 +1191,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_c - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_neon @@ -1244,9 +1245,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_c - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_neon(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad_skip_128x128 aom_sad_skip_128x128_neon
diff --git a/third_party/libaom/source/config/win/arm64/config/av1_rtcd.h b/third_party/libaom/source/config/win/arm64/config/av1_rtcd.h index 2bda09b..6dfd871 100644 --- a/third_party/libaom/source/config/win/arm64/config/av1_rtcd.h +++ b/third_party/libaom/source/config/win/arm64/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/win/ia32/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/win/ia32/config/aom_dsp_rtcd.h index c2ac5c87..56fb931 100644 --- a/third_party/libaom/source/config/win/ia32/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/win/ia32/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -410,68 +409,164 @@ RTCD_EXTERN void (*aom_dist_wtd_comp_avg_pred)(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const DIST_WTD_COMP_PARAMS *jcp_param); unsigned int aom_dist_wtd_sad128x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad128x128_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad128x128_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad128x128_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad128x128_avg aom_dist_wtd_sad128x128_avg_sse2 unsigned int aom_dist_wtd_sad128x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad128x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad128x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad128x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad128x64_avg aom_dist_wtd_sad128x64_avg_sse2 unsigned int aom_dist_wtd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x16_avg aom_dist_wtd_sad16x16_avg_sse2 unsigned int aom_dist_wtd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x32_avg aom_dist_wtd_sad16x32_avg_sse2 unsigned int aom_dist_wtd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x8_avg aom_dist_wtd_sad16x8_avg_sse2 unsigned int aom_dist_wtd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x16_avg aom_dist_wtd_sad32x16_avg_sse2 unsigned int aom_dist_wtd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x32_avg aom_dist_wtd_sad32x32_avg_sse2 unsigned int aom_dist_wtd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x64_avg aom_dist_wtd_sad32x64_avg_sse2 unsigned int aom_dist_wtd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad4x4_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad4x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad4x4_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad4x4_avg aom_dist_wtd_sad4x4_avg_sse2 unsigned int aom_dist_wtd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad4x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad4x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad4x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad4x8_avg aom_dist_wtd_sad4x8_avg_sse2 unsigned int aom_dist_wtd_sad64x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x128_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x128_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x128_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x128_avg aom_dist_wtd_sad64x128_avg_sse2 unsigned int aom_dist_wtd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x32_avg aom_dist_wtd_sad64x32_avg_sse2 unsigned int aom_dist_wtd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x64_avg aom_dist_wtd_sad64x64_avg_sse2 unsigned int aom_dist_wtd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x16_avg aom_dist_wtd_sad8x16_avg_sse2 unsigned int aom_dist_wtd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x4_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x4_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x4_avg aom_dist_wtd_sad8x4_avg_sse2 unsigned int aom_dist_wtd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x8_avg aom_dist_wtd_sad8x8_avg_sse2 uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); @@ -567,13 +662,6 @@ void aom_fft8x8_float_avx2(const float *input, float *temp, float *output); RTCD_EXTERN void (*aom_fft8x8_float)(const float *input, float *temp, float *output); -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_c - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_sse2 - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); void aom_get_blk_sse_sum_sse2(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); void aom_get_blk_sse_sum_avx2(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); @@ -1164,10 +1252,6 @@ void aom_paeth_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); RTCD_EXTERN void (*aom_paeth_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -void aom_pixel_scale_sse2(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_sse2 - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); @@ -1228,10 +1312,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad128xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_sse2 - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_sse2 @@ -1292,10 +1372,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad16xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_sse2 - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1362,10 +1438,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad32xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_sse2 - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_sse2 @@ -1402,10 +1474,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad4xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_sse2 - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1472,10 +1540,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad64xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_sse2 - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_sse2 @@ -1530,10 +1594,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad8xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_sse2 - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -2387,39 +2447,9 @@ aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_sse2; if (flags & HAS_AVX2) aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_avx2; aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_c; - if (flags & HAS_SSSE3) aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_ssse3; - aom_dist_wtd_sad128x128_avg = aom_dist_wtd_sad128x128_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad128x128_avg = aom_dist_wtd_sad128x128_avg_ssse3; - aom_dist_wtd_sad128x64_avg = aom_dist_wtd_sad128x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad128x64_avg = aom_dist_wtd_sad128x64_avg_ssse3; - aom_dist_wtd_sad16x16_avg = aom_dist_wtd_sad16x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x16_avg = aom_dist_wtd_sad16x16_avg_ssse3; - aom_dist_wtd_sad16x32_avg = aom_dist_wtd_sad16x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x32_avg = aom_dist_wtd_sad16x32_avg_ssse3; - aom_dist_wtd_sad16x8_avg = aom_dist_wtd_sad16x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x8_avg = aom_dist_wtd_sad16x8_avg_ssse3; - aom_dist_wtd_sad32x16_avg = aom_dist_wtd_sad32x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x16_avg = aom_dist_wtd_sad32x16_avg_ssse3; - aom_dist_wtd_sad32x32_avg = aom_dist_wtd_sad32x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x32_avg = aom_dist_wtd_sad32x32_avg_ssse3; - aom_dist_wtd_sad32x64_avg = aom_dist_wtd_sad32x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x64_avg = aom_dist_wtd_sad32x64_avg_ssse3; - aom_dist_wtd_sad4x4_avg = aom_dist_wtd_sad4x4_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad4x4_avg = aom_dist_wtd_sad4x4_avg_ssse3; - aom_dist_wtd_sad4x8_avg = aom_dist_wtd_sad4x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad4x8_avg = aom_dist_wtd_sad4x8_avg_ssse3; - aom_dist_wtd_sad64x128_avg = aom_dist_wtd_sad64x128_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x128_avg = aom_dist_wtd_sad64x128_avg_ssse3; - aom_dist_wtd_sad64x32_avg = aom_dist_wtd_sad64x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x32_avg = aom_dist_wtd_sad64x32_avg_ssse3; - aom_dist_wtd_sad64x64_avg = aom_dist_wtd_sad64x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x64_avg = aom_dist_wtd_sad64x64_avg_ssse3; - aom_dist_wtd_sad8x16_avg = aom_dist_wtd_sad8x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x16_avg = aom_dist_wtd_sad8x16_avg_ssse3; - aom_dist_wtd_sad8x4_avg = aom_dist_wtd_sad8x4_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x4_avg = aom_dist_wtd_sad8x4_avg_ssse3; - aom_dist_wtd_sad8x8_avg = aom_dist_wtd_sad8x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x8_avg = aom_dist_wtd_sad8x8_avg_ssse3; + if (flags & HAS_SSSE3) { + aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_ssse3; + } aom_dist_wtd_sub_pixel_avg_variance128x128 = aom_dist_wtd_sub_pixel_avg_variance128x128_c; if (flags & HAS_SSSE3) aom_dist_wtd_sub_pixel_avg_variance128x128 = aom_dist_wtd_sub_pixel_avg_variance128x128_ssse3; aom_dist_wtd_sub_pixel_avg_variance128x64 = aom_dist_wtd_sub_pixel_avg_variance128x64_c;
diff --git a/third_party/libaom/source/config/win/ia32/config/av1_rtcd.h b/third_party/libaom/source/config/win/ia32/config/av1_rtcd.h index 5d5643ab3..0f4e73f 100644 --- a/third_party/libaom/source/config/win/ia32/config/av1_rtcd.h +++ b/third_party/libaom/source/config/win/ia32/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/third_party/libaom/source/config/win/x64/config/aom_dsp_rtcd.h b/third_party/libaom/source/config/win/x64/config/aom_dsp_rtcd.h index 1463e97..b98b07b 100644 --- a/third_party/libaom/source/config/win/x64/config/aom_dsp_rtcd.h +++ b/third_party/libaom/source/config/win/x64/config/aom_dsp_rtcd.h
@@ -14,9 +14,8 @@ #include "aom/aom_integer.h" #include "aom_dsp/aom_dsp_common.h" -#include "av1/common/enums.h" #include "av1/common/blockd.h" - +#include "av1/common/enums.h" #ifdef __cplusplus extern "C" { @@ -410,68 +409,164 @@ RTCD_EXTERN void (*aom_dist_wtd_comp_avg_pred)(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const DIST_WTD_COMP_PARAMS *jcp_param); unsigned int aom_dist_wtd_sad128x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad128x128_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad128x128_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad128x128_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad128x128_avg aom_dist_wtd_sad128x128_avg_sse2 unsigned int aom_dist_wtd_sad128x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad128x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad128x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad128x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad128x64_avg aom_dist_wtd_sad128x64_avg_sse2 unsigned int aom_dist_wtd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x16_avg aom_dist_wtd_sad16x16_avg_sse2 unsigned int aom_dist_wtd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x32_avg aom_dist_wtd_sad16x32_avg_sse2 unsigned int aom_dist_wtd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad16x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad16x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad16x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad16x8_avg aom_dist_wtd_sad16x8_avg_sse2 unsigned int aom_dist_wtd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x16_avg aom_dist_wtd_sad32x16_avg_sse2 unsigned int aom_dist_wtd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x32_avg aom_dist_wtd_sad32x32_avg_sse2 unsigned int aom_dist_wtd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad32x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad32x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad32x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad32x64_avg aom_dist_wtd_sad32x64_avg_sse2 unsigned int aom_dist_wtd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad4x4_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad4x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad4x4_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad4x4_avg aom_dist_wtd_sad4x4_avg_sse2 unsigned int aom_dist_wtd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad4x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad4x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad4x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad4x8_avg aom_dist_wtd_sad4x8_avg_sse2 unsigned int aom_dist_wtd_sad64x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x128_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x128_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x128_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x128_avg aom_dist_wtd_sad64x128_avg_sse2 unsigned int aom_dist_wtd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x32_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x32_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x32_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x32_avg aom_dist_wtd_sad64x32_avg_sse2 unsigned int aom_dist_wtd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad64x64_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad64x64_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad64x64_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad64x64_avg aom_dist_wtd_sad64x64_avg_sse2 unsigned int aom_dist_wtd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x16_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x16_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x16_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x16_avg aom_dist_wtd_sad8x16_avg_sse2 unsigned int aom_dist_wtd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x4_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x4_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x4_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x4_avg aom_dist_wtd_sad8x4_avg_sse2 unsigned int aom_dist_wtd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -unsigned int aom_dist_wtd_sad8x8_avg_ssse3(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); -RTCD_EXTERN unsigned int (*aom_dist_wtd_sad8x8_avg)(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); +unsigned int aom_dist_wtd_sad8x8_avg_sse2( + const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred, + const DIST_WTD_COMP_PARAMS* jcp_param); +#define aom_dist_wtd_sad8x8_avg aom_dist_wtd_sad8x8_avg_sse2 uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_ssse3(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param); @@ -567,13 +662,6 @@ void aom_fft8x8_float_avx2(const float *input, float *temp, float *output); RTCD_EXTERN void (*aom_fft8x8_float)(const float *input, float *temp, float *output); -void aom_get16x16var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get16x16var aom_get16x16var_c - -void aom_get8x8var_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -void aom_get8x8var_sse2(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum); -#define aom_get8x8var aom_get8x8var_sse2 - void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); void aom_get_blk_sse_sum_sse2(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); void aom_get_blk_sse_sum_avx2(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum); @@ -1164,10 +1252,6 @@ void aom_paeth_predictor_8x8_ssse3(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); RTCD_EXTERN void (*aom_paeth_predictor_8x8)(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left); -void aom_pixel_scale_c(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -void aom_pixel_scale_sse2(const int16_t *src_diff, ptrdiff_t src_stride, int16_t *coeff, int log_scale, int h8, int w8); -#define aom_pixel_scale aom_pixel_scale_sse2 - void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); void aom_quantize_b_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); @@ -1230,10 +1314,6 @@ void aom_sad128x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad128x64x4d_avg aom_sad128x64x4d_avg_c -unsigned int aom_sad128xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad128xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad128xh aom_sad128xh_sse2 - unsigned int aom_sad16x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad16x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad16x16 aom_sad16x16_sse2 @@ -1294,10 +1374,6 @@ void aom_sad16x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad16x8x4d_avg aom_sad16x8x4d_avg_c -unsigned int aom_sad16xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad16xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad16xh aom_sad16xh_sse2 - unsigned int aom_sad32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad32x16_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1364,10 +1440,6 @@ void aom_sad32x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad32x64x4d_avg aom_sad32x64x4d_avg_c -unsigned int aom_sad32xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad32xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad32xh aom_sad32xh_sse2 - unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad4x4_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad4x4 aom_sad4x4_sse2 @@ -1404,10 +1476,6 @@ void aom_sad4x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad4x8x4d_avg aom_sad4x8x4d_avg_c -unsigned int aom_sad4xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad4xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad4xh aom_sad4xh_sse2 - unsigned int aom_sad64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad64x128_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -1474,10 +1542,6 @@ void aom_sad64x64x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad64x64x4d_avg aom_sad64x64x4d_avg_c -unsigned int aom_sad64xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad64xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad64xh aom_sad64xh_sse2 - unsigned int aom_sad8x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad8x16_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); #define aom_sad8x16 aom_sad8x16_sse2 @@ -1532,10 +1596,6 @@ void aom_sad8x8x4d_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, const uint8_t *second_pred, uint32_t sad_array[4]); #define aom_sad8x8x4d_avg aom_sad8x8x4d_avg_c -unsigned int aom_sad8xh_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -unsigned int aom_sad8xh_sse2(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height); -#define aom_sad8xh aom_sad8xh_sse2 - unsigned int aom_sad_skip_128x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_sse2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); unsigned int aom_sad_skip_128x128_avx2(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride); @@ -2390,39 +2450,9 @@ aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_sse2; if (flags & HAS_AVX2) aom_dc_top_predictor_64x64 = aom_dc_top_predictor_64x64_avx2; aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_c; - if (flags & HAS_SSSE3) aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_ssse3; - aom_dist_wtd_sad128x128_avg = aom_dist_wtd_sad128x128_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad128x128_avg = aom_dist_wtd_sad128x128_avg_ssse3; - aom_dist_wtd_sad128x64_avg = aom_dist_wtd_sad128x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad128x64_avg = aom_dist_wtd_sad128x64_avg_ssse3; - aom_dist_wtd_sad16x16_avg = aom_dist_wtd_sad16x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x16_avg = aom_dist_wtd_sad16x16_avg_ssse3; - aom_dist_wtd_sad16x32_avg = aom_dist_wtd_sad16x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x32_avg = aom_dist_wtd_sad16x32_avg_ssse3; - aom_dist_wtd_sad16x8_avg = aom_dist_wtd_sad16x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad16x8_avg = aom_dist_wtd_sad16x8_avg_ssse3; - aom_dist_wtd_sad32x16_avg = aom_dist_wtd_sad32x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x16_avg = aom_dist_wtd_sad32x16_avg_ssse3; - aom_dist_wtd_sad32x32_avg = aom_dist_wtd_sad32x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x32_avg = aom_dist_wtd_sad32x32_avg_ssse3; - aom_dist_wtd_sad32x64_avg = aom_dist_wtd_sad32x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad32x64_avg = aom_dist_wtd_sad32x64_avg_ssse3; - aom_dist_wtd_sad4x4_avg = aom_dist_wtd_sad4x4_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad4x4_avg = aom_dist_wtd_sad4x4_avg_ssse3; - aom_dist_wtd_sad4x8_avg = aom_dist_wtd_sad4x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad4x8_avg = aom_dist_wtd_sad4x8_avg_ssse3; - aom_dist_wtd_sad64x128_avg = aom_dist_wtd_sad64x128_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x128_avg = aom_dist_wtd_sad64x128_avg_ssse3; - aom_dist_wtd_sad64x32_avg = aom_dist_wtd_sad64x32_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x32_avg = aom_dist_wtd_sad64x32_avg_ssse3; - aom_dist_wtd_sad64x64_avg = aom_dist_wtd_sad64x64_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad64x64_avg = aom_dist_wtd_sad64x64_avg_ssse3; - aom_dist_wtd_sad8x16_avg = aom_dist_wtd_sad8x16_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x16_avg = aom_dist_wtd_sad8x16_avg_ssse3; - aom_dist_wtd_sad8x4_avg = aom_dist_wtd_sad8x4_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x4_avg = aom_dist_wtd_sad8x4_avg_ssse3; - aom_dist_wtd_sad8x8_avg = aom_dist_wtd_sad8x8_avg_c; - if (flags & HAS_SSSE3) aom_dist_wtd_sad8x8_avg = aom_dist_wtd_sad8x8_avg_ssse3; + if (flags & HAS_SSSE3) { + aom_dist_wtd_comp_avg_pred = aom_dist_wtd_comp_avg_pred_ssse3; + } aom_dist_wtd_sub_pixel_avg_variance128x128 = aom_dist_wtd_sub_pixel_avg_variance128x128_c; if (flags & HAS_SSSE3) aom_dist_wtd_sub_pixel_avg_variance128x128 = aom_dist_wtd_sub_pixel_avg_variance128x128_ssse3; aom_dist_wtd_sub_pixel_avg_variance128x64 = aom_dist_wtd_sub_pixel_avg_variance128x64_c;
diff --git a/third_party/libaom/source/config/win/x64/config/av1_rtcd.h b/third_party/libaom/source/config/win/x64/config/av1_rtcd.h index 5d5643ab3..0f4e73f 100644 --- a/third_party/libaom/source/config/win/x64/config/av1_rtcd.h +++ b/third_party/libaom/source/config/win/x64/config/av1_rtcd.h
@@ -15,12 +15,12 @@ #include "aom/aom_integer.h" #include "aom_dsp/odintrin.h" #include "aom_dsp/txfm_common.h" -#include "av1/common/common.h" -#include "av1/common/enums.h" -#include "av1/common/quant_common.h" -#include "av1/common/filter.h" -#include "av1/common/convolve.h" #include "av1/common/av1_txfm.h" +#include "av1/common/common.h" +#include "av1/common/convolve.h" +#include "av1/common/enums.h" +#include "av1/common/filter.h" +#include "av1/common/quant_common.h" #include "av1/common/restoration.h" struct macroblockd;
diff --git a/tools/binary_size/libsupersize/arsc_parser.py b/tools/binary_size/libsupersize/arsc_parser.py new file mode 100755 index 0000000..60655f1 --- /dev/null +++ b/tools/binary_size/libsupersize/arsc_parser.py
@@ -0,0 +1,681 @@ +#!/usr/bin/env python3 +# Copyright 2023 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +"""Utilities for ARSC file parsing. + +This file provides tools to performs shallow parsing for binary size analysis at +chunk level, without comprehensive error detection. +ARSC file format are extracted from: +https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/include/androidfw/ResourceTypes.h +https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/ResourceTypes.cpp +""" + +import argparse +import collections +import logging +import functools +import os +import struct +import sys +import zipfile + +import stream_reader + +# List of all possible ARSC chunk types (|type| field in ArscChunk). + +_RES_NULL_TYPE = 0x0000 +_RES_STRING_POOL_TYPE = 0x0001 +_RES_TABLE_TYPE = 0x0002 +_RES_XML_TYPE = 0x0003 +# Chunk types in _RES_XML_TYPE +_RES_XML_FIRST_CHUNK_TYPE = 0x0100 +_RES_XML_START_NAMESPACE_TYPE = 0x0100 +_RES_XML_END_NAMESPACE_TYPE = 0x0101 +_RES_XML_START_ELEMENT_TYPE = 0x0102 +_RES_XML_END_ELEMENT_TYPE = 0x0103 +_RES_XML_CDATA_TYPE = 0x0104 +_RES_XML_LAST_CHUNK_TYPE = 0x017f +# This contains a uint32_t array mapping strings in the string pool back to +# resource identifiers. It is optional. +_RES_XML_RESOURCE_MAP_TYPE = 0x0180 +# Chunk types in _RES_TABLE_TYPE +_RES_TABLE_PACKAGE_TYPE = 0x0200 +_RES_TABLE_TYPE_TYPE = 0x0201 +_RES_TABLE_TYPE_SPEC_TYPE = 0x0202 +_RES_TABLE_LIBRARY_TYPE = 0x0203 +_RES_TABLE_OVERLAYABLE_TYPE = 0x0204 +_RES_TABLE_OVERLAYABLE_POLICY_TYPE = 0x0205 +_RES_TABLE_STAGED_ALIAS_TYPE = 0x0206 + +_StringInfo = collections.namedtuple('StringInfo', 'str_size,enc_size,data') + + +class _ArscStreamReader(stream_reader.StreamReader): + def Clone(self): + ret = _ArscStreamReader(self._data) + ret.Seek(self.Tell()) + return ret + + def NextArscEncodedLengthUtf8(self): + byte1 = self.NextUByte() + return ((byte1 & 0x7F) << 8) | self.NextUByte() if byte1 & 0x80 else byte1 + + def NextArscEncodedLengthWide(self): + short1 = self.NextUShort() + return (((short1 & 0x7FFF) << 16) | self.NextUShort() if short1 + & 0x8000 else short1) + + def NextCString(self, n): + t = self.NextBytes(n) + term = t.find(0) + t = t if term < 0 else t[:term] + return t.decode('latin1') + + def PeekArscHeaderType(self): + pos = self.Tell() + ret = self.NextUShort() + self.Seek(pos) + return ret + + @functools.lru_cache + def GetArscResTypeToClassMap(self): + """Returns a lookup table to map chunk type to class. + + Requires all classes in this file to be parsed, before calling. + """ + return { + _RES_STRING_POOL_TYPE: ArscStringPool, + _RES_TABLE_TYPE: ArscResTable, + _RES_XML_TYPE: None, + _RES_XML_FIRST_CHUNK_TYPE: None, + _RES_XML_START_NAMESPACE_TYPE: None, + _RES_XML_END_NAMESPACE_TYPE: None, + _RES_XML_START_ELEMENT_TYPE: None, + _RES_XML_END_ELEMENT_TYPE: None, + _RES_XML_CDATA_TYPE: None, + _RES_XML_LAST_CHUNK_TYPE: None, + _RES_XML_RESOURCE_MAP_TYPE: None, + _RES_TABLE_PACKAGE_TYPE: ArscResTablePackage, + _RES_TABLE_TYPE_TYPE: ArscResTableType, + _RES_TABLE_TYPE_SPEC_TYPE: ArscResTableTypeSpec, + _RES_TABLE_LIBRARY_TYPE: None, + _RES_TABLE_OVERLAYABLE_TYPE: None, + _RES_TABLE_OVERLAYABLE_POLICY_TYPE: None, + _RES_TABLE_STAGED_ALIAS_TYPE: None, + } + + def NextArscChunk(self, parent=None): + chunk_type = self.PeekArscHeaderType() + arsc_class = self.GetArscResTypeToClassMap().get(chunk_type) + assert arsc_class, 'Failed to get class for chunk_type = %d' % chunk_type + return arsc_class(self, parent=parent) + + +def _SplitBits(value, *widths): + for width in widths: + yield value & ((1 << width) - 1) + value >>= width + + +class ResTableConfig: + """Structure to specify |config| in ArscResTableType.""" + def __init__(self, reader): + self.size = reader.NextUInt() + assert self.size == 64 + # imsi:32 -> {mcc:16, mnc:16} (ordered LSB first). + self.imsi = reader.NextUInt() + # locale:32 -> {languages[2]:8, country[2]:8}. + self.locale = reader.NextUInt() + # screen_type:32 -> {orientation:8, touchscreen:8, density:16}. + self.screen_type = reader.NextUInt() + # input:32 -> {keyboard:8, navigation:8, input_flags:8, input_pad0:8}. + # input_flags:8 -> {keys:2, nav:2, unused1:4}. + self.input = reader.NextUInt() + # screen_size:32 -> {screen_width:16, screen_height:16}. + self.screen_size = reader.NextUInt() + # version:32 -> {sdk_version:16, minor_version:16}. + self.version = reader.NextUInt() + # screen_config:32 -> {screen_layout:8, ui_mode:8, + # smallest_screen_width_dp:16}. + # screen_layout:8 -> {screen_layout_size:4, screen_long:2, layout_dir:2}. + # ui_mode:8 -> {ui_mode_type:4, ui_mode_night:2, unused2:2}. + self.screen_config = reader.NextUInt() + # screen_size_dp:32 -> {screen_width_dp:16, screen_height_dp:16}. + self.screen_size_dp = reader.NextUInt() + self.locale_script = reader.NextCString(4) + self.locale_variant = reader.NextCString(8) + # screen_config2:32 -> {screen_layout2:8, color_mode:8, + # screen_config_pad2:16}. + # screen_layout2:8 -> {screen_round:2, unused3:6}. + # color_mode:8 -> {wide_color_gamut:2, hdr:2, unused4:4}. + self.screen_config2 = reader.NextUInt() + self.locale_script_was_computed = bool(reader.NextUByte()) + self.locale_numbering_system = reader.NextCString(8) + # Skip 3 bytes to account for struct padding: Total size is 64 bytes. + reader.Skip(3) + + def EmitField(self, v, start, width, fmt, lookup=None): + """Formats and yields bit range from an integer if non-0.""" + bits = (v >> start) & ((1 << width) - 1) + if bits != 0: + yield (lookup and lookup.get(bits)) or fmt % bits + + def DecodeLanguageOrRegion(self, code, base): + if code & 0x8000 == 0: + # Two-letter encoding: (MSB) 0sssssss 0fffffff for first & second letters. + return (chr(code & 0x7f) + chr(code >> 8)).rstrip('\0') + # Three-letter encoding: (MSB) 1tttttss sssfffff. + return ''.join(chr(base + ((code >> i) & 0x1f)) for i in range(3)) + + def EmitLocaleString(self): + """Emits locale data as formatted string if non-0.""" + if self.locale == 0: + return + language, country = _SplitBits(self.locale, 16, 16) + script_was_provided = (self.locale_script + and not self.locale_script_was_computed) + ret = self.DecodeLanguageOrRegion(language, ord('a')) + if (not script_was_provided and not self.locale_variant + and not self.locale_numbering_system): # Legacy format. + if country != 0: + ret += '-r' + self.DecodeLanguageOrRegion(country, ord('0')) + else: + ret = 'b+' + ret + if script_was_provided: + ret += '+' + self.locale_script + if country != 0: + ret += '+' + self.DecodeLanguageOrRegion(country, ord('0')) + if self.locale_variant: + ret += '+' + self.locale_variant + if self.locale_numbering_system: + ret += '+u+nu+' + self.locale_numbering_system + yield ret + + def EmitAllTokens(self): + """Emits all non-0 data as string tokens. + + The formatting follows ResTable_config::toString(). Typically each value is + extracted as bit ranges in some member variable. If a value matches a + predefined constant (e.g., 4 = "xlarge") then the token is taken as the + string. Otherwise a fallback (e.g., "screenLayoutSize=5") is used instead. + """ + # yapf: disable + # imsi -> mcc + yield from self.EmitField(self.imsi, 0, 16, 'mcc%d') + # imsi -> mnc + yield from self.EmitField(self.imsi, 16, 16, 'mnc%d') + yield from self.EmitLocaleString() + # screen_config -> screen_layout -> layout_dir + yield from self.EmitField(self.screen_config, 6, 2, 'layoutDir=%d', { + 1: 'ldltr', # LAYOUTDIR_LTR + 2: 'ldrtl', # LAYOUTDIR_RTL + }) + # screen_config -> smallest_screen_width_dp + yield from self.EmitField(self.screen_config, 16, 16, 'sw%ddp') + # screen_size_dp -> screen_width_dp + yield from self.EmitField(self.screen_size_dp, 0, 16, 'w%ddp') + # screen_size_dp -> screen_height_dp + yield from self.EmitField(self.screen_size_dp, 16, 16, 'h%ddp') + # screen_config -> screen_layout -> screen_layout_size + yield from self.EmitField(self.screen_config, 0, 4, 'screenLayoutSize=%d', { + 1: 'small', # SCREENSIZE_SMALL + 2: 'normal', # SCREENSIZE_NORMAL + 3: 'large', # SCREENSIZE_LARGE + 4: 'xlarge', # SCREENSIZE_XLARGE + }) + # screen_config -> screen_layout -> screen_long + yield from self.EmitField(self.screen_config, 4, 2, 'screenLayoutLong=%d', { + 1: 'notling', # SCREENLOG_NO + 2: 'long', # SCREENLOG_YES + }) + # screen_config2 -> screen_layout2 -> screen_round + yield from self.EmitField(self.screen_config2, 0, 2, 'screenRound=%d', { + 1: 'notround', # SCREENROUND_NO + 2: 'round', # SCREENROUND_YES + }) + # screen_config2 -> color_mode -> wide_color_gamut + yield from self.EmitField(self.screen_config2, 8, 2, 'wideColorGamut=%d', { + 1: 'nowidecg', # WIDE_COLOR_GAMUT_NO + 2: 'widecg', # WIDE_COLOR_GAMUT_YES + }) + # screen_config2 -> color_mode -> hdr + yield from self.EmitField(self.screen_config2, 10, 2, 'hdr=%d', { + 1: 'lowdr', # HDR_NO + 2: 'highdr', # HDR_YES + }) + # screen_type -> orientation + yield from self.EmitField(self.screen_type, 0, 8, 'orientation=%d', { + 1: 'port', # ORIENTATION_PORT + 2: 'land', # ORIENTATION_LAND + 3: 'square', # ORIENTATION_SQUARE + }) + # screen_config -> ui_mode -> ui_mode_type + yield from self.EmitField(self.screen_config, 8, 4, 'uiModeType=%d', { + 1: 'normal', # UI_MODE_TYPE_NORMAL + 2: 'desk', # UI_MODE_TYPE_DESK + 3: 'car', # UI_MODE_TYPE_CAR + 4: 'television', # UI_MODE_TYPE_TELEVISION + 5: 'appliance', # UI_MODE_TYPE_APPLIANCE + 6: 'watch', # UI_MODE_TYPE_WATCH + 7: 'vrheadset', # UI_MODE_TYPE_VR_HEADSET + }) + # screen_config -> ui_mode -> ui_mode_night + yield from self.EmitField(self.screen_config, 12, 2, 'uiModeNight=%d', { + 1: 'notnight', # UI_MODE_NIGHT_NO + 2: 'night', # UI_MODE_NIGHT_YES + }) + # screen_type -> density + yield from self.EmitField(self.screen_type, 16, 16, '%ddpi', { + 120: 'ldpi', # DENSITY_LOW + 160: 'mdpi', # DENSITY_MEDIUM + 213: 'tvdpi', # DENSITY_TV + 240: 'hdpi', # DENSITY_HIGH + 320: 'xhdpi', # DENSITY_XHIGH + 480: 'xxhdpi', # DENSITY_XXHIGH + 640: 'xxxhdpi', # DENSITY_XXXHIGH + 0xffff: 'nodpi', # DENSITY_NONE + 0xfffe: 'anydpi', # DENSITY_ANY + }) + # screen_type -> touchscreen + yield from self.EmitField(self.screen_type, 8, 8, 'touchscreen=%d', { + 1: 'notouch', # TOUCHSCREEN_NOTOUCH + 2: 'finger', # TOUCHSCREEN_FINGER + 3: 'stylus', # TOUCHSCREEN_STYLUS + }) + # input -> input_flags -> keys + yield from self.EmitField(self.input, 16, 2, '(keys=%d)', { + 1: 'keysexposed', # KEYSHIDDEN_NO + 2: 'keyshidden', # KEYSHIDDEN_YES + 3: 'keyssoft', # KEYSHIDDEN_SOFT + }) + # input -> keyboard + yield from self.EmitField(self.input, 0, 8, 'keyboard=%d', { + 1: 'nokeys', # KEYBOARD_NOKEYS + 2: 'qwerty', # KEYBOARD_QWERTY + 3: '12key', # KEYBOARD_12KEY + }) + # input -> input_flags -> nav + yield from self.EmitField(self.input, 18, 2, 'inputFlagsNavHidden=%d', { + 1: 'navexposed', # NAVHIDDEN_NO + 2: 'navhidden', # NAVHIDDEN_YES + }) + # input -> navigation + yield from self.EmitField(self.input, 8, 8, 'navigation=%d', { + 1: 'nonav', # NAVIGATION_NONAV + 2: 'dpad', # NAVIGATION_DPAD + 3: 'trackball', # NAVIGATION_TRACKBALL + 4: 'wheel', # NAVIGATION_WHEEL + }) + # yapf: enable + if self.screen_size != 0: + yield '%dx%d' % tuple(_SplitBits(self.screen_size, 16, 16)) + if self.version != 0: + sdk, minor = _SplitBits(self.version, 16, 16) + yield f'v{sdk}' + (f'.{minor}' if minor else '') + + def __str__(self): + return '-'.join(self.EmitAllTokens()) + + +class ArscChunk: + """Base class for ARSC chunks, embedding hierarchy and common header. + + Fields: + addr: Absolute start address of chunk in the ARSC file. + parent: Reference to the parent chunk (None for root). + children: References to the children chunks. + type: (In header) Chunk type specified by a _RES_*_TYPE constant. + header_size: (In header) Byte size of the header, which is |type|-dependent. + size: (In header) Byte size of the chunk, including header. + padding: Number of padding bytes. + """ + def __init__(self, reader, parent): + # Custom additions for binary size tracking. + self.addr = reader.Tell() + self.parent = parent + self.children = [] + + # {type, header_size, size} constitute common header, "flattened" as membmer + # variable (instead of being wrapped into |header| var) for simplicity. + self.type = reader.NextUShort() + # Total header size, including 8 bytes here and |type|-specific data. + self.header_size = reader.NextUShort() + # Total chunk size, including header. + self.size = reader.NextUInt() + + @property + def payload_addr(self): + return self.addr + self.header_size + + @property + def end_addr(self): + return self.addr + self.size + + @property + def padding(self): + """Returns type-dependent padding, overridable.""" + return 0 + + def StrHelper(self, name, fields): + depth = 0 + cur = self.parent + while cur: + depth += 1 + cur = cur.parent + r = '[%08X, %08X)' % (self.addr, self.addr + self.size) + f = ', '.join(f'{k}={v}' for (k, v) in fields.items()) + return '%s: %s%s: %s' % (r, ' ' * depth, name, f) + + def __str__(self): + return self.StrHelper('UNKNOWN (type=%d)' % self.type, {}) + + +class ArscStringPool(ArscChunk): + """_RES_STRING_POOL_TYPE chunk for string storage. + + Fields: + string_count: Number of strings in chunk. + """ + + # If set, the string index is sorted by the string values. + SORTED_FLAG = 1 << 0 + # String pool is encoded in UTF-8. + UTF8_FLAG = 1 << 8 + + def __init__(self, reader, parent=None): + super().__init__(reader, parent) + self.string_count = reader.NextUInt() + self.style_count = reader.NextUInt() + self.flags = reader.NextUInt() + self.string_start = reader.NextUInt() + self.style_start = reader.NextUInt() + + self.is_utf8 = bool(self.flags & ArscStringPool.UTF8_FLAG) + assert reader.Tell() == self.payload_addr + + base = self.addr + self.string_start + self.string_addrs = [ + base + reader.NextUInt() for _ in range(self.string_count) + ] + + # Clone to enable lazy string read without polluting |reader|. This is + # cleared when no longer needed. + self.reader = reader.Clone() + + def __str__(self): + return self.StrHelper('STRING_POOL', {'string_count': self.string_count}) + + @property + @functools.lru_cache + def string_infos(self): + ret = [] + if self.is_utf8: + for offset in self.string_addrs: + self.reader.Seek(offset) + str_size = self.reader.NextArscEncodedLengthUtf8() + enc_size = self.reader.NextArscEncodedLengthUtf8() + data = self.reader.NextBytes(enc_size) + ret.append(_StringInfo(str_size, enc_size, data)) + else: + for offset in self.string_addrs: + self.reader.Seek(offset) + str_size = self.reader.NextArscEncodedLengthWide() + enc_size = str_size * 2 + data = self.reader.NextBytes(enc_size) + ret.append(_StringInfo(str_size, enc_size, data)) + return ret + + @property + @functools.lru_cache + def string_items(self): + encoding = 'utf-8' if self.is_utf8 else 'utf-16' + ret = [ + info.data.decode(encoding, errors='surrogatepass') + for info in self.string_infos + ] + self.reader = None + return ret + + def GetString(self, idx): + return self.string_items[idx] + + +class ArscResTable(ArscChunk): + """_RES_TABLE_TYPE chunk for ARSC file root. + + Children comprise of: + ArscStringPool + ArscResTablePackage 1 + ... + ArscResTablePackage n + + Fields: + package_count: Number of ArscResTablePackage entries (typically 1). + """ + def __init__(self, reader, parent=None): + super().__init__(reader, parent) + self.package_count = reader.NextUInt() + assert reader.PeekArscHeaderType() == _RES_STRING_POOL_TYPE + + self.string_pool = reader.NextArscChunk(parent=self) + self.children.append(self.string_pool) + + # Save |cur_addr| since children chunks may not be fully parsed. + cur_addr = self.string_pool.end_addr + self.packages = [] + for _ in range(self.package_count): + reader.Seek(cur_addr) + assert reader.PeekArscHeaderType() == _RES_TABLE_PACKAGE_TYPE + package = reader.NextArscChunk(parent=self) + self.children.append(package) + self.packages.append(package) + cur_addr = self.packages[-1].end_addr + + def __str__(self): + return self.StrHelper('TABLE', {'package_count': self.package_count}) + + +class ArscResTablePackage(ArscChunk): + """_RES_TABLE_PACKAGE_TYPE chunk containing a package's resources. + + Children *normally* comprise of: + ArscStringPool: For types (small, for resource types). + ArscStringPool: For keys (resource names) + ArscResTableTypeSpec 1: For resource type 1. + ArscResTableType 1.1: Config used by the type, has the same |entry_count|. + ... + ArscResTableType 1.n_1: Here n_1 depends on type 1. + ArscResTableTypeSpec 2: For resource type 2. + ArscResTableType 2.1 + ... + ArscResTableType 2.n_2 + ... + + Fields: + name: Android app package name for the resource. + """ + def __init__(self, reader, parent=None): + super().__init__(reader, parent) + self.id = reader.NextUInt() + assert self.id < 0x100, 'Package ID is too big' + self.name = reader.NextBytes(256).decode('utf-16').rstrip('\0') + self.type_strings = reader.NextUInt() + self.last_public_type = reader.NextUInt() + self.key_strings = reader.NextUInt() + self.last_public_key = reader.NextUInt() + self.type_id_offset = reader.NextUInt() + assert reader.Tell() == self.payload_addr + + self.type_pool = None + self.key_pool = None + + # Save |cur_addr| since children chunks may not be fully parsed. + cur_addr = self.payload_addr + while cur_addr < self.end_addr: + reader.Seek(cur_addr) + chunk = reader.NextArscChunk(parent=self) + self.children.append(chunk) + if chunk.type == _RES_STRING_POOL_TYPE: + if self.type_pool is None: + self.type_pool = chunk + elif self.key_pool is None: + self.key_pool = chunk + else: + logging.warn('Unexpected string pool at %08X.' % t.address) + cur_addr = chunk.end_addr + + def __str__(self): + return self.StrHelper('PACKAGE', {'name': self.name}) + + +class ArscResTableType(ArscChunk): + """_RES_TABLE_TYPE_TYPE chunk for resources of a common type and config. + + Following the header, the struct consinsts of a (relative) pointer table for + resource entries, followed by resource data (not parsed). The pointer table + can be dense or sparse. + * Dense tables use NO_ENTRY to mark resources unavailable for |config|. These + pointers are counted in |padding|. + * Sparse tables stores sorted (index, pointer) pairs and uses binary search. + Currently we don't support these. + + Fields: + type_str: Name of the common type, e.g., "drawable", "layout", "string". + config: ResTableConfig instance. + entry_count: Number of resources contained. + """ + NO_ENTRY = 0xffffffff + FLAG_SPARSE = 0x01 + + def __init__(self, reader, parent=None): + super().__init__(reader, parent) + assert parent + assert parent.type_pool, 'Missing type string pool.' + assert parent.key_pool, 'Missing key string pool.' + self.id = reader.NextUByte() + assert self.id != 0, 'ResTable_type has invalid id.' + self.flags = reader.NextUByte() + assert (self.flags & ArscResTableType.FLAG_SPARSE) == 0, ( + 'Sparse tables are unsupported.') + self.reserved = reader.NextUShort() + self.entry_count = reader.NextUInt() + self.entries_start = reader.NextUInt() + assert self.entries_start < self.size + self.config = ResTableConfig(reader) + assert reader.Tell() == self.payload_addr + + self.entry_padding = 0 + self.type_str = parent.type_pool.GetString(self.id - 1) + + entries_start_addr = self.addr + self.entries_start + entries_offsets = [reader.NextUInt() for _ in range(self.entry_count)] + assert entries_start_addr >= reader.Tell() + + self.entry_padding += sum(4 for o in entries_offsets + if o == ArscResTableType.NO_ENTRY) + # Skip reading actual entries. + reader.Seek(self.end_addr) + + @property + def padding(self): + return self.entry_padding + + def __str__(self): + return self.StrHelper( + 'TYPE', { + 'type_str': self.type_str, + 'entry_count': self.entry_count, + 'size': self.size, + 'padding': self.entry_padding, + 'config': str(self.config), + }) + + +class ArscResTableTypeSpec(ArscChunk): + """_RES_TABLE_TYPE_SPEC_TYPE chunk for info on resource of the same type. + + The info stored is independent of config. + + Fields: + type_str: Name of the common type, e.g., "drawable", "layout", "string". + entry_count: Number of resources contained. + """ + def __init__(self, reader, parent=None): + super().__init__(reader, parent) + assert parent + assert parent.type_pool, 'Missing type string pool.' + self.id = reader.NextUByte() + assert self.id != 0, 'ResTable_typeSpec has invalid id.' + self.res0 = reader.NextUByte() # Must be 0. + self.res1 = reader.NextUShort() # Must be 0. + self.entry_count = reader.NextUInt() + assert self.entry_count < 0x10000, 'ResTable_typeSpec has too many entries.' + + self.type_str = parent.type_pool.GetString(self.id - 1) + # Skip reading specs. + reader.Seek(self.end_addr) + + def __str__(self): + return self.StrHelper('TYPE_SPEC', { + 'type_str': self.type_str, + 'entry_count': self.entry_count + }) + + +class ArscFile: + """Represents a single ARSC file. + + Shallowly parses an ARSC file into nested ArscChunk for binary size analysis. + + Fields: + table: The root chunk that contains all other chunks. + """ + def __init__(self, data): + reader = _ArscStreamReader(data) + assert reader.PeekArscHeaderType() == _RES_TABLE_TYPE + self.table = reader.NextArscChunk() + + def VisitPreOrder(self): + """Depth-first pre-order visitor of all chunks.""" + yield self.table + st = [iter(self.table.children)] + while st: + chunk = next(st[-1], None) + if chunk: + yield chunk + st.append(iter(chunk.children)) + else: + st.pop() + + +def _DumpArscChunks(arsc_data): + arsc_file = ArscFile(arsc_data) + for chunk in arsc_file.VisitPreOrder(): + print(str(chunk)) + + +def main(): + parser = argparse.ArgumentParser(description='Dump ARSC contents to stdout.') + parser.add_argument('input', + help='Input (.arsc, .apk, .jar, .zip) file path.') + args = parser.parse_args() + + if os.path.splitext(args.input)[1] in ('.apk', '.jar', '.zip'): + with zipfile.ZipFile(args.input) as z: + arsc_file_paths = [ + f for f in z.namelist() if os.path.splitext(f)[1] == '.arsc' + ] + if not arsc_file_paths: + print('Error: {} does not contain .arsc files.'.format(args.input)) + sys.exit(1) + for path in arsc_file_paths: + _DumpArscChunks(z.read(path)) + + else: + with open(args.input, 'rb') as fh: + _DumpArscChunks(fh.read()) + + +if __name__ == '__main__': + main()
diff --git a/tools/binary_size/libsupersize/stream_reader.py b/tools/binary_size/libsupersize/stream_reader.py index ce7f7faa..8b4daa6 100644 --- a/tools/binary_size/libsupersize/stream_reader.py +++ b/tools/binary_size/libsupersize/stream_reader.py
@@ -66,6 +66,9 @@ def Tell(self): return self._pos + def Skip(self, delta): + self._pos += delta + def NextStruct(self, fmt): ret = struct.unpack_from(fmt, self._data, self._pos) self._pos += struct.calcsize(fmt)
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec index 81fff672..0316d41 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec
@@ -514,6 +514,10 @@ "META": {"sizes": {"includes": [20]}}, "includes": [2565], }, + "<(SHARED_INTERMEDIATE_DIR)/content/browser/resources/histograms/resources.grd": { + "META": {"sizes": {"includes": [5]}}, + "includes": [2568], + }, "<(SHARED_INTERMEDIATE_DIR)/content/browser/resources/indexed_db/resources.grd": { "META": {"sizes": {"includes": [20]}}, "includes": [2570],
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index a003971..93779cf 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -887,8 +887,8 @@ 'linux-finch-smoke-chrome': 'official_reclient', 'lorenz-graph-dbg': 'android_debug_bot_reclient_external_fastbuild', 'mac-arm64-finch-smoke-chrome': 'official_reclient_mac_arm', - 'win-arm64-dbg': 'chrome_branded_arm64_debug_reclient', - 'win-arm64-rel': 'chrome_branded_arm64_release_reclient', + 'win-arm64-dbg': 'gpu_tests_arm64_debug_reclient', + 'win-arm64-rel': 'gpu_tests_arm64_release_reclient', 'win-celab-rel': 'official_celab_release_bot', 'win-finch-smoke-chrome': 'official_reclient', }, @@ -1993,14 +1993,6 @@ 'cfi_full', 'cfi_icall', 'cfi_diag', 'thin_lto', 'release', 'static', 'dcheck_always_on', 'reclient', ], - 'chrome_branded_arm64_debug_reclient': [ - 'debug_bot_reclient', 'chrome_branded', 'arm64', 'proprietary_codecs', 'ffmpeg_branding_chrome' - ], - - 'chrome_branded_arm64_release_reclient': [ - 'release_bot_reclient', 'chrome_branded', 'arm64', 'proprietary_codecs', 'ffmpeg_branding_chrome' - ], - 'chrome_branded_reclient_minimal_symbols': [ 'chrome_branded', 'minimal_symbols', 'release_bot_reclient', ], @@ -2692,6 +2684,14 @@ 'gpu_tests', 'android', 'release_trybot_minimal_symbols_reclient', 'static_angle', ], + 'gpu_tests_arm64_debug_reclient': [ + 'gpu_tests', 'arm64', 'debug_bot_reclient' + ], + + 'gpu_tests_arm64_release_reclient': [ + 'gpu_tests', 'arm64', 'release_bot_reclient' + ], + 'gpu_tests_chromeos_amd64_release_trybot_dcheck_off_no_symbols_reclient': [ 'gpu_tests', 'chromeos_amd64-generic-vm_reclient', 'release_trybot_dcheck_off_reclient', 'no_symbols',
diff --git a/tools/mb/mb_config_expectations/internal.chrome.fyi.json b/tools/mb/mb_config_expectations/internal.chrome.fyi.json index 25cd03b..f37c462 100644 --- a/tools/mb/mb_config_expectations/internal.chrome.fyi.json +++ b/tools/mb/mb_config_expectations/internal.chrome.fyi.json
@@ -77,7 +77,6 @@ "win-arm64-dbg": { "gn_args": { "ffmpeg_branding": "Chrome", - "is_chrome_branded": true, "is_component_build": true, "is_debug": true, "proprietary_codecs": true, @@ -90,7 +89,6 @@ "gn_args": { "dcheck_always_on": false, "ffmpeg_branding": "Chrome", - "is_chrome_branded": true, "is_component_build": false, "is_debug": false, "proprietary_codecs": true,
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index de63f54..f34d8e2 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -36884,6 +36884,8 @@ <int value="4" label="Failure: The Autofill Ui cannot be shown."/> <int value="5" label="Failure: There is no valid credit card."/> <int value="6" label="Failure: There is no valid Autofill profile."/> + <int value="7" label="Failure: AutofillProfile setting is disabled."/> + <int value="8" label="Failure: AutofillCreditCard settings is disabled."/> </enum> <enum name="FastPairAccountKeyFailure"> @@ -58128,6 +58130,7 @@ <int value="-2097906903" label="ArcNearbySharing:disabled"/> <int value="-2097895488" label="NotificationScrollBar:enabled"/> <int value="-2097515669" label="disable-cast"/> + <int value="-2096845406" label="QuickAnswersRichCard:enabled"/> <int value="-2095519429" label="FtpProtocol:enabled"/> <int value="-2094897448" label="TranslateIntent:disabled"/> <int value="-2093047873" @@ -59073,6 +59076,7 @@ <int value="-1605920602" label="AVFoundationCaptureV2:disabled"/> <int value="-1605567628" label="disable-overlay-scrollbar"/> <int value="-1604519960" label="SystemKoreanPhysicalTyping:enabled"/> + <int value="-1604478217" label="QuickAnswersRichCard:disabled"/> <int value="-1604051051" label="SpecialLocale:disabled"/> <int value="-1603404046" label="V8VmFuture:disabled"/> <int value="-1603074997" label="LensRegionSearch:enabled"/> @@ -78814,6 +78818,7 @@ <int value="3" label="Access approved"/> <int value="4" label="Access declined"/> <int value="5" label="Error"/> + <int value="6" label="Requests Disabled"/> </enum> <enum name="ParentFrameKnown"> @@ -107017,6 +107022,14 @@ <int value="4" label="L2TP/IPsec PSK"/> </enum> +<enum name="VpnServiceBuilderCompatApisList"> +<!-- Value from components/arc/mojom/metrics.mojom --> + + <int value="0" label="Unsupported"/> + <int value="1" label="VPN Exclude Route"/> + <int value="2" label="VPN Add Route"/> +</enum> + <enum name="VPNUserAuthenticationType"> <int value="0" label="OpenVPN None"/> <int value="1" label="OpenVPN Certificate"/>
diff --git a/tools/metrics/histograms/metadata/arc/histograms.xml b/tools/metrics/histograms/metadata/arc/histograms.xml index 6fb696f..80d35be 100644 --- a/tools/metrics/histograms/metadata/arc/histograms.xml +++ b/tools/metrics/histograms/metadata/arc/histograms.xml
@@ -2706,6 +2706,17 @@ </summary> </histogram> +<histogram name="Arc.VpnServiceBuilderCompatApisCounter" + enum="VpnServiceBuilderCompatApisList" expires_after="2023-10-24"> + <owner>mhasank@google.com</owner> + <owner>preranap@google.com</owner> + <owner>arc-commercial@google.com</owner> + <summary> + Records the number of times an API for adding and excluding route in VPN is + called from ChromeOS Vpn Service Builder Compat Library. + </summary> +</histogram> + <histogram name="Arc.Wayland.LateTiming.Duration{WaylandEventType}" units="ms" expires_after="2023-09-16"> <owner>alanding@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/enterprise/histograms.xml b/tools/metrics/histograms/metadata/enterprise/histograms.xml index 2aff6e4b..8a9718d 100644 --- a/tools/metrics/histograms/metadata/enterprise/histograms.xml +++ b/tools/metrics/histograms/metadata/enterprise/histograms.xml
@@ -1221,7 +1221,7 @@ </histogram> <histogram name="Enterprise.Dlp.Errors.Adaptor" - enum="EnterpriseDlpPolicyCrOSAdaptorError" expires_after="2023-06-01"> + enum="EnterpriseDlpPolicyCrOSAdaptorError" expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary> @@ -1241,7 +1241,7 @@ </histogram> <histogram name="Enterprise.Dlp.Errors.Fanotify" - enum="EnterpriseDlpPolicyCrOSFanotifyError" expires_after="2023-06-01"> + enum="EnterpriseDlpPolicyCrOSFanotifyError" expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary> @@ -1251,7 +1251,7 @@ </histogram> <histogram name="Enterprise.Dlp.Errors.FileDatabase" - enum="EnterpriseDlpPolicyCrOSFileDatabaseError" expires_after="2023-06-01"> + enum="EnterpriseDlpPolicyCrOSFileDatabaseError" expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary> @@ -1271,7 +1271,7 @@ </histogram> <histogram name="Enterprise.Dlp.Errors.ReportQueueNotReady" enum="Boolean" - expires_after="2023-06-01"> + expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary> @@ -1281,7 +1281,7 @@ </histogram> <histogram name="Enterprise.Dlp.FanotifyDeleteEventSupport" enum="Boolean" - expires_after="2023-06-01"> + expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary> @@ -1290,14 +1290,14 @@ </histogram> <histogram name="Enterprise.Dlp.FanotifyMarkFilesystemSupport" enum="Boolean" - expires_after="2023-06-01"> + expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary>Record whether the kernel supports fanotify delete events.</summary> </histogram> <histogram name="Enterprise.Dlp.FileActionBlocked" - enum="EnterpriseDlpPolicyFileAction" expires_after="2023-06-01"> + enum="EnterpriseDlpPolicyFileAction" expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary> @@ -1307,7 +1307,7 @@ </histogram> <histogram name="Enterprise.Dlp.FileActionWarned" - enum="EnterpriseDlpPolicyFileAction" expires_after="2023-06-01"> + enum="EnterpriseDlpPolicyFileAction" expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary> @@ -1317,7 +1317,7 @@ </histogram> <histogram name="Enterprise.Dlp.FileActionWarnProceeded" - enum="EnterpriseDlpPolicyFileAction" expires_after="2023-06-01"> + enum="EnterpriseDlpPolicyFileAction" expires_after="2023-12-01"> <owner>accorsi@google.com</owner> <owner>chromeos-dlp@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/families/histograms.xml b/tools/metrics/histograms/metadata/families/histograms.xml index 4ec0173f..0c15b84d 100644 --- a/tools/metrics/histograms/metadata/families/histograms.xml +++ b/tools/metrics/histograms/metadata/families/histograms.xml
@@ -143,7 +143,8 @@ Other is for all other users that do not fall into any of the below categories. Users under the age of consent automatically have supervision applied to their accounts. Users over the age of consent can opt into - supervision. + supervision. WebApprovals metrics are included from M110 onwards. + ExtensionApprovals metrics are included from M115 onwards. </summary> </histogram> @@ -154,10 +155,13 @@ <summary> Records the state at which the Parent Access dialog is closed for all parent access flows. Allows to track the drop rate by important states during the - parent access flow. This metric is recorded for ChromeOS only. + parent access flow. This metric is recorded for ChromeOS only. WebApprovals + metrics are available from M110 onwards. ExtensionApprovals metrics are + available from M115 onwards. </summary> <token key="FlowType"> <variant name="All"/> + <variant name="ExtensionApprovals"/> <variant name="WebApprovals"/> </token> </histogram> @@ -171,6 +175,7 @@ </summary> <token key="FlowType"> <variant name="All"/> + <variant name="ExtensionApprovals"/> <variant name="WebApprovals"/> </token> </histogram>
diff --git a/tools/metrics/histograms/metadata/ios/histograms.xml b/tools/metrics/histograms/metadata/ios/histograms.xml index 9b6dbc0..26bef154 100644 --- a/tools/metrics/histograms/metadata/ios/histograms.xml +++ b/tools/metrics/histograms/metadata/ios/histograms.xml
@@ -512,19 +512,18 @@ </histogram> <histogram name="IOS.DefaultBrowserFullscreenPromo" - enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2022-12-01"> - <owner>thegreenfrog@chromium.org</owner> - <owner>rohitrao@chromium.org</owner> - <owner>rkgibson@chromium.org</owner> + enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> The action taken by the user in response to the default browser promo. </summary> </histogram> <histogram name="IOS.DefaultBrowserFullscreenPromoRemindMe" - enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2022-12-01"> - <owner>thegreenfrog@chromium.org</owner> - <owner>rohitrao@chromium.org</owner> + enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> The action taken by the user in response to the default browser promo with the Remind Me Later button. @@ -532,9 +531,9 @@ </histogram> <histogram name="IOS.DefaultBrowserFullscreenPromoRemindMeSecondPromo" - enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2022-12-01"> - <owner>thegreenfrog@chromium.org</owner> - <owner>rohitrao@chromium.org</owner> + enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> The action taken by the user in response to the second default browser promo after tapping on the Remind Me Later button. @@ -542,9 +541,9 @@ </histogram> <histogram name="IOS.DefaultBrowserFullscreenTailoredPromoAllTabs" - enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2022-12-01"> - <owner>rkgibson@chromium.org</owner> - <owner>djean@chromium.org</owner> + enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> The action taken by the user in response to the "All tabs" default browser tailored promo. @@ -552,9 +551,9 @@ </histogram> <histogram name="IOS.DefaultBrowserFullscreenTailoredPromoMadeForIOS" - enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2022-12-01"> - <owner>rkgibson@chromium.org</owner> - <owner>djean@chromium.org</owner> + enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> The action taken by the user in response to the "Made for iOS" default browser tailored promo. @@ -562,9 +561,9 @@ </histogram> <histogram name="IOS.DefaultBrowserFullscreenTailoredPromoStaySafe" - enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2022-12-01"> - <owner>rkgibson@chromium.org</owner> - <owner>djean@chromium.org</owner> + enum="IOSDefaultBrowserFullscreenPromoAction" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> The action taken by the user in response to the "Stay Safe" default browser tailored promo. @@ -572,18 +571,18 @@ </histogram> <histogram name="IOS.DefaultBrowserPromo.NonModal.OnScreenTime" units="ms" - expires_after="2023-02-26"> - <owner>rkgibson@chromium.org</owner> - <owner>djean@chromium.org</owner> + expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> Logs the time on screen for an impression of a non modal promo. iOS only. </summary> </histogram> <histogram name="IOS.DefaultBrowserPromo.NonModal.{Impression}" - enum="IOSDefaultBrowserPromoNonModalAction" expires_after="2022-12-01"> - <owner>rkgibson@chromium.org</owner> - <owner>djean@chromium.org</owner> + enum="IOSDefaultBrowserPromoNonModalAction" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> Logged when an action happens on the {Impression} impression of a non modal promo. Records the action of the promo. iOS only. @@ -595,9 +594,9 @@ </histogram> <histogram name="IOS.DefaultBrowserPromo.NonModal.{PromoType}" - enum="IOSDefaultBrowserPromoNonModalAction" expires_after="2022-12-01"> - <owner>rkgibson@chromium.org</owner> - <owner>djean@chromium.org</owner> + enum="IOSDefaultBrowserPromoNonModalAction" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> Logged when an action happens on a non modal promo triggered by {PromoType}. Records the action of the promo. iOS only. @@ -610,9 +609,9 @@ </histogram> <histogram name="IOS.DefaultBrowserPromo.TailoredFullscreen.{Action}" - enum="IOSDefaultBrowserTailoredPromoType" expires_after="2022-12-01"> - <owner>rkgibson@chromium.org</owner> - <owner>djean@chromium.org</owner> + enum="IOSDefaultBrowserTailoredPromoType" expires_after="2023-12-01"> + <owner>sebsg@chromium.org</owner> + <owner>bling-get-set-up@google.com</owner> <summary> Logged when the {Action} action happens in a tailored default browser promo. Records the type of promo.
diff --git a/tools/metrics/histograms/metadata/memory/histograms.xml b/tools/metrics/histograms/metadata/memory/histograms.xml index 9c3ca184..3432f60e 100644 --- a/tools/metrics/histograms/metadata/memory/histograms.xml +++ b/tools/metrics/histograms/metadata/memory/histograms.xml
@@ -1306,7 +1306,7 @@ </histogram> <histogram name="Memory.GPU.PeakMemoryAllocationSource2.{Usage}.{Source}" - units="MB" expires_after="2023-04-30"> + units="MB" expires_after="2024-04-30"> <owner>jonross@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -1326,7 +1326,7 @@ </histogram> <histogram name="Memory.GPU.PeakMemoryUsage2.{Usage}" units="MB" - expires_after="2023-04-30"> + expires_after="2024-04-30"> <owner>jonross@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index fcdf5bc..7ef1346 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -6593,9 +6593,9 @@ </histogram> <histogram base="true" name="GridTabSwitcher.DirtySpan" units="ms" - expires_after="2020-11-15"> - <owner>yusufo@chromium.org</owner> - <owner>wychen@chromium.org</owner> + expires_after="2023-10-08"> + <owner>ckitagawa@chromium.org</owner> + <owner>meiliang@chromium.org</owner> <summary> This histogram records the dirty span of the transition animation between Tab and Grid Tab Switcher. The dirty span is the duration from the start of @@ -6605,8 +6605,8 @@ <histogram base="true" name="GridTabSwitcher.FramePerSecond" units="frame/sec" expires_after="2023-10-08"> - <owner>yusufo@chromium.org</owner> - <owner>wychen@chromium.org</owner> + <owner>ckitagawa@chromium.org</owner> + <owner>meiliang@chromium.org</owner> <summary> This histogram records the frame rate of the transition animation between Tab and Grid Tab Switcher. @@ -6614,9 +6614,9 @@ </histogram> <histogram base="true" name="GridTabSwitcher.MaxFrameInterval" units="ms" - expires_after="2020-05-03"> - <owner>yusufo@chromium.org</owner> - <owner>wychen@chromium.org</owner> + expires_after="2023-10-08"> + <owner>ckitagawa@chromium.org</owner> + <owner>meiliang@chromium.org</owner> <summary> This histogram records the maximum interval between rendered frames during the transition animation between Tab and Grid Tab Switcher.
diff --git a/tools/metrics/histograms/metadata/phonehub/histograms.xml b/tools/metrics/histograms/metadata/phonehub/histograms.xml index a90259fc..79b50c0 100644 --- a/tools/metrics/histograms/metadata/phonehub/histograms.xml +++ b/tools/metrics/histograms/metadata/phonehub/histograms.xml
@@ -50,6 +50,28 @@ <summary>The steady state feature status of PhoneHub on user login.</summary> </histogram> +<histogram name="PhoneHub.Attestation.GeneratingTime" units="ms" + expires_after="2024-04-01"> + <owner>pushi@google.com</owner> + <owner>chromeos-cross-device-eng@google.com</owner> + <summary> + The time to generate valid attestation before sending message to phone. + Emitted when a valid attestation is generated and ready to send CrosState + message to phone. + </summary> +</histogram> + +<histogram name="PhoneHub.Attestation.GeneratingTime.Invalid" units="ms" + expires_after="2024-04-01"> + <owner>pushi@google.com</owner> + <owner>chromeos-cross-device-eng@google.com</owner> + <summary> + The time to generate an invalid attestation before sending message to phone. + Emitted when an invalid attestation is generated and ready to send CrosState + message to phone. + </summary> +</histogram> + <histogram name="PhoneHub.BubbleOpened.Connectable.Failed.HostLastSeen" units="ms" expires_after="2023-10-15"> <owner>jonmann@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/signin/histograms.xml b/tools/metrics/histograms/metadata/signin/histograms.xml index 33018c8..20ea00f 100644 --- a/tools/metrics/histograms/metadata/signin/histograms.xml +++ b/tools/metrics/histograms/metadata/signin/histograms.xml
@@ -1154,6 +1154,17 @@ <summary>Logs the original access point of each completed sign in.</summary> </histogram> +<histogram name="Signin.SigninDisabledNotificationShown" + enum="SigninAccessPoint" expires_after="2023-09-22"> + <owner>birnie@google.com</owner> + <owner>bsazonov@chromium.org</owner> + <owner>chrome-signin-team@google.com</owner> + <summary> + This histogram records the signin access point which was used when the + signin disabled notification was shown. This is on Android only. + </summary> +</histogram> + <histogram name="Signin.SigninReason" enum="SigninReason" expires_after="2023-10-08"> <owner>msarda@chromium.org</owner> @@ -1304,6 +1315,17 @@ </summary> </histogram> +<histogram name="Signin.SyncDisabledNotificationShown" enum="SigninAccessPoint" + expires_after="2023-09-22"> + <owner>birnie@google.com</owner> + <owner>bsazonov@chromium.org</owner> + <owner>chrome-signin-team@google.com</owner> + <summary> + This histogram records the sync access point which was used when the sync + disabled notification was shown. This is on Android only. + </summary> +</histogram> + <histogram name="Signin.SyncErrorMessage{SyncErrorReason}" enum="SyncErrorPromptUIAction" expires_after="2023-09-12"> <owner>triploblastic@chromium.org</owner>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index d4d4694..e51c990 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -13,16 +13,16 @@ "full_remote_path": "perfetto-luci-artifacts/adbbb6c78e3a86c5e87b0338d9e42eb6b4ddbf4d/linux-arm/trace_processor_shell" }, "mac": { - "hash": "eeb75e95493d95099e8d89a9f7631cb8feffebdc", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/ef2774e07ca5e6e6484c5dff043ebc331dd0de9d/trace_processor_shell" + "hash": "53a0e8595232e34e15b31ebe5b124a17a9a0688f", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/07e96adfc3904a18b7e199c17f004b5c1277f730/trace_processor_shell" }, "mac_arm64": { "hash": "7a4026b8718994145a52586fdec6e9447573345a", "full_remote_path": "perfetto-luci-artifacts/adbbb6c78e3a86c5e87b0338d9e42eb6b4ddbf4d/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "d0f14df8c9774f2fa42f6a3950113b3013563bd5", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/07e96adfc3904a18b7e199c17f004b5c1277f730/trace_processor_shell" + "hash": "8b21cf0ae3b4400e5ac4edd3a7fc88dbdaae6393", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/045679ede73589e328e84b6c42341676b43f25fc/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/tools/perf/process_perf_results.pydeps b/tools/perf/process_perf_results.pydeps index 0bc0a66..f8e61ff0 100644 --- a/tools/perf/process_perf_results.pydeps +++ b/tools/perf/process_perf_results.pydeps
@@ -143,6 +143,7 @@ ../../third_party/catapult/telemetry/telemetry/core/debug_data.py ../../third_party/catapult/telemetry/telemetry/core/exceptions.py ../../third_party/catapult/telemetry/telemetry/core/fuchsia_interface.py +../../third_party/catapult/telemetry/telemetry/core/linux_based_interface.py ../../third_party/catapult/telemetry/telemetry/core/local_server.py ../../third_party/catapult/telemetry/telemetry/core/memory_cache_http_server.py ../../third_party/catapult/telemetry/telemetry/core/network_controller.py
diff --git a/ui/accessibility/platform/automation/automation_v8_bindings.cc b/ui/accessibility/platform/automation/automation_v8_bindings.cc index c37e559f6..c24ffa3 100644 --- a/ui/accessibility/platform/automation/automation_v8_bindings.cc +++ b/ui/accessibility/platform/automation/automation_v8_bindings.cc
@@ -662,8 +662,7 @@ "GetDocLoaded", [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result, AutomationAXTreeWrapper* tree_wrapper) { - result.Set( - v8::Boolean::New(isolate, tree_wrapper->ax_tree()->data().loaded)); + result.Set(tree_wrapper->ax_tree()->data().loaded); }); RouteTreeIDFunction( "GetDocLoadingProgress", @@ -682,8 +681,7 @@ if (!anchor) return; - result.Set(v8::Boolean::New( - isolate, tree_wrapper->ax_tree()->data().sel_is_backward)); + result.Set(tree_wrapper->ax_tree()->data().sel_is_backward); }); RouteTreeIDFunction( "GetAnchorObjectID", @@ -919,7 +917,7 @@ if (!node->GetBoolAttribute(attribute, &attr_value)) return; - result.Set(v8::Boolean::New(isolate, attr_value)); + result.Set(attr_value); }); RouteNodeIDPlusAttributeFunction( "GetIntAttribute", @@ -1063,7 +1061,7 @@ bool value = node->GetIntAttribute(ax::mojom::IntAttribute::kTextPosition) == static_cast<int32_t>(ax::mojom::TextPosition::kSubscript); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetSuperscript", @@ -1073,7 +1071,7 @@ bool value = node->GetIntAttribute(ax::mojom::IntAttribute::kTextPosition) == static_cast<int32_t>(ax::mojom::TextPosition::kSuperscript); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetBold", @@ -1081,7 +1079,7 @@ [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result, AutomationAXTreeWrapper* tree_wrapper, AXNode* node) { bool value = node->data().HasTextStyle(ax::mojom::TextStyle::kBold); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetItalic", base::BindRepeating([](v8::Isolate* isolate, @@ -1089,7 +1087,7 @@ AutomationAXTreeWrapper* tree_wrapper, AXNode* node) { bool value = node->data().HasTextStyle(ax::mojom::TextStyle::kItalic); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetUnderline", @@ -1098,7 +1096,7 @@ AutomationAXTreeWrapper* tree_wrapper, AXNode* node) { bool value = node->data().HasTextStyle(ax::mojom::TextStyle::kUnderline); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetLineThrough", @@ -1107,7 +1105,7 @@ AutomationAXTreeWrapper* tree_wrapper, AXNode* node) { bool value = node->data().HasTextStyle(ax::mojom::TextStyle::kLineThrough); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetDetectedLanguage", @@ -1340,7 +1338,7 @@ [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result, AutomationAXTreeWrapper* tree_wrapper, AXNode* node) { bool value = IsButton(node->GetRole()); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetIsCheckBox", @@ -1348,7 +1346,7 @@ [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result, AutomationAXTreeWrapper* tree_wrapper, AXNode* node) { bool value = IsCheckBox(node->GetRole()); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetIsComboBox", @@ -1356,7 +1354,7 @@ [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result, AutomationAXTreeWrapper* tree_wrapper, AXNode* node) { bool value = IsComboBox(node->GetRole()); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDFunction( "GetIsImage", @@ -1364,7 +1362,7 @@ [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result, AutomationAXTreeWrapper* tree_wrapper, AXNode* node) { bool value = IsImage(node->GetRole()); - result.Set(v8::Boolean::New(isolate, value)); + result.Set(value); })); RouteNodeIDPlusStringBoolFunction( "GetNextTextMatch",
diff --git a/ui/color/color_id.h b/ui/color/color_id.h index 1539abf..b2951c1d 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h
@@ -302,6 +302,7 @@ E_CPONLY(kColorLiveCaptionBubbleButtonIcon) \ E_CPONLY(kColorLiveCaptionBubbleButtonIconDisabled) \ E_CPONLY(kColorLiveCaptionBubbleForegroundDefault) \ + E_CPONLY(kColorLiveCaptionBubbleForegroundSecondary) \ E_CPONLY(kColorLiveCaptionBubbleCheckbox) \ E_CPONLY(kColorLiveCaptionBubbleLink) \ E_CPONLY(kColorMenuBackground) \
diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc index e52dd23..fe43ba1 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc
@@ -109,6 +109,12 @@ kColorLiveCaptionBubbleButtonIcon, gfx::kDisabledControlAlpha); mixer[kColorLiveCaptionBubbleForegroundDefault] = GetColorWithMaxContrast(kColorLiveCaptionBubbleBackgroundDefault); + mixer[kColorLiveCaptionBubbleForegroundSecondary] = PickGoogleColor( + GetResultingPaintColor( + SetAlpha(kColorLiveCaptionBubbleForegroundDefault, 0x8C), + kColorLiveCaptionBubbleBackgroundDefault), + kColorLiveCaptionBubbleBackgroundDefault, + color_utils::kMinimumReadableContrastRatio); mixer[kColorLiveCaptionBubbleCheckbox] = PickGoogleColor( kColorAccent, kColorLiveCaptionBubbleBackgroundDefault, 6.0f); mixer[kColorLiveCaptionBubbleLink] = {kColorLiveCaptionBubbleCheckbox};
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn index 25c0f44..b793bb2 100644 --- a/ui/events/BUILD.gn +++ b/ui/events/BUILD.gn
@@ -699,6 +699,7 @@ if (use_ozone) { deps += [ + "//ui/events/devices:unittests", "//ui/events/ozone:unittests", "//ui/events/ozone/layout", ]
diff --git a/ui/events/devices/BUILD.gn b/ui/events/devices/BUILD.gn index 9cd3bd80..ce3b6644 100644 --- a/ui/events/devices/BUILD.gn +++ b/ui/events/devices/BUILD.gn
@@ -76,6 +76,21 @@ } } +source_set("unittests") { + testonly = true + + sources = [ + "input_device_unittest.cc", + "touchscreen_device_unittest.cc", + ] + + deps = [ + ":devices", + "//base", + "//base/test:test_support", + ] +} + source_set("test_support") { sources = [ "device_data_manager_test_api.cc",
diff --git a/ui/events/devices/input_device.cc b/ui/events/devices/input_device.cc index df4f9a2..f0d207ed 100644 --- a/ui/events/devices/input_device.cc +++ b/ui/events/devices/input_device.cc
@@ -6,11 +6,28 @@ #include <string> +#include "base/strings/stringprintf.h" + namespace ui { // static const int InputDevice::kInvalidId = 0; +std::ostream& operator<<(std::ostream& os, const InputDeviceType value) { + switch (value) { + case InputDeviceType::INPUT_DEVICE_INTERNAL: + return os << "ui::InputDeviceType::INPUT_DEVICE_INTERNAL"; + case InputDeviceType::INPUT_DEVICE_USB: + return os << "ui::InputDeviceType::INPUT_DEVICE_USB"; + case InputDeviceType::INPUT_DEVICE_BLUETOOTH: + return os << "ui::InputDeviceType::INPUT_DEVICE_BLUETOOTH"; + case InputDeviceType::INPUT_DEVICE_UNKNOWN: + return os << "ui::InputDeviceType::INPUT_DEVICE_UNKNOWN"; + } + return os << "ui::InputDeviceType::unknown_value(" + << static_cast<unsigned int>(value) << ")"; +} + InputDevice::InputDevice() : id(kInvalidId), type(InputDeviceType::INPUT_DEVICE_UNKNOWN), @@ -43,4 +60,19 @@ InputDevice::~InputDevice() { } +std::ostream& InputDevice::DescribeForLog(std::ostream& os) const { + return os << "class=ui::InputDevice id=" << id << std::endl + << " input_device_type=" << type << std::endl + << " name=\"" << name << "\"" << std::endl + << " phys=\"" << phys << "\"" << std::endl + << " enabled=" << enabled << std::endl + << " suspected_imposter=" << suspected_imposter << std::endl + << " sys_path=\"" << sys_path.AsUTF8Unsafe() << "\"" << std::endl + << " vendor_id=" << base::StringPrintf("%04X", vendor_id) + << std::endl + << " product_id=" << base::StringPrintf("%04X", product_id) + << std::endl + << " version=" << base::StringPrintf("%04X", version) << std::endl; +} + } // namespace ui
diff --git a/ui/events/devices/input_device.h b/ui/events/devices/input_device.h index 4845be9..ff7ebc0e 100644 --- a/ui/events/devices/input_device.h +++ b/ui/events/devices/input_device.h
@@ -6,6 +6,7 @@ #define UI_EVENTS_DEVICES_INPUT_DEVICE_H_ #include <stdint.h> +#include <ostream> #include <string> #include "base/files/file_path.h" @@ -20,6 +21,9 @@ INPUT_DEVICE_UNKNOWN, // Device that may or may not be an external device. }; +EVENTS_DEVICES_EXPORT std::ostream& operator<<(std::ostream& os, + const InputDeviceType value); + // Represents an input device state. struct EVENTS_DEVICES_EXPORT InputDevice { static const int kInvalidId; @@ -68,6 +72,9 @@ uint16_t vendor_id; uint16_t product_id; uint16_t version; + + // Debugging method to describe internal state + virtual std::ostream& DescribeForLog(std::ostream& os) const; }; } // namespace ui
diff --git a/ui/events/devices/input_device_unittest.cc b/ui/events/devices/input_device_unittest.cc new file mode 100644 index 0000000..f0a4827 --- /dev/null +++ b/ui/events/devices/input_device_unittest.cc
@@ -0,0 +1,59 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/events/devices/input_device.h" + +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/events/devices/input_device.h" + +namespace ui { + +namespace { + +constexpr char kTestDescription[] = R"(class=ui::InputDevice id=12 + input_device_type=ui::InputDeviceType::INPUT_DEVICE_USB + name="Name" + phys="Phys" + enabled=1 + suspected_imposter=0 + sys_path="/sys/some/path/event8" + vendor_id=0012 + product_id=BE00 + version=18AF +)"; + +} // namespace + +TEST(InputDeviceTest, TestDescription) { + ui::InputDevice device( + 12, ui::InputDeviceType::INPUT_DEVICE_USB, "Name", "Phys", + base::FilePath(FILE_PATH_LITERAL("/sys/some/path/event8")), 0x0012, + 0xBE00, 0x18AF); + + std::stringstream os; + + device.DescribeForLog(os); + + EXPECT_EQ(os.str(), kTestDescription); +} + +TEST(InputDeviceTest, InputDeviceTypeDescriptions) { + auto fmt = [](auto value) { + std::stringstream s; + s << value; + return s.str(); + }; + EXPECT_EQ("ui::InputDeviceType::INPUT_DEVICE_INTERNAL", + fmt(ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); + EXPECT_EQ("ui::InputDeviceType::INPUT_DEVICE_USB", + fmt(ui::InputDeviceType::INPUT_DEVICE_USB)); + EXPECT_EQ("ui::InputDeviceType::INPUT_DEVICE_BLUETOOTH", + fmt(ui::InputDeviceType::INPUT_DEVICE_BLUETOOTH)); + EXPECT_EQ("ui::InputDeviceType::INPUT_DEVICE_UNKNOWN", + fmt(ui::InputDeviceType::INPUT_DEVICE_UNKNOWN)); + EXPECT_EQ("ui::InputDeviceType::unknown_value(123)", + fmt(static_cast<ui::InputDeviceType>(123))); +} + +} // namespace ui
diff --git a/ui/events/devices/touchscreen_device.cc b/ui/events/devices/touchscreen_device.cc index 906af3d..c55220ee 100644 --- a/ui/events/devices/touchscreen_device.cc +++ b/ui/events/devices/touchscreen_device.cc
@@ -4,6 +4,7 @@ #include "ui/events/devices/touchscreen_device.h" +#include <ostream> #include <string> #include "ui/events/devices/input_device.h" @@ -40,4 +41,14 @@ TouchscreenDevice::~TouchscreenDevice() = default; +std::ostream& TouchscreenDevice::DescribeForLog(std::ostream& os) const { + os << "class=ui::TouchscreenDevice id=" << id << std::endl + << " size=" << size.ToString() << std::endl + << " touch_points=" << touch_points << std::endl + << " has_stylus=" << has_stylus << std::endl + << " has_stylus_garage_switch=" << has_stylus_garage_switch << std::endl + << "base "; + return InputDevice::DescribeForLog(os); +} + } // namespace ui
diff --git a/ui/events/devices/touchscreen_device.h b/ui/events/devices/touchscreen_device.h index b3927ed..b820a0e3 100644 --- a/ui/events/devices/touchscreen_device.h +++ b/ui/events/devices/touchscreen_device.h
@@ -7,6 +7,7 @@ #include <stdint.h> +#include <ostream> #include <string> #include "ui/display/types/display_constants.h" @@ -53,6 +54,8 @@ // DeviceDataManager::AreTouchscreenTargetDisplaysValid() for details. int64_t target_display_id = display::kInvalidDisplayId; + std::ostream& DescribeForLog(std::ostream& os) const override; + // NOTE: If adding fields please update mojo/input_devices.mojom. };
diff --git a/ui/events/devices/touchscreen_device_unittest.cc b/ui/events/devices/touchscreen_device_unittest.cc new file mode 100644 index 0000000..d0bebbd7a --- /dev/null +++ b/ui/events/devices/touchscreen_device_unittest.cc
@@ -0,0 +1,48 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/events/devices/touchscreen_device.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/events/devices/input_device.h" + +namespace ui { + +namespace { + +constexpr char kTestDescription[] = + R"(class=ui::TouchscreenDevice id=123 + size=1001x3008 + touch_points=4 + has_stylus=0 + has_stylus_garage_switch=1 +base class=ui::InputDevice id=123 + input_device_type=ui::InputDeviceType::INPUT_DEVICE_USB + name="Name" + phys="Phys" + enabled=1 + suspected_imposter=0 + sys_path="/sys/some/path/event8" + vendor_id=0012 + product_id=BE00 + version=18AF +)"; + +} // namespace + +TEST(TouchscreenDeviceTest, Description) { + ui::TouchscreenDevice device( + ui::InputDevice( + 123, ui::InputDeviceType::INPUT_DEVICE_USB, "Name", "Phys", + base::FilePath(FILE_PATH_LITERAL("/sys/some/path/event8")), 0x0012, + 0xBE00, 0x18AF), + gfx::Size(1001, 3008), 4, false, true); + + std::stringstream os; + + device.DescribeForLog(os); + + EXPECT_EQ(os.str(), kTestDescription); +} + +} // namespace ui
diff --git a/ui/ozone/platform/wayland/host/wayland_surface.cc b/ui/ozone/platform/wayland/host/wayland_surface.cc index 87f1752..3d81da0f 100644 --- a/ui/ozone/platform/wayland/host/wayland_surface.cc +++ b/ui/ozone/platform/wayland/host/wayland_surface.cc
@@ -921,17 +921,13 @@ } void WaylandSurface::set_color_space(gfx::ColorSpace color_space) { - if (!connection_->zcr_color_manager()) - return; - - if (color_space.GetPrimaryID() == gfx::ColorSpace::PrimaryID::INVALID || - color_space.GetTransferID() == gfx::ColorSpace::TransferID::INVALID || - color_space.GetMatrixID() == gfx::ColorSpace::MatrixID::INVALID || - color_space.GetRangeID() == gfx::ColorSpace::RangeID::INVALID) { - DLOG(ERROR) - << "WaylandSurface::SetColorSpace: Encountered invalid surface."; + if (!connection_->zcr_color_manager()) { return; } + if (!color_space.IsValid()) { + return; + } + auto wayland_zcr_color_space = connection_->zcr_color_manager()->GetColorSpace(color_space); if (wayland_zcr_color_space != nullptr)
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc index d3c0a31..8f1aab2 100644 --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -964,6 +964,10 @@ wm::IsActiveWindow(content_window_); } +void DesktopNativeWidgetAura::PaintAsActiveChanged() { + desktop_window_tree_host_->PaintAsActiveChanged(); +} + void DesktopNativeWidgetAura::SetZOrderLevel(ui::ZOrderLevel order) { if (content_window_) desktop_window_tree_host_->SetZOrderLevel(order);
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h index c18b7e6..b49e493 100644 --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h
@@ -169,6 +169,7 @@ void Activate() override; void Deactivate() override; bool IsActive() const override; + void PaintAsActiveChanged() override; void SetZOrderLevel(ui::ZOrderLevel order) override; ui::ZOrderLevel GetZOrderLevel() const override; void SetVisibleOnAllWorkspaces(bool always_visible) override;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host.cc index e5f3e92..abd40f8 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host.cc
@@ -20,6 +20,8 @@ void DesktopWindowTreeHost::UpdateWindowShapeIfNeeded( const ui::PaintContext& context) {} +void DesktopWindowTreeHost::PaintAsActiveChanged() {} + std::unique_ptr<aura::client::ScreenPositionClient> DesktopWindowTreeHost::CreateScreenPositionClient() { return std::make_unique<DesktopScreenPositionClient>(
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host.h b/ui/views/widget/desktop_aura/desktop_window_tree_host.h index aa3fe75..b219dca 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host.h
@@ -128,6 +128,7 @@ virtual void Activate() = 0; virtual void Deactivate() = 0; virtual bool IsActive() const = 0; + virtual void PaintAsActiveChanged(); virtual void Maximize() = 0; virtual void Minimize() = 0; virtual void Restore() = 0;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc index d52fc1510..a9a0ae058 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -400,6 +400,10 @@ return message_handler_->IsActive(); } +void DesktopWindowTreeHostWin::PaintAsActiveChanged() { + message_handler_->PaintAsActiveChanged(); +} + void DesktopWindowTreeHostWin::Maximize() { message_handler_->Maximize(); }
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h index 2b935ac..812f9a6 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -120,6 +120,7 @@ void Activate() override; void Deactivate() override; bool IsActive() const override; + void PaintAsActiveChanged() override; void Maximize() override; void Minimize() override; void Restore() override;
diff --git a/ui/views/widget/native_widget_private.cc b/ui/views/widget/native_widget_private.cc index c0c89ae..a7097e5 100644 --- a/ui/views/widget/native_widget_private.cc +++ b/ui/views/widget/native_widget_private.cc
@@ -21,6 +21,8 @@ return new_bounds; } +void NativeWidgetPrivate::PaintAsActiveChanged() {} + void NativeWidgetPrivate::ShowEmojiPanel() { ui::ShowEmojiPanel(); }
diff --git a/ui/views/widget/native_widget_private.h b/ui/views/widget/native_widget_private.h index c3a5bd06..1317ea4 100644 --- a/ui/views/widget/native_widget_private.h +++ b/ui/views/widget/native_widget_private.h
@@ -189,6 +189,7 @@ virtual void Activate() = 0; virtual void Deactivate() = 0; virtual bool IsActive() const = 0; + virtual void PaintAsActiveChanged(); virtual void SetZOrderLevel(ui::ZOrderLevel order) = 0; virtual ui::ZOrderLevel GetZOrderLevel() const = 0; virtual void SetVisibleOnAllWorkspaces(bool always_visible) = 0;
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc index 2569557..7052e57 100644 --- a/ui/views/widget/widget.cc +++ b/ui/views/widget/widget.cc
@@ -1336,7 +1336,7 @@ const bool was_paint_as_active = ShouldPaintAsActive(); ++paint_as_active_refcount_; if (ShouldPaintAsActive() != was_paint_as_active) { - paint_as_active_callbacks_.Notify(); + NotifyPaintAsActiveChanged(); if (parent() && !parent_paint_as_active_lock_) parent_paint_as_active_lock_ = parent()->LockPaintAsActive(); } @@ -1373,7 +1373,14 @@ // this->ShouldPaintAsActive() changes iff the native widget is // inactive and there's no lock on this widget. if (!(native_widget_active_ || paint_as_active_refcount_)) - paint_as_active_callbacks_.Notify(); + NotifyPaintAsActiveChanged(); +} + +void Widget::NotifyPaintAsActiveChanged() { + paint_as_active_callbacks_.Notify(); + if (native_widget_) { + native_widget_->PaintAsActiveChanged(); + } } void Widget::SetNativeTheme(ui::NativeTheme* native_theme) { @@ -1511,7 +1518,7 @@ // Notify controls (e.g. LabelButton) and children widgets about the // paint-as-active change. if (ShouldPaintAsActive() != was_paint_as_active) - paint_as_active_callbacks_.Notify(); + NotifyPaintAsActiveChanged(); return true; } @@ -2157,7 +2164,7 @@ parent_paint_as_active_lock_.reset(); if (ShouldPaintAsActive() != was_paint_as_active) - paint_as_active_callbacks_.Notify(); + NotifyPaintAsActiveChanged(); } void Widget::ClearFocusFromWidget() {
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h index 9576aadb..4d64cbb 100644 --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h
@@ -1072,6 +1072,10 @@ // Called when the ShouldPaintAsActive() of parent changes. void OnParentShouldPaintAsActiveChanged(); + // Notifies registered callbacks and the native widget of changes to + // the ShouldPaintAsActive() state. + void NotifyPaintAsActiveChanged(); + base::WeakPtr<Widget> GetWeakPtr(); // Overridden from NativeWidgetDelegate:
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc index 5603bd9..05f4c45 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc
@@ -1073,6 +1073,17 @@ PerformDwmTransition(); } +void HWNDMessageHandler::PaintAsActiveChanged() { + if (!delegate_->HasNonClientView() || !delegate_->CanActivate() || + !delegate_->HasFrame() || + (delegate_->GetFrameMode() == FrameMode::CUSTOM_DRAWN)) { + return; + } + + DefWindowProcWithRedrawLock(WM_NCACTIVATE, delegate_->ShouldPaintAsActive(), + 0); +} + void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon) { if (!window_icon.isNull()) {
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h index a8c9c12e..3afa60b 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h
@@ -172,6 +172,8 @@ void FrameTypeChanged(); + void PaintAsActiveChanged(); + void SetWindowIcons(const gfx::ImageSkia& window_icon, const gfx::ImageSkia& app_icon);
diff --git a/ui/webui/resources/cr_components/omnibox/realbox_dropdown.html b/ui/webui/resources/cr_components/omnibox/realbox_dropdown.html index 3d0a1cfe..e4ddbe13 100644 --- a/ui/webui/resources/cr_components/omnibox/realbox_dropdown.html +++ b/ui/webui/resources/cr_components/omnibox/realbox_dropdown.html
@@ -56,11 +56,11 @@ cursor: default; font-size: .875em; font-weight: 500; + letter-spacing: .5px; overflow: hidden; - padding-inline-end: 8px; - padding-inline-start: 8px; + padding-inline-end: 6px; + padding-inline-start: 6px; text-overflow: ellipsis; - text-transform: uppercase; white-space: nowrap; } @@ -96,12 +96,8 @@ } .secondary-side .header { - padding-inline-end: 6px; - padding-inline-start: 6px; - } - - .secondary-side .header .text { - padding: 0; + padding-inline-end: 0; + padding-inline-start: 0; } .secondary-side .matches {
diff --git a/ui/webui/resources/cr_components/omnibox/realbox_match.html b/ui/webui/resources/cr_components/omnibox/realbox_match.html index 4f26a40c..5244556 100644 --- a/ui/webui/resources/cr_components/omnibox/realbox_match.html +++ b/ui/webui/resources/cr_components/omnibox/realbox_match.html
@@ -94,7 +94,7 @@ } .match { - font-weight: 500; + font-weight: 600; } /* Uses a dimmed color for description for entities. */
diff --git a/weblayer/shell/android/BUILD.gn b/weblayer/shell/android/BUILD.gn index d82b2fd..9f9d5fdd 100644 --- a/weblayer/shell/android/BUILD.gn +++ b/weblayer/shell/android/BUILD.gn
@@ -98,10 +98,8 @@ "target_out_dir") + "/com_google_ar_core_java/jni" loadable_modules += [ "$_libarcore_dir/$android_app_abi/libarcore_sdk_c.so" ] - deps += [ - "//third_party/arcore-android-sdk-client:com_google_ar_core_J__unpack_aar", - "//third_party/arcore-android-sdk-client:com_google_ar_core_java__ignored_manifest", - ] + deps += + [ "//third_party/arcore-android-sdk-client:com_google_ar_core_java" ] } apk_name = "WebLayerSupport"