diff --git a/DEPS b/DEPS index b610ecbf2..11f7120 100644 --- a/DEPS +++ b/DEPS
@@ -304,15 +304,15 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': 'c01cb8e403468d4fcf5bb8cc7e66c577e7a5e34f', + 'v8_revision': '8a2a2668ef385ac74692318969bf5d2da7989643', # 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': '83293767b04a04806a6383edf07e61746fcc59bf', + 'angle_revision': '38a38b8debda3c470f0c6c71c7a1351d1e5b029b', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. - 'swiftshader_revision': 'f0db6df92f88cb4b7f30fd6dc0b2643449cadbb4', + 'swiftshader_revision': 'f99e45c6e720e36fde440c0400e735a06d663890', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. @@ -323,7 +323,7 @@ # # Note this revision should be updated with # third_party/boringssl/roll_boringssl.py, not roll-dep. - 'boringssl_revision': '10fef972e47d1621b76af959733802167b8d4075', + 'boringssl_revision': '19009c51bff0706362e824f66a0b189326a1c27d', # 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. @@ -483,7 +483,7 @@ # If you change this, also update the libc++ revision in # //buildtools/deps_revisions.gni. - 'libcxx_revision': '42e738f0a1928e8d70e27b96acb02cd23beefec8', + 'libcxx_revision': '84f06932d7b46210487e4b3878477aad53e78c12', # GN CIPD package version. 'gn_version': 'git_revision:00b741b1568d56cf4e117dcb9f70cd42653b4c78', @@ -776,7 +776,7 @@ Var('chromium_git') + '/external/github.com/toji/webvr.info.git' + '@' + 'c58ae99b9ff9e2aa4c524633519570bf33536248', 'src/docs/website': { - 'url': Var('chromium_git') + '/website.git' + '@' + '8ef190c15ff4982a54a22466f41c8fcaa30def58', + 'url': Var('chromium_git') + '/website.git' + '@' + '64391088f65df676478898bb324aa5d7e584c64e', }, 'src/ios/third_party/earl_grey2/src': { @@ -887,7 +887,7 @@ 'packages': [ { 'package': 'chromium/rts/model/windows-amd64', - 'version': 'YPq1S1cpQ2wTAeq8NnjmH3ziVOcKx1yq-hxE6ZGsYagC', + 'version': 'yVlosUZDx_bho3Uf7TpzROk3szAMeeQbxzk5A0_hawwC', }, ], 'dep_type': 'cipd', @@ -1170,7 +1170,7 @@ # Tools used when building Chrome for Chrome OS. This affects both the Simple # Chrome workflow, as well as the chromeos-chrome ebuild. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '5aa70a7a666f34ad1898d4975f69ce175fd93186', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'b344b87f91c6fe56dd90bc9857f7834310e14533', 'condition': 'checkout_chromeos', }, @@ -1204,7 +1204,7 @@ Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': 'https://chrome-internal.googlesource.com/devtools/devtools-internal.git' + '@' + 'cf770ff785c6c41120cb308f4d00667535661009', + 'url': 'https://chrome-internal.googlesource.com/devtools/devtools-internal.git' + '@' + 'e833d93b49f26ba9ca426833f5e220d7ecbeba1d', 'condition': 'checkout_src_internal', }, @@ -1417,7 +1417,7 @@ Var('chromium_git') + '/external/libaddressinput.git' + '@' + 'df35d6c42da4fa2759e4cfb592afe33817993b89', 'src/third_party/libaom/source/libaom': - Var('aomedia_git') + '/aom.git' + '@' + '2fcb0760ea632ef250465819f7d979a695b7c149', + Var('aomedia_git') + '/aom.git' + '@' + 'ff7b753a63a536423a91b64a066bd385c52ceacc', 'src/third_party/libavif/src': Var('chromium_git') + '/external/github.com/AOMediaCodec/libavif.git' + '@' + Var('libavif_revision'), @@ -1475,7 +1475,7 @@ }, 'src/third_party/libvpx/source/libvpx': - Var('chromium_git') + '/webm/libvpx.git' + '@' + '8786aee5821801fe6b5a285be009ba67ea7f4e63', + Var('chromium_git') + '/webm/libvpx.git' + '@' + '9d6d0624d7943a09cc0be9df1a7402522989ac1a', 'src/third_party/libwebm/source': Var('chromium_git') + '/webm/libwebm.git' + '@' + 'e4fbea0c9751ae8aa86629b197a28d8276a2b0da', @@ -1592,7 +1592,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '13c35692e86358d64b2aa0f89195480ddacd8b37', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'df569f9bea5e511f44440afe1370d8fa1e61c29e', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1723,7 +1723,7 @@ 'dep_type': 'cipd', }, - 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@40446ec62941acb18e1da662a6609ea51e10618f', + 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@0c132da7e00a1d839fdd25fee325b1f1768dff0e', 'src/third_party/vulkan_memory_allocator': Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git' + '@' + 'ebe84bec02c041d28f902da0214bf442743fc907', @@ -1756,13 +1756,13 @@ Var('chromium_git') + '/external/github.com/SeleniumHQ/selenium/py.git' + '@' + 'd0045ec570c1a77612db35d1e92f05e1d27b4d53', 'src/third_party/webgl/src': - Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '44e4c8770158c505b03ee7feafa4859d083b0912', + Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'd1b65aa5a88f6efd900604dfcda840154e9f16e2', 'src/third_party/webgpu-cts/src': - Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'e53aff4e9a6c3d418f94b2f22af58243f7d3c7a3', + Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '65fdb80dfbef270fb5626525292a6d54857621e5', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '6670e4e059cb694ef0a079e22c488682cf463bf4', + Var('webrtc_git') + '/src.git' + '@' + '7baa63ff9c35f2f0d9845316031bb33b859cd216', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1835,7 +1835,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@64a4195d9be87c3185b05f99a25633227be7b933', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@7939219a51dfc27dbd3a266a9c857735052535bf', 'condition': 'checkout_src_internal', },
diff --git a/WATCHLISTS b/WATCHLISTS index 172a91bc..7bc21fd 100644 --- a/WATCHLISTS +++ b/WATCHLISTS
@@ -761,7 +761,7 @@ 'ui/webui/resources/cr_components/chromeos/cellular_setup/', }, 'chromeos_geolocation': { - 'filepath': 'ash/components/geolocation/', + 'filepath': 'chromeos/ash/components/geolocation/', }, 'chromeos_lkgm': { 'filepath': 'chromeos/CHROMEOS_LKGM',
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn index 812096d..2d41d1f 100644 --- a/android_webview/BUILD.gn +++ b/android_webview/BUILD.gn
@@ -815,6 +815,7 @@ "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/blink/public/common:common_java", "//third_party/blink/renderer/platform/scheduler:blink_scheduler_java", + "//ui/accessibility:accessibility_features_java", ] srcjar_deps = [ ":common_java_features_srcjar",
diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java index 3353a5a3..5595a68b 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java +++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
@@ -22,6 +22,7 @@ import org.chromium.gpu.config.GpuSwitches; import org.chromium.net.NetFeatures; import org.chromium.services.network.NetworkServiceFeatures; +import org.chromium.ui.accessibility.AccessibilityFeatures; /** * List of experimental features/flags supported for user devices. Add features/flags to this list @@ -366,6 +367,8 @@ Flag.baseFeature(MetricsFeatures.CONSOLIDATE_METRICS_SERVICE_INITIAL_LOG_LOGIC, "Controls whether the logic to build the initial UMA log is the same as" + " other logs."), + Flag.baseFeature(AccessibilityFeatures.ABLATE_SEND_PENDING_ACCESSIBILITY_EVENTS, + "Enable to increase the cost of SendPendingAccessibilityEvents"), Flag.baseFeature(ContentFeatures.WEBVIEW_THROTTLE_BACKGROUND_BEGIN_FRAME, "Enable to throttle begin frames when webview is not being drawn"), // Add new commandline switches and features above. The final entry should have a
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index e1080b9..456b900 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -2275,7 +2275,6 @@ "//ash/assistant/ui:constants", "//ash/assistant/util", "//ash/components/fwupd", - "//ash/components/geolocation", "//ash/components/hid_detection", "//ash/components/multidevice/logging", "//ash/components/peripheral_notification", @@ -2330,6 +2329,7 @@ "//chromeos/ash/components/dbus/update_engine", "//chromeos/ash/components/dbus/usb", "//chromeos/ash/components/feature_usage", + "//chromeos/ash/components/geolocation", "//chromeos/ash/components/human_presence", "//chromeos/ash/components/network", "//chromeos/ash/services/assistant/public/cpp", @@ -3097,7 +3097,6 @@ "//ash/assistant/ui/test_support", "//ash/assistant/util", "//ash/components/arc:notification_test_support", - "//ash/components/geolocation", "//ash/components/login/auth", "//ash/components/login/auth:test_support", "//ash/components/phonehub:test_support", @@ -3146,6 +3145,7 @@ "//chromeos/ash/components/dbus/shill", "//chromeos/ash/components/dbus/userdataauth", "//chromeos/ash/components/feature_usage", + "//chromeos/ash/components/geolocation", "//chromeos/ash/components/human_presence:human_presence", "//chromeos/ash/components/network:test_support", "//chromeos/ash/services/assistant:test_support", @@ -3569,7 +3569,6 @@ "//ash/assistant/model:model", "//ash/assistant/ui:constants", "//ash/assistant/ui:ui", - "//ash/components/geolocation", "//ash/constants", "//ash/keyboard/ui", "//ash/keyboard/ui:test_support", @@ -3591,6 +3590,7 @@ "//chromeos/ash/components/dbus/rgbkbd", "//chromeos/ash/components/dbus/system_clock", "//chromeos/ash/components/disks:test_support", + "//chromeos/ash/components/geolocation", "//chromeos/ash/components/network:test_support", "//chromeos/ash/services/assistant:test_support", "//chromeos/ash/services/assistant/public/cpp",
diff --git a/ash/components/BUILD.gn b/ash/components/BUILD.gn index e35f885..ec51cbd7 100644 --- a/ash/components/BUILD.gn +++ b/ash/components/BUILD.gn
@@ -24,7 +24,6 @@ "//ash/components/arc/mojom:unit_tests", "//ash/components/arc/session:unit_tests", "//ash/components/fwupd:unit_tests", - "//ash/components/geolocation:unit_tests", "//ash/components/hid_detection:unit_tests", "//ash/components/login/auth:unit_tests", "//ash/components/login/hibernate:unit_tests",
diff --git a/ash/components/timezone/BUILD.gn b/ash/components/timezone/BUILD.gn index 26ff4ce..19000277f9 100644 --- a/ash/components/timezone/BUILD.gn +++ b/ash/components/timezone/BUILD.gn
@@ -10,8 +10,8 @@ component("timezone") { defines = [ "IS_ASH_TIMEZONE_IMPL" ] deps = [ - "//ash/components/geolocation", "//base", + "//chromeos/ash/components/geolocation", "//components/prefs", "//google_apis", "//net", @@ -31,9 +31,9 @@ testonly = true deps = [ ":timezone", - "//ash/components/geolocation", "//base", "//base/test:test_support", + "//chromeos/ash/components/geolocation", "//net", "//services/network:test_support", "//services/network/public/cpp",
diff --git a/ash/components/timezone/DEPS b/ash/components/timezone/DEPS index be37244..13f1f9ea 100644 --- a/ash/components/timezone/DEPS +++ b/ash/components/timezone/DEPS
@@ -1,8 +1,8 @@ noparent = True include_rules = [ - "+ash/components/geolocation", "+base", + "+chromeos/ash/components/geolocation", "+components/prefs", "+google_apis", "+services/network/public/cpp",
diff --git a/ash/components/timezone/timezone_provider.cc b/ash/components/timezone/timezone_provider.cc index 4e854c59..e95c0d6 100644 --- a/ash/components/timezone/timezone_provider.cc +++ b/ash/components/timezone/timezone_provider.cc
@@ -8,10 +8,10 @@ #include <iterator> #include <utility> -#include "ash/components/geolocation/geoposition.h" #include "base/bind.h" #include "base/check.h" #include "base/memory/ptr_util.h" +#include "chromeos/ash/components/geolocation/geoposition.h" #include "services/network/public/cpp/shared_url_loader_factory.h" namespace ash {
diff --git a/ash/components/timezone/timezone_request.h b/ash/components/timezone/timezone_request.h index 72d79e61..667a50c 100644 --- a/ash/components/timezone/timezone_request.h +++ b/ash/components/timezone/timezone_request.h
@@ -7,7 +7,6 @@ #include <memory> -#include "ash/components/geolocation/geoposition.h" #include "base/callback.h" #include "base/compiler_specific.h" #include "base/component_export.h" @@ -15,6 +14,7 @@ #include "base/threading/thread_checker.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "chromeos/ash/components/geolocation/geoposition.h" #include "url/gurl.h" namespace network {
diff --git a/ash/components/timezone/timezone_resolver.cc b/ash/components/timezone/timezone_resolver.cc index 3a0d677e..641b38db 100644 --- a/ash/components/timezone/timezone_resolver.cc +++ b/ash/components/timezone/timezone_resolver.cc
@@ -10,8 +10,6 @@ #include <algorithm> #include <memory> -#include "ash/components/geolocation/geoposition.h" -#include "ash/components/geolocation/simple_geolocation_provider.h" #include "ash/components/timezone/timezone_provider.h" #include "base/bind.h" #include "base/callback_helpers.h" @@ -22,6 +20,8 @@ #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "chromeos/ash/components/geolocation/geoposition.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
diff --git a/ash/components/timezone/timezone_unittest.cc b/ash/components/timezone/timezone_unittest.cc index a4df4d51..fedbf86 100644 --- a/ash/components/timezone/timezone_unittest.cc +++ b/ash/components/timezone/timezone_unittest.cc
@@ -7,12 +7,12 @@ #include <memory> #include <utility> -#include "ash/components/geolocation/geoposition.h" #include "ash/components/timezone/timezone_provider.h" #include "ash/components/timezone/timezone_resolver.h" #include "base/bind.h" #include "base/run_loop.h" #include "base/test/task_environment.h" +#include "chromeos/ash/components/geolocation/geoposition.h" #include "net/http/http_response_headers.h" #include "net/http/http_status_code.h" #include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index 7228403..92c4b06 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -369,6 +369,10 @@ const base::Feature kCrosPrivacyHub{"CrosPrivacyHub", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enables Privacy Hub features selected for dogfooding. +const base::Feature kCrosPrivacyHubDogfood{"CrosPrivacyHubDogfood", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Enables future features for Privacy Hub for ChromeOS. const base::Feature kCrosPrivacyHubFuture{"CrosPrivacyHubFuture", base::FEATURE_DISABLED_BY_DEFAULT}; @@ -1927,6 +1931,11 @@ IsCrosPrivacyHubFutureEnabled(); } +bool IsCrosPrivacyHubDogfoodEnabled() { + return base::FeatureList::IsEnabled(kCrosPrivacyHubDogfood) || + IsCrosPrivacyHubEnabled(); +} + bool IsCrosPrivacyHubFutureEnabled() { return base::FeatureList::IsEnabled(kCrosPrivacyHubFuture); }
diff --git a/ash/constants/ash_features.h b/ash/constants/ash_features.h index d89bca2..911f0306 100644 --- a/ash/constants/ash_features.h +++ b/ash/constants/ash_features.h
@@ -168,6 +168,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kCrosPrivacyHub; COMPONENT_EXPORT(ASH_CONSTANTS) +extern const base::Feature kCrosPrivacyHubDogfood; +COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kCrosPrivacyHubFuture; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kCrostiniBullseyeUpgrade; @@ -741,6 +743,7 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsClipboardHistoryReorderEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsConsumerAutoUpdateToggleAllowed(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosPrivacyHubEnabled(); +COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosPrivacyHubDogfoodEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosPrivacyHubFutureEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCrosNextWMPEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsDesksCloseAllEnabled();
diff --git a/ash/glanceables/glanceables_restore_view.cc b/ash/glanceables/glanceables_restore_view.cc index b9df86c..dc1beb6 100644 --- a/ash/glanceables/glanceables_restore_view.cc +++ b/ash/glanceables/glanceables_restore_view.cc
@@ -7,37 +7,55 @@ #include <memory> #include "ash/glanceables/glanceables_controller.h" +#include "ash/glanceables/glanceables_util.h" +#include "ash/public/cpp/image_util.h" #include "ash/shell.h" #include "ash/strings/grit/ash_strings.h" #include "base/bind.h" +#include "services/data_decoder/public/mojom/image_decoder.mojom-shared.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/gfx/color_palette.h" +#include "ui/gfx/geometry/size.h" +#include "ui/gfx/image/image_skia.h" +#include "ui/gfx/image/image_skia_operations.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/button/image_button.h" namespace ash { namespace { +constexpr gfx::Size kScreenshotTargetSize(300, 200); + void OnButtonPressed() { Shell::Get()->glanceables_controller()->RestoreSession(); } -gfx::ImageSkia CreatePlaceholderImage(int width, int height) { - SkBitmap bitmap; - bitmap.allocN32Pixels(width, height); - bitmap.eraseColor(gfx::kGoogleBlue500); - return gfx::ImageSkia::CreateFrom1xBitmap(bitmap); -} } // namespace GlanceablesRestoreView::GlanceablesRestoreView() : views::ImageButton(base::BindRepeating(&OnButtonPressed)) { SetAccessibleName(l10n_util::GetStringUTF16(IDS_GLANCEABLES_RESTORE_SESSION)); - // TODO(crbug.com/1353119): Show a screenshot from the last session. - SetImage(views::Button::STATE_NORMAL, CreatePlaceholderImage(300, 200)); + image_util::DecodeImageFile( + base::BindOnce(&GlanceablesRestoreView::OnSignoutScreenshotDecoded, + weak_ptr_factory_.GetWeakPtr()), + glanceables_util::GetSignoutScreenshotPath(), + data_decoder::mojom::ImageCodec::kPng); } GlanceablesRestoreView::~GlanceablesRestoreView() = default; +void GlanceablesRestoreView::OnSignoutScreenshotDecoded( + const gfx::ImageSkia& image) { + if (image.isNull()) { + // There is no image from previous shutdown or sign-out. + // TODO(crbug.com/1357767): do nothing now, revisit this. + return; + } + + SetImage(views::Button::STATE_NORMAL, + gfx::ImageSkiaOperations::CreateResizedImage( + image, skia::ImageOperations::ResizeMethod::RESIZE_BETTER, + kScreenshotTargetSize)); +} + } // namespace ash
diff --git a/ash/glanceables/glanceables_restore_view.h b/ash/glanceables/glanceables_restore_view.h index 68fdcc5..1f13944 100644 --- a/ash/glanceables/glanceables_restore_view.h +++ b/ash/glanceables/glanceables_restore_view.h
@@ -6,8 +6,13 @@ #define ASH_GLANCEABLES_GLANCEABLES_RESTORE_VIEW_H_ #include "ash/ash_export.h" +#include "base/memory/weak_ptr.h" #include "ui/views/controls/button/image_button.h" +namespace gfx { +class ImageSkia; +} // namespace gfx + namespace ash { // Glanceables screen button that triggers session restores. Shows a screenshot @@ -18,6 +23,11 @@ GlanceablesRestoreView(const GlanceablesRestoreView&) = delete; GlanceablesRestoreView& operator=(const GlanceablesRestoreView&) = delete; ~GlanceablesRestoreView() override; + + private: + void OnSignoutScreenshotDecoded(const gfx::ImageSkia& image); + + base::WeakPtrFactory<GlanceablesRestoreView> weak_ptr_factory_{this}; }; } // namespace ash
diff --git a/ash/glanceables/glanceables_unittests.cc b/ash/glanceables/glanceables_unittests.cc index 95d2c6dd..17f8a75 100644 --- a/ash/glanceables/glanceables_unittests.cc +++ b/ash/glanceables/glanceables_unittests.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 <memory> + #include "ash/ambient/ambient_controller.h" #include "ash/ambient/model/ambient_weather_model.h" #include "ash/app_list/test/app_list_test_helper.h" @@ -26,14 +28,22 @@ #include "ash/wm/desks/desks_test_util.h" #include "ash/wm/overview/overview_controller.h" #include "ash/wm/window_state.h" +#include "base/base_paths.h" #include "base/check.h" +#include "base/files/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/test/scoped_feature_list.h" +#include "base/test/scoped_path_override.h" #include "base/time/time.h" #include "base/time/time_override.h" #include "google_apis/calendar/calendar_api_response_types.h" #include "google_apis/common/api_error_codes.h" +#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/compositor/layer.h" #include "ui/events/test/test_event.h" +#include "ui/gfx/codec/png_codec.h" +#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_unittest_util.h" #include "ui/views/controls/image_view.h" #include "ui/views/controls/label.h" @@ -237,6 +247,38 @@ EXPECT_EQ(std::get<1>(items[1])->GetText(), u"21:30 – 22:30"); } +TEST_F(GlanceablesTest, RestoreViewRendersScreenshot) { + data_decoder::test::InProcessDataDecoder data_decoder; + const SkColor expected_color = SK_ColorYELLOW; + + // Override home directory. + base::ScopedTempDir temp_dir; + ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); + base::ScopedPathOverride home_dir_override(base::DIR_HOME, + temp_dir.GetPath()); + + // Simulate that shutdown screenshot is there. + SkBitmap bitmap; + bitmap.allocN32Pixels(400, 300); + bitmap.eraseColor(expected_color); + std::vector<unsigned char> png_data; + gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, true, &png_data); + ASSERT_TRUE(base::WriteFile( + temp_dir.GetPath().AppendASCII("signout_screenshot.png"), png_data)); + + controller_->CreateUi(); + GlanceablesRestoreView* restore_view = GetRestoreView(); + ASSERT_TRUE(restore_view); + + // Wait for `image_util::DecodeImageFile` callback to run. + base::RunLoop().RunUntilIdle(); + gfx::ImageSkia image = restore_view->GetImage(views::Button::STATE_NORMAL); + EXPECT_FALSE(image.isNull()); + EXPECT_GT(image.width(), 0); + EXPECT_GT(image.height(), 0); + EXPECT_EQ(image.bitmap()->getColor(150, 100), expected_color); +} + TEST_F(GlanceablesTest, ClickOnSessionRestore) { controller_->CreateUi();
diff --git a/ash/glanceables/signout_screenshot_handler.cc b/ash/glanceables/signout_screenshot_handler.cc index 9cd40902..00b7d92 100644 --- a/ash/glanceables/signout_screenshot_handler.cc +++ b/ash/glanceables/signout_screenshot_handler.cc
@@ -17,6 +17,8 @@ #include "base/memory/scoped_refptr.h" #include "base/task/task_traits.h" #include "base/task/thread_pool.h" +#include "ui/gfx/image/image.h" +#include "ui/gfx/image/image_skia_operations.h" #include "ui/snapshot/snapshot.h" namespace ash { @@ -36,6 +38,12 @@ base::DeleteFile(file_path); } +scoped_refptr<base::RefCountedMemory> EncodeImageAsPngOnThreadPool( + const gfx::Image& image) { + DCHECK(!image.IsEmpty()); + return image.As1xPNGBytes(); +} + } // namespace SignoutScreenshotHandler::SignoutScreenshotHandler() = default; @@ -60,28 +68,42 @@ DeleteScreenshot(); return; } - // TODO(crbug.com/1353119): Resize the image to be smaller before encoding to - // PNG, since the glanceables preview on login is not full-size. - ui::GrabWindowSnapshotAsyncPNG( + gfx::Size source_size = active_desk->bounds().size(); + // Capture the screenshot at a smaller size than the desk. This speeds up PNG + // encoding and writing to disk. + screenshot_size_ = + gfx::Size(source_size.width() / 2, source_size.height() / 2); + // Snapshot scaling uses skia::ImageOperations::RESIZE_GOOD which should be + // fast. See SnapshotAsync::ScaleCopyOutputResult(). + ui::GrabWindowSnapshotAndScaleAsync( active_desk, - /*source_rect=*/gfx::Rect(gfx::Point(), active_desk->bounds().size()), + /*source_rect=*/gfx::Rect(gfx::Point(), source_size), screenshot_size_, base::BindOnce(&SignoutScreenshotHandler::OnScreenshotTaken, weak_factory_.GetWeakPtr())); } -void SignoutScreenshotHandler::OnScreenshotTaken( - scoped_refptr<base::RefCountedMemory> png_data) { - if (!png_data) { +void SignoutScreenshotHandler::OnScreenshotTaken(gfx::Image image) { + if (image.IsEmpty()) { // If the screenshot failed, delete any existing screenshot so we don't show // a stale image on startup. DeleteScreenshot(); return; } - SaveScreenshot(png_data); + base::ThreadPool::PostTaskAndReplyWithResult( + FROM_HERE, {base::TaskPriority::USER_BLOCKING}, + base::BindOnce(&EncodeImageAsPngOnThreadPool, std::move(image)), + base::BindOnce(&SignoutScreenshotHandler::SaveScreenshot, + weak_factory_.GetWeakPtr())); } void SignoutScreenshotHandler::SaveScreenshot( scoped_refptr<base::RefCountedMemory> png_data) { + if (!png_data) { + // If PNG encoding failed failed, delete any existing screenshot so we don't + // show a stale image on startup. + DeleteScreenshot(); + return; + } base::FilePath file_path = GetScreenshotPath(); // Use priority USER_BLOCKING since the user is waiting for logout/shutdown. base::ThreadPool::PostTaskAndReply(
diff --git a/ash/glanceables/signout_screenshot_handler.h b/ash/glanceables/signout_screenshot_handler.h index 3015f054..da484eb 100644 --- a/ash/glanceables/signout_screenshot_handler.h +++ b/ash/glanceables/signout_screenshot_handler.h
@@ -10,6 +10,11 @@ #include "base/files/file_path.h" #include "base/memory/ref_counted_memory.h" #include "base/memory/weak_ptr.h" +#include "ui/gfx/geometry/size.h" + +namespace gfx { +class Image; +} // namespace gfx namespace ash { @@ -32,8 +37,12 @@ screenshot_path_for_test_ = path; } + gfx::Size screenshot_size_for_test() { return screenshot_size_; } + private: - void OnScreenshotTaken(scoped_refptr<base::RefCountedMemory> png_data); + // Callback invoked when the screenshot is taken. gfx::Image is cheap to pass + // by value. + void OnScreenshotTaken(gfx::Image image); // Saves the screenshot to disk. void SaveScreenshot(scoped_refptr<base::RefCountedMemory> png_data); @@ -50,6 +59,9 @@ // Invoked when the screenshot is done. base::OnceClosure done_callback_; + // Size of the output screenshot. + gfx::Size screenshot_size_; + base::FilePath screenshot_path_for_test_; base::WeakPtrFactory<SignoutScreenshotHandler> weak_factory_{this};
diff --git a/ash/glanceables/signout_screenshot_handler_unittest.cc b/ash/glanceables/signout_screenshot_handler_unittest.cc index 580e7528..80ed7eb5 100644 --- a/ash/glanceables/signout_screenshot_handler_unittest.cc +++ b/ash/glanceables/signout_screenshot_handler_unittest.cc
@@ -8,7 +8,9 @@ #include <memory> +#include "ash/shell.h" #include "ash/test/ash_test_base.h" +#include "ash/wm/desks/desks_util.h" #include "base/check.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -42,6 +44,13 @@ handler.TakeScreenshot(run_loop.QuitClosure()); run_loop.Run(); + // Screenshot is half the size of the desk container in each dimension. + gfx::Size screenshot_size = handler.screenshot_size_for_test(); + aura::Window* active_desk = + desks_util::GetActiveDeskContainerForRoot(Shell::GetPrimaryRootWindow()); + EXPECT_EQ(screenshot_size.width(), active_desk->bounds().width() / 2); + EXPECT_EQ(screenshot_size.height(), active_desk->bounds().height() / 2); + // Screenshot was taken and is not empty. EXPECT_TRUE(base::PathExists(screenshot_path_)); int64_t file_size = 0;
diff --git a/ash/public/cpp/image_util.cc b/ash/public/cpp/image_util.cc index ee79ea5c..d22bb85 100644 --- a/ash/public/cpp/image_util.cc +++ b/ash/public/cpp/image_util.cc
@@ -70,23 +70,25 @@ } void DecodeImageFile(DecodeImageCallback callback, - const base::FilePath& file_path) { + const base::FilePath& file_path, + data_decoder::mojom::ImageCodec codec) { base::ThreadPool::PostTaskAndReplyWithResult( FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE, base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, base::BindOnce(&ReadFileToString, file_path), - base::BindOnce(&DecodeImageData, std::move(callback))); + base::BindOnce(&DecodeImageData, std::move(callback), codec)); } -void DecodeImageData(DecodeImageCallback callback, const std::string& data) { +void DecodeImageData(DecodeImageCallback callback, + data_decoder::mojom::ImageCodec codec, + const std::string& data) { if (data.empty()) { std::move(callback).Run(gfx::ImageSkia()); return; } data_decoder::DecodeImageIsolated( - base::as_bytes(base::make_span(data)), - data_decoder::mojom::ImageCodec::kDefault, + base::as_bytes(base::make_span(data)), codec, /*shrink_to_fit=*/true, kMaxImageSizeInBytes, /*desired_image_frame_size=*/gfx::Size(), base::BindOnce(&ToImageSkia, std::move(callback)));
diff --git a/ash/public/cpp/image_util.h b/ash/public/cpp/image_util.h index 55bcf29..0c8d4b8 100644 --- a/ash/public/cpp/image_util.h +++ b/ash/public/cpp/image_util.h
@@ -9,6 +9,7 @@ #include "ash/public/cpp/ash_public_export.h" #include "base/callback_forward.h" +#include "services/data_decoder/public/mojom/image_decoder.mojom-shared.h" namespace base { class FilePath; @@ -32,17 +33,21 @@ // the image. // If the image is too large, it will be repeatedly halved until it fits in // |IPC::Channel::kMaximumMessageSize| bytes. -ASH_PUBLIC_EXPORT void DecodeImageFile(DecodeImageCallback callback, - const base::FilePath& file_path); +ASH_PUBLIC_EXPORT void DecodeImageFile( + DecodeImageCallback callback, + const base::FilePath& file_path, + data_decoder::mojom::ImageCodec codec = + data_decoder::mojom::ImageCodec::kDefault); // Reads contents of |data| and calls |callback| with a decoded image. // Calls |callback| with an empty image on failure to decode the image. // If the image is too large, it will be repeatedly halved until it fits in // |IPC::Channel::kMaximumMessageSize| bytes. ASH_PUBLIC_EXPORT void DecodeImageData(DecodeImageCallback callback, + data_decoder::mojom::ImageCodec codec, const std::string& data); } // namespace image_util } // namespace ash -#endif // ASH_PUBLIC_CPP_IMAGE_UTIL_H_ \ No newline at end of file +#endif // ASH_PUBLIC_CPP_IMAGE_UTIL_H_
diff --git a/ash/services/nearby/public/mojom/BUILD.gn b/ash/services/nearby/public/mojom/BUILD.gn index d731e88..5b106db3 100644 --- a/ash/services/nearby/public/mojom/BUILD.gn +++ b/ash/services/nearby/public/mojom/BUILD.gn
@@ -18,6 +18,8 @@ "nearby_connections_types.mojom", "nearby_decoder.mojom", "nearby_decoder_types.mojom", + "quick_start_decoder.mojom", + "quick_start_decoder_types.mojom", "sharing.mojom", "tcp_server_socket_port.mojom", "tcp_socket_factory.mojom",
diff --git a/ash/services/nearby/public/mojom/quick_start_decoder.mojom b/ash/services/nearby/public/mojom/quick_start_decoder.mojom new file mode 100644 index 0000000..07de5ac --- /dev/null +++ b/ash/services/nearby/public/mojom/quick_start_decoder.mojom
@@ -0,0 +1,21 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.quick_start.mojom; + +import "sandbox/policy/mojom/sandbox.mojom"; + +import "ash/services/nearby/public/mojom/quick_start_decoder_types.mojom"; + +// Decode raw input data from Android device during Quick Start +// into readable structs to allow for Wifi Credential sharing +// and FIDO assertion. +[ServiceSandbox=sandbox.mojom.Sandbox.kService] +interface QuickStartDecoder { + // Decode a FIDO CTAP2 GetAssertionResponse from the phone into a struct + // that details fields we need to pass along to GAIA as well as error + // codes from the CBOR decoding step and from the phone. + DecodeGetAssertionResponse(array<uint8> data) => ( + GetAssertionResponse response); +}; \ No newline at end of file
diff --git a/ash/services/nearby/public/mojom/quick_start_decoder_types.mojom b/ash/services/nearby/public/mojom/quick_start_decoder_types.mojom new file mode 100644 index 0000000..0ef4a8b --- /dev/null +++ b/ash/services/nearby/public/mojom/quick_start_decoder_types.mojom
@@ -0,0 +1,28 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.quick_start.mojom; + +struct GetAssertionResponse { + enum GetAssertionStatus { + kSuccess = 0, + kCtapResponseError = 1, + kCborDecoderError = 2, + kUnknownError = 3, + }; + + GetAssertionStatus status; + + uint8 ctap_device_response_code; + int64 cbor_decoder_error; + string email; + string credential_id; + + // The following fields are passed directly to GAIA with + // no further processing in Chromium. The raw byte values + // will be opaque and will not be parsed within the + // browser process. + array<uint8> auth_data; + array<uint8> signature; +}; \ No newline at end of file
diff --git a/ash/system/geolocation/DEPS b/ash/system/geolocation/DEPS new file mode 100644 index 0000000..e01bb97 --- /dev/null +++ b/ash/system/geolocation/DEPS
@@ -0,0 +1,3 @@ +include_rules = [ + "+chromeos/ash/components/geolocation", +]
diff --git a/ash/system/geolocation/geolocation_controller.cc b/ash/system/geolocation/geolocation_controller.cc index 4319019f..b393274 100644 --- a/ash/system/geolocation/geolocation_controller.cc +++ b/ash/system/geolocation/geolocation_controller.cc
@@ -6,12 +6,12 @@ #include <algorithm> -#include "ash/components/geolocation/geoposition.h" #include "ash/shell.h" #include "ash/system/time/time_of_day.h" #include "base/bind.h" #include "base/logging.h" #include "base/time/clock.h" +#include "chromeos/ash/components/geolocation/geoposition.h" #include "third_party/icu/source/i18n/astro.h" namespace ash {
diff --git a/ash/system/geolocation/geolocation_controller.h b/ash/system/geolocation/geolocation_controller.h index c105aa66..e70e821ff 100644 --- a/ash/system/geolocation/geolocation_controller.h +++ b/ash/system/geolocation/geolocation_controller.h
@@ -9,12 +9,12 @@ #include <string> #include "ash/ash_export.h" -#include "ash/components/geolocation/simple_geolocation_provider.h" #include "ash/components/settings/timezone_settings.h" #include "base/observer_list.h" #include "base/observer_list_types.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" #include "chromeos/dbus/power/power_manager_client.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
diff --git a/ash/system/geolocation/test_geolocation_url_loader_factory.h b/ash/system/geolocation/test_geolocation_url_loader_factory.h index 61416d1..d7ca317 100644 --- a/ash/system/geolocation/test_geolocation_url_loader_factory.h +++ b/ash/system/geolocation/test_geolocation_url_loader_factory.h
@@ -5,7 +5,7 @@ #ifndef ASH_SYSTEM_GEOLOCATION_TEST_GEOLOCATION_URL_LOADER_FACTORY_H_ #define ASH_SYSTEM_GEOLOCATION_TEST_GEOLOCATION_URL_LOADER_FACTORY_H_ -#include "ash/components/geolocation/geoposition.h" +#include "chromeos/ash/components/geolocation/geoposition.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/test/test_url_loader_factory.h"
diff --git a/ash/wallpaper/wallpaper_controller_impl.cc b/ash/wallpaper/wallpaper_controller_impl.cc index 300c345..902e054 100644 --- a/ash/wallpaper/wallpaper_controller_impl.cc +++ b/ash/wallpaper/wallpaper_controller_impl.cc
@@ -77,6 +77,7 @@ #include "net/http/http_request_headers.h" #include "net/traffic_annotation/network_traffic_annotation.h" #include "services/data_decoder/public/cpp/decode_image.h" +#include "services/data_decoder/public/mojom/image_decoder.mojom-shared.h" #include "third_party/icu/source/i18n/unicode/gregocal.h" #include "ui/compositor/compositor.h" #include "ui/compositor/layer.h" @@ -1160,7 +1161,9 @@ .Run(CreateSolidColorWallpaper(kDefaultWallpaperColor)); return; } - image_util::DecodeImageData(std::move(decoded_callback), image_data); + image_util::DecodeImageData(std::move(decoded_callback), + data_decoder::mojom::ImageCodec::kDefault, + image_data); } void WallpaperControllerImpl::SetGooglePhotosWallpaper( @@ -1334,7 +1337,8 @@ std::move(callback).Run(CreateSolidColorWallpaper(kDefaultWallpaperColor)); return; } - image_util::DecodeImageData(std::move(callback), data); + image_util::DecodeImageData(std::move(callback), + data_decoder::mojom::ImageCodec::kDefault, data); } void WallpaperControllerImpl::SetDevicePolicyWallpaperPath(
diff --git a/base/BUILD.gn b/base/BUILD.gn index 45917678..f10d6703 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -1267,8 +1267,6 @@ "mac/mach_logging.h", "mac/mach_port_rendezvous.cc", "mac/mach_port_rendezvous.h", - "mac/objc_release_properties.h", - "mac/objc_release_properties.mm", "mac/os_crash_dumps.cc", "mac/os_crash_dumps.h", "mac/scoped_aedesc.h", @@ -2254,8 +2252,6 @@ "mac/mac_logging.mm", "mac/mach_logging.cc", "mac/mach_logging.h", - "mac/objc_release_properties.h", - "mac/objc_release_properties.mm", "mac/scoped_block.h", "mac/scoped_mach_port.cc", "mac/scoped_mach_port.h", @@ -3588,7 +3584,6 @@ "mac/foundation_util_unittest.mm", "mac/mac_util_unittest.mm", "mac/mach_port_rendezvous_unittest.cc", - "mac/objc_release_properties_unittest.mm", "mac/scoped_mach_vm_unittest.cc", "mac/scoped_nsobject_unittest.mm", "mac/scoped_objc_class_swizzler_unittest.mm", @@ -3733,7 +3728,6 @@ "mac/backup_util_unittest.mm", "mac/bind_objc_block_unittest.mm", "mac/foundation_util_unittest.mm", - "mac/objc_release_properties_unittest.mm", "mac/scoped_nsobject_unittest.mm", "strings/sys_string_conversions_mac_unittest.mm", ] @@ -4261,6 +4255,7 @@ "android/java/src/org/chromium/base/memory/MemoryPressureCallback.java", "android/java/src/org/chromium/base/memory/MemoryPressureMonitor.java", "android/java/src/org/chromium/base/memory/MemoryPressureUma.java", + "android/java/src/org/chromium/base/memory/MemoryPurgeManager.java", "android/java/src/org/chromium/base/metrics/CachingUmaRecorder.java", "android/java/src/org/chromium/base/metrics/NativeUmaRecorder.java", "android/java/src/org/chromium/base/metrics/NoopUmaRecorder.java", @@ -4551,6 +4546,7 @@ "android/junit/src/org/chromium/base/jank_tracker/JankReportingSchedulerTest.java", "android/junit/src/org/chromium/base/library_loader/LinkerTest.java", "android/junit/src/org/chromium/base/memory/MemoryPressureMonitorTest.java", + "android/junit/src/org/chromium/base/memory/MemoryPurgeManagerTest.java", "android/junit/src/org/chromium/base/metrics/CachingUmaRecorderTest.java", "android/junit/src/org/chromium/base/process_launcher/ChildConnectionAllocatorTest.java", "android/junit/src/org/chromium/base/process_launcher/ChildProcessConnectionTest.java",
diff --git a/base/android/base_feature_list.cc b/base/android/base_feature_list.cc index 0eba9a02..5211acd 100644 --- a/base/android/base_feature_list.cc +++ b/base/android/base_feature_list.cc
@@ -19,6 +19,7 @@ // this array may either refer to features defined in the header of this file or // in other locations in the code base (e.g. content_features.h). const base::Feature* const kFeaturesExposedToJava[] = { + &features::kBrowserProcessMemoryPurge, &features::kCrashBrowserOnChildMismatchIfBrowserChanged, &features::kCrashBrowserOnAnyChildMismatch, }; // namespace
diff --git a/base/android/base_features.cc b/base/android/base_features.cc index 0eef6f3..5331af4 100644 --- a/base/android/base_features.cc +++ b/base/android/base_features.cc
@@ -9,6 +9,12 @@ // Alphabetical: +// When the browser process has been in the background for several minutes at a +// time, trigger an artificial critical memory pressure notification. This is +// intended to reduce memory footprint. +const base::Feature kBrowserProcessMemoryPurge{"BrowserProcessMemoryPurge", + FEATURE_DISABLED_BY_DEFAULT}; + // Crash the browser process if a child process is created which does not match // the browser process and the browser package appears to have changed since the // browser process was launched, so that the browser process will be started
diff --git a/base/android/base_features.h b/base/android/base_features.h index cf6ad362..d5ca5853 100644 --- a/base/android/base_features.h +++ b/base/android/base_features.h
@@ -13,6 +13,7 @@ // alongside the definition of their values in the .cc file. // Alphabetical: +extern const base::Feature kBrowserProcessMemoryPurge; extern const base::Feature kCrashBrowserOnChildMismatchIfBrowserChanged; extern const base::Feature kCrashBrowserOnAnyChildMismatch;
diff --git a/base/android/java/src/org/chromium/base/BaseFeatureList.java b/base/android/java/src/org/chromium/base/BaseFeatureList.java index 829cbb7..c69eed34 100644 --- a/base/android/java/src/org/chromium/base/BaseFeatureList.java +++ b/base/android/java/src/org/chromium/base/BaseFeatureList.java
@@ -27,6 +27,10 @@ * @return Whether the feature is enabled or not. */ public static boolean isEnabled(String featureName) { + // FeatureFlags set for testing override the native default value. + Boolean testValue = FeatureList.getTestValueForFeature(featureName); + if (testValue != null) return testValue; + return BaseFeatureListJni.get().isEnabled(featureName); }
diff --git a/base/android/java/src/org/chromium/base/MemoryPressureListener.java b/base/android/java/src/org/chromium/base/MemoryPressureListener.java index 44f3312..9e88c6d6 100644 --- a/base/android/java/src/org/chromium/base/MemoryPressureListener.java +++ b/base/android/java/src/org/chromium/base/MemoryPressureListener.java
@@ -88,6 +88,10 @@ /** * Distributes |pressure| to all callbacks. * This method should be called only on ThreadUtils.UiThread. + * + * This includes sending the notification to the native side, provided that addNativeCallback() + * has been called. It does not trigger all the clients listening directly to + * ComponentCallbacks2 notifications. */ public static void notifyMemoryPressure(@MemoryPressureLevel int pressure) { ThreadUtils.assertOnUiThread();
diff --git a/base/android/java/src/org/chromium/base/memory/MemoryPurgeManager.java b/base/android/java/src/org/chromium/base/memory/MemoryPurgeManager.java new file mode 100644 index 0000000..ca56151 --- /dev/null +++ b/base/android/java/src/org/chromium/base/memory/MemoryPurgeManager.java
@@ -0,0 +1,119 @@ +// Copyright 2022 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. + +package org.chromium.base.memory; + +import androidx.annotation.VisibleForTesting; + +import org.chromium.base.ApplicationState; +import org.chromium.base.ApplicationStatus; +import org.chromium.base.BaseFeatureList; +import org.chromium.base.BaseFeatures; +import org.chromium.base.MemoryPressureLevel; +import org.chromium.base.MemoryPressureListener; +import org.chromium.base.ThreadUtils; +import org.chromium.base.TimeUtils; + +/** + * This class is similar in principle to MemoryPurgeManager in blink, but on the browser process + * side. It triggers a critical memory pressure notification once the application has been in the + * background for more than a few minutes. + * + * UI thread only. + */ +public class MemoryPurgeManager implements ApplicationStatus.ApplicationStateListener { + private boolean mStarted; + private long mLastBackgroundPeriodStart = NEVER; + private boolean mDelayedPurgeTaskPending; + + // Arbitrary delay, a few minutes is what is used for background renderer purge, and 5 minutes + // for freezing. + // TODO(crbug.com/1356242): Should ideally be tuned according to the distribution of background + // time residency. + @VisibleForTesting + static final long PURGE_DELAY_MS = 4 * 60 * 1000; + private static final long NEVER = -1; + + private static final MemoryPurgeManager sInstance = new MemoryPurgeManager(); + + @VisibleForTesting + MemoryPurgeManager() {} + + public static MemoryPurgeManager getInstance() { + return sInstance; + } + + /** + * Start the background memory purge, if enabled. May be called several times. + * + * This attempts to trigger a critical memory pressure notification after 4 continuous minutes + * in background. + */ + public void start() { + ThreadUtils.assertOnUiThread(); + if (mStarted) return; + mStarted = true; + if (!BaseFeatureList.isEnabled(BaseFeatures.BROWSER_PROCESS_MEMORY_PURGE)) return; + + ApplicationStatus.registerApplicationStateListener(this); + + // We may already be in background, capture the initial state. + onApplicationStateChange(getApplicationState()); + } + + @Override + public void onApplicationStateChange(int state) { + switch (state) { + case ApplicationState.UNKNOWN: + case ApplicationState.HAS_RUNNING_ACTIVITIES: + case ApplicationState.HAS_PAUSED_ACTIVITIES: + mLastBackgroundPeriodStart = NEVER; + break; + case ApplicationState.HAS_STOPPED_ACTIVITIES: + if (mLastBackgroundPeriodStart == NEVER) { + mLastBackgroundPeriodStart = TimeUtils.elapsedRealtimeMillis(); + maybePostDelayedPurgingTask(PURGE_DELAY_MS); + } + break; + case ApplicationState.HAS_DESTROYED_ACTIVITIES: + // Ignored on purpose: the initial state of a process which never had any activity + // is HAS_DESTROYED_ACTIVITIES, and we don't want to trigger in this case. + break; + } + } + + private void delayedPurge() { + // Came back to foreground in the meantime, do not repost a task, this will happen next time + // we go to background. + if (mLastBackgroundPeriodStart == NEVER) return; + + assert mLastBackgroundPeriodStart < TimeUtils.elapsedRealtimeMillis(); + long inBackgroundFor = TimeUtils.elapsedRealtimeMillis() - mLastBackgroundPeriodStart; + if (inBackgroundFor < PURGE_DELAY_MS) { + maybePostDelayedPurgingTask(PURGE_DELAY_MS - inBackgroundFor); + return; + } + + notifyMemoryPressure(); + } + + protected void notifyMemoryPressure() { + MemoryPressureListener.notifyMemoryPressure(MemoryPressureLevel.CRITICAL); + } + + protected int getApplicationState() { + return ApplicationStatus.getStateForApplication(); + } + + private void maybePostDelayedPurgingTask(long delayMillis) { + ThreadUtils.assertOnUiThread(); + if (mDelayedPurgeTaskPending) return; + + ThreadUtils.postOnUiThreadDelayed(() -> { + mDelayedPurgeTaskPending = false; + delayedPurge(); + }, delayMillis); + mDelayedPurgeTaskPending = true; + } +}
diff --git a/base/android/junit/src/org/chromium/base/memory/MemoryPurgeManagerTest.java b/base/android/junit/src/org/chromium/base/memory/MemoryPurgeManagerTest.java new file mode 100644 index 0000000..a51248d8 --- /dev/null +++ b/base/android/junit/src/org/chromium/base/memory/MemoryPurgeManagerTest.java
@@ -0,0 +1,192 @@ +// Copyright 2022 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. + +package org.chromium.base.memory; + +import android.os.Looper; + +import androidx.test.filters.SmallTest; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.annotation.Config; +import org.robolectric.shadows.ShadowLooper; + +import org.chromium.base.ApplicationState; +import org.chromium.base.BaseFeatures; +import org.chromium.base.FakeTimeTestRule; +import org.chromium.base.FeatureList; +import org.chromium.base.ThreadUtils; +import org.chromium.base.test.BaseRobolectricTestRunner; + +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * Tests for MemoryPurgeManager. + */ +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class MemoryPurgeManagerTest { + @Rule + public FakeTimeTestRule mFakeTimeTestRule = new FakeTimeTestRule(); + + private class MemoryPurgeManagerForTest extends MemoryPurgeManager { + public MemoryPurgeManagerForTest(int initialState) { + super(); + mApplicationState = initialState; + } + + @Override + public void onApplicationStateChange(int state) { + mApplicationState = state; + super.onApplicationStateChange(state); + } + + @Override + protected void notifyMemoryPressure() { + mMemoryPressureNotifiedCount += 1; + } + + @Override + protected int getApplicationState() { + return mApplicationState; + } + + public int mMemoryPressureNotifiedCount; + public int mApplicationState = ApplicationState.UNKNOWN; + } + + @Before + public void setUp() { + // Explicitly set main thread as UiThread. Other places rely on that. + ThreadUtils.setUiThread(Looper.getMainLooper()); + + // Pause main thread to get control over when tasks are run (see runUiThreadFor()). + ShadowLooper.pauseMainLooper(); + } + + @Test + @SmallTest + public void testSimple() { + FeatureList.setTestFeatures(Map.of(BaseFeatures.BROWSER_PROCESS_MEMORY_PURGE, true)); + + var manager = new MemoryPurgeManagerForTest(ApplicationState.HAS_RUNNING_ACTIVITIES); + manager.start(); + + // No notification when initial state has activities. + Assert.assertEquals(0, manager.mMemoryPressureNotifiedCount); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(0, manager.mMemoryPressureNotifiedCount); + + // Notify after a delay. + manager.onApplicationStateChange(ApplicationState.HAS_STOPPED_ACTIVITIES); + Assert.assertEquals(0, manager.mMemoryPressureNotifiedCount); // Should be delayed. + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(1, manager.mMemoryPressureNotifiedCount); + + // Only one notification. + manager.onApplicationStateChange(ApplicationState.HAS_DESTROYED_ACTIVITIES); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(1, manager.mMemoryPressureNotifiedCount); + } + + @Test + @SmallTest + public void testInitializedOnceInBackground() { + FeatureList.setTestFeatures(Map.of(BaseFeatures.BROWSER_PROCESS_MEMORY_PURGE, true)); + + var manager = new MemoryPurgeManagerForTest(ApplicationState.HAS_STOPPED_ACTIVITIES); + manager.start(); + Assert.assertEquals(0, manager.mMemoryPressureNotifiedCount); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(1, manager.mMemoryPressureNotifiedCount); + } + + @Test + @SmallTest + public void testDontTriggerForProcessesWithNoActivities() { + FeatureList.setTestFeatures(Map.of(BaseFeatures.BROWSER_PROCESS_MEMORY_PURGE, true)); + + var manager = new MemoryPurgeManagerForTest(ApplicationState.HAS_DESTROYED_ACTIVITIES); + manager.start(); + + // Don't purge if the process never hosted any activity. + Assert.assertEquals(0, manager.mMemoryPressureNotifiedCount); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(0, manager.mMemoryPressureNotifiedCount); + + // Starts when we cycle through foreground and background. + manager.onApplicationStateChange(ApplicationState.HAS_RUNNING_ACTIVITIES); + manager.onApplicationStateChange(ApplicationState.HAS_STOPPED_ACTIVITIES); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(1, manager.mMemoryPressureNotifiedCount); + } + + @Test + @SmallTest + public void testMultiple() { + FeatureList.setTestFeatures(Map.of(BaseFeatures.BROWSER_PROCESS_MEMORY_PURGE, true)); + + var manager = new MemoryPurgeManagerForTest(ApplicationState.HAS_RUNNING_ACTIVITIES); + manager.start(); + + // Notify after a delay. + manager.onApplicationStateChange(ApplicationState.HAS_STOPPED_ACTIVITIES); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(1, manager.mMemoryPressureNotifiedCount); + + // Back to foreground, no notification. + manager.onApplicationStateChange(ApplicationState.HAS_RUNNING_ACTIVITIES); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(1, manager.mMemoryPressureNotifiedCount); + + // Background again, notify + manager.onApplicationStateChange(ApplicationState.HAS_STOPPED_ACTIVITIES); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + Assert.assertEquals(2, manager.mMemoryPressureNotifiedCount); + } + + @Test + @SmallTest + public void testNoEnoughTimeInBackground() { + FeatureList.setTestFeatures(Map.of(BaseFeatures.BROWSER_PROCESS_MEMORY_PURGE, true)); + + var manager = new MemoryPurgeManagerForTest(ApplicationState.HAS_RUNNING_ACTIVITIES); + manager.start(); + + // Background, then foregound inside the delay period. + manager.onApplicationStateChange(ApplicationState.HAS_STOPPED_ACTIVITIES); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS / 2); + manager.onApplicationStateChange(ApplicationState.HAS_RUNNING_ACTIVITIES); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS); + // Went back to foreground, do nothing. + Assert.assertEquals(0, manager.mMemoryPressureNotifiedCount); + + // Starts the new task + manager.onApplicationStateChange(ApplicationState.HAS_STOPPED_ACTIVITIES); + // After some time, foregroung/background cycle. + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS / 2); + manager.onApplicationStateChange(ApplicationState.HAS_RUNNING_ACTIVITIES); + manager.onApplicationStateChange(ApplicationState.HAS_STOPPED_ACTIVITIES); + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS / 2); + // Not enough time in background. + Assert.assertEquals(0, manager.mMemoryPressureNotifiedCount); + // But the task got rescheduled. + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS / 2); + Assert.assertEquals(1, manager.mMemoryPressureNotifiedCount); + + // No new notification. + runUiThreadFor(MemoryPurgeManager.PURGE_DELAY_MS * 2); + Assert.assertEquals(1, manager.mMemoryPressureNotifiedCount); + } + + private void runUiThreadFor(long delayMs) { + mFakeTimeTestRule.advanceMillis(delayMs); + ShadowLooper.idleMainLooper(delayMs, TimeUnit.MILLISECONDS); + } +}
diff --git a/base/feature_list.h b/base/feature_list.h index d4b65fd..51b66d1 100644 --- a/base/feature_list.h +++ b/base/feature_list.h
@@ -44,7 +44,11 @@ // for a given feature name - generally defined as a constant global variable or // file static. It should never be used as a constexpr as it breaks // pointer-based identity lookup. -// Note: New code should use CONSTINIT on the base::Feature declaration. +// +// Note: New code should use CONSTINIT on the base::Feature declaration, as in: +// +// constexpr Feature kSomeFeature CONSTINIT{"FeatureName", +// FEATURE_DISABLED_BY_DEFAULT}; // // Making Feature constants mutable allows them to contain a mutable member to // cache their override state, while still remaining declared as const. This
diff --git a/base/mac/objc_release_properties.h b/base/mac/objc_release_properties.h deleted file mode 100644 index 4dd4812..0000000 --- a/base/mac/objc_release_properties.h +++ /dev/null
@@ -1,63 +0,0 @@ -// Copyright 2016 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. - -#if defined(__has_feature) && __has_feature(objc_arc) -#error "ARC manages properties, so base::mac::ReleaseProperties isn't needed." -#endif - -#ifndef BASE_MAC_OBJC_RELEASE_PROPERTIES_H_ -#define BASE_MAC_OBJC_RELEASE_PROPERTIES_H_ - -#import <Foundation/Foundation.h> - -#include "base/base_export.h" - -// base::mac::ReleaseProperties(self) can be used in a class's -dealloc method -// to release all properties marked "retain" or "copy" and backed by instance -// variables. It only affects properties defined by the calling class, not -// sub/superclass properties. -// -// Example usage: -// -// @interface AllaysIBF : NSObject -// -// @property(retain, nonatomic) NSString* string; -// @property(copy, nonatomic) NSMutableDictionary* dictionary; -// @property(assign, nonatomic) IBFDelegate* delegate; -// -// @end // @interface AllaysIBF -// -// @implementation AllaysIBF -// -// - (void)dealloc { -// base::mac::ReleaseProperties(self); -// [super dealloc]; -// } -// -// @end // @implementation AllaysIBF -// -// self.string and self.dictionary will each be released, but self.delegate -// will not because it is marked "assign", not "retain" or "copy". -// -// Another approach would be to provide a base class to inherit from whose -// -dealloc walks the property lists of all subclasses to release their -// properties. Distant subclasses might not expect it and over-release their -// properties, so don't do that. - -namespace base::mac { - -namespace details { - -BASE_EXPORT void ReleaseProperties(id, Class); - -} // namespace details - -template <typename Self> -void ReleaseProperties(Self* self) { - details::ReleaseProperties(self, [Self class]); -} - -} // namespace base::mac - -#endif // BASE_MAC_OBJC_RELEASE_PROPERTIES_H_
diff --git a/base/mac/objc_release_properties.mm b/base/mac/objc_release_properties.mm deleted file mode 100644 index 8fcc9c1..0000000 --- a/base/mac/objc_release_properties.mm +++ /dev/null
@@ -1,62 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/mac/objc_release_properties.h" - -#include <memory> - -#include <objc/runtime.h> - -#include "base/check.h" -#include "base/memory/free_deleter.h" - -namespace { - -bool IsRetained(objc_property_t property) { - // The format of the string returned by property_getAttributes is documented - // at - // http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW6 - const char* attribute = property_getAttributes(property); - while (attribute[0]) { - switch (attribute[0]) { - case 'C': // copy - case '&': // retain - return true; - } - do { - attribute++; - } while (attribute[0] && attribute[-1] != ','); - } - return false; -} - -id ValueOf(id obj, objc_property_t property) { - std::unique_ptr<char, base::FreeDeleter> ivar_name( - property_copyAttributeValue(property, "V")); // instance variable name - if (!ivar_name) - return nil; - id ivar_value = nil; - Ivar ivar = object_getInstanceVariable(obj, &*ivar_name, - reinterpret_cast<void**>(&ivar_value)); - DCHECK(ivar); - return ivar_value; -} - -} // namespace - -namespace base::mac::details { - -void ReleaseProperties(id self, Class cls) { - unsigned int property_count; - std::unique_ptr<objc_property_t[], base::FreeDeleter> properties( - class_copyPropertyList(cls, &property_count)); - for (size_t i = 0; i < property_count; ++i) { - objc_property_t property = properties[i]; - if (!IsRetained(property)) - continue; - [ValueOf(self, property) release]; - } -} - -} // namespace base::mac::details
diff --git a/base/mac/objc_release_properties_unittest.mm b/base/mac/objc_release_properties_unittest.mm deleted file mode 100644 index 769d9ff..0000000 --- a/base/mac/objc_release_properties_unittest.mm +++ /dev/null
@@ -1,370 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/mac/objc_release_properties.h" -#include "base/containers/contains.h" - -#include "testing/gtest/include/gtest/gtest.h" - -#import <objc/runtime.h> - -// "When I'm alone, I count myself." -// --Count von Count, http://www.youtube.com/watch?v=FKzszqa9WA4 - -namespace { - -// The number of CountVonCounts outstanding. -int ah_ah_ah; - -// NumberHolder exists to exercise the property attribute string parser by -// providing a named struct and an anonymous union. -struct NumberHolder { - union { - long long sixty_four; - int thirty_two; - short sixteen; - char eight; - } what; - enum { SIXTY_FOUR, THIRTY_TWO, SIXTEEN, EIGHT } how; -}; - -} // namespace - -@interface CountVonCount : NSObject<NSCopying> - -+ (CountVonCount*)countVonCount; - -@end // @interface CountVonCount - -@implementation CountVonCount - -+ (CountVonCount*)countVonCount { - return [[[CountVonCount alloc] init] autorelease]; -} - -- (instancetype)init { - ++ah_ah_ah; - return [super init]; -} - -- (void)dealloc { - --ah_ah_ah; - [super dealloc]; -} - -- (id)copyWithZone:(NSZone*)zone { - return [[CountVonCount allocWithZone:zone] init]; -} - -@end // @implementation CountVonCount - -@interface ObjCPropertyTestBase : NSObject { - @private - CountVonCount* _baseCvcRetain; - CountVonCount* _baseCvcCopy; - CountVonCount* _baseCvcAssign; - CountVonCount* _baseCvcNotProperty; - CountVonCount* _baseCvcNil; - CountVonCount* _baseCvcCustom; - int _baseInt; - double _baseDouble; - void* _basePointer; - NumberHolder _baseStruct; -} - -@property(retain, nonatomic) CountVonCount* baseCvcRetain; -@property(copy, nonatomic) CountVonCount* baseCvcCopy; -@property(assign, nonatomic) CountVonCount* baseCvcAssign; -@property(retain, nonatomic) CountVonCount* baseCvcNil; -@property(retain, nonatomic, getter=baseCustom, setter=setBaseCustom:) - CountVonCount* baseCvcCustom; -@property(readonly, retain, nonatomic) CountVonCount* baseCvcReadOnly; -@property(retain, nonatomic) CountVonCount* baseCvcDynamic; -@property(assign, nonatomic) int baseInt; -@property(assign, nonatomic) double baseDouble; -@property(assign, nonatomic) void* basePointer; -@property(assign, nonatomic) NumberHolder baseStruct; - -- (void)setBaseCvcNotProperty:(CountVonCount*)cvc; - -@end // @interface ObjCPropertyTestBase - -@implementation ObjCPropertyTestBase - -@synthesize baseCvcRetain = _baseCvcRetain; -@synthesize baseCvcCopy = _baseCvcCopy; -@synthesize baseCvcAssign = _baseCvcAssign; -@synthesize baseCvcNil = _baseCvcNil; -@synthesize baseCvcCustom = _baseCvcCustom; -@synthesize baseCvcReadOnly = _baseCvcReadOnly; -@dynamic baseCvcDynamic; -@synthesize baseInt = _baseInt; -@synthesize baseDouble = _baseDouble; -@synthesize basePointer = _basePointer; -@synthesize baseStruct = _baseStruct; - -- (void)dealloc { - [_baseCvcNotProperty release]; - base::mac::ReleaseProperties(self); - [super dealloc]; -} - -- (void)setBaseCvcNotProperty:(CountVonCount*)cvc { - if (cvc != _baseCvcNotProperty) { - [_baseCvcNotProperty release]; - _baseCvcNotProperty = [cvc retain]; - } -} - -- (void)setBaseCvcReadOnlyProperty:(CountVonCount*)cvc { - if (cvc != _baseCvcReadOnly) { - [_baseCvcReadOnly release]; - _baseCvcReadOnly = [cvc retain]; - } -} - -@end // @implementation ObjCPropertyTestBase - -@protocol ObjCPropertyTestProtocol - -@property(retain, nonatomic) CountVonCount* protoCvcRetain; -@property(copy, nonatomic) CountVonCount* protoCvcCopy; -@property(assign, nonatomic) CountVonCount* protoCvcAssign; -@property(retain, nonatomic) CountVonCount* protoCvcNil; -@property(retain, nonatomic, getter=protoCustom, setter=setProtoCustom:) - CountVonCount* protoCvcCustom; -@property(retain, nonatomic) CountVonCount* protoCvcDynamic; -@property(assign, nonatomic) int protoInt; -@property(assign, nonatomic) double protoDouble; -@property(assign, nonatomic) void* protoPointer; -@property(assign, nonatomic) NumberHolder protoStruct; - -@end // @protocol ObjCPropertyTestProtocol - -// @protocol(NSObject) declares some (copy, readonly) properties (superclass, -// description, debugDescription, and hash), but we're not expected to release -// them. The current implementation only releases properties backed by instance -// variables, and this makes sure that doesn't change in a breaking way. -@interface ObjCPropertyTestDerived - : ObjCPropertyTestBase<ObjCPropertyTestProtocol, NSObject> { - @private - CountVonCount* _derivedCvcRetain; - CountVonCount* _derivedCvcCopy; - CountVonCount* _derivedCvcAssign; - CountVonCount* _derivedCvcNotProperty; - CountVonCount* _derivedCvcNil; - CountVonCount* _derivedCvcCustom; - int _derivedInt; - double _derivedDouble; - void* _derivedPointer; - NumberHolder _derivedStruct; - - CountVonCount* _protoCvcRetain; - CountVonCount* _protoCvcCopy; - CountVonCount* _protoCvcAssign; - CountVonCount* _protoCvcNil; - CountVonCount* _protoCvcCustom; - int _protoInt; - double _protoDouble; - void* _protoPointer; - NumberHolder _protoStruct; -} - -@property(retain, nonatomic) CountVonCount* derivedCvcRetain; -@property(copy, nonatomic) CountVonCount* derivedCvcCopy; -@property(assign, nonatomic) CountVonCount* derivedCvcAssign; -@property(retain, nonatomic) CountVonCount* derivedCvcNil; -@property(retain, nonatomic, getter=derivedCustom, setter=setDerivedCustom:) - CountVonCount* derivedCvcCustom; -@property(retain, nonatomic) CountVonCount* derivedCvcDynamic; -@property(assign, nonatomic) int derivedInt; -@property(assign, nonatomic) double derivedDouble; -@property(assign, nonatomic) void* derivedPointer; -@property(assign, nonatomic) NumberHolder derivedStruct; - -- (void)setDerivedCvcNotProperty:(CountVonCount*)cvc; - -@end // @interface ObjCPropertyTestDerived - -@implementation ObjCPropertyTestDerived - -@synthesize derivedCvcRetain = _derivedCvcRetain; -@synthesize derivedCvcCopy = _derivedCvcCopy; -@synthesize derivedCvcAssign = _derivedCvcAssign; -@synthesize derivedCvcNil = _derivedCvcNil; -@synthesize derivedCvcCustom = _derivedCvcCustom; -@dynamic derivedCvcDynamic; -@synthesize derivedInt = _derivedInt; -@synthesize derivedDouble = _derivedDouble; -@synthesize derivedPointer = _derivedPointer; -@synthesize derivedStruct = _derivedStruct; - -@synthesize protoCvcRetain = _protoCvcRetain; -@synthesize protoCvcCopy = _protoCvcCopy; -@synthesize protoCvcAssign = _protoCvcAssign; -@synthesize protoCvcNil = _protoCvcNil; -@synthesize protoCvcCustom = _protoCvcCustom; -@dynamic protoCvcDynamic; -@synthesize protoInt = _protoInt; -@synthesize protoDouble = _protoDouble; -@synthesize protoPointer = _protoPointer; -@synthesize protoStruct = _protoStruct; - -+ (BOOL)resolveInstanceMethod:(SEL)sel { - static const std::vector<SEL> dynamicMethods { - @selector(baseCvcDynamic), @selector(derivedCvcDynamic), - @selector(protoCvcDynamic), - }; - if (!base::Contains(dynamicMethods, sel)) { - return NO; - } - id (*imp)() = []() -> id { return nil; }; - class_addMethod([self class], sel, reinterpret_cast<IMP>(imp), "@@:"); - return YES; -} - -- (void)dealloc { - base::mac::ReleaseProperties(self); - [_derivedCvcNotProperty release]; - [super dealloc]; -} - -- (void)setDerivedCvcNotProperty:(CountVonCount*)cvc { - if (cvc != _derivedCvcNotProperty) { - [_derivedCvcNotProperty release]; - _derivedCvcNotProperty = [cvc retain]; - } -} - -@end // @implementation ObjCPropertyTestDerived - -@interface ObjcPropertyTestEmpty : NSObject -@end - -@implementation ObjcPropertyTestEmpty - -- (void)dealloc { - base::mac::ReleaseProperties(self); - [super dealloc]; -} - -@end // @implementation ObjcPropertyTestEmpty - -namespace { - -TEST(ObjCReleasePropertiesTest, SesameStreet) { - ObjCPropertyTestDerived* test_object = [[ObjCPropertyTestDerived alloc] init]; - - // Assure a clean slate. - EXPECT_EQ(0, ah_ah_ah); - EXPECT_EQ(1U, [test_object retainCount]); - - CountVonCount* baseAssign = [[CountVonCount alloc] init]; - CountVonCount* derivedAssign = [[CountVonCount alloc] init]; - CountVonCount* protoAssign = [[CountVonCount alloc] init]; - - // Make sure that worked before things get more involved. - EXPECT_EQ(3, ah_ah_ah); - - @autoreleasepool { - test_object.baseCvcRetain = [CountVonCount countVonCount]; - test_object.baseCvcCopy = [CountVonCount countVonCount]; - test_object.baseCvcAssign = baseAssign; - test_object.baseCvcCustom = [CountVonCount countVonCount]; - [test_object setBaseCvcReadOnlyProperty:[CountVonCount countVonCount]]; - [test_object setBaseCvcNotProperty:[CountVonCount countVonCount]]; - - // That added 5 objects, plus 1 more that was copied. - EXPECT_EQ(9, ah_ah_ah); - - test_object.derivedCvcRetain = [CountVonCount countVonCount]; - test_object.derivedCvcCopy = [CountVonCount countVonCount]; - test_object.derivedCvcAssign = derivedAssign; - test_object.derivedCvcCustom = [CountVonCount countVonCount]; - [test_object setDerivedCvcNotProperty:[CountVonCount countVonCount]]; - - // That added 4 objects, plus 1 more that was copied. - EXPECT_EQ(14, ah_ah_ah); - - test_object.protoCvcRetain = [CountVonCount countVonCount]; - test_object.protoCvcCopy = [CountVonCount countVonCount]; - test_object.protoCvcAssign = protoAssign; - test_object.protoCvcCustom = [CountVonCount countVonCount]; - - // That added 3 objects, plus 1 more that was copied. - EXPECT_EQ(18, ah_ah_ah); - } - - // Now that the autorelease pool has been popped, the 3 objects that were - // copied when placed into the test object will have been deallocated. - EXPECT_EQ(15, ah_ah_ah); - - // Make sure that the setters wo/rk and have the expected semantics. - test_object.baseCvcRetain = nil; - test_object.baseCvcCopy = nil; - test_object.baseCvcAssign = nil; - test_object.baseCvcCustom = nil; - test_object.derivedCvcRetain = nil; - test_object.derivedCvcCopy = nil; - test_object.derivedCvcAssign = nil; - test_object.derivedCvcCustom = nil; - test_object.protoCvcRetain = nil; - test_object.protoCvcCopy = nil; - test_object.protoCvcAssign = nil; - test_object.protoCvcCustom = nil; - - // The CountVonCounts marked "retain" and "copy" should have been - // deallocated. Those marked assign should not have been. The only ones that - // should exist now are the ones marked "assign", the ones held in - // non-property instance variables, and the ones held in properties marked - // readonly. - EXPECT_EQ(6, ah_ah_ah); - - @autoreleasepool { - // Put things back to how they were. - test_object.baseCvcRetain = [CountVonCount countVonCount]; - test_object.baseCvcCopy = [CountVonCount countVonCount]; - test_object.baseCvcAssign = baseAssign; - test_object.baseCvcCustom = [CountVonCount countVonCount]; - test_object.derivedCvcRetain = [CountVonCount countVonCount]; - test_object.derivedCvcCopy = [CountVonCount countVonCount]; - test_object.derivedCvcAssign = derivedAssign; - test_object.derivedCvcCustom = [CountVonCount countVonCount]; - test_object.protoCvcRetain = [CountVonCount countVonCount]; - test_object.protoCvcCopy = [CountVonCount countVonCount]; - test_object.protoCvcAssign = protoAssign; - test_object.protoCvcCustom = [CountVonCount countVonCount]; - - // 9 more CountVonCounts, 3 of which were copied. - EXPECT_EQ(18, ah_ah_ah); - } - - // Now that the autorelease pool has been popped, the 3 copies are gone. - EXPECT_EQ(15, ah_ah_ah); - - // Releasing the test object should get rid of everything that it owns. - [test_object release]; - - // base::mac::ReleaseProperties(self) should have released all of the - // CountVonCounts associated with properties marked "retain" or "copy". The - // -dealloc methods in each should have released the single non-property - // objects in each. Only the CountVonCounts assigned to the properties marked - // "assign" should remain. - EXPECT_EQ(3, ah_ah_ah); - - [baseAssign release]; - [derivedAssign release]; - [protoAssign release]; - - // Zero! Zero counts! Ah, ah, ah. - EXPECT_EQ(0, ah_ah_ah); -} - -TEST(ObjCReleasePropertiesTest, EmptyObject) { - // Test that ReleaseProperties doesn't do anything unexpected to a class - // with no properties. - [[[ObjcPropertyTestEmpty alloc] init] release]; -} - -} // namespace
diff --git a/base/parameter_pack.h b/base/parameter_pack.h index 7e657d33..b6d1b1a3 100644 --- a/base/parameter_pack.h +++ b/base/parameter_pack.h
@@ -11,26 +11,18 @@ #include <tuple> #include <type_traits> +#include "base/containers/contains.h" + namespace base { // Checks if any of the elements in |ilist| is true. -// Similar to std::any_of for the case of constexpr initializer_list. inline constexpr bool any_of(std::initializer_list<bool> ilist) { - for (auto c : ilist) { - if (c) - return true; - } - return false; + return base::Contains(ilist, true); } // Checks if all of the elements in |ilist| are true. -// Similar to std::all_of for the case of constexpr initializer_list. inline constexpr bool all_of(std::initializer_list<bool> ilist) { - for (auto c : ilist) { - if (!c) - return false; - } - return true; + return !base::Contains(ilist, false); } // Counts the elements in |ilist| that are equal to |value|.
diff --git a/base/win/embedded_i18n/language_selector.cc b/base/win/embedded_i18n/language_selector.cc index d8a456d..91c693b 100644 --- a/base/win/embedded_i18n/language_selector.cc +++ b/base/win/embedded_i18n/language_selector.cc
@@ -13,6 +13,7 @@ #include <functional> #include "base/check_op.h" +#include "base/ranges/algorithm.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/win/i18n.h" @@ -46,11 +47,10 @@ bool IsArraySortedAndLowerCased(span<const LangToOffset> languages_to_offset) { return std::is_sorted(languages_to_offset.begin(), languages_to_offset.end()) && - std::all_of(languages_to_offset.begin(), languages_to_offset.end(), - [](const auto& lang) { - auto language = AsStringPiece16(lang.first); - return ToLowerASCII(language) == language; - }); + base::ranges::all_of(languages_to_offset, [](const auto& lang) { + auto language = AsStringPiece16(lang.first); + return ToLowerASCII(language) == language; + }); } #endif // DCHECK_IS_ON()
diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn index 1533fa5..5f5b1673 100644 --- a/build/config/c++/BUILD.gn +++ b/build/config/c++/BUILD.gn
@@ -19,6 +19,10 @@ ldflags = [] libs = [] + # Fixed libc++ configuration macros are in + # buildtools/third_party/libc++/__config_site. This config only has defines + # that vary depending on gn args, and non-define flags. + if (!libcxx_is_shared) { # Don't leak any symbols on a static build. defines += [ "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS" ] @@ -27,22 +31,15 @@ } } - defines += [ "_LIBCPP_ENABLE_NODISCARD_EXT" ] - include_dirs += [ "//buildtools/third_party/libc++" ] - # The Windows component build fails to link with libc++'s debug mode. See - # https://crbug.com/923166#c33, https://crbug.com/923166#c44, and - # https://llvm.org/PR41018. - if (!(is_win && is_component_build)) { - # libc++ has two levels of debug mode. Setting _LIBCPP_DEBUG to zero - # enables most assertions. Setting it to one additionally enables iterator - # debugging. See https://libcxx.llvm.org/docs/DesignDocs/DebugMode.html - if (enable_iterator_debugging) { - defines += [ "_LIBCPP_DEBUG=1" ] - } else if (is_debug || dcheck_always_on) { - defines += [ "_LIBCPP_DEBUG=0" ] - } + # libc++ has two levels of additional checking: + # 1. _LIBCPP_ENABLE_ASSERTIONS enables assertions for bounds checking. + # We always enable this in __config_site, in all build configurations. + # 2. _LIBCPP_ENABLE_DEBUG_MODE enables iterator debugging and other + # expensive checks. Enable these only if enable_iterator_debugging is on. + if (enable_iterator_debugging) { + defines += [ "_LIBCPP_ENABLE_DEBUG_MODE" ] } defines += [ "CR_LIBCXX_REVISION=$libcxx_revision" ] @@ -58,12 +55,6 @@ cflags_cc += [ "-I" + rebase_path("$libcxx_prefix/include", root_build_dir) ] - # Prevent libc++ from embedding linker flags to try to automatically link - # against its runtime library. This is unnecessary with our build system, - # and can also result in build failures if libc++'s name for a library - # does not match ours. - defines += [ "_LIBCPP_NO_AUTO_LINK" ] - # Add a debug visualizer for Microsoft's debuggers so that they can display # libc++ types well. if (libcxx_natvis_include) {
diff --git a/buildtools/deps_revisions.gni b/buildtools/deps_revisions.gni index 4b7781e..4f89857 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 = "42e738f0a1928e8d70e27b96acb02cd23beefec8" + libcxx_revision = "84f06932d7b46210487e4b3878477aad53e78c12" }
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn index b743e36..6f904094 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn
@@ -80,7 +80,6 @@ "trunk/src/chrono.cpp", "trunk/src/condition_variable.cpp", "trunk/src/condition_variable_destructor.cpp", - "trunk/src/debug.cpp", "trunk/src/exception.cpp", "trunk/src/format.cpp", "trunk/src/functional.cpp", @@ -89,7 +88,6 @@ "trunk/src/ios.cpp", "trunk/src/ios.instantiations.cpp", "trunk/src/iostream.cpp", - "trunk/src/legacy_debug_handler.cpp", "trunk/src/legacy_pointer_safety.cpp", "trunk/src/locale.cpp", "trunk/src/memory.cpp", @@ -116,6 +114,14 @@ "trunk/src/vector.cpp", "trunk/src/verbose_abort.cpp", ] + + if (enable_iterator_debugging) { + sources += [ + "trunk/src/debug.cpp", + "trunk/src/legacy_debug_handler.cpp", + ] + } + include_dirs = [ "trunk/src" ] if (is_win) { sources += [
diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site index 4bf26e6..c9f8851 100644 --- a/buildtools/third_party/libc++/__config_site +++ b/buildtools/third_party/libc++/__config_site
@@ -41,6 +41,14 @@ // We set them here since we want them to take effect everywhere, // unconditionally. +#define _LIBCPP_ENABLE_NODISCARD_EXT + +// Prevent libc++ from embedding linker flags to try to automatically link +// against its runtime library. This is unnecessary with our build system, +// and can also result in build failures if libc++'s name for a library +// does not match ours. Only has an effect on Windows. +#define _LIBCPP_NO_AUTO_LINK + #define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES #endif // _LIBCPP_CONFIG_SITE
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc index 02896b6..a20ffa39 100644 --- a/cc/trees/property_tree.cc +++ b/cc/trees/property_tree.cc
@@ -58,7 +58,6 @@ TransformTree::TransformTree(PropertyTrees* property_trees) : PropertyTree<TransformNode>(property_trees), page_scale_factor_(1.f), - fixed_elements_dont_overscroll_(false), device_scale_factor_(1.f), device_transform_scale_factor_(1.f) { cached_data_.push_back(TransformCachedNodeData()); @@ -128,7 +127,6 @@ PropertyTree<TransformNode>::clear(); page_scale_factor_ = 1.f; - fixed_elements_dont_overscroll_ = false; device_scale_factor_ = 1.f; device_transform_scale_factor_ = 1.f; nodes_affected_by_outer_viewport_bounds_delta_.clear(); @@ -182,7 +180,7 @@ // TODO(flackr): Only dirty when scroll offset changes. if (node->sticky_position_constraint_id >= 0 || node->anchor_scroll_containers_data_id >= 0 || - node->needs_local_transform_update || ShouldUndoOverscroll(node)) { + node->needs_local_transform_update || node->should_undo_overscroll) { UpdateLocalTransform(node, viewport_property_ids); } else { UndoSnapping(node); @@ -497,22 +495,22 @@ return data->accumulated_scroll_origin - accumulated_scroll_offset; } -bool TransformTree::ShouldUndoOverscroll(const TransformNode* node) const { - return fixed_elements_dont_overscroll_ && node && node->is_fixed_to_viewport; -} - -void TransformTree::UpdateFixedNodeTransformAndClip( +void TransformTree::UndoOverscroll( const TransformNode* node, - gfx::Vector2dF& fixed_position_adjustment, + gfx::Vector2dF& position_adjustment, const ViewportPropertyIds* viewport_property_ids) { + DCHECK(node->should_undo_overscroll); + const int transform_id = viewport_property_ids ? viewport_property_ids->overscroll_elasticity_transform : kInvalidPropertyNodeId; + if (transform_id == kInvalidPropertyNodeId) + return; + const int clip_id = viewport_property_ids ? viewport_property_ids->outer_clip : kInvalidPropertyNodeId; - if (!ShouldUndoOverscroll(node) || transform_id == kInvalidPropertyNodeId || - clip_id == kInvalidPropertyNodeId) + if (clip_id == kInvalidPropertyNodeId) return; const TransformNode* overscroll_node = Node(transform_id); @@ -521,7 +519,7 @@ if (overscroll_offset.IsZero()) return; - fixed_position_adjustment += + position_adjustment += gfx::ScaleVector2d(overscroll_offset, 1.f / page_scale_factor()); ClipTree& clip_tree = property_trees()->clip_tree_mutable(); @@ -530,12 +528,10 @@ // Inflate the clip rect based on the overscroll direction. gfx::OutsetsF outsets; - fixed_position_adjustment.x() < 0 - ? outsets.set_left(-fixed_position_adjustment.x()) - : outsets.set_right(fixed_position_adjustment.x()); - fixed_position_adjustment.y() < 0 - ? outsets.set_top(-fixed_position_adjustment.y()) - : outsets.set_bottom(fixed_position_adjustment.y()); + position_adjustment.x() < 0 ? outsets.set_left(-position_adjustment.x()) + : outsets.set_right(position_adjustment.x()); + position_adjustment.y() < 0 ? outsets.set_top(-position_adjustment.y()) + : outsets.set_bottom(position_adjustment.y()); clip_node->clip.Outset(outsets); clip_tree.set_needs_update(true); } @@ -548,15 +544,14 @@ node->post_translation.y() + node->origin.y(), node->origin.z()); - gfx::Vector2dF fixed_position_adjustment; + gfx::Vector2dF position_adjustment; if (node->moved_by_outer_viewport_bounds_delta_y) { - fixed_position_adjustment.set_y( + position_adjustment.set_y( property_trees()->outer_viewport_container_bounds_delta().y()); } - - UpdateFixedNodeTransformAndClip(node, fixed_position_adjustment, - viewport_property_ids); - transform.Translate(fixed_position_adjustment - + if (node->should_undo_overscroll) + UndoOverscroll(node, position_adjustment, viewport_property_ids); + transform.Translate(position_adjustment - node->scroll_offset.OffsetFromOrigin()); transform.Translate(StickyPositionOffset(node)); transform.Translate(AnchorScrollOffset(node)); @@ -761,8 +756,6 @@ bool TransformTree::operator==(const TransformTree& other) const { return PropertyTree::operator==(other) && page_scale_factor_ == other.page_scale_factor() && - fixed_elements_dont_overscroll_ == - other.fixed_elements_dont_overscroll() && device_scale_factor_ == other.device_scale_factor() && device_transform_scale_factor_ == other.device_transform_scale_factor() &&
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h index e6d1d00c..44aba48 100644 --- a/cc/trees/property_tree.h +++ b/cc/trees/property_tree.h
@@ -203,13 +203,6 @@ } float page_scale_factor() const { return page_scale_factor_; } - void set_fixed_elements_dont_overscroll(bool value) { - fixed_elements_dont_overscroll_ = value; - } - bool fixed_elements_dont_overscroll() const { - return fixed_elements_dont_overscroll_; - } - void set_device_scale_factor(float device_scale_factor) { device_scale_factor_ = device_scale_factor; } @@ -248,11 +241,9 @@ return cached_data_; } - bool ShouldUndoOverscroll(const TransformNode* node) const; - void UpdateFixedNodeTransformAndClip( - const TransformNode* node, - gfx::Vector2dF& fixed_position_adjustment, - const ViewportPropertyIds* viewport_property_ids); + void UndoOverscroll(const TransformNode* node, + gfx::Vector2dF& position_adjustment, + const ViewportPropertyIds* viewport_property_ids); const StickyPositionNodeData* GetStickyPositionData(int node_id) const { return const_cast<TransformTree*>(this)->MutableStickyPositionData(node_id); @@ -300,7 +291,6 @@ // scale is calculated using page scale factor, device scale factor and the // scale factor of device transform. So we need to store them explicitly. float page_scale_factor_; - bool fixed_elements_dont_overscroll_; float device_scale_factor_; float device_transform_scale_factor_; std::vector<int> nodes_affected_by_outer_viewport_bounds_delta_;
diff --git a/cc/trees/property_tree_unittest.cc b/cc/trees/property_tree_unittest.cc index 13dcfc9..256437c 100644 --- a/cc/trees/property_tree_unittest.cc +++ b/cc/trees/property_tree_unittest.cc
@@ -199,7 +199,7 @@ // Tests that the transform for fixed elements is translated based on the // overscroll nodes scroll_offset and that the clip node has an outset based on // the overscroll distance. -TEST(PropertyTreeTest, FixedElementInverseTranslation) { +TEST(PropertyTreeTest, UndoOverscroll) { FakeProtectedSequenceSynchronizer synchronizer; PropertyTrees property_trees(synchronizer); @@ -225,14 +225,10 @@ overscroll_node.id = transform_tree.Insert(overscroll_node, 1); viewport_property_ids.overscroll_elasticity_transform = overscroll_node.id; - transform_tree.set_fixed_elements_dont_overscroll(true); - TransformNode fixed_node; - fixed_node.is_fixed_to_viewport = true; + fixed_node.should_undo_overscroll = true; fixed_node.id = transform_tree.Insert(fixed_node, 2); - EXPECT_TRUE(transform_tree.ShouldUndoOverscroll(&fixed_node)); - transform_tree.UpdateTransforms(2, &viewport_property_ids); // overscroll_node transform_tree.UpdateTransforms(3, &viewport_property_ids); // fixed_node
diff --git a/cc/trees/transform_node.cc b/cc/trees/transform_node.cc index d964b3e..9bc94cd 100644 --- a/cc/trees/transform_node.cc +++ b/cc/trees/transform_node.cc
@@ -29,7 +29,7 @@ flattens_inherited_transform(true), node_and_ancestors_are_flat(true), scrolls(false), - is_fixed_to_viewport(false), + should_undo_overscroll(false), should_be_snapped(false), moved_by_outer_viewport_bounds_delta_y(false), in_subtree_of_page_scale_layer(false), @@ -63,7 +63,7 @@ flattens_inherited_transform == other.flattens_inherited_transform && node_and_ancestors_are_flat == other.node_and_ancestors_are_flat && scrolls == other.scrolls && - is_fixed_to_viewport == other.is_fixed_to_viewport && + should_undo_overscroll == other.should_undo_overscroll && should_be_snapped == other.should_be_snapped && moved_by_outer_viewport_bounds_delta_y == other.moved_by_outer_viewport_bounds_delta_y &&
diff --git a/cc/trees/transform_node.h b/cc/trees/transform_node.h index 95220aa2..ca26535 100644 --- a/cc/trees/transform_node.h +++ b/cc/trees/transform_node.h
@@ -94,7 +94,7 @@ bool scrolls : 1; - bool is_fixed_to_viewport : 1; + bool should_undo_overscroll : 1; bool should_be_snapped : 1;
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni index e327f4f..a394bbb 100644 --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni
@@ -459,6 +459,7 @@ "java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java", "java/src/org/chromium/chrome/browser/customtabs/NavigationInfoCaptureTrigger.java", "java/src/org/chromium/chrome/browser/customtabs/PageLoadMetricsObserver.java", + "java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHandleStrategy.java", "java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java", "java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabInputMethodWrapper.java", "java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabTabObserver.java",
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java index db00459..ab1f2cf 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
@@ -49,6 +49,7 @@ import org.chromium.base.TraceEvent; import org.chromium.base.annotations.UsedByReflection; import org.chromium.base.jank_tracker.DummyJankTracker; +import org.chromium.base.memory.MemoryPurgeManager; import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordUserAction; import org.chromium.base.supplier.ObservableSupplier; @@ -1378,6 +1379,9 @@ createContextReporterIfNeeded(); }); } + + DeferredStartupHandler.getInstance().addDeferredTask( + () -> { MemoryPurgeManager.getInstance().start(); }); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHandleStrategy.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHandleStrategy.java new file mode 100644 index 0000000..0a277dd --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHandleStrategy.java
@@ -0,0 +1,155 @@ +// Copyright 2022 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. + +package org.chromium.chrome.browser.customtabs; + +import android.content.Context; +import android.view.GestureDetector; +import android.view.MotionEvent; +import android.view.VelocityTracker; + +import androidx.core.view.MotionEventCompat; + +import org.chromium.base.ThreadUtils; +import org.chromium.base.supplier.BooleanSupplier; +import org.chromium.base.supplier.Supplier; +import org.chromium.chrome.browser.customtabs.PartialCustomTabHeightStrategy.HeightStatus; +import org.chromium.chrome.browser.customtabs.features.toolbar.CustomTabToolbar; +import org.chromium.chrome.browser.flags.ChromeFeatureList; + +/** + * Handling touch events for resizing the Window. + */ +class PartialCustomTabHandleStrategy + extends GestureDetector.SimpleOnGestureListener implements CustomTabToolbar.HandleStrategy { + /** + * The base duration of the settling animation of the sheet. 218 ms is a spec for material + * design (this is the minimum time a user is guaranteed to pay attention to something). + */ + private static final long BASE_ANIMATION_DURATION_MS = 218; + + private static final int FLING_THRESHOLD_PX = 100; + + private static final int FLING_VELOCITY_PIXELS_PER_MS = 1000; + + private final GestureDetector mGestureDetector; + private float mLastPosY; + private float mDeltaY; + private boolean mSeenFirstMoveOrDown; + private VelocityTracker mVelocityTracker; + private Runnable mCloseHandler; + + private BooleanSupplier mIsFullHeight; + private Supplier<Integer> mStatus; + private DragEventCallback mDragEventCallback; + + /** Callback for drag events. */ + interface DragEventCallback { + /** + * Drag action gets started. + * @param y Y position when the drag action starts. + */ + void onDragStart(int y); + + /** + * Drag action is in progress. Called for each move. + * @param y Y position when the drag move happens. + */ + void onDragMove(int y); + + /** + * Drag action is finished. + * @param flingDistance fling distance when the drag action ends up in fling action. + * Zero if not. + */ + boolean onDragEnd(int flingDistance); + } + + public PartialCustomTabHandleStrategy(Context context, BooleanSupplier isFullHeight, + Supplier<Integer> status, DragEventCallback dragEventCallback) { + mIsFullHeight = isFullHeight; + mStatus = status; + mDragEventCallback = dragEventCallback; + mGestureDetector = new GestureDetector(context, this, ThreadUtils.getUiThreadHandler()); + mVelocityTracker = VelocityTracker.obtain(); + } + + @Override + public boolean onInterceptTouchEvent(MotionEvent event) { + return mIsFullHeight.getAsBoolean() ? false : mGestureDetector.onTouchEvent(event); + } + + @Override + public boolean onTouchEvent(MotionEvent event) { + if (!ChromeFeatureList.sCctResizableAllowResizeByUserGesture.isEnabled()) { + return false; + } + + if (mStatus.get() == HeightStatus.TRANSITION) { + return true; + } + // We will get events directly even when onInterceptTouchEvent() didn't return true, + // because the sub View tree might not want this event, so check orientation and + // multi-window flags here again. + if (mIsFullHeight.getAsBoolean()) { + return true; + } + + float y = event.getRawY(); + switch (MotionEventCompat.getActionMasked(event)) { + case MotionEvent.ACTION_DOWN: + case MotionEvent.ACTION_MOVE: + if (!mSeenFirstMoveOrDown) { + mSeenFirstMoveOrDown = true; + mVelocityTracker.clear(); + mLastPosY = y; + mDragEventCallback.onDragStart((int) y); + } else { + mVelocityTracker.addMovement(event); + mDragEventCallback.onDragMove((int) y); + } + mDeltaY = y - mLastPosY; + mLastPosY = y; + return true; + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_CANCEL: + if (mSeenFirstMoveOrDown) { + mVelocityTracker.computeCurrentVelocity(FLING_VELOCITY_PIXELS_PER_MS); + float v = Math.abs(mVelocityTracker.getYVelocity()); + int flingDist = Math.abs(v) < FLING_THRESHOLD_PX ? 0 : getFlingDistance(v); + int direction = (int) Math.signum(mDeltaY); + if (!mDragEventCallback.onDragEnd((int) (flingDist * direction))) { + mCloseHandler.run(); + } + mSeenFirstMoveOrDown = false; + } + return true; + default: + return true; + } + } + + @Override + public void setCloseClickHandler(Runnable handler) { + mCloseHandler = handler; + } + + @Override + public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { + // Always intercept scroll events. + return true; + } + + /** + * Gets the distance of a fling based on the velocity and the base animation time. This + * formula assumes the deceleration curve is quadratic (t^2), hence the displacement formula + * should be: displacement = initialVelocity * duration / 2. + * @param velocity The velocity of the fling. + * @return The distance the fling would cover. + */ + private int getFlingDistance(float velocity) { + // This includes conversion from seconds to ms. + return (int) (velocity * BASE_ANIMATION_DURATION_MS / 2000f); + } +}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java index e58e7b4..6fec4be 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java
@@ -11,7 +11,6 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.app.Activity; -import android.content.Context; import android.content.res.Configuration; import android.graphics.Color; import android.graphics.Point; @@ -22,10 +21,7 @@ import android.os.Handler; import android.util.DisplayMetrics; import android.view.Display; -import android.view.GestureDetector; import android.view.Gravity; -import android.view.MotionEvent; -import android.view.VelocityTracker; import android.view.View; import android.view.ViewGroup; import android.view.ViewStub; @@ -40,7 +36,6 @@ import androidx.annotation.Nullable; import androidx.annotation.Px; import androidx.annotation.VisibleForTesting; -import androidx.core.view.MotionEventCompat; import androidx.core.view.WindowCompat; import androidx.core.view.WindowInsetsCompat; import androidx.core.view.WindowInsetsControllerCompat; @@ -49,7 +44,6 @@ import org.chromium.base.Consumer; import org.chromium.base.MathUtils; import org.chromium.base.SysUtils; -import org.chromium.base.ThreadUtils; import org.chromium.base.metrics.RecordHistogram; import org.chromium.chrome.R; import org.chromium.chrome.browser.customtabs.features.CustomTabNavigationBarController; @@ -68,7 +62,8 @@ * owned by the CustomTabActivity. */ public class PartialCustomTabHeightStrategy extends CustomTabHeightStrategy - implements ConfigurationChangedObserver, ValueAnimator.AnimatorUpdateListener { + implements ConfigurationChangedObserver, ValueAnimator.AnimatorUpdateListener, + PartialCustomTabHandleStrategy.DragEventCallback { @VisibleForTesting static final long SPINNER_TIMEOUT_MS = 500; /** @@ -86,11 +81,9 @@ private static final int SPINNER_FADEIN_DURATION_MS = 100; private static final int SPINNER_FADEOUT_DURATION_MS = 400; - private static final int FLING_VELOCITY_PIXELS_PER_MS = 1000; - @IntDef({HeightStatus.TOP, HeightStatus.INITIAL_HEIGHT, HeightStatus.TRANSITION}) @Retention(RetentionPolicy.SOURCE) - private @interface HeightStatus { + @interface HeightStatus { int TOP = 0; int INITIAL_HEIGHT = 1; int TRANSITION = 2; @@ -146,6 +139,7 @@ // Y offset when a dragging gesture starts. private int mDraggingStartY; + private float mOffsetY; // Method to invoke to animate the tab. Animates by altering top y position by default, // but using height for the close animation. @@ -171,159 +165,9 @@ } // The current height used to trigger onResizedCallback when it is resized. + // Used in 'window-above-navbar' version only. private int mHeight; - /** - * Handling touch events for resizing the Window. - */ - @VisibleForTesting - /* package */ class PartialCustomTabHandleStrategy - extends GestureDetector.SimpleOnGestureListener - implements CustomTabToolbar.HandleStrategy { - /** - * The base duration of the settling animation of the sheet. 218 ms is a spec for material - * design (this is the minimum time a user is guaranteed to pay attention to something). - */ - private static final long BASE_ANIMATION_DURATION_MS = 218; - - private static final int FLING_THRESHOLD_PX = 100; - - private GestureDetector mGestureDetector; - private float mLastPosY; - private float mOffsetY; - private float mDeltaY; - private boolean mSeenFirstMoveOrDown; - private VelocityTracker mVelocityTracker; - private Runnable mCloseHandler; - - public PartialCustomTabHandleStrategy(Context context) { - mGestureDetector = new GestureDetector(context, this, ThreadUtils.getUiThreadHandler()); - mVelocityTracker = VelocityTracker.obtain(); - } - - @Override - public boolean onInterceptTouchEvent(MotionEvent event) { - return isFullHeight() ? false : mGestureDetector.onTouchEvent(event); - } - - @Override - public boolean onTouchEvent(MotionEvent event) { - if (!ChromeFeatureList.sCctResizableAllowResizeByUserGesture.isEnabled()) { - return false; - } - - if (mStatus == HeightStatus.TRANSITION) { - return true; - } - // We will get events directly even when onInterceptTouchEvent() didn't return true, - // because the sub View tree might not want this event, so check orientation and - // multi-window flags here again. - if (isFullHeight()) { - return true; - } - - float y = event.getRawY(); - switch (MotionEventCompat.getActionMasked(event)) { - case MotionEvent.ACTION_DOWN: - case MotionEvent.ACTION_MOVE: - if (!mSeenFirstMoveOrDown) { - mSeenFirstMoveOrDown = true; - mVelocityTracker.clear(); - onMoveStart(); - mDraggingStartY = mActivity.getWindow().getAttributes().y; - mOffsetY = mDraggingStartY - y; - mLastPosY = y; - mStopShowingSpinner = false; - } else { - mVelocityTracker.addMovement(event); - updateWindowPos((int) (y + mOffsetY)); - } - mDeltaY = y - mLastPosY; - mLastPosY = y; - return true; - case MotionEvent.ACTION_UP: - case MotionEvent.ACTION_CANCEL: - if (mSeenFirstMoveOrDown) { - mVelocityTracker.computeCurrentVelocity(FLING_VELOCITY_PIXELS_PER_MS); - float v = Math.abs(mVelocityTracker.getYVelocity()); - int flingDist = Math.abs(v) < FLING_THRESHOLD_PX ? 0 : getFlingDistance(v); - int direction = (int) Math.signum(mDeltaY); - if (!handleAnimation(flingDist * direction)) mCloseHandler.run(); - mSeenFirstMoveOrDown = false; - } - return true; - default: - return true; - } - } - - @Override - public void setCloseClickHandler(Runnable handler) { - mCloseHandler = handler; - } - - @Override - public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { - // Always intercept scroll events. - return true; - } - - /** - * Gets the distance of a fling based on the velocity and the base animation time. This - * formula assumes the deceleration curve is quadratic (t^2), hence the displacement formula - * should be: displacement = initialVelocity * duration / 2. - * @param velocity The velocity of the fling. - * @return The distance the fling would cover. - */ - private int getFlingDistance(float velocity) { - // This includes conversion from seconds to ms. - return (int) (velocity * BASE_ANIMATION_DURATION_MS / 2000f); - } - - private boolean handleAnimation(int flingDistance) { - int currentY = mActivity.getWindow().getAttributes().y; - int finalY = currentY + flingDistance; - int topY = getFullyExpandedYWithAdjustment(); - int initialY = initialY(); - int bottomY = mDisplayHeight - mNavbarHeight; - - int start = 0; - int end = 0; - boolean playAnimation = true; - - if (finalY == initialY) return false; - - if (finalY < initialY) { // Move up - if (Math.abs(topY - finalY) < Math.abs(finalY - initialY)) { - start = currentY; - end = topY; - mTargetStatus = HeightStatus.TOP; - } else { - start = currentY; - end = initialY; - mTargetStatus = HeightStatus.INITIAL_HEIGHT; - } - } else { // Move down - // Prevents skipping initial state when swiping from the top. - if (mStatus == HeightStatus.TOP) finalY = Math.min(initialY, finalY); - - if (Math.abs(initialY - finalY) < Math.abs(finalY - bottomY)) { - start = currentY; - end = initialY; - mTargetStatus = HeightStatus.INITIAL_HEIGHT; - } else { - playAnimation = false; - } - } - if (playAnimation) { - mAnimator.setIntValues(start, end); - mStatus = HeightStatus.TRANSITION; - mAnimator.start(); - } - return playAnimation; - } - } - public PartialCustomTabHeightStrategy(Activity activity, @Px int initialHeight, Integer navigationBarColor, Integer navigationBarDividerColor, boolean isFixedHeight, OnResizedCallback onResizedCallback, ActivityLifecycleDispatcher lifecycleDispatcher) { @@ -338,6 +182,10 @@ mAnimator.setDuration(SCROLL_DURATION_MS); mAnimator.addListener(new AnimatorListenerAdapter() { @Override + public void onAnimationStart(Animator animation) { + mStatus = HeightStatus.TRANSITION; + } + @Override public void onAnimationEnd(Animator animation) { mStatus = mTargetStatus; onMoveEnd(); @@ -406,7 +254,6 @@ int start = mActivity.getWindow().getAttributes().y; int end = getFullyExpandedYWithAdjustment(); mAnimator.setIntValues(start, end); - mStatus = HeightStatus.TRANSITION; mTargetStatus = HeightStatus.TOP; mAnimator.start(); } @@ -477,11 +324,13 @@ mToolbarView = toolbar; mToolbarColor = toolbar.getBackground().getColor(); roundCorners(coordinatorView, toolbar, toolbarCornerRadius); - toolbar.setHandleStrategy(new PartialCustomTabHandleStrategy(mActivity)); + toolbar.setHandleStrategy(new PartialCustomTabHandleStrategy( + mActivity, this::isFullHeight, () -> mStatus, this)); updateDragBarVisibility(); } // ConfigurationChangedObserver implementation. + @Override public void onConfigurationChanged(Configuration newConfig) { boolean isInMultiWindow = MultiWindowUtils.getInstance().isInMultiWindowMode(mActivity); @@ -1013,6 +862,8 @@ return getFullyExpandedY() + mFullyExpandedAdjustmentHeight; } + // CustomTabHeightStrategy implementation + @Override public boolean changeBackgroundColorForResizing() { // Need to return true to keep the transparent background we set in the init step. @@ -1045,6 +896,58 @@ return !mWindowAboveNavbar && !isFullHeight(); } + // DragEventCallback implementation + + @Override + public void onDragStart(int y) { + onMoveStart(); + Window window = mActivity.getWindow(); + mDraggingStartY = window.getAttributes().y; + mOffsetY = mDraggingStartY - y; + mStopShowingSpinner = false; + } + + @Override + public void onDragMove(int y) { + updateWindowPos((int) (y + mOffsetY)); + } + + @Override + public boolean onDragEnd(int flingDistance) { + int currentY = mActivity.getWindow().getAttributes().y; + int finalY = currentY + flingDistance; + int topY = getFullyExpandedYWithAdjustment(); + int initialY = initialY(); + int bottomY = mDisplayHeight - mNavbarHeight; + int animateEndY = -1; + + if (finalY == initialY) return false; + + if (finalY < initialY) { // Move up + if (Math.abs(topY - finalY) < Math.abs(finalY - initialY)) { + mTargetStatus = HeightStatus.TOP; + animateEndY = topY; + } else { + mTargetStatus = HeightStatus.INITIAL_HEIGHT; + animateEndY = initialY; + } + } else { // Move down + // Prevents skipping initial state when swiping from the top. + if (mStatus == HeightStatus.TOP) finalY = Math.min(initialY, finalY); + + if (Math.abs(initialY - finalY) < Math.abs(finalY - bottomY)) { + mTargetStatus = HeightStatus.INITIAL_HEIGHT; + animateEndY = initialY; + } + } + + if (animateEndY < 0) return false; + + mAnimator.setIntValues(currentY, animateEndY); + mAnimator.start(); + return true; + } + @VisibleForTesting void setMockViewForTesting(LinearLayout navbar, ImageView spinnerView, CircularProgressDrawable spinner, View toolbar, View toolbarCoordinator) { @@ -1067,4 +970,11 @@ void setWindowAboveNavbarForTesting(boolean windowAboveNavbar) { mWindowAboveNavbar = windowAboveNavbar; } + + @VisibleForTesting + PartialCustomTabHandleStrategy createHandleStrategyForTesting() { + // Pass null for context because we don't depend on the GestureDetector inside as we invoke + // MotionEvents directly in the tests. + return new PartialCustomTabHandleStrategy(null, this::isFullHeight, () -> mStatus, this); + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstallService.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstallService.java index 214e3e8d..62015711 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstallService.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInstallService.java
@@ -15,7 +15,6 @@ import org.chromium.base.ContextUtils; import org.chromium.base.annotations.CalledByNative; import org.chromium.chrome.R; -import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.notifications.NotificationUmaTracker; import org.chromium.chrome.browser.notifications.NotificationWrapperBuilderFactory; import org.chromium.chrome.browser.notifications.channels.ChromeChannelDefinitions; @@ -81,9 +80,7 @@ Context context = ContextUtils.getApplicationContext(); String channelId; int preOPriority; - if (isCompleted - && ChromeFeatureList.isEnabled( - ChromeFeatureList.WEB_APK_INSTALL_COMPLETE_NOTIFICATION)) { + if (isCompleted) { channelId = ChromeChannelDefinitions.ChannelId.WEBAPPS; preOPriority = NotificationCompat.PRIORITY_HIGH; } else {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/javascript/CloseWatcherTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/javascript/CloseWatcherTest.java index 9a0707e6..038c4a0 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/javascript/CloseWatcherTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/javascript/CloseWatcherTest.java
@@ -26,8 +26,8 @@ * system back button. */ @RunWith(ChromeJUnit4ClassRunner.class) -@CommandLineFlags. -Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-experimental-web-platform-features"}) +@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, + "enable-experimental-web-platform-features", "enable-blink-features=CloseWatcher"}) public class CloseWatcherTest { @Rule public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule();
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategyTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategyTest.java index ee2737413..3c4b09c 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategyTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategyTest.java
@@ -14,6 +14,7 @@ import static org.mockito.ArgumentMatchers.anyObject; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.eq; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -64,7 +65,6 @@ import org.chromium.base.ContextUtils; import org.chromium.base.test.util.MetricsUtils.HistogramDelta; import org.chromium.chrome.R; -import org.chromium.chrome.browser.customtabs.PartialCustomTabHeightStrategy.PartialCustomTabHandleStrategy; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; @@ -159,6 +159,8 @@ private Callback<Integer> mBottomInsetCallback = inset -> {}; private FrameLayout.LayoutParams mLayoutParams = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT); + private FrameLayout.LayoutParams mCoordinatorLayoutParams = new FrameLayout.LayoutParams( + FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT); @Before public void setUp() { @@ -192,7 +194,7 @@ when(mSpinnerView.animate()).thenReturn(mViewAnimator); when(mContentFrame.getLayoutParams()).thenReturn(mLayoutParams); when(mContentFrame.getHeight()).thenReturn(DEVICE_HEIGHT - NAVBAR_HEIGHT); - when(mCoordinatorLayout.getLayoutParams()).thenReturn(mLayoutParams); + when(mCoordinatorLayout.getLayoutParams()).thenReturn(mCoordinatorLayoutParams); mConfiguration.orientation = Configuration.ORIENTATION_PORTRAIT; @@ -364,10 +366,7 @@ assertEquals(1, mAttributeResults.size()); assertTabIsAtInitialPos(mAttributeResults.get(0)); - // Pass null because we have a mock Activity and we don't depend on the GestureDetector - // inside as we test MotionEvents directly. - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); // Drag to the top. assertTabIsFullHeight(dragTab(handleStrategy, 1500, 1000, 500)); @@ -388,8 +387,7 @@ assertTabIsAtInitialPos(mAttributeResults.get(0)); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); // Drag up slightly -> slide back to the initial height. assertTabIsAtInitialPos(dragTab(handleStrategy, 1500, 1450, 1400)); @@ -408,8 +406,7 @@ assertEquals(1, mAttributeResults.size()); assertTabIsAtInitialPos(mAttributeResults.get(0)); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); // Shake the tab from the initial position slightly -> back to the initial height. assertTabIsAtInitialPos(dragTab(handleStrategy, 1500, 1450, 1600)); @@ -421,8 +418,7 @@ mRealMetrics.widthPixels = DEVICE_HEIGHT; mRealMetrics.heightPixels = DEVICE_WIDTH; PartialCustomTabHeightStrategy strategy = createPcctAtHeight(800); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); assertMotionEventIgnored(handleStrategy); } @@ -430,19 +426,14 @@ public void moveUp_multiwindowModeUnresizable() { MultiWindowUtils.getInstance().setIsInMultiWindowModeForTesting(true); PartialCustomTabHeightStrategy strategy = createPcctAtHeight(800); - - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); - + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); assertMotionEventIgnored(handleStrategy); } @Test public void rotateToLandescapeUnresizable() { PartialCustomTabHeightStrategy strategy = createPcctAtHeight(800); - - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); mConfiguration.orientation = Configuration.ORIENTATION_LANDSCAPE; strategy.onConfigurationChanged(mConfiguration); @@ -491,9 +482,7 @@ @Test public void enterMultiwindowModeUnresizable() { PartialCustomTabHeightStrategy strategy = createPcctAtHeight(800); - - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); MultiWindowUtils.getInstance().setIsInMultiWindowModeForTesting(true); strategy.onConfigurationChanged(mConfiguration); @@ -508,8 +497,7 @@ assertEquals(1, mAttributeResults.size()); assertTabIsAtInitialPos(mAttributeResults.get(0)); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); final boolean[] closed = {false}; handleStrategy.setCloseClickHandler(() -> closed[0] = true); @@ -529,8 +517,7 @@ when(mSpinnerView.getVisibility()).thenReturn(View.GONE); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); long timestamp = SystemClock.uptimeMillis(); actionDown(handleStrategy, timestamp, 1500); @@ -568,8 +555,7 @@ when(mSpinnerView.getVisibility()).thenReturn(View.GONE); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); long timestamp = SystemClock.uptimeMillis(); actionDown(handleStrategy, timestamp, 1500); @@ -603,8 +589,7 @@ when(mSpinnerView.getVisibility()).thenReturn(View.GONE); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); long timestamp = SystemClock.uptimeMillis(); actionDown(handleStrategy, timestamp, INITIAL_HEIGHT - 100); @@ -633,8 +618,7 @@ PartialCustomTabHeightStrategy strategy = createPcctAtHeight(500); when(mSpinnerView.getVisibility()).thenReturn(View.GONE); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); long timestamp = SystemClock.uptimeMillis(); actionDown(handleStrategy, timestamp, INITIAL_HEIGHT - 100); @@ -676,8 +660,7 @@ assertEquals(1, mAttributeResults.size()); assertTabIsAtInitialPos(mAttributeResults.get(0)); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); long timestamp = SystemClock.uptimeMillis(); @@ -695,8 +678,7 @@ assertEquals(1, mAttributeResults.size()); assertTabIsAtInitialPos(mAttributeResults.get(0)); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); // Try to drag down and check that it returns to the initial height. assertTabIsAtInitialPos(dragTab(handleStrategy, 1500, 1550, 1600)); @@ -710,8 +692,7 @@ assertEquals(1, mAttributeResults.size()); assertTabIsAtInitialPos(mAttributeResults.get(0)); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); final boolean[] closed = {false}; handleStrategy.setCloseClickHandler(() -> closed[0] = true); @@ -739,8 +720,7 @@ "mAttributeResults should have exactly 1 element.", 1, mAttributeResults.size()); assertTabIsAtInitialPos(mAttributeResults.get(0)); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); int expected = PartialCustomTabHeightStrategy.ResizeType.EXPANSION; HistogramDelta histogramExpansion = new HistogramDelta("CustomTabs.ResizeType", expected); @@ -762,8 +742,7 @@ "mAttributeResults should have exactly 1 element.", 1, mAttributeResults.size()); assertTabIsAtInitialPos(mAttributeResults.get(0)); - PartialCustomTabHandleStrategy handleStrategy = - strategy.new PartialCustomTabHandleStrategy(null); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); // Drag to the top so it can be minimized in the next step. assertTabIsFullHeight(dragTab(handleStrategy, 1500, 1000, 0)); @@ -780,6 +759,30 @@ histogramMinimization.getDelta()); } + @Test + public void callbackWhenResized() { + PartialCustomTabHeightStrategy strategy = createPcctAtHeight(500); + assertTabIsAtInitialPos(mAttributeResults.get(0)); + PartialCustomTabHandleStrategy handleStrategy = strategy.createHandleStrategyForTesting(); + + // Slide back to the initial height -> no resize happens. + assertTabIsAtInitialPos(dragTab(handleStrategy, 1500, 1450, 1400)); + verify(mOnResizedCallback, never()).onResized(anyInt()); + + // Drag to the top -> resized. + assertTabIsFullHeight(dragTab(handleStrategy, 1500, 1000, 500)); + verify(mOnResizedCallback).onResized(eq(FULL_HEIGHT)); + clearInvocations(mOnResizedCallback); + + // Slide back to the top -> no resize happens. + assertTabIsFullHeight(dragTab(handleStrategy, 50, 100, 150)); + verify(mOnResizedCallback, never()).onResized(anyInt()); + + // Drag to the initial height -> resized. + assertTabIsAtInitialPos(dragTab(handleStrategy, 50, 650, 1300)); + verify(mOnResizedCallback).onResized(eq(INITIAL_HEIGHT)); + } + private void verifyWindowFlagsSet() { verify(mWindow).addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL); verify(mWindow).clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInstallNotificationTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInstallNotificationTest.java index e49ecf9..5aa15937 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInstallNotificationTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInstallNotificationTest.java
@@ -22,7 +22,6 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.rules.TestRule; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @@ -33,9 +32,7 @@ import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.JniMocker; import org.chromium.chrome.R; -import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.notifications.channels.ChromeChannelDefinitions; -import org.chromium.chrome.test.util.browser.Features; import org.chromium.components.url_formatter.SchemeDisplay; import org.chromium.components.url_formatter.UrlFormatter; import org.chromium.components.url_formatter.UrlFormatterJni; @@ -46,7 +43,6 @@ */ @RunWith(BaseRobolectricTestRunner.class) @Config(shadows = {ShadowNotificationManager.class}) -@Features.EnableFeatures({ChromeFeatureList.WEB_APK_INSTALL_COMPLETE_NOTIFICATION}) public class WebApkInstallNotificationTest { private static final String PACKAGE_NAME = "org.chromium.webapk.for.testing"; private static final String MANIFEST_URL = "https://test.com/manifest.json"; @@ -56,9 +52,6 @@ @Rule public JniMocker mJniMocker = new JniMocker(); - @Rule - public TestRule mProcessor = new Features.JUnitProcessor(); - @Mock private UrlFormatter.Natives mUrlFormatterJniMock;
diff --git a/chrome/app/chrome_command_ids.h b/chrome/app/chrome_command_ids.h index 033477d8..c8ae729 100644 --- a/chrome/app/chrome_command_ids.h +++ b/chrome/app/chrome_command_ids.h
@@ -384,6 +384,8 @@ #define IDC_BOOKMARK_BAR_SHOW_APPS_SHORTCUT 51014 #define IDC_BOOKMARK_BAR_SHOW_READING_LIST 51015 #define IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS 51016 +#define IDC_BOOKMARK_BAR_TRACK_PRICE_FOR_SHOPPING_BOOKMARK 51017 +#define IDC_BOOKMARK_BAR_UNTRACK_PRICE_FOR_SHOPPING_BOOKMARK 51018 // Context menu items for Sharing #define IDC_CONTENT_CONTEXT_SHARING_CLICK_TO_CALL_SINGLE_DEVICE 51030 #define IDC_CONTENT_CONTEXT_SHARING_CLICK_TO_CALL_MULTIPLE_DEVICES 51031
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index b8a72bc..a4faddf 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp
@@ -2668,6 +2668,18 @@ </if> <!-- Network portal notification --> + <message name="IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED" desc="Title for the new system notification that current wired network is behind captive portal"> + Network Found + </message> + <message name="IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI" desc="Title for the new system notification that current Wi-Fi network is behind captive portal"> + WiFi Network Found + </message> + <message name="IDS_NEW_PORTAL_DETECTION_NOTIFICATION_MESSAGE" desc="Body of the new system notification that current wired network is behind captive portal"> + Sign in to "<ph name="NETWORK_ID">$1<ex>Public Network</ex></ph>" + </message> + <message name="IDS_NEW_PORTAL_DETECTION_NOTIFICATION_BUTTON" desc="The text to display on the button when the user needs to sign in to the captive portal"> + Sign in + </message> <message name="IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED" desc="Title for the system notification that current wired network is behind captive portal"> Connect to network </message>
diff --git a/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_BUTTON.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_BUTTON.png.sha1 new file mode 100644 index 0000000..bec51adb --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_BUTTON.png.sha1
@@ -0,0 +1 @@ +b4211ad26d33132841d40488bd3244c5886687df \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_MESSAGE.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_MESSAGE.png.sha1 new file mode 100644 index 0000000..bec51adb --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_MESSAGE.png.sha1
@@ -0,0 +1 @@ +b4211ad26d33132841d40488bd3244c5886687df \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI.png.sha1 new file mode 100644 index 0000000..bec51adb --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI.png.sha1
@@ -0,0 +1 @@ +b4211ad26d33132841d40488bd3244c5886687df \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED.png.sha1 new file mode 100644 index 0000000..f1272fe --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED.png.sha1
@@ -0,0 +1 @@ +f65809e40aed8a42d46676ffaf573186b62ea8cc \ No newline at end of file
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index f29b725e..cbb1fcb 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -13569,6 +13569,12 @@ Check the site and try changing your password. </message> </if> + <!-- High Efficiency Chip strings --> + <if expr="not is_android"> + <message name="IDS_HIGH_EFFICIENCY_CHIP_ACCNAME" desc="Tooltip text for a page action chip that highlights that the Memory Saver setting is enabled"> + Memory Saver is on + </message> + </if> </messages> </release> </grit>
diff --git a/chrome/app/generated_resources_grd/IDS_HIGH_EFFICIENCY_CHIP_ACCNAME.png.sha1 b/chrome/app/generated_resources_grd/IDS_HIGH_EFFICIENCY_CHIP_ACCNAME.png.sha1 new file mode 100644 index 0000000..891dca8 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_HIGH_EFFICIENCY_CHIP_ACCNAME.png.sha1
@@ -0,0 +1 @@ +7b664172c49a151a01b94d0d1bba12567d4e139a \ No newline at end of file
diff --git a/chrome/app/vector_icons/BUILD.gn b/chrome/app/vector_icons/BUILD.gn index 483c557..1a45c58 100644 --- a/chrome/app/vector_icons/BUILD.gn +++ b/chrome/app/vector_icons/BUILD.gn
@@ -61,6 +61,7 @@ "hardware_computer.icon", "hardware_computer_small.icon", "hardware_smartphone.icon", + "high_efficiency.icon", "horizontal_menu.icon", "incognito.icon", "incognito_menu_art.icon",
diff --git a/chrome/app/vector_icons/high_efficiency.icon b/chrome/app/vector_icons/high_efficiency.icon new file mode 100644 index 0000000..4e4a0a55 --- /dev/null +++ b/chrome/app/vector_icons/high_efficiency.icon
@@ -0,0 +1,23 @@ +// Copyright 2022 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. + +CANVAS_DIMENSIONS, 24, +MOVE_TO, 20.38f, 8.57f, +R_LINE_TO, -1.23f, 1.85f, +R_ARC_TO, 8, 8, 0, 0, 1, -0.22f, 7.58f, +H_LINE_TO, 5.07f, +ARC_TO, 8, 8, 0, 0, 1, 15.58f, 6.85f, +R_LINE_TO, 1.85f, -1.23f, +ARC_TO, 10, 10, 0, 0, 0, 3.35f, 19, +R_ARC_TO, 2, 2, 0, 0, 0, 1.72f, 1, +R_H_LINE_TO, 13.85f, +R_ARC_TO, 2, 2, 0, 0, 0, 1.74f, -1, +R_ARC_TO, 10, 10, 0, 0, 0, -0.27f, -10.44f, +CLOSE, +R_MOVE_TO, -9.79f, 6.84f, +R_ARC_TO, 2, 2, 0, 0, 0, 2.83f, 0, +R_LINE_TO, 5.66f, -8.49f, +R_LINE_TO, -8.49f, 5.66f, +R_ARC_TO, 2, 2, 0, 0, 0, 0, 2.83f, +CLOSE
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index ab872aa..9879163c 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -5100,7 +5100,6 @@ "//ash/components/arc/enterprise", "//ash/components/arc/mojom", "//ash/components/arc/mojom", - "//ash/components/geolocation", "//ash/components/login/session", "//ash/components/settings", "//ash/components/timezone", @@ -5222,6 +5221,7 @@ "//chromeos/ash/components/dbus/userdataauth:userdataauth_proto", "//chromeos/ash/components/device_activity", "//chromeos/ash/components/feature_usage", + "//chromeos/ash/components/geolocation", "//chromeos/ash/components/install_attributes", "//chromeos/ash/components/local_search_service", "//chromeos/ash/components/local_search_service/public/cpp",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 03595af0..b5d98ad 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -3403,8 +3403,7 @@ #if defined(WEBRTC_USE_PIPEWIRE) {"enable-webrtc-pipewire-capturer", flag_descriptions::kWebrtcPipeWireCapturerName, - flag_descriptions::kWebrtcPipeWireCapturerDescription, - kOsLinux | kOsLacros, + flag_descriptions::kWebrtcPipeWireCapturerDescription, kOsLinux, FEATURE_VALUE_TYPE(features::kWebRtcPipeWireCapturer)}, #endif // defined(WEBRTC_USE_PIPEWIRE) #if BUILDFLAG(IS_CHROMEOS_ASH) @@ -3737,6 +3736,9 @@ flag_descriptions::kCellularUseSecondEuiccName, flag_descriptions::kCellularUseSecondEuiccDescription, kOsCrOS, FEATURE_VALUE_TYPE(chromeos::features::kCellularUseSecondEuicc)}, + {"cros-privacy-hub-dogfood", flag_descriptions::kCrosPrivacyHubDogfoodName, + flag_descriptions::kCrosPrivacyHubDogfoodDescription, kOsCrOS, + FEATURE_VALUE_TYPE(ash::features::kCrosPrivacyHubDogfood)}, {"cros-privacy-hub-future", flag_descriptions::kCrosPrivacyHubFutureName, flag_descriptions::kCrosPrivacyHubFutureDescription, kOsCrOS, FEATURE_VALUE_TYPE(ash::features::kCrosPrivacyHubFuture)}, @@ -4066,7 +4068,7 @@ autofill::switches::kWalletServiceUseSandbox, "0")}, {"enable-web-bluetooth", flag_descriptions::kWebBluetoothName, - flag_descriptions::kWebBluetoothDescription, kOsLinux | kOsLacros, + flag_descriptions::kWebBluetoothDescription, kOsLinux, FEATURE_VALUE_TYPE(features::kWebBluetooth)}, {"enable-web-bluetooth-new-permissions-backend", flag_descriptions::kWebBluetoothNewPermissionsBackendName, @@ -4121,8 +4123,7 @@ blink::switches::kDisableZeroCopy)}, {"enable-vulkan", flag_descriptions::kEnableVulkanName, flag_descriptions::kEnableVulkanDescription, - kOsWin | kOsLinux | kOsLacros | kOsAndroid, - FEATURE_VALUE_TYPE(features::kVulkan)}, + kOsWin | kOsLinux | kOsAndroid, FEATURE_VALUE_TYPE(features::kVulkan)}, #if BUILDFLAG(IS_ANDROID) {"translate-force-trigger-on-english", flag_descriptions::kTranslateForceTriggerOnEnglishName, @@ -4145,7 +4146,7 @@ {"enable-system-notifications", flag_descriptions::kNotificationsSystemFlagName, flag_descriptions::kNotificationsSystemFlagDescription, - kOsMac | kOsLinux | kOsLacros | kOsWin, + kOsMac | kOsLinux | kOsWin, FEATURE_VALUE_TYPE(features::kSystemNotifications)}, #endif // BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) && !BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_ANDROID) @@ -5863,7 +5864,7 @@ {"chrome-wide-echo-cancellation", flag_descriptions::kChromeWideEchoCancellationName, flag_descriptions::kChromeWideEchoCancellationDescription, - kOsMac | kOsWin | kOsLinux | kOsLacros, + kOsMac | kOsWin | kOsLinux, FEATURE_VALUE_TYPE(media::kChromeWideEchoCancellation)}, #endif // BUILDFLAG(CHROME_WIDE_ECHO_CANCELLATION) @@ -9322,6 +9323,10 @@ flag_descriptions::kSyncAccessHandleAllSyncSurfaceDescription, kOsAll, FEATURE_VALUE_TYPE(blink::features::kSyncAccessHandleAllSyncSurface)}, + {"webauthn-conditional-ui", flag_descriptions::kWebAuthnConditionalUIName, + flag_descriptions::kWebAuthnConditionalUIDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kWebAuthConditionalUI)}, + // NOTE: Adding a new flag requires adding a corresponding entry to enum // "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag // Histograms" in tools/metrics/histograms/README.md (run the
diff --git a/chrome/browser/accessibility/image_annotation_browsertest.cc b/chrome/browser/accessibility/image_annotation_browsertest.cc index 426c310..ecf0197 100644 --- a/chrome/browser/accessibility/image_annotation_browsertest.cc +++ b/chrome/browser/accessibility/image_annotation_browsertest.cc
@@ -40,6 +40,7 @@ #include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/ax_enum_util.h" #include "ui/accessibility/ax_enums.mojom.h" +#include "ui/accessibility/ax_node.h" #include "ui/accessibility/ax_tree.h" #include "url/gurl.h"
diff --git a/chrome/browser/ash/BUILD.gn b/chrome/browser/ash/BUILD.gn index 9b77b0b..9f82e5a0 100644 --- a/chrome/browser/ash/BUILD.gn +++ b/chrome/browser/ash/BUILD.gn
@@ -1520,7 +1520,6 @@ "//ash/components/arc/session", "//ash/components/arc/session:arc_base_enums", "//ash/components/arc/session:connection_holder", - "//ash/components/geolocation", "//ash/components/login/auth", "//ash/components/multidevice", "//ash/components/proximity_auth", @@ -1612,6 +1611,7 @@ "//chromeos/ash/components/drivefs/mojom", "//chromeos/ash/components/enhanced_network_tts/mojom", "//chromeos/ash/components/feature_usage", + "//chromeos/ash/components/geolocation", "//chromeos/ash/components/install_attributes", "//chromeos/ash/components/memory", "//chromeos/ash/components/network",
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_activity_registry_unittest.cc b/chrome/browser/ash/child_accounts/time_limits/app_activity_registry_unittest.cc index 8f5ef9d3..5046e254 100644 --- a/chrome/browser/ash/child_accounts/time_limits/app_activity_registry_unittest.cc +++ b/chrome/browser/ash/child_accounts/time_limits/app_activity_registry_unittest.cc
@@ -568,7 +568,7 @@ builder.SetUp(); builder.AppendToAllowlistAppList(kApp1); - AppTimeLimitsAllowlistPolicyWrapper wrapper(&builder.value()); + AppTimeLimitsAllowlistPolicyWrapper wrapper(&builder.dict()); registry().OnTimeLimitAllowlistChanged(wrapper); EXPECT_FALSE(registry_test().GetAppLimit(kApp1)); @@ -580,7 +580,7 @@ AppTimeLimitsAllowlistPolicyBuilder builder; builder.SetUp(); builder.AppendToAllowlistAppList(kApp1); - AppTimeLimitsAllowlistPolicyWrapper wrapper(&builder.value()); + AppTimeLimitsAllowlistPolicyWrapper wrapper(&builder.dict()); registry().OnTimeLimitAllowlistChanged(wrapper); // Set initial limit.
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_controller.cc b/chrome/browser/ash/child_accounts/time_limits/app_time_controller.cc index e82d9185..262d941 100644 --- a/chrome/browser/ash/child_accounts/time_limits/app_time_controller.cc +++ b/chrome/browser/ash/child_accounts/time_limits/app_time_controller.cc
@@ -358,11 +358,11 @@ const std::string& pref_name) { DCHECK_EQ(pref_name, prefs::kPerAppTimeLimitsAllowlistPolicy); - const base::Value* policy = pref_registrar_->prefs()->GetDictionary( + const base::Value::Dict& policy = pref_registrar_->prefs()->GetValueDict( prefs::kPerAppTimeLimitsAllowlistPolicy); // Figure out a way to avoid cloning - AppTimeLimitsAllowlistPolicyWrapper wrapper(policy); + AppTimeLimitsAllowlistPolicyWrapper wrapper(&policy); app_registry_->OnTimeLimitAllowlistChanged(wrapper); } @@ -403,15 +403,12 @@ if (IsWebAppOrExtension(app_id)) return; - const base::Value* allowlist_policy = pref_registrar_->prefs()->GetDictionary( - prefs::kPerAppTimeLimitsAllowlistPolicy); - if (allowlist_policy && allowlist_policy->is_dict()) { - AppTimeLimitsAllowlistPolicyWrapper wrapper(allowlist_policy); - if (base::Contains(wrapper.GetAllowlistAppList(), app_id)) - app_registry_->SetAppAllowlisted(app_id); - } else { - LOG(WARNING) << " Invalid PerAppTimeLimitAllowlist policy"; - } + const base::Value::Dict& allowlist_policy = + pref_registrar_->prefs()->GetValueDict( + prefs::kPerAppTimeLimitsAllowlistPolicy); + AppTimeLimitsAllowlistPolicyWrapper wrapper(&allowlist_policy); + if (base::Contains(wrapper.GetAllowlistAppList(), app_id)) + app_registry_->SetAppAllowlisted(app_id); const base::Value::Dict& policy = pref_registrar_->prefs()->GetValueDict(prefs::kPerAppTimeLimitsPolicy);
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_test_utils.cc b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_test_utils.cc index e1f9539..d4ee71f 100644 --- a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_test_utils.cc +++ b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_test_utils.cc
@@ -17,37 +17,26 @@ default; void AppTimeLimitsAllowlistPolicyBuilder::SetUp() { - value_ = base::Value(base::Value::Type::DICTIONARY); - value_.SetKey(policy::kUrlList, base::Value(base::Value::Type::LIST)); - value_.SetKey(policy::kAppList, base::Value(base::Value::Type::LIST)); -} - -void AppTimeLimitsAllowlistPolicyBuilder::Clear() { - base::DictionaryValue* dict_value; - value_.GetAsDictionary(&dict_value); - dict_value->DictClear(); -} - -void AppTimeLimitsAllowlistPolicyBuilder::AppendToAllowlistUrlList( - const std::string& scheme) { - AppendToList(policy::kUrlList, base::Value(scheme)); + dict_ = base::Value::Dict(); + dict_.Set(policy::kUrlList, base::Value::List()); + dict_.Set(policy::kAppList, base::Value::List()); } void AppTimeLimitsAllowlistPolicyBuilder::AppendToAllowlistAppList( const AppId& app_id) { - base::Value value_to_append(base::Value::Type::DICTIONARY); - value_to_append.SetKey(policy::kAppId, base::Value(app_id.app_id())); - value_to_append.SetKey( + base::Value::Dict dict_to_append; + dict_to_append.Set(policy::kAppId, base::Value(app_id.app_id())); + dict_to_append.Set( policy::kAppType, base::Value(policy::AppTypeToPolicyString(app_id.app_type()))); - AppendToList(policy::kAppList, std::move(value_to_append)); + AppendToList(policy::kAppList, std::move(dict_to_append)); } void AppTimeLimitsAllowlistPolicyBuilder::AppendToList(const std::string& key, - base::Value value) { - base::Value* list = value_.FindListKey(key); + base::Value::Dict dict) { + base::Value::List* list = dict_.FindList(key); DCHECK(list); - list->Append(std::move(value)); + list->Append(std::move(dict)); } } // namespace app_time
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_test_utils.h b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_test_utils.h index a662815..456039e 100644 --- a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_test_utils.h +++ b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_test_utils.h
@@ -25,16 +25,14 @@ const AppTimeLimitsAllowlistPolicyBuilder&) = delete; void SetUp(); - void Clear(); - void AppendToAllowlistUrlList(const std::string& scheme); void AppendToAllowlistAppList(const AppId& app_id); - const base::Value& value() const { return value_; } + const base::Value::Dict& dict() const { return dict_; } private: - void AppendToList(const std::string& key, base::Value value); + void AppendToList(const std::string& key, base::Value::Dict dict); - base::Value value_; + base::Value::Dict dict_; }; } // namespace app_time
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_wrapper.cc b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_wrapper.cc index 6baf7e9a..2f6b205 100644 --- a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_wrapper.cc +++ b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_wrapper.cc
@@ -13,45 +13,23 @@ namespace app_time { AppTimeLimitsAllowlistPolicyWrapper::AppTimeLimitsAllowlistPolicyWrapper( - const base::Value* value) - : value_(value) {} + const base::Value::Dict* dict) + : dict_(dict) {} AppTimeLimitsAllowlistPolicyWrapper::~AppTimeLimitsAllowlistPolicyWrapper() = default; -std::vector<std::string> -AppTimeLimitsAllowlistPolicyWrapper::GetAllowlistURLList() const { - std::vector<std::string> return_value; - - const base::Value* list = value_->FindListKey(policy::kUrlList); - if (!list) { - VLOG(1) << "Invalid allowlist URL list provided."; - return return_value; - } - - base::Value::ConstListView list_view = list->GetListDeprecated(); - for (const base::Value& value : list_view) { - if (!value.is_string()) { - VLOG(1) << "Allowlist URL is not a string."; - continue; - } - return_value.push_back(value.GetString()); - } - return return_value; -} - std::vector<AppId> AppTimeLimitsAllowlistPolicyWrapper::GetAllowlistAppList() const { std::vector<AppId> return_value; - const base::Value* app_list = value_->FindListKey(policy::kAppList); + const base::Value::List* app_list = dict_->FindList(policy::kAppList); if (!app_list) { VLOG(1) << "Invalid allowlist application list."; return return_value; } - base::Value::ConstListView list_view = app_list->GetListDeprecated(); - for (const base::Value& value : list_view) { + for (const base::Value& value : *app_list) { absl::optional<AppId> app_id = policy::AppIdFromDict(value); if (app_id) return_value.push_back(*app_id);
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_wrapper.h b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_wrapper.h index 915bd91..e2edc76 100644 --- a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_wrapper.h +++ b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_allowlist_policy_wrapper.h
@@ -17,7 +17,7 @@ class AppTimeLimitsAllowlistPolicyWrapper { public: - explicit AppTimeLimitsAllowlistPolicyWrapper(const base::Value* value); + explicit AppTimeLimitsAllowlistPolicyWrapper(const base::Value::Dict* dict); ~AppTimeLimitsAllowlistPolicyWrapper(); // Delete copy constructor and copy assign operator. @@ -26,11 +26,10 @@ AppTimeLimitsAllowlistPolicyWrapper& operator=( const AppTimeLimitsAllowlistPolicyWrapper&) = delete; - std::vector<std::string> GetAllowlistURLList() const; std::vector<AppId> GetAllowlistAppList() const; private: - const base::Value* value_; + const base::Value::Dict* dict_; }; } // namespace app_time
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/BUILD.gn b/chrome/browser/ash/login/oobe_quick_start/connectivity/BUILD.gn index 3b36445..b5da191 100644 --- a/chrome/browser/ash/login/oobe_quick_start/connectivity/BUILD.gn +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/BUILD.gn
@@ -8,6 +8,7 @@ source_set("connectivity") { deps = [ + ":decoder", "//base", "//components/cbor", "//crypto", @@ -37,6 +38,21 @@ ] } +source_set("decoder") { + sources = [ + "quick_start_decoder.cc", + "quick_start_decoder.h", + ] + + deps = [ + "//ash/services/nearby/public/mojom", + "//base", + "//components/cbor", + "//mojo/public/cpp/bindings", + "//sandbox/policy", + ] +} + source_set("test_support") { testonly = true public_deps = [ ":connectivity" ] @@ -51,16 +67,20 @@ testonly = true deps = [ ":connectivity", + ":decoder", + "//ash/services/nearby/public/mojom", "//base", "//base/test:test_support", "//chromeos/constants", "//components/cbor", "//device/bluetooth:mocks", + "//mojo/public/cpp/bindings", "//url", ] sources = [ "fast_pair_advertiser_unittest.cc", "incoming_connection_unittest.cc", + "quick_start_decoder_unittest.cc", "target_device_connection_broker_impl_unittest.cc", "target_fido_controller_unittest.cc", ]
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder.cc new file mode 100644 index 0000000..0a8b905d --- /dev/null +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder.cc
@@ -0,0 +1,162 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder.h" + +#include "ash/services/nearby/public/mojom/quick_start_decoder_types.mojom.h" +#include "base/callback.h" +#include "base/containers/fixed_flat_set.h" +#include "base/containers/flat_tree.h" +#include "base/logging.h" +#include "components/cbor/reader.h" +#include "components/cbor/values.h" +#include "sandbox/policy/sandbox.h" + +namespace ash::quick_start { + +namespace { + +using CBOR = cbor::Value; +using GetAssertionStatus = mojom::GetAssertionResponse::GetAssertionStatus; + +constexpr char kCredentialIdKey[] = "id"; +constexpr char kEntitiyIdMapKey[] = "id"; +constexpr uint8_t kCtapDeviceResponseSuccess = 0x00; +constexpr int kCborDecoderNoError = 0; +constexpr int kCborDecoderUnknownError = 14; +constexpr uint8_t kCtap2ErrInvalidCBOR = 0x12; + +std::pair<int, absl::optional<cbor::Value>> CborDecodeGetAssertionResponse( + base::span<const uint8_t> response) { + cbor::Reader::DecoderError error; + cbor::Reader::Config config; + + config.error_code_out = &error; + absl::optional<cbor::Value> cbor = cbor::Reader::Read(response, config); + if (!cbor) { + int converted_decode_error = static_cast<int>(error); + LOG(ERROR) << "Error CBOR decoding the response bytes: " + << cbor::Reader::ErrorCodeToString(error); + return std::make_pair(converted_decode_error, absl::nullopt); + } + return std::make_pair(kCborDecoderNoError, std::move(cbor)); +} + +mojom::GetAssertionResponsePtr ParseGetAssertionResponse( + cbor::Value decoded_response) { + const cbor::Value::MapValue& response_map = decoded_response.GetMap(); + // According to FIDO CTAP2 GetAssertionResponse, credential is stored at CBOR + // index 0x01. + auto credential_value_it = response_map.find(CBOR(0x01)); + std::string credential_id; + if (credential_value_it != response_map.end() && + credential_value_it->second.is_map()) { + const cbor::Value::MapValue& credential_value_map = + credential_value_it->second.GetMap(); + auto cid = credential_value_map.find(cbor::Value(kCredentialIdKey)); + if (cid != credential_value_map.end() && cid->second.is_bytestring()) { + credential_id = std::string(cid->second.GetBytestringAsString()); + } + } + + // According to FIDO CTAP2 GetAssertionResponse, authData is stored at CBOR + // index 0x02. + auto auth_data_value_it = response_map.find(CBOR(0x02)); + std::vector<uint8_t> auth_data; + if (auth_data_value_it != response_map.end() && + auth_data_value_it->second.is_bytestring()) { + auth_data = auth_data_value_it->second.GetBytestring(); + } + + // According to FIDO CTAP2 GetAssertionResponse, signature is stored at CBOR + // index 0x03. + auto signature_value_it = response_map.find(CBOR(0x03)); + std::vector<uint8_t> signature; + if (signature_value_it != response_map.end() && + signature_value_it->second.is_bytestring()) { + signature = signature_value_it->second.GetBytestring(); + } + + // According to FIDO CTAP2 GetAssertionResponse, user is stored at CBOR index + // 0x04. + auto user_value_it = response_map.find(CBOR(0x04)); + std::string email; + if (user_value_it != response_map.end() && user_value_it->second.is_map()) { + const cbor::Value::MapValue& user_value_map = + user_value_it->second.GetMap(); + auto uid = user_value_map.find(cbor::Value(kEntitiyIdMapKey)); + if (uid != user_value_map.end() && uid->second.is_bytestring()) { + email = std::string(uid->second.GetBytestringAsString()); + } + } + + return mojom::GetAssertionResponse::New( + /*status=*/GetAssertionStatus::kSuccess, + /*ctap_device_response_code=*/kCtapDeviceResponseSuccess, + /*cbor_decoder_error=*/kCborDecoderNoError, email, credential_id, + auth_data, signature); +} + +mojom::GetAssertionResponsePtr BuildGetAssertionResponseError( + GetAssertionStatus status, + uint8_t ctap_device_response_code, + int cbor_decoder_error) { + return mojom::GetAssertionResponse::New(status, ctap_device_response_code, + cbor_decoder_error, + /*email=*/"", /*credential_id=*/"", + /*auth_data=*/std::vector<uint8_t>{}, + /*signature=*/std::vector<uint8_t>{}); +} + +} // namespace + +QuickStartDecoder::QuickStartDecoder( + mojo::PendingReceiver<mojom::QuickStartDecoder> receiver) + : receiver_(this, std::move(receiver)) {} + +QuickStartDecoder::~QuickStartDecoder() = default; + +mojom::GetAssertionResponsePtr QuickStartDecoder::DoDecodeGetAssertionResponse( + const std::vector<uint8_t>& data) { + if (data.size() < 2) { + LOG(ERROR) << "GetAssertionResponse requires a status code byte and " + "response bytes. Data in size: " + << data.size(); + return BuildGetAssertionResponseError( + GetAssertionStatus::kCtapResponseError, kCtap2ErrInvalidCBOR, + kCborDecoderUnknownError); + } + uint8_t ctap_status = data[0]; + base::span<const uint8_t> cbor_bytes(data); + cbor_bytes = cbor_bytes.subspan(1); + if (ctap_status != kCtapDeviceResponseSuccess) { + LOG(ERROR) << "Ctap Device Response Status Code is not Success(0x00). Got: " + << ctap_status; + return BuildGetAssertionResponseError( + GetAssertionStatus::kCtapResponseError, ctap_status, + kCborDecoderUnknownError); + } + std::pair<int, absl::optional<cbor::Value>> decoded_values = + CborDecodeGetAssertionResponse(cbor_bytes); + if (decoded_values.first != kCborDecoderNoError) { + return BuildGetAssertionResponseError(GetAssertionStatus::kCborDecoderError, + ctap_status, decoded_values.first); + } + if (!decoded_values.second || !decoded_values.second->is_map()) { + LOG(ERROR) << "The CBOR decoded response values needs to be a valid CBOR " + "Value Map."; + return BuildGetAssertionResponseError(GetAssertionStatus::kUnknownError, + ctap_status, decoded_values.first); + } + return ParseGetAssertionResponse(std::move(decoded_values.second.value())); +} + +void QuickStartDecoder::DecodeGetAssertionResponse( + const std::vector<uint8_t>& data, + DecodeGetAssertionResponseCallback callback) { + DCHECK(sandbox::policy::Sandbox::IsProcessSandboxed()); + std::move(callback).Run(DoDecodeGetAssertionResponse(data)); +} + +} // namespace ash::quick_start
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder.h b/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder.h new file mode 100644 index 0000000..693d6fe --- /dev/null +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder.h
@@ -0,0 +1,44 @@ +// Copyright 2022 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. + +#ifndef CHROME_BROWSER_ASH_LOGIN_OOBE_QUICK_START_CONNECTIVITY_QUICK_START_DECODER_H_ +#define CHROME_BROWSER_ASH_LOGIN_OOBE_QUICK_START_CONNECTIVITY_QUICK_START_DECODER_H_ + +#include <vector> + +#include "ash/services/nearby/public/mojom/quick_start_decoder.mojom.h" +#include "ash/services/nearby/public/mojom/quick_start_decoder_types.mojom.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/receiver.h" + +namespace ash::quick_start { + +// QuickStartDecoder is a class on the utility process that will +// accept incoming raw bytes from an Android device, decode the +// bytes and parse them into secure structs that can be consumed +// by the browser process. +class QuickStartDecoder : public mojom::QuickStartDecoder { + public: + explicit QuickStartDecoder( + mojo::PendingReceiver<mojom::QuickStartDecoder> receiver); + QuickStartDecoder(const QuickStartDecoder&) = delete; + QuickStartDecoder& operator=(const QuickStartDecoder&) = delete; + ~QuickStartDecoder() override; + + // mojom::QuickStartDecoder; + void DecodeGetAssertionResponse( + const std::vector<uint8_t>& data, + DecodeGetAssertionResponseCallback callback) override; + + private: + friend class QuickStartDecoderTest; + mojom::GetAssertionResponsePtr DoDecodeGetAssertionResponse( + const std::vector<uint8_t>& data); + mojo::Receiver<mojom::QuickStartDecoder> receiver_; +}; + +} // namespace ash::quick_start + +#endif // CHROME_BROWSER_ASH_LOGIN_OOBE_QUICK_START_CONNECTIVITY_QUICK_START_DECODER_H_
diff --git a/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder_unittest.cc b/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder_unittest.cc new file mode 100644 index 0000000..8ab2a3c --- /dev/null +++ b/chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder_unittest.cc
@@ -0,0 +1,194 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ash/login/oobe_quick_start/connectivity/quick_start_decoder.h" + +#include "ash/services/nearby/public/mojom/quick_start_decoder_types.mojom.h" +#include "base/test/bind.h" +#include "base/test/task_environment.h" +#include "components/cbor/values.h" +#include "components/cbor/writer.h" +#include "mojo/public/cpp/bindings/remote.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash::quick_start { + +namespace { + +constexpr char kCredentialIdKey[] = "id"; +constexpr char kEntitiyIdMapKey[] = "id"; +constexpr uint8_t kSuccess = 0x00; +constexpr uint8_t kCtap2ErrInvalidCBOR = 0x12; +constexpr int kCborDecoderErrorInvalidUtf8 = 6; +constexpr int kCborDecoderNoError = 0; +constexpr int kCborDecoderUnknownError = 14; + +using GetAssertionStatus = mojom::GetAssertionResponse::GetAssertionStatus; + +std::vector<uint8_t> BuildEncodedResponseData( + std::vector<uint8_t> credential_id, + std::vector<uint8_t> auth_data, + std::vector<uint8_t> signature, + std::vector<uint8_t> user_id, + uint8_t status) { + cbor::Value::MapValue cbor_map; + cbor::Value::MapValue credential_map; + credential_map[cbor::Value(kCredentialIdKey)] = cbor::Value(credential_id); + cbor_map[cbor::Value(1)] = cbor::Value(credential_map); + cbor_map[cbor::Value(2)] = cbor::Value(auth_data); + cbor_map[cbor::Value(3)] = cbor::Value(signature); + cbor::Value::MapValue user_map; + user_map[cbor::Value(kEntitiyIdMapKey)] = cbor::Value(user_id); + cbor_map[cbor::Value(4)] = cbor::Value(user_map); + absl::optional<std::vector<uint8_t>> cbor_bytes = + cbor::Writer::Write(cbor::Value(std::move(cbor_map))); + DCHECK(cbor_bytes); + std::vector<uint8_t> response_bytes = std::move(*cbor_bytes); + // Add the status byte to the beginning of this now fully encoded cbor bytes + // vector. + response_bytes.insert(response_bytes.begin(), status); + return response_bytes; +} + +} // namespace + +class QuickStartDecoderTest : public testing::Test { + public: + QuickStartDecoderTest() { + decoder_ = std::make_unique<QuickStartDecoder>( + remote_.BindNewPipeAndPassReceiver()); + } + + mojom::GetAssertionResponsePtr DoDecodeGetAssertionResponse( + const std::vector<uint8_t>& data) { + return decoder_->DoDecodeGetAssertionResponse(data); + } + + QuickStartDecoder* decoder() const { return decoder_.get(); } + + protected: + base::test::SingleThreadTaskEnvironment task_environment_; + mojo::Remote<mojom::QuickStartDecoder> remote_; + std::unique_ptr<QuickStartDecoder> decoder_; +}; + +TEST_F(QuickStartDecoderTest, ConvertCtapDeviceResponseCodeTest_InRange) { + std::vector<uint8_t> credential_id = {0x01, 0x02, 0x03}; + std::vector<uint8_t> auth_data = {}; + std::vector<uint8_t> signature = {}; + std::vector<uint8_t> user_id = {}; + // kCtap2ErrActionTimeout + uint8_t status_code = 0x3A; + std::vector<uint8_t> data = BuildEncodedResponseData( + credential_id, auth_data, signature, user_id, status_code); + mojom::GetAssertionResponsePtr response = + DoDecodeGetAssertionResponse(std::move(data)); + EXPECT_EQ(response->ctap_device_response_code, status_code); + EXPECT_EQ(response->status, GetAssertionStatus::kCtapResponseError); + EXPECT_TRUE(response->credential_id.empty()); +} + +TEST_F(QuickStartDecoderTest, ConvertCtapDeviceRespnoseCodeTest_OutOfRange) { + std::vector<uint8_t> credential_id = {0x01, 0x02, 0x03}; + std::vector<uint8_t> auth_data = {}; + std::vector<uint8_t> signature = {}; + std::vector<uint8_t> user_id = {}; + // Unmapped error byte + uint8_t status_code = 0x07; + std::vector<uint8_t> data = BuildEncodedResponseData( + credential_id, auth_data, signature, user_id, status_code); + mojom::GetAssertionResponsePtr response = + DoDecodeGetAssertionResponse(std::move(data)); + EXPECT_EQ(response->ctap_device_response_code, status_code); + EXPECT_EQ(response->status, GetAssertionStatus::kCtapResponseError); + EXPECT_TRUE(response->credential_id.empty()); +} + +TEST_F(QuickStartDecoderTest, CborDecodeGetAssertionResponse_DecoderError) { + // UTF-8 validation should not stop at the first NUL character in the string. + // That is, a string with an invalid byte sequence should fail UTF-8 + // validation even if the invalid character is located after one or more NUL + // characters. Here, 0xA6 is an unexpected continuation byte. + + // Include 0x00 as first byte for kSuccess CtapDeviceResponse status. + std::vector<uint8_t> data = {0x00, 0x63, 0x00, 0x00, 0xA6}; + int expected = kCborDecoderErrorInvalidUtf8; + mojom::GetAssertionResponsePtr response = + DoDecodeGetAssertionResponse(std::move(data)); + EXPECT_EQ(response->cbor_decoder_error, expected); + EXPECT_EQ(response->status, GetAssertionStatus::kCborDecoderError); + EXPECT_TRUE(response->credential_id.empty()); +} + +TEST_F(QuickStartDecoderTest, DecodeGetAssertionResponse_EmptyResponse) { + std::vector<uint8_t> data{}; + uint8_t expected_device_response_code = kCtap2ErrInvalidCBOR; + int expected_decoder_error = kCborDecoderUnknownError; + mojom::GetAssertionResponsePtr response = + DoDecodeGetAssertionResponse(std::move(data)); + EXPECT_EQ(response->ctap_device_response_code, expected_device_response_code); + EXPECT_EQ(response->cbor_decoder_error, expected_decoder_error); + EXPECT_EQ(response->status, GetAssertionStatus::kCtapResponseError); + EXPECT_TRUE(response->credential_id.empty()); +} + +TEST_F(QuickStartDecoderTest, DecodeGetAssertionResponse_OnlyStatusCode) { + std::vector<uint8_t> data{0x00}; + uint8_t expected_device_response_code = kCtap2ErrInvalidCBOR; + int expected_decoder_error = kCborDecoderUnknownError; + mojom::GetAssertionResponsePtr response = + DoDecodeGetAssertionResponse(std::move(data)); + EXPECT_EQ(response->ctap_device_response_code, expected_device_response_code); + EXPECT_EQ(response->cbor_decoder_error, expected_decoder_error); + EXPECT_EQ(response->status, GetAssertionStatus::kCtapResponseError); + EXPECT_TRUE(response->credential_id.empty()); +} + +TEST_F(QuickStartDecoderTest, DecodeGetAssertionResponse_Valid) { + std::vector<uint8_t> credential_id = {0x01, 0x02, 0x03}; + std::string expected_credential_id(credential_id.begin(), + credential_id.end()); + std::vector<uint8_t> auth_data = {0x02, 0x03, 0x04}; + std::vector<uint8_t> signature = {0x03, 0x04, 0x05}; + std::string email = "testcase@google.com"; + std::vector<uint8_t> user_id(email.begin(), email.end()); + // kSuccess + uint8_t status = kSuccess; + std::vector<uint8_t> data = BuildEncodedResponseData( + credential_id, auth_data, signature, user_id, status); + mojom::GetAssertionResponsePtr response = + DoDecodeGetAssertionResponse(std::move(data)); + EXPECT_EQ(response->ctap_device_response_code, kSuccess); + EXPECT_EQ(response->cbor_decoder_error, kCborDecoderNoError); + EXPECT_EQ(response->status, GetAssertionStatus::kSuccess); + EXPECT_EQ(response->credential_id, expected_credential_id); + EXPECT_EQ(response->email, email); + EXPECT_EQ(response->auth_data, auth_data); + EXPECT_EQ(response->signature, signature); +} + +TEST_F(QuickStartDecoderTest, DecodeGetAssertionResponse_ValidEmptyValues) { + std::vector<uint8_t> credential_id = {}; + std::string expected_credential_id(credential_id.begin(), + credential_id.end()); + std::vector<uint8_t> auth_data = {0x02, 0x03, 0x04}; + std::vector<uint8_t> signature = {0x03, 0x04, 0x05}; + std::string email = ""; + std::vector<uint8_t> user_id(email.begin(), email.end()); + // kSuccess + uint8_t status = kSuccess; + std::vector<uint8_t> data = BuildEncodedResponseData( + credential_id, auth_data, signature, user_id, status); + mojom::GetAssertionResponsePtr response = + DoDecodeGetAssertionResponse(std::move(data)); + EXPECT_EQ(response->ctap_device_response_code, kSuccess); + EXPECT_EQ(response->cbor_decoder_error, kCborDecoderNoError); + EXPECT_EQ(response->status, GetAssertionStatus::kSuccess); + EXPECT_EQ(response->credential_id, expected_credential_id); + EXPECT_EQ(response->email, email); + EXPECT_EQ(response->auth_data, auth_data); + EXPECT_EQ(response->signature, signature); +} + +} // namespace ash::quick_start
diff --git a/chrome/browser/ash/login/wizard_controller.cc b/chrome/browser/ash/login/wizard_controller.cc index 21dd0dd..fc11a9ff 100644 --- a/chrome/browser/ash/login/wizard_controller.cc +++ b/chrome/browser/ash/login/wizard_controller.cc
@@ -17,7 +17,6 @@ #include "ash/components/arc/arc_prefs.h" #include "ash/components/arc/arc_util.h" #include "ash/components/arc/session/arc_bridge_service.h" -#include "ash/components/geolocation/simple_geolocation_provider.h" #include "ash/components/settings/cros_settings_names.h" #include "ash/components/settings/cros_settings_provider.h" #include "ash/components/settings/timezone_settings.h" @@ -189,6 +188,7 @@ #include "chromeos/ash/components/audio/cras_audio_handler.h" #include "chromeos/ash/components/dbus/session_manager/session_manager_client.h" #include "chromeos/ash/components/dbus/update_engine/update_engine_client.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" #include "chromeos/ash/components/network/network_handler.h" #include "chromeos/ash/components/network/network_handler_callbacks.h" #include "chromeos/ash/components/network/network_state.h"
diff --git a/chrome/browser/ash/login/wizard_controller_browsertest.cc b/chrome/browser/ash/login/wizard_controller_browsertest.cc index 18a6e19..96cf4b2 100644 --- a/chrome/browser/ash/login/wizard_controller_browsertest.cc +++ b/chrome/browser/ash/login/wizard_controller_browsertest.cc
@@ -4,7 +4,6 @@ #include "chrome/browser/ash/login/wizard_controller.h" -#include "ash/components/geolocation/simple_geolocation_provider.h" #include "ash/components/settings/timezone_settings.h" #include "ash/components/timezone/timezone_request.h" #include "ash/constants/ash_features.h" @@ -92,6 +91,7 @@ #include "chromeos/ash/components/dbus/shill/fake_shill_manager_client.h" #include "chromeos/ash/components/dbus/system_clock/system_clock_client.h" #include "chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" #include "chromeos/ash/components/install_attributes/stub_install_attributes.h" #include "chromeos/ash/components/network/network_state.h" #include "chromeos/ash/components/network/network_state_handler.h"
diff --git a/chrome/browser/ash/night_light/night_light_client.h b/chrome/browser/ash/night_light/night_light_client.h index ae52f37..d0aa469 100644 --- a/chrome/browser/ash/night_light/night_light_client.h +++ b/chrome/browser/ash/night_light/night_light_client.h
@@ -8,12 +8,12 @@ #include <memory> #include <string> -#include "ash/components/geolocation/simple_geolocation_provider.h" #include "ash/components/settings/timezone_settings.h" #include "ash/public/cpp/night_light_controller.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" namespace base { class Clock;
diff --git a/chrome/browser/ash/policy/reporting/metrics_reporting/audio/audio_events_observer_unittest.cc b/chrome/browser/ash/policy/reporting/metrics_reporting/audio/audio_events_observer_unittest.cc index 0bce4abef..3bdcfacb 100644 --- a/chrome/browser/ash/policy/reporting/metrics_reporting/audio/audio_events_observer_unittest.cc +++ b/chrome/browser/ash/policy/reporting/metrics_reporting/audio/audio_events_observer_unittest.cc
@@ -38,7 +38,7 @@ AudioEventsObserver audio_observer; test::TestEvent<MetricData> result_metric_data; - audio_observer.SetOnEventObservedCallback(result_metric_data.cb()); + audio_observer.SetOnEventObservedCallback(result_metric_data.repeating_cb()); audio_observer.SetReportingEnabled(true); ::ash::cros_healthd::FakeCrosHealthd::Get()
diff --git a/chrome/browser/ash/policy/reporting/metrics_reporting/usb/usb_events_observer_unittest.cc b/chrome/browser/ash/policy/reporting/metrics_reporting/usb/usb_events_observer_unittest.cc index 6a8cf821..7b3cab1e 100644 --- a/chrome/browser/ash/policy/reporting/metrics_reporting/usb/usb_events_observer_unittest.cc +++ b/chrome/browser/ash/policy/reporting/metrics_reporting/usb/usb_events_observer_unittest.cc
@@ -139,7 +139,7 @@ constexpr int kExpectedUsbTelemetrySize = 1; constexpr int kIndexOfUsbTelemetry = 0; - usb_observer.SetOnEventObservedCallback(result_metric_data.cb()); + usb_observer.SetOnEventObservedCallback(result_metric_data.repeating_cb()); usb_observer.SetReportingEnabled(true); ::ash::cros_healthd::FakeCrosHealthd::Get()->EmitUsbAddEventForTesting();
diff --git a/chrome/browser/bookmarks/bookmark_model_factory.cc b/chrome/browser/bookmarks/bookmark_model_factory.cc index 85b757a9..2899ffa 100644 --- a/chrome/browser/bookmarks/bookmark_model_factory.cc +++ b/chrome/browser/bookmarks/bookmark_model_factory.cc
@@ -8,11 +8,9 @@ #include "base/memory/singleton.h" #include "base/values.h" #include "build/build_config.h" -#include "build/chromeos_buildflags.h" #include "chrome/browser/bookmarks/chrome_bookmark_client.h" #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/profiles/profile_selections.h" #include "chrome/browser/sync/bookmark_sync_service_factory.h" #include "chrome/browser/ui/webui/bookmarks/bookmarks_ui.h" #include "chrome/browser/undo/bookmark_undo_service_factory.h" @@ -25,10 +23,6 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" -#if BUILDFLAG(IS_CHROMEOS_ASH) -#include "chrome/browser/ash/profiles/profile_helper.h" -#endif - namespace { using bookmarks::BookmarkModel; @@ -76,7 +70,7 @@ BookmarkModelFactory::BookmarkModelFactory() : ProfileKeyedServiceFactory( "BookmarkModel", - ProfileSelections::BuildRedirectedInIncognitoNonExperimental()) { + ProfileSelections::BuildRedirectedInIncognito()) { DependsOn(BookmarkUndoServiceFactory::GetInstance()); DependsOn(ManagedBookmarkServiceFactory::GetInstance()); DependsOn(BookmarkSyncServiceFactory::GetInstance()); @@ -87,13 +81,6 @@ KeyedService* BookmarkModelFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { -#if BUILDFLAG(IS_CHROMEOS_ASH) - // ChromeOS creates various profiles (login, lock screen...) that do - // not have/need access to bookmarks. - Profile* profile = Profile::FromBrowserContext(context); - if (!chromeos::ProfileHelper::IsRegularProfile(profile)) - return nullptr; -#endif return BuildBookmarkModel(context).release(); }
diff --git a/chrome/browser/browser_process_platform_part_ash.cc b/chrome/browser/browser_process_platform_part_ash.cc index 26fba0e8..118b164fe2 100644 --- a/chrome/browser/browser_process_platform_part_ash.cc +++ b/chrome/browser/browser_process_platform_part_ash.cc
@@ -9,7 +9,6 @@ #include "ash/components/arc/enterprise/arc_data_snapshotd_manager.h" #include "ash/components/arc/enterprise/snapshot_hours_policy_service.h" -#include "ash/components/geolocation/simple_geolocation_provider.h" #include "ash/components/timezone/timezone_resolver.h" #include "base/bind.h" #include "base/check_op.h" @@ -38,6 +37,7 @@ #include "chrome/common/chrome_switches.h" #include "chromeos/ash/components/account_manager/account_manager_factory.h" #include "chromeos/ash/components/dbus/debug_daemon/debug_daemon_client.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" #include "components/keep_alive_registry/keep_alive_types.h" #include "components/keep_alive_registry/scoped_keep_alive.h" #include "components/keyed_service/content/browser_context_keyed_service_shutdown_notifier_factory.h"
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index a49b735..523a1603 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc
@@ -118,6 +118,7 @@ #include "chrome/common/media/media_resource_provider.h" #include "chrome/common/net/net_resource_provider.h" #include "chrome/common/pref_names.h" +#include "chrome/common/printing/printing_init.h" #include "chrome/common/profiler/thread_profiler.h" #include "chrome/common/profiler/thread_profiler_configuration.h" #include "chrome/common/profiler/unwind_util.h" @@ -317,11 +318,6 @@ #include "printing/printed_document.h" #endif -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) && BUILDFLAG(IS_WIN) -#include "chrome/common/printing/printer_capabilities.h" -#include "printing/backend/win_helper.h" -#endif - #if BUILDFLAG(ENABLE_RLZ) #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h" #include "components/rlz/rlz_tracker.h" // nogncheck crbug.com/1125897 @@ -622,6 +618,10 @@ #endif g_browser_process->GetMetricsServicesManager()->UpdateUploadPermissions(true); + +#if BUILDFLAG(ENABLE_PROCESS_SINGLETON) + ChromeProcessSingleton::RegisterEarlySingletonFeature(); +#endif } void ChromeBrowserMainParts::RecordBrowserStartupTime() { @@ -1696,9 +1696,7 @@ } #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) && BUILDFLAG(IS_WIN) - printing::SetGetDisplayNameFunction(&printing::GetUserFriendlyName); -#endif + printing::InitializeProcessForPrinting(); HandleTestParameters(*base::CommandLine::ForCurrentProcess());
diff --git a/chrome/browser/chrome_process_singleton.cc b/chrome/browser/chrome_process_singleton.cc index b806bf4..a63ffd1 100644 --- a/chrome/browser/chrome_process_singleton.cc +++ b/chrome/browser/chrome_process_singleton.cc
@@ -6,12 +6,58 @@ #include <utility> +#include "build/build_config.h" #include "chrome/browser/headless/headless_mode_util.h" +#include "chrome/browser/metrics/chrome_metrics_service_accessor.h" #include "chrome/common/chrome_switches.h" +#if BUILDFLAG(IS_WIN) +#include "base/hash/hash.h" +#include "base/strings/utf_string_conversions.h" +#include "base/win/registry.h" +#include "chrome/common/channel_info.h" +#include "components/version_info/channel.h" +#endif + namespace { bool g_is_early_singleton_feature_ = false; ChromeProcessSingleton* g_chrome_process_singleton_ = nullptr; + +#if BUILDFLAG(IS_WIN) + +std::string GetMachineGUID() { + base::win::RegKey key; + std::wstring value; + if (key.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Cryptography", + KEY_QUERY_VALUE | KEY_WOW64_64KEY) != ERROR_SUCCESS || + key.ReadValue(L"MachineGuid", &value) != ERROR_SUCCESS || value.empty()) { + return std::string(); + } + + std::string machine_guid; + if (!base::WideToUTF8(value.c_str(), value.length(), &machine_guid)) + return std::string(); + return machine_guid; +} + +bool EnrollMachineInEarlySingletonFeature() { + // Run experiment on early channels only. + const version_info::Channel channel = chrome::GetChannel(); + if (channel != version_info::Channel::CANARY && + channel != version_info::Channel::DEV && + channel != version_info::Channel::UNKNOWN) { + return false; + } + + const std::string machine_guid = GetMachineGUID(); + if (machine_guid.empty()) + return false; + + // Enroll 50% of the population. + return base::Hash(machine_guid) % 2 == 0; +} +#endif // BUILDFLAG(IS_WIN) + } // namespace ChromeProcessSingleton::ChromeProcessSingleton( @@ -85,8 +131,16 @@ if (command_line.HasSwitch(switches::kEnableEarlyProcessSingleton)) g_is_early_singleton_feature_ = true; - // TODO(1340599): Set up a synthetic trial for the early process singleton - // experiment. +#if BUILDFLAG(IS_WIN) + if (!g_is_early_singleton_feature_) + g_is_early_singleton_feature_ = EnrollMachineInEarlySingletonFeature(); +#endif +} + +void ChromeProcessSingleton::RegisterEarlySingletonFeature() { + ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( + "EarlyProcessSingleton", + g_is_early_singleton_feature_ ? "Enabled" : "Disabled"); } // static
diff --git a/chrome/browser/chrome_process_singleton.h b/chrome/browser/chrome_process_singleton.h index 8933b39e..afacc1a0 100644 --- a/chrome/browser/chrome_process_singleton.h +++ b/chrome/browser/chrome_process_singleton.h
@@ -72,6 +72,7 @@ // Setup the experiment for the early process singleton. Remove this code // when the experiment is over (http://www.crbug.com/1340599). static void SetupEarlySingletonFeature(const base::CommandLine& command_line); + static void RegisterEarlySingletonFeature(); static bool IsEarlySingletonFeatureEnabled(); private:
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index 0e9cd485..5bd20553 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -89,7 +89,6 @@ "//ash/components/arc/media_session", "//ash/components/arc/mojom", "//ash/components/fwupd", - "//ash/components/geolocation", "//ash/components/hid_detection:hid_detection", "//ash/components/login/auth", "//ash/components/login/session", @@ -321,6 +320,7 @@ "//chromeos/ash/components/drivefs/mojom", "//chromeos/ash/components/enhanced_network_tts/mojom", "//chromeos/ash/components/feature_usage", + "//chromeos/ash/components/geolocation", "//chromeos/ash/components/hibernate:buildflags", "//chromeos/ash/components/install_attributes", "//chromeos/ash/components/language/language_packs",
diff --git a/chrome/browser/extensions/api/autofill_private/autofill_util.cc b/chrome/browser/extensions/api/autofill_private/autofill_util.cc index 3244c83e..cee78f3f 100644 --- a/chrome/browser/extensions/api/autofill_private/autofill_util.cc +++ b/chrome/browser/extensions/api/autofill_private/autofill_util.cc
@@ -130,6 +130,31 @@ return entry; } +std::string CardNetworkToIconResourceIdString(const std::string& network) { + if (network == autofill::kAmericanExpressCard) + return "chrome://theme/IDR_AUTOFILL_CC_AMEX"; + if (network == autofill::kDinersCard) + return "chrome://theme/IDR_AUTOFILL_CC_DINERS"; + if (network == autofill::kDiscoverCard) + return "chrome://theme/IDR_AUTOFILL_CC_DISCOVER"; + if (network == autofill::kEloCard) + return "chrome://theme/IDR_AUTOFILL_CC_ELO"; + if (network == autofill::kJCBCard) + return "chrome://theme/IDR_AUTOFILL_CC_JCB"; + if (network == autofill::kMasterCard) + return "chrome://theme/IDR_AUTOFILL_CC_MASTERCARD"; + if (network == autofill::kMirCard) + return "chrome://theme/IDR_AUTOFILL_CC_MIR"; + if (network == autofill::kTroyCard) + return "chrome://theme/IDR_AUTOFILL_CC_TROY"; + if (network == autofill::kUnionPay) + return "chrome://theme/IDR_AUTOFILL_CC_UNIONPAY"; + if (network == autofill::kVisaCard) + return "chrome://theme/IDR_AUTOFILL_CC_VISA"; + + return "chrome://theme/IDR_AUTOFILL_CC_GENERIC"; +} + autofill_private::CreditCardEntry CreditCardToCreditCardEntry( const autofill::CreditCard& credit_card, const autofill::PersonalDataManager& personal_data) { @@ -154,6 +179,8 @@ card.nickname = std::make_unique<std::string>( base::UTF16ToUTF8(credit_card.nickname())); } + card.image_src = std::make_unique<std::string>( + CardNetworkToIconResourceIdString(credit_card.network())); // Create card metadata and add it to |card|. std::unique_ptr<autofill_private::AutofillMetadata> metadata(
diff --git a/chrome/browser/extensions/background_xhr_browsertest.cc b/chrome/browser/extensions/background_xhr_browsertest.cc index 9d3ab93b..c073c74 100644 --- a/chrome/browser/extensions/background_xhr_browsertest.cc +++ b/chrome/browser/extensions/background_xhr_browsertest.cc
@@ -19,6 +19,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/ui_test_utils.h" +#include "components/network_session_configurator/common/network_switches.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/storage_partition.h" @@ -35,14 +36,13 @@ #include "net/ssl/client_cert_store.h" #include "net/ssl/ssl_server_config.h" #include "net/test/embedded_test_server/embedded_test_server.h" +#include "services/network/public/cpp/network_switches.h" #include "url/gurl.h" namespace extensions { namespace { -constexpr const char kWebstoreDomain[] = "cws.com"; - std::unique_ptr<net::ClientCertStore> CreateNullCertStore() { return nullptr; } @@ -103,6 +103,9 @@ "test_http_auth.html", embedded_test_server()->GetURL("/auth-basic"))); } +constexpr char kWebstoreAppBaseURL[] = "https://chrome.google.com/"; +constexpr char kWebstorePath[] = "/webstore/mock_store.html"; + class BackgroundXhrWebstoreTest : public ExtensionApiTestWithManagementPolicy { public: BackgroundXhrWebstoreTest() = default; @@ -113,20 +116,31 @@ ~BackgroundXhrWebstoreTest() override = default; - void SetUpCommandLine(base::CommandLine* command_line) override { - ExtensionApiTest::SetUpCommandLine(command_line); - // TODO(devlin): For some reason, trying to fetch an HTTPS url in this test - // fails (even when using an HTTPS EmbeddedTestServer). For this reason, we - // need to fake the webstore URLs as http versions. - command_line->AppendSwitchASCII( - ::switches::kAppsGalleryURL, - base::StringPrintf("http://%s", kWebstoreDomain)); + void SetUp() override { + UseHttpsTestServer(); + // Add the extensions directory to the test server as it has a /webstore/ + // directory to serve files from, which the webstore hosted app requires as + // part of the URL it is associated with. + embedded_test_server()->ServeFilesFromSourceDirectory( + "chrome/test/data/extensions"); + ExtensionApiTestWithManagementPolicy::SetUp(); } - void SetUpOnMainThread() override { - ExtensionApiTest::SetUpOnMainThread(); - host_resolver()->AddRule("*", "127.0.0.1"); + void SetUpCommandLine(base::CommandLine* command_line) override { + // Note: we need to start the embedded test server here specifically as it + // needs to come after SetUp has been run in the superclass, but before we + // get the host port pair from it below in this function. ASSERT_TRUE(embedded_test_server()->Start()); + ExtensionApiTest::SetUpCommandLine(command_line); + // Ignore cert errors so the EmbeddedTestServer can serve up https URLs + // without needing to define a cert for each. + command_line->AppendSwitch(switches::kIgnoreCertificateErrors); + // Add a host resolver rule to map all outgoing requests to the test server. + // This allows us to use "real" hostnames and standard ports in URLs (i.e., + // without having to inject the port number into all URLs). + command_line->AppendSwitchASCII( + network::switches::kHostResolverRules, + "MAP * " + embedded_test_server()->host_port_pair().ToString()); } std::string ExecuteFetch(const Extension* extension, const GURL& url) { @@ -187,18 +201,16 @@ IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, XHRToWebstore) { const Extension* extension = LoadXhrExtension("<all_urls>"); - GURL webstore_launch_url = extension_urls::GetWebstoreLaunchURL(); - GURL webstore_url_to_fetch = embedded_test_server()->GetURL( - webstore_launch_url.host(), "/simple.html"); + GURL webstore_url_to_fetch = GURL(kWebstoreAppBaseURL).Resolve(kWebstorePath); EXPECT_EQ("ERROR: TypeError: Failed to fetch", ExecuteFetch(extension, webstore_url_to_fetch)); - // Sanity check: the extension should be able to fetch google.com. - GURL google_url = - embedded_test_server()->GetURL("google.com", "/simple.html"); + // Sanity check: the extension should be able to fetch the page if it's not on + // the webstore. + GURL google_url = GURL("https://google.com").Resolve(kWebstorePath); EXPECT_THAT(ExecuteFetch(extension, google_url), - ::testing::HasSubstr("<head><title>OK</title></head>")); + ::testing::HasSubstr("<body>blank</body>")); } // Extensions should not be able to XHR to the webstore regardless of policy. @@ -211,18 +223,16 @@ const Extension* extension = LoadXhrExtension("<all_urls>"); - GURL webstore_launch_url = extension_urls::GetWebstoreLaunchURL(); - GURL webstore_url_to_fetch = embedded_test_server()->GetURL( - webstore_launch_url.host(), "/simple.html"); + GURL webstore_url_to_fetch = GURL(kWebstoreAppBaseURL).Resolve(kWebstorePath); EXPECT_EQ("ERROR: TypeError: Failed to fetch", ExecuteFetch(extension, webstore_url_to_fetch)); - // Sanity check: the extension should be able to fetch google.com. - GURL google_url = - embedded_test_server()->GetURL("google.com", "/simple.html"); + // Sanity check: the extension should be able to fetch the page if it's not on + // the webstore. + GURL google_url = GURL("https://google.com").Resolve(kWebstorePath); EXPECT_THAT(ExecuteFetch(extension, google_url), - ::testing::HasSubstr("<head><title>OK</title></head>")); + ::testing::HasSubstr("<body>blank</body>")); } // Extensions should not be able to bypass same-origin despite declaring @@ -359,7 +369,7 @@ } IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, XHRAnyPortPermission) { - const Extension* extension = LoadXhrExtension("http://example.com:*/*"); + const Extension* extension = LoadXhrExtension("https://example.com:*/*"); GURL permitted_url_to_fetch = embedded_test_server()->GetURL("example.com", "/simple.html"); @@ -371,7 +381,7 @@ IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, XHRPortSpecificPermissionAllow) { const Extension* extension = LoadXhrExtension( - "http://example.com:" + + "https://example.com:" + base::NumberToString(embedded_test_server()->port()) + "/*"); GURL permitted_url_to_fetch = @@ -384,7 +394,7 @@ IN_PROC_BROWSER_TEST_F(BackgroundXhrWebstoreTest, XHRPortSpecificPermissionBlock) { const Extension* extension = LoadXhrExtension( - "http://example.com:" + + "https://example.com:" + base::NumberToString(embedded_test_server()->port() + 1) + "/*"); GURL not_permitted_url_to_fetch =
diff --git a/chrome/browser/extensions/chrome_extension_cookies.cc b/chrome/browser/extensions/chrome_extension_cookies.cc index e2214e0..5272444 100644 --- a/chrome/browser/extensions/chrome_extension_cookies.cc +++ b/chrome/browser/extensions/chrome_extension_cookies.cc
@@ -20,7 +20,7 @@ #include "content/public/browser/cookie_store_factory.h" #include "extensions/common/constants.h" #include "net/cookies/cookie_partition_key_collection.h" -#include "net/cookies/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/cookie_manager.h" #include "services/network/restricted_cookie_manager.h"
diff --git a/chrome/browser/extensions/chrome_extension_cookies.h b/chrome/browser/extensions/chrome_extension_cookies.h index 0f6cf247..a3d9db4 100644 --- a/chrome/browser/extensions/chrome_extension_cookies.h +++ b/chrome/browser/extensions/chrome_extension_cookies.h
@@ -17,7 +17,7 @@ #include "components/keyed_service/core/keyed_service.h" #include "mojo/public/cpp/bindings/unique_receiver_set.h" #include "net/cookies/cookie_store.h" -#include "net/cookies/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/cookie_settings.h" #include "services/network/public/mojom/cookie_manager.mojom-forward.h" #include "services/network/public/mojom/restricted_cookie_manager.mojom.h"
diff --git a/chrome/browser/extensions/extension_with_management_policy_apitest.cc b/chrome/browser/extensions/extension_with_management_policy_apitest.cc index 2a2e14cf..258c61e 100644 --- a/chrome/browser/extensions/extension_with_management_policy_apitest.cc +++ b/chrome/browser/extensions/extension_with_management_policy_apitest.cc
@@ -14,8 +14,7 @@ ExtensionApiTestWithManagementPolicy::~ExtensionApiTestWithManagementPolicy() = default; -void ExtensionApiTestWithManagementPolicy::SetUpInProcessBrowserTestFixture() { - extensions::ExtensionApiTest::SetUpInProcessBrowserTestFixture(); +void ExtensionApiTestWithManagementPolicy::SetUp() { embedded_test_server()->RegisterRequestMonitor(base::BindRepeating( &ExtensionApiTestWithManagementPolicy::MonitorRequestHandler, base::Unretained(this))); @@ -25,6 +24,7 @@ policy_provider_.SetAutoRefresh(); policy::BrowserPolicyConnector::SetPolicyProviderForTesting( &policy_provider_); + extensions::ExtensionApiTest::SetUp(); } void ExtensionApiTestWithManagementPolicy::SetUpOnMainThread() {
diff --git a/chrome/browser/extensions/extension_with_management_policy_apitest.h b/chrome/browser/extensions/extension_with_management_policy_apitest.h index 690aba17..825ea4b 100644 --- a/chrome/browser/extensions/extension_with_management_policy_apitest.h +++ b/chrome/browser/extensions/extension_with_management_policy_apitest.h
@@ -32,7 +32,7 @@ const ExtensionApiTestWithManagementPolicy&) = delete; ~ExtensionApiTestWithManagementPolicy() override; - void SetUpInProcessBrowserTestFixture() override; + void SetUp() override; void SetUpOnMainThread() override; protected:
diff --git a/chrome/browser/first_party_sets/first_party_sets_overrides_policy_handler.cc b/chrome/browser/first_party_sets/first_party_sets_overrides_policy_handler.cc index 8ddf849..4723149d 100644 --- a/chrome/browser/first_party_sets/first_party_sets_overrides_policy_handler.cc +++ b/chrome/browser/first_party_sets/first_party_sets_overrides_policy_handler.cc
@@ -34,7 +34,7 @@ case content::FirstPartySetsHandler::ParseError::kInvalidOrigin: return "This set contains an invalid origin."; case content::FirstPartySetsHandler::ParseError::kSingletonSet: - return "This set doesn't contain any sites in its members list."; + return "This set doesn't contain any sites in its associatedSites list."; case content::FirstPartySetsHandler::ParseError::kNonDisjointSets: return "This set contains a domain that also exists in another " "First-Party Set.";
diff --git a/chrome/browser/first_party_sets/first_party_sets_overrides_policy_handler_unittest.cc b/chrome/browser/first_party_sets/first_party_sets_overrides_policy_handler_unittest.cc index 3139420..ed7bb11c 100644 --- a/chrome/browser/first_party_sets/first_party_sets_overrides_policy_handler_unittest.cc +++ b/chrome/browser/first_party_sets/first_party_sets_overrides_policy_handler_unittest.cc
@@ -100,8 +100,8 @@ { "replacements": [ { - "owner": "https://owner.test", - "members": ["https://member.test"], + "primary": "https://primary.test", + "associatedSites": ["https://associatedsite.test"], "unknown": "field" } ], @@ -126,8 +126,8 @@ "replacements": [], "additions": [ { - "owner": "https://owner.test", - "members": ["https://member.test"], + "primary": "https://primary.test", + "associatedSites": ["https://associatedsite.test"], "unknown": "field" } ] @@ -191,13 +191,13 @@ } TEST_F(FirstPartySetsOverridesPolicyHandlerTest, - CheckPolicySettings_SchemaValidator_RejectsMissingOwner) { + CheckPolicySettings_SchemaValidator_RejectsMissingPrimary) { policy::PolicyErrorMap errors; std::string input = R"( { "replacements": [ { - "members": ["member.test"] + "associatedSites": ["associatedsite.test"] } ], "additions": [] @@ -209,19 +209,19 @@ EXPECT_EQ( errors.GetErrors(policy::key::kFirstPartySetsOverrides), u"Error at FirstPartySetsOverrides.replacements[0]: Schema validation " - u"error: Missing or invalid required property: owner"); + u"error: Missing or invalid required property: primary"); } TEST_F(FirstPartySetsOverridesPolicyHandlerTest, - CheckPolicySettings_SchemaValidator_RejectsWrongTypeOwner) { + CheckPolicySettings_SchemaValidator_RejectsWrongTypePrimary) { policy::PolicyErrorMap errors; std::string input = R"( { "replacements": [], "additions": [ { - "owner": 123, - "members": ["member.test"] + "primary": 123, + "associatedSites": ["associatedsite.test"] } ] } @@ -230,19 +230,19 @@ EXPECT_FALSE( handler()->CheckPolicySettings(MakePolicyWithInput(input), &errors)); EXPECT_EQ(errors.GetErrors(policy::key::kFirstPartySetsOverrides), - u"Error at FirstPartySetsOverrides.additions[0].owner: Schema " + u"Error at FirstPartySetsOverrides.additions[0].primary: Schema " u"validation error: Policy type mismatch: expected: \"string\", " u"actual: \"integer\"."); } TEST_F(FirstPartySetsOverridesPolicyHandlerTest, - CheckPolicySettings_SchemaValidator_RejectsMissingMembers) { + CheckPolicySettings_SchemaValidator_RejectsMissingAssociatedSites) { policy::PolicyErrorMap errors; std::string input = R"( { "replacements": [ { - "owner": "owner.test" + "primary": "primary.test" } ], "additions": [] @@ -254,19 +254,19 @@ EXPECT_EQ( errors.GetErrors(policy::key::kFirstPartySetsOverrides), u"Error at FirstPartySetsOverrides.replacements[0]: Schema validation " - u"error: Missing or invalid required property: members"); + u"error: Missing or invalid required property: associatedSites"); } TEST_F(FirstPartySetsOverridesPolicyHandlerTest, - CheckPolicySettings_SchemaValidator_RejectsWrongTypeMembers) { + CheckPolicySettings_SchemaValidator_RejectsWrongTypeAssociatedSites) { policy::PolicyErrorMap errors; std::string input = R"( { "replacements": [], "additions": [ { - "owner": "owner.test", - "members": 123 + "primary": "primary.test", + "associatedSites": 123 } ] } @@ -275,21 +275,22 @@ EXPECT_FALSE( handler()->CheckPolicySettings(MakePolicyWithInput(input), &errors)); EXPECT_EQ(errors.GetErrors(policy::key::kFirstPartySetsOverrides), - u"Error at FirstPartySetsOverrides.additions[0].members: " + u"Error at FirstPartySetsOverrides.additions[0].associatedSites: " u"Schema validation error: Policy type mismatch: expected: " u"\"list\", actual: \"integer\"."); } -TEST_F(FirstPartySetsOverridesPolicyHandlerTest, - CheckPolicySettings_SchemaValidator_RejectsWrongTypeMembersElement) { +TEST_F( + FirstPartySetsOverridesPolicyHandlerTest, + CheckPolicySettings_SchemaValidator_RejectsWrongTypeAssociatedSitesElement) { policy::PolicyErrorMap errors; std::string input = R"( { "replacements": [], "additions": [ { - "owner": "owner.test", - "members": ["member1", 123, "member2"] + "primary": "primary.test", + "associatedSites": ["associatedsite1", 123, "associatedsite2"] } ] } @@ -298,7 +299,8 @@ EXPECT_FALSE( handler()->CheckPolicySettings(MakePolicyWithInput(input), &errors)); EXPECT_EQ(errors.GetErrors(policy::key::kFirstPartySetsOverrides), - u"Error at FirstPartySetsOverrides.additions[0].members[1]: Schema " + u"Error at " + u"FirstPartySetsOverrides.additions[0].associatedSites[1]: Schema " u"validation error: Policy type mismatch: expected: \"string\", " u"actual: \"integer\"."); } @@ -310,14 +312,14 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"] } ] } @@ -335,15 +337,15 @@ "unknown0": "field0", "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"], + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"], "unknown1": "field1" } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member2.test"], + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"], "unknown2": "field2" } ], @@ -359,14 +361,14 @@ } TEST_F(FirstPartySetsOverridesPolicyHandlerTest, - CheckPolicySettings_Handler_RejectsInvalidOriginOwner) { + CheckPolicySettings_Handler_RejectsInvalidOriginPrimary) { policy::PolicyErrorMap errors; std::string input = R"( { "replacements": [ { - "owner": "http://owner.test", - "members": ["https://member.test"] + "primary": "http://primary.test", + "associatedSites": ["https://associatedsite.test"] } ], "additions": [] @@ -382,15 +384,15 @@ } TEST_F(FirstPartySetsOverridesPolicyHandlerTest, - CheckPolicySettings_Handler_RejectsInvalidOriginMember) { + CheckPolicySettings_Handler_RejectsInvalidOriginAssociatedSite) { policy::PolicyErrorMap errors; std::string input = R"( { "replacements": [], "additions": [ { - "owner": "https://owner.test", - "members": ["https://member1.test", ""] + "primary": "https://primary.test", + "associatedSites": ["https://associatedsite1.test", ""] } ] } @@ -410,8 +412,8 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": [] + "primary": "https://primary1.test", + "associatedSites": [] } ], "additions": [] @@ -423,7 +425,7 @@ EXPECT_EQ(errors.GetErrors(policy::key::kFirstPartySetsOverrides), u"Error at FirstPartySetsOverrides.replacements[0]: Schema " u"validation error: This set doesn't contain any sites in its " - u"members list."); + u"associatedSites list."); } TEST_F(FirstPartySetsOverridesPolicyHandlerTest, @@ -434,12 +436,12 @@ "replacements": [], "additions": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] }, { - "owner": "https://owner2.test", - "members": ["https://member1.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite1.test"] }] } )"; @@ -459,14 +461,14 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member1.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite1.test"] }] } )"; @@ -486,14 +488,14 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://owner1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://primary1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"] }] } )"; @@ -513,14 +515,14 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://owner2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://primary2.test"] }] } )"; @@ -540,8 +542,8 @@ { "additions": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] }] } )"; @@ -558,8 +560,8 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ] } @@ -578,14 +580,14 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"] }] } )";
diff --git a/chrome/browser/first_party_sets/first_party_sets_policy_browsertest.cc b/chrome/browser/first_party_sets/first_party_sets_policy_browsertest.cc index d4c2a00..3a05d01 100644 --- a/chrome/browser/first_party_sets/first_party_sets_policy_browsertest.cc +++ b/chrome/browser/first_party_sets/first_party_sets_policy_browsertest.cc
@@ -181,8 +181,8 @@ }; IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SetNoEmbeddedFrameWithFpsMemberTopLevel) { - // No embedded frame, FPS member. + SetNoEmbeddedFrameWithFpsAssociatedSiteTopLevel) { + // No embedded frame, FPS associated site. ASSERT_TRUE(NavigateToURL( web_contents(), https_server()->GetURL(kHostA, kSetSamePartyCookiesURL))); EXPECT_THAT(GetCanonicalCookies(web_contents()->GetBrowserContext(), @@ -190,8 +190,9 @@ UnorderedPointwise(net::CanonicalCookieNameIs(), kAllCookies)); } -IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, SetSameSiteFpsMemberEmbed) { - // Same-site FPS-member iframe (A embedded in A). +IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, + SetSameSiteFpsAssociatedSiteEmbed) { + // Same-site FPS-associated-site iframe (A embedded in A). EXPECT_THAT(content::ArrangeFramesAndGetCanonicalCookiesForLeaf( web_contents(), https_server(), "a.test(%s)", SetSamePartyCookiesUrl(kHostA)), @@ -199,7 +200,7 @@ } IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SetCrossSiteSamePartyEmbedWithFpsOwnerTopLevel) { + SetCrossSiteSamePartyEmbedWithFpsPrimaryTopLevel) { // Cross-site, same-party iframe (B embedded in A). EXPECT_THAT(content::ArrangeFramesAndGetCanonicalCookiesForLeaf( web_contents(), https_server(), "a.test(%s)", @@ -209,7 +210,7 @@ } IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SetCrossSiteSamePartyEmbedWithFpsOwnerLeaf) { + SetCrossSiteSamePartyEmbedWithFpsPrimaryLeaf) { // Cross-site, same-party iframe (A embedded in B). EXPECT_THAT(content::ArrangeFramesAndGetCanonicalCookiesForLeaf( web_contents(), https_server(), "b.test(%s)", @@ -275,8 +276,8 @@ } IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SetNoEmbeddedFrameWithNonFpsMemberTopLevel) { - // No embedded frame, non-FPS member. + SetNoEmbeddedFrameWithNonFpsAssociatedSiteTopLevel) { + // No embedded frame, non-FPS site. ASSERT_TRUE(NavigateToURL( web_contents(), https_server()->GetURL(kHostD, kSetSamePartyCookiesURL))); EXPECT_THAT(GetCanonicalCookies(web_contents()->GetBrowserContext(), @@ -285,9 +286,9 @@ } IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SendNoEmbeddedFrameWithFpsMemberTopLevel) { + SendNoEmbeddedFrameWithFpsAssociatedSiteTopLevel) { ASSERT_NO_FATAL_FAILURE(SetSamePartyCookies(kHostA)); - // No embedded frame, FPS member. + // No embedded frame, FPS associated site. ASSERT_TRUE(NavigateToURL( web_contents(), https_server()->GetURL(kHostA, "/echoheader?Cookie"))); EXPECT_THAT( @@ -296,9 +297,9 @@ } IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SendSameSiteWithFpsMemberEmbed) { + SendSameSiteWithFpsAssociatedSiteEmbed) { ASSERT_NO_FATAL_FAILURE(SetSamePartyCookies(kHostA)); - // Same-site FPS-member iframe (A embedded in A). + // Same-site FPS-associated-site iframe (A embedded in A). EXPECT_THAT( content::ArrangeFramesAndGetContentFromLeaf(web_contents(), https_server(), "a.test(%s)", @@ -307,7 +308,7 @@ } IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SendCrossSiteSamePartyWithEmbedFpsOwnerTopLevel) { + SendCrossSiteSamePartyWithEmbedFpsPrimaryTopLevel) { ASSERT_NO_FATAL_FAILURE(SetSamePartyCookies(kHostB)); // Cross-site, same-party iframe (B embedded in A). EXPECT_THAT( @@ -319,7 +320,7 @@ } IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SendCrossSiteSamePartyWithEmbedFpsOwnerLeaf) { + SendCrossSiteSamePartyWithEmbedFpsPrimaryLeaf) { ASSERT_NO_FATAL_FAILURE(SetSamePartyCookies(kHostA)); // Cross-site, same-party iframe (A embedded in B). EXPECT_THAT( @@ -394,9 +395,9 @@ } IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, - SendNoEmbeddedFrameWithNonFpsMemberTopLevel) { + SendNoEmbeddedFrameWithNonFpsAssociatedSiteTopLevel) { ASSERT_NO_FATAL_FAILURE(SetSamePartyCookies(kHostD)); - // No embedded frame, non-FPS member. + // No embedded frame, non-FPS site. ASSERT_TRUE(NavigateToURL( web_contents(), https_server()->GetURL(kHostD, "/echoheader?Cookie"))); EXPECT_THAT( @@ -407,10 +408,10 @@ IN_PROC_BROWSER_TEST_P(EnabledPolicyBrowsertest, DefaultOverridesPolicy_SetCookiesFromSamePartyContext) { // The initial First-Party Sets were: - // {owner: A, members: [B, C]} + // {primary: A, associatedSites: [B, C]} // // After the Overrides policy is applied, the expected First-Party Sets are: - // {owner: A, members: [B, C]} (unchanged) + // {primary: A, associatedSites: [B, C]} (unchanged) // // `A` should still be able to set its cookies from a cross-site, same-party // nested iframe (A embedded in B embedded in C embedded in A). @@ -446,10 +447,10 @@ IN_PROC_BROWSER_TEST_P(OverridesPolicyEmptyBrowsertest, SetCookiesFromSamePartyContext) { // The initial First-Party Sets were: - // {owner: A, members: [B, C]} + // {primary: A, associatedSites: [B, C]} // // After the Overrides policy is applied, the expected First-Party Sets are: - // {owner: A, members: [B, C]} (unchanged) + // {primary: A, associatedSites: [B, C]} (unchanged) // // `A` should still be able to set its cookies from a cross-site, same-party // nested iframe (A embedded in B embedded in C embedded in A). @@ -482,8 +483,8 @@ { "replacements": [ { - "owner": "https://d.test", - "members": ["https://b.test", + "primary": "https://d.test", + "associatedSites": ["https://b.test", "https://a.test"] } ], @@ -497,10 +498,10 @@ IN_PROC_BROWSER_TEST_P(OverridesPolicyReplacementBrowsertest, SetCookiesFromSamePartyContext) { // The initial First-Party Sets were: - // {owner: A, members: [B, C]} + // {primary: A, associatedSites: [B, C]} // // After the Overrides policy is applied, the expected First-Party Sets are: - // {owner: D, members: [A, B]} + // {primary: D, associatedSites: [A, B]} { // `D` should now be able to set its cookies from a cross-site, same-party // nested iframe (D embedded in B embedded in A embedded in D). @@ -546,8 +547,8 @@ "replacements": [], "additions": [ { - "owner": "https://a.test", - "members": ["https://d.test"] + "primary": "https://a.test", + "associatedSites": ["https://d.test"] } ] } @@ -559,10 +560,10 @@ IN_PROC_BROWSER_TEST_P(OverridesPolicyAdditionBrowsertest, SetCookiesFromSamePartyContext) { // The initial First-Party Sets were: - // {owner: A, members: [B, C]} + // {primary: A, associatedSites: [B, C]} // // After the Overrides policy is applied, the expected First-Party Sets are: - // {owner: A, members: [B, C, D]}} + // {primary: A, associatedSites: [B, C, D]}} // // `D` should now be able to set its cookies from a cross-site, same-party // nested iframe (D embedded in B embedded in A embedded in C). @@ -596,14 +597,14 @@ { "replacements": [ { - "owner": "https://a.test", - "members": ["https://d.test"] + "primary": "https://a.test", + "associatedSites": ["https://d.test"] } ], "additions": [ { - "owner": "https://b.test", - "members": ["https://c.test"] + "primary": "https://b.test", + "associatedSites": ["https://c.test"] } ] } @@ -615,10 +616,10 @@ IN_PROC_BROWSER_TEST_P(OverridesPolicyReplacementAndAdditionBrowsertest, SetCookiesFromSamePartyContext) { // The initial First-Party Sets were: - // {owner: A, members: [B, C]} + // {primary: A, associatedSites: [B, C]} // // After the Overrides policy is applied, the expected First-Party Sets are: - // {owner: A, members: [D]} and {owner: B, members: [C]}. + // {primary: A, associatedSites: [D]} and {primary: B, associatedSites: [C]}. { // `A` and `B` are no longer in the same First-Party Set so `A` should no // longer be able to set its cookies from a nested iframe in B.
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index afd185c..1cc1f8c 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -183,6 +183,11 @@ "expiry_milestone": 96 }, { + "name": "app-store-rating", + "owners": [ "hiramahmood@google.com", "bling-flags@google.com" ], + "expiry_milestone": 110 + }, + { "name": "arc-custom-tabs-experiment", "owners": [ "hashimoto", "dominickn" ], "expiry_milestone": 95 @@ -1130,6 +1135,11 @@ "expiry_milestone": 110 }, { + "name": "cros-privacy-hub-dogfood", + "owners": [ "chromeos-privacyhub@google.com" ], + "expiry_milestone": 120 + }, + { "name": "cros-privacy-hub-future", "owners": [ "chromeos-privacyhub@google.com" ], "expiry_milestone": 120 @@ -1905,7 +1915,7 @@ { "name": "enable-cros-privacy-hub", "owners": [ "chromeos-privacyhub@google.com" ], - "expiry_milestone": 110 + "expiry_milestone": 120 }, { "name": "enable-cros-system-chinese-physical-typing", @@ -5874,7 +5884,7 @@ { "name": "shelf-drag-to-pin", "owners": ["tbarzic", "//ash/shelf/OWNERS" ], - "expiry_milestone": 106 + "expiry_milestone": 110 }, { "name": "shelf-gestures-with-vk", @@ -6726,6 +6736,11 @@ "expiry_milestone": 113 }, { + "name": "webauthn-conditional-ui", + "owners": [ "chrome-webauthn@google.com" ], + "expiry_milestone": 110 + }, + { "name": "webnotes-dynamic-templates", "owners": ["chrome-creation@google.com"], "expiry_milestone": 103
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 134795e5..33e6ced 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -3076,6 +3076,10 @@ "requested using the Payment Request API. This flag removes the " "restriction that the TWA has to be installed from the app-store."; +const char kWebAuthnConditionalUIName[] = "Web Authentication Conditional UI"; +const char kWebAuthnConditionalUIDescription[] = + "Enable support for Conditional UI WebAuthn requests."; + const char kWebrtcCaptureMultiChannelApmName[] = "WebRTC multi-channel capture audio processing."; const char kWebrtcCaptureMultiChannelApmDescription[] = @@ -6154,6 +6158,11 @@ const char kCrosPrivacyHubName[] = "Enable ChromeOS Privacy Hub"; const char kCrosPrivacyHubDescription[] = "Enables ChromeOS Privacy Hub."; +const char kCrosPrivacyHubDogfoodName[] = + "Enable ChromeOS Privacy Hub dogfood features"; +const char kCrosPrivacyHubDogfoodDescription[] = + "Enables ChromeOS Privacy Hub dogfood features."; + const char kCrosPrivacyHubFutureName[] = "Enable ChromeOS Privacy Hub future features"; const char kCrosPrivacyHubFutureDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 9e9220d4..536048c 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -1724,6 +1724,9 @@ extern const char kAppStoreBillingDebugName[]; extern const char kAppStoreBillingDebugDescription[]; +extern const char kWebAuthnConditionalUIName[]; +extern const char kWebAuthnConditionalUIDescription[]; + extern const char kWebrtcCaptureMultiChannelApmName[]; extern const char kWebrtcCaptureMultiChannelApmDescription[]; @@ -3518,6 +3521,9 @@ extern const char kCrosPrivacyHubName[]; extern const char kCrosPrivacyHubDescription[]; +extern const char kCrosPrivacyHubDogfoodName[]; +extern const char kCrosPrivacyHubDogfoodDescription[]; + extern const char kCrosPrivacyHubFutureName[]; extern const char kCrosPrivacyHubFutureDescription[];
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc index b8b6708b..c624f46 100644 --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -327,7 +327,6 @@ &kWebOtpCrossDeviceSimpleString, &content_creation::kWebNotesDynamicTemplates, &content_creation::kWebNotesStylizeEnabled, - &kWebApkInstallCompleteNotification, &kWebApkInstallService, &kWebApkTrampolineOnInitialIntent, &features::kDnsOverHttps, @@ -943,9 +942,6 @@ const base::Feature kWebOtpCrossDeviceSimpleString{ "WebOtpCrossDeviceSimpleString", base::FEATURE_DISABLED_BY_DEFAULT}; -const base::Feature kWebApkInstallCompleteNotification{ - "WebApkInstallCompleteNotification", base::FEATURE_ENABLED_BY_DEFAULT}; - // Enables the Chrome Android WebAPK-install service. const base::Feature kWebApkInstallService{"WebApkInstallService", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h index d0bdc23..5b24bb9 100644 --- a/chrome/browser/flags/android/chrome_feature_list.h +++ b/chrome/browser/flags/android/chrome_feature_list.h
@@ -185,7 +185,6 @@ extern const base::Feature kVoiceButtonInTopToolbar; extern const base::Feature kVrBrowsingFeedback; extern const base::Feature kWebOtpCrossDeviceSimpleString; -extern const base::Feature kWebApkInstallCompleteNotification; extern const base::Feature kWebApkInstallService; extern const base::Feature kWebApkTrampolineOnInitialIntent;
diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/AppLanguagePreferenceDelegate.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/AppLanguagePreferenceDelegate.java index a455465..a3b2bf7 100644 --- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/AppLanguagePreferenceDelegate.java +++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/AppLanguagePreferenceDelegate.java
@@ -133,7 +133,7 @@ Snackbar snackbar = Snackbar.make(resources.getString(R.string.languages_infobar_ready, displayName), mStackbarController, Snackbar.TYPE_PERSISTENT, - Snackbar.UMA_TAB_CLOSE_UNDO) + Snackbar.UMA_LANGUAGE_SPLIT_RESTART) .setAction(resources.getString(R.string.languages_infobar_restart), null); snackbar.setSingleLine(false); if (mSnackbarManager.canShowSnackbar()) {
diff --git a/chrome/browser/lifetime/browser_shutdown.cc b/chrome/browser/lifetime/browser_shutdown.cc index 1f94045..8236b3ec 100644 --- a/chrome/browser/lifetime/browser_shutdown.cc +++ b/chrome/browser/lifetime/browser_shutdown.cc
@@ -108,6 +108,46 @@ return ""; } +#if !BUILDFLAG(IS_ANDROID) +void LogShutdownMetrics() { + base::UmaHistogramEnumeration("Shutdown.ShutdownType2", g_shutdown_type); + + const char* time_metric_name = nullptr; + switch (g_shutdown_type) { + case ShutdownType::kNotValid: + time_metric_name = "Shutdown.NotValid.Time2"; + break; + + case ShutdownType::kSilentExit: + time_metric_name = "Shutdown.SilentExit.Time2"; + break; + + case ShutdownType::kWindowClose: + time_metric_name = "Shutdown.WindowClose.Time2"; + break; + + case ShutdownType::kBrowserExit: + time_metric_name = "Shutdown.BrowserExit.Time2"; + break; + + case ShutdownType::kEndSession: + time_metric_name = "Shutdown.EndSession.Time2"; + break; + } + DCHECK(time_metric_name); + + if (g_shutdown_started) { + base::TimeDelta shutdown_delta = base::Time::Now() - *g_shutdown_started; + base::UmaHistogramMediumTimes(time_metric_name, shutdown_delta); + } + + base::UmaHistogramCounts100("Shutdown.Renderers.Total2", + g_shutdown_num_processes); + base::UmaHistogramCounts100("Shutdown.Renderers.Slow2", + g_shutdown_num_processes_slow); +} +#endif // !BUILDFLAG(IS_ANDROID) + } // namespace void RegisterPrefs(PrefRegistrySimple* registry) { @@ -298,6 +338,9 @@ base::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len); } + // Log shutdown timing metrics. + LogShutdownMetrics(); + #if BUILDFLAG(IS_CHROMEOS_ASH) NotifyAndTerminate(false /* fast_path */); #endif @@ -327,7 +370,7 @@ break; case ShutdownType::kSilentExit: - time_metric_name = "Shutdown.SilentExit.time"; + time_metric_name = "Shutdown.SilentExit.Time"; break; case ShutdownType::kWindowClose:
diff --git a/chrome/browser/media/router/BUILD.gn b/chrome/browser/media/router/BUILD.gn index 8988eb1..c9b9e3e1 100644 --- a/chrome/browser/media/router/BUILD.gn +++ b/chrome/browser/media/router/BUILD.gn
@@ -104,6 +104,7 @@ "//components/mirroring/mojom:service", "//components/ukm/content:content", "//components/version_info:version_info", + "//media/remoting:remoting_device_capability", "//mojo/public/cpp/bindings", "//services/metrics/public/cpp:ukm_builders", "//third_party/openscreen/src/cast/common/channel/proto:channel_proto",
diff --git a/chrome/browser/media/router/DEPS b/chrome/browser/media/router/DEPS index 1259fc4f..8fffd7e 100644 --- a/chrome/browser/media/router/DEPS +++ b/chrome/browser/media/router/DEPS
@@ -2,6 +2,7 @@ # cause a circular dependency. See crbug.com/1030821. include_rules = [ "+components/openscreen_platform", + "+media/remoting", "+services/network", "+third_party/openscreen/src/cast/common/certificate/proto", "+third_party/openscreen/src/cast/common/channel/proto",
diff --git a/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.cc b/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.cc index be692d5..1813561 100644 --- a/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.cc +++ b/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.cc
@@ -446,6 +446,7 @@ "expiration timer has already fired so there is no need to re-trigger " "it.", sink_id); + ExpireSink(sink_id); return; } @@ -659,14 +660,18 @@ sink.id()); return; } - RemoveSinkIdFromAllEntries(sink.id()); + + ExpireSink(sink.id()); +} + +void AccessCodeCastSinkService::ExpireSink(const MediaSink::Id& sink_id) { + RemoveSinkIdFromAllEntries(sink_id); // Must find the sink from media router for removal since it has more total // information. base::PostTaskAndReplyWithResult( cast_media_sink_service_impl_->task_runner().get(), FROM_HERE, base::BindOnce(&CastMediaSinkServiceImpl::GetSinkById, - base::Unretained(cast_media_sink_service_impl_), - sink.id()), + base::Unretained(cast_media_sink_service_impl_), sink_id), base::BindOnce( &AccessCodeCastSinkService::RemoveAndDisconnectMediaSinkFromRouter, weak_ptr_factory_.GetWeakPtr()));
diff --git a/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.h b/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.h index 2452c39..12adebf 100644 --- a/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.h +++ b/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.h
@@ -113,6 +113,8 @@ TestChangeNetworkWithRouteActive); FRIEND_TEST_ALL_PREFIXES(AccessCodeCastSinkServiceTest, TestChangeNetworkWithRouteActiveExpiration); + FRIEND_TEST_ALL_PREFIXES(AccessCodeCastSinkServiceTest, + TestCheckMediaSinkForExpirationAfterDelay); // media_router::MediaRoutesObserver: void OnRoutesUpdated(const std::vector<MediaRoute>& routes) override; @@ -186,6 +188,8 @@ TestCheckMediaSinkForExpirationNoExpiration); FRIEND_TEST_ALL_PREFIXES(AccessCodeCastSinkServiceTest, TestCheckMediaSinkForExpirationBeforeDelay); + FRIEND_TEST_ALL_PREFIXES(AccessCodeCastSinkServiceTest, + TestCheckMediaSinkForExpirationAfterDelay); // Use |AccessCodeCastSinkServiceFactory::GetForProfile(..)| to get // an instance of this service. @@ -234,6 +238,11 @@ void OnExpiration(const MediaSinkInternal& sink); + // This function first removes itself from all the prefs and then checks to + // see if the sink is contained within the media router, and attempts to + // remove it if there is a sink in the media router. + void ExpireSink(const MediaSink::Id& sink_id); + // This function removes the media sink // from the MediaSinkServiceBase AND closes the cast socket of that media // sink. This function is a no-op if there exists a local active route for the
diff --git a/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service_unittest.cc b/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service_unittest.cc index 3b188550..f9ff90f 100644 --- a/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service_unittest.cc +++ b/chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service_unittest.cc
@@ -530,13 +530,18 @@ EXPECT_FALSE( access_code_cast_sink_service_->pref_updater_->GetDevicesDict().empty()); - // When the network changes, the sinks on that network should be removed. + // When the network changes, the sinks on that network should be removed. The + // sinks should also be expired after the network changes and the expiration + // is fully completed. EXPECT_CALL(*mock_cast_media_sink_service_impl(), - DisconnectAndRemoveSink(cast_sink1)); + DisconnectAndRemoveSink(cast_sink1)) + .Times(2); EXPECT_CALL(*mock_cast_media_sink_service_impl(), - DisconnectAndRemoveSink(cast_sink2)); + DisconnectAndRemoveSink(cast_sink2)) + .Times(2); EXPECT_CALL(*mock_cast_media_sink_service_impl(), - DisconnectAndRemoveSink(cast_sink3)); + DisconnectAndRemoveSink(cast_sink3)) + .Times(2); // Connect to a new network with different sinks. fake_network_info_ = fake_wifi_info_; @@ -552,8 +557,10 @@ mock_time_task_runner_->FastForwardUntilNoTasksRemain(); task_environment_.FastForwardBy(base::Seconds(50)); mock_time_task_runner_->FastForwardUntilNoTasksRemain(); + content::RunAllTasksUntilIdle(); + FastForwardUiAndIoTasks(); - // Now all the expiration timers should be completed and the devies should be + // Now all the expiration timers should be completed and the devices should be // removed. EXPECT_FALSE( access_code_cast_sink_service_->pref_updater_->GetDeviceAddedTimeDict() @@ -749,9 +756,6 @@ EXPECT_EQ(access_code_cast_sink_service_->CalculateDurationTillExpiration( cast_sink1.id()), base::Seconds(0)); - - FastForwardUiAndIoTasks(); - mock_time_task_runner()->FastForwardUntilNoTasksRemain(); } TEST_F(AccessCodeCastSinkServiceTest, TestSetExpirationTimer) { @@ -1175,4 +1179,85 @@ access_code_cast_sink_service_->pref_updater_->GetDevicesDict().empty()); } +TEST_F(AccessCodeCastSinkServiceTest, + TestCheckMediaSinkForExpirationAfterDelay) { + // Demonstrates that if an expiration timer is no longer running, then we will + // attempt to expire the sink since this means the sink has expired but the + // route was still active. + + MediaSinkInternal cast_sink1 = CreateCastSink(1); + cast_sink1.cast_data().discovery_type = + CastDiscoveryType::kAccessCodeManualEntry; + SetDeviceDurationPrefForTest(base::Seconds(0)); + + mock_cast_media_sink_service_impl()->AddSinkForTest(cast_sink1); + access_code_cast_sink_service_->SetExpirationTimer(&cast_sink1); + access_code_cast_sink_service_->StoreSinkInPrefs(&cast_sink1); + + MediaRoute media_route_cast = CreateRouteForTesting(cast_sink1.id()); + access_code_cast_sink_service_->media_routes_observer_->OnRoutesUpdated( + {media_route_cast}); + + FastForwardUiAndIoTasks(); + content::RunAllTasksUntilIdle(); + + EXPECT_TRUE(access_code_cast_sink_service_ + ->current_session_expiration_timers_[cast_sink1.id()] + ->IsRunning()); + + media_route_cast.set_local(true); + ON_CALL(*router_, GetCurrentRoutes()) + .WillByDefault(Return(std::vector<MediaRoute>{media_route_cast})); + + // Expire the sink while there is still an active local route. + task_environment_.AdvanceClock( + AccessCodeCastSinkService::kExpirationTimerDelay + base::Seconds(100)); + content::RunAllTasksUntilIdle(); + FastForwardUiAndIoTasks(); + mock_time_task_runner()->FastForwardUntilNoTasksRemain(); + EXPECT_FALSE(access_code_cast_sink_service_ + ->current_session_expiration_timers_[cast_sink1.id()] + ->IsRunning()); + + // The sink should NOT be removed from the media router since there is still + // an open local route. + EXPECT_CALL(*mock_cast_media_sink_service_impl(), + DisconnectAndRemoveSink(cast_sink1)) + .Times(0); + FastForwardUiAndIoTasks(); + content::RunAllTasksUntilIdle(); + FastForwardUiAndIoTasks(); + + // The sink did NOT expire in this situation so it should exist in the + // pref service. + EXPECT_FALSE( + access_code_cast_sink_service_->pref_updater_->GetDeviceAddedTimeDict() + ->GetDict() + .empty()); + EXPECT_FALSE( + access_code_cast_sink_service_->pref_updater_->GetDevicesDict().empty()); + + // Finally remove the route from the media router. + ON_CALL(*router_, GetCurrentRoutes()) + .WillByDefault(Return(std::vector<MediaRoute>{})); + access_code_cast_sink_service_->media_routes_observer_->OnRoutesUpdated({}); + + // The sink should now be removed from the media router. + EXPECT_CALL(*mock_cast_media_sink_service_impl(), + DisconnectAndRemoveSink(cast_sink1)); + task_environment_.RunUntilIdle(); + FastForwardUiAndIoTasks(); + content::RunAllTasksUntilIdle(); + FastForwardUiAndIoTasks(); + + // The sink did expire in this situation so it should not exist in the pref + // service. + EXPECT_TRUE( + access_code_cast_sink_service_->pref_updater_->GetDeviceAddedTimeDict() + ->GetDict() + .empty()); + EXPECT_TRUE( + access_code_cast_sink_service_->pref_updater_->GetDevicesDict().empty()); +} + } // namespace media_router
diff --git a/chrome/browser/media/router/providers/cast/cast_media_route_provider.cc b/chrome/browser/media/router/providers/cast/cast_media_route_provider.cc index 97ed863..44b0fd8 100644 --- a/chrome/browser/media/router/providers/cast/cast_media_route_provider.cc +++ b/chrome/browser/media/router/providers/cast/cast_media_route_provider.cc
@@ -10,6 +10,8 @@ #include "base/bind.h" #include "base/containers/contains.h" +#include "base/feature_list.h" +#include "base/strings/string_split.h" #include "chrome/browser/media/router/media_router_feature.h" #include "chrome/browser/media/router/providers/cast/cast_activity_manager.h" #include "chrome/browser/media/router/providers/cast/cast_internal_message_util.h" @@ -20,6 +22,10 @@ #include "components/media_router/common/mojom/media_router.mojom.h" #include "components/media_router/common/providers/cast/cast_media_source.h" #include "content/public/browser/browser_task_traits.h" +#include "media/base/audio_codecs.h" +#include "media/base/video_codecs.h" +#include "media/remoting/device_capability_checker.h" +#include "net/base/url_util.h" #include "url/origin.h" namespace media_router { @@ -53,6 +59,63 @@ return allowed_origins; } +media::VideoCodec ParseVideoCodec(const MediaSource& media_source) { + std::string video_codec; + if (!net::GetValueForKeyInQuery(media_source.url(), "video_codec", + &video_codec)) { + return media::VideoCodec::kUnknown; + } +#if BUILDFLAG(USE_PROPRIETARY_CODECS) + // `StringToVideoCodec()` does not parse custom strings like "hevc" and + // "h264". + if (video_codec == "hevc") { + return media::VideoCodec::kHEVC; + } + if (video_codec == "h264") { + return media::VideoCodec::kH264; + } +#endif + return media::StringToVideoCodec(video_codec); +} + +media::AudioCodec ParseAudioCodec(const MediaSource& media_source) { + std::string audio_codec; + if (!net::GetValueForKeyInQuery(media_source.url(), "audio_codec", + &audio_codec)) { + return media::AudioCodec::kUnknown; + } + if (audio_codec == "aac") { +#if BUILDFLAG(USE_PROPRIETARY_CODECS) + return media::AudioCodec::kAAC; +#else + return media::AudioCodec::kUnknown; +#endif + } + return media::StringToAudioCodec(audio_codec); +} + +std::vector<MediaSinkInternal> GetRemotePlaybackMediaSourceCompatibleSinks( + const MediaSource& media_source, + const std::vector<MediaSinkInternal>& sinks) { + DCHECK(media_source.IsRemotePlaybackSource()); + std::vector<MediaSinkInternal> compatible_sinks; + auto video_codec = ParseVideoCodec(media_source); + auto audio_codec = ParseAudioCodec(media_source); + if (video_codec == media::VideoCodec::kUnknown || + audio_codec == media::AudioCodec::kUnknown) { + return compatible_sinks; + } + + for (const auto& sink : sinks) { + const std::string& model_name = sink.cast_data().model_name; + if (media::remoting::IsVideoCodecCompatible(model_name, video_codec) && + media::remoting::IsAudioCodecCompatible(model_name, audio_codec)) { + compatible_sinks.push_back(sink); + } + } + return compatible_sinks; +} + } // namespace CastMediaRouteProvider::CastMediaRouteProvider( @@ -293,8 +356,22 @@ void CastMediaRouteProvider::OnSinkQueryUpdated( const MediaSource::Id& source_id, const std::vector<MediaSinkInternal>& sinks) { - media_router_->OnSinksReceived(mojom::MediaRouteProviderId::CAST, source_id, - sinks, GetOrigins(source_id)); + auto media_source = MediaSource(source_id); + // Do not check compatibility for non-RemotePlayback MediaSource. + if (!media_source.IsRemotePlaybackSource()) { + media_router_->OnSinksReceived(mojom::MediaRouteProviderId::CAST, source_id, + sinks, GetOrigins(source_id)); + return; + } + if (!base::FeatureList::IsEnabled(kMediaRemotingWithoutFullscreen)) { + return; + } + + // Check sinks' video/audio compatibility for RemotePlayback MediaSource. + media_router_->OnSinksReceived( + mojom::MediaRouteProviderId::CAST, source_id, + GetRemotePlaybackMediaSourceCompatibleSinks(media_source, sinks), + GetOrigins(source_id)); } void CastMediaRouteProvider::BroadcastMessageToSinks(
diff --git a/chrome/browser/media/router/providers/cast/cast_media_route_provider.h b/chrome/browser/media/router/providers/cast/cast_media_route_provider.h index 8411d2c..c8ab290a 100644 --- a/chrome/browser/media/router/providers/cast/cast_media_route_provider.h +++ b/chrome/browser/media/router/providers/cast/cast_media_route_provider.h
@@ -90,6 +90,9 @@ void GetState(GetStateCallback callback) override; private: + FRIEND_TEST_ALL_PREFIXES(CastMediaRouteProviderTest, + GetRemotePlaybackCompatibleSinks); + void Init(mojo::PendingReceiver<mojom::MediaRouteProvider> receiver, mojo::PendingRemote<mojom::MediaRouter> media_router, CastSessionTracker* session_tracker,
diff --git a/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc b/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc index 5091522d..6b684798 100644 --- a/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc +++ b/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc
@@ -8,8 +8,10 @@ #include "base/bind.h" #include "base/run_loop.h" +#include "base/test/scoped_feature_list.h" #include "base/test/test_simple_task_runner.h" #include "base/threading/sequenced_task_runner_handle.h" +#include "chrome/browser/media/router/media_router_feature.h" #include "chrome/browser/media/router/providers/cast/cast_session_tracker.h" #include "chrome/browser/media/router/test/mock_mojo_media_router.h" #include "chrome/browser/media/router/test/provider_test_helpers.h" @@ -18,6 +20,7 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/test/browser_task_environment.h" +#include "media/media_buildflags.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" @@ -26,6 +29,7 @@ #include "testing/gtest/include/gtest/gtest.h" using ::testing::_; +using testing::Mock; using ::testing::NiceMock; using testing::WithArg; @@ -57,6 +61,14 @@ }], })"); } + +MediaSinkInternal CreateCastSinkWithModelName(const std::string model_name) { + MediaSinkInternal cast_sink = CreateCastSink(1); + auto cast_data = cast_sink.cast_data(); + cast_data.model_name = model_name; + cast_sink.set_cast_data(cast_data); + return cast_sink; +} } // namespace class CastMediaRouteProviderTest : public testing::Test { @@ -301,4 +313,71 @@ })); } +TEST_F(CastMediaRouteProviderTest, GetRemotePlaybackCompatibleSinks) { + MediaSinkInternal cc = CreateCastSinkWithModelName("Chromecast"); + MediaSinkInternal cc_ultra = CreateCastSinkWithModelName("Chromecast Ultra"); + MediaSinkInternal nest = CreateCastSinkWithModelName("Nest"); + + // It should not update sinks for RemotePlayback MediaSource when the feature + // is disabled. + EXPECT_CALL(mock_router_, OnSinksReceived(_, _, _, _)).Times(0); + provider_->OnSinkQueryUpdated( + "remote-playback:media-session?tab_id=1&video_codec=vp8&audio_codec=aac", + {cc, cc_ultra, nest}); + base::RunLoop().RunUntilIdle(); + Mock::VerifyAndClearExpectations(&mock_router_); + + // Enable the feature and it should return sinks compatible with the + // RemotePlayback MediaSource. + base::test::ScopedFeatureList feature_list; + feature_list.InitAndEnableFeature(kMediaRemotingWithoutFullscreen); + +#if BUILDFLAG(USE_PROPRIETARY_CODECS) + EXPECT_CALL(mock_router_, + OnSinksReceived(mojom::MediaRouteProviderId::CAST, _, + std::vector<MediaSinkInternal>{cc, cc_ultra}, _)); + provider_->OnSinkQueryUpdated( + "remote-playback:media-session?tab_id=1&video_codec=h264&audio_codec=aac", + {cc, cc_ultra, nest}); + base::RunLoop().RunUntilIdle(); + Mock::VerifyAndClearExpectations(&mock_router_); + + EXPECT_CALL(mock_router_, + OnSinksReceived(mojom::MediaRouteProviderId::CAST, _, + std::vector<MediaSinkInternal>{cc_ultra}, _)); + provider_->OnSinkQueryUpdated( + "remote-playback:media-session?tab_id=1&video_codec=hevc&audio_codec=aac", + {cc, cc_ultra, nest}); + base::RunLoop().RunUntilIdle(); + Mock::VerifyAndClearExpectations(&mock_router_); +#else + EXPECT_CALL(mock_router_, + OnSinksReceived(mojom::MediaRouteProviderId::CAST, _, + std::vector<MediaSinkInternal>{}, _)); + provider_->OnSinkQueryUpdated( + "remote-playback:media-session?tab_id=1&video_codec=h264&audio_codec=aac", + {cc, cc_ultra, nest}); + base::RunLoop().RunUntilIdle(); + Mock::VerifyAndClearExpectations(&mock_router_); + + EXPECT_CALL(mock_router_, + OnSinksReceived(mojom::MediaRouteProviderId::CAST, _, + std::vector<MediaSinkInternal>{cc, cc_ultra}, _)); + provider_->OnSinkQueryUpdated( + "remote-playback:media-session?tab_id=1&video_codec=vp8&audio_codec=opus", + {cc, cc_ultra, nest}); + base::RunLoop().RunUntilIdle(); + Mock::VerifyAndClearExpectations(&mock_router_); +#endif + + EXPECT_CALL(mock_router_, + OnSinksReceived(mojom::MediaRouteProviderId::CAST, _, + std::vector<MediaSinkInternal>{}, _)); + provider_->OnSinkQueryUpdated( + "remote-playback:media-session?tab_id=1&video_codec=vp8&audio_codec=" + "invalid", + {cc, cc_ultra, nest}); + base::RunLoop().RunUntilIdle(); + Mock::VerifyAndClearExpectations(&mock_router_); +} } // namespace media_router
diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h index d93450a..f16b2da 100644 --- a/chrome/browser/media/webrtc/desktop_media_list.h +++ b/chrome/browser/media/webrtc/desktop_media_list.h
@@ -118,6 +118,25 @@ // generating in addition to its thumbnail. virtual void SetPreviewedSource( const absl::optional<content::DesktopMediaID>& id) = 0; + + // Returns true if this DesktopMediaList wraps some other object (usually a + // DesktopCapturer), that takes responsibility for showing its own source + // list where the user will likely make their selection. When true, there will + // only be one source listed which will represent the selection made in the + // delegated source list. + // Returns false if this DesktopMediaList needs UI created for it to show its + // source list. + virtual bool IsSourceListDelegated() const = 0; + + // Notifies the list that it is now focused. This is especially important + // when IsSourceDelegated() returns true, as it helps to notify the delegated + // source list when it should be visible. + virtual void FocusList() = 0; + + // Notifies the list that it is no longer focused. This is especially + // important when IsSourceDelegated() returns true, as it helps to notify the + // delegated source list when it should be hidden. + virtual void HideList() = 0; }; #endif // CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_MEDIA_LIST_H_
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc index ac1e785..506b04e6 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
@@ -52,6 +52,10 @@ DCHECK(!observer_); observer_ = observer; + // If there is a delegated source list, it may not have been started yet. + if (IsSourceListDelegated()) + StartDelegatedCapturer(); + // Process sources previously discovered by a call to Update(). if (observer_) { for (size_t i = 0; i < sources_.size(); i++) { @@ -91,6 +95,13 @@ return type_; } +bool DesktopMediaListBase::IsSourceListDelegated() const { + return false; +} + +void DesktopMediaListBase::FocusList() {} +void DesktopMediaListBase::HideList() {} + DesktopMediaListBase::SourceDescription::SourceDescription( DesktopMediaID id, const std::u16string& name)
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h index 1150cf5..b82a44e 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h +++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
@@ -43,6 +43,9 @@ int GetSourceCount() const override; const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; + bool IsSourceListDelegated() const override; + void FocusList() override; + void HideList() override; static uint32_t GetImageHash(const gfx::Image& image); @@ -59,6 +62,12 @@ DesktopMediaListBase(base::TimeDelta update_period, DesktopMediaListObserver* observer); + // Called to allow a capturer with a delegated source list to be started only + // once the list actually starts updating. Otherwise, child classes are + // responsible for ensuring their capturer is started at a reasonable time. + // Only called if IsSourceListDelegated() returns true. + virtual void StartDelegatedCapturer() {} + // Before this method is called, |refresh_callback_| must be non-null, and // after it completes (usually asychnonrously), |refresh_callback_| must be // null. Since |refresh_callback_| is private, subclasses can check this
diff --git a/chrome/browser/media/webrtc/desktop_media_picker_controller_unittest.cc b/chrome/browser/media/webrtc/desktop_media_picker_controller_unittest.cc index db9cf25..b1b8b5cb 100644 --- a/chrome/browser/media/webrtc/desktop_media_picker_controller_unittest.cc +++ b/chrome/browser/media/webrtc/desktop_media_picker_controller_unittest.cc
@@ -54,6 +54,9 @@ MOCK_METHOD(int, GetSourceCount, (), (const)); MOCK_METHOD(Source&, GetSource, (int), (const)); MOCK_METHOD(DesktopMediaList::Type, GetMediaListType, (), (const)); + MOCK_METHOD(bool, IsSourceListDelegated, (), (const)); + MOCK_METHOD(void, FocusList, ()); + MOCK_METHOD(void, HideList, ()); }; class MockDesktopMediaPickerFactory : public DesktopMediaPickerFactory {
diff --git a/chrome/browser/media/webrtc/display_media_access_handler.cc b/chrome/browser/media/webrtc/display_media_access_handler.cc index d84a2b2c..6fd0fd0 100644 --- a/chrome/browser/media/webrtc/display_media_access_handler.cc +++ b/chrome/browser/media/webrtc/display_media_access_handler.cc
@@ -297,6 +297,14 @@ DesktopMediaList::Type::kWebContents, DesktopMediaList::Type::kWindow, DesktopMediaList::Type::kScreen}; + } else if (content::desktop_capture::CanUsePipeWire()) { + // In order to prevent the PipeWire picker from appearing immediately + // (because we start with the first item in the list selected and show the + // PipeWire picker when we select a DesktopMediaList::Type it controls), + // ensure that we initially select "kWebContents". + media_types = {DesktopMediaList::Type::kWebContents, + DesktopMediaList::Type::kWindow, + DesktopMediaList::Type::kScreen}; } else { media_types = {DesktopMediaList::Type::kScreen, DesktopMediaList::Type::kWindow,
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.cc b/chrome/browser/media/webrtc/fake_desktop_media_list.cc index 2bf8011..196a49e 100644 --- a/chrome/browser/media/webrtc/fake_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/fake_desktop_media_list.cc
@@ -96,3 +96,11 @@ void FakeDesktopMediaList::SetPreviewedSource( const absl::optional<content::DesktopMediaID>& id) {} + +bool FakeDesktopMediaList::IsSourceListDelegated() const { + return false; +} + +void FakeDesktopMediaList::FocusList() {} + +void FakeDesktopMediaList::HideList() {}
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.h b/chrome/browser/media/webrtc/fake_desktop_media_list.h index 1e4a652..0f3bc14 100644 --- a/chrome/browser/media/webrtc/fake_desktop_media_list.h +++ b/chrome/browser/media/webrtc/fake_desktop_media_list.h
@@ -38,6 +38,9 @@ DesktopMediaList::Type GetMediaListType() const override; void SetPreviewedSource( const absl::optional<content::DesktopMediaID>& id) override; + bool IsSourceListDelegated() const override; + void FocusList() override; + void HideList() override; private: std::vector<Source> sources_;
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc index d2297c0..bd43dac63 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -21,6 +21,7 @@ #include "chrome/grit/generated_resources.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/desktop_capture.h" #include "content/public/common/content_features.h" #include "media/base/video_util.h" #include "third_party/libyuv/include/libyuv/scale_argb.h" @@ -164,6 +165,8 @@ void RefreshThumbnails(std::vector<DesktopMediaID> native_ids, const gfx::Size& thumbnail_size); + void FocusList(); + void HideList(); private: typedef std::map<DesktopMediaID, uint32_t> ImageHashesMap; @@ -461,6 +464,25 @@ weak_factory_.GetWeakPtr())); } +void NativeDesktopMediaList::Worker::FocusList() { + // If the capturer uses a delegated source list, then we need to ensure that + // its source list is visible. + // If the capturer doesn't use a delegated source list, there's nothing for us + // to do as we're continually querying the list state ourselves. + if (capturer_->GetDelegatedSourceListController()) + capturer_->GetDelegatedSourceListController()->EnsureVisible(); +} + +void NativeDesktopMediaList::Worker::HideList() { + // If the capturer uses a delegated source list, then we need to ensure that + // its source list is hidden. + // If the capturer doesn't use a delegated source list, there's nothing for us + // to do as we want to continually querying the list state ourselves as we + // have been doing. + if (capturer_->GetDelegatedSourceListController()) + capturer_->GetDelegatedSourceListController()->EnsureHidden(); +} + NativeDesktopMediaList::NativeDesktopMediaList( DesktopMediaList::Type type, std::unique_ptr<webrtc::DesktopCapturer> capturer) @@ -475,7 +497,9 @@ : DesktopMediaListBase( base::Milliseconds(kDefaultNativeDesktopMediaListUpdatePeriod)), thread_("DesktopMediaListCaptureThread"), - add_current_process_windows_(add_current_process_windows) { + add_current_process_windows_(add_current_process_windows), + is_source_list_delegated_(capturer->GetDelegatedSourceListController() != + nullptr) { type_ = type; DCHECK(type_ == DesktopMediaList::Type::kWindow || @@ -495,18 +519,67 @@ thread_.task_runner(), weak_factory_.GetWeakPtr(), type, std::move(capturer), add_current_process_windows_); - thread_.task_runner()->PostTask( - FROM_HERE, - base::BindOnce(&Worker::Start, base::Unretained(worker_.get()))); + if (!is_source_list_delegated_) + StartCapturer(); } NativeDesktopMediaList::~NativeDesktopMediaList() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + // This thread should mostly be an idle observer. Stopping it should be fast. base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope allow_thread_join; + + // Since we're on the UI thread (where all tasks to worker_ must have + // posted from), this delete and then immediate stop (which triggers a thread + // join) is safe because it ensures that no other tasks can be queued on the + // thread after worker_'s deletion. thread_.task_runner()->DeleteSoon(FROM_HERE, worker_.release()); thread_.Stop(); } +bool NativeDesktopMediaList::IsSourceListDelegated() const { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + return is_source_list_delegated_; +} + +void NativeDesktopMediaList::StartDelegatedCapturer() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(IsSourceListDelegated()); + StartCapturer(); +} + +void NativeDesktopMediaList::StartCapturer() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(!is_capturer_started_); + // base::Unretained is safe here because we own the lifetime of both the + // worker and the thread and ensure that destroying the worker is the last + // thing the thread does before stopping. + thread_.task_runner()->PostTask( + FROM_HERE, + base::BindOnce(&Worker::Start, base::Unretained(worker_.get()))); + is_capturer_started_ = true; +} + +void NativeDesktopMediaList::FocusList() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + // base::Unretained is safe here because we own the lifetime of both the + // worker and the thread and ensure that destroying the worker is the last + // thing the thread does before stopping. + thread_.task_runner()->PostTask( + FROM_HERE, + base::BindOnce(&Worker::FocusList, base::Unretained(worker_.get()))); +} + +void NativeDesktopMediaList::HideList() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + // base::Unretained is safe here because we own the lifetime of both the + // worker and the thread and ensure that destroying the worker is the last + // thing the thread does before stopping. + thread_.task_runner()->PostTask( + FROM_HERE, + base::BindOnce(&Worker::HideList, base::Unretained(worker_.get()))); +} + void NativeDesktopMediaList::Refresh(bool update_thumnails) { DCHECK(can_refresh()); @@ -516,6 +589,9 @@ new_aura_thumbnail_hashes_.clear(); #endif + // base::Unretained is safe here because we own the lifetime of both the + // worker and the thread and ensure that destroying the worker is the last + // thing the thread does before stopping. thread_.task_runner()->PostTask( FROM_HERE, base::BindOnce(&Worker::Refresh, base::Unretained(worker_.get()), @@ -638,6 +714,9 @@ #if defined(USE_AURA) pending_native_thumbnail_capture_ = true; #endif + // base::Unretained is safe here because we own the lifetime of both the + // worker and the thread and ensure that destroying the worker is the last + // thing the thread does before stopping. thread_.task_runner()->PostTask( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()),
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.h b/chrome/browser/media/webrtc/native_desktop_media_list.h index 9078b12..cce58b86 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.h +++ b/chrome/browser/media/webrtc/native_desktop_media_list.h
@@ -20,7 +20,7 @@ // Implementation of DesktopMediaList that shows native screens and // native windows. -class NativeDesktopMediaList : public DesktopMediaListBase { +class NativeDesktopMediaList final : public DesktopMediaListBase { public: // |capturer| must exist. NativeDesktopMediaList(DesktopMediaList::Type type, @@ -35,6 +35,10 @@ ~NativeDesktopMediaList() override; + bool IsSourceListDelegated() const override; + void FocusList() override; + void HideList() override; + private: typedef std::map<content::DesktopMediaID, uint32_t> ImageHashesMap; @@ -48,6 +52,8 @@ void RefreshForVizFrameSinkWindows(std::vector<SourceDescription> sources, bool update_thumnails); void UpdateNativeThumbnailsFinished(); + void StartDelegatedCapturer() override; + void StartCapturer(); #if defined(USE_AURA) void CaptureAuraWindowThumbnail(const content::DesktopMediaID& id); @@ -60,7 +66,9 @@ // Whether we need to find and add the windows owned by the current process. // If false, the capturer will do this for us. - bool add_current_process_windows_; + const bool add_current_process_windows_; + const bool is_source_list_delegated_ = false; + bool is_capturer_started_ = false; #if defined(USE_AURA) // previous_aura_thumbnail_hashes_ holds thumbanil hash values of aura windows
diff --git a/chrome/browser/media/webrtc/region_capture_browsertest.cc b/chrome/browser/media/webrtc/region_capture_browsertest.cc index d476242..f66eb920 100644 --- a/chrome/browser/media/webrtc/region_capture_browsertest.cc +++ b/chrome/browser/media/webrtc/region_capture_browsertest.cc
@@ -478,7 +478,13 @@ EXPECT_TRUE(tab.CropTo(crop_target, Frame::kTopLevelDocument)); } -IN_PROC_BROWSER_TEST_F(RegionCaptureBrowserTest, CropToWorksForAllElements) { +// https://crbug.com/1358839: Flaky on Mac and Linux +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#define MAYBE_CropToWorksForAllElements DISABLED_CropToWorksForAllElements +#else +#define MAYBE_CropToWorksForAllElements CropToWorksForAllElements +#endif +IN_PROC_BROWSER_TEST_F(RegionCaptureBrowserTest, MAYBE_CropToWorksForAllElements) { // NOTE: this list is intentionally non-exhaustive, but represents a wide // variety of element types. static const std::vector<const char*> kElementTags{"a",
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor.h b/chrome/browser/metrics/chrome_metrics_service_accessor.h index 7a10f3f..0cae34f9 100644 --- a/chrome/browser/metrics/chrome_metrics_service_accessor.h +++ b/chrome/browser/metrics/chrome_metrics_service_accessor.h
@@ -20,6 +20,7 @@ class BrowserProcessImpl; class ChromeMetricsServiceClient; class ChromePasswordManagerClient; +class ChromeProcessSingleton; class HttpsFirstModeService; class NavigationMetricsRecorder; class PrefService; @@ -150,6 +151,7 @@ friend class segmentation_platform::FieldTrialRegisterImpl; friend class ChromeMetricsServiceClient; friend class ChromePasswordManagerClient; + friend class ChromeProcessSingleton; friend void welcome::JoinOnboardingGroup(Profile* profile); friend class NavigationMetricsRecorder; friend class ChromeBrowserMainExtraPartsGpu;
diff --git a/chrome/browser/net/system_network_context_manager_browsertest.cc b/chrome/browser/net/system_network_context_manager_browsertest.cc index 2a723af..05f9cf5 100644 --- a/chrome/browser/net/system_network_context_manager_browsertest.cc +++ b/chrome/browser/net/system_network_context_manager_browsertest.cc
@@ -261,10 +261,10 @@ private: std::string GetComponentContents() const { - return "{\"owner\": \"https://a.test\", \"members\": [ " - "\"https://b.test\", \"https://member1.test\"]}\n" - "{\"owner\": \"https://c.test\", \"members\": [ " - "\"https://d.test\", \"https://member2.test\"]}"; + return "{\"primary\": \"https://a.test\", \"associatedSites\": [ " + "\"https://b.test\", \"https://associatedsite1.test\"]}\n" + "{\"primary\": \"https://c.test\", \"associatedSites\": [ " + "\"https://d.test\", \"https://associatedsite2.test\"]}"; } base::test::ScopedFeatureList feature_list_;
diff --git a/chrome/browser/policy/messaging_layer/upload/record_handler_impl_unittest.cc b/chrome/browser/policy/messaging_layer/upload/record_handler_impl_unittest.cc index ce48ad2..6305cfb 100644 --- a/chrome/browser/policy/messaging_layer/upload/record_handler_impl_unittest.cc +++ b/chrome/browser/policy/messaging_layer/upload/record_handler_impl_unittest.cc
@@ -42,11 +42,9 @@ using ::testing::Gt; using ::testing::Invoke; using ::testing::IsEmpty; -using ::testing::MockFunction; using ::testing::Not; using ::testing::Property; using ::testing::Return; -using ::testing::StrictMock; using ::testing::WithArgs; namespace reporting { @@ -69,8 +67,6 @@ return arg.ValueOrDie().force_confirm == expected.force_confirm; } -using TestEncryptionKeyAttached = MockFunction<void(SignedEncryptionInfo)>; - class RecordHandlerImplTest : public ::testing::TestWithParam< ::testing::tuple</*need_encryption_key*/ bool, /*force_confirm*/ bool>> { @@ -144,7 +140,7 @@ RecordHandlerImpl handler; handler.HandleRecords(need_encryption_key(), std::move(test_records.second), std::move(test_records.first), responder_event.cb(), - encryption_key_attached_event.cb()); + encryption_key_attached_event.repeating_cb()); if (need_encryption_key()) { EXPECT_THAT( encryption_key_attached_event.result(), @@ -183,7 +179,7 @@ RecordHandlerImpl handler; handler.HandleRecords(need_encryption_key(), std::move(test_records.second), std::move(test_records.first), responder_event.cb(), - encryption_key_attached_event.cb()); + encryption_key_attached_event.repeating_cb()); auto response = responder_event.result(); EXPECT_EQ(response.status().error_code(), error::INTERNAL); @@ -220,7 +216,7 @@ RecordHandlerImpl handler; handler.HandleRecords(need_encryption_key(), std::move(test_records.second), std::move(test_records.first), responder_event.cb(), - encryption_key_attached_event.cb()); + encryption_key_attached_event.repeating_cb()); auto response = responder_event.result(); EXPECT_EQ(response.status().error_code(), error::INTERNAL); @@ -245,7 +241,7 @@ RecordHandlerImpl handler; handler.HandleRecords(need_encryption_key(), std::move(test_records.second), std::move(test_records.first), responder_event.cb(), - encryption_key_attached_event.cb()); + encryption_key_attached_event.repeating_cb()); auto response = responder_event.result(); EXPECT_EQ(response.status().error_code(), error::FAILED_PRECONDITION); @@ -263,23 +259,19 @@ std::move(ResponseBuilder().SetNull(true)))); test::TestEvent<DmServerUploadService::CompletionResponse> response_event; - - StrictMock<TestEncryptionKeyAttached> encryption_key_attached; - EXPECT_CALL(encryption_key_attached, Call(_)).Times(0); - - auto encryption_key_attached_callback = - base::BindRepeating(&TestEncryptionKeyAttached::Call, - base::Unretained(&encryption_key_attached)); + test::TestEvent<SignedEncryptionInfo> encryption_key_attached_event; RecordHandlerImpl handler; handler.HandleRecords(need_encryption_key(), std::move(test_records.second), std::move(test_records.first), response_event.cb(), - encryption_key_attached_callback); + encryption_key_attached_event.repeating_cb()); const auto response = response_event.result(); EXPECT_THAT(response, Property(&DmServerUploadService::CompletionResponse::status, Property(&Status::error_code, Eq(error::DATA_LOSS)))); + + EXPECT_TRUE(encryption_key_attached_event.no_result()); } TEST_P(RecordHandlerImplTest, UploadsGapRecordOnServerFailure) { @@ -308,26 +300,26 @@ } test::TestEvent<DmServerUploadService::CompletionResponse> response_event; - - StrictMock<TestEncryptionKeyAttached> encryption_key_attached; - EXPECT_CALL( - encryption_key_attached, - Call(AllOf(Property(&SignedEncryptionInfo::public_asymmetric_key, - Not(IsEmpty())), - Property(&SignedEncryptionInfo::public_key_id, Gt(0)), - Property(&SignedEncryptionInfo::signature, Not(IsEmpty()))))) - .Times(need_encryption_key() ? 1 : 0); - auto encryption_key_attached_callback = - base::BindRepeating(&TestEncryptionKeyAttached::Call, - base::Unretained(&encryption_key_attached)); + test::TestEvent<SignedEncryptionInfo> encryption_key_attached_event; RecordHandlerImpl handler; handler.HandleRecords(need_encryption_key(), std::move(test_records.second), std::move(test_records.first), response_event.cb(), - encryption_key_attached_callback); + encryption_key_attached_event.repeating_cb()); const auto response = response_event.result(); EXPECT_THAT(response, ResponseEquals(expected_response)); + + if (need_encryption_key()) { + EXPECT_THAT( + encryption_key_attached_event.result(), + AllOf(Property(&SignedEncryptionInfo::public_asymmetric_key, + Not(IsEmpty())), + Property(&SignedEncryptionInfo::public_key_id, Gt(0)), + Property(&SignedEncryptionInfo::signature, Not(IsEmpty())))); + } else { + EXPECT_TRUE(encryption_key_attached_event.no_result()); + } } // There may be cases where the server and the client do not align in the @@ -346,24 +338,20 @@ std::move(callback).Run(base::Value::Dict()); }))); - StrictMock<TestEncryptionKeyAttached> encryption_key_attached; + test::TestEvent<SignedEncryptionInfo> encryption_key_attached_event; test::TestEvent<DmServerUploadService::CompletionResponse> response_event; - EXPECT_CALL(encryption_key_attached, Call(_)).Times(0); - - auto encryption_key_attached_callback = - base::BindRepeating(&TestEncryptionKeyAttached::Call, - base::Unretained(&encryption_key_attached)); - RecordHandlerImpl handler; handler.HandleRecords(need_encryption_key(), std::move(test_records.second), std::move(test_records.first), response_event.cb(), - encryption_key_attached_callback); + encryption_key_attached_event.repeating_cb()); const auto response = response_event.result(); EXPECT_THAT(response, Property(&DmServerUploadService::CompletionResponse::status, Property(&Status::error_code, Eq(error::INTERNAL)))); + + EXPECT_TRUE(encryption_key_attached_event.no_result()); } TEST_P(RecordHandlerImplTest, AssignsRequestIdForRecordUploads) {
diff --git a/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc b/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc index 68f5ffb..b665dfca 100644 --- a/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc +++ b/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc
@@ -3,7 +3,6 @@ // found in the LICENSE file. #include "chrome/browser/policy/messaging_layer/upload/upload_client.h" -#include "chrome/browser/policy/messaging_layer/util/test_request_payload.h" #include <tuple> @@ -19,6 +18,7 @@ #include "chrome/browser/policy/messaging_layer/upload/record_handler_impl.h" #include "chrome/browser/policy/messaging_layer/util/reporting_server_connector.h" #include "chrome/browser/policy/messaging_layer/util/reporting_server_connector_test_util.h" +#include "chrome/browser/policy/messaging_layer/util/test_request_payload.h" #include "chrome/browser/policy/messaging_layer/util/test_response_payload.h" #include "components/account_id/account_id.h" #include "components/policy/core/common/cloud/dm_token.h" @@ -31,6 +31,8 @@ #include "content/public/browser/browser_thread.h" #include "content/public/test/browser_task_environment.h" #include "services/network/test/test_network_connection_tracker.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chrome/browser/ash/login/users/fake_chrome_user_manager.h" @@ -201,9 +203,7 @@ .WillOnce(MakeUploadEncryptedReportAction( std::move(ResponseBuilder().SetForceConfirm(force_confirm())))); - test::TestMultiEvent<SequenceInformation, bool> upload_success; - UploadClient::ReportSuccessfulUploadCallback upload_success_cb = - upload_success.cb(); + test::TestMultiEvent<SequenceInformation, bool> upload_success_event; // Save last record seq info for verification. const SequenceInformation last_record_seq_info = @@ -218,10 +218,10 @@ auto upload_client = std::move(upload_client_result.ValueOrDie()); auto enqueue_result = upload_client->EnqueueUpload( need_encryption_key(), std::move(records), std::move(total_reservation), - std::move(upload_success_cb), encryption_key_attached_cb); + upload_success_event.repeating_cb(), encryption_key_attached_cb); EXPECT_TRUE(enqueue_result.ok()); - auto upload_success_result = upload_success.result(); + auto upload_success_result = upload_success_event.result(); EXPECT_THAT(std::get<0>(upload_success_result), EqualsProto(last_record_seq_info)); EXPECT_THAT(std::get<1>(upload_success_result), Eq(force_confirm()));
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index a9a32c2..c0a48974 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -771,11 +771,9 @@ #if !BUILDFLAG(IS_CHROMEOS_ASH) // Listen for bookmark model load, to bootstrap the sync service. - // Not necessary for profiles that don't have a BookmarkModel. // On CrOS sync service will be initialized after sign in. BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(this); - if (model) - model->AddObserver(new BookmarkModelLoadedObserver(this)); + model->AddObserver(new BookmarkModelLoadedObserver(this)); #endif HeavyAdServiceFactory::GetForBrowserContext(this)->Initialize(GetPath());
diff --git a/chrome/browser/profiles/profile_keyed_service_browsertest.cc b/chrome/browser/profiles/profile_keyed_service_browsertest.cc index 609a047..ae956d8 100644 --- a/chrome/browser/profiles/profile_keyed_service_browsertest.cc +++ b/chrome/browser/profiles/profile_keyed_service_browsertest.cc
@@ -258,7 +258,9 @@ "BluetoothPrivateAPI", "BluetoothSocketEventDispatcher", "BookmarkManagerPrivateAPI", + "BookmarkModel", "BookmarkSyncServiceFactory", + "BookmarkUndoService", "BookmarksAPI", "BookmarksApiWatcher", "BrailleDisplayPrivateAPI", @@ -321,6 +323,7 @@ "LiveCaptionController", "LoginUIServiceFactory", "MDnsAPI", + "ManagedBookmarkService", "ManagedConfigurationAPI", "ManagementAPI", "MediaRouter",
diff --git a/chrome/browser/resources/settings/autofill_page/credit_card_list_entry.html b/chrome/browser/resources/settings/autofill_page/credit_card_list_entry.html index 930aa800..9ea168b 100644 --- a/chrome/browser/resources/settings/autofill_page/credit_card_list_entry.html +++ b/chrome/browser/resources/settings/autofill_page/credit_card_list_entry.html
@@ -29,14 +29,21 @@ #virtualCardLabel { margin-inline-start: 8px; } + + #cardImage { + margin-inline-end: 16px; + } </style> <div class="list-item"> <div class="type-column"> + <template is="dom-if" if="[[virtualCardMetadataEnabled_]]"> + <img id="cardImage" src="[[creditCard.imageSrc]]" alt=""> + </template> <div class="summary-column"> - <div id = "summaryLabel" class="ellipses"> + <div id="summaryLabel" class="ellipses"> [[creditCard.metadata.summaryLabel]] </div> - <div id = "summarySublabel" + <div id="summarySublabel" hidden$="[[!shouldShowSecondarySublabel_()]]" class="ellipses"> [[getSecondarySublabel_(creditCard.metadata)]] </div>
diff --git a/chrome/browser/resources/settings/chromeos/BUILD.gn b/chrome/browser/resources/settings/chromeos/BUILD.gn index e30115d..bb4d39e1 100644 --- a/chrome/browser/resources/settings/chromeos/BUILD.gn +++ b/chrome/browser/resources/settings/chromeos/BUILD.gn
@@ -114,6 +114,7 @@ "//tools/typescript/definitions/bluetooth.d.ts", "//tools/typescript/definitions/bluetooth_private.d.ts", "//tools/typescript/definitions/metrics_private.d.ts", + "//tools/typescript/definitions/settings_private.d.ts", "types/dom_api.d.ts", ] root_dir = "$target_gen_dir/$preprocessed_ts_folder" @@ -438,7 +439,6 @@ "os_privacy_page:web_components", "os_reset_page:web_components", "os_search_page:web_components", - "settings_scheduler_slider:web_components", ] } @@ -470,7 +470,6 @@ "os_privacy_page:closure_compile_module", "os_reset_page:closure_compile_module", "os_search_page:closure_compile_module", - "settings_scheduler_slider:closure_compile_module", ] }
diff --git a/chrome/browser/resources/settings/chromeos/device_page/BUILD.gn b/chrome/browser/resources/settings/chromeos/device_page/BUILD.gn index f7d2971..d8f7713 100644 --- a/chrome/browser/resources/settings/chromeos/device_page/BUILD.gn +++ b/chrome/browser/resources/settings/chromeos/device_page/BUILD.gn
@@ -71,7 +71,6 @@ "..:os_route", "..:route_observer_behavior", "../..:router", - "../settings_scheduler_slider:settings_scheduler_slider", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", "//ui/webui/resources/js:cr.m", ]
diff --git a/chrome/browser/resources/settings/chromeos/os_a11y_page/keyboard_and_text_input_page.js b/chrome/browser/resources/settings/chromeos/os_a11y_page/keyboard_and_text_input_page.js index 9724a618..31b603d 100644 --- a/chrome/browser/resources/settings/chromeos/os_a11y_page/keyboard_and_text_input_page.js +++ b/chrome/browser/resources/settings/chromeos/os_a11y_page/keyboard_and_text_input_page.js
@@ -51,6 +51,17 @@ ], PolymerElement); +/** + * @typedef {{ + * name: string, + * value: string, + * worksOffline: boolean, + * installed: boolean, + * recommended: boolean + * }} + */ +let LocaleInfo; + /** @polymer */ class SettingsKeyboardAndTextInputPageElement extends SettingsKeyboardAndTextInputPageElementBase { @@ -83,6 +94,46 @@ }, }, + /** @protected */ + dictationLocaleMenuSubtitle_: { + type: String, + computed: 'computeDictationLocaleSubtitle_(' + + 'dictationLocaleOptions_, ' + + 'prefs.settings.a11y.dictation_locale.value, ' + + 'dictationLocaleSubtitleOverride_)', + }, + + /** + * @type {!Array<!LocaleInfo>} + * @protected + */ + dictationLocaleOptions_: { + type: Array, + value() { + return []; + }, + }, + + /** @protected */ + dictationLocalesList_: { + type: Array, + value() { + return []; + }, + }, + + /** @protected */ + showDictationLocaleMenu_: { + type: Boolean, + value: false, + }, + + /** @protected */ + dictationLearnMoreUrl_: { + type: String, + value: 'https://support.google.com/chromebook?p=text_dictation_m100', + }, + /** * Used by DeepLinkingBehavior to focus this page's deep links. * @type {!Set<!Setting>} @@ -111,11 +162,23 @@ /** @private {!KeyboardAndTextInputPageBrowserProxy} */ this.keyboardAndTextInputBrowserProxy_ = KeyboardAndTextInputPageBrowserProxyImpl.getInstance(); + + /** @private {string} */ + this.dictationLocaleSubtitleOverride_ = ''; + + /** @private {boolean} */ + this.useDictationLocaleSubtitleOverride_ = false; } /** @override */ ready() { super.ready(); + this.addWebUIListener( + 'dictation-locale-menu-subtitle-changed', + (result) => this.onDictationLocaleMenuSubtitleChanged_(result)); + this.addWebUIListener( + 'dictation-locales-set', + (locales) => this.onDictationLocalesSet_(locales)); this.keyboardAndTextInputBrowserProxy_.keyboardAndTextInputPageReady(); const r = routes; @@ -166,6 +229,97 @@ 'Accessibility.CaretBrowsing.DisableWithSettings'); } } + + /** + * @param {string} subtitle + * @private + */ + onDictationLocaleMenuSubtitleChanged_(subtitle) { + this.useDictationLocaleSubtitleOverride_ = true; + this.dictationLocaleSubtitleOverride_ = subtitle; + } + + + /** + * Saves a list of locales and updates the UI to reflect the list. + * @param {!Array<!LocaleInfo>} locales + * @private + */ + onDictationLocalesSet_(locales) { + this.dictationLocalesList_ = locales; + this.onDictationLocalesChanged_(); + } + + /** + * Converts an array of locales and their human-readable equivalents to + * an array of menu options. + * TODO(crbug.com/1195916): Use 'offline' to indicate to the user which + * locales work offline with an icon in the select options. + * @private + */ + onDictationLocalesChanged_() { + const currentLocale = + this.get('prefs.settings.a11y.dictation_locale.value'); + this.dictationLocaleOptions_ = + this.dictationLocalesList_.map((localeInfo) => { + return { + name: localeInfo.name, + value: localeInfo.value, + worksOffline: localeInfo.worksOffline, + installed: localeInfo.installed, + recommended: + localeInfo.recommended || localeInfo.value === currentLocale, + }; + }); + } + + /** + * Calculates the Dictation locale subtitle based on the current + * locale from prefs and the offline availability of that locale. + * @return {string} + * @private + */ + computeDictationLocaleSubtitle_() { + if (this.useDictationLocaleSubtitleOverride_) { + // Only use the subtitle override once, since we still want the subtitle + // to repsond to changes to the dictation locale. + this.useDictationLocaleSubtitleOverride_ = false; + return this.dictationLocaleSubtitleOverride_; + } + + const currentLocale = + this.get('prefs.settings.a11y.dictation_locale.value'); + const locale = this.dictationLocaleOptions_.find( + (element) => element.value === currentLocale); + if (!locale) { + return ''; + } + + if (!locale.worksOffline) { + // If a locale is not supported offline, then use the network subtitle. + return this.i18n('dictationLocaleSubLabelNetwork', locale.name); + } + + if (!locale.installed) { + // If a locale is supported offline, but isn't installed, then use the + // temporary network subtitle. + return this.i18n( + 'dictationLocaleSubLabelNetworkTemporarily', locale.name); + } + + // If we get here, we know a locale is both supported offline and installed. + return this.i18n('dictationLocaleSubLabelOffline', locale.name); + } + + /** @private */ + onChangeDictationLocaleButtonClicked_() { + this.showDictationLocaleMenu_ = true; + } + + /** @private */ + onChangeDictationLocalesDialogClosed_() { + this.showDictationLocaleMenu_ = false; + } } customElements.define(
diff --git a/chrome/browser/resources/settings/chromeos/os_bluetooth_page/os_bluetooth_devices_subpage.html b/chrome/browser/resources/settings/chromeos/os_bluetooth_page/os_bluetooth_devices_subpage.html index c52c00c..3e795bd 100644 --- a/chrome/browser/resources/settings/chromeos/os_bluetooth_page/os_bluetooth_devices_subpage.html +++ b/chrome/browser/resources/settings/chromeos/os_bluetooth_page/os_bluetooth_devices_subpage.html
@@ -81,10 +81,10 @@ on-click="onClicked_"> </cr-link-row> </template> -<div class="device-lists-separator"></div> <template is="dom-if" if="[[isFastPairToggleVisible_(isFastPairSupportedByDevice_)]]"> + <div class="device-lists-separator"></div> <settings-fast-pair-toggle prefs="{{prefs}}" id="enableFastPairToggle" deep-link-focus-id$="[[Setting.kFastPairOnOff]]">
diff --git a/chrome/browser/resources/settings/chromeos/os_settings.gni b/chrome/browser/resources/settings/chromeos/os_settings.gni index 155238f..ec68222 100644 --- a/chrome/browser/resources/settings/chromeos/os_settings.gni +++ b/chrome/browser/resources/settings/chromeos/os_settings.gni
@@ -37,6 +37,7 @@ "chromeos/os_toolbar/os_toolbar.ts", "chromeos/parental_controls_page/parental_controls_page.ts", "chromeos/personalization_page/personalization_page.ts", + "chromeos/settings_scheduler_slider/settings_scheduler_slider.ts", ] # Files that are passed as input to html_to_wrapper(). @@ -341,7 +342,6 @@ "chromeos/os_search_page/search_engine.js", "chromeos/os_search_page/search_subpage.js", "chromeos/os_settings_icons_css.js", - "chromeos/settings_scheduler_slider/settings_scheduler_slider.js", ] mojom_webui_files = [
diff --git a/chrome/browser/resources/settings/chromeos/settings_scheduler_slider/BUILD.gn b/chrome/browser/resources/settings/chromeos/settings_scheduler_slider/BUILD.gn deleted file mode 100644 index 0995902e..0000000 --- a/chrome/browser/resources/settings/chromeos/settings_scheduler_slider/BUILD.gn +++ /dev/null
@@ -1,26 +0,0 @@ -# Copyright 2021 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//third_party/closure_compiler/compile_js.gni") -import("//tools/polymer/html_to_js.gni") -import("../os_settings.gni") - -js_type_check("closure_compile_module") { - closure_flags = os_settings_closure_flags - is_polymer3 = true - deps = [ ":settings_scheduler_slider" ] -} - -js_library("settings_scheduler_slider") { - deps = [ - "..:prefs_behavior", - "//third_party/polymer/v3_0/components-chromium/iron-resizable-behavior:iron-resizable-behavior", - "//third_party/polymer/v3_0/components-chromium/paper-behaviors:paper-ripple-behavior", - "//ui/webui/resources/js:i18n_behavior.m", - ] -} - -html_to_js("web_components") { - js_files = [ "settings_scheduler_slider.js" ] -}
diff --git a/chrome/browser/resources/settings/chromeos/settings_scheduler_slider/settings_scheduler_slider.js b/chrome/browser/resources/settings/chromeos/settings_scheduler_slider/settings_scheduler_slider.ts similarity index 71% rename from chrome/browser/resources/settings/chromeos/settings_scheduler_slider/settings_scheduler_slider.js rename to chrome/browser/resources/settings/chromeos/settings_scheduler_slider/settings_scheduler_slider.ts index a26a3a8..454ba5c 100644 --- a/chrome/browser/resources/settings/chromeos/settings_scheduler_slider/settings_scheduler_slider.js +++ b/chrome/browser/resources/settings/chromeos/settings_scheduler_slider/settings_scheduler_slider.ts
@@ -10,33 +10,44 @@ import '../../settings_shared.css.js'; -import {I18nBehavior, I18nBehaviorInterface} from 'chrome://resources/js/i18n_behavior.m.js'; +import {I18nMixin, I18nMixinInterface} from 'chrome://resources/js/i18n_mixin.js'; import {IronResizableBehavior} from 'chrome://resources/polymer/v3_0/iron-resizable-behavior/iron-resizable-behavior.js'; import {PaperRippleBehavior} from 'chrome://resources/polymer/v3_0/paper-behaviors/paper-ripple-behavior.js'; -import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {PaperRippleElement} from 'chrome://resources/polymer/v3_0/paper-ripple/paper-ripple.js'; +import {mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {PrefsBehavior, PrefsBehaviorInterface} from '../prefs_behavior.js'; -/** @interface */ -class PaperRippleBehaviorInterface { - constructor() { - /** - * @type {?Object} - * @protected - */ - this._ripple; +import {getTemplate} from './settings_scheduler_slider.html.js'; - /** - * @type {?Element} - * @protected - */ - this._rippleContainer; - } +interface SettingsSchedulerSliderElement { + $: { + dummyRippleContainer: HTMLDivElement, + endKnob: HTMLDivElement, + endLabel: HTMLDivElement, + endProgress: HTMLDivElement, + markersContainer: HTMLDivElement, + sliderBar: HTMLDivElement, + sliderContainer: HTMLDivElement, + startKnob: HTMLDivElement, + startLabel: HTMLDivElement, + startProgress: HTMLDivElement, + }; +} - /** @return {boolean} */ - hasRipple() {} +type TrackEvent = CustomEvent<{ + state: string, + x: number, + y: number, + dx: number, + dy: number, + ddx: number, + ddy: number, +}>; - ensureRipple() {} +interface PrefObject extends chrome.settingsPrivate.PrefObject { + type: chrome.settingsPrivate.PrefType.NUMBER; + value: number; } const HOURS_PER_DAY = 24; @@ -59,26 +70,19 @@ * integer (0 <= z < y). * * For example (-1 % 24) equals -1 whereas modulo(-1, 24) equals 23. - * @param {number} x - * @param {number} y - * @return {number} */ -function modulo(x, y) { +function modulo(x: number, y: number): number { return ((x % y) + y) % y; } -/** - * @constructor - * @extends {PolymerElement} - * @implements {I18nBehaviorInterface} - * @implements {PrefsBehaviorInterface} - * @implements {PaperRippleBehaviorInterface} - */ -const SettingsSchedulerSliderElementBase = mixinBehaviors( - [I18nBehavior, PrefsBehavior, IronResizableBehavior, PaperRippleBehavior], - PolymerElement); +const SettingsSchedulerSliderElementBase = + mixinBehaviors( + [PrefsBehavior, IronResizableBehavior, PaperRippleBehavior], + I18nMixin(PolymerElement)) as { + new (): PolymerElement & I18nMixinInterface & PrefsBehaviorInterface & + IronResizableBehavior & PaperRippleBehavior, + }; -/** @polymer */ class SettingsSchedulerSliderElement extends SettingsSchedulerSliderElementBase { static get is() { @@ -86,14 +90,13 @@ } static get template() { - return html`{__html_template__}`; + return getTemplate(); } static get properties() { return { /** * The start time pref object being tracked. - * @type {!chrome.settingsPrivate.PrefObject} */ prefStartTime: { type: Object, @@ -109,14 +112,13 @@ /** * The end time pref object being tracked. - * @type {!chrome.settingsPrivate.PrefObject} */ prefEndTime: { type: Object, notify: true, value() { return { - key: 'ash.fake_feature.custom_start_time', + key: 'ash.fake_feature.custom_end_time', type: chrome.settingsPrivate.PrefType.NUMBER, value: DEFAULT_CUSTOM_END_TIME, }; @@ -125,20 +127,17 @@ /** * Whether the element is ready and fully rendered. - * @private */ isReady_: Boolean, /** * Whether the window is in RTL locales. - * @private */ isRTL_: Boolean, /** * Whether to use the 24-hour format for the time shown in the label * bubbles. - * @private */ shouldUse24Hours_: Boolean, }; @@ -152,23 +151,26 @@ ]; } + prefStartTime: PrefObject; + prefEndTime: PrefObject; + private dragObject_: HTMLElement|null; + private isReady_: boolean; + private isRTL_: boolean; + /* eslint-disable-next-line @typescript-eslint/naming-convention */ + private _ripple: PaperRippleElement|null; + private shouldUse24Hours_: boolean; + private valueAtDragStart_?: number; + constructor() { super(); /** * The object currently being dragged. Either the start or end knobs. - * @type {Element} - * @private */ this.dragObject_ = null; - - /** - * @private {number} - */ - this.valueAtDragStart_; } - ready() { + override ready() { super.ready(); this.addEventListener('iron-resize', this.onResize_); @@ -177,8 +179,7 @@ this.addEventListener('keydown', this.onKeyDown_); } - /** @override */ - connectedCallback() { + override connectedCallback() { super.connectedCallback(); this.isRTL_ = window.getComputedStyle(this).direction === 'rtl'; @@ -198,23 +199,18 @@ }); } - /** - * @return {boolean} - * @private - */ - prefsAvailable() { + private prefsAvailable_(): boolean { return [this.prefStartTime, this.prefEndTime].every( pref => pref !== undefined); } - /** @private */ - updateMarkers_() { - if (!this.isReady_ || !this.prefsAvailable()) { + private updateMarkers_() { + if (!this.isReady_ || !this.prefsAvailable_()) { return; } - const startHour = (/** @type {number} */ (this.prefStartTime.value)) / 60.0; - const endHour = (/** @type {number} */ (this.prefEndTime.value)) / 60.0; + const startHour = this.prefStartTime.value / 60.0; + const endHour = this.prefEndTime.value / 60.0; const markersContainer = this.$.markersContainer; markersContainer.innerHTML = ''; @@ -240,96 +236,87 @@ /** * Return true if the start knob is focused. - * @return {boolean} - * @private */ - isStartKnobFocused_() { - return (this.shadowRoot.activeElement === this.$.startKnob); + private isStartKnobFocused_(): boolean { + return this.shadowRoot!.activeElement === this.$.startKnob; } /** * Return true if the end knob is focused. - * @return {boolean} - * @private */ - isEndKnobFocused_() { - return (this.shadowRoot.activeElement === this.$.endKnob); + private isEndKnobFocused_(): boolean { + return this.shadowRoot!.activeElement === this.$.endKnob; + } + + /** + * Return whether either of the two knobs is focused. + */ + private isEitherKnobFocused_() { + return this.isStartKnobFocused_() || this.isEndKnobFocused_(); } /** * Invoked when the element is resized and the knobs positions need to be * updated. - * @private */ - onResize_() { + private onResize_() { this.updateKnobs_(); } /** * Called when the value of the pref associated with whether to use the * 24-hour clock format is changed. This will also refresh the slider. - * @private */ - hourFormatChanged_() { - this.shouldUse24Hours_ = /** @type {boolean} */ ( - this.getPref('settings.clock.use_24hour_clock').value); + private hourFormatChanged_() { + this.shouldUse24Hours_ = + this.getPref('settings.clock.use_24hour_clock').value; } /** * Gets the style of legend div determining its absolute left position. - * @param {number} percent The value of the div's left as a percent (0 - 100). - * @param {boolean} isRTL whether window is in RTL locale. - * @return {string} The CSS style of the legend div. - * @private + * @param percent The value of the div's left as a percent (0 - 100). + * @param isRTL whether window is in RTL locale. + * @return The CSS style of the legend div. */ - getLegendStyle_(percent, isRTL) { + private getLegendStyle_(percent: number, isRTL: boolean): string { percent = isRTL ? 100 - percent : percent; return 'left: ' + percent + '%'; } /** * Gets the aria label for the start time knob. - * @return {string} The start time string to be announced. - * @private + * @return The start time string to be announced. */ - getAriaLabelStartTime_() { + private getAriaLabelStartTime_(): string { return this.i18n( 'startTime', - this.getTimeString_( - /** @type {number} */ (this.prefStartTime.value), - this.shouldUse24Hours_)); + this.getTimeString_(this.prefStartTime.value, this.shouldUse24Hours_)); } /** * Gets the aria label for the end time knob. - * @return {string} The end time string to be announced. - * @private + * @return The end time string to be announced. */ - getAriaLabelEndTime_() { + private getAriaLabelEndTime_(): string { return this.i18n( 'endTime', - this.getTimeString_( - /** @type {number} */ (this.prefEndTime.value), - this.shouldUse24Hours_)); + this.getTimeString_(this.prefEndTime.value, this.shouldUse24Hours_)); } /** * If one of the two knobs is focused, this function blurs it. - * @private */ - blurAnyFocusedKnob_() { + private blurAnyFocusedKnob_() { if (this.isEitherKnobFocused_()) { - this.shadowRoot.activeElement.blur(); + (this.shadowRoot!.activeElement as HTMLElement).blur(); } } /** * Start dragging the target knob. - * @param {!Event} event - * @private */ - startDrag_(event) { + private startDrag_(event: Event) { event.preventDefault(); // Only handle start or end knobs. Use the "knob-inner" divs just to display @@ -337,12 +324,12 @@ if (event.target === this.$.startKnob || event.target === this.$.startKnob.firstElementChild) { this.dragObject_ = this.$.startKnob; - this.valueAtDragStart_ = /** @type {number} */ (this.prefStartTime.value); + this.valueAtDragStart_ = this.prefStartTime.value; } else if ( event.target === this.$.endKnob || event.target === this.$.endKnob.firstElementChild) { this.dragObject_ = this.$.endKnob; - this.valueAtDragStart_ = /** @type {number} */ (this.prefEndTime.value); + this.valueAtDragStart_ = this.prefEndTime.value; } else { return; } @@ -352,10 +339,8 @@ /** * Continues dragging the selected knob if any. - * @param {!Event} event - * @private */ - continueDrag_(event) { + private continueDrag_(event: TrackEvent) { if (!this.dragObject_) { return; } @@ -376,11 +361,8 @@ /** * Converts horizontal pixels into number of minutes. - * @param {number} deltaX - * @return {number} - * @private */ - getDeltaMinutes_(deltaX) { + private getDeltaMinutes_(deltaX: number): number { return (this.isRTL_ ? -1 : 1) * Math.floor( TOTAL_MINUTES_PER_DAY * deltaX / this.$.sliderBar.offsetWidth); @@ -390,10 +372,8 @@ * Updates the knob's corresponding pref value in response to dragging, which * will in turn update the location of the knob and its corresponding label * bubble and its text contents. - * @param {!Event} event - * @private */ - doKnobTracking_(event) { + private doKnobTracking_(event: TrackEvent) { const lastDeltaMinutes = this.getDeltaMinutes_(event.detail.ddx); if (Math.abs(lastDeltaMinutes) < 1) { return; @@ -405,15 +385,13 @@ // delta minutes from |dx| will provide a stable update that will not lose // pixel movement due to rounding. this.updatePref_( - this.valueAtDragStart_ + this.getDeltaMinutes_(event.detail.dx), true); + this.valueAtDragStart_! + this.getDeltaMinutes_(event.detail.dx), true); } /** * Ends the dragging. - * @param {!Event} event - * @private */ - endDrag_(event) { + private endDrag_(event: TrackEvent) { event.preventDefault(); this.dragObject_ = null; this.removeRipple_(); @@ -422,24 +400,21 @@ /** * Gets the given knob's offset ratio with respect to its parent element * (which is the slider bar). - * @param {HTMLDivElement|Element} knob Either one of the two knobs. - * @return {number} - * @private + * @param knob Either one of the two knobs. */ - getKnobRatio_(knob) { + private getKnobRatio_(knob: HTMLElement): number { return parseFloat(knob.style.left) / this.$.sliderBar.offsetWidth; } /** * Converts the time of day, given as |hour| and |minutes|, to its language- * sensitive time string representation. - * @param {number} hour The hour of the day (0 - 23). - * @param {number} minutes The minutes of the hour (0 - 59). - * @param {boolean} shouldUse24Hours Whether to use the 24-hour time format. - * @return {string} - * @private + * @param hour The hour of the day (0 - 23). + * @param minutes The minutes of the hour (0 - 59). + * @param shouldUse24Hours Whether to use the 24-hour time format. */ - getLocaleTimeString_(hour, minutes, shouldUse24Hours) { + private getLocaleTimeString_( + hour: number, minutes: number, shouldUse24Hours: boolean): string { const d = new Date(); d.setHours(hour); d.setMinutes(minutes); @@ -454,13 +429,12 @@ /** * Converts the |offsetMinutes| value (which the number of minutes since * 00:00) to its language-sensitive time string representation. - * @param {number} offsetMinutes The time of day represented as the number of - * minutes from 00:00. - * @param {boolean} shouldUse24Hours Whether to use the 24-hour time format. - * @return {string} - * @private + * @param offsetMinutes The time of day represented as the number of + * minutes from 00:00. + * @param shouldUse24Hours Whether to use the 24-hour time format. */ - getTimeString_(offsetMinutes, shouldUse24Hours) { + private getTimeString_(offsetMinutes: number, shouldUse24Hours: boolean): + string { const hour = Math.floor(offsetMinutes / 60); const minute = Math.floor(offsetMinutes % 60); return this.getLocaleTimeString_(hour, minute, shouldUse24Hours); @@ -469,22 +443,17 @@ /** * Using the current start and end times prefs, this function updates the * knobs and their label bubbles and refreshes the slider. - * @private */ - updateKnobs_() { - if (!this.isReady_ || !this.prefsAvailable() || + private updateKnobs_() { + if (!this.isReady_ || !this.prefsAvailable_() || this.$.sliderBar.offsetWidth === 0) { return; } - /** @type {number} */ - const startOffsetMinutes = - /** @type {number} */ (this.prefStartTime.value); + const startOffsetMinutes: number = this.prefStartTime.value; this.updateKnobLeft_(this.$.startKnob, startOffsetMinutes); - /** @type {number} */ - const endOffsetMinutes = - /** @type {number} */ (this.prefEndTime.value); + const endOffsetMinutes: number = this.prefEndTime.value; this.updateKnobLeft_(this.$.endKnob, endOffsetMinutes); this.refresh_(); @@ -493,11 +462,8 @@ /** * Updates the absolute left coordinate of the given |knob| based on the time * it represents given as an |offsetMinutes| value. - * @param {HTMLDivElement|Element} knob - * @param {number} offsetMinutes - * @private */ - updateKnobLeft_(knob, offsetMinutes) { + private updateKnobLeft_(knob: HTMLElement, offsetMinutes: number) { const offsetAfter6pm = (offsetMinutes + TOTAL_MINUTES_PER_DAY - OFFSET_MINUTES_6PM) % TOTAL_MINUTES_PER_DAY; @@ -520,9 +486,8 @@ /** * Refreshes elements of the slider other than the knobs (the label bubbles, * and the progress bar). - * @private */ - refresh_() { + private refresh_() { // The label bubbles have the same left coordinates as their corresponding // knobs. this.$.startLabel.style.left = this.$.startKnob.style.left; @@ -538,22 +503,22 @@ // The end progress bar starts from either the start knob or the start of // the slider (whichever is to its left) and ends at the end knob. - const endProgressLeft = startKnob.offsetLeft >= endKnob.offsetLeft ? - '0px' : - startKnob.style.left; - endProgress.style.left = endProgressLeft; + const endProgressLeft: number = startKnob.offsetLeft >= endKnob.offsetLeft ? + 0 : + parseFloat(startKnob.style.left); + endProgress.style.left = `${endProgressLeft}px`; endProgress.style.width = - (parseFloat(endKnob.style.left) - parseFloat(endProgressLeft)) + 'px'; + `${parseFloat(endKnob.style.left) - endProgressLeft}px`; // The start progress bar starts at the start knob, and ends at either the // end knob or the end of the slider (whichever is to its right). - const startProgressRight = endKnob.offsetLeft < startKnob.offsetLeft ? + const startProgressRight: number = + endKnob.offsetLeft < startKnob.offsetLeft ? this.$.sliderBar.offsetWidth : - endKnob.style.left; + parseFloat(endKnob.style.left); startProgress.style.left = startKnob.style.left; startProgress.style.width = - (parseFloat(startProgressRight) - parseFloat(startKnob.style.left)) + - 'px'; + `${startProgressRight - parseFloat(startKnob.style.left)}px`; this.fixLabelsOverlapIfAny_(); } @@ -561,9 +526,8 @@ /** * If the label bubbles overlap, this function fixes them by moving the end * label up a little. - * @private */ - fixLabelsOverlapIfAny_() { + private fixLabelsOverlapIfAny_() { const startLabel = this.$.startLabel; const endLabel = this.$.endLabel; const distance = Math.abs( @@ -580,15 +544,13 @@ /** * Return the value of the pref that corresponds to the other knob than - * `this.shadowRoot.activeElement` - * @return {number} - * @private + * `this.shadowRoot!.activeElement` */ - getOtherKnobPrefValue_() { + private getOtherKnobPrefValue_(): number { if (this.isStartKnobFocused_()) { - return /** @type {number} */ (this.prefEndTime.value); + return this.prefEndTime.value; } - return /** @type {number} */ (this.prefStartTime.value); + return this.prefStartTime.value; } /** @@ -615,11 +577,8 @@ * distance of 1 hour, the start knob is at 8:00 am, and the end knob is at * 7:00, if the start knob value is decreased, then the start knob will be * updated to 6:00. - * @param {number} updatedValue - * @param {boolean} fromUserGesture - * @private */ - updatePref_(updatedValue, fromUserGesture) { + private updatePref_(updatedValue: number, fromUserGesture: boolean) { const otherValue = this.getOtherKnobPrefValue_(); const totalMinutes = TOTAL_MINUTES_PER_DAY; @@ -640,38 +599,25 @@ } } - /** - * @param {Element} knob - * @returns {?number} - * @private - */ - getPrefValue(knob) { + private getPrefValue_(): number|null { if (this.isStartKnobFocused_()) { - return /** @type {number} */ (this.prefStartTime.value); + return this.prefStartTime.value; } else if (this.isEndKnobFocused_()) { - return /** @type {number} */ (this.prefEndTime.value); + return this.prefEndTime.value; } else { return null; } } /** - * @return {boolean} Whether either of the two knobs is focused. - * @private - */ - isEitherKnobFocused_() { - return this.isStartKnobFocused_() || this.isEndKnobFocused_(); - } - - /** * Overrides _createRipple() from PaperRippleBehavior to create the ripple * only on a knob if it's focused, or on a dummy hidden element so that it * doesn't show. - * @protected */ - _createRipple() { + /* eslint-disable-next-line @typescript-eslint/naming-convention */ + override _createRipple() { if (this.isEitherKnobFocused_()) { - this._rippleContainer = this.shadowRoot.activeElement; + this._rippleContainer = this.shadowRoot!.activeElement as HTMLElement; } else { // We can't just skip the ripple creation and return early with null here. // The code inherited from PaperRippleBehavior expects that this function @@ -679,18 +625,14 @@ // to be created under a hidden element. this._rippleContainer = this.$.dummyRippleContainer; } - const ripple = PaperRippleBehavior._createRipple(); + const ripple = super._createRipple(); ripple.id = 'ink'; ripple.setAttribute('recenters', ''); ripple.classList.add('circle', 'toggle-ink'); return ripple; } - /** - * @param {!Event} event - * @private - */ - onFocus_(event) { + private onFocus_(event: Event) { this.handleKnobEvent_(event); } @@ -698,14 +640,13 @@ * Handles focus, drag and key events on the start and end knobs. * If |overrideElement| is provided, it will be the knob that gains focus and * and the ripple. Otherwise, the knob is determined from the |event|. - * @param {!Event} event - * @param {Element=} overrideElement - * @private */ - handleKnobEvent_(event, overrideElement) { + private handleKnobEvent_(event: Event, overrideElement?: HTMLElement|null) { const knob = overrideElement || - event.composedPath().find( - el => el.classList && el.classList.contains('knob')); + (event.composedPath().find( + el => (el as HTMLElement).classList?.contains('knob'))) as + HTMLElement | + undefined; if (!knob) { event.preventDefault(); return; @@ -719,36 +660,29 @@ this.ensureRipple(); if (this.hasRipple()) { - this._ripple.style.display = ''; - this._ripple.holdDown = true; + this._ripple!.style.display = ''; + this._ripple!.holdDown = true; } } /** * Handles blur events on the start and end knobs. - * @private */ - onBlur_() { + private onBlur_() { this.removeRipple_(); } /** * Removes ripple if one exists. - * @private */ - removeRipple_() { + private removeRipple_() { if (this.hasRipple()) { - this._ripple.remove(); + this._ripple!.remove(); this._ripple = null; } } - /** - * @param {!Event} event - * @private - */ - onKeyDown_(event) { - const activeElement = this.shadowRoot.activeElement; + private onKeyDown_(event: KeyboardEvent) { if (event.key === 'Tab') { if (event.shiftKey && this.isEndKnobFocused_()) { event.preventDefault(); @@ -780,16 +714,22 @@ this.handleKnobEvent_(event); event.preventDefault(); - const value = this.getPrefValue(activeElement); + const value = this.getPrefValue_(); if (value === null) { return; } - const delta = deltaKeyMap[event.key]; + const delta = deltaKeyMap[event.key as keyof typeof deltaKeyMap]; this.updatePref_(value + delta, false); } } } +declare global { + interface HTMLElementTagNameMap { + 'settings-scheduler-slider': SettingsSchedulerSliderElement; + } +} + customElements.define( SettingsSchedulerSliderElement.is, SettingsSchedulerSliderElement);
diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsing/BUILD.gn index 8b2f8a9..60e3edc 100644 --- a/chrome/browser/safe_browsing/BUILD.gn +++ b/chrome/browser/safe_browsing/BUILD.gn
@@ -256,6 +256,10 @@ "download_protection/ppapi_download_request.h", "download_protection/two_phase_uploader.cc", "download_protection/two_phase_uploader.h", + "extension_telemetry/cookies_get_all_signal.cc", + "extension_telemetry/cookies_get_all_signal.h", + "extension_telemetry/cookies_get_all_signal_processor.cc", + "extension_telemetry/cookies_get_all_signal_processor.h", "extension_telemetry/extension_signal.h", "extension_telemetry/extension_signal_processor.h", "extension_telemetry/extension_telemetry_persister.cc",
diff --git a/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.cc b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.cc new file mode 100644 index 0000000..fa89ef2 --- /dev/null +++ b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.cc
@@ -0,0 +1,41 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.h" +#include <sstream> + +namespace safe_browsing { + +CookiesGetAllSignal::CookiesGetAllSignal( + const extensions::ExtensionId& extension_id, + const std::string& domain, + const std::string& name, + const std::string& path, + bool secure, + const std::string& store_id, + const std::string& url, + bool is_session) + : ExtensionSignal(extension_id), + domain_(domain), + name_(name), + path_(path), + secure_(secure), + store_id_(store_id), + url_(url), + is_session_(is_session) {} + +CookiesGetAllSignal::~CookiesGetAllSignal() = default; + +ExtensionSignalType CookiesGetAllSignal::GetType() const { + return ExtensionSignalType::kCookiesGetAll; +} + +std::string CookiesGetAllSignal::getUniqueArgSetId() const { + std::stringstream ss; + ss << domain_ << name_ << path_ << secure_ << store_id_ << url_ + << is_session_; + return ss.str(); +} + +} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.h b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.h new file mode 100644 index 0000000..2c56278 --- /dev/null +++ b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.h
@@ -0,0 +1,62 @@ +// Copyright 2022 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. + +#ifndef CHROME_BROWSER_SAFE_BROWSING_EXTENSION_TELEMETRY_COOKIES_GET_ALL_SIGNAL_H_ +#define CHROME_BROWSER_SAFE_BROWSING_EXTENSION_TELEMETRY_COOKIES_GET_ALL_SIGNAL_H_ + +#include "chrome/browser/safe_browsing/extension_telemetry/extension_signal.h" + +namespace safe_browsing { + +// A signal that is created when an extension invokes cookies.getAll API. +class CookiesGetAllSignal : public ExtensionSignal { + public: + CookiesGetAllSignal(const extensions::ExtensionId& extension_id, + const std::string& domain, + const std::string& name, + const std::string& path, + bool secure, + const std::string& store_id, + const std::string& url, + bool is_session); + ~CookiesGetAllSignal() override; + + // ExtensionSignal: + ExtensionSignalType GetType() const override; + + // Creates a unique id, which can be used to compare argument sets and as a + // key for storage (e.g., in a map). + std::string getUniqueArgSetId() const; + + const std::string& domain() const { return domain_; } + const std::string& name() const { return name_; } + const std::string& path() const { return path_; } + bool secure() const { return secure_; } + const std::string& store_id() const { return store_id_; } + const std::string& url() const { return url_; } + bool is_session() const { return is_session_; } + + protected: + // Restricts the retrieved cookies to those whose domains match or are + // subdomains of this one. + std::string domain_; + // Filters the cookies by name. + std::string name_; + // Restricts the retrieved cookies to those whose path exactly matches this + // string. + std::string path_; + // Filters the cookies by their Secure property. + bool secure_; + // The cookie store to retrieve cookies from. If omitted, the current + // execution context's cookie store will be used. + std::string store_id_; + // Restricts the retrieved cookies to those that would match the given URL. + std::string url_; + // Filters out session vs.persistent cookies. + bool is_session_; +}; + +} // namespace safe_browsing + +#endif // CHROME_BROWSER_SAFE_BROWSING_EXTENSION_TELEMETRY_COOKIES_GET_ALL_SIGNAL_H_
diff --git a/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor.cc b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor.cc new file mode 100644 index 0000000..96d907a --- /dev/null +++ b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor.cc
@@ -0,0 +1,105 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor.h" + +#include "base/check_op.h" +#include "chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.h" +#include "components/safe_browsing/core/common/proto/csd.pb.h" + +namespace safe_browsing { + +using GetAllArgsInfo = ExtensionTelemetryReportRequest::SignalInfo:: + CookiesGetAllInfo::GetAllArgsInfo; + +// Used to limit the number of unique argument sets stored for each extension. +constexpr size_t kMaxArgSets = 100; + +CookiesGetAllSignalProcessor::CookiesGetAllStoreEntry:: + CookiesGetAllStoreEntry() = default; +CookiesGetAllSignalProcessor::CookiesGetAllStoreEntry:: + ~CookiesGetAllStoreEntry() = default; +CookiesGetAllSignalProcessor::CookiesGetAllStoreEntry::CookiesGetAllStoreEntry( + const CookiesGetAllStoreEntry& src) = default; +CookiesGetAllSignalProcessor::CookiesGetAllSignalProcessor() + : max_arg_sets_(kMaxArgSets) {} +CookiesGetAllSignalProcessor::~CookiesGetAllSignalProcessor() = default; + +void CookiesGetAllSignalProcessor::ProcessSignal( + const ExtensionSignal& signal) { + // Validate GetAllArgs signal. + DCHECK_EQ(ExtensionSignalType::kCookiesGetAll, signal.GetType()); + const auto& cga_signal = static_cast<const CookiesGetAllSignal&>(signal); + + // Retrieve store entry for extension. If this is the first signal for an + // extension, a new entry is created in the store. + CookiesGetAllStoreEntry& store_entry = + cookies_get_all_store_[cga_signal.extension_id()]; + GetAllArgsInfos& get_all_args_infos = store_entry.get_all_args_infos; + + const std::string arg_set_id = cga_signal.getUniqueArgSetId(); + auto get_all_args_infos_it = get_all_args_infos.find(arg_set_id); + if (get_all_args_infos_it != get_all_args_infos.end()) { + // If a cookies.GetAll() API with the same arguments has been invoked + // before, simply increment the count for the corresponding record. + auto count = get_all_args_infos_it->second.count(); + get_all_args_infos_it->second.set_count(count + 1); + + } else if (get_all_args_infos.size() < max_arg_sets_) { + // For new argument sets, process only if under max limit. + // Create new GetAllArgsInfo object with its unique args set id key. + GetAllArgsInfo get_all_args_info; + get_all_args_info.set_domain(cga_signal.domain()); + get_all_args_info.set_name(cga_signal.name()); + get_all_args_info.set_path(cga_signal.path()); + get_all_args_info.set_secure(cga_signal.secure()); + get_all_args_info.set_store_id(cga_signal.store_id()); + get_all_args_info.set_url(cga_signal.url()); + get_all_args_info.set_count(1); + get_all_args_info.set_is_session(cga_signal.is_session()); + + get_all_args_infos.emplace(arg_set_id, get_all_args_info); + + } else { + // Otherwise, increment max exceeded argument sets count. + store_entry.max_exceeded_arg_sets_count++; + } +} + +std::unique_ptr<ExtensionTelemetryReportRequest_SignalInfo> +CookiesGetAllSignalProcessor::GetSignalInfoForReport( + const extensions::ExtensionId& extension_id) { + auto cookies_get_all_store_it = cookies_get_all_store_.find(extension_id); + if (cookies_get_all_store_it == cookies_get_all_store_.end()) + return nullptr; + + // Create the signal info protobuf. + auto signal_info = + std::make_unique<ExtensionTelemetryReportRequest_SignalInfo>(); + ExtensionTelemetryReportRequest_SignalInfo_CookiesGetAllInfo* + cookies_get_all_info = signal_info->mutable_cookies_get_all_info(); + + for (auto& get_all_args_infos_it : + cookies_get_all_store_it->second.get_all_args_infos) { + *cookies_get_all_info->add_get_all_args_info() = + std::move(get_all_args_infos_it.second); + } + cookies_get_all_info->set_max_exceeded_args_count( + cookies_get_all_store_it->second.max_exceeded_arg_sets_count); + + // Finally, clear the data in the argument sets store. + cookies_get_all_store_.erase(cookies_get_all_store_it); + + return signal_info; +} + +bool CookiesGetAllSignalProcessor::HasDataToReportForTest() const { + return !cookies_get_all_store_.empty(); +} + +void CookiesGetAllSignalProcessor::SetMaxArgSetsForTest(size_t max_arg_sets) { + max_arg_sets_ = max_arg_sets; +} + +} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor.h b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor.h new file mode 100644 index 0000000..956ae03d --- /dev/null +++ b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor.h
@@ -0,0 +1,70 @@ +// Copyright 2022 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. + +#ifndef CHROME_BROWSER_SAFE_BROWSING_EXTENSION_TELEMETRY_COOKIES_GET_ALL_SIGNAL_PROCESSOR_H_ +#define CHROME_BROWSER_SAFE_BROWSING_EXTENSION_TELEMETRY_COOKIES_GET_ALL_SIGNAL_PROCESSOR_H_ + +#include <memory> +#include <string> + +#include "base/containers/flat_map.h" +#include "chrome/browser/safe_browsing/extension_telemetry/extension_signal_processor.h" +#include "components/safe_browsing/core/common/proto/csd.pb.h" + +namespace safe_browsing { + +class ExtensionSignal; +class ExtensionTelemetryReportRequest_SignalInfo; + +using GetAllArgsInfo = ExtensionTelemetryReportRequest::SignalInfo:: + CookiesGetAllInfo::GetAllArgsInfo; + +// A class that processes cookies.getAll signal data to generate telemetry +// reports. +class CookiesGetAllSignalProcessor : public ExtensionSignalProcessor { + public: + CookiesGetAllSignalProcessor(); + ~CookiesGetAllSignalProcessor() override; + + CookiesGetAllSignalProcessor(CookiesGetAllSignalProcessor&) = delete; + CookiesGetAllSignalProcessor& operator=(const CookiesGetAllSignalProcessor&) = + delete; + + // ExtensionSignalProcessor: + void ProcessSignal(const ExtensionSignal& signal) override; + std::unique_ptr<ExtensionTelemetryReportRequest_SignalInfo> + GetSignalInfoForReport(const extensions::ExtensionId& extension_id) override; + bool HasDataToReportForTest() const override; + + void SetMaxArgSetsForTest(size_t max_arg_sets); + + protected: + // Max number of API arguments stored per extension. + size_t max_arg_sets_; + + // Maps concated string of arguments to GetAllArgsInfos. + using GetAllArgsInfos = base::flat_map<std::string, GetAllArgsInfo>; + + // Stores getAll() arguments. If |max_arg_sets_| exceeded, arguments will not + // be recorded. + struct CookiesGetAllStoreEntry { + CookiesGetAllStoreEntry(); + ~CookiesGetAllStoreEntry(); + CookiesGetAllStoreEntry(const CookiesGetAllStoreEntry&); + + GetAllArgsInfos get_all_args_infos; + // Records count of new unique arg sets after |max_arg_sets_| limit is + // reached. + size_t max_exceeded_arg_sets_count = 0; + }; + // Records how many unique arg sets were not recorded because |max_arg_sets_| + // limit was exceeded. + using CookiesGetAllStore = + base::flat_map<extensions::ExtensionId, CookiesGetAllStoreEntry>; + CookiesGetAllStore cookies_get_all_store_; +}; + +} // namespace safe_browsing + +#endif // CHROME_BROWSER_SAFE_BROWSING_EXTENSION_TELEMETRY_COOKIES_GET_ALL_SIGNAL_PROCESSOR_H_
diff --git a/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor_unittest.cc b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor_unittest.cc new file mode 100644 index 0000000..a0b498e --- /dev/null +++ b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor_unittest.cc
@@ -0,0 +1,230 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor.h" +#include "chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.h" +#include "components/safe_browsing/core/common/proto/csd.pb.h" +#include "extensions/common/extension_id.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace safe_browsing { + +namespace { + +using SignalInfo = ExtensionTelemetryReportRequest_SignalInfo; +using CookiesGetAllInfo = + ExtensionTelemetryReportRequest_SignalInfo_CookiesGetAllInfo; +using GetAllArgsInfo = + ExtensionTelemetryReportRequest_SignalInfo_CookiesGetAllInfo_GetAllArgsInfo; + +constexpr const char* kExtensionId[] = {"aaaaaaaabbbbbbbbccccccccdddddddd", + "eeeeeeeeffffffffgggggggghhhhhhhh"}; +constexpr const char* domains[] = {"domain1", "domain2"}; +constexpr const char* names[] = {"cookie-1", "cookie-2"}; +constexpr const char* paths[] = {"/path1", "/path2"}; +constexpr bool is_secure_cookie_values[] = {true, false}; +constexpr const char* store_ids[] = {"store-1", "store-2"}; +constexpr const char* urls[] = {"www.example1.com", "www.example2.com"}; +constexpr bool is_session_cookie_values[] = {false, true}; + +class CookiesGetAllSignalProcessorTest : public ::testing::Test { + protected: + CookiesGetAllSignalProcessorTest() = default; + + CookiesGetAllSignalProcessor processor_; +}; + +TEST_F(CookiesGetAllSignalProcessorTest, EmptyProcessorWithNoData) { + EXPECT_FALSE(processor_.HasDataToReportForTest()); +} + +TEST_F(CookiesGetAllSignalProcessorTest, StoresDataAfterProcessingSignal) { + auto signal = + CookiesGetAllSignal(kExtensionId[0], domains[0], names[0], paths[0], + is_secure_cookie_values[0], store_ids[0], urls[0], + is_session_cookie_values[0]); + processor_.ProcessSignal(signal); + + // Verify that processor now has some data to report. + EXPECT_TRUE(processor_.HasDataToReportForTest()); + + // Verify that there is signal info only for the correct + // extension id. + EXPECT_TRUE(processor_.GetSignalInfoForReport(kExtensionId[0])); + EXPECT_FALSE(processor_.GetSignalInfoForReport(kExtensionId[1])); +} + +TEST_F(CookiesGetAllSignalProcessorTest, + ReportsSignalInfoCorrectlyWithMultipleUniqueArgSets) { + // Process 3 signals for extension 1, each corresponding to the first set of + // arguments. + for (int i = 0; i < 3; i++) { + auto signal = + CookiesGetAllSignal(kExtensionId[0], domains[0], names[0], paths[0], + is_secure_cookie_values[0], store_ids[0], urls[0], + is_session_cookie_values[0]); + processor_.ProcessSignal(signal); + } + + // Process 3 signals for extension 2. Two signals contain the first argument + // set, and the third contains the second argument set. + for (int i = 0; i < 2; i++) { + auto signal = + CookiesGetAllSignal(kExtensionId[1], domains[0], names[0], paths[0], + is_secure_cookie_values[0], store_ids[0], urls[0], + is_session_cookie_values[0]); + processor_.ProcessSignal(signal); + } + { + auto signal = + CookiesGetAllSignal(kExtensionId[1], domains[1], names[1], paths[1], + is_secure_cookie_values[1], store_ids[1], urls[1], + is_session_cookie_values[1]); + processor_.ProcessSignal(signal); + } + + // Retrieve signal info for first extension. + std::unique_ptr<SignalInfo> ext_0_signal_info = + processor_.GetSignalInfoForReport(kExtensionId[0]); + ASSERT_NE(ext_0_signal_info, nullptr); + + // Verify that processor still has some data to report (for the second + // extension). + EXPECT_TRUE(processor_.HasDataToReportForTest()); + + // Retrieve signal info for the second extension. + std::unique_ptr<SignalInfo> ext_1_signal_info = + processor_.GetSignalInfoForReport(kExtensionId[1]); + ASSERT_NE(ext_1_signal_info, nullptr); + + // Verify that processor no longer has data to report. + EXPECT_FALSE(processor_.HasDataToReportForTest()); + + // Verify signal info contents for first extension. + { + const CookiesGetAllInfo& cookies_get_all_info = + ext_0_signal_info->cookies_get_all_info(); + + // Verify data stored: only 1 set of args (3 executions). + ASSERT_EQ(cookies_get_all_info.get_all_args_info_size(), 1); + const GetAllArgsInfo& get_all_args_info = + cookies_get_all_info.get_all_args_info(0); + EXPECT_EQ(get_all_args_info.domain(), domains[0]); + EXPECT_EQ(get_all_args_info.name(), names[0]); + EXPECT_EQ(get_all_args_info.path(), paths[0]); + EXPECT_EQ(get_all_args_info.secure(), is_secure_cookie_values[0]); + EXPECT_EQ(get_all_args_info.store_id(), store_ids[0]); + EXPECT_EQ(get_all_args_info.url(), urls[0]); + EXPECT_EQ(get_all_args_info.is_session(), is_session_cookie_values[0]); + EXPECT_EQ(get_all_args_info.count(), static_cast<uint32_t>(3)); + } + + // Verify signal info contents for second extension. + { + const CookiesGetAllInfo& cookies_get_all_info = + ext_1_signal_info->cookies_get_all_info(); + + // Verify data stored: 2 sets of args (2 executions for 1st, 1 for the + // 2nd). + ASSERT_EQ(cookies_get_all_info.get_all_args_info_size(), 2); + { + const GetAllArgsInfo& get_all_args_info = + cookies_get_all_info.get_all_args_info(0); + EXPECT_EQ(get_all_args_info.domain(), domains[0]); + EXPECT_EQ(get_all_args_info.name(), names[0]); + EXPECT_EQ(get_all_args_info.path(), paths[0]); + EXPECT_EQ(get_all_args_info.secure(), is_secure_cookie_values[0]); + EXPECT_EQ(get_all_args_info.store_id(), store_ids[0]); + EXPECT_EQ(get_all_args_info.url(), urls[0]); + EXPECT_EQ(get_all_args_info.is_session(), is_session_cookie_values[0]); + EXPECT_EQ(get_all_args_info.count(), static_cast<uint32_t>(2)); + } + { + const GetAllArgsInfo& get_all_args_info = + cookies_get_all_info.get_all_args_info(1); + EXPECT_EQ(get_all_args_info.domain(), domains[1]); + EXPECT_EQ(get_all_args_info.name(), names[1]); + EXPECT_EQ(get_all_args_info.path(), paths[1]); + EXPECT_EQ(get_all_args_info.secure(), is_secure_cookie_values[1]); + EXPECT_EQ(get_all_args_info.store_id(), store_ids[1]); + EXPECT_EQ(get_all_args_info.url(), urls[1]); + EXPECT_EQ(get_all_args_info.is_session(), is_session_cookie_values[1]); + EXPECT_EQ(get_all_args_info.count(), static_cast<uint32_t>(1)); + } + } +} + +TEST_F(CookiesGetAllSignalProcessorTest, + MaxExceededArgSetsCountNotIncremented) { + // Set max args limit to 1 for testing. + processor_.SetMaxArgSetsForTest(1); + + // Process 2 signals with the same args for extension 1. + auto signal = + CookiesGetAllSignal(kExtensionId[0], domains[0], names[0], paths[0], + is_secure_cookie_values[0], store_ids[0], urls[0], + is_session_cookie_values[0]); + processor_.ProcessSignal(signal); + processor_.ProcessSignal(signal); + + // Retrieve signal info. + std::unique_ptr<SignalInfo> extension_signal_info = + processor_.GetSignalInfoForReport(kExtensionId[0]); + const CookiesGetAllInfo& cookies_get_all_info = + extension_signal_info->cookies_get_all_info(); + + // Verify 1 args set with a count of 2. + ASSERT_EQ(cookies_get_all_info.get_all_args_info_size(), 1); + const GetAllArgsInfo& get_all_args_info = + cookies_get_all_info.get_all_args_info(0); + EXPECT_EQ(get_all_args_info.count(), static_cast<uint32_t>(2)); + + // Verify max exceeded args is 0. + EXPECT_EQ(cookies_get_all_info.max_exceeded_args_count(), + static_cast<size_t>(0)); +} + +TEST_F(CookiesGetAllSignalProcessorTest, MaxExceededArgSetsCountIncremented) { + // Set max args limit to 1 for testing. + processor_.SetMaxArgSetsForTest(1); + + // Process 3 signals for extension 1: + // - signals 1,2 have the same args. + // - signals 3 has different args. + for (int i = 0; i < 2; i++) { + auto signal = + CookiesGetAllSignal(kExtensionId[0], domains[0], names[0], paths[0], + is_secure_cookie_values[0], store_ids[0], urls[0], + is_session_cookie_values[0]); + processor_.ProcessSignal(signal); + } + { + auto signal = + CookiesGetAllSignal(kExtensionId[0], domains[1], names[1], paths[1], + is_secure_cookie_values[1], store_ids[1], urls[1], + is_session_cookie_values[1]); + processor_.ProcessSignal(signal); + } + + // Retrieve signal info. + std::unique_ptr<SignalInfo> extension_signal_info = + processor_.GetSignalInfoForReport(kExtensionId[0]); + const CookiesGetAllInfo& cookies_get_all_info = + extension_signal_info->cookies_get_all_info(); + + // Verify only 1 args with execution count of 2 + ASSERT_EQ(cookies_get_all_info.get_all_args_info_size(), 1); + const GetAllArgsInfo& get_all_args_info = + cookies_get_all_info.get_all_args_info(0); + EXPECT_EQ(get_all_args_info.count(), static_cast<uint32_t>(2)); + + // Verify the max exceeded count is 1. signal3 is not processed because of max + // args limit of 1. + EXPECT_EQ(cookies_get_all_info.max_exceeded_args_count(), + static_cast<size_t>(1)); +} + +} // namespace + +} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_unittest.cc b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_unittest.cc new file mode 100644 index 0000000..3fe1e388 --- /dev/null +++ b/chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal_unittest.cc
@@ -0,0 +1,41 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/safe_browsing/extension_telemetry/cookies_get_all_signal.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace safe_browsing { + +namespace { + +TEST(CookiesGetAllSignalTest, ConcatFieldsWithAllArgs) { + CookiesGetAllSignal signal = CookiesGetAllSignal( + /*extension_id=*/"ext-0", + /*domain=*/"domain", + /*name=*/"cookie-1", + /*path=*/"/path1", + /*secure=*/true, + /*store_id=*/"store-1", + /*url=*/"www.example.com", + /*is_session=*/true); + EXPECT_EQ(signal.getUniqueArgSetId(), + "domaincookie-1/path11store-1www.example.com1"); +} + +TEST(CookiesGetAllSignalTest, ConcatFieldsWithDefaultArgs) { + CookiesGetAllSignal signal = CookiesGetAllSignal( + /*extension_id=*/"", + /*domain=*/"", + /*name=*/"", + /*path=*/"", + /*secure=*/false, + /*store_id=*/"", + /*url=*/"", + /*is_session=*/false); + EXPECT_EQ(signal.getUniqueArgSetId(), "00"); +} + +} // namespace + +} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/extension_telemetry/extension_signal.h b/chrome/browser/safe_browsing/extension_telemetry/extension_signal.h index 1af141e..f2f022b 100644 --- a/chrome/browser/safe_browsing/extension_telemetry/extension_signal.h +++ b/chrome/browser/safe_browsing/extension_telemetry/extension_signal.h
@@ -15,7 +15,8 @@ enum class ExtensionSignalType { kTabsExecuteScript = 0, kRemoteHostContacted = 1, - kMaxValue = kRemoteHostContacted, + kCookiesGetAll = 2, + kMaxValue = kCookiesGetAll, }; // An abstract signal. Subclasses provide type-specific functionality to
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 840d938e..531acfd 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -1245,6 +1245,8 @@ "passwords/passwords_model_delegate.h", "pdf/chrome_pdf_web_contents_helper_client.cc", "pdf/chrome_pdf_web_contents_helper_client.h", + "performance_controls/tab_discard_tab_helper.cc", + "performance_controls/tab_discard_tab_helper.h", "permission_bubble/permission_prompt.h", "privacy_sandbox/privacy_sandbox_prompt.cc", "privacy_sandbox/privacy_sandbox_prompt.h", @@ -1479,6 +1481,8 @@ "webui/commander/commander_handler.h", "webui/commander/commander_ui.cc", "webui/commander/commander_ui.h", + "webui/commerce/shopping_list_context_menu_controller.cc", + "webui/commerce/shopping_list_context_menu_controller.h", "webui/cr_components/history_clusters/history_clusters_util.cc", "webui/cr_components/history_clusters/history_clusters_util.h", "webui/cr_components/most_visited/most_visited_handler.cc", @@ -4786,6 +4790,8 @@ "views/payments/validation_delegate.h", "views/payments/view_stack.cc", "views/payments/view_stack.h", + "views/performance_controls/high_efficiency_chip_view.cc", + "views/performance_controls/high_efficiency_chip_view.h", "views/permissions/chooser_bubble_ui.cc", "views/permissions/permission_chip.cc", "views/permissions/permission_chip.h",
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusView.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusView.java index 6774626..943f4e34 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusView.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusView.java
@@ -186,6 +186,7 @@ .alpha(0.0f) .withEndAction(() -> { mIconView.setVisibility(View.GONE); + mIconView.setAlpha(1f); mAnimatingStatusIconHide = false; allowBrowserControlsHide(); updateTouchDelegate();
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusViewTest.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusViewTest.java index 54ce3f6..e292a425 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusViewTest.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusViewTest.java
@@ -21,6 +21,7 @@ import static org.chromium.content_public.browser.test.util.TestThreadUtils.runOnUiThreadBlocking; +import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.LinearLayout; @@ -211,6 +212,31 @@ @Test @MediumTest @Feature({"Omnibox"}) + public void testStatusView_iconTransparencyShouldBeReset() { + StatusIconResource statusIconResource = + new StatusIconResource(R.drawable.ic_logo_googleg_24dp, 0); + runOnUiThreadBlocking(() -> { + doReturn(true).when(mSearchEngineLogoUtils).shouldShowSearchEngineLogo(false); + mStatusModel.set(StatusProperties.SHOW_STATUS_ICON, true); + mStatusModel.set(StatusProperties.STATUS_ICON_RESOURCE, statusIconResource); + }); + + // Hide the icon, this starts an animation to set alpha to 0.0. + runOnUiThreadBlocking(() -> mStatusModel.set(StatusProperties.STATUS_ICON_RESOURCE, null)); + + // Show the icon again, the alpha property should be reset to 1.0. + runOnUiThreadBlocking( + () -> mStatusModel.set(StatusProperties.STATUS_ICON_RESOURCE, statusIconResource)); + + onView(withId(R.id.location_bar_status_icon)).check((view, e) -> { + assertEquals(View.VISIBLE, view.getVisibility()); + assertEquals(1.0, view.getAlpha(), 0.0); + }); + } + + @Test + @MediumTest + @Feature({"Omnibox"}) public void testStatusViewAnimationStatusResetAfterDuration() throws ExecutionException, InterruptedException { runOnUiThreadBlocking(() -> {
diff --git a/chrome/browser/ui/ash/holding_space/holding_space_file_system_delegate.cc b/chrome/browser/ui/ash/holding_space/holding_space_file_system_delegate.cc index a83af60..7f16192 100644 --- a/chrome/browser/ui/ash/holding_space/holding_space_file_system_delegate.cc +++ b/chrome/browser/ui/ash/holding_space/holding_space_file_system_delegate.cc
@@ -16,6 +16,7 @@ #include "base/files/file_path.h" #include "base/files/file_path_watcher.h" #include "base/files/file_util.h" +#include "base/ranges/algorithm.h" #include "base/sequence_checker.h" #include "base/task/task_traits.h" #include "base/task/thread_pool.h" @@ -234,11 +235,11 @@ model()->RemoveIf(base::BindRepeating( [](const std::set<base::FilePath>& deleted_paths, const HoldingSpaceItem* item) { - return std::any_of(deleted_paths.begin(), deleted_paths.end(), - [&](const base::FilePath& deleted_path) { - return item->file_path() == deleted_path || - deleted_path.IsParent(item->file_path()); - }); + return base::ranges::any_of( + deleted_paths, [&](const base::FilePath& deleted_path) { + return item->file_path() == deleted_path || + deleted_path.IsParent(item->file_path()); + }); }, std::cref(deleted_paths))); } @@ -605,11 +606,10 @@ // The watch for `file_path` should only be removed if no holding space items // exist in the model which are backed by files it directly parents. const bool remove_watch = - std::none_of(model()->items().begin(), model()->items().end(), - [&file_path](const auto& item) { - return item->IsInitialized() && - item->file_path().DirName() == file_path; - }); + base::ranges::none_of(model()->items(), [&file_path](const auto& item) { + return item->IsInitialized() && + item->file_path().DirName() == file_path; + }); if (!remove_watch) return;
diff --git a/chrome/browser/ui/ash/holding_space/holding_space_keyed_service_browsertest.cc b/chrome/browser/ui/ash/holding_space/holding_space_keyed_service_browsertest.cc index 830c5d70..d820f4b 100644 --- a/chrome/browser/ui/ash/holding_space/holding_space_keyed_service_browsertest.cc +++ b/chrome/browser/ui/ash/holding_space/holding_space_keyed_service_browsertest.cc
@@ -19,6 +19,7 @@ #include "base/files/file_path_watcher.h" #include "base/files/file_util.h" #include "base/path_service.h" +#include "base/ranges/algorithm.h" #include "base/run_loop.h" #include "base/scoped_observation.h" #include "base/strings/stringprintf.h" @@ -108,10 +109,9 @@ void WaitForItemAddition( base::RepeatingCallback<bool(const HoldingSpaceItem*)> predicate) { auto* model = ash::HoldingSpaceController::Get()->model(); - if (std::any_of(model->items().begin(), model->items().end(), - [&predicate](const auto& item) { - return predicate.Run(item.get()); - })) { + if (base::ranges::any_of(model->items(), [&predicate](const auto& item) { + return predicate.Run(item.get()); + })) { return; } @@ -139,10 +139,9 @@ void WaitForItemRemoval( base::RepeatingCallback<bool(const HoldingSpaceItem*)> predicate) { auto* model = ash::HoldingSpaceController::Get()->model(); - if (std::none_of(model->items().begin(), model->items().end(), - [&predicate](const auto& item) { - return predicate.Run(item.get()); - })) { + if (base::ranges::none_of(model->items(), [&predicate](const auto& item) { + return predicate.Run(item.get()); + })) { return; }
diff --git a/chrome/browser/ui/ash/holding_space/holding_space_persistence_delegate.cc b/chrome/browser/ui/ash/holding_space/holding_space_persistence_delegate.cc index b186672..178ecf9 100644 --- a/chrome/browser/ui/ash/holding_space/holding_space_persistence_delegate.cc +++ b/chrome/browser/ui/ash/holding_space/holding_space_persistence_delegate.cc
@@ -8,6 +8,7 @@ #include "ash/public/cpp/holding_space/holding_space_image.h" #include "ash/public/cpp/holding_space/holding_space_item.h" #include "ash/public/cpp/holding_space/holding_space_progress.h" +#include "base/containers/contains.h" #include "chrome/browser/ash/file_manager/path_util.h" #include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/profiles/profile.h" @@ -81,10 +82,7 @@ update->GetList().EraseIf([&items](const base::Value& persisted_item) { const std::string& persisted_item_id = HoldingSpaceItem::DeserializeId( base::Value::AsDictionaryValue(persisted_item)); - return std::any_of(items.begin(), items.end(), - [&persisted_item_id](const HoldingSpaceItem* item) { - return persisted_item_id == item->id(); - }); + return base::Contains(items, persisted_item_id, &HoldingSpaceItem::id); }); }
diff --git a/chrome/browser/ui/ash/network/network_portal_notification_controller.cc b/chrome/browser/ui/ash/network/network_portal_notification_controller.cc index 69069cb..c696099d 100644 --- a/chrome/browser/ui/ash/network/network_portal_notification_controller.cc +++ b/chrome/browser/ui/ash/network/network_portal_notification_controller.cc
@@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "ash/constants/ash_features.h" #include "ash/constants/notifier_catalogs.h" #include "ash/public/cpp/notification_utils.h" #include "base/bind.h" @@ -49,6 +50,51 @@ const char kNotifierNetworkPortalDetector[] = "ash.network.portal-detector"; +std::unique_ptr<message_center::Notification> CreatePost2022Notification( + const ash::NetworkState* network, + scoped_refptr<message_center::NotificationDelegate> delegate, + message_center::NotifierId notifier_id, + bool is_wifi) { + message_center::RichNotificationData data; + data.buttons.emplace_back(message_center::ButtonInfo( + l10n_util::GetStringUTF16(IDS_NEW_PORTAL_DETECTION_NOTIFICATION_BUTTON))); + std::unique_ptr<message_center::Notification> notification; + notification = ash::CreateSystemNotification( + message_center::NOTIFICATION_TYPE_SIMPLE, + NetworkPortalNotificationController::kNotificationId, + l10n_util::GetStringUTF16( + is_wifi ? IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI + : IDS_NEW_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED), + l10n_util::GetStringFUTF16(IDS_NEW_PORTAL_DETECTION_NOTIFICATION_MESSAGE, + base::UTF8ToUTF16(network->name())), + /*display_source=*/std::u16string(), /*origin_url=*/GURL(), notifier_id, + data, std::move(delegate), kNotificationCaptivePortalIcon, + message_center::SystemNotificationWarningLevel::NORMAL); + notification->set_never_timeout(true); + return notification; +} + +std::unique_ptr<message_center::Notification> CreatePre2022Notification( + const ash::NetworkState* network, + scoped_refptr<message_center::NotificationDelegate> delegate, + message_center::NotifierId notifier_id, + bool is_wifi) { + return ash::CreateSystemNotification( + message_center::NOTIFICATION_TYPE_SIMPLE, + NetworkPortalNotificationController::kNotificationId, + l10n_util::GetStringUTF16( + is_wifi ? IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI + : IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED), + l10n_util::GetStringFUTF16( + is_wifi ? IDS_PORTAL_DETECTION_NOTIFICATION_MESSAGE_WIFI + : IDS_PORTAL_DETECTION_NOTIFICATION_MESSAGE_WIRED, + base::UTF8ToUTF16(network->name())), + /*display_source=*/std::u16string(), /*origin_url=*/GURL(), notifier_id, + message_center::RichNotificationData(), std::move(delegate), + kNotificationCaptivePortalIcon, + message_center::SystemNotificationWarningLevel::WARNING); +} + void CloseNotification() { SystemNotificationHelper::GetInstance()->Close( NetworkPortalNotificationController::kNotificationId); @@ -205,20 +251,14 @@ kNotifierNetworkPortalDetector, ash::NotificationCatalogName::kNetworkPortalDetector); bool is_wifi = NetworkTypePattern::WiFi().MatchesType(network->type()); - std::unique_ptr<message_center::Notification> notification = - ash::CreateSystemNotification( - message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, - l10n_util::GetStringUTF16( - is_wifi ? IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIFI - : IDS_PORTAL_DETECTION_NOTIFICATION_TITLE_WIRED), - l10n_util::GetStringFUTF16( - is_wifi ? IDS_PORTAL_DETECTION_NOTIFICATION_MESSAGE_WIFI - : IDS_PORTAL_DETECTION_NOTIFICATION_MESSAGE_WIRED, - base::UTF8ToUTF16(network->name())), - /*display_source=*/std::u16string(), /*origin_url=*/GURL(), - notifier_id, message_center::RichNotificationData(), - std::move(delegate), kNotificationCaptivePortalIcon, - message_center::SystemNotificationWarningLevel::WARNING); + std::unique_ptr<message_center::Notification> notification; + if (ash::features::IsCaptivePortalUI2022Enabled()) { + notification = + CreatePost2022Notification(network, delegate, notifier_id, is_wifi); + } else { + notification = + CreatePre2022Notification(network, delegate, notifier_id, is_wifi); + } return notification; }
diff --git a/chrome/browser/ui/autofill/payments/virtual_card_manual_fallback_bubble_controller_impl.cc b/chrome/browser/ui/autofill/payments/virtual_card_manual_fallback_bubble_controller_impl.cc index eecc067..54046e083 100644 --- a/chrome/browser/ui/autofill/payments/virtual_card_manual_fallback_bubble_controller_impl.cc +++ b/chrome/browser/ui/autofill/payments/virtual_card_manual_fallback_bubble_controller_impl.cc
@@ -188,22 +188,21 @@ set_bubble_view(nullptr); // Log bubble result according to the closed reason. - AutofillMetrics::VirtualCardManualFallbackBubbleResultMetric metric; + autofill_metrics::VirtualCardManualFallbackBubbleResult metric; switch (closed_reason) { case PaymentsBubbleClosedReason::kClosed: - metric = AutofillMetrics::VirtualCardManualFallbackBubbleResultMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_CLOSED; + metric = autofill_metrics::VirtualCardManualFallbackBubbleResult::kClosed; break; case PaymentsBubbleClosedReason::kNotInteracted: - metric = AutofillMetrics::VirtualCardManualFallbackBubbleResultMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_NOT_INTERACTED; + metric = autofill_metrics::VirtualCardManualFallbackBubbleResult:: + kNotInteracted; break; default: - metric = AutofillMetrics::VirtualCardManualFallbackBubbleResultMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_RESULT_UNKNOWN; + metric = + autofill_metrics::VirtualCardManualFallbackBubbleResult::kUnknown; break; } - AutofillMetrics::LogVirtualCardManualFallbackBubbleResultMetric( + autofill_metrics::LogVirtualCardManualFallbackBubbleResultMetric( metric, is_user_gesture_); UpdatePageActionIcon(); @@ -229,35 +228,30 @@ void VirtualCardManualFallbackBubbleControllerImpl:: LogVirtualCardManualFallbackBubbleFieldClicked( VirtualCardManualFallbackBubbleField field) const { - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric metric; + autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked metric; switch (field) { case VirtualCardManualFallbackBubbleField::kCardNumber: - metric = - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CARD_NUMBER; + metric = autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked:: + kCardNumber; break; case VirtualCardManualFallbackBubbleField::kExpirationMonth: - metric = - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_EXPIRATION_MONTH; + metric = autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked:: + kExpirationMonth; break; case VirtualCardManualFallbackBubbleField::kExpirationYear: - metric = - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_EXPIRATION_YEAR; + metric = autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked:: + kExpirationYear; break; case VirtualCardManualFallbackBubbleField::kCardholderName: - metric = - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CARDHOLDER_NAME; + metric = autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked:: + kCardholderName; break; case VirtualCardManualFallbackBubbleField::kCvc: metric = - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CVC; + autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked::kCVC; break; } - AutofillMetrics::LogVirtualCardManualFallbackBubbleFieldClicked(metric); + autofill_metrics::LogVirtualCardManualFallbackBubbleFieldClicked(metric); } VirtualCardManualFallbackBubbleControllerImpl:: @@ -309,7 +303,7 @@ DCHECK(bubble_view()); bubble_has_been_shown_ = true; - AutofillMetrics::LogVirtualCardManualFallbackBubbleShown(is_user_gesture_); + autofill_metrics::LogVirtualCardManualFallbackBubbleShown(is_user_gesture_); if (observer_for_test_) observer_for_test_->OnBubbleShown();
diff --git a/chrome/browser/ui/autofill/payments/virtual_card_manual_fallback_bubble_controller_impl.h b/chrome/browser/ui/autofill/payments/virtual_card_manual_fallback_bubble_controller_impl.h index ec6babc..6958c841 100644 --- a/chrome/browser/ui/autofill/payments/virtual_card_manual_fallback_bubble_controller_impl.h +++ b/chrome/browser/ui/autofill/payments/virtual_card_manual_fallback_bubble_controller_impl.h
@@ -10,6 +10,7 @@ #include "chrome/browser/ui/autofill/autofill_bubble_controller_base.h" #include "components/autofill/core/browser/data_model/credit_card.h" +#include "components/autofill/core/browser/metrics/payments/virtual_card_manual_fallback_bubble_metrics.h" #include "content/public/browser/web_contents_user_data.h" namespace autofill {
diff --git a/chrome/browser/ui/bookmarks/bookmark_browsertest.cc b/chrome/browser/ui/bookmarks/bookmark_browsertest.cc index 1a3c078..7f699eee 100644 --- a/chrome/browser/ui/bookmarks/bookmark_browsertest.cc +++ b/chrome/browser/ui/bookmarks/bookmark_browsertest.cc
@@ -595,40 +595,40 @@ // The total number of bookmarks is 7, but it gets rounded down due to // bucketing. ASSERT_THAT( - histogram_tester()->GetAllSamples("Bookmarks.Count.OnProfileLoad3"), + histogram_tester()->GetAllSamples("Bookmarks.Count.OnProfileLoad"), testing::ElementsAre(base::Bucket(/*min=*/6, /*count=*/1))); // 2 bookmarks have URL http://b.com and 4 have http://c.com. This counts as 4 // duplicates. EXPECT_THAT(histogram_tester()->GetAllSamples( - "Bookmarks.Count.OnProfileLoad.DuplicateUrl3"), + "Bookmarks.Count.OnProfileLoad.DuplicateUrl2"), testing::ElementsAre(base::Bucket(/*min=*/4, /*count=*/1))); // 3 bookmarks have the pair (http://c.com, title5). This counts as 2 // duplicates when considering URLs and titles. EXPECT_THAT(histogram_tester()->GetAllSamples( - "Bookmarks.Count.OnProfileLoad.DuplicateUrlAndTitle3"), + "Bookmarks.Count.OnProfileLoad.DuplicateUrlAndTitle"), testing::ElementsAre(base::Bucket(/*min=*/2, /*count=*/1))); // Among the three above, only two have the same parent. This means only one // counts as duplicate when considering all three attributes. EXPECT_THAT( histogram_tester()->GetAllSamples( - "Bookmarks.Count.OnProfileLoad.DuplicateUrlAndTitleAndParent3"), + "Bookmarks.Count.OnProfileLoad.DuplicateUrlAndTitleAndParent"), testing::ElementsAre(base::Bucket(/*min=*/1, /*count=*/1))); // The remaining histograms are the result of substracting the number of // duplicates from the total, which is 7 despite the bucket for the first // histogram above suggesting 6. EXPECT_THAT(histogram_tester()->GetAllSamples( - "Bookmarks.Count.OnProfileLoad.UniqueUrl3"), + "Bookmarks.Count.OnProfileLoad.UniqueUrl"), testing::ElementsAre(base::Bucket(/*min=*/3, /*count=*/1))); EXPECT_THAT(histogram_tester()->GetAllSamples( - "Bookmarks.Count.OnProfileLoad.UniqueUrlAndTitle3"), + "Bookmarks.Count.OnProfileLoad.UniqueUrlAndTitle"), testing::ElementsAre(base::Bucket(/*min=*/5, /*count=*/1))); EXPECT_THAT(histogram_tester()->GetAllSamples( - "Bookmarks.Count.OnProfileLoad.UniqueUrlAndTitleAndParent3"), + "Bookmarks.Count.OnProfileLoad.UniqueUrlAndTitleAndParent"), testing::ElementsAre(base::Bucket(/*min=*/6, /*count=*/1))); EXPECT_THAT(histogram_tester()->GetAllSamples( - "Bookmarks.Times.OnProfileLoad.TimeSinceAdded3"), + "Bookmarks.Times.OnProfileLoad.TimeSinceAdded"), testing::ElementsAre(base::Bucket(/*min=*/0, /*count=*/1))); }
diff --git a/chrome/browser/ui/browser_element_identifiers.cc b/chrome/browser/ui/browser_element_identifiers.cc index 644f33e..22fe9429 100644 --- a/chrome/browser/ui/browser_element_identifiers.cc +++ b/chrome/browser/ui/browser_element_identifiers.cc
@@ -13,6 +13,7 @@ DEFINE_ELEMENT_IDENTIFIER_VALUE(kAutofillCreditCardSuggestionEntryElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kAvatarButtonElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kBookmarkStarViewElementId); +DEFINE_ELEMENT_IDENTIFIER_VALUE(kHighEfficiencyChipElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kInstallPwaElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kIntentChipElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kLocationIconElementId);
diff --git a/chrome/browser/ui/browser_element_identifiers.h b/chrome/browser/ui/browser_element_identifiers.h index b1f450a..c509406 100644 --- a/chrome/browser/ui/browser_element_identifiers.h +++ b/chrome/browser/ui/browser_element_identifiers.h
@@ -22,6 +22,7 @@ DECLARE_ELEMENT_IDENTIFIER_VALUE(kAutofillCreditCardSuggestionEntryElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kAvatarButtonElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kBookmarkStarViewElementId); +DECLARE_ELEMENT_IDENTIFIER_VALUE(kHighEfficiencyChipElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kInstallPwaElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kIntentChipElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kLocationIconElementId);
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc index 83aca7b..c7fe1a1 100644 --- a/chrome/browser/ui/browser_list.cc +++ b/chrome/browser/ui/browser_list.cc
@@ -4,14 +4,13 @@ #include "chrome/browser/ui/browser_list.h" -#include <algorithm> - #include "base/auto_reset.h" #include "base/bind.h" #include "base/check.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/user_metrics.h" #include "base/observer_list.h" +#include "base/ranges/algorithm.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/buildflags.h" #include "chrome/browser/chrome_notification_types.h" @@ -371,7 +370,7 @@ // static bool BrowserList::IsOffTheRecordBrowserInUse(Profile* profile) { BrowserList* list = BrowserList::GetInstance(); - return std::any_of(list->begin(), list->end(), [profile](Browser* browser) { + return base::ranges::any_of(*list, [profile](Browser* browser) { return browser->profile()->IsSameOrParent(profile) && browser->profile()->IsOffTheRecord(); });
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm index 6d384e0..dab356b 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm
@@ -59,6 +59,7 @@ DCHECK(![menu_root_ delegate]); [menu_root_ setDelegate:controller_]; + DCHECK(GetBookmarkModel()); ObserveBookmarkModel(); } @@ -66,6 +67,7 @@ ClearBookmarkMenu(); [menu_root_ setDelegate:nil]; BookmarkModel* model = GetBookmarkModel(); + DCHECK(model); if (model) model->RemoveObserver(this); } @@ -200,11 +202,6 @@ // Watch for changes. void BookmarkMenuBridge::ObserveBookmarkModel() { BookmarkModel* model = GetBookmarkModel(); - - // In Guest mode, there is no bookmark model. - if (!model) - return; - model->AddObserver(this); if (model->loaded()) BookmarkModelLoaded(model, false);
diff --git a/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm b/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm index e1bcb941..9be2d807 100644 --- a/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm +++ b/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm
@@ -61,7 +61,7 @@ } } -}; // namespace +} // namespace @implementation HistoryMenuCocoaController
diff --git a/chrome/browser/ui/commander/tab_command_source.cc b/chrome/browser/ui/commander/tab_command_source.cc index 437f36dc..65b46c9 100644 --- a/chrome/browser/ui/commander/tab_command_source.cc +++ b/chrome/browser/ui/commander/tab_command_source.cc
@@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/containers/cxx20_erase.h" +#include "base/ranges/algorithm.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/send_tab_to_self/send_tab_to_self_util.h" #include "chrome/browser/ui/accelerator_utils.h" @@ -124,9 +125,8 @@ bool CanMoveTabsToExistingWindow(const Browser* browser_to_exclude) { const BrowserList* browser_list = BrowserList::GetInstance(); - return std::any_of( - browser_list->begin(), browser_list->end(), - [browser_to_exclude](Browser* browser) { + return base::ranges::any_of( + *browser_list, [browser_to_exclude](Browser* browser) { return browser != browser_to_exclude && browser->is_type_normal() && browser->profile() == browser_to_exclude->profile(); });
diff --git a/chrome/browser/ui/global_media_controls/media_notification_service.cc b/chrome/browser/ui/global_media_controls/media_notification_service.cc index e80f153..5751feaa3 100644 --- a/chrome/browser/ui/global_media_controls/media_notification_service.cc +++ b/chrome/browser/ui/global_media_controls/media_notification_service.cc
@@ -308,11 +308,10 @@ content::WebContents* web_contents) const { DCHECK(web_contents); auto item_ids = media_session_item_producer_->GetActiveControllableItemIds(); - return std::any_of( - item_ids.begin(), item_ids.end(), [web_contents](const auto& item_id) { - return web_contents == - content::MediaSession::GetWebContentsFromRequestId(item_id); - }); + return base::ranges::any_of(item_ids, [web_contents](const auto& item_id) { + return web_contents == + content::MediaSession::GetWebContentsFromRequestId(item_id); + }); } std::string
diff --git a/chrome/browser/ui/lens/lens_side_panel_helper.h b/chrome/browser/ui/lens/lens_side_panel_helper.h index 15db8d5b..7a278153 100644 --- a/chrome/browser/ui/lens/lens_side_panel_helper.h +++ b/chrome/browser/ui/lens/lens_side_panel_helper.h
@@ -25,9 +25,22 @@ void OpenLensSidePanel(Browser* browser, const content::OpenURLParams& url_params); -// Check if the lens URL is valid. +// Check if the lens URL is a valid results page. This is done by checking if +// the URL has a payload parameter. bool IsValidLensResultUrl(const GURL& url); +// Returns true if the given URL corresponds to any Lens webpage. This is done +// by checking if the given URL and lens::features::kHomepageURLForLens have +// matching domains +bool IsLensUrl(const GURL& url); + +// Checks to see if the page corresponding to the current URL should be visible +// to the user. The page should be visible if +// - The page is the Lens Results page +// - The page does not correspond to the Lens domain +// - lens::features::kEnableLensHtmlRedirectFix is set to false +bool ShouldPageBeVisible(const GURL& url); + // Creates URL for opening a lens result in a new tab // with appropriate entry point parameters GURL CreateURLForNewTab(const GURL& original_url);
diff --git a/chrome/browser/ui/media_router/media_route_starter.cc b/chrome/browser/ui/media_router/media_route_starter.cc index 4fdad137..3bb12f3 100644 --- a/chrome/browser/ui/media_router/media_route_starter.cc +++ b/chrome/browser/ui/media_router/media_route_starter.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/media_router/media_route_starter.h" #include "base/containers/contains.h" +#include "base/ranges/algorithm.h" #include "base/strings/strcat.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/profiles/profile_manager.h" @@ -74,10 +75,9 @@ // If |start_presentation_context_| still exists, then it means presentation // route request was never attempted. if (start_presentation_context_) { - std::vector<MediaSinkWithCastModes> sinks = - GetQueryResultManager()->GetSinksWithCastModes(); - bool presentation_sinks_available = std::any_of( - sinks.begin(), sinks.end(), [](const MediaSinkWithCastModes& sink) { + bool presentation_sinks_available = base::ranges::any_of( + GetQueryResultManager()->GetSinksWithCastModes(), + [](const MediaSinkWithCastModes& sink) { return base::Contains(sink.cast_modes, MediaCastMode::PRESENTATION); }); if (presentation_sinks_available) {
diff --git a/chrome/browser/ui/page_action/page_action_icon_type.h b/chrome/browser/ui/page_action/page_action_icon_type.h index 779cbe4..817d5e4 100644 --- a/chrome/browser/ui/page_action/page_action_icon_type.h +++ b/chrome/browser/ui/page_action/page_action_icon_type.h
@@ -10,6 +10,7 @@ kClickToCall, kCookieControls, kFind, + kHighEfficiency, kIntentPicker, kLocalCardMigration, kManagePasswords,
diff --git a/chrome/browser/ui/passwords/bubble_controllers/save_update_bubble_controller.cc b/chrome/browser/ui/passwords/bubble_controllers/save_update_bubble_controller.cc index d384b06e..25a244dd 100644 --- a/chrome/browser/ui/passwords/bubble_controllers/save_update_bubble_controller.cc +++ b/chrome/browser/ui/passwords/bubble_controllers/save_update_bubble_controller.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/ui/passwords/bubble_controllers/save_update_bubble_controller.h" +#include "base/containers/contains.h" #include "base/metrics/field_trial_params.h" #include "base/strings/utf_string_conversions.h" #include "base/time/default_clock.h" @@ -213,11 +214,8 @@ bool SaveUpdateBubbleController::IsCurrentStateUpdate() const { DCHECK(state_ == password_manager::ui::PENDING_PASSWORD_UPDATE_STATE || state_ == password_manager::ui::PENDING_PASSWORD_STATE); - return std::any_of(existing_credentials_.begin(), existing_credentials_.end(), - [this](const password_manager::PasswordForm& form) { - return form.username_value == - pending_password_.username_value; - }); + return base::Contains(existing_credentials_, pending_password_.username_value, + &password_manager::PasswordForm::username_value); } bool SaveUpdateBubbleController::ShouldShowFooter() const {
diff --git a/chrome/browser/ui/performance_controls/tab_discard_tab_helper.cc b/chrome/browser/ui/performance_controls/tab_discard_tab_helper.cc new file mode 100644 index 0000000..85b9a87f --- /dev/null +++ b/chrome/browser/ui/performance_controls/tab_discard_tab_helper.cc
@@ -0,0 +1,26 @@ +// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/performance_controls/tab_discard_tab_helper.h" + +TabDiscardTabHelper::~TabDiscardTabHelper() = default; + +TabDiscardTabHelper::TabDiscardTabHelper(content::WebContents* contents) + : content::WebContentsObserver(contents), + content::WebContentsUserData<TabDiscardTabHelper>(*contents) {} + +bool TabDiscardTabHelper::IsChipVisible() const { + return was_discarded_; +} + +void TabDiscardTabHelper::DidStartNavigation( + content::NavigationHandle* navigation_handle) { + // Pages can only be discarded while they are in the background, and we only + // need to inform the user after they have been subsequently reloaded so it + // is suffifient to wait for a StartNavigation event before updating this + // variable. + was_discarded_ = navigation_handle->ExistingDocumentWasDiscarded(); +} + +WEB_CONTENTS_USER_DATA_KEY_IMPL(TabDiscardTabHelper);
diff --git a/chrome/browser/ui/performance_controls/tab_discard_tab_helper.h b/chrome/browser/ui/performance_controls/tab_discard_tab_helper.h new file mode 100644 index 0000000..d9880f1 --- /dev/null +++ b/chrome/browser/ui/performance_controls/tab_discard_tab_helper.h
@@ -0,0 +1,40 @@ +// Copyright (c) 2022 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. + +#ifndef CHROME_BROWSER_UI_PERFORMANCE_CONTROLS_TAB_DISCARD_TAB_HELPER_H_ +#define CHROME_BROWSER_UI_PERFORMANCE_CONTROLS_TAB_DISCARD_TAB_HELPER_H_ + +#include "content/public/browser/navigation_handle.h" +#include "content/public/browser/render_widget_host.h" +#include "content/public/browser/web_contents_observer.h" +#include "content/public/browser/web_contents_user_data.h" + +// Per-tab class to manage discard state. When pages are in the background, they +// can be discarded to save memory. When the user returns to that tab, we need +// information about whether the page had previously been discarded in order to +// convey this information to the user. +class TabDiscardTabHelper + : public content::WebContentsObserver, + public content::WebContentsUserData<TabDiscardTabHelper> { + public: + TabDiscardTabHelper(const TabDiscardTabHelper&) = delete; + TabDiscardTabHelper& operator=(const TabDiscardTabHelper&) = delete; + + ~TabDiscardTabHelper() override; + + // Returns whether the chip associated with a discarded tab should be shown. + bool IsChipVisible() const; + + // content::WebContentsObserver + void DidStartNavigation( + content::NavigationHandle* navigation_handle) override; + + private: + friend class content::WebContentsUserData<TabDiscardTabHelper>; + explicit TabDiscardTabHelper(content::WebContents* contents); + bool was_discarded_ = false; + WEB_CONTENTS_USER_DATA_KEY_DECL(); +}; + +#endif // CHROME_BROWSER_UI_PERFORMANCE_CONTROLS_TAB_DISCARD_TAB_HELPER_H_
diff --git a/chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc b/chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc index c8a16e6..a200e408 100644 --- a/chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc +++ b/chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.h" +#include "base/containers/contains.h" #include "base/files/file_enumerator.h" #include "base/files/file_util.h" #include "base/memory/weak_ptr.h" @@ -26,11 +27,8 @@ const enterprise_connectors::ContentAnalysisDelegate::Data& data, const enterprise_connectors::ContentAnalysisDelegate::Result& result) { // If any result is negative, block the drop. - const auto all_true_fn = [](const auto& vec) { - return std::all_of(vec.cbegin(), vec.cend(), [](bool b) { return b; }); - }; - bool all_true = - all_true_fn(result.text_results) && all_true_fn(result.paths_results); + bool all_true = !base::Contains(result.text_results, false) && + !base::Contains(result.paths_results, false); std::move(callback).Run( all_true
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc index c96608c..b7d57e4 100644 --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc
@@ -86,6 +86,7 @@ #include "chrome/browser/ui/focus_tab_after_navigation_helper.h" #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" +#include "chrome/browser/ui/performance_controls/tab_discard_tab_helper.h" #include "chrome/browser/ui/prefs/prefs_tab_helper.h" #include "chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt_helper.h" #include "chrome/browser/ui/recently_audible_helper.h" @@ -127,6 +128,7 @@ #include "components/page_info/core/features.h" #include "components/password_manager/core/browser/password_manager.h" #include "components/performance_manager/embedder/performance_manager_registry.h" +#include "components/performance_manager/public/features.h" #include "components/permissions/features.h" #include "components/permissions/permission_request_manager.h" #include "components/safe_browsing/content/browser/safe_browsing_navigation_observer.h" @@ -504,6 +506,10 @@ SadTabHelper::CreateForWebContents(web_contents); SearchTabHelper::CreateForWebContents(web_contents); TabDialogs::CreateForWebContents(web_contents); + if (base::FeatureList::IsEnabled( + performance_manager::features::kHighEfficiencyModeAvailable)) { + TabDiscardTabHelper::CreateForWebContents(web_contents); + } if (base::FeatureList::IsEnabled(features::kTabHoverCardImages) || base::FeatureList::IsEnabled(features::kWebUITabStrip)) { ThumbnailTabHelper::CreateForWebContents(web_contents);
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc index 6a80d61..a45330d1 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.cc +++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -4,13 +4,13 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include <algorithm> #include <memory> #include <set> #include <string> #include <utility> #include "base/auto_reset.h" +#include "base/containers/contains.h" #include "base/containers/flat_map.h" #include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" @@ -504,9 +504,8 @@ selection.old_model = notifications->selection_model; selection.new_model = selection_model_; selection.reason = TabStripModelObserver::CHANGE_REASON_NONE; - selection.selected_tabs_were_removed = std::any_of( - notifications->detached_web_contents.begin(), - notifications->detached_web_contents.end(), [¬ifications](auto& dwc) { + selection.selected_tabs_were_removed = base::ranges::any_of( + notifications->detached_web_contents, [¬ifications](auto& dwc) { return notifications->selection_model.IsSelected( dwc->index_before_any_removals); }); @@ -2148,9 +2147,7 @@ if (!group_model_) return; - DCHECK(!std::any_of( - contents_data_.cbegin(), contents_data_.cend(), - [new_group](const auto& datum) { return datum->group() == new_group; })); + DCHECK(!base::Contains(contents_data_, new_group, &Tab::group)); group_model_->AddTabGroup(new_group, absl::nullopt); // Find a destination for the first tab that's not pinned or inside another @@ -2474,11 +2471,11 @@ // Sanity check that none of the tabs' openers refer |old_contents| or // themselves. - DCHECK(!std::any_of(contents_data_.begin(), contents_data_.end(), - [old_contents](const std::unique_ptr<Tab>& data) { - return data->opener() == old_contents || - data->opener() == data->web_contents(); - })); + DCHECK(!base::ranges::any_of( + contents_data_, [old_contents](const std::unique_ptr<Tab>& data) { + return data->opener() == old_contents || + data->opener() == data->web_contents(); + })); } void TabStripModel::EnsureGroupContiguity(int index) {
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_model.cc b/chrome/browser/ui/toolbar/toolbar_actions_model.cc index cd835f4..4cace31 100644 --- a/chrome/browser/ui/toolbar/toolbar_actions_model.cc +++ b/chrome/browser/ui/toolbar/toolbar_actions_model.cc
@@ -4,7 +4,6 @@ #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" -#include <algorithm> #include <memory> #include <string> @@ -238,11 +237,10 @@ // If nay extension has access, we want to properly message that (since // saying "No extensions can run..." is inaccurate). Other extensions // will still be properly attributed in UI. - return std::all_of( - action_ids().begin(), action_ids().end(), [this, url](ActionId id) { - return GetExtensionById(id)->permissions_data()->IsRestrictedUrl( - url, /*error=*/nullptr); - }); + return base::ranges::all_of(action_ids(), [this, url](ActionId id) { + return GetExtensionById(id)->permissions_data()->IsRestrictedUrl( + url, /*error=*/nullptr); + }); } bool ToolbarActionsModel::IsActionPinned(const ActionId& action_id) const {
diff --git a/chrome/browser/ui/views/autofill/payments/virtual_card_manual_fallback_bubble_views_interactive_uitest.cc b/chrome/browser/ui/views/autofill/payments/virtual_card_manual_fallback_bubble_views_interactive_uitest.cc index 0f35938..18964bb 100644 --- a/chrome/browser/ui/views/autofill/payments/virtual_card_manual_fallback_bubble_views_interactive_uitest.cc +++ b/chrome/browser/ui/views/autofill/payments/virtual_card_manual_fallback_bubble_views_interactive_uitest.cc
@@ -238,8 +238,8 @@ EXPECT_EQ(clipboard_text, u"5454545454545454"); histogram_tester.ExpectBucketCount( "Autofill.VirtualCardManualFallbackBubble.FieldClicked", - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CARD_NUMBER, + autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked:: + kCardNumber, 1); // Expiration month: @@ -249,8 +249,8 @@ EXPECT_EQ(clipboard_text, base::ASCIIToUTF16(test::NextMonth().c_str())); histogram_tester.ExpectBucketCount( "Autofill.VirtualCardManualFallbackBubble.FieldClicked", - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_EXPIRATION_MONTH, + autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked:: + kExpirationMonth, 1); // Expiration year: @@ -260,8 +260,8 @@ EXPECT_EQ(clipboard_text, base::ASCIIToUTF16(test::NextYear().c_str())); histogram_tester.ExpectBucketCount( "Autofill.VirtualCardManualFallbackBubble.FieldClicked", - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_EXPIRATION_YEAR, + autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked:: + kExpirationYear, 1); // Cardholder name: @@ -271,8 +271,8 @@ EXPECT_EQ(clipboard_text, u"John Smith"); histogram_tester.ExpectBucketCount( "Autofill.VirtualCardManualFallbackBubble.FieldClicked", - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CARDHOLDER_NAME, + autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked:: + kCardholderName, 1); // CVC: @@ -282,9 +282,7 @@ EXPECT_EQ(clipboard_text, u"345"); histogram_tester.ExpectBucketCount( "Autofill.VirtualCardManualFallbackBubble.FieldClicked", - AutofillMetrics::VirtualCardManualFallbackBubbleFieldClickedMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CVC, - 1); + autofill_metrics::VirtualCardManualFallbackBubbleFieldClicked::kCVC, 1); } IN_PROC_BROWSER_TEST_F(VirtualCardManualFallbackBubbleViewsInteractiveUiTest, @@ -308,9 +306,7 @@ // Confirm .FirstShow metrics. histogram_tester.ExpectUniqueSample( "Autofill.VirtualCardManualFallbackBubble.Result.FirstShow", - AutofillMetrics::VirtualCardManualFallbackBubbleResultMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_CLOSED, - 1); + autofill_metrics::VirtualCardManualFallbackBubbleResult::kClosed, 1); // Bubble is reshown by the user. ReshowBubble(); @@ -328,9 +324,7 @@ // Confirm .Reshows metrics. histogram_tester.ExpectUniqueSample( "Autofill.VirtualCardManualFallbackBubble.Result.Reshows", - AutofillMetrics::VirtualCardManualFallbackBubbleResultMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_CLOSED, - 1); + autofill_metrics::VirtualCardManualFallbackBubbleResult::kClosed, 1); // Bubble is reshown by the user. Closing a reshown bubble makes the browser // inactive for some reason, so we must reactivate it first. @@ -359,8 +353,7 @@ // Confirm metrics. histogram_tester.ExpectBucketCount( "Autofill.VirtualCardManualFallbackBubble.Result.FirstShow", - AutofillMetrics::VirtualCardManualFallbackBubbleResultMetric:: - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_NOT_INTERACTED, + autofill_metrics::VirtualCardManualFallbackBubbleResult::kNotInteracted, 1); }
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc index addd782..593027dc 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -24,6 +24,7 @@ #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_utils.h" #include "components/commerce/core/commerce_feature_list.h" +#include "components/commerce/core/price_tracking_utils.h" #include "components/commerce/core/shopping_service.h" #include "components/signin/public/base/signin_buildflags.h" #include "components/signin/public/base/signin_metrics.h" @@ -230,9 +231,12 @@ commerce::ShoppingServiceFactory::GetForBrowserContext(profile) ->GetAvailableProductInfoForUrl(url); if (product_info.has_value()) { + bool is_price_tracked = + commerce::IsBookmarkPriceTracked(bookmark_model, bookmark_node); dialog_model_builder.AddSeparator().AddCustomField( std::make_unique<views::BubbleDialogModelHost::CustomView>( - std::make_unique<PriceTrackingView>(), + std::make_unique<PriceTrackingView>(profile, url, + is_price_tracked), views::BubbleDialogModelHost::FieldType::kControl), kPriceTrackingBookmarkViewElementId); }
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc index 80dfa45..e7b9839 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
@@ -17,12 +17,14 @@ #include "chrome/browser/signin/identity_test_environment_profile_adaptor.h" #include "chrome/browser/ui/browser_element_identifiers.h" #include "chrome/browser/ui/sync/bubble_sync_promo_delegate.h" +#include "chrome/browser/ui/views/commerce/price_tracking_view.h" #include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/views/chrome_test_widget.h" #include "components/bookmarks/browser/bookmark_utils.h" #include "components/bookmarks/test/bookmark_test_helpers.h" #include "components/commerce/core/commerce_feature_list.h" #include "components/commerce/core/mock_shopping_service.h" +#include "components/commerce/core/test_utils.h" #include "components/signin/public/identity_manager/identity_test_utils.h" #include "ui/base/interaction/element_identifier.h" #include "ui/base/interaction/element_tracker.h" @@ -62,11 +64,10 @@ widget_params.context = GetContext(); anchor_widget_->Init(std::move(widget_params)); - BookmarkModel* bookmark_model = - BookmarkModelFactory::GetForBrowserContext(profile()); - bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model); + bookmark_model_ = BookmarkModelFactory::GetForBrowserContext(profile()); + bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model_); - bookmarks::AddIfNotBookmarked(bookmark_model, GURL(kTestBookmarkURL), + bookmarks::AddIfNotBookmarked(bookmark_model_, GURL(kTestBookmarkURL), std::u16string()); } @@ -95,6 +96,8 @@ return factories; } + raw_ptr<BookmarkModel> GetBookmarkModel() { return bookmark_model_; } + protected: // Creates a bookmark bubble view. void CreateBubbleView() { @@ -104,9 +107,22 @@ GURL(kTestBookmarkURL), true); } + PriceTrackingView* GetPriceTrackingView() { + const ui::ElementContext context = + views::ElementTrackerViews::GetContextForView( + BookmarkBubbleView::bookmark_bubble()->GetAnchorView()); + views::View* matched_view = + views::ElementTrackerViews::GetInstance()->GetFirstMatchingView( + kPriceTrackingBookmarkViewElementId, context); + + return matched_view ? views::AsViewClass<PriceTrackingView>(matched_view) + : nullptr; + } + private: views::UniqueWidgetPtr anchor_widget_; base::test::ScopedFeatureList test_features_; + raw_ptr<BookmarkModel> bookmark_model_; }; // Verifies that the sync promo is not displayed for a signed in user. @@ -139,12 +155,10 @@ mock_shopping_service->SetResponseForGetProductInfoForUrl( commerce::ProductInfo()); CreateBubbleView(); - // Verify the view is displayed - const ui::ElementContext context = - views::ElementTrackerViews::GetContextForView( - BookmarkBubbleView::bookmark_bubble()->GetAnchorView()); - EXPECT_TRUE(views::ElementTrackerViews::GetInstance()->GetFirstMatchingView( - kPriceTrackingBookmarkViewElementId, context)); + // Verify the view is displayed with toggle off + auto* price_tracking_view = GetPriceTrackingView(); + EXPECT_TRUE(price_tracking_view); + EXPECT_FALSE(price_tracking_view->IsToggleOn()); } TEST_F(BookmarkBubbleViewTest, PriceTrackingViewIsHidden) { @@ -153,9 +167,24 @@ commerce::ShoppingServiceFactory::GetForBrowserContext(profile())); mock_shopping_service->SetResponseForGetProductInfoForUrl(absl::nullopt); CreateBubbleView(); - const ui::ElementContext context = - views::ElementTrackerViews::GetContextForView( - BookmarkBubbleView::bookmark_bubble()->GetAnchorView()); - EXPECT_FALSE(views::ElementTrackerViews::GetInstance()->GetFirstMatchingView( - kPriceTrackingBookmarkViewElementId, context)); + auto* price_tracking_view = GetPriceTrackingView(); + EXPECT_FALSE(price_tracking_view); +} + +// Verifies that the price tracking view is displayed with the correct toggle +// state +TEST_F(BookmarkBubbleViewTest, PriceTrackingViewWithToggleOn) { + commerce::AddProductBookmark(GetBookmarkModel(), u"title", + GURL(kTestBookmarkURL), 0, true); + + commerce::MockShoppingService* mock_shopping_service = + static_cast<commerce::MockShoppingService*>( + commerce::ShoppingServiceFactory::GetForBrowserContext(profile())); + mock_shopping_service->SetResponseForGetProductInfoForUrl( + commerce::ProductInfo()); + + CreateBubbleView(); + auto* price_tracking_view = GetPriceTrackingView(); + EXPECT_TRUE(price_tracking_view); + EXPECT_TRUE(price_tracking_view->IsToggleOn()); }
diff --git a/chrome/browser/ui/views/commerce/price_tracking_view.cc b/chrome/browser/ui/views/commerce/price_tracking_view.cc index 26854d2..4bc873e 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_view.cc +++ b/chrome/browser/ui/views/commerce/price_tracking_view.cc
@@ -3,7 +3,12 @@ // found in the LICENSE file. #include "chrome/browser/ui/views/commerce/price_tracking_view.h" +#include "chrome/browser/bookmarks/bookmark_model_factory.h" +#include "chrome/browser/commerce/shopping_service_factory.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/views/chrome_layout_provider.h" +#include "components/bookmarks/browser/bookmark_model.h" +#include "components/commerce/core/price_tracking_utils.h" #include "components/strings/grit/components_strings.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/l10n/l10n_util.h" @@ -24,7 +29,10 @@ constexpr int kHorizontalSpacing = 16; } // namespace -PriceTrackingView::PriceTrackingView() { +PriceTrackingView::PriceTrackingView(Profile* profile, + GURL page_url, + bool is_price_track_enabled) + : profile_(profile), is_price_track_enabled_(is_price_track_enabled) { // image column auto product_image_containter = std::make_unique<views::BoxLayoutView>(); product_image_containter->SetCrossAxisAlignment( @@ -66,9 +74,11 @@ AddChildView(std::move(text_container)); // Toggle button column - toggle_button_ = AddChildView(std::make_unique<views::ToggleButton>()); - toggle_button_->SetAccessibleName(l10n_util::GetStringUTF16( - IDS_PRICE_TRACKING_TRACK_PRODUCT_ACCESSIBILITY)); + toggle_button_ = AddChildView(std::make_unique<views::ToggleButton>( + base::BindRepeating(&PriceTrackingView::OnToggleButtonPressed, + weak_ptr_factory_.GetWeakPtr(), page_url))); + toggle_button_->SetIsOn(is_price_track_enabled_); + toggle_button_->SetAccessibleName(GetToggleAccessibleName()); toggle_button_->SetProperty(views::kMarginsKey, gfx::Insets::TLBR(0, kHorizontalSpacing, 0, 0)); @@ -80,3 +90,44 @@ toggle_button_->GetPreferredSize().width(); body_label_->SizeToFit(label_width); } + +PriceTrackingView::~PriceTrackingView() = default; + +bool PriceTrackingView::IsToggleOn() { + return toggle_button_->GetIsOn(); +} + +std::u16string PriceTrackingView::GetToggleAccessibleName() { + return l10n_util::GetStringUTF16( + IsToggleOn() ? IDS_PRICE_TRACKING_UNTRACK_PRODUCT_ACCESSIBILITY + : IDS_PRICE_TRACKING_TRACK_PRODUCT_ACCESSIBILITY); +} + +void PriceTrackingView::OnToggleButtonPressed(const GURL url) { + is_price_track_enabled_ = !is_price_track_enabled_; + toggle_button_->SetAccessibleName(GetToggleAccessibleName()); + UpdatePriceTrackingState(url); +} + +void PriceTrackingView::UpdatePriceTrackingState(const GURL& url) { + bookmarks::BookmarkModel* const model = + BookmarkModelFactory::GetForBrowserContext(profile_); + const bookmarks::BookmarkNode* node = + model->GetMostRecentlyAddedUserNodeForURL(url); + commerce::SetPriceTrackingStateForBookmark( + commerce::ShoppingServiceFactory::GetForBrowserContext(profile_), model, + node, is_price_track_enabled_, + base::BindOnce(&PriceTrackingView::OnPriceTrackingStateUpdated, + weak_ptr_factory_.GetWeakPtr())); +} + +void PriceTrackingView::OnPriceTrackingStateUpdated(bool success) { + // TODO(crbug.com/1346612): Record latency for the update status. + if (!success) { + is_price_track_enabled_ = !is_price_track_enabled_; + toggle_button_->SetIsOn(is_price_track_enabled_); + toggle_button_->SetAccessibleName(GetToggleAccessibleName()); + body_label_->SetText(l10n_util::GetStringUTF16( + IDS_OMNIBOX_TRACK_PRICE_DIALOG_ERROR_DESCRIPTION)); + } +}
diff --git a/chrome/browser/ui/views/commerce/price_tracking_view.h b/chrome/browser/ui/views/commerce/price_tracking_view.h index 214863e..3ef0acf 100644 --- a/chrome/browser/ui/views/commerce/price_tracking_view.h +++ b/chrome/browser/ui/views/commerce/price_tracking_view.h
@@ -10,12 +10,31 @@ #include "ui/views/controls/label.h" #include "ui/views/layout/flex_layout_view.h" +class Profile; + class PriceTrackingView : public views::FlexLayoutView { public: - PriceTrackingView(); + PriceTrackingView(Profile* profile, + GURL page_url, + bool is_price_track_enabled); + ~PriceTrackingView() override; + + bool IsToggleOn(); private: + friend class PriceTrackingViewTest; + + std::u16string GetToggleAccessibleName(); + void OnToggleButtonPressed(const GURL url); + void UpdatePriceTrackingState(const GURL& url); + void OnPriceTrackingStateUpdated(bool success); + raw_ptr<views::Label> body_label_; raw_ptr<views::ToggleButton> toggle_button_; + + raw_ptr<Profile> profile_; + bool is_price_track_enabled_; + + base::WeakPtrFactory<PriceTrackingView> weak_ptr_factory_{this}; }; #endif // CHROME_BROWSER_UI_VIEWS_COMMERCE_PRICE_TRACKING_VIEW_H_
diff --git a/chrome/browser/ui/views/commerce/price_tracking_view_unittest.cc b/chrome/browser/ui/views/commerce/price_tracking_view_unittest.cc new file mode 100644 index 0000000..f4a62cdf --- /dev/null +++ b/chrome/browser/ui/views/commerce/price_tracking_view_unittest.cc
@@ -0,0 +1,178 @@ +// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/views/commerce/price_tracking_view.h" + +#include "base/test/task_environment.h" +#include "chrome/browser/bookmarks/bookmark_model_factory.h" +#include "chrome/browser/commerce/shopping_service_factory.h" +#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h" +#include "chrome/test/base/browser_with_test_window_test.h" +#include "chrome/test/views/chrome_test_widget.h" +#include "components/bookmarks/browser/bookmark_utils.h" +#include "components/bookmarks/test/bookmark_test_helpers.h" +#include "components/commerce/core/mock_shopping_service.h" +#include "components/commerce/core/test_utils.h" +#include "components/strings/grit/components_strings.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/events/event.h" +#include "ui/gfx/geometry/point.h" +#include "ui/views/test/test_platform_native_widget.h" +#include "ui/views/view.h" +#include "ui/views/widget/unique_widget_ptr.h" +#include "ui/views/widget/widget.h" + +namespace { +const char kTestURL[] = "http://www.google.com"; +} // namespace + +class PriceTrackingViewTest : public BrowserWithTestWindowTest { + public: + void SetUp() override { + BrowserWithTestWindowTest::SetUp(); + + anchor_widget_ = + views::UniqueWidgetPtr(std::make_unique<ChromeTestWidget>()); + views::Widget::InitParams widget_params( + views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); + widget_params.context = GetContext(); + widget_params.ownership = + views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; + anchor_widget_->Init(std::move(widget_params)); + } + + void TearDown() override { + anchor_widget_.reset(); + + BrowserWithTestWindowTest::TearDown(); + } + + TestingProfile::TestingFactories GetTestingFactories() override { + TestingProfile::TestingFactories factories = { + {BookmarkModelFactory::GetInstance(), + BookmarkModelFactory::GetDefaultFactory()}, + {commerce::ShoppingServiceFactory::GetInstance(), + base::BindRepeating([](content::BrowserContext* context) { + return commerce::MockShoppingService::Build(); + })}}; + IdentityTestEnvironmentProfileAdaptor:: + AppendIdentityTestEnvironmentFactories(&factories); + return factories; + } + + void SetUpDependencies() { + bookmarks::BookmarkModel* bookmark_model = + BookmarkModelFactory::GetForBrowserContext(profile()); + bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model); + + bookmarks::AddIfNotBookmarked(bookmark_model, GURL(kTestURL), + std::u16string()); + + commerce::AddProductBookmark(bookmark_model, u"title", GURL(kTestURL), 0, + true); + } + + raw_ptr<PriceTrackingView> CreateViewAndShow(bool is_price_track_enabled) { + auto price_tracking_View = std::make_unique<PriceTrackingView>( + profile(), GURL(kTestURL), is_price_track_enabled); + price_tracking_View_ = + anchor_widget_->SetContentsView(std::move(price_tracking_View)); + anchor_widget_->Show(); + return price_tracking_View_; + } + + void ClickToggle() { + auto toggle_button = price_tracking_View_->toggle_button_; + gfx::Point toggle_center = toggle_button->GetLocalBounds().CenterPoint(); + gfx::Point root_center = toggle_center; + views::View::ConvertPointToWidget(price_tracking_View_, &root_center); + ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, toggle_center, + root_center, base::TimeTicks(), + ui::EF_LEFT_MOUSE_BUTTON, 0); + + toggle_button->OnMousePressed(pressed_event); + + ui::MouseEvent released_event(ui::ET_MOUSE_RELEASED, toggle_center, + root_center, base::TimeTicks(), + ui::EF_LEFT_MOUSE_BUTTON, 0); + toggle_button->OnMouseReleased(released_event); + task_environment()->RunUntilIdle(); + } + + void VerifyToggleState(bool expected_toggle_on) { + EXPECT_EQ(price_tracking_View_->IsToggleOn(), expected_toggle_on); + + if (expected_toggle_on) { + EXPECT_EQ(price_tracking_View_->toggle_button_->GetAccessibleName(), + l10n_util::GetStringUTF16( + IDS_PRICE_TRACKING_UNTRACK_PRODUCT_ACCESSIBILITY)); + } else { + EXPECT_EQ(price_tracking_View_->toggle_button_->GetAccessibleName(), + l10n_util::GetStringUTF16( + IDS_PRICE_TRACKING_TRACK_PRODUCT_ACCESSIBILITY)); + } + } + + void VerifyBodyMessage(std::u16string expected_message) { + EXPECT_EQ(price_tracking_View_->body_label_->GetText(), expected_message); + } + + private: + views::UniqueWidgetPtr anchor_widget_; + raw_ptr<PriceTrackingView> price_tracking_View_; +}; + +TEST_F(PriceTrackingViewTest, InitialPriceTrackEnabled) { + const bool enabled = true; + CreateViewAndShow(enabled); + VerifyToggleState(enabled); + VerifyBodyMessage( + l10n_util::GetStringUTF16(IDS_OMNIBOX_TRACK_PRICE_DIALOG_DESCRIPTION)); +} + +TEST_F(PriceTrackingViewTest, InitialPriceTrackDisabled) { + const bool enabled = false; + CreateViewAndShow(enabled); + VerifyToggleState(enabled); + VerifyBodyMessage( + l10n_util::GetStringUTF16(IDS_OMNIBOX_TRACK_PRICE_DIALOG_DESCRIPTION)); +} + +TEST_F(PriceTrackingViewTest, ToggleSuccessed) { + SetUpDependencies(); + + const bool initial_enabled = true; + CreateViewAndShow(initial_enabled); + VerifyToggleState(initial_enabled); + VerifyBodyMessage( + l10n_util::GetStringUTF16(IDS_OMNIBOX_TRACK_PRICE_DIALOG_DESCRIPTION)); + + static_cast<commerce::MockShoppingService*>( + commerce::ShoppingServiceFactory::GetForBrowserContext(profile())) + ->SetUnsubscribeCallbackValue(true); + + ClickToggle(); + VerifyToggleState(!initial_enabled); + VerifyBodyMessage( + l10n_util::GetStringUTF16(IDS_OMNIBOX_TRACK_PRICE_DIALOG_DESCRIPTION)); +} + +TEST_F(PriceTrackingViewTest, ToggleFailed) { + SetUpDependencies(); + + const bool initial_enabled = true; + CreateViewAndShow(initial_enabled); + VerifyToggleState(initial_enabled); + VerifyBodyMessage( + l10n_util::GetStringUTF16(IDS_OMNIBOX_TRACK_PRICE_DIALOG_DESCRIPTION)); + + static_cast<commerce::MockShoppingService*>( + commerce::ShoppingServiceFactory::GetForBrowserContext(profile())) + ->SetUnsubscribeCallbackValue(false); + + ClickToggle(); + VerifyToggleState(initial_enabled); + VerifyBodyMessage(l10n_util::GetStringUTF16( + IDS_OMNIBOX_TRACK_PRICE_DIALOG_ERROR_DESCRIPTION)); +}
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc index 615ddc3..5e021bb 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc
@@ -63,13 +63,31 @@ void DesktopMediaListController::StartUpdating( content::DesktopMediaID dialog_window_id) { - media_list_->SetViewDialogWindowId(dialog_window_id); + dialog_window_id_ = dialog_window_id; + // Defer calling StartUpdating on media lists with a delegated source list + // until the first time they are focused. + if (!media_list_->IsSourceListDelegated()) + StartUpdatingInternal(); +} + +void DesktopMediaListController::StartUpdatingInternal() { + is_updating_ = true; + media_list_->SetViewDialogWindowId(dialog_window_id_); media_list_->StartUpdating(this); } void DesktopMediaListController::FocusView() { if (view_) view_->RequestFocus(); + + if (media_list_->IsSourceListDelegated() && !is_updating_) + StartUpdatingInternal(); + + media_list_->FocusList(); +} + +void DesktopMediaListController::HideView() { + media_list_->HideList(); } absl::optional<content::DesktopMediaID>
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h b/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h index d70706f..663fcc4 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h
@@ -81,6 +81,8 @@ // Focuses this controller's view. void FocusView(); + void HideView(); + // Returns the DesktopMediaID corresponding to the current selection in this // controller's view, if there is one. absl::optional<content::DesktopMediaID> GetSelection() const; @@ -113,6 +115,8 @@ // Used in tests. void Reject(); + void StartUpdatingInternal(); + // DesktopMediaListObserver: void OnSourceAdded(int index) override; void OnSourceRemoved(int index) override; @@ -132,6 +136,8 @@ raw_ptr<ListView> view_ = nullptr; base::ScopedMultiSourceObservation<views::View, views::ViewObserver> view_observations_{this}; + bool is_updating_ = false; + content::DesktopMediaID dialog_window_id_; // Auto-selection. Used only in tests. const std::string auto_select_tab_; // Only tabs, by title.
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc index 8314108a..cc098e95 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc
@@ -4,12 +4,12 @@ #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h" -#include <algorithm> #include <string> #include <utility> #include "base/bind.h" #include "base/callback.h" +#include "base/containers/contains.h" #include "base/metrics/histogram_functions.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -326,11 +326,9 @@ std::vector<std::pair<std::u16string, std::unique_ptr<View>>> panes; - const bool current_tab_among_sources = std::any_of( - source_lists.begin(), source_lists.end(), - [](const std::unique_ptr<DesktopMediaList>& list) { - return list->GetMediaListType() == DesktopMediaList::Type::kCurrentTab; - }); + const bool current_tab_among_sources = + base::Contains(source_lists, DesktopMediaList::Type::kCurrentTab, + &DesktopMediaList::GetMediaListType); dialog_type_ = current_tab_among_sources ? DialogType::kPreferCurrentTab : DialogType::kStandard; @@ -557,6 +555,8 @@ for (const auto& category : categories_) category.controller->StartUpdating(dialog_window_id); + + GetSelectedController()->FocusView(); } DesktopMediaPickerDialogView::~DesktopMediaPickerDialogView() {} @@ -566,7 +566,10 @@ } void DesktopMediaPickerDialogView::TabSelectedAt(int index) { + if (previously_selected_category_ == index) + return; SetAudioCheckboxAt(index); + categories_[previously_selected_category_].controller->HideView(); categories_[index].controller->FocusView(); DialogModelChanged(); previously_selected_category_ = index;
diff --git a/chrome/browser/ui/views/download/download_shelf_view.cc b/chrome/browser/ui/views/download/download_shelf_view.cc index da4b35224..c52bf3e 100644 --- a/chrome/browser/ui/views/download/download_shelf_view.cc +++ b/chrome/browser/ui/views/download/download_shelf_view.cc
@@ -6,12 +6,12 @@ #include <stddef.h> -#include <algorithm> #include <utility> #include "base/check.h" #include "base/containers/adapters.h" #include "base/metrics/histogram_functions.h" +#include "base/ranges/algorithm.h" #include "base/time/time.h" #include "chrome/browser/download/download_ui_model.h" #include "chrome/browser/themes/theme_properties.h" @@ -249,8 +249,9 @@ } void DownloadShelfView::AutoClose() { - if (std::all_of(download_views_.cbegin(), download_views_.cend(), - [](const auto* view) { return view->model()->GetOpened(); })) + if (base::ranges::all_of(download_views_, [](const auto* view) { + return view->model()->GetOpened(); + })) mouse_watcher_.Start(GetWidget()->GetNativeWindow()); }
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 3954d4e..bbbaa0a3 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -6,7 +6,6 @@ #include <stdint.h> -#include <algorithm> #include <memory> #include <set> #include <utility> @@ -444,7 +443,7 @@ views::View::ConvertRectToTarget(target, child, &child_rect); return child->HitTestRect(gfx::ToEnclosingRect(child_rect)); }; - return std::any_of(children.cbegin(), children.cend(), hits_child); + return base::ranges::any_of(children, hits_child); } };
diff --git a/chrome/browser/ui/views/frame/webui_tab_strip_field_trial_browsertest.cc b/chrome/browser/ui/views/frame/webui_tab_strip_field_trial_browsertest.cc index 3b0b6a6..33bef0e4 100644 --- a/chrome/browser/ui/views/frame/webui_tab_strip_field_trial_browsertest.cc +++ b/chrome/browser/ui/views/frame/webui_tab_strip_field_trial_browsertest.cc
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <algorithm> -#include <vector> - #include "chrome/browser/ui/views/frame/webui_tab_strip_field_trial.h" +#include <vector> + #include "base/command_line.h" #include "base/memory/scoped_refptr.h" #include "base/metrics/field_trial.h" +#include "base/ranges/algorithm.h" #include "base/strings/string_piece.h" #include "base/test/mock_entropy_provider.h" #include "base/test/scoped_feature_list.h" @@ -60,10 +60,10 @@ LOG(ERROR) << group_id.name << " " << group_id.group; } - return std::any_of(active_groups.begin(), active_groups.end(), - [=](const variations::ActiveGroupId& e) { - return e.name == id.name && e.group == id.group; - }); + return base::ranges::any_of(active_groups, + [=](const variations::ActiveGroupId& e) { + return e.name == id.name && e.group == id.group; + }); } } // namespace
diff --git a/chrome/browser/ui/views/lens/lens_region_search_instructions_view.cc b/chrome/browser/ui/views/lens/lens_region_search_instructions_view.cc index b319b543..36fde07 100644 --- a/chrome/browser/ui/views/lens/lens_region_search_instructions_view.cc +++ b/chrome/browser/ui/views/lens/lens_region_search_instructions_view.cc
@@ -33,7 +33,7 @@ constexpr int kCloseButtonSize = 17; constexpr int kCornerRadius = 18; constexpr int kLabelExtraLeftMargin = 2; -constexpr int kSelectionIconSize = 16; +constexpr int kSelectionIconTopMargin = 2; int GetLensInstructionChipString() { if (features::UseAltChipString()) { @@ -123,7 +123,17 @@ auto selection_icon_view = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( selection_icon, kColorFeatureLensPromoBubbleForeground, - kSelectionIconSize)); + layout_provider->GetDistanceMetric( + DISTANCE_BUBBLE_HEADER_VECTOR_ICON_SIZE))); + // TODO(b/244610006): We need to set a top margin to make sure our icons + // feel properly centered even though they are vertically centered. Only + // needed for the selection icons which contain a cross cursor. Asset should + // be updated in the future to make this unnecessary. + selection_icon_view->SetProperty( + views::kMarginsKey, + gfx::Insets::TLBR( + features::UseSelectionIconWithImage() ? 0 : kSelectionIconTopMargin, + 0, 0, 0)); AddChildView(std::move(selection_icon_view)); }
diff --git a/chrome/browser/ui/views/lens/lens_side_panel_controller.cc b/chrome/browser/ui/views/lens/lens_side_panel_controller.cc index f34661a..3df564c 100644 --- a/chrome/browser/ui/views/lens/lens_side_panel_controller.cc +++ b/chrome/browser/ui/views/lens/lens_side_panel_controller.cc
@@ -84,6 +84,7 @@ } side_panel_url_params_ = std::make_unique<content::OpenURLParams>(params); + side_panel_view_->SetContentAndNewTabButtonVisible(false, false); MaybeLoadURLWithParams(); } @@ -185,9 +186,29 @@ MaybeLoadURLWithParams(); } -void LensSidePanelController::LoadProgressChanged(double progress) { - bool is_content_visible = progress == 1.0; - side_panel_view_->SetContentVisible(is_content_visible); +void LensSidePanelController::DocumentOnLoadCompletedInPrimaryMainFrame() { + auto last_committed_url = + side_panel_view_->GetWebContents()->GetLastCommittedURL(); + + // Since Lens Web redirects to the actual UI using HTML redirection, this + // method gets fired twice. This check ensures we only show the user the + // rendered page and not the redirect. It also ensures we immediately render + // any page that is not lens.google.com + // TODO(243935799): Cleanup this check once Lens Web no longer redirects + if (lens::ShouldPageBeVisible(last_committed_url)) + side_panel_view_->SetContentAndNewTabButtonVisible( + true, lens::IsValidLensResultUrl(last_committed_url)); +} + +// Catches case where Chrome errors. I.e. no internet connection +// TODO(243935799): Cleanup this listener once Lens Web no longer redirects +void LensSidePanelController::PrimaryPageChanged(content::Page& page) { + auto last_committed_url = + side_panel_view_->GetWebContents()->GetLastCommittedURL(); + + if (page.GetMainDocument().IsErrorDocument()) + side_panel_view_->SetContentAndNewTabButtonVisible( + true, lens::IsValidLensResultUrl(last_committed_url)); } } // namespace lens
diff --git a/chrome/browser/ui/views/lens/lens_side_panel_controller.h b/chrome/browser/ui/views/lens/lens_side_panel_controller.h index 9d1ac179..57b36ce 100644 --- a/chrome/browser/ui/views/lens/lens_side_panel_controller.h +++ b/chrome/browser/ui/views/lens/lens_side_panel_controller.h
@@ -34,7 +34,9 @@ LensSidePanelController& operator=(const LensSidePanelController&) = delete; ~LensSidePanelController() override; - void LoadProgressChanged(double progress) override; + // content::WebContentsObserver: + void DocumentOnLoadCompletedInPrimaryMainFrame() override; + void PrimaryPageChanged(content::Page& page) override; // views::ViewObserver: void OnViewBoundsChanged(views::View* observed_view) override;
diff --git a/chrome/browser/ui/views/lens/lens_side_panel_helper.cc b/chrome/browser/ui/views/lens/lens_side_panel_helper.cc index 4388881..3dc4f4d 100644 --- a/chrome/browser/ui/views/lens/lens_side_panel_helper.cc +++ b/chrome/browser/ui/views/lens/lens_side_panel_helper.cc
@@ -30,6 +30,16 @@ return net::GetValueForKeyInQuery(url, kPayloadQueryParameter, &payload); } +bool IsLensUrl(const GURL& url) { + return !url.is_empty() && + url.host() == GURL(lens::features::GetHomepageURLForLens()).host(); +} + +bool ShouldPageBeVisible(const GURL& url) { + return lens::IsValidLensResultUrl(url) || !lens::IsLensUrl(url) || + !lens::features::GetEnableLensHtmlRedirectFix(); +} + // We need to create a new URL with the specified query parameters while // also keeping the payload parameter in the original URL. GURL CreateURLForNewTab(const GURL& original_url) {
diff --git a/chrome/browser/ui/views/lens/lens_side_panel_view.cc b/chrome/browser/ui/views/lens/lens_side_panel_view.cc index 04209e1..8acb7a31 100644 --- a/chrome/browser/ui/views/lens/lens_side_panel_view.cc +++ b/chrome/browser/ui/views/lens/lens_side_panel_view.cc
@@ -186,15 +186,12 @@ AddChildView(std::move(header)); } -void LensSidePanelView::UpdateLaunchButtonState() { - auto last_committed_url = web_view_->GetWebContents()->GetLastCommittedURL(); - launch_button_->SetEnabled(lens::IsValidLensResultUrl(last_committed_url)); -} - -void LensSidePanelView::SetContentVisible(bool visible) { +void LensSidePanelView::SetContentAndNewTabButtonVisible( + bool visible, + bool enable_new_tab_button) { web_view_->SetVisible(visible); loading_indicator_web_view_->SetVisible(!visible); - LensSidePanelView::UpdateLaunchButtonState(); + launch_button_->SetEnabled(enable_new_tab_button); } LensSidePanelView::~LensSidePanelView() = default;
diff --git a/chrome/browser/ui/views/lens/lens_side_panel_view.h b/chrome/browser/ui/views/lens/lens_side_panel_view.h index ed69738e..03937f5 100644 --- a/chrome/browser/ui/views/lens/lens_side_panel_view.h +++ b/chrome/browser/ui/views/lens/lens_side_panel_view.h
@@ -36,16 +36,16 @@ // views::FlexLayoutView: void OnThemeChanged() override; - void SetContentVisible(bool visible); + // Shows / hides the lens results and the loading view to avoid showing + // loading artifacts. If the visible bool is false, show loading view else + // show lens results view. Also enables/disables the new tab button. + void SetContentAndNewTabButtonVisible(bool visible, + bool enable_new_tab_button); private: void CreateAndInstallHeader(base::RepeatingClosure close_callback, base::RepeatingClosure launch_callback); - // Validates side panel URL and updates enabled/disabled - // state of the launch button. - void UpdateLaunchButtonState(); - raw_ptr<views::ImageView> branding_; raw_ptr<views::Separator> separator_; raw_ptr<views::WebView> loading_indicator_web_view_;
diff --git a/chrome/browser/ui/views/location_bar/OWNERS b/chrome/browser/ui/views/location_bar/OWNERS index b6f723a..b988c0b 100644 --- a/chrome/browser/ui/views/location_bar/OWNERS +++ b/chrome/browser/ui/views/location_bar/OWNERS
@@ -1,3 +1,5 @@ estade@chromium.org olesiamarukhno@google.com file://components/omnibox/OWNERS + +per-file intent_chip_button_browsertest.cc=file://chrome/browser/apps/intent_helper/OWNERS
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 ec5fc2b..e544344 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -85,6 +85,7 @@ #include "components/omnibox/browser/omnibox_popup_view.h" #include "components/omnibox/browser/vector_icons.h" #include "components/omnibox/common/omnibox_features.h" +#include "components/performance_manager/public/features.h" #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/common/features.h" #include "components/search_engines/template_url.h" @@ -321,6 +322,10 @@ params.types_enabled.push_back(PageActionIconType::kCookieControls); params.types_enabled.push_back( PageActionIconType::kPaymentsOfferNotification); + if (base::FeatureList::IsEnabled( + performance_manager::features::kHighEfficiencyModeAvailable)) { + params.types_enabled.push_back(PageActionIconType::kHighEfficiency); + } } // Add icons only when feature is not enabled. Otherwise icons will // be added to the ToolbarPageActionIconContainerView.
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc index dbdac4e..ebb7535b 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -16,6 +16,7 @@ #include "base/i18n/rtl.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" +#include "base/ranges/algorithm.h" #include "base/strings/escape.h" #include "base/strings/string_util.h" #include "base/task/task_traits.h" @@ -678,8 +679,7 @@ // fakebox is hidden and there's only whitespace in the omnibox, it's // difficult for the user to see that the focus moved to the omnibox. (model()->focus_state() == OMNIBOX_FOCUS_INVISIBLE && - std::all_of(text.begin(), text.end(), - base::IsUnicodeWhitespace<char16_t>))) { + base::ranges::all_of(text, base::IsUnicodeWhitespace<char16_t>))) { return; }
diff --git a/chrome/browser/ui/views/page_action/page_action_icon_controller.cc b/chrome/browser/ui/views/page_action/page_action_icon_controller.cc index 0e1505f6..dec5e12 100644 --- a/chrome/browser/ui/views/page_action/page_action_icon_controller.cc +++ b/chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -4,14 +4,14 @@ #include "chrome/browser/ui/views/page_action/page_action_icon_controller.h" -#include <algorithm> - #include "base/bind.h" #include "base/feature_list.h" +#include "base/ranges/algorithm.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h" #include "chrome/browser/sharing/sms/sms_remote_fetcher_ui_controller.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/page_action/page_action_icon_type.h" #include "chrome/browser/ui/views/autofill/payments/local_card_migration_icon_view.h" #include "chrome/browser/ui/views/autofill/payments/offer_notification_icon_view.h" #include "chrome/browser/ui/views/autofill/payments/save_payment_icon_view.h" @@ -29,6 +29,7 @@ #include "chrome/browser/ui/views/page_action/pwa_install_view.h" #include "chrome/browser/ui/views/page_action/zoom_view.h" #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" +#include "chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.h" #include "chrome/browser/ui/views/qrcode_generator/qrcode_generator_icon_view.h" #include "chrome/browser/ui/views/reader_mode/reader_mode_icon_view.h" #include "chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_icon_view.h" @@ -111,6 +112,12 @@ params.browser, params.icon_label_bubble_delegate, params.page_action_icon_delegate)); break; + case PageActionIconType::kHighEfficiency: + add_page_action_icon( + type, std::make_unique<HighEfficiencyChipView>( + params.command_updater, params.icon_label_bubble_delegate, + params.page_action_icon_delegate)); + break; case PageActionIconType::kIntentPicker: add_page_action_icon( type, std::make_unique<IntentPickerView>( @@ -245,9 +252,9 @@ } bool PageActionIconController::IsAnyIconVisible() const { - return std::any_of( - page_action_icon_views_.begin(), page_action_icon_views_.end(), - [](auto icon_item) { return icon_item.second->GetVisible(); }); + return base::ranges::any_of(page_action_icon_views_, [](auto icon_item) { + return icon_item.second->GetVisible(); + }); } bool PageActionIconController::ActivateFirstInactiveBubbleForAccessibility() {
diff --git a/chrome/browser/ui/views/passwords/password_items_view.cc b/chrome/browser/ui/views/passwords/password_items_view.cc index 70b98be..258c3d8 100644 --- a/chrome/browser/ui/views/passwords/password_items_view.cc +++ b/chrome/browser/ui/views/passwords/password_items_view.cc
@@ -4,11 +4,11 @@ #include "chrome/browser/ui/views/passwords/password_items_view.h" -#include <algorithm> #include <memory> #include <numeric> #include <utility> +#include "base/containers/contains.h" #include "base/memory/raw_ptr.h" #include "base/strings/utf_string_conversions.h" #include "base/types/strong_alias.h" @@ -67,11 +67,9 @@ PasswordItemsViewColumnSetType InferColumnSetTypeFromCredentials( const std::vector<password_manager::PasswordForm>& credentials) { - if (std::any_of(credentials.begin(), credentials.end(), - [](const password_manager::PasswordForm& form) { - return form.in_store == - password_manager::PasswordForm::Store::kAccountStore; - })) { + if (base::Contains(credentials, + password_manager::PasswordForm::Store::kAccountStore, + &password_manager::PasswordForm::in_store)) { return MULTI_STORE_PASSWORD_COLUMN_SET; } return PASSWORD_COLUMN_SET;
diff --git a/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.cc b/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.cc new file mode 100644 index 0000000..d9434ac --- /dev/null +++ b/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.cc
@@ -0,0 +1,60 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.h" +#include "chrome/app/vector_icons/vector_icons.h" +#include "chrome/browser/ui/browser_element_identifiers.h" +#include "chrome/browser/ui/performance_controls/tab_discard_tab_helper.h" +#include "chrome/browser/ui/view_ids.h" +#include "chrome/browser/ui/views/page_action/page_action_icon_view.h" +#include "chrome/grit/generated_resources.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/views/view_class_properties.h" + +HighEfficiencyChipView::HighEfficiencyChipView( + CommandUpdater* command_updater, + IconLabelBubbleView::Delegate* icon_label_bubble_delegate, + PageActionIconView::Delegate* page_action_icon_delegate) + : PageActionIconView(command_updater, + 0, + icon_label_bubble_delegate, + page_action_icon_delegate) { + SetProperty(views::kElementIdentifierKey, kHighEfficiencyChipElementId); +} + +HighEfficiencyChipView::~HighEfficiencyChipView() = default; + +void HighEfficiencyChipView::UpdateImpl() { + content::WebContents* const web_contents = GetWebContents(); + if (!web_contents) { + return; + } + TabDiscardTabHelper* const tab_helper = + TabDiscardTabHelper::FromWebContents(web_contents); + SetVisible(tab_helper->IsChipVisible()); +} + +void HighEfficiencyChipView::OnExecuting( + PageActionIconView::ExecuteSource execute_source) {} + +bool HighEfficiencyChipView::IsBubbleShowing() const { + return false; +} + +const gfx::VectorIcon& HighEfficiencyChipView::GetVectorIcon() const { + return kHighEfficiencyIcon; +} + +views::BubbleDialogDelegate* HighEfficiencyChipView::GetBubble() const { + return nullptr; +} + +std::u16string HighEfficiencyChipView::GetTextForTooltipAndAccessibleName() + const { + return l10n_util::GetStringUTF16(IDS_HIGH_EFFICIENCY_CHIP_ACCNAME); +} + +BEGIN_METADATA(HighEfficiencyChipView, PageActionIconView) +END_METADATA
diff --git a/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.h b/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.h new file mode 100644 index 0000000..8e94595 --- /dev/null +++ b/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.h
@@ -0,0 +1,35 @@ +// Copyright 2022 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. + +#ifndef CHROME_BROWSER_UI_VIEWS_PERFORMANCE_CONTROLS_HIGH_EFFICIENCY_CHIP_VIEW_H_ +#define CHROME_BROWSER_UI_VIEWS_PERFORMANCE_CONTROLS_HIGH_EFFICIENCY_CHIP_VIEW_H_ + +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/views/page_action/page_action_icon_view.h" +#include "ui/base/metadata/metadata_header_macros.h" + +// Represents the high efficiency page action chip that appears on previously +// discarded tabs. +class HighEfficiencyChipView : public PageActionIconView { + public: + METADATA_HEADER(HighEfficiencyChipView); + HighEfficiencyChipView( + CommandUpdater* command_updater, + IconLabelBubbleView::Delegate* icon_label_bubble_delegate, + PageActionIconView::Delegate* page_action_icon_delegate); + HighEfficiencyChipView(const HighEfficiencyChipView&) = delete; + HighEfficiencyChipView& operator=(const HighEfficiencyChipView&) = delete; + ~HighEfficiencyChipView() override; + + protected: + // PageActionIconView: + void UpdateImpl() override; + void OnExecuting(PageActionIconView::ExecuteSource execute_source) override; + views::BubbleDialogDelegate* GetBubble() const override; + const gfx::VectorIcon& GetVectorIcon() const override; + std::u16string GetTextForTooltipAndAccessibleName() const override; + bool IsBubbleShowing() const override; +}; + +#endif // CHROME_BROWSER_UI_VIEWS_PERFORMANCE_CONTROLS_HIGH_EFFICIENCY_CHIP_VIEW_H_
diff --git a/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view_unittest.cc b/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view_unittest.cc new file mode 100644 index 0000000..c1f8912 --- /dev/null +++ b/chrome/browser/ui/views/performance_controls/high_efficiency_chip_view_unittest.cc
@@ -0,0 +1,125 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/views/performance_controls/high_efficiency_chip_view.h" + +#include "chrome/browser/ui/performance_controls/tab_discard_tab_helper.h" +#include "chrome/test/base/chrome_render_view_host_test_harness.h" +#include "chrome/test/views/chrome_views_test_base.h" +#include "content/public/browser/web_contents.h" +#include "content/public/test/mock_navigation_handle.h" +#include "content/public/test/web_contents_tester.h" + +class TestPageActionIconDelegate : public IconLabelBubbleView::Delegate, + public PageActionIconView::Delegate { + public: + TestPageActionIconDelegate() = default; + virtual ~TestPageActionIconDelegate() = default; + + // IconLabelBubbleView::Delegate: + SkColor GetIconLabelBubbleSurroundingForegroundColor() const override { + return gfx::kPlaceholderColor; + } + SkColor GetIconLabelBubbleBackgroundColor() const override { + return gfx::kPlaceholderColor; + } + + // PageActionIconView::Delegate: + content::WebContents* GetWebContentsForPageActionIconView() override { + return web_contents_; + } + + void SetWebContents(content::WebContents* web_contents) { + web_contents_ = web_contents; + } + + private: + content::WebContents* web_contents_; +}; + +class DiscardMockNavigationHandle : public content::MockNavigationHandle { + public: + void SetWasDiscarded(bool was_discarded) { was_discarded_ = was_discarded; } + bool ExistingDocumentWasDiscarded() const override { return was_discarded_; } + + private: + bool was_discarded_ = false; +}; + +class HighEfficiencyChipViewTest : public ChromeViewsTestBase { + public: + protected: + HighEfficiencyChipViewTest() = default; + + void SetUp() override { + ChromeViewsTestBase::SetUp(); + + widget_ = CreateTestWidget(); + delegate_ = TestPageActionIconDelegate(); + view_ = widget_->SetContentsView(std::make_unique<HighEfficiencyChipView>( + /*command_updater=*/nullptr, delegate(), delegate())); + + widget_->Show(); + } + + void TearDown() override { + widget_.reset(); + ChromeViewsTestBase::TearDown(); + } + + void SetTabDiscardState(bool is_discarded) { + TabDiscardTabHelper* tab_helper = TabDiscardTabHelper::FromWebContents( + delegate()->GetWebContentsForPageActionIconView()); + std::unique_ptr<DiscardMockNavigationHandle> navigation_handle = + std::make_unique<DiscardMockNavigationHandle>(); + navigation_handle.get()->SetWasDiscarded(is_discarded); + tab_helper->DidStartNavigation(navigation_handle.get()); + } + + HighEfficiencyChipView* view() { return view_; } + views::Widget* widget() { return widget_.get(); } + TestPageActionIconDelegate* delegate() { return &delegate_; } + + Profile* profile() { return &profile_; } + + private: + TestPageActionIconDelegate delegate_; + raw_ptr<HighEfficiencyChipView> view_; + std::unique_ptr<views::Widget> widget_; + TestingProfile profile_; +}; + +// When the previous page has a tab discard state of true, when the icon is +// updated it should be visible. +TEST_F(HighEfficiencyChipViewTest, ShouldShowForDiscardedPage) { + // This enables uses of TestWebContents. + content::RenderViewHostTestEnabler test_render_host_factories; + + // Initialize WebContents with the TabDiscardHelper + std::unique_ptr<content::WebContents> web_contents = + content::WebContentsTester::CreateTestWebContents(profile(), nullptr); + TabDiscardTabHelper::CreateForWebContents(web_contents.get()); + delegate()->SetWebContents(web_contents.get()); + + SetTabDiscardState(true); + view()->Update(); + EXPECT_TRUE(view()->GetVisible()); +} + +// When the previous page was not previously discarded, the icon should not be +// visible. +TEST_F(HighEfficiencyChipViewTest, ShouldNotShowForRegularPage) { + // This enables uses of TestWebContents. + content::RenderViewHostTestEnabler test_render_host_factories; + + // Initialize WebContents with the TabDiscardHelper + std::unique_ptr<content::WebContents> web_contents = + content::WebContentsTester::CreateTestWebContents(profile(), nullptr); + TabDiscardTabHelper::CreateForWebContents(web_contents.get()); + delegate()->SetWebContents(web_contents.get()); + + SetTabDiscardState(false); + view()->Update(); + EXPECT_FALSE(view()->GetVisible()); +}
diff --git a/chrome/browser/ui/views/permissions/permission_prompt_chip.cc b/chrome/browser/ui/views/permissions/permission_prompt_chip.cc index a8f000a..dd26352 100644 --- a/chrome/browser/ui/views/permissions/permission_prompt_chip.cc +++ b/chrome/browser/ui/views/permissions/permission_prompt_chip.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ui/views/permissions/permission_prompt_chip.h" +#include "base/containers/contains.h" +#include "base/ranges/algorithm.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" #include "chrome/browser/ui/views/permissions/permission_chip.h" #include "components/permissions/features.h"
diff --git a/chrome/browser/ui/views/permissions/permission_prompt_factory.cc b/chrome/browser/ui/views/permissions/permission_prompt_factory.cc index eff04a2..78942ac 100644 --- a/chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ b/chrome/browser/ui/views/permissions/permission_prompt_factory.cc
@@ -4,6 +4,7 @@ #include <memory> +#include "base/ranges/algorithm.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/permission_bubble/permission_prompt.h" #include "chrome/browser/ui/views/frame/browser_view.h" @@ -65,10 +66,10 @@ return false; std::vector<permissions::PermissionRequest*> requests = delegate->Requests(); - return std::all_of(requests.begin(), requests.end(), - [](permissions::PermissionRequest* request) { - return request->GetRequestChipText().has_value(); - }); + return base::ranges::all_of( + requests, [](permissions::PermissionRequest* request) { + return request->GetRequestChipText().has_value(); + }); } bool IsLocationBarDisplayed(Browser* browser) { @@ -84,13 +85,13 @@ } std::vector<permissions::PermissionRequest*> requests = delegate->Requests(); - return std::all_of(requests.begin(), requests.end(), - [](permissions::PermissionRequest* request) { - return request->request_type() == - permissions::RequestType::kNotifications || - request->request_type() == - permissions::RequestType::kGeolocation; - }); + return base::ranges::all_of( + requests, [](permissions::PermissionRequest* request) { + return request->request_type() == + permissions::RequestType::kNotifications || + request->request_type() == + permissions::RequestType::kGeolocation; + }); } std::unique_ptr<permissions::PermissionPrompt> CreatePwaPrompt(
diff --git a/chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.cc b/chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.cc index b48fc30..b4b4378 100644 --- a/chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.cc +++ b/chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.cc
@@ -78,7 +78,7 @@ if (lens::features::GetEnableLensSidePanelFooter()) CreateAndInstallFooter(); - SetContentVisible(false); + SetContentAndNewTabButtonVisible(false, false); auto* web_contents = web_view_->GetWebContents(); web_contents->SetDelegate(this); Observe(web_contents); @@ -105,14 +105,27 @@ browser_view_->side_panel_coordinator()->Close(); } -void LensUnifiedSidePanelView::LoadProgressChanged(double progress) { - bool is_content_visible = progress == 1.0; - SetContentVisible(is_content_visible); - if (launch_button_ != nullptr && is_content_visible) { - auto last_committed_url = - web_view_->GetWebContents()->GetLastCommittedURL(); - launch_button_->SetEnabled(lens::IsValidLensResultUrl(last_committed_url)); - } +void LensUnifiedSidePanelView::DocumentOnLoadCompletedInPrimaryMainFrame() { + auto last_committed_url = web_view_->GetWebContents()->GetLastCommittedURL(); + + // Since Lens Web redirects to the actual UI using HTML redirection, this + // method gets fired twice. This check ensures we only show the user the + // rendered page and not the redirect. It also ensures we immediately render + // any page that is not lens.google.com + // TODO(243935799): Cleanup this check once Lens Web no longer redirects + if (lens::ShouldPageBeVisible(last_committed_url)) + SetContentAndNewTabButtonVisible( + true, lens::IsValidLensResultUrl(last_committed_url)); +} + +// Catches case where Chrome errors. I.e. no internet connection +// TODO(243935799): Cleanup this listener once Lens Web no longer redirects +void LensUnifiedSidePanelView::PrimaryPageChanged(content::Page& page) { + auto last_committed_url = web_view_->GetWebContents()->GetLastCommittedURL(); + + if (page.GetMainDocument().IsErrorDocument()) + SetContentAndNewTabButtonVisible( + true, lens::IsValidLensResultUrl(last_committed_url)); } bool LensUnifiedSidePanelView::IsLaunchButtonEnabledForTesting() { @@ -128,6 +141,7 @@ void LensUnifiedSidePanelView::OpenUrl(const content::OpenURLParams& params) { side_panel_url_params_ = std::make_unique<content::OpenURLParams>(params); + SetContentAndNewTabButtonVisible(false, false); MaybeLoadURLWithParams(); } @@ -232,9 +246,14 @@ MaybeLoadURLWithParams(); } -void LensUnifiedSidePanelView::SetContentVisible(bool visible) { +void LensUnifiedSidePanelView::SetContentAndNewTabButtonVisible( + bool visible, + bool enable_new_tab_button) { web_view_->SetVisible(visible); loading_indicator_web_view_->SetVisible(!visible); + + if (launch_button_ != nullptr) + launch_button_->SetEnabled(enable_new_tab_button); } LensUnifiedSidePanelView::~LensUnifiedSidePanelView() = default;
diff --git a/chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.h b/chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.h index 5594904..f63c845 100644 --- a/chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.h +++ b/chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.h
@@ -58,11 +58,14 @@ // Shows / hides the lens results and the loading view to avoid showing // loading artifacts. If the visible bool is false, show loading view else - // show lens results view. - void SetContentVisible(bool visible); + // show lens results view. Also enables/disables the new tab button depending + // if the lens results page is showing. + void SetContentAndNewTabButtonVisible(bool visible, + bool enable_new_tab_button); // content::WebContentsObserver: - void LoadProgressChanged(double progress) override; + void DocumentOnLoadCompletedInPrimaryMainFrame() override; + void PrimaryPageChanged(content::Page& page) override; // content::WebContentsDelegate: bool HandleContextMenu(content::RenderFrameHost& render_frame_host,
diff --git a/chrome/browser/ui/views/toolbar/chrome_labs_button.cc b/chrome/browser/ui/views/toolbar/chrome_labs_button.cc index cea8f32c..dc048f6d 100644 --- a/chrome/browser/ui/views/toolbar/chrome_labs_button.cc +++ b/chrome/browser/ui/views/toolbar/chrome_labs_button.cc
@@ -157,12 +157,11 @@ return false; } #endif - const std::vector<LabInfo>& all_labs = model->GetLabInfo(); - return std::any_of(all_labs.begin(), all_labs.end(), - [&profile](const LabInfo& lab) { - return IsChromeLabsFeatureValid(lab, profile); - }); + return base::ranges::any_of(model->GetLabInfo(), + [&profile](const LabInfo& lab) { + return IsChromeLabsFeatureValid(lab, profile); + }); } BEGIN_METADATA(ChromeLabsButton, ToolbarButton)
diff --git a/chrome/browser/ui/views/webview_accessibility_browsertest.cc b/chrome/browser/ui/views/webview_accessibility_browsertest.cc index 6d463e2..acb10c61 100644 --- a/chrome/browser/ui/views/webview_accessibility_browsertest.cc +++ b/chrome/browser/ui/views/webview_accessibility_browsertest.cc
@@ -16,6 +16,7 @@ #include "net/test/embedded_test_server/request_handler_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/accessibility/ax_enums.mojom.h" +#include "ui/accessibility/ax_node.h" #include "ui/accessibility/ax_tree.h" #include "ui/views/controls/webview/webview.h" #include "url/gurl.h"
diff --git a/chrome/browser/ui/webauthn/sheet_models.cc b/chrome/browser/ui/webauthn/sheet_models.cc index d9e8a2c..65cc879 100644 --- a/chrome/browser/ui/webauthn/sheet_models.cc +++ b/chrome/browser/ui/webauthn/sheet_models.cc
@@ -4,7 +4,6 @@ #include "chrome/browser/ui/webauthn/sheet_models.h" -#include <algorithm> #include <memory> #include <string> #include <utility> @@ -14,6 +13,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/notreached.h" +#include "base/ranges/algorithm.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" @@ -160,9 +160,9 @@ const { // If any phones are shown then also show a button that goes to the settings // page to manage them. - return std::any_of( - dialog_model()->mechanisms().begin(), dialog_model()->mechanisms().end(), - [](const AuthenticatorRequestDialogModel::Mechanism& mechanism) -> bool { + return base::ranges::any_of( + dialog_model()->mechanisms(), + [](const AuthenticatorRequestDialogModel::Mechanism& mechanism) { return absl::holds_alternative< AuthenticatorRequestDialogModel::Mechanism::Phone>(mechanism.type); });
diff --git a/chrome/browser/ui/webui/app_management/app_management_shelf_delegate_chromeos.cc b/chrome/browser/ui/webui/app_management/app_management_shelf_delegate_chromeos.cc index 0cd8a43..afd563c 100644 --- a/chrome/browser/ui/webui/app_management/app_management_shelf_delegate_chromeos.cc +++ b/chrome/browser/ui/webui/app_management/app_management_shelf_delegate_chromeos.cc
@@ -4,11 +4,10 @@ #include "chrome/browser/ui/webui/app_management/app_management_shelf_delegate_chromeos.h" -#include <algorithm> - #include "ash/public/cpp/shelf_item.h" #include "ash/public/cpp/shelf_model.h" #include "ash/public/cpp/shelf_types.h" +#include "base/containers/contains.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/ash/shelf/app_shortcut_shelf_item_controller.h" #include "chrome/browser/ui/ash/shelf/chrome_shelf_controller.h" @@ -76,8 +75,7 @@ std::vector<std::string> policy_pinned_apps = shelf_controller->shelf_prefs()->GetAppsPinnedByPolicy( shelf_controller_helper_.get()); - return std::any_of(policy_pinned_apps.begin(), policy_pinned_apps.end(), - [app_id](std::string app) { return app_id == app; }); + return base::Contains(policy_pinned_apps, app_id); } void AppManagementShelfDelegate::SetPinned(const std::string& app_id,
diff --git a/chrome/browser/ui/webui/commerce/DEPS b/chrome/browser/ui/webui/commerce/DEPS new file mode 100644 index 0000000..b1320ec --- /dev/null +++ b/chrome/browser/ui/webui/commerce/DEPS
@@ -0,0 +1 @@ +include_rules = ["+components/power_bookmarks/core"] \ No newline at end of file
diff --git a/chrome/browser/ui/webui/commerce/OWNERS b/chrome/browser/ui/webui/commerce/OWNERS new file mode 100644 index 0000000..8902e717 --- /dev/null +++ b/chrome/browser/ui/webui/commerce/OWNERS
@@ -0,0 +1,3 @@ +yuezhanggg@chromium.org + +file://components/commerce/OWNERS
diff --git a/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.cc b/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.cc new file mode 100644 index 0000000..62ec9fe5 --- /dev/null +++ b/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.cc
@@ -0,0 +1,58 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.h" + +#include "chrome/app/chrome_command_ids.h" +#include "components/bookmarks/browser/bookmark_model.h" +#include "components/bookmarks/browser/bookmark_node.h" +#include "components/bookmarks/browser/bookmark_utils.h" +#include "components/commerce/core/price_tracking_utils.h" +#include "components/commerce/core/shopping_service.h" +#include "components/strings/grit/components_strings.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/base/models/simple_menu_model.h" + +namespace commerce { + +ShoppingListContextMenuController::ShoppingListContextMenuController( + bookmarks::BookmarkModel* bookmark_model, + ShoppingService* shopping_service, + const bookmarks::BookmarkNode* bookmark_node, + ui::SimpleMenuModel* menu_model) + : bookmark_model_(bookmark_model), + shopping_service_(shopping_service), + bookmark_node_(bookmark_node), + menu_model_(menu_model) {} + +void ShoppingListContextMenuController::AddPriceTrackingItemForBookmark() { + DCHECK_EQ(menu_model_->GetItemCount(), 0UL); + if (commerce::IsBookmarkPriceTracked(bookmark_model_, bookmark_node_)) { + menu_model_->AddItem( + IDC_BOOKMARK_BAR_UNTRACK_PRICE_FOR_SHOPPING_BOOKMARK, + l10n_util::GetStringUTF16(IDS_BOOKMARKS_MENU_UNTRACK_PRICE)); + } else { + menu_model_->AddItem( + IDC_BOOKMARK_BAR_TRACK_PRICE_FOR_SHOPPING_BOOKMARK, + l10n_util::GetStringUTF16(IDS_BOOKMARKS_MENU_TRACK_PRICE)); + } +} + +bool ShoppingListContextMenuController::ExecuteCommand(int command_id) { + switch (command_id) { + case IDC_BOOKMARK_BAR_TRACK_PRICE_FOR_SHOPPING_BOOKMARK: + commerce::SetPriceTrackingStateForBookmark( + shopping_service_, bookmark_model_, bookmark_node_, true, + base::DoNothing()); + return true; + case IDC_BOOKMARK_BAR_UNTRACK_PRICE_FOR_SHOPPING_BOOKMARK: + commerce::SetPriceTrackingStateForBookmark( + shopping_service_, bookmark_model_, bookmark_node_, false, + base::DoNothing()); + return true; + default: + return false; + } +} +} // namespace commerce
diff --git a/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.h b/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.h new file mode 100644 index 0000000..c7a34f4 --- /dev/null +++ b/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.h
@@ -0,0 +1,54 @@ +// Copyright 2022 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. + +#ifndef CHROME_BROWSER_UI_WEBUI_COMMERCE_SHOPPING_LIST_CONTEXT_MENU_CONTROLLER_H_ +#define CHROME_BROWSER_UI_WEBUI_COMMERCE_SHOPPING_LIST_CONTEXT_MENU_CONTROLLER_H_ + +#include "base/memory/raw_ptr.h" + +namespace bookmarks { +class BookmarkModel; +class BookmarkNode; +} // namespace bookmarks + +namespace ui { +class SimpleMenuModel; +} // namespace ui + +namespace commerce { + +class ShoppingService; + +// Helper class for shopping-related items in side panel context menu. This is +// created when the context menu is opened and destroyed when the side panel is +// closed. +class ShoppingListContextMenuController { + public: + ShoppingListContextMenuController( + bookmarks::BookmarkModel* bookmark_model, + ShoppingService* shopping_service, + const bookmarks::BookmarkNode* bookmark_node, + ui::SimpleMenuModel* menu_model); + ShoppingListContextMenuController(const ShoppingListContextMenuController&) = + delete; + ShoppingListContextMenuController& operator=( + const ShoppingListContextMenuController&) = delete; + ~ShoppingListContextMenuController() = default; + + // Add menu item that will track or untrack price for this product bookmark + // based on whether it's been tracked now. + void AddPriceTrackingItemForBookmark(); + // Execute the context menu action represented by |command_id|. + bool ExecuteCommand(int command_id); + + private: + raw_ptr<bookmarks::BookmarkModel> bookmark_model_; + raw_ptr<ShoppingService> shopping_service_; + const bookmarks::BookmarkNode* bookmark_node_; + raw_ptr<ui::SimpleMenuModel> menu_model_; +}; + +} // namespace commerce + +#endif // CHROME_BROWSER_UI_WEBUI_COMMERCE_SHOPPING_LIST_CONTEXT_MENU_CONTROLLER_H_
diff --git a/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller_unittest.cc b/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller_unittest.cc new file mode 100644 index 0000000..ebb8d31 --- /dev/null +++ b/chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller_unittest.cc
@@ -0,0 +1,118 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <memory> + +#include "base/test/task_environment.h" +#include "chrome/app/chrome_command_ids.h" +#include "chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.h" +#include "components/bookmarks/browser/bookmark_model.h" +#include "components/bookmarks/browser/bookmark_node.h" +#include "components/bookmarks/browser/bookmark_utils.h" +#include "components/bookmarks/test/test_bookmark_client.h" +#include "components/commerce/core/mock_shopping_service.h" +#include "components/commerce/core/price_tracking_utils.h" +#include "components/commerce/core/test_utils.h" +#include "components/power_bookmarks/core/power_bookmark_utils.h" +#include "components/power_bookmarks/core/proto/power_bookmark_meta.pb.h" +#include "components/strings/grit/components_strings.h" +#include "content/public/test/browser_task_environment.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/base/models/simple_menu_model.h" + +namespace commerce { +namespace { + +class ShoppingListContextMenuControllerTest : public testing::Test { + public: + ShoppingListContextMenuControllerTest() + : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {} + + void SetUp() override { + testing::Test::SetUp(); + + bookmark_model_ = bookmarks::TestBookmarkClient::CreateModel(); + shopping_service_ = std::make_unique<MockShoppingService>(); + menu_model_ = std::make_unique<ui::SimpleMenuModel>(nullptr); + const bookmarks::BookmarkNode* product = AddProductBookmark( + bookmark_model_.get(), u"product 1", GURL("http://example.com/1"), 123L, + true, 1230000, "usd"); + bookmark_id_ = product->id(); + controller_ = std::make_unique<commerce::ShoppingListContextMenuController>( + bookmark_model_.get(), shopping_service_.get(), product, + menu_model_.get()); + } + + bookmarks::BookmarkModel* bookmark_model() { return bookmark_model_.get(); } + + const bookmarks::BookmarkNode* bookmark_node() { + return bookmarks::GetBookmarkNodeByID(bookmark_model_.get(), bookmark_id_); + } + + commerce::ShoppingListContextMenuController* controller() { + return controller_.get(); + } + + ui::SimpleMenuModel* menu_mode() { return menu_model_.get(); } + + protected: + content::BrowserTaskEnvironment task_environment_; + + private: + std::unique_ptr<bookmarks::BookmarkModel> bookmark_model_; + std::unique_ptr<MockShoppingService> shopping_service_; + std::unique_ptr<commerce::ShoppingListContextMenuController> controller_; + std::unique_ptr<ui::SimpleMenuModel> menu_model_; + int64_t bookmark_id_; +}; + +TEST_F(ShoppingListContextMenuControllerTest, AddMenuItem) { + ASSERT_TRUE(IsBookmarkPriceTracked(bookmark_model(), bookmark_node())); + + controller()->AddPriceTrackingItemForBookmark(); + ASSERT_EQ(menu_mode()->GetItemCount(), 1UL); + ASSERT_EQ(menu_mode()->GetCommandIdAt(0), + IDC_BOOKMARK_BAR_UNTRACK_PRICE_FOR_SHOPPING_BOOKMARK); + ASSERT_EQ(menu_mode()->GetLabelAt(0), + l10n_util::GetStringUTF16(IDS_BOOKMARKS_MENU_UNTRACK_PRICE)); + menu_mode()->Clear(); + + std::unique_ptr<power_bookmarks::PowerBookmarkMeta> meta = + power_bookmarks::GetNodePowerBookmarkMeta(bookmark_model(), + bookmark_node()); + power_bookmarks::ShoppingSpecifics* specifics = + meta->mutable_shopping_specifics(); + specifics->set_is_price_tracked(false); + power_bookmarks::SetNodePowerBookmarkMeta(bookmark_model(), bookmark_node(), + std::move(meta)); + ASSERT_FALSE(IsBookmarkPriceTracked(bookmark_model(), bookmark_node())); + + controller()->AddPriceTrackingItemForBookmark(); + ASSERT_EQ(menu_mode()->GetItemCount(), 1UL); + ASSERT_EQ(menu_mode()->GetCommandIdAt(0), + IDC_BOOKMARK_BAR_TRACK_PRICE_FOR_SHOPPING_BOOKMARK); + ASSERT_EQ(menu_mode()->GetLabelAt(0), + l10n_util::GetStringUTF16(IDS_BOOKMARKS_MENU_TRACK_PRICE)); +} + +TEST_F(ShoppingListContextMenuControllerTest, ExecuteMenuCommand) { + ASSERT_TRUE(IsBookmarkPriceTracked(bookmark_model(), bookmark_node())); + + ASSERT_TRUE(controller()->ExecuteCommand( + IDC_BOOKMARK_BAR_UNTRACK_PRICE_FOR_SHOPPING_BOOKMARK)); + task_environment_.RunUntilIdle(); + ASSERT_FALSE(IsBookmarkPriceTracked(bookmark_model(), bookmark_node())); + + ASSERT_TRUE(controller()->ExecuteCommand( + IDC_BOOKMARK_BAR_TRACK_PRICE_FOR_SHOPPING_BOOKMARK)); + task_environment_.RunUntilIdle(); + ASSERT_TRUE(IsBookmarkPriceTracked(bookmark_model(), bookmark_node())); + + // Ignore commands that are not price tracking-related. + ASSERT_FALSE(controller()->ExecuteCommand(IDC_BOOKMARK_BAR_OPEN_ALL)); +} + +} // namespace +} // namespace commerce
diff --git a/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_page_handler.cc b/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_page_handler.cc index bff9f72..6611d2c 100644 --- a/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_page_handler.cc +++ b/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_page_handler.cc
@@ -9,6 +9,7 @@ #include "base/metrics/user_metrics_action.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" +#include "chrome/browser/commerce/shopping_service_factory.h" #include "chrome/browser/prefs/incognito_mode_prefs.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h" @@ -20,6 +21,7 @@ #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/chrome_pages.h" +#include "chrome/browser/ui/webui/commerce/shopping_list_context_menu_controller.h" #include "chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h" #include "chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h" #include "chrome/grit/generated_resources.h" @@ -54,12 +56,21 @@ browser->profile(), BookmarkLaunchLocation::kSidePanelContextMenu, bookmark->parent(), - {bookmark}))) { + {bookmark}))), + shopping_list_controller_( + base::WrapUnique(new commerce::ShoppingListContextMenuController( + BookmarkModelFactory::GetForBrowserContext(browser->profile()), + commerce::ShoppingServiceFactory::GetForBrowserContext( + browser->profile()), + bookmark, + this))) { if (source == side_panel::mojom::ActionSource::kPriceTracking) { AddItem(IDC_BOOKMARK_BAR_OPEN_ALL); AddItem(IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW); AddItem(IDC_BOOKMARK_BAR_OPEN_ALL_INCOGNITO); AddSeparator(ui::NORMAL_SEPARATOR); + shopping_list_controller_->AddPriceTrackingItemForBookmark(); + AddSeparator(ui::NORMAL_SEPARATOR); AddItem(IDC_BOOKMARK_MANAGER); return; } @@ -90,6 +101,8 @@ ~BookmarkContextMenu() override = default; void ExecuteCommand(int command_id, int event_flags) override { + if (shopping_list_controller_->ExecuteCommand(command_id)) + return; controller_->ExecuteCommand(command_id, event_flags); } @@ -114,6 +127,8 @@ } base::WeakPtr<ui::MojoBubbleWebUIController::Embedder> embedder_; std::unique_ptr<BookmarkContextMenuController> controller_; + std::unique_ptr<commerce::ShoppingListContextMenuController> + shopping_list_controller_; }; } // namespace
diff --git a/chrome/browser/web_applications/commands/install_isolated_app_command.cc b/chrome/browser/web_applications/commands/install_isolated_app_command.cc index 75d3fa80..ca2171c 100644 --- a/chrome/browser/web_applications/commands/install_isolated_app_command.cc +++ b/chrome/browser/web_applications/commands/install_isolated_app_command.cc
@@ -16,7 +16,7 @@ #include "base/containers/flat_set.h" #include "base/sequence_checker.h" #include "base/strings/strcat.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "base/types/expected.h" #include "base/values.h" @@ -96,7 +96,7 @@ auto url = GURL{url_}; if (!url.is_valid()) { - ReportFailure(); + ReportFailure(base::StrCat({"Invalid application URL: ", url_})); return; } @@ -142,7 +142,7 @@ weak_factory_.GetWeakPtr())); } -absl::optional<WebAppInstallInfo> +base::expected<WebAppInstallInfo, std::string> InstallIsolatedAppCommand::CreateInstallInfoFromManifest( const blink::mojom::Manifest& manifest, const GURL& manifest_url) { @@ -150,24 +150,41 @@ UpdateWebAppInfoFromManifest(manifest, manifest_url, &info); if (!manifest.id.has_value()) { - return absl::nullopt; + return base::unexpected{ + base::StrCat({"Manifest `id` is not present. manifest_url: ", + manifest_url.possibly_invalid_spec()})}; } // In other installations the best-effort encoding is fine, but for isolated // apps we have the opportunity to report this error. absl::optional<std::string> encoded_id = UTF16ToUTF8(*manifest.id); if (!encoded_id.has_value()) { - return absl::nullopt; + return base::unexpected{ + "Failed to convert manifest `id` from UTF16 to UTF8."}; } if (!encoded_id->empty()) { - return absl::nullopt; + // Recommend to use "/" for manifest id and not empty manifest id because + // the manifest parser does additional work on resolving manifest id taking + // `start_url` into account. (See https://w3c.github.io/manifest/#id-member + // on how the manifest parser resolves the `id` field). + // + // It is required for isolated apps to have app id based on origin of the + // application and do not include other information in order to be able to + // identify isolated apps by origin because there is always only 1 app per + // origin. + return base::unexpected{base::StrCat( + {R"(Manifest `id` must be "/". Resolved manifest id: )", *encoded_id})}; } info.manifest_id = ""; - if (manifest.scope != GURL{url_}.Resolve("/")) { - return absl::nullopt; + GURL origin = GURL{url_}.Resolve("/"); + if (manifest.scope != origin) { + return base::unexpected{ + base::StrCat({"Scope should resolve to the origin. scope: ", + manifest.scope.possibly_invalid_spec(), + ", origin: ", origin.possibly_invalid_spec()})}; } return info; @@ -205,12 +222,12 @@ DCHECK(!manifest_url.is_empty()) << "must not be empty if manifest is not empty."; - if (absl::optional<WebAppInstallInfo> install_info = + if (base::expected<WebAppInstallInfo, std::string> install_info = CreateInstallInfoFromManifest(*opt_manifest, manifest_url); install_info.has_value()) { DownloadIcons(*std::move(install_info)); } else { - ReportFailure(); + ReportFailure(install_info.error()); } } @@ -245,15 +262,17 @@ } void InstallIsolatedAppCommand::OnSyncSourceRemoved() { - ReportFailure(); + // TODO(kuragin): Test cancellation on sync source removed event. + ReportFailure("Sync source removed."); } void InstallIsolatedAppCommand::OnShutdown() { - ReportFailure(); + // TODO(kuragin): Test cancellation of pending installation during system + // shutdown. + ReportFailure("System is shutting down."); } -void InstallIsolatedAppCommand::ReportFailure( - absl::optional<std::string> message) { +void InstallIsolatedAppCommand::ReportFailure(base::StringPiece message) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(!callback_.is_null()); @@ -261,8 +280,7 @@ CommandResult::kFailure, base::BindOnce(std::move(callback_), base::unexpected{InstallIsolatedAppCommandError{ - .message = message.value_or("<no error message>"), - }})); + .message = std::string{message}}})); } void InstallIsolatedAppCommand::ReportSuccess() {
diff --git a/chrome/browser/web_applications/commands/install_isolated_app_command.h b/chrome/browser/web_applications/commands/install_isolated_app_command.h index cd2e7c2..511afa9f 100644 --- a/chrome/browser/web_applications/commands/install_isolated_app_command.h +++ b/chrome/browser/web_applications/commands/install_isolated_app_command.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_WEB_APPLICATIONS_COMMANDS_INSTALL_ISOLATED_APP_COMMAND_H_ #include <memory> +#include <ostream> #include <string> #include "base/callback.h" @@ -19,7 +20,6 @@ #include "chrome/browser/web_applications/web_app_id.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "components/webapps/browser/install_result_code.h" -#include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/blink/public/mojom/manifest/manifest.mojom-forward.h" class GURL; @@ -33,14 +33,15 @@ enum class WebAppUrlLoaderResult; -enum class InstallIsolatedAppCommandResult { - kOk, - kUnknownError, -}; - struct InstallIsolatedAppCommandSuccess {}; struct InstallIsolatedAppCommandError { std::string message; + + friend std::ostream& operator<<(std::ostream& os, + const InstallIsolatedAppCommandError& error) { + return os << "InstallIsolatedAppCommandError { message = \"" + << error.message << "\" }."; + } }; class InstallIsolatedAppCommand : public WebAppCommand { @@ -75,7 +76,7 @@ std::unique_ptr<WebAppDataRetriever> data_retriever); private: - void ReportFailure(absl::optional<std::string> message = absl::nullopt); + void ReportFailure(base::StringPiece message); void ReportSuccess(); void DownloadIcons(WebAppInstallInfo install_info); @@ -89,7 +90,7 @@ const GURL& manifest_url, bool valid_manifest_for_web_app, bool is_installable); - absl::optional<WebAppInstallInfo> CreateInstallInfoFromManifest( + base::expected<WebAppInstallInfo, std::string> CreateInstallInfoFromManifest( const blink::mojom::Manifest& manifest, const GURL& manifest_url); void FinalizeInstall(const WebAppInstallInfo& info);
diff --git a/chrome/browser/web_applications/commands/install_isolated_app_command_unittest.cc b/chrome/browser/web_applications/commands/install_isolated_app_command_unittest.cc index b307006..9a7e05a 100644 --- a/chrome/browser/web_applications/commands/install_isolated_app_command_unittest.cc +++ b/chrome/browser/web_applications/commands/install_isolated_app_command_unittest.cc
@@ -15,7 +15,6 @@ #include "base/callback_helpers.h" #include "base/memory/raw_ptr.h" #include "base/strings/string_piece.h" -#include "base/strings/string_piece_forward.h" #include "base/test/bind.h" #include "base/test/gmock_callback_support.h" #include "base/test/metrics/histogram_tester.h" @@ -285,7 +284,7 @@ SetPrepareForLoadResultLoaded(); ExpectFailureForURL("http://test-url-example.com", - WebAppUrlLoader::Result::kFailedWebContentsDestroyed); + WebAppUrlLoaderResult::kFailedWebContentsDestroyed); EXPECT_THAT(ExecuteCommand("http://test-url-example.com"), IsInstallationError(HasSubstr( @@ -309,7 +308,7 @@ SetPrepareForLoadResultLoaded(); EXPECT_THAT(ExecuteCommand("some definetely invalid url"), - IsInstallationError()); + IsInstallationError(HasSubstr("Invalid application URL"))); } TEST_F(InstallIsolatedAppCommandTest, URLLoaderIgnoresQueryParameters) { @@ -340,6 +339,21 @@ } TEST_F(InstallIsolatedAppCommandTest, + InstallationFailsWhenFinalizerReturnInstallURLLoadTimeOut) { + SetPrepareForLoadResultLoaded(); + + ExpectLoadedForURL("http://test-url-example.com"); + + install_finalizer().SetNextFinalizeInstallResult( + GenerateAppIdFromUnhashed("http://testing-unused-app-id.com/"), + webapps::InstallResultCode::kInstallURLLoadTimeOut); + + EXPECT_THAT(ExecuteCommand("http://test-url-example.com"), + IsInstallationError(HasSubstr( + "Error during finalization: kInstallURLLoadTimeOut"))); +} + +TEST_F(InstallIsolatedAppCommandTest, InstallationSucceedesWhenFinalizerReturnSuccessNewInstall) { SetPrepareForLoadResultLoaded(); @@ -444,9 +458,13 @@ CreateDefaultManifest("http://manifest-test-url.com"); manifest->id = absl::nullopt; - EXPECT_THAT(ExecuteCommandWithManifest("http://manifest-test-url.com", - manifest.Clone()), - IsInstallationError()); + EXPECT_THAT( + ExecuteCommandWithManifest("http://manifest-test-url.com", + manifest.Clone()), + + IsInstallationError(HasSubstr( + "Manifest `id` is not present. manifest_url: " + + CreateDefaultManifestURL("http://manifest-test-url.com").spec()))); EXPECT_THAT(install_finalizer().web_app_info(), IsNull()); } @@ -460,7 +478,8 @@ EXPECT_THAT(ExecuteCommandWithManifest("http://manifest-test-url.com", manifest.Clone()), - IsInstallationError()); + IsInstallationError(HasSubstr( + "Failed to convert manifest `id` from UTF16 to UTF8"))); } TEST_F(InstallIsolatedAppCommandManifestTest, @@ -485,7 +504,7 @@ EXPECT_THAT(ExecuteCommandWithManifest("http://manifest-test-url.com", manifest.Clone()), - IsInstallationError()); + IsInstallationError(HasSubstr(R"(Manifest `id` must be "/")"))); EXPECT_THAT(install_finalizer().web_app_info(), IsNull()); } @@ -496,9 +515,10 @@ manifest->scope = GURL{"http://manifest-test-url.com"}.Resolve("/scope"); - EXPECT_THAT(ExecuteCommandWithManifest("http://manifest-test-url.com", - manifest.Clone()), - IsInstallationError()); + EXPECT_THAT( + ExecuteCommandWithManifest("http://manifest-test-url.com", + manifest.Clone()), + IsInstallationError(HasSubstr("Scope should resolve to the origin"))); EXPECT_THAT(install_finalizer().web_app_info(), IsNull()); }
diff --git a/chrome/browser/web_applications/isolated_web_apps/install_isolated_app_from_command_line.cc b/chrome/browser/web_applications/isolated_web_apps/install_isolated_app_from_command_line.cc index 5f63eae..db88289 100644 --- a/chrome/browser/web_applications/isolated_web_apps/install_isolated_app_from_command_line.cc +++ b/chrome/browser/web_applications/isolated_web_apps/install_isolated_app_from_command_line.cc
@@ -57,7 +57,8 @@ result) { if (!result.has_value()) { LOG(ERROR) << "Isolated app auto installation " - "is failed."; + "failed. Error: " + << result.error(); } }, std::move(url_loader));
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index 833262e8..ce40bc2 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1662033580-7746a417b68cef997d76de39bf36e892dc84562d.profdata +chrome-linux-main-1662054737-a2304e602c58f4dbfea78cbd32c47932b71309e6.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index dfcb017..14972e7 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1662033580-67ff02546f03cb80a2470dd71d9ba6f1023223cd.profdata +chrome-mac-arm-main-1662054737-e7c5ffe7ab5274e96a9ed29563dba90729571cd0.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index ebdd665..f8ef0ce 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1662033580-2dda6373fe0d30ef84c100dc96c378d138d186fd.profdata +chrome-mac-main-1662054737-3a7c0953e87fb6b04bbf815822887c78507b7fd3.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index d03f315..3405b81 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1662033580-4241a7adfcf4a033b1a0d2a03126d12dbdf2bdf2.profdata +chrome-win32-main-1662044321-d46a350ac727c4599f2d8be865b618622cce8e01.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 2b444ea..9286977d 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1662033580-db798e9ba328249f79ad08026575ecfeecbfd99a.profdata +chrome-win64-main-1662054737-0e309a4d1bb3ad78c455bcf60adf194a500d0c50.profdata
diff --git a/chrome/common/extensions/api/autofill_private.idl b/chrome/common/extensions/api/autofill_private.idl index cec695a82..c82173d 100644 --- a/chrome/common/extensions/api/autofill_private.idl +++ b/chrome/common/extensions/api/autofill_private.idl
@@ -179,6 +179,9 @@ // Credit card's network. DOMString? network; + // Credit card's image source. + DOMString? imageSrc; + AutofillMetadata? metadata; };
diff --git a/chrome/common/printing/BUILD.gn b/chrome/common/printing/BUILD.gn index f1ab6eb..f382c43 100644 --- a/chrome/common/printing/BUILD.gn +++ b/chrome/common/printing/BUILD.gn
@@ -35,6 +35,8 @@ sources = [ "printer_capabilities.cc", "printer_capabilities.h", + "printing_init.cc", + "printing_init.h", ] public_deps = [
diff --git a/chrome/common/printing/printing_init.cc b/chrome/common/printing/printing_init.cc new file mode 100644 index 0000000..a3f184d --- /dev/null +++ b/chrome/common/printing/printing_init.cc
@@ -0,0 +1,23 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/common/printing/printing_init.h" + +#include "build/build_config.h" +#include "printing/buildflags/buildflags.h" + +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) && BUILDFLAG(IS_WIN) +#include "chrome/common/printing/printer_capabilities.h" +#include "printing/backend/win_helper.h" +#endif + +namespace printing { + +void InitializeProcessForPrinting() { +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) && BUILDFLAG(IS_WIN) + SetGetDisplayNameFunction(&GetUserFriendlyName); +#endif +} + +} // namespace printing
diff --git a/chrome/common/printing/printing_init.h b/chrome/common/printing/printing_init.h new file mode 100644 index 0000000..785340d --- /dev/null +++ b/chrome/common/printing/printing_init.h
@@ -0,0 +1,15 @@ +// Copyright 2022 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. + +#ifndef CHROME_COMMON_PRINTING_PRINTING_INIT_H_ +#define CHROME_COMMON_PRINTING_PRINTING_INIT_H_ + +namespace printing { + +// Do process-level initialization of printing subsystem. +void InitializeProcessForPrinting(); + +} // namespace printing + +#endif // CHROME_COMMON_PRINTING_PRINTING_INIT_H_
diff --git a/chrome/services/printing/print_backend_service_impl.cc b/chrome/services/printing/print_backend_service_impl.cc index 596ff08..c84073b9 100644 --- a/chrome/services/printing/print_backend_service_impl.cc +++ b/chrome/services/printing/print_backend_service_impl.cc
@@ -19,6 +19,7 @@ #include "base/threading/sequence_bound.h" #include "base/values.h" #include "build/build_config.h" +#include "chrome/common/printing/printing_init.h" #include "chrome/services/printing/public/mojom/print_backend_service.mojom.h" #include "components/crash/core/common/crash_keys.h" #include "mojo/public/cpp/bindings/pending_receiver.h" @@ -394,6 +395,7 @@ PrintBackendServiceImpl::~PrintBackendServiceImpl() = default; void PrintBackendServiceImpl::Init(const std::string& locale) { + InitializeProcessForPrinting(); print_backend_ = PrintBackend::CreateInstance(locale); context_delegate_.SetAppLocale(locale); }
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 09a3991..6e7d010b 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -4125,7 +4125,6 @@ "//ash/components/arc:prefs", "//ash/components/arc/enterprise", "//ash/components/arc/session:arc_base_enums", - "//ash/components/geolocation", "//ash/components/hid_detection:hid_detection", "//ash/components/hid_detection:test_support", "//ash/components/login/auth", @@ -4224,6 +4223,7 @@ "//chromeos/ash/components/drivefs", "//chromeos/ash/components/drivefs:test_support", "//chromeos/ash/components/drivefs/mojom", + "//chromeos/ash/components/geolocation", "//chromeos/ash/components/network/portal_detector", "//chromeos/ash/services/assistant:lib", "//chromeos/ash/services/assistant/public/cpp", @@ -6802,6 +6802,7 @@ "../browser/ui/views/webid/fedcm_account_selection_view_desktop_unittest.cc", "../browser/ui/webui/access_code_cast/access_code_cast_handler_unittest.cc", "../browser/ui/webui/browser_command/browser_command_handler_unittest.cc", + "../browser/ui/webui/commerce/shopping_list_context_menu_controller_unittest.cc", "../browser/ui/webui/components/components_handler_unittest.cc", "../browser/ui/webui/constrained_web_dialog_ui_unittest.cc", "../browser/ui/webui/customize_themes/chrome_customize_themes_handler_unittest.cc", @@ -7037,6 +7038,7 @@ "//components/chrome_cleaner/test:test_name_helper", "//components/commerce/core:cart_db_content_proto", "//components/commerce/core:coupon_db_content_proto", + "//components/commerce/core:shopping_service_test_support", "//components/endpoint_fetcher:endpoint_fetcher", "//components/enterprise", "//components/enterprise:test_support", @@ -7045,6 +7047,7 @@ "//components/media_message_center:test_support", "//components/media_router/common:test_support", "//components/permissions:test_support", + "//components/power_bookmarks/core", "//components/safe_browsing/core/browser:safe_browsing_metrics_collector", "//components/safe_browsing/core/common:safe_browsing_policy_handler", "//components/safety_check:test_support", @@ -8265,6 +8268,8 @@ "../browser/safe_browsing/download_protection/file_analyzer_unittest.cc", "../browser/safe_browsing/download_protection/path_sanitizer_unittest.cc", "../browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc", + "../browser/safe_browsing/extension_telemetry/cookies_get_all_signal_processor_unittest.cc", + "../browser/safe_browsing/extension_telemetry/cookies_get_all_signal_unittest.cc", "../browser/safe_browsing/extension_telemetry/extension_telemetry_persister_unittest.cc", "../browser/safe_browsing/extension_telemetry/extension_telemetry_service_unittest.cc", "../browser/safe_browsing/extension_telemetry/extension_telemetry_uploader_unittest.cc", @@ -8642,6 +8647,7 @@ "../browser/ui/views/bubble/bubble_contents_wrapper_unittest.cc", "../browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc", "../browser/ui/views/bubble/webui_bubble_manager_unittest.cc", + "../browser/ui/views/commerce/price_tracking_view_unittest.cc", "../browser/ui/views/confirm_bubble_views_unittest.cc", "../browser/ui/views/content_setting_bubble_contents_unittest.cc", "../browser/ui/views/desktop_capture/desktop_media_picker_views_unittest.cc", @@ -8696,6 +8702,7 @@ "../browser/ui/views/payments/payment_request_item_list_unittest.cc", "../browser/ui/views/payments/validating_textfield_unittest.cc", "../browser/ui/views/payments/view_stack_unittest.cc", + "../browser/ui/views/performance_controls/high_efficiency_chip_view_unittest.cc", "../browser/ui/views/permissions/permission_chip_unittest.cc", "../browser/ui/views/permissions/permission_prompt_bubble_view_unittest.cc", "../browser/ui/views/qrcode_generator/qrcode_generator_bubble_unittest.cc",
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 6ae8604..4673647 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json
@@ -18868,14 +18868,14 @@ "FirstPartySetsOverrides": { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associate1.test"] } ], "additions": [ { - "owner": "https://owner1.test", - "members": ["https://member2.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associate2.test"] } ] } @@ -18893,14 +18893,14 @@ "FirstPartySetsOverrides": { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associate1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associate2.test"] } ] } @@ -18910,14 +18910,14 @@ "value": { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associate1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associate2.test"] } ] },
diff --git a/chrome/test/data/webui/cr_components/help_bubble_mixin_test.ts b/chrome/test/data/webui/cr_components/help_bubble_mixin_test.ts index 9bde7410a..4d27d000 100644 --- a/chrome/test/data/webui/cr_components/help_bubble_mixin_test.ts +++ b/chrome/test/data/webui/cr_components/help_bubble_mixin_test.ts
@@ -6,7 +6,7 @@ import 'chrome://resources/cr_components/help_bubble/help_bubble.js'; import {HelpBubbleElement} from 'chrome://resources/cr_components/help_bubble/help_bubble.js'; -import {HelpBubbleArrowPosition, HelpBubbleClientCallbackRouter, HelpBubbleClientRemote, HelpBubbleClosedReason, HelpBubbleHandlerInterface, HelpBubbleParams} from 'chrome://resources/cr_components/help_bubble/help_bubble.mojom-webui.js'; +import {HelpBubbleArrowPosition, HelpBubbleClientCallbackRouter, HelpBubbleClientRemote, HelpBubbleHandlerInterface, HelpBubbleParams} from 'chrome://resources/cr_components/help_bubble/help_bubble.mojom-webui.js'; import {HelpBubbleMixin, HelpBubbleMixinInterface} from 'chrome://resources/cr_components/help_bubble/help_bubble_mixin.js'; import {HelpBubbleProxy, HelpBubbleProxyImpl} from 'chrome://resources/cr_components/help_bubble/help_bubble_proxy.js'; import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; @@ -93,8 +93,8 @@ this.methodCalled('helpBubbleButtonPressed', nativeIdentifier, button); } - helpBubbleClosed(nativeIdentifier: string, reason: HelpBubbleClosedReason) { - this.methodCalled('helpBubbleClosed', nativeIdentifier, reason); + helpBubbleClosed(nativeIdentifier: string, byUser: boolean) { + this.methodCalled('helpBubbleClosed', nativeIdentifier, byUser); } } @@ -141,15 +141,6 @@ return waitAfterNextRender(container); } - /** - * Create a promise that resolves after a given amount of time - */ - async function sleep(milliseconds: number) { - return new Promise((res) => { - setTimeout(res, milliseconds); - }); - } - setup(() => { testProxy = new TestHelpBubbleProxy(); HelpBubbleProxyImpl.setInstance(testProxy); @@ -343,7 +334,7 @@ assertEquals( 1, testProxy.getHandler().getCallCount('helpBubbleClosed')); assertDeepEquals( - [[PARAGRAPH_NATIVE_ID, HelpBubbleClosedReason.kPageChanged]], + [[PARAGRAPH_NATIVE_ID, false]], testProxy.getHandler().getArgs('helpBubbleClosed')); assertFalse(container.isHelpBubbleShowing()); }); @@ -361,19 +352,6 @@ assertTrue(container.isHelpBubbleShowing()); }); - test('help bubble mixin does not timeout by default', async () => { - container.showHelpBubble('p1', defaultParams); - - // This is not the current bubble anchor, so should not send an event. - container.$.title.style.display = 'none'; - await waitForVisibilityEvents(); - assertEquals(0, testProxy.getHandler().getCallCount('helpBubbleClosed')); - assertTrue(container.isHelpBubbleShowing()); - await sleep(100); // 100ms - assertEquals(0, testProxy.getHandler().getCallCount('helpBubbleClosed')); - assertTrue(container.isHelpBubbleShowing()); - }); - test('help bubble mixin reshow bubble', async () => { testProxy.getCallbackRouterRemote().showHelpBubble(defaultParams); await waitAfterNextRender(container); @@ -485,7 +463,7 @@ await waitForVisibilityEvents(); assertEquals(1, testProxy.getHandler().getCallCount('helpBubbleClosed')); assertDeepEquals( - [[PARAGRAPH_NATIVE_ID, HelpBubbleClosedReason.kDismissedByUser]], + [[PARAGRAPH_NATIVE_ID, true]], testProxy.getHandler().getArgs('helpBubbleClosed')); assertFalse(container.isHelpBubbleShowing()); }); @@ -525,31 +503,4 @@ testProxy.getHandler().getArgs('helpBubbleButtonPressed')); assertFalse(container.isHelpBubbleShowing()); }); - - const timeoutParams: HelpBubbleParams = new HelpBubbleParams(); - timeoutParams.nativeIdentifier = PARAGRAPH_NATIVE_ID; - timeoutParams.closeButtonAltText = CLOSE_BUTTON_ALT_TEXT; - timeoutParams.position = HelpBubbleArrowPosition.TOP_CENTER; - timeoutParams.bodyText = 'This is another help bubble.'; - timeoutParams.titleText = 'This is a title'; - timeoutParams.timeout = { - microseconds: BigInt(50 * 1000), // 50ms - }; - timeoutParams.buttons = []; - - test('help bubble mixin sends timeout event', async () => { - container.showHelpBubble('p1', timeoutParams); - await waitAfterNextRender(container); - assertEquals( - 0, testProxy.getHandler().getCallCount('helpBubbleClosed'), - 'helpBubbleClosed was not called'); - await sleep(100); // 100ms - assertEquals( - 1, testProxy.getHandler().getCallCount('helpBubbleClosed'), - 'helpBubbleClosed was called'); - assertDeepEquals( - [[PARAGRAPH_NATIVE_ID, HelpBubbleClosedReason.kTimedOut]], - testProxy.getHandler().getArgs('helpBubbleClosed')); - assertFalse(container.isHelpBubbleShowing()); - }); });
diff --git a/chrome/test/data/webui/cr_components/help_bubble_test.ts b/chrome/test/data/webui/cr_components/help_bubble_test.ts index b480532d..70e3138 100644 --- a/chrome/test/data/webui/cr_components/help_bubble_test.ts +++ b/chrome/test/data/webui/cr_components/help_bubble_test.ts
@@ -6,7 +6,7 @@ import 'chrome://resources/cr_components/help_bubble/help_bubble.js'; import {CrButtonElement} from '//resources/cr_elements/cr_button/cr_button.js'; -import {HELP_BUBBLE_DISMISSED_EVENT, HELP_BUBBLE_TIMED_OUT_EVENT, HelpBubbleDismissedEvent, HelpBubbleElement, HelpBubbleTimedOutEvent} from 'chrome://resources/cr_components/help_bubble/help_bubble.js'; +import {HELP_BUBBLE_DISMISSED_EVENT, HelpBubbleDismissedEvent, HelpBubbleElement} from 'chrome://resources/cr_components/help_bubble/help_bubble.js'; import {HelpBubbleArrowPosition, HelpBubbleButtonParams} from 'chrome://resources/cr_components/help_bubble/help_bubble.mojom-webui.js'; import {assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {isVisible, waitAfterNextRender} from 'chrome://webui-test/test_util.js'; @@ -52,15 +52,6 @@ return mainEl; } - /** - * Create a promise that resolves after a given amount of time - */ - async function sleep(milliseconds: number) { - return new Promise((resolve) => { - setTimeout(resolve, milliseconds); - }); - } - setup(() => { document.body.innerHTML = ` <div id='container'> @@ -203,43 +194,6 @@ assertEquals(1, clicked, 'close button should be clicked once'); }); - test('help bubble timeout generates event', async () => { - let timedOut: number = 0; - const callback = (e: HelpBubbleTimedOutEvent) => { - assertEquals( - 'title', e.detail.anchorId, 'timeout event anchorId should match'); - ++timedOut; - }; - helpBubble.addEventListener(HELP_BUBBLE_TIMED_OUT_EVENT, callback); - helpBubble.anchorId = 'title'; - helpBubble.position = HelpBubbleArrowPosition.TOP_CENTER; - helpBubble.bodyText = HELP_BUBBLE_BODY; - helpBubble.timeoutMs = 250; // 250ms - helpBubble.show(); - assertEquals(0, timedOut, 'timeout should not be triggered'); - await waitAfterNextRender(helpBubble); - await sleep(500); // 500ms - assertEquals(1, timedOut, 'timeout should only emit event once'); - }); - - test('help bubble without timeout does not generate event', async () => { - let timedOut: number = 0; - const callback = (e: HelpBubbleTimedOutEvent) => { - assertEquals( - 'title', e.detail.anchorId, 'timeout event anchorId should match'); - ++timedOut; - }; - helpBubble.addEventListener(HELP_BUBBLE_TIMED_OUT_EVENT, callback); - helpBubble.anchorId = 'title'; - helpBubble.position = HelpBubbleArrowPosition.TOP_CENTER; - helpBubble.bodyText = HELP_BUBBLE_BODY; - helpBubble.show(); - assertEquals(0, timedOut, 'timeout should not be triggered'); - await waitAfterNextRender(helpBubble); - await sleep(500); // 500ms - assertEquals(0, timedOut, 'timeout is never triggered'); - }); - test('help bubble adds one button', async () => { helpBubble.anchorId = 'title'; helpBubble.position = HelpBubbleArrowPosition.TOP_CENTER;
diff --git a/chrome/test/data/webui/settings/chromeos/keyboard_and_text_input_page_tests.js b/chrome/test/data/webui/settings/chromeos/keyboard_and_text_input_page_tests.js new file mode 100644 index 0000000..78b1a57 --- /dev/null +++ b/chrome/test/data/webui/settings/chromeos/keyboard_and_text_input_page_tests.js
@@ -0,0 +1,208 @@ +// Copyright 2022 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. + +import 'chrome://os-settings/chromeos/lazy_load.js'; + +import {DevicePageBrowserProxy, DevicePageBrowserProxyImpl, Router, routes} from 'chrome://os-settings/chromeos/os_settings.js'; +import {webUIListenerCallback} from 'chrome://resources/js/cr.m.js'; +import {getDeepActiveElement} from 'chrome://resources/js/util.m.js'; +import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {eventToPromise, isVisible, waitAfterNextRender, waitBeforeNextRender} from 'chrome://test/test_util.js'; + +import {assertEquals, assertFalse, assertTrue} from '../../chai_assert.js'; + +suite('KeyboardAndTextInputPageTests', function() { + let page = null; + + function initPage(opt_prefs) { + page = document.createElement('settings-keyboard-and-text-input-page'); + page.prefs = opt_prefs || getDefaultPrefs(); + document.body.appendChild(page); + } + + function getDefaultPrefs() { + return { + 'settings': { + 'a11y': { + 'dictation': { + key: 'prefs.settings.a11y.dictation', + type: chrome.settingsPrivate.PrefType.BOOLEAN, + value: true, + }, + 'dictation_locale': { + key: 'prefs.settings.a11y.dictation_locale', + type: chrome.settingsPrivate.PrefType.STRING, + value: 'en-US', + }, + }, + }, + }; + } + + setup(function() { + PolymerTest.clearBody(); + Router.getInstance().navigateTo(routes.A11Y_KEYBOARD_AND_TEXT_INPUT); + }); + + teardown(function() { + if (page) { + page.remove(); + } + Router.getInstance().resetRouteForTesting(); + }); + + test('Dictation labels', async () => { + // Ensure that the Dictation locale menu is shown by setting the dictation + // pref to true (done in default prefs) and populating dictation locale + // options with mock data. + initPage(); + const locales = [{ + name: 'English (United States)', + worksOffline: true, + installed: true, + recommended: true, + value: 'en-US', + }]; + webUIListenerCallback('dictation-locales-set', locales); + flush(); + + // Dictation toggle. + const dictationSetting = page.shadowRoot.querySelector('#enableDictation'); + assertTrue(!!dictationSetting); + assertTrue(dictationSetting.checked); + assertEquals('Enable dictation (speak to type)', dictationSetting.label); + assertEquals( + 'Type with your voice. Use Search + D, then start speaking.', + dictationSetting.subLabel); + + // Dictation locale menu. + const dictationLocaleMenuLabel = + page.shadowRoot.querySelector('#dictationLocaleMenuLabel'); + const dictationLocaleMenuSubtitle = + page.shadowRoot.querySelector('#dictationLocaleMenuSubtitle'); + assertTrue(!!dictationLocaleMenuLabel); + assertTrue(!!dictationLocaleMenuSubtitle); + assertEquals('Language', dictationLocaleMenuLabel.innerText); + assertEquals( + 'English (United States) is processed locally and works offline', + dictationLocaleMenuSubtitle.innerText); + + // Fake a request to change the dictation locale menu subtitle. + webUIListenerCallback('dictation-locale-menu-subtitle-changed', 'Testing'); + flush(); + + // Only the dictation locale subtitle should have changed. + assertEquals('Enable dictation (speak to type)', dictationSetting.label); + assertEquals( + 'Type with your voice. Use Search + D, then start speaking.', + dictationSetting.subLabel); + assertEquals('Language', dictationLocaleMenuLabel.innerText); + assertEquals('Testing', dictationLocaleMenuSubtitle.innerText); + }); + + test('Test computeDictationLocaleSubtitle_()', async () => { + initPage(); + const locales = [ + { + name: 'English (United States)', + worksOffline: true, + installed: true, + recommended: true, + value: 'en-US', + }, + { + name: 'Spanish', + worksOffline: true, + installed: false, + recommended: false, + value: 'es', + }, + { + name: 'German', + // Note: this data should never occur in practice. If a locale isn't + // supported offline, then it should never be installed. Test this case + // to verify our code still works given unexpected input. + worksOffline: false, + installed: true, + recommended: false, + value: 'de', + }, + { + name: 'French (France)', + worksOffline: false, + installed: false, + recommended: false, + value: 'fr-FR', + }, + ]; + webUIListenerCallback('dictation-locales-set', locales); + page.dictationLocaleSubtitleOverride_ = 'Testing'; + flush(); + assertEquals( + 'English (United States) is processed locally and works offline', + page.computeDictationLocaleSubtitle_()); + + // Changing the Dictation locale pref should change the subtitle + // computation. + page.prefs.settings.a11y.dictation_locale.value = 'es'; + assertEquals( + 'Couldn’t download Spanish speech files. Download will be attempted ' + + 'later. Speech is sent to Google for processing until download ' + + 'is completed.', + page.computeDictationLocaleSubtitle_()); + + page.prefs.settings.a11y.dictation_locale.value = 'de'; + assertEquals( + 'German speech is sent to Google for processing', + page.computeDictationLocaleSubtitle_()); + + page.prefs.settings.a11y.dictation_locale.value = 'fr-FR'; + assertEquals( + 'French (France) speech is sent to Google for processing', + page.computeDictationLocaleSubtitle_()); + + // Only use the subtitle override once. + page.useDictationLocaleSubtitleOverride_ = true; + assertEquals('Testing', page.computeDictationLocaleSubtitle_()); + assertFalse(page.useDictationLocaleSubtitleOverride_); + assertEquals( + 'French (France) speech is sent to Google for processing', + page.computeDictationLocaleSubtitle_()); + }); + + const selectorRouteList = [ + {selector: '#keyboardSubpageButton', route: routes.KEYBOARD}, + ]; + + selectorRouteList.forEach(({selector, route}) => { + test( + `should focus ${selector} button when returning from ${ + route.path} subpage`, + async () => { + initPage(); + flush(); + const router = Router.getInstance(); + + const subpageButton = page.shadowRoot.querySelector(selector); + assertTrue(!!subpageButton); + + subpageButton.click(); + assertEquals(route, router.getCurrentRoute()); + assertNotEquals( + subpageButton, page.shadowRoot.activeElement, + `${selector} should not be focused`); + + const popStateEventPromise = eventToPromise('popstate', window); + router.navigateToPreviousRoute(); + await popStateEventPromise; + await waitBeforeNextRender(page); + + assertEquals( + routes.A11Y_KEYBOARD_AND_TEXT_INPUT, router.getCurrentRoute()); + assertEquals( + subpageButton, page.shadowRoot.activeElement, + `${selector} should be focused`); + }); + }); +});
diff --git a/chrome/test/data/webui/settings/chromeos/os_bluetooth_devices_subpage_tests.js b/chrome/test/data/webui/settings/chromeos/os_bluetooth_devices_subpage_tests.js index f05815a..2a294ba 100644 --- a/chrome/test/data/webui/settings/chromeos/os_bluetooth_devices_subpage_tests.js +++ b/chrome/test/data/webui/settings/chromeos/os_bluetooth_devices_subpage_tests.js
@@ -384,4 +384,26 @@ assertFalse(isVisible(bluetoothDevicesSubpage.shadowRoot.querySelector( '#savedDevicesRowLink'))); }); + + test('Single separator line when Fast Pair UI disabled', async function() { + bluetoothConfig.setSystemState(BluetoothSystemState.kEnabled); + loadTimeData.overrideValues({'enableFastPairFlag': false}); + await init(); + + const sepLines = bluetoothDevicesSubpage.shadowRoot.querySelectorAll( + '.device-lists-separator'); + assertEquals(sepLines.length, 1); + }); + + test( + 'Greater than 1 separator line when Fast Pair UI enabled', + async function() { + bluetoothConfig.setSystemState(BluetoothSystemState.kEnabled); + loadTimeData.overrideValues({'enableFastPairFlag': true}); + await init(); + + const sepLines = bluetoothDevicesSubpage.shadowRoot.querySelectorAll( + '.device-lists-separator'); + assertGT(sepLines.length, 1); + }); });
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_v3_browsertest.js b/chrome/test/data/webui/settings/chromeos/os_settings_v3_browsertest.js index a491be24..5dcec54 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_v3_browsertest.js +++ b/chrome/test/data/webui/settings/chromeos/os_settings_v3_browsertest.js
@@ -352,6 +352,11 @@ ['InternetPage', 'internet_page_tests.js'], ['KerberosAccounts', 'kerberos_accounts_test.js'], ['KerberosPage', 'kerberos_page_test.js'], + [ + 'KeyboardAndTextInputPage', + 'keyboard_and_text_input_page_tests.js', + {enabled: ['features::kAccessibilityOSSettingsVisibility']}, + ], ['KeyboardShortcutBanner', 'keyboard_shortcut_banner_test.js'], ['LockScreenPage', 'lock_screen_tests.js'], ['ManageAccessibilityPage', 'manage_accessibility_page_tests.js'],
diff --git a/chrome/test/data/webui/settings/passwords_and_autofill_fake_data.ts b/chrome/test/data/webui/settings/passwords_and_autofill_fake_data.ts index 474093b..824b5bc 100644 --- a/chrome/test/data/webui/settings/passwords_and_autofill_fake_data.ts +++ b/chrome/test/data/webui/settings/passwords_and_autofill_fake_data.ts
@@ -159,6 +159,7 @@ expirationMonth: Math.ceil(Math.random() * 11).toString(), expirationYear: (2016 + Math.floor(Math.random() * 5)).toString(), network: `${card}_network`, + imageSrc: 'chrome://theme/IDR_AUTOFILL_CC_GENERIC', metadata: { isLocal: true, summaryLabel: card + ' ' +
diff --git a/chrome/test/data/webui/settings/payments_section_test.ts b/chrome/test/data/webui/settings/payments_section_test.ts index b73ddce5..0666ee24 100644 --- a/chrome/test/data/webui/settings/payments_section_test.ts +++ b/chrome/test/data/webui/settings/payments_section_test.ts
@@ -8,7 +8,7 @@ import {PaymentsManagerImpl, SettingsCreditCardEditDialogElement, SettingsPaymentsSectionElement, SettingsVirtualCardUnenrollDialogElement} from 'chrome://settings/lazy_load.js'; import {MetricsBrowserProxyImpl, PrivacyElementInteractions, SettingsToggleButtonElement} from 'chrome://settings/settings.js'; import {assertEquals, assertFalse, assertNotEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; -import {eventToPromise, whenAttributeIs} from 'chrome://webui-test/test_util.js'; +import {eventToPromise, whenAttributeIs, isVisible} from 'chrome://webui-test/test_util.js'; import {createCreditCardEntry, createEmptyCreditCardEntry, PaymentsManagerExpectations,TestPaymentsManager} from './passwords_and_autofill_fake_data.js'; import {TestMetricsBrowserProxy} from './test_metrics_browser_proxy.js'; @@ -417,6 +417,21 @@ .querySelector<HTMLElement>('#paymentsIndicator')!.hidden); }); + test('verifyCardImage', function() { + loadTimeData.overrideValues({ + virtualCardMetadataEnabled: true, + }); + const creditCard = createCreditCardEntry(); + const section = + createPaymentsSection([creditCard], /*upiIds=*/[], /*prefValues=*/ {}); + + const creditCardList = section.$.paymentsList; + assertTrue(!!creditCardList); + assertEquals(1, getLocalAndServerCreditCardListItems().length); + assertTrue(isVisible(getCardRowShadowRoot(section.$.paymentsList) + .querySelector('#cardImage'))); + }); + test('verifyAddVsEditCreditCardTitle', function() { const newCreditCard = createEmptyCreditCardEntry(); const newCreditCardDialog = createCreditCardDialog(newCreditCard);
diff --git a/chrome/updater/run_all_unittests.cc b/chrome/updater/run_all_unittests.cc index 61976308..938bf10 100644 --- a/chrome/updater/run_all_unittests.cc +++ b/chrome/updater/run_all_unittests.cc
@@ -8,6 +8,7 @@ #include "base/callback_helpers.h" #include "base/check.h" #include "base/command_line.h" +#include "base/logging.h" #include "base/process/process.h" #include "base/test/launcher/unit_test_launcher.h" #include "base/test/test_suite.h" @@ -80,20 +81,22 @@ subkey_(is_system ? L"SYSTEM\\CurrentControlSet\\Control\\Session " L"Manager\\Environment" : L"Environment") { + base::FilePath this_executable_path; + base::PathService::Get(base::FILE_EXE, &this_executable_path); + const std::wstring symbol_path = this_executable_path.DirName().value(); + + // For an unknown reason, symbolized stacks for code running as user + // requires setting up the environment variable for this unit test process. + if (::GetEnvironmentVariable(kNtSymbolPathEnVar, nullptr, 0) == 0) { + ::SetEnvironmentVariable(kNtSymbolPathEnVar, symbol_path.c_str()); + } + base::win::RegKey reg_key(rootkey_, subkey_.c_str(), KEY_READ | KEY_WRITE); if (reg_key.Valid() && !reg_key.HasValue(kNtSymbolPathEnVar)) { - base::FilePath this_executable_path; - base::PathService::Get(base::FILE_EXE, &this_executable_path); - const std::wstring symbol_path = this_executable_path.DirName().value(); is_owned = reg_key.WriteValue(kNtSymbolPathEnVar, symbol_path.c_str()) == ERROR_SUCCESS; if (!is_owned) return; - - // For an unknown reason, symbolized stacks for code running as user - // requires setting up the environment variable for this unit test process - // as well. - ::SetEnvironmentVariable(kNtSymbolPathEnVar, symbol_path.c_str()); BroadcastEnvironmentChange(); std::wcerr << "Symbol path for " << (is_system_ ? "system" : "user") << " set to: " << symbol_path << std::endl; @@ -103,7 +106,6 @@ ~ScopedSymbolPath() { if (!is_owned) return; - ::SetEnvironmentVariable(kNtSymbolPathEnVar, nullptr); base::win::RegKey reg_key(rootkey_, subkey_.c_str(), KEY_WRITE); if (reg_key.Valid()) { reg_key.DeleteValue(kNtSymbolPathEnVar); @@ -180,6 +182,10 @@ chrome::RegisterPathProvider(); return base::LaunchUnitTestsWithOptions( argc, argv, 1, 10, true, base::BindRepeating([]() { + logging::SetLogItems(true, // enable_process_id + true, // enable_thread_id + true, // enable_timestamp + false); // enable_tickcount updater::test::CreateIntegrationTestCommands()->PrintLog(); }), base::BindOnce(&base::TestSuite::Run, base::Unretained(&test_suite)));
diff --git a/chrome/updater/test/integration_tests_impl.cc b/chrome/updater/test/integration_tests_impl.cc index 1806204..ea3577c 100644 --- a/chrome/updater/test/integration_tests_impl.cc +++ b/chrome/updater/test/integration_tests_impl.cc
@@ -30,12 +30,13 @@ #include "base/strings/strcat.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" -#include "base/synchronization/waitable_event.h" +#include "base/strings/utf_string_conversions.h" #include "base/task/single_thread_task_runner_thread_mode.h" #include "base/task/task_traits.h" #include "base/task/thread_pool.h" #include "base/test/bind.h" #include "base/test/test_timeouts.h" +#include "base/threading/platform_thread.h" #include "base/threading/sequenced_task_runner_handle.h" #include "base/time/time.h" #include "base/values.h" @@ -435,14 +436,12 @@ bool WaitFor(base::RepeatingCallback<bool()> predicate) { base::TimeTicks deadline = - base::TimeTicks::Now() + TestTimeouts::action_max_timeout(); + base::TimeTicks::Now() + TestTimeouts::action_timeout(); while (base::TimeTicks::Now() < deadline) { if (predicate.Run()) return true; - - base::WaitableEvent().TimedWait(TestTimeouts::tiny_timeout()); + base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); } - return false; } @@ -675,10 +674,9 @@ []() { const base::FilePath test_executable = base::FilePath::FromASCII(kExecutableName); - return test_executable.RemoveExtension() - .AppendASCII(kExecutableSuffix) - .Append(test_executable.Extension()) - .value(); + return base::StrCat({test_executable.RemoveExtension().value(), + base::ASCIIToWide(kExecutableSuffix), + test_executable.Extension()}); }(), }; #else
diff --git a/chrome/updater/win/setup/setup.cc b/chrome/updater/win/setup/setup.cc index bb32f7c..9a82bab 100644 --- a/chrome/updater/win/setup/setup.cc +++ b/chrome/updater/win/setup/setup.cc
@@ -25,6 +25,7 @@ #include "base/win/win_util.h" #include "chrome/installer/util/self_cleaning_temp_dir.h" #include "chrome/installer/util/work_item_list.h" +#include "chrome/updater/app/server/win/com_classes.h" #include "chrome/updater/app/server/win/updater_idl.h" #include "chrome/updater/app/server/win/updater_internal_idl.h" #include "chrome/updater/app/server/win/updater_legacy_idl.h" @@ -167,7 +168,7 @@ VLOG(1) << "Setup succeeded."; CheckComInterfaceTypeLib(scope, true); - MarshalUpdaterInternal(); + MarshalInterface<IUpdaterInternal, UpdaterInternalImpl>(); return 0; }
diff --git a/chrome/updater/win/setup/setup_util.cc b/chrome/updater/win/setup/setup_util.cc index a456759..7db8f840 100644 --- a/chrome/updater/win/setup/setup_util.cc +++ b/chrome/updater/win/setup/setup_util.cc
@@ -442,72 +442,4 @@ } } -void MarshalUpdaterInternal() { - constexpr REFIID iid = __uuidof(IUpdaterInternal); - - // Create proxy/stubs for the IUpdaterInternal interface. - // Look up the ProxyStubClsid32. - CLSID psclsid = {}; - HRESULT hr = ::CoGetPSClsid(iid, &psclsid); - - CHECK(SUCCEEDED(hr)) << std::hex << hr; - CHECK_EQ(base::ToUpperASCII(base::win::WStringFromGUID(psclsid)), - L"{00020424-0000-0000-C000-000000000046}"); - - // Get the proxy/stub factory buffer. - Microsoft::WRL::ComPtr<IPSFactoryBuffer> psfb; - hr = ::CoGetClassObject(psclsid, CLSCTX_INPROC, 0, IID_PPV_ARGS(&psfb)); - - CHECK(SUCCEEDED(hr)) << std::hex << hr; - - // Create the interface proxy. - Microsoft::WRL::ComPtr<IRpcProxyBuffer> proxy_buffer; - Microsoft::WRL::ComPtr<IUpdaterInternal> object; - hr = psfb->CreateProxy(nullptr, iid, &proxy_buffer, - IID_PPV_ARGS_Helper(&object)); - LOG_IF(ERROR, FAILED(hr)) - << __func__ << ": CreateProxy failed: " << std::hex << hr; - - // Create the interface stub. - Microsoft::WRL::ComPtr<IRpcStubBuffer> stub_buffer; - hr = psfb->CreateStub(iid, nullptr, &stub_buffer); - LOG_IF(ERROR, FAILED(hr)) - << __func__ << ": CreateStub failed: " << std::hex << hr; - - // Marshal and unmarshal an IUpdaterInternal object. - Microsoft::WRL::ComPtr<IUpdaterInternal> updater_internal; - hr = - Microsoft::WRL::MakeAndInitialize<UpdaterInternalImpl>(&updater_internal); - CHECK(SUCCEEDED(hr)) << std::hex << hr; - - Microsoft::WRL::ComPtr<IStream> stream; - hr = ::CoMarshalInterThreadInterfaceInStream(iid, updater_internal.Get(), - &stream); - CHECK(SUCCEEDED(hr)) << std::hex << hr; - - base::ScopedAllowBaseSyncPrimitivesForTesting blocking_allowed_here; - base::WaitableEvent unmarshal_complete_event; - - base::ThreadPool::CreateCOMSTATaskRunner({base::MayBlock()}) - ->PostTask( - FROM_HERE, - base::BindOnce( - [](Microsoft::WRL::ComPtr<IStream> stream, - base::WaitableEvent& event) { - const base::ScopedClosureRunner signal_event(base::BindOnce( - [](base::WaitableEvent& event) { event.Signal(); }, - std::ref(event))); - - Microsoft::WRL::ComPtr<IUpdaterInternal> updater_internal; - HRESULT hr = ::CoUnmarshalInterface( - stream.Get(), IID_PPV_ARGS(&updater_internal)); - CHECK(SUCCEEDED(hr)) << std::hex << hr; - }, - stream, std::ref(unmarshal_complete_event))); - - if (!unmarshal_complete_event.TimedWait(base::Seconds(60))) { - NOTREACHED(); - } -} - } // namespace updater
diff --git a/chrome/updater/win/setup/setup_util.h b/chrome/updater/win/setup/setup_util.h index cb81be6..3863d6e 100644 --- a/chrome/updater/win/setup/setup_util.h +++ b/chrome/updater/win/setup/setup_util.h
@@ -6,10 +6,22 @@ #define CHROME_UPDATER_WIN_SETUP_SETUP_UTIL_H_ #include <guiddef.h> +#include <wrl/client.h> +#include <wrl/implements.h> +#include <ios> #include <string> #include <vector> +#include "base/callback_helpers.h" +#include "base/check.h" +#include "base/check_op.h" +#include "base/strings/string_util.h" +#include "base/strings/utf_string_conversions.h" +#include "base/synchronization/waitable_event.h" +#include "base/task/thread_pool.h" +#include "base/threading/thread_restrictions.h" +#include "base/win/win_util.h" #include "base/win/windows_types.h" class WorkItemList; @@ -116,12 +128,78 @@ // bug is resolved. void CheckComInterfaceTypeLib(UpdaterScope scope, bool is_internal); -// Marshals an instance of UpdaterInternal and unmarshals it into another -// thread. The test also checks for successful creation of proxy/stubs for the -// IUpdaterInternal interface. +// Marshals interface T implemented by an instance of V and unmarshals it into +// another thread. The test also checks for successful creation of proxy/stubs +// for the interface. // TODO(crbug.com/1341471) - revert the CL that introduced the check after the // bug is resolved. -void MarshalUpdaterInternal(); +template <typename T, typename V> +void MarshalInterface() { + constexpr REFIID iid = __uuidof(T); + + // Create proxy/stubs for the interface. + // Look up the ProxyStubClsid32. + CLSID psclsid = {}; + HRESULT hr = ::CoGetPSClsid(iid, &psclsid); + + CHECK(SUCCEEDED(hr)) << std::hex << hr; + CHECK_EQ(base::ToUpperASCII( + base::WideToASCII(base::win::WStringFromGUID(psclsid))), + "{00020424-0000-0000-C000-000000000046}"); + + // Get the proxy/stub factory buffer. + Microsoft::WRL::ComPtr<IPSFactoryBuffer> psfb; + hr = ::CoGetClassObject(psclsid, CLSCTX_INPROC, 0, IID_PPV_ARGS(&psfb)); + + CHECK(SUCCEEDED(hr)) << std::hex << hr; + + // Create the interface proxy. + Microsoft::WRL::ComPtr<IRpcProxyBuffer> proxy_buffer; + Microsoft::WRL::ComPtr<T> object; + hr = psfb->CreateProxy(nullptr, iid, &proxy_buffer, + IID_PPV_ARGS_Helper(&object)); + LOG_IF(ERROR, FAILED(hr)) + << __func__ << ": CreateProxy failed: " << std::hex << hr; + + // Create the interface stub. + Microsoft::WRL::ComPtr<IRpcStubBuffer> stub_buffer; + hr = psfb->CreateStub(iid, nullptr, &stub_buffer); + LOG_IF(ERROR, FAILED(hr)) + << __func__ << ": CreateStub failed: " << std::hex << hr; + + // Marshal and unmarshal a T interface implemented by V. + object.Reset(); + hr = Microsoft::WRL::MakeAndInitialize<V>(&object); + CHECK(SUCCEEDED(hr)) << std::hex << hr; + + Microsoft::WRL::ComPtr<IStream> stream; + hr = ::CoMarshalInterThreadInterfaceInStream(iid, object.Get(), &stream); + CHECK(SUCCEEDED(hr)) << std::hex << hr; + + base::ScopedAllowBaseSyncPrimitivesForTesting blocking_allowed_here; + base::WaitableEvent unmarshal_complete_event; + + base::ThreadPool::CreateCOMSTATaskRunner({base::MayBlock()}) + ->PostTask( + FROM_HERE, + base::BindOnce( + [](Microsoft::WRL::ComPtr<IStream> stream, + base::WaitableEvent& event) { + const base::ScopedClosureRunner signal_event(base::BindOnce( + [](base::WaitableEvent& event) { event.Signal(); }, + std::ref(event))); + + Microsoft::WRL::ComPtr<T> object; + HRESULT hr = + ::CoUnmarshalInterface(stream.Get(), IID_PPV_ARGS(&object)); + CHECK(SUCCEEDED(hr)) << std::hex << hr; + }, + stream, std::ref(unmarshal_complete_event))); + + if (!unmarshal_complete_event.TimedWait(base::Seconds(60))) { + NOTREACHED(); + } +} } // namespace updater
diff --git a/chromecast/media/api/cma_backend.h b/chromecast/media/api/cma_backend.h index 94bf4f9..9c415818 100644 --- a/chromecast/media/api/cma_backend.h +++ b/chromecast/media/api/cma_backend.h
@@ -71,6 +71,7 @@ virtual RenderingDelay GetRenderingDelay() = 0; virtual void GetStatistics(Statistics* statistics) = 0; virtual AudioTrackTimestamp GetAudioTrackTimestamp() = 0; + virtual int GetStartThresholdInFrames() = 0; // Returns true if the audio decoder requires that encrypted buffers be // decrypted before being passed to PushBuffer(). The return value may
diff --git a/chromecast/media/api/test/mock_cma_backend.h b/chromecast/media/api/test/mock_cma_backend.h index 959857b4..16fbdae4 100644 --- a/chromecast/media/api/test/mock_cma_backend.h +++ b/chromecast/media/api/test/mock_cma_backend.h
@@ -41,6 +41,7 @@ MOCK_METHOD0(GetRenderingDelay, RenderingDelay()); MOCK_METHOD1(GetStatistics, void(Statistics*)); MOCK_METHOD0(GetAudioTrackTimestamp, AudioTrackTimestamp()); + MOCK_METHOD0(GetStartThresholdInFrames, int()); MOCK_METHOD0(RequiresDecryption, bool()); MOCK_METHOD1(SetObserver, void(Observer*)); };
diff --git a/chromecast/media/audio/cast_audio_output_stream_unittest.cc b/chromecast/media/audio/cast_audio_output_stream_unittest.cc index 751c0c44..c4cc3f4 100644 --- a/chromecast/media/audio/cast_audio_output_stream_unittest.cc +++ b/chromecast/media/audio/cast_audio_output_stream_unittest.cc
@@ -136,6 +136,9 @@ AudioTrackTimestamp GetAudioTrackTimestamp() override { return AudioTrackTimestamp(); } + int GetStartThresholdInFrames() override { + return 0; + } bool RequiresDecryption() override { return false; } void SetObserver(CmaBackend::AudioDecoder::Observer* observer) override {}
diff --git a/chromecast/media/cma/backend/android/audio_decoder_android.cc b/chromecast/media/cma/backend/android/audio_decoder_android.cc index 80dc0d36..dc024419 100644 --- a/chromecast/media/cma/backend/android/audio_decoder_android.cc +++ b/chromecast/media/cma/backend/android/audio_decoder_android.cc
@@ -380,6 +380,11 @@ : AudioDecoderAndroid::AudioTrackTimestamp()); } +int AudioDecoderAndroid::GetStartThresholdInFrames() { + TRACE_FUNCTION_ENTRY0(); + return (sink_ ? sink_->GetStartThresholdInFrames() : 0); +} + void AudioDecoderAndroid::OnBufferDecoded( uint64_t input_bytes, CastAudioDecoder::Status status,
diff --git a/chromecast/media/cma/backend/android/audio_decoder_android.h b/chromecast/media/cma/backend/android/audio_decoder_android.h index 621bc9e2..a82815c 100644 --- a/chromecast/media/cma/backend/android/audio_decoder_android.h +++ b/chromecast/media/cma/backend/android/audio_decoder_android.h
@@ -64,6 +64,7 @@ bool SetVolume(float multiplier) override; RenderingDelay GetRenderingDelay() override; AudioTrackTimestamp GetAudioTrackTimestamp() override; + int GetStartThresholdInFrames() override; private: struct RateShifterInfo {
diff --git a/chromecast/media/cma/backend/android/audio_sink_android.h b/chromecast/media/cma/backend/android/audio_sink_android.h index 53007ef9..2d4de6a 100644 --- a/chromecast/media/cma/backend/android/audio_sink_android.h +++ b/chromecast/media/cma/backend/android/audio_sink_android.h
@@ -85,6 +85,9 @@ virtual MediaPipelineBackendAndroid::AudioTrackTimestamp GetAudioTrackTimestamp() = 0; + // Returns the streaming start threshold of the current audio track. + virtual int GetStartThresholdInFrames() = 0; + // Getters virtual int input_samples_per_second() const = 0; virtual bool primary() const = 0;
diff --git a/chromecast/media/cma/backend/android/audio_sink_android_audiotrack_impl.cc b/chromecast/media/cma/backend/android/audio_sink_android_audiotrack_impl.cc index 264e6bf2a..3fb106f 100644 --- a/chromecast/media/cma/backend/android/audio_sink_android_audiotrack_impl.cc +++ b/chromecast/media/cma/backend/android/audio_sink_android_audiotrack_impl.cc
@@ -149,7 +149,13 @@ base::android::AttachCurrentThread(), j_audio_sink_audiotrack_impl_); return MediaPipelineBackendAndroid::AudioTrackTimestamp( direct_audio_track_timestamp_address_[0], - direct_audio_track_timestamp_address_[1]); + direct_audio_track_timestamp_address_[1], + direct_audio_track_timestamp_address_[2]); +} + +int AudioSinkAndroidAudioTrackImpl::GetStartThresholdInFrames() { + return Java_AudioSinkAudioTrackImpl_getStartThresholdInFrames( + base::android::AttachCurrentThread(), j_audio_sink_audiotrack_impl_); } void AudioSinkAndroidAudioTrackImpl::FinalizeOnFeederThread() {
diff --git a/chromecast/media/cma/backend/android/audio_sink_android_audiotrack_impl.h b/chromecast/media/cma/backend/android/audio_sink_android_audiotrack_impl.h index 8451946..2ae0698 100644 --- a/chromecast/media/cma/backend/android/audio_sink_android_audiotrack_impl.h +++ b/chromecast/media/cma/backend/android/audio_sink_android_audiotrack_impl.h
@@ -68,6 +68,7 @@ MediaPipelineBackendAndroid::RenderingDelay GetRenderingDelay() override; MediaPipelineBackendAndroid::AudioTrackTimestamp GetAudioTrackTimestamp() override; + int GetStartThresholdInFrames() override; // Getters int input_samples_per_second() const override;
diff --git a/chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/AudioSinkAudioTrackImpl.java b/chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/AudioSinkAudioTrackImpl.java index 7670192..53ac5e1 100644 --- a/chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/AudioSinkAudioTrackImpl.java +++ b/chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/AudioSinkAudioTrackImpl.java
@@ -344,7 +344,7 @@ .build()); if (isValidSessionId(sessionId)) builder.setSessionId(sessionId); mAudioTrack = builder.build(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && isValidSessionId(sessionId)) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { // The playback will not be started until Android AudioTrack has more data than // the start threshold. Reduce the start threshold to 50ms in order to start // playback as soon as possible after starting or resuming. Sometimes other @@ -364,8 +364,12 @@ mRenderingDelayBuffer.putLong(0, 0); mRenderingDelayBuffer.putLong(8, NO_TIMESTAMP); - mAudioTrackTimestampBuffer = ByteBuffer.allocateDirect(2 * 8); // 2 long + mAudioTrackTimestampBuffer = ByteBuffer.allocateDirect(3 * 8); // 3 long mAudioTrackTimestampBuffer.order(ByteOrder.nativeOrder()); + // Initialize with zero frame position and system nano time. + mAudioTrackTimestampBuffer.putLong(0, 0); + mAudioTrackTimestampBuffer.putLong(8, 0); + mAudioTrackTimestampBuffer.putLong(16, System.nanoTime()); AudioSinkAudioTrackImplJni.get().cacheDirectBufferAddress(mNativeAudioSinkAudioTrackImpl, AudioSinkAudioTrackImpl.this, mPcmBuffer, mRenderingDelayBuffer, @@ -559,16 +563,24 @@ } @CalledByNative + public int getStartThresholdInFrames() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + return mAudioTrack.getStartThresholdInFrames(); + } + return 0; + } + + @CalledByNative public void getAudioTrackTimestamp() { AudioTimestamp timestamp = new AudioTimestamp(); if (!mAudioTrack.getTimestamp(timestamp)) { - mAudioTrackTimestampBuffer.putLong(0, 0); - mAudioTrackTimestampBuffer.putLong(8, NO_TIMESTAMP); + // The timestamp is invalid. Do not update values. return; } + mAudioTrackTimestampBuffer.putLong(0, timestamp.framePosition); if (mPendingFramesWithoutTimestamp == null) { - mAudioTrackTimestampBuffer.putLong(0, timestamp.framePosition); - mAudioTrackTimestampBuffer.putLong(8, timestamp.nanoTime); + mAudioTrackTimestampBuffer.putLong(8, timestamp.framePosition); + mAudioTrackTimestampBuffer.putLong(16, timestamp.nanoTime); return; } while (!mPendingFramesWithoutTimestamp.isEmpty() @@ -583,14 +595,14 @@ && timestamp.framePosition >= mPendingFramesWithoutTimestamp.peek().first) { // The reported position is in the middle of an audio buffer without timestamp. Use // the start position to calculate the accurate position. - mAudioTrackTimestampBuffer.putLong(0, + mAudioTrackTimestampBuffer.putLong(8, mPendingFramesWithoutTimestamp.peek().first - mTotalPlayedFramesWithoutTimestamp); } else { mAudioTrackTimestampBuffer.putLong( - 0, timestamp.framePosition - mTotalPlayedFramesWithoutTimestamp); + 8, timestamp.framePosition - mTotalPlayedFramesWithoutTimestamp); } - mAudioTrackTimestampBuffer.putLong(8, timestamp.nanoTime); + mAudioTrackTimestampBuffer.putLong(16, timestamp.nanoTime); } /** Returns the elapsed time from the given start_time until now, in nsec. */
diff --git a/chromecast/media/cma/backend/audio_decoder_for_mixer.cc b/chromecast/media/cma/backend/audio_decoder_for_mixer.cc index 599e018..b7e9b6dc 100644 --- a/chromecast/media/cma/backend/audio_decoder_for_mixer.cc +++ b/chromecast/media/cma/backend/audio_decoder_for_mixer.cc
@@ -453,6 +453,10 @@ return AudioTrackTimestamp(); } +int AudioDecoderForMixer::GetStartThresholdInFrames() { + return 0; +} + void AudioDecoderForMixer::OnBufferDecoded( uint64_t input_bytes, bool has_config,
diff --git a/chromecast/media/cma/backend/audio_decoder_for_mixer.h b/chromecast/media/cma/backend/audio_decoder_for_mixer.h index e2b6357..00a8b66 100644 --- a/chromecast/media/cma/backend/audio_decoder_for_mixer.h +++ b/chromecast/media/cma/backend/audio_decoder_for_mixer.h
@@ -59,6 +59,7 @@ bool SetVolume(float multiplier) override; RenderingDelay GetRenderingDelay() override; AudioTrackTimestamp GetAudioTrackTimestamp() override; + int GetStartThresholdInFrames() override; // This allows for very small changes in the rate of audio playback that are // (supposedly) imperceptible.
diff --git a/chromecast/media/cma/backend/desktop/audio_decoder_desktop.cc b/chromecast/media/cma/backend/desktop/audio_decoder_desktop.cc index 96e10f3b..e133fb1 100644 --- a/chromecast/media/cma/backend/desktop/audio_decoder_desktop.cc +++ b/chromecast/media/cma/backend/desktop/audio_decoder_desktop.cc
@@ -62,5 +62,9 @@ return AudioTrackTimestamp(); } +int AudioDecoderDesktop::GetStartThresholdInFrames() { + return 0; +} + } // namespace media } // namespace chromecast
diff --git a/chromecast/media/cma/backend/desktop/audio_decoder_desktop.h b/chromecast/media/cma/backend/desktop/audio_decoder_desktop.h index 5e386dd4..69a07dd 100644 --- a/chromecast/media/cma/backend/desktop/audio_decoder_desktop.h +++ b/chromecast/media/cma/backend/desktop/audio_decoder_desktop.h
@@ -38,6 +38,7 @@ bool SetVolume(float multiplier) override; RenderingDelay GetRenderingDelay() override; AudioTrackTimestamp GetAudioTrackTimestamp() override; + int GetStartThresholdInFrames() override; private: Delegate* delegate_;
diff --git a/chromecast/media/cma/backend/proxy/audio_decoder_pipeline_node.cc b/chromecast/media/cma/backend/proxy/audio_decoder_pipeline_node.cc index d0b08d86..29d9e55 100644 --- a/chromecast/media/cma/backend/proxy/audio_decoder_pipeline_node.cc +++ b/chromecast/media/cma/backend/proxy/audio_decoder_pipeline_node.cc
@@ -67,6 +67,12 @@ return delegated_decoder_->GetAudioTrackTimestamp(); } +int AudioDecoderPipelineNode::GetStartThresholdInFrames() { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + + return delegated_decoder_->GetStartThresholdInFrames(); +} + bool AudioDecoderPipelineNode::RequiresDecryption() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
diff --git a/chromecast/media/cma/backend/proxy/audio_decoder_pipeline_node.h b/chromecast/media/cma/backend/proxy/audio_decoder_pipeline_node.h index c89cf82..814fa0c 100644 --- a/chromecast/media/cma/backend/proxy/audio_decoder_pipeline_node.h +++ b/chromecast/media/cma/backend/proxy/audio_decoder_pipeline_node.h
@@ -50,6 +50,7 @@ CmaBackend::AudioDecoder::RenderingDelay GetRenderingDelay() override; void GetStatistics(CmaBackend::AudioDecoder::Statistics* statistics) override; CmaBackend::AudioDecoder::AudioTrackTimestamp GetAudioTrackTimestamp() override; + int GetStartThresholdInFrames() override; bool RequiresDecryption() override; void SetObserver(CmaBackend::AudioDecoder::Observer* observer) override;
diff --git a/chromecast/media/common/audio_decoder_software_wrapper.cc b/chromecast/media/common/audio_decoder_software_wrapper.cc index d712c89..56fbf613 100644 --- a/chromecast/media/common/audio_decoder_software_wrapper.cc +++ b/chromecast/media/common/audio_decoder_software_wrapper.cc
@@ -119,6 +119,10 @@ return backend_decoder_->GetAudioTrackTimestamp(); } +int AudioDecoderSoftwareWrapper::GetStartThresholdInFrames() { + return backend_decoder_->GetStartThresholdInFrames(); +} + bool AudioDecoderSoftwareWrapper::IsUsingSoftwareDecoder() { return software_decoder_.get() != nullptr; }
diff --git a/chromecast/media/common/audio_decoder_software_wrapper.h b/chromecast/media/common/audio_decoder_software_wrapper.h index 96f3e20..0e0e01a6 100644 --- a/chromecast/media/common/audio_decoder_software_wrapper.h +++ b/chromecast/media/common/audio_decoder_software_wrapper.h
@@ -44,6 +44,7 @@ bool SetVolume(float multiplier); RenderingDelay GetRenderingDelay(); AudioTrackTimestamp GetAudioTrackTimestamp(); + int GetStartThresholdInFrames(); bool IsUsingSoftwareDecoder(); private:
diff --git a/chromecast/media/common/audio_decoder_software_wrapper_unittest.cc b/chromecast/media/common/audio_decoder_software_wrapper_unittest.cc index e3cab80..bb977c57 100644 --- a/chromecast/media/common/audio_decoder_software_wrapper_unittest.cc +++ b/chromecast/media/common/audio_decoder_software_wrapper_unittest.cc
@@ -31,6 +31,7 @@ MOCK_METHOD0(GetRenderingDelay, RenderingDelay()); MOCK_METHOD1(GetStatistics, void(Statistics*)); MOCK_METHOD0(GetAudioTrackTimestamp, AudioTrackTimestamp()); + MOCK_METHOD0(GetStartThresholdInFrames, int()); }; } // namespace
diff --git a/chromecast/media/common/audio_decoder_wrapper.cc b/chromecast/media/common/audio_decoder_wrapper.cc index 0da89c5..87b50781 100644 --- a/chromecast/media/common/audio_decoder_wrapper.cc +++ b/chromecast/media/common/audio_decoder_wrapper.cc
@@ -24,10 +24,12 @@ RevokedAudioDecoderWrapper(RenderingDelay rendering_delay, Statistics statistics, AudioTrackTimestamp audio_track_timestamp, + int start_threshold_in_frames, bool requires_decryption) : rendering_delay_(rendering_delay), statistics_(statistics), audio_track_timestamp_(audio_track_timestamp), + start_threshold_in_frames_(start_threshold_in_frames), requires_decryption_(requires_decryption) {} RevokedAudioDecoderWrapper(const RevokedAudioDecoderWrapper&) = delete; @@ -52,12 +54,16 @@ AudioTrackTimestamp GetAudioTrackTimestamp() override { return audio_track_timestamp_; } + int GetStartThresholdInFrames() override { + return start_threshold_in_frames_; + } bool RequiresDecryption() override { return requires_decryption_; } void SetObserver(CmaBackend::AudioDecoder::Observer* observer) override {} const RenderingDelay rendering_delay_; const Statistics statistics_; const AudioTrackTimestamp audio_track_timestamp_; + const int start_threshold_in_frames_; const bool requires_decryption_; }; @@ -154,6 +160,10 @@ return decoder_.GetAudioTrackTimestamp(); } +int ActiveAudioDecoderWrapper::GetStartThresholdInFrames() { + return decoder_.GetStartThresholdInFrames(); +} + bool ActiveAudioDecoderWrapper::RequiresDecryption() { return (MediaPipelineBackend::AudioDecoder::RequiresDecryption && MediaPipelineBackend::AudioDecoder::RequiresDecryption()) || @@ -172,7 +182,8 @@ AudioDecoderWrapper::AudioDecoderWrapper(AudioContentType type) : decoder_revoked_(true) { audio_decoder_ = std::make_unique<RevokedAudioDecoderWrapper>( - RenderingDelay(), Statistics(), AudioTrackTimestamp(), false); + RenderingDelay(), Statistics(), AudioTrackTimestamp(), + 0 /* start_threshold_in_frames */, false); } AudioDecoderWrapper::~AudioDecoderWrapper() = default; @@ -191,6 +202,7 @@ audio_decoder_ = std::make_unique<RevokedAudioDecoderWrapper>( audio_decoder_->GetRenderingDelay(), statistics, audio_decoder_->GetAudioTrackTimestamp(), + audio_decoder_->GetStartThresholdInFrames(), audio_decoder_->RequiresDecryption()); } } @@ -225,6 +237,10 @@ return audio_decoder_->GetAudioTrackTimestamp(); } +int AudioDecoderWrapper::GetStartThresholdInFrames() { + return audio_decoder_->GetStartThresholdInFrames(); +} + bool AudioDecoderWrapper::RequiresDecryption() { return audio_decoder_->RequiresDecryption(); }
diff --git a/chromecast/media/common/audio_decoder_wrapper.h b/chromecast/media/common/audio_decoder_wrapper.h index 6c8478f..03bea8038 100644 --- a/chromecast/media/common/audio_decoder_wrapper.h +++ b/chromecast/media/common/audio_decoder_wrapper.h
@@ -51,6 +51,7 @@ RenderingDelay GetRenderingDelay() override; void GetStatistics(Statistics* statistics) override; AudioTrackTimestamp GetAudioTrackTimestamp() override; + int GetStartThresholdInFrames() override; bool RequiresDecryption() override; void SetObserver(CmaBackend::AudioDecoder::Observer* observer) override {} @@ -93,6 +94,7 @@ RenderingDelay GetRenderingDelay() override; void GetStatistics(Statistics* statistics) override; AudioTrackTimestamp GetAudioTrackTimestamp() override; + int GetStartThresholdInFrames() override; bool RequiresDecryption() override; void SetObserver(CmaBackend::AudioDecoder::Observer* observer) override {}
diff --git a/chromecast/public/media/media_pipeline_backend.h b/chromecast/public/media/media_pipeline_backend.h index 9a9a739..692a505 100644 --- a/chromecast/public/media/media_pipeline_backend.h +++ b/chromecast/public/media/media_pipeline_backend.h
@@ -125,19 +125,26 @@ uint64_t decoded_bytes; }; - // Android AudioTrack timestamp information: amount of frames have been - // played, and timestamp of system clock (with a timebase of - // TIMEBASE_MONOTONIC) in nanoseconds associated with playback position. + // Android AudioTrack timestamp information. struct AudioTrackTimestamp { AudioTrackTimestamp() - : audio_track_frame_position(0), audio_track_nano_time(INT64_MIN) {} + : audio_track_frame_position(0), + audio_track_frame_position_without_silence(0), + audio_track_nano_time(INT64_MIN) {} AudioTrackTimestamp(int64_t audio_track_frame_position_in, + int64_t audio_track_frame_position_without_silence_in, int64_t audio_track_nano_time_in) : audio_track_frame_position(audio_track_frame_position_in), + audio_track_frame_position_without_silence( + audio_track_frame_position_without_silence_in), audio_track_nano_time(audio_track_nano_time_in) {} // Position in frames relative to start of an assumed audio stream in the // Android AudioTrack. int64_t audio_track_frame_position; + // Position in frames relative to start of an assumed audio stream in the + // Android AudioTrack, excluding frames of silence buffers which don't + // have timestamps. + int64_t audio_track_frame_position_without_silence; // Time associated with the frame in the Android audio pipeline. int64_t audio_track_nano_time; }; @@ -170,6 +177,10 @@ // timestamp is not available. virtual AudioTrackTimestamp GetAudioTrackTimestamp() = 0; + // Returns the streaming start threshold of the current audio track. + // Returns zero if the start threshold is not available. + virtual int GetStartThresholdInFrames() = 0; + // Returns the minimum amount of audio data buffered (in microseconds) // necessary to prevent underrun for the given |config|; ie, if the // rendering delay falls below this value, then underrun may occur.
diff --git a/chromeos/ash/components/BUILD.gn b/chromeos/ash/components/BUILD.gn index b42a8ce..3527270 100644 --- a/chromeos/ash/components/BUILD.gn +++ b/chromeos/ash/components/BUILD.gn
@@ -20,6 +20,7 @@ "//chromeos/ash/components/disks:unit_tests", "//chromeos/ash/components/drivefs:unit_tests", "//chromeos/ash/components/feature_usage:unit_tests", + "//chromeos/ash/components/geolocation:unit_tests", "//chromeos/ash/components/human_presence:unit_tests", "//chromeos/ash/components/install_attributes:unit_tests", "//chromeos/ash/components/language/language_packs:unit_tests",
diff --git a/ash/components/geolocation/BUILD.gn b/chromeos/ash/components/geolocation/BUILD.gn similarity index 94% rename from ash/components/geolocation/BUILD.gn rename to chromeos/ash/components/geolocation/BUILD.gn index 0248c8a7..e78efdd5d 100644 --- a/ash/components/geolocation/BUILD.gn +++ b/chromeos/ash/components/geolocation/BUILD.gn
@@ -8,7 +8,7 @@ assert(is_chromeos_ash, "Non-Chrome-OS builds must not depend on //ash") component("geolocation") { - defines = [ "IS_ASH_GEOLOCATION_IMPL" ] + defines = [ "IS_CHROMEOS_ASH_COMPONENTS_GEOLOCATION_IMPL" ] deps = [ "//base", "//chromeos/ash/components/network",
diff --git a/ash/components/geolocation/DEPS b/chromeos/ash/components/geolocation/DEPS similarity index 93% rename from ash/components/geolocation/DEPS rename to chromeos/ash/components/geolocation/DEPS index 0f9eb71..c0140f4 100644 --- a/ash/components/geolocation/DEPS +++ b/chromeos/ash/components/geolocation/DEPS
@@ -15,6 +15,6 @@ ".*test\.cc": [ "+chromeos/ash/components/dbus", "+services/network/test", - "+testing", + "+testing/gtest", ], }
diff --git a/ash/components/geolocation/DIR_METADATA b/chromeos/ash/components/geolocation/DIR_METADATA similarity index 100% rename from ash/components/geolocation/DIR_METADATA rename to chromeos/ash/components/geolocation/DIR_METADATA
diff --git a/ash/components/geolocation/OWNERS b/chromeos/ash/components/geolocation/OWNERS similarity index 100% rename from ash/components/geolocation/OWNERS rename to chromeos/ash/components/geolocation/OWNERS
diff --git a/ash/components/geolocation/geoposition.cc b/chromeos/ash/components/geolocation/geoposition.cc similarity index 82% rename from ash/components/geolocation/geoposition.cc rename to chromeos/ash/components/geolocation/geoposition.cc index 5891ed9..e64a644 100644 --- a/ash/components/geolocation/geoposition.cc +++ b/chromeos/ash/components/geolocation/geoposition.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/components/geolocation/geoposition.h" +#include "chromeos/ash/components/geolocation/geoposition.h" #include "base/strings/stringprintf.h" @@ -21,8 +21,7 @@ longitude(kBadLatitudeLongitude), accuracy(kBadAccuracy), error_code(0), - status(STATUS_NONE) { -} + status(STATUS_NONE) {} bool Geoposition::Valid() const { return latitude >= -90. && latitude <= 90. && longitude >= -180. && @@ -31,13 +30,8 @@ } std::string Geoposition::ToString() const { - static const char* const status2string[] = { - "NONE", - "OK", - "SERVER_ERROR", - "NETWORK_ERROR", - "TIMEOUT" - }; + static const char* const status2string[] = {"NONE", "OK", "SERVER_ERROR", + "NETWORK_ERROR", "TIMEOUT"}; return base::StringPrintf( "latitude=%f, longitude=%f, accuracy=%f, error_code=%u, "
diff --git a/ash/components/geolocation/geoposition.h b/chromeos/ash/components/geolocation/geoposition.h similarity index 86% rename from ash/components/geolocation/geoposition.h rename to chromeos/ash/components/geolocation/geoposition.h index 4dfe3b77..ea1c77c 100644 --- a/ash/components/geolocation/geoposition.h +++ b/chromeos/ash/components/geolocation/geoposition.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_COMPONENTS_GEOLOCATION_GEOPOSITION_H_ -#define ASH_COMPONENTS_GEOLOCATION_GEOPOSITION_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_GEOLOCATION_GEOPOSITION_H_ +#define CHROMEOS_ASH_COMPONENTS_GEOLOCATION_GEOPOSITION_H_ #include <string> @@ -14,7 +14,7 @@ // This structure represents Google Maps Geolocation response. // Based on device/geolocation/geoposition.h . -struct COMPONENT_EXPORT(ASH_GEOLOCATION) Geoposition { +struct COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_GEOLOCATION) Geoposition { // Geolocation API client status. // (Server status is reported in "error_code" field.) enum Status { @@ -63,4 +63,4 @@ } // namespace ash -#endif // ASH_COMPONENTS_GEOLOCATION_GEOPOSITION_H_ +#endif // CHROMEOS_ASH_COMPONENTS_GEOLOCATION_GEOPOSITION_H_
diff --git a/ash/components/geolocation/simple_geolocation_provider.cc b/chromeos/ash/components/geolocation/simple_geolocation_provider.cc similarity index 92% rename from ash/components/geolocation/simple_geolocation_provider.cc rename to chromeos/ash/components/geolocation/simple_geolocation_provider.cc index d8e9532..27600cf 100644 --- a/ash/components/geolocation/simple_geolocation_provider.cc +++ b/chromeos/ash/components/geolocation/simple_geolocation_provider.cc
@@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/components/geolocation/simple_geolocation_provider.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" #include <algorithm> #include <iterator> #include <memory> -#include "ash/components/geolocation/geoposition.h" #include "base/bind.h" #include "base/memory/ptr_util.h" +#include "chromeos/ash/components/geolocation/geoposition.h" #include "chromeos/ash/components/network/geolocation_handler.h" #include "chromeos/ash/components/network/network_handler.h" #include "services/network/public/cpp/shared_url_loader_factory.h" @@ -30,7 +30,7 @@ : shared_url_loader_factory_(std::move(factory)), url_(url) {} SimpleGeolocationProvider::~SimpleGeolocationProvider() { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); } void SimpleGeolocationProvider::RequestGeolocation( @@ -38,7 +38,7 @@ bool send_wifi_access_points, bool send_cell_towers, SimpleGeolocationRequest::ResponseCallback callback) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); auto cell_vector = std::make_unique<CellTowerVector>(); auto wifi_vector = std::make_unique<WifiAccessPointVector>(); @@ -84,7 +84,7 @@ const Geoposition& geoposition, bool server_error, const base::TimeDelta elapsed) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); std::move(callback).Run(geoposition, server_error, elapsed);
diff --git a/ash/components/geolocation/simple_geolocation_provider.h b/chromeos/ash/components/geolocation/simple_geolocation_provider.h similarity index 86% rename from ash/components/geolocation/simple_geolocation_provider.h rename to chromeos/ash/components/geolocation/simple_geolocation_provider.h index 93ea490..8389a89 100644 --- a/ash/components/geolocation/simple_geolocation_provider.h +++ b/chromeos/ash/components/geolocation/simple_geolocation_provider.h
@@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_ -#define ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_ +#define CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_ #include <memory> #include <vector> -#include "ash/components/geolocation/simple_geolocation_request.h" #include "base/component_export.h" #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "base/threading/thread_checker.h" #include "base/time/time.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_request.h" #include "url/gurl.h" namespace network { @@ -31,7 +31,8 @@ // Note: this should probably be a singleton to monitor requests rate. // But as it is used only during ChromeOS Out-of-Box, it can be owned by // WizardController for now. -class COMPONENT_EXPORT(ASH_GEOLOCATION) SimpleGeolocationProvider { +class COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_GEOLOCATION) + SimpleGeolocationProvider { public: SimpleGeolocationProvider( scoped_refptr<network::SharedURLLoaderFactory> factory, @@ -85,9 +86,9 @@ GeolocationHandler* geolocation_handler_ = nullptr; // Creation and destruction should happen on the same thread. - base::ThreadChecker thread_checker_; + THREAD_CHECKER(thread_checker_); }; } // namespace ash -#endif // ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_ +#endif // CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_
diff --git a/ash/components/geolocation/simple_geolocation_request.cc b/chromeos/ash/components/geolocation/simple_geolocation_request.cc similarity index 94% rename from ash/components/geolocation/simple_geolocation_request.cc rename to chromeos/ash/components/geolocation/simple_geolocation_request.cc index 174cc2d..1b0e69a 100644 --- a/ash/components/geolocation/simple_geolocation_request.cc +++ b/chromeos/ash/components/geolocation/simple_geolocation_request.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/components/geolocation/simple_geolocation_request.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_request.h" #include <stddef.h> @@ -11,8 +11,6 @@ #include <string> #include <utility> -#include "ash/components/geolocation/simple_geolocation_provider.h" -#include "ash/components/geolocation/simple_geolocation_request_test_monitor.h" #include "base/bind.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" @@ -23,6 +21,8 @@ #include "base/strings/stringprintf.h" #include "base/time/time.h" #include "base/values.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.h" #include "google_apis/google_api_keys.h" #include "net/base/load_flags.h" #include "net/http/http_status_code.h" @@ -115,8 +115,7 @@ // Too many requests (more than 1) mean there is a problem in implementation. void RecordUmaEvent(SimpleGeolocationRequestEvent event) { - UMA_HISTOGRAM_ENUMERATION("SimpleGeolocation.Request.Event", - event, + UMA_HISTOGRAM_ENUMERATION("SimpleGeolocation.Request.Event", event, SIMPLE_GEOLOCATION_REQUEST_EVENT_COUNT); } @@ -136,8 +135,7 @@ } void RecordUmaResult(SimpleGeolocationRequestResult result, size_t retries) { - UMA_HISTOGRAM_ENUMERATION("SimpleGeolocation.Request.Result", - result, + UMA_HISTOGRAM_ENUMERATION("SimpleGeolocation.Request.Result", result, SIMPLE_GEOLOCATION_REQUEST_RESULT_COUNT); base::UmaHistogramSparse("SimpleGeolocation.Request.Retries", std::min(retries, kMaxRetriesValueInHistograms)); @@ -181,13 +179,14 @@ DCHECK(position); if (response_body.empty()) { - PrintGeolocationError( - server_url, "Server returned empty response", position); + PrintGeolocationError(server_url, "Server returned empty response", + position); RecordUmaEvent(SIMPLE_GEOLOCATION_REQUEST_EVENT_RESPONSE_EMPTY); return false; } VLOG(1) << "SimpleGeolocationRequest::ParseServerResponse() : " - "Parsing response '" << response_body << "'"; + "Parsing response '" + << response_body << "'"; // Parse the response, ignoring comments. auto response_result = @@ -254,8 +253,8 @@ absl::optional<double> accuracy = response_value.FindDoubleKey(kAccuracyString); if (!accuracy) { - PrintGeolocationError( - server_url, "Missing 'accuracy' attribute.", position); + PrintGeolocationError(server_url, "Missing 'accuracy' attribute.", + position); RecordUmaEvent(SIMPLE_GEOLOCATION_REQUEST_EVENT_RESPONSE_MALFORMED); return false; } @@ -363,7 +362,7 @@ cell_tower_data_(cell_tower_data.release()) {} SimpleGeolocationRequest::~SimpleGeolocationRequest() { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); // If callback is not empty, request is cancelled. if (callback_) { @@ -425,7 +424,7 @@ } void SimpleGeolocationRequest::StartRequest() { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); RecordUmaEvent(SIMPLE_GEOLOCATION_REQUEST_EVENT_REQUEST_START); ++retries_; @@ -456,8 +455,8 @@ void SimpleGeolocationRequest::MakeRequest(ResponseCallback callback) { callback_ = std::move(callback); request_url_ = GeolocationRequestURL(service_url_); - timeout_timer_.Start( - FROM_HERE, timeout_, this, &SimpleGeolocationRequest::OnTimeout); + timeout_timer_.Start(FROM_HERE, timeout_, this, + &SimpleGeolocationRequest::OnTimeout); request_started_at_ = base::Time::Now(); StartRequest(); } @@ -475,8 +474,8 @@ void SimpleGeolocationRequest::Retry(bool server_error) { base::TimeDelta delay(server_error ? retry_sleep_on_server_error_ : retry_sleep_on_bad_response_); - request_scheduled_.Start( - FROM_HERE, delay, this, &SimpleGeolocationRequest::StartRequest); + request_scheduled_.Start(FROM_HERE, delay, this, + &SimpleGeolocationRequest::StartRequest); } void SimpleGeolocationRequest::OnSimpleURLLoaderComplete(
diff --git a/ash/components/geolocation/simple_geolocation_request.h b/chromeos/ash/components/geolocation/simple_geolocation_request.h similarity index 89% rename from ash/components/geolocation/simple_geolocation_request.h rename to chromeos/ash/components/geolocation/simple_geolocation_request.h index ab216d5..dcfffe6 100644 --- a/ash/components/geolocation/simple_geolocation_request.h +++ b/chromeos/ash/components/geolocation/simple_geolocation_request.h
@@ -2,12 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ -#define ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ +#define CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ #include <memory> -#include "ash/components/geolocation/geoposition.h" #include "base/callback.h" #include "base/compiler_specific.h" #include "base/component_export.h" @@ -15,6 +14,7 @@ #include "base/threading/thread_checker.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "chromeos/ash/components/geolocation/geoposition.h" #include "chromeos/ash/components/network/network_util.h" #include "url/gurl.h" @@ -37,8 +37,10 @@ // - If request is destroyed while callback has not beed called yet, request // is silently cancelled. // -// Note: we need COMPONENT_EXPORT(ASH_GEOLOCATION) for tests. -class COMPONENT_EXPORT(ASH_GEOLOCATION) SimpleGeolocationRequest { +// Note: we need COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_GEOLOCATION) for +// tests. +class COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_GEOLOCATION) + SimpleGeolocationRequest { public: // Called when a new geolocation information is available. // The second argument indicates whether there was a server error or not. @@ -139,9 +141,9 @@ std::unique_ptr<CellTowerVector> cell_tower_data_; // Creation and destruction should happen on the same thread. - base::ThreadChecker thread_checker_; + THREAD_CHECKER(thread_checker_); }; } // namespace ash -#endif // ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_ +#endif // CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_H_
diff --git a/ash/components/geolocation/simple_geolocation_request_test_monitor.cc b/chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.cc similarity index 86% rename from ash/components/geolocation/simple_geolocation_request_test_monitor.cc rename to chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.cc index ee64634..6eb142b7 100644 --- a/ash/components/geolocation/simple_geolocation_request_test_monitor.cc +++ b/chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.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/components/geolocation/simple_geolocation_request_test_monitor.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.h" namespace ash {
diff --git a/ash/components/geolocation/simple_geolocation_request_test_monitor.h b/chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.h similarity index 67% rename from ash/components/geolocation/simple_geolocation_request_test_monitor.h rename to chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.h index fb45142..14b40ff 100644 --- a/ash/components/geolocation/simple_geolocation_request_test_monitor.h +++ b/chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.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_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_TEST_MONITOR_H_ -#define ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_TEST_MONITOR_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_TEST_MONITOR_H_ +#define CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_TEST_MONITOR_H_ #include "base/component_export.h" @@ -14,8 +14,9 @@ // This is global hook, that allows to monitor SimpleGeolocationRequest // in tests. // -// Note: we need COMPONENT_EXPORT(ASH_GEOLOCATION) for tests. -class COMPONENT_EXPORT(ASH_GEOLOCATION) +// Note: we need COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_GEOLOCATION) for +// tests. +class COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_GEOLOCATION) SimpleGeolocationRequestTestMonitor { public: SimpleGeolocationRequestTestMonitor(); @@ -32,4 +33,4 @@ } // namespace ash -#endif // ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_TEST_MONITOR_H_ +#endif // CHROMEOS_ASH_COMPONENTS_GEOLOCATION_SIMPLE_GEOLOCATION_REQUEST_TEST_MONITOR_H_
diff --git a/ash/components/geolocation/simple_geolocation_unittest.cc b/chromeos/ash/components/geolocation/simple_geolocation_unittest.cc similarity index 98% rename from ash/components/geolocation/simple_geolocation_unittest.cc rename to chromeos/ash/components/geolocation/simple_geolocation_unittest.cc index 36fae335..b20d8b05 100644 --- a/ash/components/geolocation/simple_geolocation_unittest.cc +++ b/chromeos/ash/components/geolocation/simple_geolocation_unittest.cc
@@ -6,8 +6,6 @@ #include <memory> -#include "ash/components/geolocation/simple_geolocation_provider.h" -#include "ash/components/geolocation/simple_geolocation_request_test_monitor.h" #include "base/bind.h" #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" @@ -15,6 +13,8 @@ #include "base/test/task_environment.h" #include "base/time/time.h" #include "chromeos/ash/components/dbus/shill/shill_manager_client.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_provider.h" +#include "chromeos/ash/components/geolocation/simple_geolocation_request_test_monitor.h" #include "chromeos/ash/components/network/geolocation_handler.h" #include "chromeos/ash/components/network/network_handler_test_helper.h" #include "net/http/http_response_headers.h" @@ -330,9 +330,7 @@ base::RunLoop().RunUntilIdle(); } - void TearDown() override { - geolocation_handler_.reset(); - } + void TearDown() override { geolocation_handler_.reset(); } bool GetWifiAccessPoints() { return geolocation_handler_->GetWifiAccessPoints(&wifi_access_points_,
diff --git a/components/autofill/core/browser/BUILD.gn b/components/autofill/core/browser/BUILD.gn index bf15fd7..9710f31 100644 --- a/components/autofill/core/browser/BUILD.gn +++ b/components/autofill/core/browser/BUILD.gn
@@ -267,6 +267,8 @@ "metrics/payments/save_credit_card_prompt_metrics.h", "metrics/payments/virtual_card_enrollment_metrics.cc", "metrics/payments/virtual_card_enrollment_metrics.h", + "metrics/payments/virtual_card_manual_fallback_bubble_metrics.cc", + "metrics/payments/virtual_card_manual_fallback_bubble_metrics.h", "metrics/shadow_prediction_metrics.cc", "metrics/shadow_prediction_metrics.h", "payments/account_info_getter.h",
diff --git a/components/autofill/core/browser/autofill_suggestion_generator.cc b/components/autofill/core/browser/autofill_suggestion_generator.cc index 460b794..337f5d6 100644 --- a/components/autofill/core/browser/autofill_suggestion_generator.cc +++ b/components/autofill/core/browser/autofill_suggestion_generator.cc
@@ -299,7 +299,7 @@ // word and profile IDs are sent in the low word. int AutofillSuggestionGenerator::MakeFrontendId( const Suggestion::BackendId& cc_backend_id, - const Suggestion::BackendId& profile_backend_id) const { + const Suggestion::BackendId& profile_backend_id) { InternalId cc_int_id = BackendIdToInternalId(cc_backend_id); InternalId profile_int_id = BackendIdToInternalId(profile_backend_id); @@ -320,16 +320,15 @@ void AutofillSuggestionGenerator::SplitFrontendId( int frontend_id, Suggestion::BackendId* cc_backend_id, - Suggestion::BackendId* profile_backend_id) const { + Suggestion::BackendId* profile_backend_id) { InternalId cc_int_id = InternalId((frontend_id >> std::numeric_limits<uint16_t>::digits) & std::numeric_limits<uint16_t>::max()); InternalId profile_int_id = InternalId(frontend_id & std::numeric_limits<uint16_t>::max()); - *cc_backend_id = Suggestion::BackendId(InternalIdToBackendId(cc_int_id)); - *profile_backend_id = - Suggestion::BackendId(InternalIdToBackendId(profile_int_id)); + *cc_backend_id = InternalIdToBackendId(cc_int_id); + *profile_backend_id = InternalIdToBackendId(profile_int_id); } Suggestion AutofillSuggestionGenerator::CreateCreditCardSuggestion( @@ -499,30 +498,28 @@ } InternalId AutofillSuggestionGenerator::BackendIdToInternalId( - const Suggestion::BackendId& backend_id) const { - if (!base::IsValidGUID(backend_id.value())) - return InternalId(0); + const Suggestion::BackendId& backend_id) { + if (!base::IsValidGUID(*backend_id)) + return InternalId(); - const auto found = backend_to_int_map_.find(backend_id.value()); - if (found == backend_to_int_map_.end()) { - // Unknown one, make a new entry. - InternalId int_id = InternalId(backend_to_int_map_.size() + 1); - backend_to_int_map_[backend_id.value()] = int_id; - int_to_backend_map_[int_id] = backend_id.value(); - return int_id; + InternalId& internal_id = backend_to_internal_map_[backend_id]; + if (!internal_id) { + internal_id = InternalId(backend_to_internal_map_.size()); + internal_to_backend_map_[internal_id] = backend_id; } - return InternalId(found->second); + DCHECK_EQ(internal_to_backend_map_.size(), backend_to_internal_map_.size()); + return internal_id; } -std::string AutofillSuggestionGenerator::InternalIdToBackendId( - InternalId int_id) const { - if (int_id.value() == 0) - return std::string(); +Suggestion::BackendId AutofillSuggestionGenerator::InternalIdToBackendId( + InternalId internal_id) { + if (!internal_id) + return Suggestion::BackendId(); - const auto found = int_to_backend_map_.find(int_id); - if (found == int_to_backend_map_.end()) { + const auto found = internal_to_backend_map_.find(internal_id); + if (found == internal_to_backend_map_.end()) { NOTREACHED(); - return std::string(); + return Suggestion::BackendId(); } return found->second; }
diff --git a/components/autofill/core/browser/autofill_suggestion_generator.h b/components/autofill/core/browser/autofill_suggestion_generator.h index 914f689..efce6d694 100644 --- a/components/autofill/core/browser/autofill_suggestion_generator.h +++ b/components/autofill/core/browser/autofill_suggestion_generator.h
@@ -11,7 +11,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" -#include "base/types/strong_alias.h" +#include "base/types/id_type.h" #include "components/autofill/core/browser/ui/suggestion.h" namespace base { @@ -30,7 +30,7 @@ class IBAN; class PersonalDataManager; -using InternalId = base::StrongAlias<class InternalIdTag, int>; +using InternalId = base::IdType32<class InternalIdTag>; // Helper class to generate Autofill suggestions, such as for credit card and // address profile Autofill. @@ -84,13 +84,15 @@ // Methods for packing and unpacking credit card and profile IDs for sending // and receiving to and from the renderer process. int MakeFrontendId(const Suggestion::BackendId& cc_backend_id, - const Suggestion::BackendId& profile_backend_id) const; + const Suggestion::BackendId& profile_backend_id); void SplitFrontendId(int frontend_id, Suggestion::BackendId* cc_backend_id, - Suggestion::BackendId* profile_backend_id) const; + Suggestion::BackendId* profile_backend_id); private: FRIEND_TEST_ALL_PREFIXES(AutofillSuggestionGeneratorTest, + BackendIdAndInternalIdMappings); + FRIEND_TEST_ALL_PREFIXES(AutofillSuggestionGeneratorTest, CreateCreditCardSuggestion_LocalCard); FRIEND_TEST_ALL_PREFIXES(AutofillSuggestionGeneratorTest, CreateCreditCardSuggestion_ServerCard); @@ -133,12 +135,11 @@ const CreditCard* GetServerCardForLocalCard( const CreditCard* local_card) const; - // Maps suggestion backend ID to and from an integer identifying it. Two of - // these intermediate integers are packed by MakeFrontendID to make the IDs - // that this class generates for the UI and for IPC. - InternalId BackendIdToInternalId( - const Suggestion::BackendId& backend_id) const; - std::string InternalIdToBackendId(InternalId int_id) const; + // Maps suggestion backend ID to and from an internal ID identifying it. Two + // of these intermediate internal IDs are packed by MakeFrontendID to make the + // IDs that this class generates for the UI and for IPC. + InternalId BackendIdToInternalId(const Suggestion::BackendId& backend_id); + Suggestion::BackendId InternalIdToBackendId(InternalId internal_id); // autofill_client_ and the generator are both one per tab, and have the same // lifecycle. @@ -147,11 +148,12 @@ // personal_data_ should outlive the generator. raw_ptr<PersonalDataManager> personal_data_; - // Suggestion backend ID to ID mapping. We keep two maps to convert back and - // forth. These should be used only by BackendIDToInt and IntToBackendID. - // Note that the integers are not frontend IDs. - mutable std::map<std::string, InternalId> backend_to_int_map_; - mutable std::map<InternalId, std::string> int_to_backend_map_; + // Suggestion backend ID to internal ID mapping. We keep two maps to convert + // back and forth. These should be used only by BackendIdToInternalId and + // InternalIdToBackendId. + // Note that the internal IDs are not frontend IDs. + std::map<Suggestion::BackendId, InternalId> backend_to_internal_map_; + std::map<InternalId, Suggestion::BackendId> internal_to_backend_map_; }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_suggestion_generator_unittest.cc b/components/autofill/core/browser/autofill_suggestion_generator_unittest.cc index 67d0382..11ddd3f 100644 --- a/components/autofill/core/browser/autofill_suggestion_generator_unittest.cc +++ b/components/autofill/core/browser/autofill_suggestion_generator_unittest.cc
@@ -7,6 +7,7 @@ #include "base/guid.h" #include "base/rand_util.h" #include "base/strings/strcat.h" +#include "base/strings/string_number_conversions.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" @@ -18,6 +19,7 @@ #include "components/autofill/core/browser/form_structure_test_api.h" #include "components/autofill/core/browser/test_autofill_client.h" #include "components/autofill/core/browser/test_personal_data_manager.h" +#include "components/autofill/core/browser/ui/suggestion.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" #include "components/autofill/core/common/autofill_clock.h" #include "components/autofill/core/common/autofill_payments_features.h" @@ -730,4 +732,59 @@ POPUP_ITEM_ID_MERCHANT_PROMO_CODE_ENTRY); } +TEST_F(AutofillSuggestionGeneratorTest, BackendIdAndInternalIdMappings) { + // Test that internal ID retrieval with an invalid backend ID works correctly. + Suggestion::BackendId backend_id = Suggestion::BackendId(); + EXPECT_FALSE(suggestion_generator()->BackendIdToInternalId(backend_id)); + + // Test that internal ID retrieval with valid backend IDs works correctly. + std::string valid_guid_digits = "00000000-0000-0000-0000-000000000000"; + for (int i = 1; i <= 2; i++) { + valid_guid_digits.back() = base::NumberToString(i)[0]; + backend_id = Suggestion::BackendId(valid_guid_digits); + + // Check that querying AutofillSuggestionGenerator::BackendIdToInternalId(~) + // with a new backend id creates a new entry in the + // |backend_to_internal_map_| and |internal_to_backend_map_| maps. + const InternalId& internal_id = + suggestion_generator()->BackendIdToInternalId(backend_id); + EXPECT_TRUE(internal_id); + EXPECT_EQ(static_cast<int>( + suggestion_generator()->backend_to_internal_map_.size()), + i); + EXPECT_EQ(static_cast<int>( + suggestion_generator()->internal_to_backend_map_.size()), + i); + + // Check that querying AutofillSuggestionGenerator::BackendIdToInternalId(~) + // again returns the previously added entry, and does not create a new entry + // in the |backend_to_internal_map_| and |internal_to_backend_map_| maps. + EXPECT_TRUE(suggestion_generator()->BackendIdToInternalId(backend_id) == + internal_id); + EXPECT_EQ(static_cast<int>( + suggestion_generator()->backend_to_internal_map_.size()), + i); + EXPECT_EQ(static_cast<int>( + suggestion_generator()->internal_to_backend_map_.size()), + i); + } + + // The test cases below are run after the + // AutofillSuggestionGenerator::BackendIdToInternalId(~) test cases to ensure + // the maps |backend_to_internal_map_| and |internal_to_backend_map_| are + // populated. + + // Test that backend ID retrieval with an invalid internal ID works correctly. + EXPECT_TRUE( + suggestion_generator()->InternalIdToBackendId(InternalId())->empty()); + + // Test that backend ID retrieval with valid internal IDs works correctly. + for (int i = 1; i <= 2; i++) { + backend_id = suggestion_generator()->InternalIdToBackendId(InternalId(i)); + EXPECT_FALSE(backend_id->empty()); + valid_guid_digits.back() = base::NumberToString(i)[0]; + EXPECT_EQ(*backend_id, valid_guid_digits); + } +} + } // namespace autofill
diff --git a/components/autofill/core/browser/metrics/autofill_metrics.cc b/components/autofill/core/browser/metrics/autofill_metrics.cc index d77e28d..a7ae69b6 100644 --- a/components/autofill/core/browser/metrics/autofill_metrics.cc +++ b/components/autofill/core/browser/metrics/autofill_metrics.cc
@@ -1126,30 +1126,6 @@ } // static -void AutofillMetrics::LogVirtualCardManualFallbackBubbleShown(bool is_reshow) { - base::UmaHistogramBoolean("Autofill.VirtualCardManualFallbackBubble.Shown", - is_reshow); -} - -// static -void AutofillMetrics::LogVirtualCardManualFallbackBubbleResultMetric( - VirtualCardManualFallbackBubbleResultMetric metric, - bool is_reshow) { - static const char first_show[] = - "Autofill.VirtualCardManualFallbackBubble.Result.FirstShow"; - static const char reshows[] = - "Autofill.VirtualCardManualFallbackBubble.Result.Reshows"; - base::UmaHistogramEnumeration(is_reshow ? reshows : first_show, metric); -} - -// static -void AutofillMetrics::LogVirtualCardManualFallbackBubbleFieldClicked( - VirtualCardManualFallbackBubbleFieldClickedMetric metric) { - base::UmaHistogramEnumeration( - "Autofill.VirtualCardManualFallbackBubble.FieldClicked", metric); -} - -// static void AutofillMetrics::LogSaveCardWithFirstAndLastNameOffered(bool is_local) { std::string histogram_name = "Autofill.SaveCardWithFirstAndLastNameOffered."; histogram_name += is_local ? "Local" : "Server";
diff --git a/components/autofill/core/browser/metrics/autofill_metrics.h b/components/autofill/core/browser/metrics/autofill_metrics.h index 891ea1e..1c94587 100644 --- a/components/autofill/core/browser/metrics/autofill_metrics.h +++ b/components/autofill/core/browser/metrics/autofill_metrics.h
@@ -329,37 +329,6 @@ NUM_CREDIT_CARD_UPLOAD_FEEDBACK_METRICS, }; - // Metrics to measure user interaction with the virtual card manual fallback - // bubble after it has appeared upon unmasking and filling a virtual card. - enum class VirtualCardManualFallbackBubbleResultMetric { - // These values are persisted to logs. Entries should not be renumbered and - // numeric values should never be reused. - - // The reason why the bubble is closed is not clear. Possible reason is the - // logging function is invoked before the closed reason is correctly set. - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_RESULT_UNKNOWN = 0, - // The user explicitly closed the bubble with the close button or ESC. - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_CLOSED = 1, - // The user did not interact with the bubble. - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_NOT_INTERACTED = 2, - // Deprecated: VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_LOST_FOCUS = 3, - kMaxValue = VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_NOT_INTERACTED, - }; - - // Metric to measure which field in the virtual card manual fallback bubble - // was selected by the user. - enum class VirtualCardManualFallbackBubbleFieldClickedMetric { - // These values are persisted to logs. Entries should not be renumbered and - // numeric values should never be reused. - - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CARD_NUMBER = 0, - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_EXPIRATION_MONTH = 1, - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_EXPIRATION_YEAR = 2, - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CARDHOLDER_NAME = 3, - VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CVC = 4, - kMaxValue = VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_FIELD_CLICKED_CVC, - }; - // Metrics measuring how well we predict field types. These metric values are // logged for each field in a submitted form for: // - the heuristic prediction @@ -1299,12 +1268,6 @@ AutofillProgressDialogType autofill_progress_dialog_type); static void LogProgressDialogShown( AutofillProgressDialogType autofill_progress_dialog_type); - static void LogVirtualCardManualFallbackBubbleShown(bool is_reshow); - static void LogVirtualCardManualFallbackBubbleResultMetric( - VirtualCardManualFallbackBubbleResultMetric metric, - bool is_reshow); - static void LogVirtualCardManualFallbackBubbleFieldClicked( - VirtualCardManualFallbackBubbleFieldClickedMetric metric); // Should be called when credit card scan is finished. |duration| should be // the time elapsed between launching the credit card scanner and getting back
diff --git a/components/autofill/core/browser/metrics/payments/virtual_card_manual_fallback_bubble_metrics.cc b/components/autofill/core/browser/metrics/payments/virtual_card_manual_fallback_bubble_metrics.cc new file mode 100644 index 0000000..06e09e0 --- /dev/null +++ b/components/autofill/core/browser/metrics/payments/virtual_card_manual_fallback_bubble_metrics.cc
@@ -0,0 +1,33 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/autofill/core/browser/metrics/payments/virtual_card_manual_fallback_bubble_metrics.h" + +#include "base/metrics/histogram_functions.h" +#include "base/metrics/histogram_macros.h" + +namespace autofill::autofill_metrics { + +void LogVirtualCardManualFallbackBubbleShown(bool is_reshow) { + base::UmaHistogramBoolean("Autofill.VirtualCardManualFallbackBubble.Shown", + is_reshow); +} + +void LogVirtualCardManualFallbackBubbleResultMetric( + VirtualCardManualFallbackBubbleResult metric, + bool is_reshow) { + static const char first_show[] = + "Autofill.VirtualCardManualFallbackBubble.Result.FirstShow"; + static const char reshows[] = + "Autofill.VirtualCardManualFallbackBubble.Result.Reshows"; + base::UmaHistogramEnumeration(is_reshow ? reshows : first_show, metric); +} + +void LogVirtualCardManualFallbackBubbleFieldClicked( + VirtualCardManualFallbackBubbleFieldClicked metric) { + base::UmaHistogramEnumeration( + "Autofill.VirtualCardManualFallbackBubble.FieldClicked", metric); +} + +} // namespace autofill::autofill_metrics
diff --git a/components/autofill/core/browser/metrics/payments/virtual_card_manual_fallback_bubble_metrics.h b/components/autofill/core/browser/metrics/payments/virtual_card_manual_fallback_bubble_metrics.h new file mode 100644 index 0000000..6ea16f8 --- /dev/null +++ b/components/autofill/core/browser/metrics/payments/virtual_card_manual_fallback_bubble_metrics.h
@@ -0,0 +1,52 @@ +// Copyright 2022 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. + +#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_METRICS_PAYMENTS_VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_METRICS_H_ +#define COMPONENTS_AUTOFILL_CORE_BROWSER_METRICS_PAYMENTS_VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_METRICS_H_ + +namespace autofill::autofill_metrics { + +// Metrics to measure user interaction with the virtual card manual fallback +// bubble after it has appeared upon unmasking and filling a virtual card. +enum class VirtualCardManualFallbackBubbleResult { + // These values are persisted to logs. Entries should not be renumbered and + // numeric values should never be reused. + + // The reason why the bubble is closed is not clear. Possible reason is the + // logging function is invoked before the closed reason is correctly set. + kUnknown = 0, + // The user explicitly closed the bubble with the close button or ESC. + kClosed = 1, + // The user did not interact with the bubble. + kNotInteracted = 2, + // Deprecated: kLostFocus = 3, + kMaxValue = kNotInteracted, +}; + +// Metric to measure which field in the virtual card manual fallback bubble +// was selected by the user. +enum class VirtualCardManualFallbackBubbleFieldClicked { + // These values are persisted to logs. Entries should not be renumbered and + // numeric values should never be reused. + + kCardNumber = 0, + kExpirationMonth = 1, + kExpirationYear = 2, + kCardholderName = 3, + kCVC = 4, + kMaxValue = kCVC, +}; + +void LogVirtualCardManualFallbackBubbleShown(bool is_reshow); + +void LogVirtualCardManualFallbackBubbleResultMetric( + VirtualCardManualFallbackBubbleResult metric, + bool is_reshow); + +void LogVirtualCardManualFallbackBubbleFieldClicked( + VirtualCardManualFallbackBubbleFieldClicked metric); + +} // namespace autofill::autofill_metrics + +#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_METRICS_PAYMENTS_VIRTUAL_CARD_MANUAL_FALLBACK_BUBBLE_METRICS_H_
diff --git a/components/autofill_assistant/browser/android/ui_controller_android_utils.cc b/components/autofill_assistant/browser/android/ui_controller_android_utils.cc index 398e3fa..109738a 100644 --- a/components/autofill_assistant/browser/android/ui_controller_android_utils.cc +++ b/components/autofill_assistant/browser/android/ui_controller_android_utils.cc
@@ -441,11 +441,11 @@ if (jdatetimes) { auto* mutable_dates = proto.mutable_dates(); for (int i = 0; i < Java_AssistantValue_getListSize(env, jdatetimes); ++i) { - auto jvalue = Java_AssistantValue_getListAt(env, jdatetimes, i); + auto jdatetimes_value = Java_AssistantValue_getListAt(env, jdatetimes, i); DateProto date; - date.set_year(Java_AssistantDateTime_getYear(env, jvalue)); - date.set_month(Java_AssistantDateTime_getMonth(env, jvalue)); - date.set_day(Java_AssistantDateTime_getDay(env, jvalue)); + date.set_year(Java_AssistantDateTime_getYear(env, jdatetimes_value)); + date.set_month(Java_AssistantDateTime_getMonth(env, jdatetimes_value)); + date.set_day(Java_AssistantDateTime_getDay(env, jdatetimes_value)); *mutable_dates->add_values() = date; } return proto;
diff --git a/components/bookmarks/common/bookmark_metrics.cc b/components/bookmarks/common/bookmark_metrics.cc index a792b68c..c748778 100644 --- a/components/bookmarks/common/bookmark_metrics.cc +++ b/components/bookmarks/common/bookmark_metrics.cc
@@ -35,12 +35,12 @@ } void RecordTimeToLoadAtStartup(base::TimeDelta delta) { - UmaHistogramTimes("Bookmarks.Storage.TimeToLoadAtStartup2", delta); + UmaHistogramTimes("Bookmarks.Storage.TimeToLoadAtStartup", delta); } void RecordFileSizeAtStartup(int64_t total_bytes) { int total_size_kb = base::saturated_cast<int>(total_bytes / kBytesPerKB); - base::UmaHistogramCounts1M("Bookmarks.Storage.FileSizeAtStartup2", + base::UmaHistogramCounts1M("Bookmarks.Storage.FileSizeAtStartup", total_size_kb); } @@ -52,45 +52,45 @@ stats.duplicate_url_and_title_bookmark_count); base::UmaHistogramCounts100000( - "Bookmarks.Count.OnProfileLoad3", + "Bookmarks.Count.OnProfileLoad", base::saturated_cast<int>(stats.total_url_bookmark_count)); if (stats.duplicate_url_bookmark_count != 0) { base::UmaHistogramCounts100000( - "Bookmarks.Count.OnProfileLoad.DuplicateUrl3", + "Bookmarks.Count.OnProfileLoad.DuplicateUrl2", base::saturated_cast<int>(stats.duplicate_url_bookmark_count)); } if (stats.duplicate_url_and_title_bookmark_count != 0) { base::UmaHistogramCounts100000( - "Bookmarks.Count.OnProfileLoad.DuplicateUrlAndTitle3", + "Bookmarks.Count.OnProfileLoad.DuplicateUrlAndTitle", base::saturated_cast<int>( stats.duplicate_url_and_title_bookmark_count)); } if (stats.duplicate_url_and_title_and_parent_bookmark_count != 0) { base::UmaHistogramCounts100000( - "Bookmarks.Count.OnProfileLoad.DuplicateUrlAndTitleAndParent3", + "Bookmarks.Count.OnProfileLoad.DuplicateUrlAndTitleAndParent", base::saturated_cast<int>( stats.duplicate_url_and_title_and_parent_bookmark_count)); } // Log derived metrics for convenience. base::UmaHistogramCounts100000( - "Bookmarks.Count.OnProfileLoad.UniqueUrl3", + "Bookmarks.Count.OnProfileLoad.UniqueUrl", base::saturated_cast<int>(stats.total_url_bookmark_count - stats.duplicate_url_bookmark_count)); base::UmaHistogramCounts100000( - "Bookmarks.Count.OnProfileLoad.UniqueUrlAndTitle3", + "Bookmarks.Count.OnProfileLoad.UniqueUrlAndTitle", base::saturated_cast<int>(stats.total_url_bookmark_count - stats.duplicate_url_and_title_bookmark_count)); base::UmaHistogramCounts100000( - "Bookmarks.Count.OnProfileLoad.UniqueUrlAndTitleAndParent3", + "Bookmarks.Count.OnProfileLoad.UniqueUrlAndTitleAndParent", base::saturated_cast<int>( stats.total_url_bookmark_count - stats.duplicate_url_and_title_and_parent_bookmark_count)); base::UmaHistogramCounts1000( - "Bookmarks.Times.OnProfileLoad.TimeSinceAdded3", + "Bookmarks.Times.OnProfileLoad.TimeSinceAdded", base::saturated_cast<int>(stats.avg_num_days_since_added)); } @@ -98,4 +98,4 @@ base::UmaHistogramCounts100("Bookmarks.Clone.NumCloned", num_cloned); } -} // namespace bookmarks::metrics +} // namespace bookmarks::metrics \ No newline at end of file
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn index 047860d3..58e5b31 100644 --- a/components/cronet/android/BUILD.gn +++ b/components/cronet/android/BUILD.gn
@@ -691,8 +691,10 @@ "*/multidex/*.class", "*/process_launcher/*.class", "*/SysUtils*.class", + "org/chromium/base/BaseFeature*.class", "org/chromium/base/Feature*.class", "org/chromium/base/jank_tracker/*.class", + "org/chromium/base/memory/MemoryPurgeManager*.class", "org/chromium/base/memory/MemoryPressureMonitor*.class", ]
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc index 1a6bbee..9d5265c 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -89,7 +89,6 @@ if (disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB || disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB || disposition == WindowOpenDisposition::OFF_THE_RECORD) { - JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> java_gurl = url::GURLAndroid::FromNativeGURL(env, url); ScopedJavaLocalRef<jstring> extra_headers =
diff --git a/components/handoff/handoff_manager.mm b/components/handoff/handoff_manager.mm index e90c66a..1c3d46b5 100644 --- a/components/handoff/handoff_manager.mm +++ b/components/handoff/handoff_manager.mm
@@ -5,7 +5,6 @@ #include "components/handoff/handoff_manager.h" #include "base/check.h" -#include "base/mac/objc_release_properties.h" #include "base/mac/scoped_nsobject.h" #include "base/notreached.h" #include "base/strings/sys_string_conversions.h" @@ -65,7 +64,7 @@ } - (void)dealloc { - base::mac::ReleaseProperties(self); + [_userActivity release]; [super dealloc]; }
diff --git a/components/lens/lens_features.cc b/components/lens/lens_features.cc index 27fab61c..1704156a 100644 --- a/components/lens/lens_features.cc +++ b/components/lens/lens_features.cc
@@ -49,6 +49,9 @@ constexpr base::FeatureParam<std::string> kHomepageURLForLens{ &kLensStandalone, "lens-homepage-url", "https://lens.google.com/"}; +constexpr base::FeatureParam<bool> kEnableLensHtmlRedirectFix{ + &kLensStandalone, "lens-html-redirect-fix", true}; + constexpr base::FeatureParam<int> kMaxPixelsForRegionSearch{ &kLensImageCompression, "region-search-dimensions-max-pixels", 1000}; @@ -122,6 +125,10 @@ return kHomepageURLForLens.Get(); } +bool GetEnableLensHtmlRedirectFix() { + return kEnableLensHtmlRedirectFix.Get(); +} + bool UseRegionSearchMenuItemAltText1() { return base::FeatureList::IsEnabled(kLensStandalone) && base::FeatureList::IsEnabled(kLensSearchOptimizations) &&
diff --git a/components/lens/lens_features.h b/components/lens/lens_features.h index 170fa29c..f42563c 100644 --- a/components/lens/lens_features.h +++ b/components/lens/lens_features.h
@@ -62,6 +62,9 @@ // Enables the side panel for Lens features on Chrome where supported. extern const base::FeatureParam<bool> kEnableSidePanelForLens; +// Enable Lens HTML redirect fix. +extern const base::FeatureParam<bool> kEnableLensHtmlRedirectFix; + // Enables footer for the unified side panel extern const base::Feature kLensUnifiedSidePanelFooter; @@ -108,6 +111,9 @@ // The URL for the Lens home page. extern std::string GetHomepageURLForLens(); +// Returns whether to apply fix for HTML redirects. +extern bool GetEnableLensHtmlRedirectFix(); + // Returns whether Lens fullscreen search is enabled. extern bool IsLensFullscreenSearchEnabled();
diff --git a/components/mirroring/service/BUILD.gn b/components/mirroring/service/BUILD.gn index d6c24e10..0453df2 100644 --- a/components/mirroring/service/BUILD.gn +++ b/components/mirroring/service/BUILD.gn
@@ -61,6 +61,7 @@ "//media/mojo/common:common", "//media/mojo/mojom", "//media/mojo/mojom:remoting", + "//media/remoting:remoting_device_capability", "//mojo/public/cpp/bindings", "//mojo/public/cpp/system", "//net",
diff --git a/components/mirroring/service/session.cc b/components/mirroring/service/session.cc index f954671..c6cccfb 100644 --- a/components/mirroring/service/session.cc +++ b/components/mirroring/service/session.cc
@@ -45,6 +45,7 @@ #include "media/cast/sender/video_sender.h" #include "media/gpu/gpu_video_accelerator_util.h" #include "media/mojo/clients/mojo_video_encode_accelerator.h" +#include "media/remoting/device_capability_checker.h" #include "media/video/video_encode_accelerator.h" #include "mojo/public/cpp/system/platform_handle.h" #include "net/base/ip_endpoint.h" @@ -290,13 +291,10 @@ return false; } - // This is a workaround for Nest Hub devices, which do not support remoting. - // TODO(crbug.com/1198616): filtering hack should be removed. See - // issuetracker.google.com/135725157 for more information. - return base::StartsWith(receiver_model_name, "Chromecast", - base::CompareCase::SENSITIVE) || - base::StartsWith(receiver_model_name, "Eureka Dongle", - base::CompareCase::SENSITIVE); + // This is a workaround to only query capabilities to Chromecast devices. + // TODO(crbug.com/1198616): filtering hack should be removed. See b/135725157 + // for more information. + return media::remoting::IsChromecast(receiver_model_name); } } // namespace
diff --git a/components/omnibox/browser/autocomplete_match_android.cc b/components/omnibox/browser/autocomplete_match_android.cc index 7f61d9234..123a9c8 100644 --- a/components/omnibox/browser/autocomplete_match_android.cc +++ b/components/omnibox/browser/autocomplete_match_android.cc
@@ -39,9 +39,9 @@ std::vector<int> contents_class_offsets; std::vector<int> contents_class_styles; - for (auto contents_class : contents_class) { - contents_class_offsets.push_back(contents_class.offset); - contents_class_styles.push_back(contents_class.style); + for (auto contents_class_item : contents_class) { + contents_class_offsets.push_back(contents_class_item.offset); + contents_class_styles.push_back(contents_class_item.style); } std::vector<int> description_class_offsets;
diff --git a/components/policy/core/common/android/policy_converter.cc b/components/policy/core/common/android/policy_converter.cc index 42ed096..32cb9a7 100644 --- a/components/policy/core/common/android/policy_converter.cc +++ b/components/policy/core/common/android/policy_converter.cc
@@ -113,7 +113,6 @@ return base::Value(); case base::Value::Type::BOOLEAN: { - std::string string_value; if (value.is_string()) { const std::string& string_value = value.GetString(); if (string_value.compare("true") == 0)
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 4eaa379..df2ecc62 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -32219,10 +32219,10 @@ 'items': { 'type': 'object', 'properties': { - 'owner': { + 'primary': { 'type': 'string' }, - 'members': { + 'associatedSites': { 'type': 'array', 'items': { 'type': 'string' @@ -32245,8 +32245,8 @@ } }, 'required': [ - 'owner', - 'members' + 'primary', + 'associatedSites' ] } }, @@ -32255,10 +32255,10 @@ 'items': { 'type': 'object', 'properties': { - 'owner': { + 'primary': { 'type': 'string' }, - 'members': { + 'associatedSites': { 'type': 'array', 'items': { 'type': 'string' @@ -32281,8 +32281,8 @@ } }, 'required': [ - 'owner', - 'members' + 'primary', + 'associatedSites' ] } } @@ -32292,32 +32292,32 @@ 'example_value': { 'replacements': [ { - "owner": "https://owner1.test", - "members": [ - "https://member1.test" + "primary": "https://primary1.test", + "associatedSites": [ + "https://associate1.test" ], "serviceSites": [ - "https://owner1-content.test" + "https://associate1-content.test" ], "ccTLDs": { - "https://owner1.test": [ - "https://owner1.co.uk" + "https://associate1.test": [ + "https://associate1.co.uk" ] } } ], 'additions': [ { - "owner": "https://owner2.test", - "members": [ - "https://member2.test" + "primary": "https://primary2.test", + "associatedSites": [ + "https://associate2.test" ], "serviceSites": [ - "https://owner2-content.test" + "https://associate2-content.test" ], "ccTLDs": { - "https://member2.test": [ - "https://member2.com" + "https://associate2.test": [ + "https://associate2.com" ] } }
diff --git a/components/reporting/util/test_support_callbacks.h b/components/reporting/util/test_support_callbacks.h index 9173c05..ed6eac7 100644 --- a/components/reporting/util/test_support_callbacks.h +++ b/components/reporting/util/test_support_callbacks.h
@@ -13,9 +13,9 @@ #include "base/callback_forward.h" #include "base/callback_helpers.h" #include "base/logging.h" +#include "base/memory/weak_ptr.h" #include "base/task/bind_post_task.h" #include "base/task/sequenced_task_runner.h" -#include "base/test/repeating_test_future.h" #include "base/test/test_future.h" #include "base/thread_annotations.h" #include "base/threading/sequenced_task_runner_handle.h" @@ -36,7 +36,7 @@ // ... = e.result(); // template <typename ResType> -class TestEvent : base::test::RepeatingTestFuture<ResType> { +class TestEvent : base::test::TestFuture<ResType> { public: TestEvent() = default; ~TestEvent() = default; @@ -46,32 +46,44 @@ template <std::enable_if_t<std::is_move_constructible<ResType>::value, bool> = false> [[nodiscard]] const ResType& ref_result() { - auto res = base::test::RepeatingTestFuture<ResType>::Get(); - EXPECT_TRUE(base::test::RepeatingTestFuture<ResType>::IsEmpty()) - << "Event callback invoked more than once"; - return res; + return std::forward<ResType>(base::test::TestFuture<ResType>::Get()); } template < std::enable_if_t<std::is_move_constructible<ResType>::value, bool> = true> [[nodiscard]] ResType result() { - auto res = - std::forward<ResType>(base::test::RepeatingTestFuture<ResType>::Take()); - EXPECT_TRUE(base::test::RepeatingTestFuture<ResType>::IsEmpty()) - << "Event callback invoked more than once"; - return res; + return std::forward<ResType>(base::test::TestFuture<ResType>::Take()); } - // Repeating callback to hand over to the processing method. + // Returns true if the event callback was never invoked. + [[nodiscard]] bool no_result() const { + return !base::test::TestFuture<ResType>::IsReady(); + } + + // Completion callback to hand over to the processing method. + [[nodiscard]] base::OnceCallback<void(ResType res)> cb() { + return base::BindPostTask(base::SequencedTaskRunnerHandle::Get(), + base::test::TestFuture<ResType>::GetCallback()); + } + + // Repeating completion callback to hand over to the processing method. // Even though it is repeating, it can be only called once, since - // it quits run_loop; repeating declaration is only needed for cases - // when the caller requires it. - // If the caller expects OnceCallback, result will be converted automatically. - base::RepeatingCallback<void(ResType res)> cb() { + // `result` only waits for one value; repeating declaration is only needed + // for cases when the caller requires it. + [[nodiscard]] base::RepeatingCallback<void(ResType res)> repeating_cb() { return base::BindPostTask( base::SequencedTaskRunnerHandle::Get(), - base::test::RepeatingTestFuture<ResType>::GetCallback()); + base::BindRepeating( + [](base::WeakPtr<TestEvent<ResType>> self, ResType res) { + if (self) { + std::move(self->GetCallback()).Run(res); + } + }, + weak_ptr_factory_.GetWeakPtr())); } + + private: + base::WeakPtrFactory<TestEvent<ResType>> weak_ptr_factory_{this}; }; // Usage (in tests only): @@ -86,7 +98,7 @@ // std::tie(res1, res2, ...) = e.result(); // template <typename... ResType> -class TestMultiEvent : base::test::RepeatingTestFuture<ResType...> { +class TestMultiEvent : base::test::TestFuture<ResType...> { public: TestMultiEvent() = default; ~TestMultiEvent() = default; @@ -97,30 +109,48 @@ std::is_move_constructible<std::tuple<ResType...>>::value, bool> = false> [[nodiscard]] const std::tuple<ResType...>& ref_result() { - auto res = std::forward<std::tuple<ResType...>>( - base::test::RepeatingTestFuture<ResType...>::Get()); - EXPECT_TRUE(base::test::RepeatingTestFuture<ResType...>::IsEmpty()) - << "Event callback invoked more than once"; - return res; + return std::forward<std::tuple<ResType...>>( + base::test::TestFuture<ResType...>::Get()); } template <std::enable_if_t< std::is_move_constructible<std::tuple<ResType...>>::value, bool> = true> [[nodiscard]] std::tuple<ResType...> result() { - auto res = std::forward<std::tuple<ResType...>>( - base::test::RepeatingTestFuture<ResType...>::Take()); - EXPECT_TRUE(base::test::RepeatingTestFuture<ResType...>::IsEmpty()) - << "Event callback invoked more than once"; - return res; + return std::forward<std::tuple<ResType...>>( + base::test::TestFuture<ResType...>::Take()); + } + + // Returns true if the event callback was never invoked. + [[nodiscard]] bool no_result() const { + return !base::test::TestFuture<ResType...>::IsReady(); } // Completion callback to hand over to the processing method. - [[nodiscard]] base::RepeatingCallback<void(ResType... res)> cb() { + [[nodiscard]] base::OnceCallback<void(ResType... res)> cb() { return base::BindPostTask( base::SequencedTaskRunnerHandle::Get(), - base::test::RepeatingTestFuture<ResType...>::GetCallback()); + base::test::TestFuture<ResType...>::GetCallback()); } + + // Repeating completion callback to hand over to the processing method. + // Even though it is repeating, it can be only called once, since + // `result` only waits for one value; repeating declaration is only needed + // for cases when the caller requires it. + [[nodiscard]] base::RepeatingCallback<void(ResType... res)> repeating_cb() { + return base::BindPostTask( + base::SequencedTaskRunnerHandle::Get(), + base::BindRepeating( + [](base::WeakPtr<TestMultiEvent<ResType...>> self, ResType... res) { + if (self) { + std::move(self->GetCallback()).Run(res...); + } + }, + weak_ptr_factory_.GetWeakPtr())); + } + + private: + base::WeakPtrFactory<TestMultiEvent<ResType...>> weak_ptr_factory_{this}; }; // Usage (in tests only):
diff --git a/components/safe_browsing/core/common/features.cc b/components/safe_browsing/core/common/features.cc index a525667..db3703a 100644 --- a/components/safe_browsing/core/common/features.cc +++ b/components/safe_browsing/core/common/features.cc
@@ -31,14 +31,8 @@ "SafeBrowsingBetterTelemetryAcrossReports", base::FEATURE_ENABLED_BY_DEFAULT}; -// Enable only for Android -#if BUILDFLAG(IS_ANDROID) const base::Feature kClientSideDetectionModelIsFlatBuffer{ "ClientSideDetectionModelIsFlatBuffer", base::FEATURE_ENABLED_BY_DEFAULT}; -#else -const base::Feature kClientSideDetectionModelIsFlatBuffer{ - "ClientSideDetectionModelIsFlatBuffer", base::FEATURE_DISABLED_BY_DEFAULT}; -#endif extern const base::Feature kClientSideDetectionModelTag{ "ClientSideDetectionTag", base::FEATURE_DISABLED_BY_DEFAULT}; @@ -251,7 +245,7 @@ #if BUILDFLAG(IS_ANDROID) return "android_1"; #else - return "desktop_1"; + return "desktop_1_flatbuffer"; #endif }
diff --git a/components/safe_browsing/core/common/features_unittest.cc b/components/safe_browsing/core/common/features_unittest.cc index e54cc1ac..4da628b 100644 --- a/components/safe_browsing/core/common/features_unittest.cc +++ b/components/safe_browsing/core/common/features_unittest.cc
@@ -15,7 +15,7 @@ #if BUILDFLAG(IS_ANDROID) EXPECT_EQ(GetClientSideDetectionTag(), "android_1"); #else - EXPECT_EQ(GetClientSideDetectionTag(), "desktop_1"); + EXPECT_EQ(GetClientSideDetectionTag(), "desktop_1_flatbuffer"); #endif }
diff --git a/components/spellcheck/browser/spellchecker_session_bridge_android.cc b/components/spellcheck/browser/spellchecker_session_bridge_android.cc index e000a044..2e17d0fe 100644 --- a/components/spellcheck/browser/spellchecker_session_bridge_android.cc +++ b/components/spellcheck/browser/spellchecker_session_bridge_android.cc
@@ -100,7 +100,6 @@ active_request_ = std::move(pending_request_); if (active_request_) { - JNIEnv* env = base::android::AttachCurrentThread(); Java_SpellCheckerSessionBridge_requestTextCheck( env, java_object_, base::android::ConvertUTF16ToJavaString(env, active_request_->text_));
diff --git a/components/user_education/common/help_bubble_params.h b/components/user_education/common/help_bubble_params.h index 9b2325a..f7e03a9c 100644 --- a/components/user_education/common/help_bubble_params.h +++ b/components/user_education/common/help_bubble_params.h
@@ -18,10 +18,6 @@ namespace user_education { -// The amount of time the promo should stay onscreen. -constexpr base::TimeDelta kDefaultTimeoutWithoutButtons = base::Seconds(10); -constexpr base::TimeDelta kDefaultTimeoutWithButtons = base::Seconds(0); - // Mirrors most values of views::BubbleBorder::Arrow. // All values except kNone show a visible arrow between the bubble and the // anchor element.
diff --git a/components/user_education/views/help_bubble_view.cc b/components/user_education/views/help_bubble_view.cc index e995815..a45cfe6c 100644 --- a/components/user_education/views/help_bubble_view.cc +++ b/components/user_education/views/help_bubble_view.cc
@@ -68,6 +68,10 @@ namespace { +// The amount of time the promo should stay onscreen. +constexpr base::TimeDelta kDefaultTimeoutWithoutButtons = base::Seconds(10); +constexpr base::TimeDelta kDefaultTimeoutWithButtons = base::Seconds(0); + // Maximum width of the bubble. Longer strings will cause wrapping. constexpr int kBubbleMaxWidthDip = 340;
diff --git a/components/user_education/webui/help_bubble_handler.cc b/components/user_education/webui/help_bubble_handler.cc index 64a68fc..0510828 100644 --- a/components/user_education/webui/help_bubble_handler.cc +++ b/components/user_education/webui/help_bubble_handler.cc
@@ -143,12 +143,6 @@ mojom_params->close_button_alt_text = base::UTF16ToUTF8(data.params->close_button_alt_text); mojom_params->force_close_button = data.params->force_close_button; - auto timeout = data.params->timeout.value_or( - data.params->buttons.empty() ? kDefaultTimeoutWithoutButtons - : kDefaultTimeoutWithButtons); - if (!timeout.is_zero()) { - mojom_params->timeout = timeout; - } mojom_params->position = HelpBubbleArrowToPosition(data.params->arrow); if (data.params->progress) { mojom_params->progress = help_bubble::mojom::Progress::New(); @@ -201,9 +195,7 @@ // has additional code which executes after it. If that changes, the weak // pointer can be moved closer to the top of this method. auto weak_ptr = weak_ptr_factory_.GetWeakPtr(); - HelpBubbleClosed( - identifier_name, - help_bubble::mojom::HelpBubbleClosedReason::kPageChanged); + HelpBubbleClosed(identifier_name, false); if (!weak_ptr) return; } @@ -252,9 +244,8 @@ data->closing = false; } -void HelpBubbleHandlerBase::HelpBubbleClosed( - const std::string& identifier_name, - help_bubble::mojom::HelpBubbleClosedReason reason) { +void HelpBubbleHandlerBase::HelpBubbleClosed(const std::string& identifier_name, + bool by_user) { ElementData* const data = GetDataByName(identifier_name); if (!data) return; @@ -270,24 +261,13 @@ auto weak_ptr = weak_ptr_factory_.GetWeakPtr(); data->closing = true; - base::OnceClosure callback; - switch (reason) { - case help_bubble::mojom::HelpBubbleClosedReason::kDismissedByUser: { - callback = std::move(data->params->dismiss_callback); - break; + if (by_user) { + base::OnceClosure callback = std::move(data->params->dismiss_callback); + if (callback) { + std::move(callback).Run(); + if (!weak_ptr) + return; } - case help_bubble::mojom::HelpBubbleClosedReason::kTimedOut: { - callback = std::move(data->params->timeout_callback); - break; - } - case help_bubble::mojom::HelpBubbleClosedReason::kPageChanged: - break; - } - - if (callback) { - std::move(callback).Run(); - if (!weak_ptr) - return; } // This could also theoretically trigger callbacks.
diff --git a/components/user_education/webui/help_bubble_handler.h b/components/user_education/webui/help_bubble_handler.h index 1cc33e1..99d43a3f 100644 --- a/components/user_education/webui/help_bubble_handler.h +++ b/components/user_education/webui/help_bubble_handler.h
@@ -87,9 +87,7 @@ bool visible) final; void HelpBubbleButtonPressed(const std::string& identifier_name, uint8_t button) final; - void HelpBubbleClosed( - const std::string& identifier_name, - help_bubble::mojom::HelpBubbleClosedReason reason) final; + void HelpBubbleClosed(const std::string& identifier_name, bool by_user) final; ElementData* GetDataByName(const std::string& identifier_name, ui::ElementIdentifier* found_identifier = nullptr);
diff --git a/components/user_education/webui/help_bubble_handler_unittest.cc b/components/user_education/webui/help_bubble_handler_unittest.cc index f890e0d..0eb0ea6 100644 --- a/components/user_education/webui/help_bubble_handler_unittest.cc +++ b/components/user_education/webui/help_bubble_handler_unittest.cc
@@ -89,8 +89,6 @@ MATCHER_P(MatchesHelpBubbleParams, expected, "") { EXPECT_EQ(expected->body_text, arg->body_text); EXPECT_EQ(expected->close_button_alt_text, arg->close_button_alt_text); - EXPECT_EQ(expected->force_close_button, arg->force_close_button); - EXPECT_EQ(expected->timeout, arg->timeout); EXPECT_EQ(expected->native_identifier, arg->native_identifier); EXPECT_EQ(expected->position, arg->position); EXPECT_EQ(expected->title_text, arg->title_text); @@ -227,7 +225,6 @@ expected->close_button_alt_text = base::UTF16ToUTF8(params.close_button_alt_text); expected->position = help_bubble::mojom::HelpBubbleArrowPosition::TOP_CENTER; - expected->timeout = base::Seconds(10); EXPECT_CALL(test_handler_->mock(), ShowHelpBubble(MatchesHelpBubbleParams(expected.get()))); @@ -376,8 +373,7 @@ EXPECT_CALL_IN_SCOPE( closed, Run, handler()->HelpBubbleClosed( - kHelpBubbleHandlerTestElementIdentifier.GetName(), - help_bubble::mojom::HelpBubbleClosedReason::kPageChanged)); + kHelpBubbleHandlerTestElementIdentifier.GetName(), false)); EXPECT_FALSE(help_bubble->is_open()); } @@ -438,8 +434,7 @@ EXPECT_CALL_IN_SCOPE( dismissed, Run, handler()->HelpBubbleClosed( - kHelpBubbleHandlerTestElementIdentifier.GetName(), - help_bubble::mojom::HelpBubbleClosedReason::kDismissedByUser)); + kHelpBubbleHandlerTestElementIdentifier.GetName(), true)); EXPECT_FALSE(help_bubble->is_open()); } @@ -559,9 +554,8 @@ EXPECT_TRUE(help_bubble2->is_open()); // Close one bubble without closing the other. - handler()->HelpBubbleClosed( - kHelpBubbleHandlerTestElementIdentifier.GetName(), - help_bubble::mojom::HelpBubbleClosedReason::kPageChanged); + handler()->HelpBubbleClosed(kHelpBubbleHandlerTestElementIdentifier.GetName(), + false); EXPECT_FALSE(help_bubble->is_open()); EXPECT_TRUE(help_bubble2->is_open());
diff --git a/components/variations/client_filterable_state.h b/components/variations/client_filterable_state.h index 10da00095..838fe50c 100644 --- a/components/variations/client_filterable_state.h +++ b/components/variations/client_filterable_state.h
@@ -63,16 +63,16 @@ base::Version os_version; // The Channel for this Chrome installation. - Study::Channel channel; + Study::Channel channel = Study::UNKNOWN; // The hardware form factor that Chrome is running on. - Study::FormFactor form_factor; + Study::FormFactor form_factor = Study::DESKTOP; // The CPU architecture on which Chrome is running. - Study::CpuArchitecture cpu_architecture; + Study::CpuArchitecture cpu_architecture = Study::X86_64; // The OS on which Chrome is running. - Study::Platform platform; + Study::Platform platform = Study::PLATFORM_WINDOWS; // The named hardware configuration that Chrome is running on -- used to // identify models of devices.
diff --git a/components/viz/service/display/direct_renderer.cc b/components/viz/service/display/direct_renderer.cc index 04c22bd..589fd71 100644 --- a/components/viz/service/display/direct_renderer.cc +++ b/components/viz/service/display/direct_renderer.cc
@@ -27,13 +27,11 @@ #include "components/viz/common/quads/compositor_render_pass_draw_quad.h" #include "components/viz/common/quads/draw_quad.h" #include "components/viz/common/quads/solid_color_draw_quad.h" -#include "components/viz/common/resources/platform_color.h" #include "components/viz/common/viz_utils.h" #include "components/viz/service/display/bsp_tree.h" #include "components/viz/service/display/bsp_walk_action.h" #include "components/viz/service/display/output_surface.h" #include "components/viz/service/display/skia_output_surface.h" -#include "gpu/command_buffer/common/capabilities.h" #include "media/base/video_util.h" #include "ui/gfx/geometry/quad_f.h" #include "ui/gfx/geometry/rect_conversions.h" @@ -604,7 +602,6 @@ } void DirectRenderer::DrawRenderPass(const AggregatedRenderPass* render_pass) { - current_frame()->current_render_pass = render_pass; TRACE_EVENT0("viz", "DirectRenderer::DrawRenderPass"); if (CanSkipRenderPass(render_pass)) { skipped_render_pass_ids_.insert(render_pass->id); @@ -751,6 +748,7 @@ void DirectRenderer::UseRenderPass(const AggregatedRenderPass* render_pass) { bool is_root = render_pass == current_frame()->root_render_pass; + current_frame()->current_render_pass = render_pass; // The root render pass will be either bound to the buffer allocated by // the SkiaOutputSurface, or if the renderer allocatates images then the root // render pass buffer will be allocated in @@ -774,12 +772,8 @@ enlarge_pass_texture_amount_.height()); } - auto color_space = CurrentRenderPassColorSpace(); - auto format = GetColorSpaceResourceFormat(color_space); - - AllocateRenderPassResourceIfNeeded( - render_pass->id, - {size, render_pass->generate_mipmap, format, color_space}); + AllocateRenderPassResourceIfNeeded(render_pass->id, + {size, render_pass->generate_mipmap}); // TODO(crbug.com/582554): This change applies only when Vulkan is enabled and // it will be removed once SkiaRenderer has complete support for Vulkan. @@ -912,7 +906,7 @@ } gfx::Size DirectRenderer::CalculateTextureSizeForRenderPass( - const AggregatedRenderPass* render_pass) const { + const AggregatedRenderPass* render_pass) { // Round the size of the render pass backings to a multiple of 64 pixels. This // reduces memory fragmentation. https://crbug.com/146070. This also allows // backings to be more easily reused during a resize operation. @@ -1051,25 +1045,6 @@ current_frame()->current_render_pass->content_color_usage); } -ResourceFormat DirectRenderer::GetColorSpaceResourceFormat( - gfx::ColorSpace color_space) const { - // TODO(penghuang): check supported format correctly. - gpu::Capabilities caps; - caps.texture_format_bgra8888 = true; - -#if BUILDFLAG(IS_CHROMEOS_LACROS) - // TODO(crbug.com/1317015): add support RGBA_F16 in LaCrOS. - auto format = color_space.IsHDR() - ? RGBA_1010102 - : PlatformColor::BestSupportedTextureFormat(caps); -#else - auto format = color_space.IsHDR() - ? RGBA_F16 - : PlatformColor::BestSupportedTextureFormat(caps); -#endif - return format; -} - DelegatedInkPointRendererBase* DirectRenderer::GetDelegatedInkPointRenderer( bool create_if_necessary) { return nullptr;
diff --git a/components/viz/service/display/direct_renderer.h b/components/viz/service/display/direct_renderer.h index efa64b3..d8df093 100644 --- a/components/viz/service/display/direct_renderer.h +++ b/components/viz/service/display/direct_renderer.h
@@ -193,8 +193,6 @@ struct RenderPassRequirements { gfx::Size size; bool generate_mipmap = false; - ResourceFormat format; - gfx::ColorSpace color_space; }; static gfx::RectF QuadVertexRect(); @@ -219,7 +217,7 @@ void SetScissorTestRectInDrawSpace(const gfx::Rect& draw_space_rect); gfx::Size CalculateTextureSizeForRenderPass( - const AggregatedRenderPass* render_pass) const; + const AggregatedRenderPass* render_pass); gfx::Size CalculateSizeForOutputSurface( const gfx::Size& device_viewport_size); @@ -310,7 +308,6 @@ return CurrentRenderPassColorSpace().ToSkColorSpace( CurrentFrameSDRWhiteLevel()); } - ResourceFormat GetColorSpaceResourceFormat(gfx::ColorSpace color_space) const; const raw_ptr<const RendererSettings> settings_; // Points to the viz-global singleton.
diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc index a58b7955..f79603f 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc
@@ -3083,12 +3083,6 @@ render_passes_in_frame) { std::vector<AggregatedRenderPassId> passes_to_delete; for (const auto& pair : render_pass_backings_) { - // Buffers for root render pass backings are managed by |buffer_queue_|, not - // DisplayResourceProvider, so we should not destroy them here. - const RenderPassBacking& backing = pair.second; - if (backing.is_root) - continue; - auto render_pass_it = render_passes_in_frame.find(pair.first); if (render_pass_it == render_passes_in_frame.end()) { passes_to_delete.push_back(pair.first); @@ -3096,16 +3090,12 @@ } const RenderPassRequirements& requirements = render_pass_it->second; + const RenderPassBacking& backing = pair.second; bool size_appropriate = backing.size.width() >= requirements.size.width() && backing.size.height() >= requirements.size.height(); bool mipmap_appropriate = !requirements.generate_mipmap || backing.generate_mipmap; - bool no_change_in_format = requirements.format == backing.format; - bool no_change_in_color_space = - requirements.color_space == backing.color_space; - - if (!size_appropriate || !mipmap_appropriate || !no_change_in_format || - !no_change_in_color_space) + if (!size_appropriate || !mipmap_appropriate) passes_to_delete.push_back(pair.first); } @@ -3114,7 +3104,11 @@ for (size_t i = 0; i < passes_to_delete.size(); ++i) { auto it = render_pass_backings_.find(passes_to_delete[i]); auto& backing = it->second; - skia_output_surface_->DestroySharedImage(backing.mailbox); + // Buffers for root render pass backings are managed by |buffer_queue_|, not + // DisplayResourceProvider, so we should not destroy them here. + if (!backing.is_root) { + skia_output_surface_->DestroySharedImage(backing.mailbox); + } render_pass_backings_.erase(it); } @@ -3145,8 +3139,20 @@ } auto color_space = CurrentRenderPassColorSpace(); - auto format = GetColorSpaceResourceFormat(color_space); + // TODO(penghuang): check supported format correctly. + gpu::Capabilities caps; + caps.texture_format_bgra8888 = true; +#if BUILDFLAG(IS_CHROMEOS_LACROS) + // TODO(crbug.com/1317015): add support RGBA_F16 in LaCrOS. + auto format = color_space.IsHDR() + ? RGBA_1010102 + : PlatformColor::BestSupportedTextureFormat(caps); +#else + auto format = color_space.IsHDR() + ? RGBA_F16 + : PlatformColor::BestSupportedTextureFormat(caps); +#endif uint32_t usage = gpu::SHARED_IMAGE_USAGE_DISPLAY; if (requirements.generate_mipmap) usage |= gpu::SHARED_IMAGE_USAGE_MIPMAP;
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 85b116ad..6a447e8d 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc
@@ -951,10 +951,12 @@ // ShellBrowserMainParts initializes a ShellBrowserContext with user data // directory only in PreMainMessageLoopRun(). First-Party Sets handler needs // to access this directory, hence triggering after this stage has run. - FirstPartySetsHandlerImpl::GetInstance()->Init( - GetContentClient()->browser()->GetFirstPartySetsDirectory(), - base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - network::switches::kUseFirstPartySet)); + if (result_code_ == RESULT_CODE_NORMAL_EXIT) { + FirstPartySetsHandlerImpl::GetInstance()->Init( + GetContentClient()->browser()->GetFirstPartySetsDirectory(), + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + network::switches::kUseFirstPartySet)); + } variations::MaybeScheduleFakeCrash();
diff --git a/content/browser/find_request_manager_browsertest.cc b/content/browser/find_request_manager_browsertest.cc index 7c780f7..7976d60 100644 --- a/content/browser/find_request_manager_browsertest.cc +++ b/content/browser/find_request_manager_browsertest.cc
@@ -785,8 +785,7 @@ options->run_synchronously_for_testing = true; Find("result", options->Clone()); delegate()->WaitForFinalReply(); - FindResults results = delegate()->GetFindResults(); - EXPECT_EQ(19, results.number_of_matches); + EXPECT_EQ(19, delegate()->GetFindResults().number_of_matches); contents()->RequestFindMatchRects(-1); delegate()->WaitForMatchRects(); @@ -816,8 +815,7 @@ Find("result", options->Clone()); delegate()->WaitForFinalReply(); - FindResults results = delegate()->GetFindResults(); - EXPECT_EQ(19, results.number_of_matches); + EXPECT_EQ(19, delegate()->GetFindResults().number_of_matches); // Request the find match rects. contents()->RequestFindMatchRects(-1);
diff --git a/content/browser/first_party_sets/first_party_set_parser.cc b/content/browser/first_party_sets/first_party_set_parser.cc index d639f40..14d7a967 100644 --- a/content/browser/first_party_sets/first_party_set_parser.cc +++ b/content/browser/first_party_sets/first_party_set_parser.cc
@@ -69,8 +69,8 @@ return site; } -const char kFirstPartySetOwnerField[] = "owner"; -const char kFirstPartySetMembersField[] = "members"; +const char kFirstPartySetPrimaryField[] = "primary"; +const char kFirstPartySetAssociatedSitesField[] = "associatedSites"; const char kCCTLDsField[] = "ccTLDs"; const char kFirstPartySetPolicyReplacementsField[] = "replacements"; const char kFirstPartySetPolicyAdditionsField[] = "additions"; @@ -170,8 +170,8 @@ // Component Updater or from enterprise policy, so this does not check // assertions or versions. It rejects sets which are non-disjoint with // previously-encountered sets (i.e. sets which have non-empty intersections -// with `elements`), and singleton sets (i.e. sets must have an owner and at -// least one valid member). +// with `elements`), and singleton sets (i.e. sets must have a primary and at +// least one valid associated site). // // Uses `elements` to check disjointness of sets; augments `elements` to include // the elements of the set that was parsed. @@ -187,9 +187,9 @@ const base::Value::Dict& set_declaration = value.GetDict(); - // Confirm that the set has an owner, and the owner is a string. + // Confirm that the set has a primary, and the primary is a string. const base::Value* primary_item = - set_declaration.Find(kFirstPartySetOwnerField); + set_declaration.Find(kFirstPartySetPrimaryField); if (!primary_item) return base::unexpected(ParseError::kInvalidType); @@ -205,18 +205,19 @@ {{primary, net::FirstPartySetEntry(primary, net::SiteType::kPrimary, absl::nullopt)}}); - // Confirm that the members field is present, and is an array of strings. - const base::Value::List* maybe_members_list = - set_declaration.FindList(kFirstPartySetMembersField); - if (!maybe_members_list) + // Confirm that the associatedSites field is present, and is an array of + // strings. + const base::Value::List* maybe_associated_sites_list = + set_declaration.FindList(kFirstPartySetAssociatedSitesField); + if (!maybe_associated_sites_list) return base::unexpected(ParseError::kInvalidType); - if (maybe_members_list->empty()) + if (maybe_associated_sites_list->empty()) return base::unexpected(ParseError::kSingletonSet); - // Add each member to our mapping (after validating). + // Add each associated site to our mapping (after validating). uint32_t index = 0; - for (const auto& item : *maybe_members_list) { + for (const auto& item : *maybe_associated_sites_list) { base::expected<net::SchemefulSite, ParseError> site_or_error = ParseSiteAndValidate(item, set_entries, elements); if (!site_or_error.has_value()) { @@ -320,42 +321,43 @@ return {}; std::vector<std::pair<net::SchemefulSite, net::FirstPartySetEntry>> map; - base::flat_set<net::SchemefulSite> owner_set; - base::flat_set<net::SchemefulSite> member_set; + base::flat_set<net::SchemefulSite> primary_set; + base::flat_set<net::SchemefulSite> associated_site_set; for (const auto item : value_deserialized->DictItems()) { if (!item.second.is_string()) return {}; - const absl::optional<net::SchemefulSite> maybe_member = + const absl::optional<net::SchemefulSite> maybe_associated_site = Canonicalize(item.first, true /* emit_errors */); - const absl::optional<net::SchemefulSite> maybe_owner = + const absl::optional<net::SchemefulSite> maybe_primary = Canonicalize(item.second.GetString(), true /* emit_errors */); - if (!maybe_member.has_value() || !maybe_owner.has_value()) + if (!maybe_associated_site.has_value() || !maybe_primary.has_value()) return {}; - // Skip the owner entry here and add it later explicitly to prevent the + // Skip the primary entry here and add it later explicitly to prevent the // singleton sets. - if (*maybe_member == *maybe_owner) { + if (*maybe_associated_site == *maybe_primary) { continue; } - if (!owner_set.contains(maybe_owner)) { - map.emplace_back(*maybe_owner, net::FirstPartySetEntry( - *maybe_owner, net::SiteType::kPrimary, - absl::nullopt)); + if (!primary_set.contains(maybe_primary)) { + map.emplace_back( + *maybe_primary, + net::FirstPartySetEntry(*maybe_primary, net::SiteType::kPrimary, + absl::nullopt)); } // Check disjointness. Note that we are relying on the JSON Parser to // eliminate the possibility of a site being used as a key more than once, // so we don't have to check for that explicitly. - if (owner_set.contains(*maybe_member) || - member_set.contains(*maybe_owner)) { + if (primary_set.contains(*maybe_associated_site) || + associated_site_set.contains(*maybe_primary)) { return {}; } - owner_set.insert(*maybe_owner); - member_set.insert(*maybe_member); + primary_set.insert(*maybe_primary); + associated_site_set.insert(*maybe_associated_site); // TODO(https://crbug.com/1219656): preserve ordering information when // persisting set info. map.emplace_back( - std::move(*maybe_member), - net::FirstPartySetEntry(std::move(*maybe_owner), + std::move(*maybe_associated_site), + net::FirstPartySetEntry(std::move(*maybe_primary), net::SiteType::kAssociated, absl::nullopt)); } return map; @@ -365,10 +367,11 @@ const FirstPartySetParser::SetsMap& sets) { base::DictionaryValue dict; for (const auto& it : sets) { - std::string maybe_member = it.first.Serialize(); - std::string owner = it.second.primary().Serialize(); - if (maybe_member != owner) { - dict.SetKey(std::move(maybe_member), base::Value(std::move(owner))); + std::string maybe_associated_site = it.first.Serialize(); + std::string primary = it.second.primary().Serialize(); + if (maybe_associated_site != primary) { + dict.SetKey(std::move(maybe_associated_site), + base::Value(std::move(primary))); } } std::string dict_serialized;
diff --git a/content/browser/first_party_sets/first_party_set_parser.h b/content/browser/first_party_sets/first_party_set_parser.h index 0417808..c8cabbd 100644 --- a/content/browser/first_party_sets/first_party_set_parser.h +++ b/content/browser/first_party_sets/first_party_set_parser.h
@@ -84,8 +84,8 @@ // Returns a serialized JSON-encoded string representation of the input. This // function does not check or have any special handling for the content of // `sets`, e.g. opaque origins are just serialized as "null". - // The owner -> owner entry is removed from the serialized representation for - // brevity. + // The primary -> primary entry is removed from the serialized representation + // for brevity. static std::string SerializeFirstPartySets(const SetsMap& sets); // Parses two lists of First-Party Sets from `policy` using the "replacements"
diff --git a/content/browser/first_party_sets/first_party_set_parser_unittest.cc b/content/browser/first_party_sets/first_party_set_parser_unittest.cc index e5761ca..f5eda97 100644 --- a/content/browser/first_party_sets/first_party_set_parser_unittest.cc +++ b/content/browser/first_party_sets/first_party_set_parser_unittest.cc
@@ -51,14 +51,14 @@ TEST(FirstPartySetParser, RejectsSingletonSet) { const std::string input = - R"({"owner": "https://example.test", "members": []})"; + R"({"primary": "https://example.test", "associatedSites": []})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } TEST(FirstPartySetParser, AcceptsMinimal) { const std::string input = - R"({"owner": "https://example.test", "members": ["https://aaaa.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["https://aaaa.test"]})"; std::istringstream stream(input); EXPECT_THAT( @@ -75,41 +75,41 @@ IsEmpty())); } -TEST(FirstPartySetParser, RejectsMissingOwner) { - const std::string input = R"({"members": ["https://aaaa.test"]})"; +TEST(FirstPartySetParser, RejectsMissingPrimary) { + const std::string input = R"({"associatedSites": ["https://aaaa.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, RejectsTypeUnsafeOwner) { +TEST(FirstPartySetParser, RejectsTypeUnsafePrimary) { const std::string input = - R"({ "owner": 3, "members": ["https://aaaa.test"]})"; + R"({ "primary": 3, "associatedSites": ["https://aaaa.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, RejectsNonHTTPSOwner) { +TEST(FirstPartySetParser, RejectsNonHTTPSPrimary) { const std::string input = - R"({"owner": "http://example.test", "members": ["https://aaaa.test"]})"; + R"({"primary": "http://example.test", "associatedSites": ["https://aaaa.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, RejectsNonOriginOwner) { +TEST(FirstPartySetParser, RejectsNonOriginPrimary) { const std::string input = - R"({"owner": "example", "members": ["https://aaaa.test"]})"; + R"({"primary": "example", "associatedSites": ["https://aaaa.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, SkipsSetOnNonOriginOwner) { +TEST(FirstPartySetParser, SkipsSetOnNonOriginPrimary) { const std::string input = - R"({"owner": "example", "members": ["https://aaaa.test"]})" + R"({"primary": "example", "associatedSites": ["https://aaaa.test"]})" "\n" - R"({"owner": "https://example2.test", "members": )" - R"(["https://member2.test"]})" + R"({"primary": "https://example2.test", "associatedSites": )" + R"(["https://associatedsite2.test"]})" "\n" - R"({"owner": "https://example.test", "members": ["https://aaaa.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["https://aaaa.test"]})"; EXPECT_THAT( ParseSets(input), @@ -118,7 +118,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example2.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example2.test")), net::SiteType::kAssociated, 0)), @@ -133,49 +133,49 @@ IsEmpty())); } -TEST(FirstPartySetParser, RejectsOwnerWithoutRegisteredDomain) { - const std::string input = R"({"owner": "https://example.test..", )" - R"("members": ["https://aaaa.test"]})"; +TEST(FirstPartySetParser, RejectsPrimaryWithoutRegisteredDomain) { + const std::string input = R"({"primary": "https://example.test..", )" + R"("associatedSites": ["https://aaaa.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, RejectsMissingMembers) { - const std::string input = R"({"owner": "https://example.test" })"; +TEST(FirstPartySetParser, RejectsMissingAssociatedSites) { + const std::string input = R"({"primary": "https://example.test" })"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, RejectsTypeUnsafeMembers) { - const std::string input = R"({"owner": "https://example.test", )" - R"("members": ["https://aaaa.test", 4]})"; +TEST(FirstPartySetParser, RejectsTypeUnsafeAssociatedSites) { + const std::string input = R"({"primary": "https://example.test", )" + R"("associatedSites": ["https://aaaa.test", 4]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, RejectsNonHTTPSMember) { +TEST(FirstPartySetParser, RejectsNonHTTPSAssociatedSite) { const std::string input = - R"({"owner": "https://example.test", "members": ["http://aaaa.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["http://aaaa.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, RejectsNonOriginMember) { +TEST(FirstPartySetParser, RejectsNonOriginAssociatedSite) { const std::string input = - R"({"owner": "https://example.test", "members": ["aaaa"]})"; + R"({"primary": "https://example.test", "associatedSites": ["aaaa"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, SkipsSetOnNonOriginMember) { +TEST(FirstPartySetParser, SkipsSetOnNonOriginAssociatedSite) { const std::string input = - R"({"owner": "https://example.test", "members": ["aaaa"]})" + R"({"primary": "https://example.test", "associatedSites": ["aaaa"]})" "\n" - R"({"owner": "https://example2.test", "members": )" - R"(["https://member2.test"]})" + R"({"primary": "https://example2.test", "associatedSites": )" + R"(["https://associatedsite2.test"]})" "\n" - R"({"owner": "https://example.test", "members": )" - R"(["https://member3.test"]})"; + R"({"primary": "https://example.test", "associatedSites": )" + R"(["https://associatedsite3.test"]})"; EXPECT_THAT( ParseSets(input), @@ -184,7 +184,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example2.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example2.test")), net::SiteType::kAssociated, 0)), @@ -192,23 +192,23 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member3.test"), + Pair(SerializesTo("https://associatedsite3.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0))), IsEmpty())); } -TEST(FirstPartySetParser, RejectsMemberWithoutRegisteredDomain) { - const std::string input = R"({"owner": "https://example.test", )" - R"("members": ["https://aaaa.test.."]})"; +TEST(FirstPartySetParser, RejectsAssociatedSiteWithoutRegisteredDomain) { + const std::string input = R"({"primary": "https://example.test", )" + R"("associatedSites": ["https://aaaa.test.."]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, TruncatesSubdomain_Owner) { - const std::string input = R"({"owner": "https://subdomain.example.test", )" - R"("members": ["https://aaaa.test"]})"; +TEST(FirstPartySetParser, TruncatesSubdomain_Primary) { + const std::string input = R"({"primary": "https://subdomain.example.test", )" + R"("associatedSites": ["https://aaaa.test"]})"; EXPECT_THAT( ParseSets(input), @@ -224,9 +224,10 @@ IsEmpty())); } -TEST(FirstPartySetParser, TruncatesSubdomain_Member) { - const std::string input = R"({"owner": "https://example.test", )" - R"("members": ["https://subdomain.aaaa.test"]})"; +TEST(FirstPartySetParser, TruncatesSubdomain_AssociatedSite) { + const std::string input = + R"({"primary": "https://example.test", )" + R"("associatedSites": ["https://subdomain.aaaa.test"]})"; EXPECT_THAT( ParseSets(input), @@ -244,10 +245,10 @@ TEST(FirstPartySetParser, AcceptsMultipleSets) { const std::string input = - "{\"owner\": \"https://example.test\", \"members\": " - "[\"https://member1.test\"]}\n" - "{\"owner\": \"https://foo.test\", \"members\": " - "[\"https://member2.test\"]}"; + "{\"primary\": \"https://example.test\", \"associatedSites\": " + "[\"https://associatedsite1.test\"]}\n" + "{\"primary\": \"https://foo.test\", \"associatedSites\": " + "[\"https://associatedsite2.test\"]}"; std::istringstream stream(input); EXPECT_THAT( @@ -257,7 +258,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), @@ -265,7 +266,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 0))), @@ -276,9 +277,9 @@ // Note the leading blank line, middle blank line, trailing blank line, and // leading whitespace on each line. const std::string input = R"( - {"owner": "https://example.test", "members": ["https://member1.test"]} + {"primary": "https://example.test", "associatedSites": ["https://associatedsite1.test"]} - {"owner": "https://foo.test", "members": ["https://member2.test"]} + {"primary": "https://foo.test", "associatedSites": ["https://associatedsite2.test"]} )"; std::istringstream stream(input); @@ -289,7 +290,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), @@ -297,30 +298,33 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 0))), IsEmpty())); } -TEST(FirstPartySetParser, RejectsInvalidSets_InvalidOwner) { - const std::string input = R"({"owner": 3, "members": ["https://member1.test"]} - {"owner": "https://foo.test", "members": ["https://member2.test"]})"; +TEST(FirstPartySetParser, RejectsInvalidSets_InvalidPrimary) { + const std::string input = + R"({"primary": 3, "associatedSites": ["https://associatedsite1.test"]} + {"primary": "https://foo.test", "associatedSites": ["https://associatedsite2.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, RejectsInvalidSets_InvalidMember) { - const std::string input = R"({"owner": "https://example.test", "members": [3]} - {"owner": "https://foo.test", "members": ["https://member2.test"]})"; +TEST(FirstPartySetParser, RejectsInvalidSets_InvalidAssociatedSite) { + const std::string input = + R"({"primary": "https://example.test", "associatedSites": [3]} + {"primary": "https://foo.test", "associatedSites": ["https://associatedsite2.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } TEST(FirstPartySetParser, AllowsTrailingCommas) { - const std::string input = R"({"owner": "https://example.test", )" - R"("members": ["https://member1.test"],})"; + const std::string input = + R"({"primary": "https://example.test", )" + R"("associatedSites": ["https://associatedsite1.test"],})"; EXPECT_THAT( ParseSets(input), @@ -329,66 +333,68 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0))), IsEmpty())); } -TEST(FirstPartySetParser, Rejects_SameOwner) { +TEST(FirstPartySetParser, Rejects_SamePrimary) { const std::string input = - R"({"owner": "https://example.test", "members": ["https://member1.test"]} - {"owner": "https://example.test", "members": ["https://member2.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["https://associatedsite1.test"]} + {"primary": "https://example.test", "associatedSites": ["https://associatedsite2.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, Rejects_MemberAsOwner) { +TEST(FirstPartySetParser, Rejects_AssociatedSiteAsPrimary) { const std::string input = - R"({"owner": "https://example.test", "members": ["https://member1.test"]} - {"owner": "https://member1.test", "members": ["https://member2.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["https://associatedsite1.test"]} + {"primary": "https://associatedsite1.test", "associatedSites": ["https://associatedsite2.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, Rejects_SameMember) { +TEST(FirstPartySetParser, Rejects_SameAssociatedSite) { const std::string input = - R"({"owner": "https://example.test", "members": ["https://member1.test"]} - {"owner": "https://foo.test", "members": )" - R"(["https://member1.test", "https://member2.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["https://associatedsite1.test"]} + {"primary": "https://foo.test", "associatedSites": )" + R"(["https://associatedsite1.test", "https://associatedsite2.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } -TEST(FirstPartySetParser, Rejects_OwnerAsMember) { +TEST(FirstPartySetParser, Rejects_PrimaryAsAssociatedSite) { const std::string input = - R"({"owner": "https://example.test", "members": ["https://member1.test"]} - {"owner": "https://example2.test", )" - R"("members": ["https://example.test", "https://member2.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["https://associatedsite1.test"]} + {"primary": "https://example2.test", )" + R"("associatedSites": ["https://example.test", "https://associatedsite2.test"]})"; EXPECT_THAT(ParseSets(input), Pair(IsEmpty(), IsEmpty())); } TEST(FirstPartySetParser, Accepts_ccTLDAliases) { const std::string input = - "{" // - "\"owner\": \"https://example.test\"," // - "\"members\": [\"https://member1.test\"]," // - "\"ccTLDs\": {" // - "\"https://member1.test\": [\"https://member1.cctld1\", " - "\"https://member1.cctld2\"]," // - "\"https://not_in_set.test\": [\"https://not_in_set.cctld\"]," // - "\"https://example.test\": \"https://not_a_list.test\"" // - "}" // - "}\n" // - "{" // - "\"owner\": \"https://foo.test\"," // - "\"members\": [\"https://member2.test\"]," // - "\"ccTLDs\": {" // - "\"https://foo.test\": [\"https://foo.cctld\"]," // - "\"https://member2.test\": [\"https://different_prefix.cctld\"]" // - "}" // + "{" // + "\"primary\": \"https://example.test\"," // + "\"associatedSites\": [\"https://associatedsite1.test\"]," // + "\"ccTLDs\": {" // + "\"https://associatedsite1.test\": " + "[\"https://associatedsite1.cctld1\", " + "\"https://associatedsite1.cctld2\"]," // + "\"https://not_in_set.test\": [\"https://not_in_set.cctld\"]," // + "\"https://example.test\": \"https://not_a_list.test\"" // + "}" // + "}\n" // + "{" // + "\"primary\": \"https://foo.test\"," // + "\"associatedSites\": [\"https://associatedsite2.test\"]," // + "\"ccTLDs\": {" // + "\"https://foo.test\": [\"https://foo.cctld\"]," // + "\"https://associatedsite2.test\": " + "[\"https://different_prefix.cctld\"]" // + "}" // "}"; std::istringstream stream(input); @@ -399,7 +405,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), @@ -407,26 +413,27 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 0))), - UnorderedElementsAre(Pair(SerializesTo("https://member1.cctld1"), - SerializesTo("https://member1.test")), - Pair(SerializesTo("https://member1.cctld2"), - SerializesTo("https://member1.test")), - Pair(SerializesTo("https://foo.cctld"), - SerializesTo("https://foo.test"))))); + UnorderedElementsAre( + Pair(SerializesTo("https://associatedsite1.cctld1"), + SerializesTo("https://associatedsite1.test")), + Pair(SerializesTo("https://associatedsite1.cctld2"), + SerializesTo("https://associatedsite1.test")), + Pair(SerializesTo("https://foo.cctld"), + SerializesTo("https://foo.test"))))); } TEST(FirstPartySetParser, Rejects_NonSchemefulSiteCcTLDAliases) { const std::string input = - "{" // - "\"owner\": \"https://example.test\"," // - "\"members\": [\"https://member1.test\"]," // - "\"ccTLDs\": {" // - "\"https://member1.test\": [\"member1.cctld1\"]" // - "}" // + "{" // + "\"primary\": \"https://example.test\"," // + "\"associatedSites\": [\"https://associatedsite1.test\"]," // + "\"ccTLDs\": {" // + "\"https://associatedsite1.test\": [\"associatedsite1.cctld1\"]" // + "}" // "}"; std::istringstream stream(input); @@ -456,9 +463,9 @@ } TEST(FirstPartySetParser, SerializeFirstPartySets) { - EXPECT_EQ(R"({"https://member1.test":"https://example1.test"})", + EXPECT_EQ(R"({"https://associatedsite1.test":"https://example1.test"})", FirstPartySetParser::SerializeFirstPartySets( - {{net::SchemefulSite(GURL("https://member1.test")), + {{net::SchemefulSite(GURL("https://associatedsite1.test")), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example1.test")), net::SiteType::kAssociated, 0)}, @@ -470,9 +477,9 @@ TEST(FirstPartySetParser, SerializeFirstPartySetsWithOpaqueOrigin) { EXPECT_EQ( - R"({"https://member1.test":"null"})", + R"({"https://associatedsite1.test":"null"})", FirstPartySetParser::SerializeFirstPartySets( - {{net::SchemefulSite(GURL("https://member1.test")), + {{net::SchemefulSite(GURL("https://associatedsite1.test")), net::FirstPartySetEntry(net::SchemefulSite(GURL("")), net::SiteType::kPrimary, absl::nullopt)}})); } @@ -483,19 +490,19 @@ TEST(FirstPartySetParser, DeserializeFirstPartySets) { const std::string input = - R"({"https://member1.test":"https://example1.test", - "https://member3.test":"https://example1.test", - "https://member2.test":"https://example2.test"})"; + R"({"https://associatedsite1.test":"https://example1.test", + "https://associatedsite3.test":"https://example1.test", + "https://associatedsite2.test":"https://example2.test"})"; // Sanity check that the input is actually valid JSON. ASSERT_TRUE(base::JSONReader::Read(input)); EXPECT_THAT(FirstPartySetParser::DeserializeFirstPartySets(input), UnorderedElementsAre( - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example1.test")), net::SiteType::kAssociated, absl::nullopt)), - Pair(SerializesTo("https://member3.test"), + Pair(SerializesTo("https://associatedsite3.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example1.test")), net::SiteType::kAssociated, absl::nullopt)), @@ -503,7 +510,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example1.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example2.test")), net::SiteType::kAssociated, absl::nullopt)), @@ -517,17 +524,18 @@ EXPECT_THAT(FirstPartySetParser::DeserializeFirstPartySets("{}"), IsEmpty()); } -// Same member appear twice with different owner is not considered invalid -// content and wouldn't end up returning an empty map, since -// base::DictionaryValue automatically handles duplicated keys. +// if the same associated site appears twice with different primaries, +// it is not considered invalid content and wouldn't end up returning +// an empty map, since base::DictionaryValue automatically handles +// duplicated keys. TEST(FirstPartySetParser, DeserializeFirstPartySetsDuplicatedKey) { const std::string input = - R"({"https://member1.test":"https://example1.test", - "https://member1.test":"https://example2.test"})"; + R"({"https://associatedsite1.test":"https://example1.test", + "https://associatedsite1.test":"https://example2.test"})"; ASSERT_TRUE(base::JSONReader::Read(input)); EXPECT_THAT(FirstPartySetParser::DeserializeFirstPartySets(input), UnorderedElementsAre( - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example2.test")), net::SiteType::kAssociated, absl::nullopt)), @@ -541,12 +549,12 @@ TEST(FirstPartySetParser, DeserializeFirstPartySetsSingletonSet) { const std::string input = R"({"https://example1.test":"https://example1.test", - "https://member1.test":"https://example2.test", + "https://associatedsite1.test":"https://example2.test", "https://example2.test":"https://example2.test"})"; ASSERT_TRUE(base::JSONReader::Read(input)); EXPECT_THAT(FirstPartySetParser::DeserializeFirstPartySets(input), UnorderedElementsAre( - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example2.test")), net::SiteType::kAssociated, absl::nullopt)), @@ -587,23 +595,27 @@ // The input is not valid JSON. std::make_tuple(false, "//"), // The serialized object is type of array. - std::make_tuple(true, - R"(["https://member1.test","https://example1.test"])"), + std::make_tuple( + true, + R"(["https://associatedsite1.test","https://example1.test"])"), // The serialized string is type of map that contains non-URL key. - std::make_tuple(true, R"({"member1":"https://example1.test"})"), + std::make_tuple(true, R"({"associatedSite1":"https://example1.test"})"), // The serialized string is type of map that contains non-URL value. - std::make_tuple(true, R"({"https://member1.test":"example1"})"), + std::make_tuple(true, R"({"https://associatedsite1.test":"example1"})"), // The serialized string is type of map that contains opaque origin. - std::make_tuple(true, R"({"https://member1.test":""})"), + std::make_tuple(true, R"({"https://associatedsite1.test":""})"), std::make_tuple(true, R"({"":"https://example1.test"})"), // The serialized string is type of map that contains non-string value. - std::make_tuple(true, R"({"https://member1.test":1})"), - // Nondisjoint set. The same site shows up both as member and owner. - std::make_tuple(true, - R"({"https://member1.test":"https://example1.test", - "https://member2.test":"https://member1.test"})"), - std::make_tuple(true, - R"({"https://member1.test":"https://example1.test", + std::make_tuple(true, R"({"https://associatedsite1.test":1})"), + // Nondisjoint set. The same site shows up both as associated site and + // primary. + std::make_tuple( + true, + R"({"https://associatedsite1.test":"https://example1.test", + "https://associatedsite2.test":"https://associatedsite1.test"})"), + std::make_tuple( + true, + R"({"https://associatedsite1.test":"https://example1.test", "https://example1.test":"https://example2.test"})"))); TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, @@ -634,12 +646,12 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidTypeError_MissingOwner) { + InvalidTypeError_MissingPrimary) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "members": ["https://member1.test"] + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [] @@ -655,12 +667,12 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidTypeError_MissingMembers) { + InvalidTypeError_MissingAssociatedSites) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test" + "primary": "https://primary1.test" } ], "additions": [] @@ -676,13 +688,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidTypeError_WrongOwnerType) { + InvalidTypeError_WrongPrimaryType) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": 123, - "members": ["https://member1.test"] + "primary": 123, + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [] @@ -698,13 +710,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidTypeError_WrongMembersFieldType) { + InvalidTypeError_WrongAssociatedSitesFieldType) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": 123 + "primary": "https://primary1.test", + "associatedSites": 123 } ], "additions": [] @@ -720,14 +732,14 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidTypeError_WrongMemberType) { + InvalidTypeError_WrongAssociatedSiteType) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test", 123, - "https://member2.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test", 123, + "https://associatedsite2.test"] } ], "additions": [] @@ -743,13 +755,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidOriginError_OwnerOpaque) { + InvalidOriginError_PrimaryOpaque) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "", - "members": ["https://member1.test"] + "primary": "", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [] @@ -765,13 +777,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidOriginError_MemberOpaque) { + InvalidOriginError_AssociatedSiteOpaque) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": [""] + "primary": "https://primary1.test", + "associatedSites": [""] } ], "additions": [] @@ -787,13 +799,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidOriginError_OwnerNonHttps) { + InvalidOriginError_PrimaryNonHttps) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "http://owner1.test", - "members": ["https://member1.test"] + "primary": "http://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [] @@ -809,13 +821,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidOriginError_MemberNonHttps) { + InvalidOriginError_AssociatedSiteNonHttps) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": ["http://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["http://associatedsite1.test"] } ], "additions": [] @@ -831,13 +843,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidOriginError_OwnerNonRegisteredDomain) { + InvalidOriginError_PrimaryNonRegisteredDomain) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test..", - "members": ["https://member1.test"] + "primary": "https://primary1.test..", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [] @@ -853,13 +865,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - InvalidOriginError_MemberNonRegisteredDomain) { + InvalidOriginError_AssociatedSiteNonRegisteredDomain) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test.."] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test.."] } ], "additions": [] @@ -875,13 +887,13 @@ } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, - SingletonSetError_EmptyMembers) { + SingletonSetError_EmptyAssociatedSites) { base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": [] + "primary": "https://primary1.test", + "associatedSites": [] } ], "additions": [] @@ -902,8 +914,8 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://owner1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://primary1.test"] } ], "additions": [] @@ -924,12 +936,12 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] }, { - "owner": "https://owner2.test", - "members": ["https://member1.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [] @@ -951,12 +963,12 @@ "replacements": [], "additions": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] }, { - "owner": "https://owner2.test", - "members": ["https://member1.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite1.test"] } ] } @@ -976,14 +988,14 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member1.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite1.test"] } ] } @@ -999,21 +1011,21 @@ TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, SuccessfulMapping_SameList) { - net::SchemefulSite owner1(GURL("https://owner1.test")); - net::SchemefulSite member1(GURL("https://member1.test")); - net::SchemefulSite owner2(GURL("https://owner2.test")); - net::SchemefulSite member2(GURL("https://member2.test")); + net::SchemefulSite primary1(GURL("https://primary1.test")); + net::SchemefulSite associated_site1(GURL("https://associatedsite1.test")); + net::SchemefulSite primary2(GURL("https://primary2.test")); + net::SchemefulSite associated_site2(GURL("https://associatedsite2.test")); base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] }, { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"] } ] } @@ -1024,17 +1036,19 @@ .value(), FirstPartySetParser::ParsedPolicySetLists( {FirstPartySetParser::SetsMap({ - {owner1, net::FirstPartySetEntry(owner1, net::SiteType::kPrimary, - absl::nullopt)}, - {member1, - net::FirstPartySetEntry(owner1, net::SiteType::kAssociated, + {primary1, + net::FirstPartySetEntry(primary1, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site1, + net::FirstPartySetEntry(primary1, net::SiteType::kAssociated, absl::nullopt)}, }), FirstPartySetParser::SetsMap({ - {owner2, net::FirstPartySetEntry(owner2, net::SiteType::kPrimary, - absl::nullopt)}, - {member2, - net::FirstPartySetEntry(owner2, net::SiteType::kAssociated, + {primary2, + net::FirstPartySetEntry(primary2, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site2, + net::FirstPartySetEntry(primary2, net::SiteType::kAssociated, absl::nullopt)}, })}, {})); @@ -1042,29 +1056,29 @@ TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, SuccessfulMapping_CrossList) { - net::SchemefulSite owner1(GURL("https://owner1.test")); - net::SchemefulSite member1(GURL("https://member1.test")); - net::SchemefulSite owner2(GURL("https://owner2.test")); - net::SchemefulSite member2(GURL("https://member2.test")); - net::SchemefulSite owner3(GURL("https://owner3.test")); - net::SchemefulSite member3(GURL("https://member3.test")); + net::SchemefulSite primary1(GURL("https://primary1.test")); + net::SchemefulSite associated_site1(GURL("https://associatedsite1.test")); + net::SchemefulSite primary2(GURL("https://primary2.test")); + net::SchemefulSite associated_site2(GURL("https://associatedsite2.test")); + net::SchemefulSite primary3(GURL("https://primary3.test")); + net::SchemefulSite associatedSite3(GURL("https://associatedsite3.test")); base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] }, { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"] } ], "additions": [ { - "owner": "https://owner3.test", - "members": ["https://member3.test"] + "primary": "https://primary3.test", + "associatedSites": ["https://associatedsite3.test"] } ] } @@ -1075,52 +1089,56 @@ .value(), FirstPartySetParser::ParsedPolicySetLists( {FirstPartySetParser::SetsMap({ - {owner1, net::FirstPartySetEntry(owner1, net::SiteType::kPrimary, - absl::nullopt)}, - {member1, - net::FirstPartySetEntry(owner1, net::SiteType::kAssociated, + {primary1, + net::FirstPartySetEntry(primary1, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site1, + net::FirstPartySetEntry(primary1, net::SiteType::kAssociated, absl::nullopt)}, }), FirstPartySetParser::SetsMap({ - {owner2, net::FirstPartySetEntry(owner2, net::SiteType::kPrimary, - absl::nullopt)}, - {member2, - net::FirstPartySetEntry(owner2, net::SiteType::kAssociated, + {primary2, + net::FirstPartySetEntry(primary2, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site2, + net::FirstPartySetEntry(primary2, net::SiteType::kAssociated, absl::nullopt)}, })}, {FirstPartySetParser::SetsMap({ - {owner3, net::FirstPartySetEntry(owner3, net::SiteType::kPrimary, - absl::nullopt)}, - {member3, net::FirstPartySetEntry( - owner3, net::SiteType::kAssociated, absl::nullopt)}, + {primary3, net::FirstPartySetEntry( + primary3, net::SiteType::kPrimary, absl::nullopt)}, + {associatedSite3, + net::FirstPartySetEntry(primary3, net::SiteType::kAssociated, + absl::nullopt)}, })})); } TEST(FirstPartySets_ParseSetsFromEnterprisePolicyTest, SuccessfulMapping_CCTLDs) { - net::SchemefulSite owner1(GURL("https://owner1.test")); - net::SchemefulSite member1(GURL("https://member1.test")); - net::SchemefulSite member1_cctld(GURL("https://member1.cctld")); - net::SchemefulSite owner2(GURL("https://owner2.test")); - net::SchemefulSite owner2_cctld(GURL("https://owner2.cctld")); - net::SchemefulSite member2(GURL("https://member2.test")); + net::SchemefulSite primary1(GURL("https://primary1.test")); + net::SchemefulSite associated_site1(GURL("https://associatedsite1.test")); + net::SchemefulSite associated_site1_cctld( + GURL("https://associatedsite1.cctld")); + net::SchemefulSite primary2(GURL("https://primary2.test")); + net::SchemefulSite primary2_cctld(GURL("https://primary2.cctld")); + net::SchemefulSite associated_site2(GURL("https://associatedsite2.test")); base::Value policy_value = base::JSONReader::Read(R"( { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"], + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"], "ccTLDs": { - "https://member1.test": ["https://member1.cctld"], + "https://associatedsite1.test": ["https://associatedsite1.cctld"], "https://not_in_set.test": ["https://not_in_set.cctld"] } }, { - "owner": "https://owner2.test", - "members": ["https://member2.test"], + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"], "ccTLDs": { - "https://owner2.test": ["https://owner2.cctld"] + "https://primary2.test": ["https://primary2.cctld"] } } ] @@ -1132,23 +1150,25 @@ .value(), FirstPartySetParser::ParsedPolicySetLists( {FirstPartySetParser::SetsMap({ - {owner1, net::FirstPartySetEntry(owner1, net::SiteType::kPrimary, - absl::nullopt)}, - {member1, - net::FirstPartySetEntry(owner1, net::SiteType::kAssociated, + {primary1, + net::FirstPartySetEntry(primary1, net::SiteType::kPrimary, absl::nullopt)}, - {member1_cctld, - net::FirstPartySetEntry(owner1, net::SiteType::kAssociated, + {associated_site1, + net::FirstPartySetEntry(primary1, net::SiteType::kAssociated, + absl::nullopt)}, + {associated_site1_cctld, + net::FirstPartySetEntry(primary1, net::SiteType::kAssociated, absl::nullopt)}, }), FirstPartySetParser::SetsMap({ - {owner2, net::FirstPartySetEntry(owner2, net::SiteType::kPrimary, - absl::nullopt)}, - {owner2_cctld, - net::FirstPartySetEntry(owner2, net::SiteType::kPrimary, + {primary2, + net::FirstPartySetEntry(primary2, net::SiteType::kPrimary, absl::nullopt)}, - {member2, - net::FirstPartySetEntry(owner2, net::SiteType::kAssociated, + {primary2_cctld, + net::FirstPartySetEntry(primary2, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site2, + net::FirstPartySetEntry(primary2, net::SiteType::kAssociated, absl::nullopt)}, })}, {}));
diff --git a/content/browser/first_party_sets/first_party_sets_handler_impl_unittest.cc b/content/browser/first_party_sets/first_party_sets_handler_impl_unittest.cc index d6617e6..9db29b2 100644 --- a/content/browser/first_party_sets/first_party_sets_handler_impl_unittest.cc +++ b/content/browser/first_party_sets/first_party_sets_handler_impl_unittest.cc
@@ -52,19 +52,21 @@ FirstPartySetsHandlerImpl::FlattenedSets MakeFlattenedSetsFromMap( const base::flat_map<std::string, std::vector<std::string>>& - owners_to_members) { + primaries_to_associated_sites) { FirstPartySetsHandlerImpl::FlattenedSets result; - for (const auto& [owner, members] : owners_to_members) { - net::SchemefulSite owner_site((GURL(owner))); + for (const auto& [primary, associated_sites] : + primaries_to_associated_sites) { + net::SchemefulSite primary_site((GURL(primary))); result.insert(std::make_pair( - owner_site, net::FirstPartySetEntry(owner_site, net::SiteType::kPrimary, - absl::nullopt))); + primary_site, + net::FirstPartySetEntry(primary_site, net::SiteType::kPrimary, + absl::nullopt))); uint32_t index = 0; - for (const std::string& member : members) { - net::SchemefulSite member_site((GURL(member))); - result.insert(std::make_pair( - member_site, net::FirstPartySetEntry( - owner_site, net::SiteType::kAssociated, index))); + for (const std::string& associated_site : associated_sites) { + result.insert( + std::make_pair(net::SchemefulSite(GURL(associated_site)), + net::FirstPartySetEntry( + primary_site, net::SiteType::kAssociated, index))); ++index; } } @@ -77,16 +79,16 @@ void ParseAndAppend( const base::flat_map<std::string, std::vector<std::string>>& input, std::vector<SingleSet>& output) { - for (auto& [owner, members] : input) { + for (auto& [primary, associated_sites] : input) { std::vector<std::pair<net::SchemefulSite, net::FirstPartySetEntry>> sites; - net::SchemefulSite owner_site((GURL(owner))); - sites.emplace_back( - owner_site, net::FirstPartySetEntry(owner_site, net::SiteType::kPrimary, - absl::nullopt)); - for (const std::string& member : members) { + net::SchemefulSite primary_site((GURL(primary))); + sites.emplace_back(primary_site, net::FirstPartySetEntry( + primary_site, net::SiteType::kPrimary, + absl::nullopt)); + for (const std::string& associated_site : associated_sites) { sites.emplace_back( - GURL(member), - net::FirstPartySetEntry(owner_site, net::SiteType::kAssociated, + GURL(associated_site), + net::FirstPartySetEntry(primary_site, net::SiteType::kAssociated, absl::nullopt)); } output.emplace_back(sites); @@ -125,14 +127,14 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"] } ] } @@ -149,14 +151,14 @@ { "replacements": [ { - "owner": "https://owner1.test", - "members": ["https://member1.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite1.test"] } ], "additions": [ { - "owner": "https://owner1.test", - "members": ["https://member2.test"] + "primary": "https://primary1.test", + "associatedSites": ["https://associatedsite2.test"] } ] } @@ -235,7 +237,7 @@ // prevent `on_sets_ready` from being invoked. FirstPartySetsHandlerImpl::GetInstance()->Init( /*user_data_dir=*/{}, - /*flag_value=*/"https://example.test,https://member1.test"); + /*flag_value=*/"https://example.test,https://associatedsite1.test"); EXPECT_THAT(GetSetsAndWait(), PublicSetsAre(UnorderedElementsAre( @@ -243,7 +245,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0))))); @@ -253,8 +255,9 @@ Successful_PersistedSetsFileNotExist) { FirstPartySetsHandlerImpl::GetInstance() ->SetEmbedderWillProvidePublicSetsForTesting(true); - const std::string input = R"({"owner": "https://foo.test", )" - R"("members": ["https://member2.test"]})"; + const std::string input = + R"({"primary": "https://foo.test", )" + R"("associatedSites": ["https://associatedsite2.test"]})"; ASSERT_TRUE(base::JSONReader::Read(input)); FirstPartySetsHandlerImpl::GetInstance()->SetPublicFirstPartySets( WritePublicSetsFile(input)); @@ -262,14 +265,14 @@ // Persisted sets are expected to be loaded with the provided path. FirstPartySetsHandlerImpl::GetInstance()->Init( scoped_dir_.GetPath(), - /*flag_value=*/"https://example.test,https://member1.test"); + /*flag_value=*/"https://example.test,https://associatedsite1.test"); EXPECT_THAT(GetSetsAndWait(), PublicSetsAre(UnorderedElementsAre( Pair(SerializesTo("https://example.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), @@ -277,7 +280,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 0))))); @@ -292,7 +295,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, absl::nullopt)), @@ -300,7 +303,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, absl::nullopt)))); @@ -311,8 +314,9 @@ ->SetEmbedderWillProvidePublicSetsForTesting(true); ASSERT_TRUE(base::WriteFile(persisted_sets_path_, "{}")); - const std::string input = R"({"owner": "https://foo.test", )" - R"("members": ["https://member2.test"]})"; + const std::string input = + R"({"primary": "https://foo.test", )" + R"("associatedSites": ["https://associatedsite2.test"]})"; ASSERT_TRUE(base::JSONReader::Read(input)); FirstPartySetsHandlerImpl::GetInstance()->SetPublicFirstPartySets( WritePublicSetsFile(input)); @@ -320,14 +324,14 @@ // Persisted sets are expected to be loaded with the provided path. FirstPartySetsHandlerImpl::GetInstance()->Init( scoped_dir_.GetPath(), - /*flag_value=*/"https://example.test,https://member1.test"); + /*flag_value=*/"https://example.test,https://associatedsite1.test"); EXPECT_THAT(GetSetsAndWait(), PublicSetsAre(UnorderedElementsAre( Pair(SerializesTo("https://example.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), @@ -335,7 +339,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 0))))); @@ -350,7 +354,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, absl::nullopt)), @@ -358,7 +362,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, absl::nullopt)))); @@ -370,8 +374,9 @@ ->SetEmbedderWillProvidePublicSetsForTesting(true); ASSERT_TRUE(base::WriteFile(persisted_sets_path_, "{}")); - const std::string input = R"({"owner": "https://example.test", )" - R"("members": ["https://member.test"]})"; + const std::string input = + R"({"primary": "https://example.test", )" + R"("associatedSites": ["https://associatedsite.test"]})"; ASSERT_TRUE(base::JSONReader::Read(input)); FirstPartySetsHandlerImpl::GetInstance()->SetPublicFirstPartySets( WritePublicSetsFile(input)); @@ -385,7 +390,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member.test"), + Pair(SerializesTo("https://associatedsite.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0))))); @@ -400,7 +405,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member.test"), + Pair(SerializesTo("https://associatedsite.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, absl::nullopt)))); @@ -412,7 +417,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member.test"), + Pair(SerializesTo("https://associatedsite.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)))))); @@ -434,8 +439,9 @@ FirstPartySetsHandlerImpl::GetInstance()->Init(scoped_dir_.GetPath(), /*flag_value=*/""); - const std::string input = R"({"owner": "https://example.test", )" - R"("members": ["https://member.test"]})"; + const std::string input = + R"({"primary": "https://example.test", )" + R"("associatedSites": ["https://associatedsite.test"]})"; ASSERT_TRUE(base::JSONReader::Read(input)); FirstPartySetsHandlerImpl::GetInstance()->SetPublicFirstPartySets( WritePublicSetsFile(input)); @@ -446,7 +452,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member.test"), + Pair(SerializesTo("https://associatedsite.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0))))); @@ -458,7 +464,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member.test"), + Pair(SerializesTo("https://associatedsite.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)))))); @@ -481,22 +487,23 @@ // // [ // { - // "owner": "https://owner1.test", - // "members": ["https://member1.test", "https://member2.test"] + // "primary": "https://primary1.test", + // "associatedSites": ["https://associatedsite1.test", + // "https://associatedsite2.test"] // } // ] void InitPublicFirstPartySets() { const std::string input = - R"({"owner": "https://owner1.test", )" - R"("members": ["https://member1.test", "https://member2.test"]})"; + R"({"primary": "https://primary1.test", )" + R"("associatedSites": ["https://associatedsite1.test", "https://associatedsite2.test"]})"; ASSERT_TRUE(base::JSONReader::Read(input)); FirstPartySetsHandlerImpl::GetInstance()->SetPublicFirstPartySets( WritePublicSetsFile(input)); FirstPartySetsHandlerImpl::FlattenedSets public_sets = - MakeFlattenedSetsFromMap( - {{"https://owner1.test", - {"https://member1.test", "https://member2.test"}}}); + MakeFlattenedSetsFromMap({{"https://primary1.test", + {"https://associatedsite1.test", + "https://associatedsite2.test"}}}); ASSERT_THAT(GetSetsAndWait(), PublicSetsAre(public_sets)); } @@ -542,14 +549,14 @@ { "replacements": [ { - "owner": "https://member1.test", - "members": ["https://owner3.test"] + "primary": "https://associatedsite1.test", + "associatedSites": ["https://primary3.test"] } ], "additions": [ { - "owner": "https://owner2.test", - "members": ["https://member2.test"] + "primary": "https://primary2.test", + "associatedSites": ["https://associatedsite2.test"] } ] } @@ -559,36 +566,38 @@ policy.GetDict(), GetCustomizationCallback()); InitPublicFirstPartySets(); - EXPECT_THAT(GetCustomization(), - UnorderedElementsAre( - Pair(SerializesTo("https://owner1.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), - net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://member1.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://member1.test")), - net::SiteType::kPrimary, absl::nullopt))), - Pair(SerializesTo("https://owner3.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://member1.test")), - net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://member2.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), - net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner2.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), - net::SiteType::kPrimary, absl::nullopt))))); + EXPECT_THAT( + GetCustomization(), + UnorderedElementsAre( + Pair(SerializesTo("https://primary1.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://primary2.test")), + net::SiteType::kAssociated, absl::nullopt))), + Pair(SerializesTo("https://associatedsite1.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://associatedsite1.test")), + net::SiteType::kPrimary, absl::nullopt))), + Pair(SerializesTo("https://primary3.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://associatedsite1.test")), + net::SiteType::kAssociated, absl::nullopt))), + Pair(SerializesTo("https://associatedsite2.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://primary2.test")), + net::SiteType::kAssociated, absl::nullopt))), + Pair(SerializesTo("https://primary2.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://primary2.test")), + net::SiteType::kPrimary, absl::nullopt))))); } TEST(FirstPartySetsProfilePolicyCustomizations, EmptyPolicySetLists) { - EXPECT_THAT(FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( - MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", {"https://member1.test"}}})), - MakeParsedPolicyFromMap({}, {})), - FirstPartySetsHandlerImpl::PolicyCustomization()); + EXPECT_THAT( + FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( + MakePublicFirstPartySets(MakeFlattenedSetsFromMap( + {{"https://primary1.test", {"https://associatedsite1.test"}}})), + MakeParsedPolicyFromMap({}, {})), + FirstPartySetsHandlerImpl::PolicyCustomization()); } TEST(FirstPartySetsProfilePolicyCustomizations, @@ -596,98 +605,101 @@ PolicyCustomization customization = FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", {"https://member1.test"}}})), + {{"https://primary1.test", {"https://associatedsite1.test"}}})), MakeParsedPolicyFromMap( - /*replacements=*/{{"https://owner2.test", - {"https://member2.test"}}}, + /*replacements=*/{{"https://primary2.test", + {"https://associatedsite2.test"}}}, /*additions=*/{})); EXPECT_THAT(customization, UnorderedElementsAre( - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), + net::SchemefulSite(GURL("https://primary2.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner2.test"), + Pair(SerializesTo("https://primary2.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), + net::SchemefulSite(GURL("https://primary2.test")), net::SiteType::kPrimary, absl::nullopt))))); } -// The common member between the policy and existing set is removed from its -// previous set. +// The common associated site between the policy and existing set is removed +// from its previous set. TEST(FirstPartySetsProfilePolicyCustomizations, - Replacements_ReplacesExistingMember_RemovedFromFormerSet) { + Replacements_ReplacesExistingAssociatedSite_RemovedFromFormerSet) { PolicyCustomization customization = FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( - MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", - {"https://member1a.test", "https://member1b.test"}}})), + MakePublicFirstPartySets( + MakeFlattenedSetsFromMap({{"https://primary1.test", + {"https://associatedsite1a.test", + "https://associatedsite1b.test"}}})), MakeParsedPolicyFromMap( - /*replacements=*/{{"https://owner2.test", - {"https://member1b.test"}}}, + /*replacements=*/{{"https://primary2.test", + {"https://associatedsite1b.test"}}}, /*additions=*/{})); EXPECT_THAT(customization, UnorderedElementsAre( - Pair(SerializesTo("https://member1b.test"), + Pair(SerializesTo("https://associatedsite1b.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), + net::SchemefulSite(GURL("https://primary2.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner2.test"), + Pair(SerializesTo("https://primary2.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), + net::SchemefulSite(GURL("https://primary2.test")), net::SiteType::kPrimary, absl::nullopt))))); } -// The common owner between the policy and existing set is removed and its -// former members are removed since they are now unowned. +// The common primary between the policy and existing set is removed and its +// former associated sites are removed since they are now unowned. TEST(FirstPartySetsProfilePolicyCustomizations, - Replacements_ReplacesExistingOwner_RemovesFormerMembers) { + Replacements_ReplacesExistingPrimary_RemovesFormerAssociatedSites) { PolicyCustomization customization = FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( - MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", - {"https://member1a.test", "https://member1b.test"}}})), + MakePublicFirstPartySets( + MakeFlattenedSetsFromMap({{"https://primary1.test", + {"https://associatedsite1a.test", + "https://associatedsite1b.test"}}})), MakeParsedPolicyFromMap( - /*replacements=*/{{"https://owner1.test", - {"https://member2.test"}}}, + /*replacements=*/{{"https://primary1.test", + {"https://associatedsite2.test"}}}, /*additions=*/{})); - EXPECT_THAT(customization, - UnorderedElementsAre( - Pair(SerializesTo("https://member2.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), - net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner1.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), - net::SiteType::kPrimary, absl::nullopt))), - Pair(SerializesTo("https://member1a.test"), absl::nullopt), - Pair(SerializesTo("https://member1b.test"), absl::nullopt))); + EXPECT_THAT( + customization, + UnorderedElementsAre( + Pair(SerializesTo("https://associatedsite2.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://primary1.test")), + net::SiteType::kAssociated, absl::nullopt))), + Pair(SerializesTo("https://primary1.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://primary1.test")), + net::SiteType::kPrimary, absl::nullopt))), + Pair(SerializesTo("https://associatedsite1a.test"), absl::nullopt), + Pair(SerializesTo("https://associatedsite1b.test"), absl::nullopt))); } -// The common member between the policy and existing set is removed and any -// leftover singletons are deleted. +// The common associated site between the policy and existing set is removed and +// any leftover singletons are deleted. TEST(FirstPartySetsProfilePolicyCustomizations, - Replacements_ReplacesExistingMember_RemovesSingletons) { + Replacements_ReplacesExistingAssociatedSite_RemovesSingletons) { PolicyCustomization customization = FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", {"https://member1.test"}}})), + {{"https://primary1.test", {"https://associatedsite1.test"}}})), MakeParsedPolicyFromMap( - /*replacements=*/{{"https://owner3.test", - {"https://member1.test"}}}, + /*replacements=*/{{"https://primary3.test", + {"https://associatedsite1.test"}}}, /*additions=*/{})); EXPECT_THAT(customization, UnorderedElementsAre( - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner3.test")), + net::SchemefulSite(GURL("https://primary3.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner3.test"), + Pair(SerializesTo("https://primary3.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner3.test")), + net::SchemefulSite(GURL("https://primary3.test")), net::SiteType::kPrimary, absl::nullopt))), - Pair(SerializesTo("https://owner1.test"), absl::nullopt))); + Pair(SerializesTo("https://primary1.test"), absl::nullopt))); } // The policy set and the existing set have nothing in common so the policy set @@ -697,229 +709,247 @@ PolicyCustomization customization = FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", {"https://member1.test"}}})), + {{"https://primary1.test", {"https://associatedsite1.test"}}})), MakeParsedPolicyFromMap( /*replacements=*/{}, - /*additions=*/{ - {"https://owner2.test", {"https://member2.test"}}})); + /*additions=*/{{"https://primary2.test", + {"https://associatedsite2.test"}}})); EXPECT_THAT(customization, UnorderedElementsAre( - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), + net::SchemefulSite(GURL("https://primary2.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner2.test"), + Pair(SerializesTo("https://primary2.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner2.test")), + net::SchemefulSite(GURL("https://primary2.test")), net::SiteType::kPrimary, absl::nullopt))))); } -// The owner of a policy set is also a member in an existing set. -// The policy set absorbs all sites in the existing set into its members. -TEST(FirstPartySetsProfilePolicyCustomizations, - Additions_PolicyOwnerIsExistingMember_PolicySetAbsorbsExistingSet) { +// The primary of a policy set is also an associated site in an existing set. +// The policy set absorbs all sites in the existing set into its +// associated sites. +TEST( + FirstPartySetsProfilePolicyCustomizations, + Additions_PolicyPrimaryIsExistingAssociatedSite_PolicySetAbsorbsExistingSet) { PolicyCustomization customization = FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", {"https://member2.test"}}})), + {{"https://primary1.test", {"https://associatedsite2.test"}}})), MakeParsedPolicyFromMap( /*replacements=*/{}, - /*additions=*/{ - {"https://member2.test", - {"https://member2a.test", "https://member2b.test"}}})); - EXPECT_THAT(customization, - UnorderedElementsAre( - Pair(SerializesTo("https://owner1.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://member2.test")), - net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://member2a.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://member2.test")), - net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://member2b.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://member2.test")), - net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://member2.test"), - Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://member2.test")), - net::SiteType::kPrimary, absl::nullopt))))); + /*additions=*/{{"https://associatedsite2.test", + {"https://associatedsite2a.test", + "https://associatedsite2b.test"}}})); + EXPECT_THAT( + customization, + UnorderedElementsAre( + Pair(SerializesTo("https://primary1.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://associatedsite2.test")), + net::SiteType::kAssociated, absl::nullopt))), + Pair(SerializesTo("https://associatedsite2a.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://associatedsite2.test")), + net::SiteType::kAssociated, absl::nullopt))), + Pair(SerializesTo("https://associatedsite2b.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://associatedsite2.test")), + net::SiteType::kAssociated, absl::nullopt))), + Pair(SerializesTo("https://associatedsite2.test"), + Optional(net::FirstPartySetEntry( + net::SchemefulSite(GURL("https://associatedsite2.test")), + net::SiteType::kPrimary, absl::nullopt))))); } -// The owner of a policy set is also an owner of an existing set. -// The policy set absorbs all of its owner's existing members into its members. -TEST(FirstPartySetsProfilePolicyCustomizations, - Additions_PolicyOwnerIsExistingOwner_PolicySetAbsorbsExistingMembers) { +// The primary of a policy set is also a primary of an existing set. +// The policy set absorbs all of its primary's existing associated sites into +// its associated sites. +TEST( + FirstPartySetsProfilePolicyCustomizations, + Additions_PolicyPrimaryIsExistingPrimary_PolicySetAbsorbsExistingAssociatedSites) { PolicyCustomization customization = FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( - MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", - {"https://member1.test", "https://member3.test"}}})), + MakePublicFirstPartySets( + MakeFlattenedSetsFromMap({{"https://primary1.test", + {"https://associatedsite1.test", + "https://associatedsite3.test"}}})), MakeParsedPolicyFromMap( /*replacements=*/{}, - /*additions=*/{ - {"https://owner1.test", {"https://member2.test"}}})); + /*additions=*/{{"https://primary1.test", + {"https://associatedsite2.test"}}})); EXPECT_THAT(customization, UnorderedElementsAre( - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), + net::SchemefulSite(GURL("https://primary1.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), + net::SchemefulSite(GURL("https://primary1.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://member3.test"), + Pair(SerializesTo("https://associatedsite3.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), + net::SchemefulSite(GURL("https://primary1.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner1.test"), + Pair(SerializesTo("https://primary1.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), + net::SchemefulSite(GURL("https://primary1.test")), net::SiteType::kPrimary, absl::nullopt))))); } TEST(FirstPartySetsProfilePolicyCustomizations, - TransitiveOverlap_TwoCommonOwners) { - net::SchemefulSite owner0(GURL("https://owner0.test")); - net::SchemefulSite member0(GURL("https://member0.test")); - net::SchemefulSite owner1(GURL("https://owner1.test")); - net::SchemefulSite member1(GURL("https://member1.test")); - net::SchemefulSite owner2(GURL("https://owner2.test")); - net::SchemefulSite member2(GURL("https://member2.test")); - net::SchemefulSite owner42(GURL("https://owner42.test")); - net::SchemefulSite member42(GURL("https://member42.test")); - // {owner1, {member1}} and {owner2, {member2}} transitively overlap with the - // existing set. - // owner1 takes ownership of the normalized addition set since it was - // provided first. - // The other addition sets are unaffected. + TransitiveOverlap_TwoCommonPrimarys) { + net::SchemefulSite primary0(GURL("https://primary0.test")); + net::SchemefulSite associated_site0(GURL("https://associatedsite0.test")); + net::SchemefulSite primary1(GURL("https://primary1.test")); + net::SchemefulSite associated_site1(GURL("https://associatedsite1.test")); + net::SchemefulSite primary2(GURL("https://primary2.test")); + net::SchemefulSite associated_site2(GURL("https://associatedsite2.test")); + net::SchemefulSite primary42(GURL("https://primary42.test")); + net::SchemefulSite associated_site42(GURL("https://associatedsite42.test")); + // {primary1, {associated_site1}} and {primary2, {associated_site2}} + // transitively overlap with the existing set. primary1 takes primaryship of + // the normalized addition set since it was provided first. The other addition + // sets are unaffected. EXPECT_THAT( FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", {"https://owner2.test"}}})), + {{"https://primary1.test", {"https://primary2.test"}}})), FirstPartySetParser::ParsedPolicySetLists( /*replacement_list=*/{}, { - SingleSet({{owner0, net::FirstPartySetEntry( - owner0, net::SiteType::kPrimary, - absl::nullopt)}, - {member0, net::FirstPartySetEntry( - owner0, net::SiteType::kAssociated, - absl::nullopt)}}), - SingleSet({{owner1, net::FirstPartySetEntry( - owner1, net::SiteType::kPrimary, - absl::nullopt)}, - {member1, net::FirstPartySetEntry( - owner1, net::SiteType::kAssociated, - absl::nullopt)}}), - SingleSet({{owner2, net::FirstPartySetEntry( - owner2, net::SiteType::kPrimary, - absl::nullopt)}, - {member2, net::FirstPartySetEntry( - owner2, net::SiteType::kAssociated, - absl::nullopt)}}), - SingleSet({{owner42, net::FirstPartySetEntry( - owner42, net::SiteType::kPrimary, - absl::nullopt)}, - {member42, net::FirstPartySetEntry( - owner42, net::SiteType::kAssociated, - absl::nullopt)}}), + SingleSet({{primary0, net::FirstPartySetEntry( + primary0, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site0, + net::FirstPartySetEntry( + primary0, net::SiteType::kAssociated, + absl::nullopt)}}), + SingleSet({{primary1, net::FirstPartySetEntry( + primary1, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site1, + net::FirstPartySetEntry( + primary1, net::SiteType::kAssociated, + absl::nullopt)}}), + SingleSet({{primary2, net::FirstPartySetEntry( + primary2, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site2, + net::FirstPartySetEntry( + primary2, net::SiteType::kAssociated, + absl::nullopt)}}), + SingleSet({{primary42, net::FirstPartySetEntry( + primary42, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site42, + net::FirstPartySetEntry( + primary42, net::SiteType::kAssociated, + absl::nullopt)}}), })), UnorderedElementsAre( - Pair(member0, + Pair(associated_site0, absl::make_optional(net::FirstPartySetEntry( - owner0, net::SiteType::kAssociated, absl::nullopt))), - Pair(member1, + primary0, net::SiteType::kAssociated, absl::nullopt))), + Pair(associated_site1, absl::make_optional(net::FirstPartySetEntry( - owner1, net::SiteType::kAssociated, absl::nullopt))), - Pair(member2, + primary1, net::SiteType::kAssociated, absl::nullopt))), + Pair(associated_site2, absl::make_optional(net::FirstPartySetEntry( - owner1, net::SiteType::kAssociated, absl::nullopt))), - Pair(member42, + primary1, net::SiteType::kAssociated, absl::nullopt))), + Pair(associated_site42, absl::make_optional(net::FirstPartySetEntry( - owner42, net::SiteType::kAssociated, absl::nullopt))), - Pair(owner0, absl::make_optional(net::FirstPartySetEntry( - owner0, net::SiteType::kPrimary, absl::nullopt))), - Pair(owner1, absl::make_optional(net::FirstPartySetEntry( - owner1, net::SiteType::kPrimary, absl::nullopt))), - Pair(owner2, absl::make_optional(net::FirstPartySetEntry( - owner1, net::SiteType::kAssociated, absl::nullopt))), - Pair(owner42, + primary42, net::SiteType::kAssociated, absl::nullopt))), + Pair(primary0, absl::make_optional(net::FirstPartySetEntry( - owner42, net::SiteType::kPrimary, absl::nullopt))))); + primary0, net::SiteType::kPrimary, absl::nullopt))), + Pair(primary1, + absl::make_optional(net::FirstPartySetEntry( + primary1, net::SiteType::kPrimary, absl::nullopt))), + Pair(primary2, + absl::make_optional(net::FirstPartySetEntry( + primary1, net::SiteType::kAssociated, absl::nullopt))), + Pair(primary42, + absl::make_optional(net::FirstPartySetEntry( + primary42, net::SiteType::kPrimary, absl::nullopt))))); } TEST(FirstPartySetsProfilePolicyCustomizations, - TransitiveOverlap_TwoCommonMembers) { - net::SchemefulSite owner0(GURL("https://owner0.test")); - net::SchemefulSite member0(GURL("https://member0.test")); - net::SchemefulSite owner1(GURL("https://owner1.test")); - net::SchemefulSite member1(GURL("https://member1.test")); - net::SchemefulSite owner2(GURL("https://owner2.test")); - net::SchemefulSite member2(GURL("https://member2.test")); - net::SchemefulSite owner42(GURL("https://owner42.test")); - net::SchemefulSite member42(GURL("https://member42.test")); - // {owner1, {member1}} and {owner2, {member2}} transitively overlap with the - // existing set. - // owner2 takes ownership of the normalized addition set since it was - // provided first. - // The other addition sets are unaffected. + TransitiveOverlap_TwoCommonAssociatedSites) { + net::SchemefulSite primary0(GURL("https://primary0.test")); + net::SchemefulSite associated_site0(GURL("https://associatedsite0.test")); + net::SchemefulSite primary1(GURL("https://primary1.test")); + net::SchemefulSite associated_site1(GURL("https://associatedsite1.test")); + net::SchemefulSite primary2(GURL("https://primary2.test")); + net::SchemefulSite associated_site2(GURL("https://associatedsite2.test")); + net::SchemefulSite primary42(GURL("https://primary42.test")); + net::SchemefulSite associated_site42(GURL("https://associatedsite42.test")); + // {primary1, {associated_site1}} and {primary2, {associated_site2}} + // transitively overlap with the existing set. primary2 takes primaryship of + // the normalized addition set since it was provided first. The other addition + // sets are unaffected. EXPECT_THAT( FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner2.test", {"https://owner1.test"}}})), + {{"https://primary2.test", {"https://primary1.test"}}})), FirstPartySetParser::ParsedPolicySetLists( /*replacement_list=*/{}, { - SingleSet({{owner0, net::FirstPartySetEntry( - owner0, net::SiteType::kPrimary, - absl::nullopt)}, - {member0, net::FirstPartySetEntry( - owner0, net::SiteType::kAssociated, - absl::nullopt)}}), - SingleSet({{owner2, net::FirstPartySetEntry( - owner2, net::SiteType::kPrimary, - absl::nullopt)}, - {member2, net::FirstPartySetEntry( - owner2, net::SiteType::kAssociated, - absl::nullopt)}}), - SingleSet({{owner1, net::FirstPartySetEntry( - owner1, net::SiteType::kPrimary, - absl::nullopt)}, - {member1, net::FirstPartySetEntry( - owner1, net::SiteType::kAssociated, - absl::nullopt)}}), - SingleSet({{owner42, net::FirstPartySetEntry( - owner42, net::SiteType::kPrimary, - absl::nullopt)}, - {member42, net::FirstPartySetEntry( - owner42, net::SiteType::kAssociated, - absl::nullopt)}}), + SingleSet({{primary0, net::FirstPartySetEntry( + primary0, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site0, + net::FirstPartySetEntry( + primary0, net::SiteType::kAssociated, + absl::nullopt)}}), + SingleSet({{primary2, net::FirstPartySetEntry( + primary2, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site2, + net::FirstPartySetEntry( + primary2, net::SiteType::kAssociated, + absl::nullopt)}}), + SingleSet({{primary1, net::FirstPartySetEntry( + primary1, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site1, + net::FirstPartySetEntry( + primary1, net::SiteType::kAssociated, + absl::nullopt)}}), + SingleSet({{primary42, net::FirstPartySetEntry( + primary42, net::SiteType::kPrimary, + absl::nullopt)}, + {associated_site42, + net::FirstPartySetEntry( + primary42, net::SiteType::kAssociated, + absl::nullopt)}}), })), UnorderedElementsAre( - Pair(member0, + Pair(associated_site0, absl::make_optional(net::FirstPartySetEntry( - owner0, net::SiteType::kAssociated, absl::nullopt))), - Pair(member1, + primary0, net::SiteType::kAssociated, absl::nullopt))), + Pair(associated_site1, absl::make_optional(net::FirstPartySetEntry( - owner2, net::SiteType::kAssociated, absl::nullopt))), - Pair(member2, + primary2, net::SiteType::kAssociated, absl::nullopt))), + Pair(associated_site2, absl::make_optional(net::FirstPartySetEntry( - owner2, net::SiteType::kAssociated, absl::nullopt))), - Pair(member42, + primary2, net::SiteType::kAssociated, absl::nullopt))), + Pair(associated_site42, absl::make_optional(net::FirstPartySetEntry( - owner42, net::SiteType::kAssociated, absl::nullopt))), - Pair(owner0, absl::make_optional(net::FirstPartySetEntry( - owner0, net::SiteType::kPrimary, absl::nullopt))), - Pair(owner1, absl::make_optional(net::FirstPartySetEntry( - owner2, net::SiteType::kAssociated, absl::nullopt))), - Pair(owner2, absl::make_optional(net::FirstPartySetEntry( - owner2, net::SiteType::kPrimary, absl::nullopt))), - Pair(owner42, + primary42, net::SiteType::kAssociated, absl::nullopt))), + Pair(primary0, absl::make_optional(net::FirstPartySetEntry( - owner42, net::SiteType::kPrimary, absl::nullopt))))); + primary0, net::SiteType::kPrimary, absl::nullopt))), + Pair(primary1, + absl::make_optional(net::FirstPartySetEntry( + primary2, net::SiteType::kAssociated, absl::nullopt))), + Pair(primary2, + absl::make_optional(net::FirstPartySetEntry( + primary2, net::SiteType::kPrimary, absl::nullopt))), + Pair(primary42, + absl::make_optional(net::FirstPartySetEntry( + primary42, net::SiteType::kPrimary, absl::nullopt))))); } // Existing set overlaps with both replacement and addition set. @@ -927,35 +957,36 @@ ReplacementsAndAdditions_SetListsOverlapWithSameExistingSet) { PolicyCustomization customization = FirstPartySetsHandlerImpl::ComputeEnterpriseCustomizations( - MakePublicFirstPartySets(MakeFlattenedSetsFromMap( - {{"https://owner1.test", - {"https://member1.test", "https://member2.test"}}})), + MakePublicFirstPartySets( + MakeFlattenedSetsFromMap({{"https://primary1.test", + {"https://associatedsite1.test", + "https://associatedsite2.test"}}})), MakeParsedPolicyFromMap( - /*replacements=*/{{"https://owner0.test", - {"https://member1.test"}}}, - /*additions=*/{ - {"https://owner1.test", {"https://new-member1.test"}}})); + /*replacements=*/{{"https://primary0.test", + {"https://associatedsite1.test"}}}, + /*additions=*/{{"https://primary1.test", + {"https://new-associatedsite1.test"}}})); EXPECT_THAT(customization, UnorderedElementsAre( - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner0.test")), + net::SchemefulSite(GURL("https://primary0.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner0.test"), + Pair(SerializesTo("https://primary0.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner0.test")), + net::SchemefulSite(GURL("https://primary0.test")), net::SiteType::kPrimary, absl::nullopt))), - Pair(SerializesTo("https://new-member1.test"), + Pair(SerializesTo("https://new-associatedsite1.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), + net::SchemefulSite(GURL("https://primary1.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), + net::SchemefulSite(GURL("https://primary1.test")), net::SiteType::kAssociated, absl::nullopt))), - Pair(SerializesTo("https://owner1.test"), + Pair(SerializesTo("https://primary1.test"), Optional(net::FirstPartySetEntry( - net::SchemefulSite(GURL("https://owner1.test")), + net::SchemefulSite(GURL("https://primary1.test")), net::SiteType::kPrimary, absl::nullopt))))); } -} // namespace content +} // namespace content \ No newline at end of file
diff --git a/content/browser/first_party_sets/first_party_sets_loader_unittest.cc b/content/browser/first_party_sets/first_party_sets_loader_unittest.cc index 661c482c..db88288 100644 --- a/content/browser/first_party_sets/first_party_sets_loader_unittest.cc +++ b/content/browser/first_party_sets/first_party_sets_loader_unittest.cc
@@ -95,7 +95,7 @@ TEST_F(FirstPartySetsLoaderTest, AcceptsMinimal) { const std::string input = - "{\"owner\": \"https://example.test\",\"members\": " + "{\"primary\": \"https://example.test\",\"associatedSites\": " "[\"https://aaaa.test\",],}"; SetComponentSets(loader(), input); // Set required input to make sure callback gets called. @@ -115,10 +115,10 @@ TEST_F(FirstPartySetsLoaderTest, AcceptsMultipleSets) { const std::string input = - "{\"owner\": \"https://example.test\",\"members\": " - "[\"https://member1.test\"]}\n" - "{\"owner\": \"https://foo.test\",\"members\": " - "[\"https://member2.test\"]}"; + "{\"primary\": \"https://example.test\",\"associatedSites\": " + "[\"https://associatedsite1.test\"]}\n" + "{\"primary\": \"https://foo.test\",\"associatedSites\": " + "[\"https://associatedsite2.test\"]}"; SetComponentSets(loader(), input); // Set required input to make sure callback gets called. @@ -130,7 +130,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), @@ -138,7 +138,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 0))))); @@ -146,12 +146,13 @@ TEST_F(FirstPartySetsLoaderTest, SetComponentSets_Idempotent) { std::string input = - R"({"owner": "https://example.test", "members": ["https://member1.test"]} -{"owner": "https://foo.test", "members": ["https://member2.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["https://associatedsite1.test"]} +{"primary": "https://foo.test", "associatedSites": ["https://associatedsite2.test"]})"; - std::string input2 = R"({ "owner": "https://example2.test", "members":)" - R"( ["https://member1.test"]} -{"owner": "https://foo2.test", "members": ["https://member2.test"]})"; + std::string input2 = + R"({ "primary": "https://example2.test", "associatedSites":)" + R"( ["https://associatedsite1.test"]} +{"primary": "https://foo2.test", "associatedSites": ["https://associatedsite2.test"]})"; SetComponentSets(loader(), input); SetComponentSets(loader(), input2); @@ -165,7 +166,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), @@ -173,7 +174,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 0))))); @@ -181,8 +182,8 @@ TEST_F(FirstPartySetsLoaderTest, OwnerIsOnlyMember) { const std::string input = - R"({"owner": "https://example.test", "members": ["https://example.test"]} -{"owner": "https://foo.test", "members": ["https://member2.test"]})"; + R"({"primary": "https://example.test", "associatedSites": ["https://example.test"]} +{"primary": "https://foo.test", "associatedSites": ["https://associatedsite2.test"]})"; SetComponentSets(loader(), input); // Set required input to make sure callback gets called. @@ -193,9 +194,9 @@ TEST_F(FirstPartySetsLoaderTest, OwnerIsMember) { const std::string input = - R"({"owner": "https://example.test", "members":)" - R"( ["https://example.test", "https://member1.test"]} -{"owner": "https://foo.test", "members": ["https://member2.test"]})"; + R"({"primary": "https://example.test", "associatedSites":)" + R"( ["https://example.test", "https://associatedsite1.test"]} +{"primary": "https://foo.test", "associatedSites": ["https://associatedsite2.test"]})"; SetComponentSets(loader(), input); // Set required input to make sure callback gets called. loader().SetManuallySpecifiedSet(""); @@ -205,10 +206,10 @@ TEST_F(FirstPartySetsLoaderTest, RepeatedMember) { const std::string input = - R"({"owner": "https://example.test", "members":)" - R"( ["https://member1.test", "https://member2.test",)" - R"( "https://member1.test"]} -{"owner": "https://foo.test", "members": ["https://member3.test"]})"; + R"({"primary": "https://example.test", "associatedSites":)" + R"( ["https://associatedsite1.test", "https://associatedsite2.test",)" + R"( "https://associatedsite1.test"]} +{"primary": "https://foo.test", "associatedSites": ["https://associatedsite3.test"]})"; SetComponentSets(loader(), input); // Set required input to make sure callback gets called. @@ -226,7 +227,7 @@ } TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Invalid_NotOrigins) { - loader().SetManuallySpecifiedSet("https://example.test,member1"); + loader().SetManuallySpecifiedSet("https://example.test,associatedsite1"); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -234,7 +235,8 @@ } TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Invalid_NotHTTPS) { - loader().SetManuallySpecifiedSet("https://example.test,http://member1.test"); + loader().SetManuallySpecifiedSet( + "https://example.test,http://associatedsite1.test"); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -244,7 +246,7 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Invalid_RegisteredDomain_Owner) { loader().SetManuallySpecifiedSet( - "https://www.example.test..,https://www.member.test"); + "https://www.example.test..,https://www.associatedsite.test"); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -254,7 +256,7 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Invalid_RegisteredDomain_Member) { loader().SetManuallySpecifiedSet( - "https://www.example.test,https://www.member.test.."); + "https://www.example.test,https://www.associatedsite.test.."); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -262,7 +264,8 @@ } TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Valid_SingleMember) { - loader().SetManuallySpecifiedSet("https://example.test,https://member.test"); + loader().SetManuallySpecifiedSet( + "https://example.test,https://associatedsite.test"); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -272,7 +275,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member.test"), + Pair(SerializesTo("https://associatedsite.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0))))); @@ -281,7 +284,7 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Valid_SingleMember_RegisteredDomain) { loader().SetManuallySpecifiedSet( - "https://www.example.test,https://www.member.test"); + "https://www.example.test,https://www.associatedsite.test"); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -291,7 +294,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member.test"), + Pair(SerializesTo("https://associatedsite.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0))))); @@ -299,7 +302,8 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Valid_MultipleMembers) { loader().SetManuallySpecifiedSet( - "https://example.test,https://member1.test,https://member2.test"); + "https://example.test,https://associatedsite1.test,https://" + "associatedsite2.test"); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -309,11 +313,11 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 1))))); @@ -330,7 +334,7 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Valid_OwnerIsMember) { loader().SetManuallySpecifiedSet( - "https://example.test,https://example.test,https://member1.test"); + "https://example.test,https://example.test,https://associatedsite1.test"); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -340,7 +344,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0))))); @@ -348,9 +352,9 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_Valid_RepeatedMember) { loader().SetManuallySpecifiedSet(R"(https://example.test, -https://member1.test, -https://member2.test, -https://member1.test)"); +https://associatedsite1.test, +https://associatedsite2.test, +https://associatedsite1.test)"); // Set required input to make sure callback gets called. SetComponentSets(loader(), ""); @@ -360,23 +364,25 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 1))))); } TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_DeduplicatesOwnerOwner) { - const std::string input = R"({"owner": "https://example.test", "members": )" - R"(["https://member2.test", "https://member3.test"]} -{"owner": "https://bar.test", "members": ["https://member4.test"]})"; + const std::string input = + R"({"primary": "https://example.test", "associatedSites": )" + R"(["https://associatedsite2.test", "https://associatedsite3.test"]} +{"primary": "https://bar.test", "associatedSites": ["https://associatedsite4.test"]})"; SetComponentSets(loader(), input); loader().SetManuallySpecifiedSet( - "https://example.test,https://member1.test,https://member2.test"); + "https://example.test,https://associatedsite1.test,https://" + "associatedsite2.test"); EXPECT_THAT(WaitAndGetResult(), PublicSetsAre(UnorderedElementsAre( @@ -384,11 +390,11 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 1)), @@ -396,7 +402,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://bar.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member4.test"), + Pair(SerializesTo("https://associatedsite4.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://bar.test")), net::SiteType::kAssociated, 0))))); @@ -404,12 +410,14 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_DeduplicatesOwnerMember) { - const std::string input = R"({"owner": "https://foo.test", "members": )" - R"(["https://member1.test", "https://example.test"]} -{"owner": "https://bar.test", "members": ["https://member2.test"]})"; + const std::string input = + R"({"primary": "https://foo.test", "associatedSites": )" + R"(["https://associatedsite1.test", "https://example.test"]} +{"primary": "https://bar.test", "associatedSites": ["https://associatedsite2.test"]})"; SetComponentSets(loader(), input); loader().SetManuallySpecifiedSet( - "https://example.test,https://member1.test,https://member3.test"); + "https://example.test,https://associatedsite1.test,https://" + "associatedsite3.test"); EXPECT_THAT(WaitAndGetResult(), PublicSetsAre(UnorderedElementsAre( @@ -417,11 +425,11 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), - Pair(SerializesTo("https://member3.test"), + Pair(SerializesTo("https://associatedsite3.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 1)), @@ -429,7 +437,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://bar.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://bar.test")), net::SiteType::kAssociated, 0))))); @@ -437,11 +445,13 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_DeduplicatesMemberOwner) { - const std::string input = R"({"owner": "https://foo.test", "members": )" - R"(["https://member1.test", "https://member2.test"]} -{"owner": "https://member3.test", "members": ["https://member4.test"]})"; + const std::string input = + R"({"primary": "https://foo.test", "associatedSites": )" + R"(["https://associatedsite1.test", "https://associatedsite2.test"]} +{"primary": "https://associatedsite3.test", "associatedSites": ["https://associatedsite4.test"]})"; SetComponentSets(loader(), input); - loader().SetManuallySpecifiedSet("https://example.test,https://member3.test"); + loader().SetManuallySpecifiedSet( + "https://example.test,https://associatedsite3.test"); EXPECT_THAT(WaitAndGetResult(), PublicSetsAre(UnorderedElementsAre( @@ -449,7 +459,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member3.test"), + Pair(SerializesTo("https://associatedsite3.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), @@ -457,11 +467,11 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 0)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 1))))); @@ -469,12 +479,14 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_DeduplicatesMemberMember) { - const std::string input = R"({"owner": "https://foo.test", "members": )" - R"(["https://member2.test", "https://member3.test"]} -{"owner": "https://bar.test", "members": ["https://member4.test"]})"; + const std::string input = + R"({"primary": "https://foo.test", "associatedSites": )" + R"(["https://associatedsite2.test", "https://associatedsite3.test"]} +{"primary": "https://bar.test", "associatedSites": ["https://associatedsite4.test"]})"; SetComponentSets(loader(), input); loader().SetManuallySpecifiedSet( - "https://example.test,https://member1.test,https://member2.test"); + "https://example.test,https://associatedsite1.test,https://" + "associatedsite2.test"); EXPECT_THAT(WaitAndGetResult(), PublicSetsAre(UnorderedElementsAre( @@ -482,11 +494,11 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)), - Pair(SerializesTo("https://member2.test"), + Pair(SerializesTo("https://associatedsite2.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 1)), @@ -494,7 +506,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member3.test"), + Pair(SerializesTo("https://associatedsite3.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://foo.test")), net::SiteType::kAssociated, 1)), @@ -502,7 +514,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://bar.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member4.test"), + Pair(SerializesTo("https://associatedsite4.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://bar.test")), net::SiteType::kAssociated, 0))))); @@ -511,9 +523,10 @@ TEST_F(FirstPartySetsLoaderTest, SetsManuallySpecified_PrunesInducedSingletons) { const std::string input = - R"({"owner": "https://foo.test", "members": ["https://member1.test"]})"; + R"({"primary": "https://foo.test", "associatedSites": ["https://associatedsite1.test"]})"; SetComponentSets(loader(), input); - loader().SetManuallySpecifiedSet("https://example.test,https://member1.test"); + loader().SetManuallySpecifiedSet( + "https://example.test,https://associatedsite1.test"); // If we just erased entries that overlapped with the manually-supplied // set, https://foo.test would be left as a singleton set. But since we @@ -525,7 +538,7 @@ net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kPrimary, absl::nullopt)), - Pair(SerializesTo("https://member1.test"), + Pair(SerializesTo("https://associatedsite1.test"), net::FirstPartySetEntry( net::SchemefulSite(GURL("https://example.test")), net::SiteType::kAssociated, 0)))));
diff --git a/content/browser/interest_group/auction_runner_unittest.cc b/content/browser/interest_group/auction_runner_unittest.cc index ddf4fb4a..a1cb1153 100644 --- a/content/browser/interest_group/auction_runner_unittest.cc +++ b/content/browser/interest_group/auction_runner_unittest.cc
@@ -7860,6 +7860,16 @@ // using its priority vector is negative, so it should be filtered out, and // there should be no winner. TEST_F(AuctionRunnerTest, PriorityVectorFiltersOnlyGroup) { + // Only include bidder 1. Having a second bidder results in following a + // slightly different path. With two bidders, the first bidder loads an + // interest group, which is filtered, and then the bidder is deleted. Then the + // second bidder loads no interest groups, and the auction is deleted. With a + // single bidder, the auction is deleted immediately after filtering out the + // bidders, which potentially affects the dangling pointer detection code, + // since the discarded BuyerHelper must be deleted before the + // InterestGroupAuction it has a pointer to. + interest_group_buyers_ = {{kBidder1}}; + auction_worklet::AddJavascriptResponse(&url_loader_factory_, kBidder1Url, MakeBidScriptSupportsTie()); std::vector<StorageInterestGroup> bidders;
diff --git a/content/browser/renderer_host/close_listener_host_browsertest.cc b/content/browser/renderer_host/close_listener_host_browsertest.cc index f774276..cd0c07f1 100644 --- a/content/browser/renderer_host/close_listener_host_browsertest.cc +++ b/content/browser/renderer_host/close_listener_host_browsertest.cc
@@ -26,6 +26,8 @@ void SetUpCommandLine(base::CommandLine* command_line) override { command_line->AppendSwitch( switches::kEnableExperimentalWebPlatformFeatures); + command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures, + "CloseWatcher"); } WebContentsImpl* web_contents() const {
diff --git a/content/browser/renderer_host/input/web_input_event_builders_android_unittest.cc b/content/browser/renderer_host/input/web_input_event_builders_android_unittest.cc index 375b99752f..8b78c0c 100644 --- a/content/browser/renderer_host/input/web_input_event_builders_android_unittest.cc +++ b/content/browser/renderer_host/input/web_input_event_builders_android_unittest.cc
@@ -175,13 +175,6 @@ TEST(WebInputEventBuilderAndroidTest, CutCopyPasteKey) { JNIEnv* env = AttachCurrentThread(); - // The minimum Android NDK does not provide values for these yet: - enum { - AKEYCODE_CUT = 277, - AKEYCODE_COPY = 278, - AKEYCODE_PASTE = 279, - }; - struct DomKeyTestCase { int key_code; ui::DomKey key;
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm index 5583b24d..2d106cb 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -828,10 +828,8 @@ display::ScreenInfos new_screen_infos = original_screen_infos_; const float old_device_scale_factor = new_screen_infos.current().device_scale_factor; - // On MacOS, device_scale_factor needs to be an integer value, so - // we need to round the final scale to the nearest whole number. new_screen_infos.mutable_current().device_scale_factor = - std::round(old_device_scale_factor * scale_override_for_capture_); + old_device_scale_factor * scale_override_for_capture_; if (screen_infos_ != new_screen_infos) { DVLOG(1) << __func__ << ": Overriding device_scale_factor from " << old_device_scale_factor << " to "
diff --git a/content/browser/screen_orientation/screen_orientation_browsertest.cc b/content/browser/screen_orientation/screen_orientation_browsertest.cc index 119f91a6..823f784 100644 --- a/content/browser/screen_orientation/screen_orientation_browsertest.cc +++ b/content/browser/screen_orientation/screen_orientation_browsertest.cc
@@ -271,9 +271,11 @@ GURL test_url = GetTestUrl("screen_orientation", "screen_orientation_lock_disabled.html"); - TestNavigationObserver navigation_observer(shell()->web_contents(), 1); - shell()->LoadURL(test_url); - navigation_observer.Wait(); + { + TestNavigationObserver navigation_observer(shell()->web_contents(), 1); + shell()->LoadURL(test_url); + navigation_observer.Wait(); + } { ASSERT_TRUE(ExecJs(shell(), "run();"));
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc index 2044c41c0..4d286a4 100644 --- a/content/browser/tracing/tracing_controller_impl.cc +++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -66,6 +66,7 @@ #endif #if BUILDFLAG(IS_WIN) +#include <windows.h> #include "base/win/registry.h" #include "base/win/win_util.h" #include "base/win/windows_version.h" @@ -296,6 +297,10 @@ } } + metadata_dict.Set("module-apphelp", (::GetModuleHandle(L"apphelp.dll")) + ? "Loaded" + : "NotLoaded"); + metadata_dict.Set("os-session", base::win::IsCurrentSessionRemote() ? "remote" : "local"); #endif
diff --git a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt index 7ee06f5..38a1c20 100644 --- a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt
@@ -849,7 +849,7 @@ crbug.com/1218607 [ chromeos chromeos-board-amd64-generic no-passthrough ] conformance2/reading/read-pixels-from-fbo-test.html [ Failure ] crbug.com/1221362 [ chromeos chromeos-board-amd64-generic ] conformance2/rendering/blitframebuffer-filter-outofbounds.html [ Failure ] crbug.com/1221362 [ chromeos chromeos-board-amd64-generic ] conformance2/rendering/blitframebuffer-filter-srgb.html [ Failure ] -crbug.com/1221365 [ chromeos chromeos-board-amd64-generic ] deqp/data/gles3/shaders/swizzles.html [ Failure ] +crbug.com/1221365 [ chromeos chromeos-board-amd64-generic ] deqp/data/gles3/shaders/swizzles* [ Failure ] crbug.com/1223542 [ chromeos chromeos-board-amd64-generic ] deqp/functional/gles3/framebufferblit/rect_03.html [ Failure ] crbug.com/1223542 [ chromeos chromeos-board-amd64-generic ] deqp/functional/gles3/framebufferblit/rect_04.html [ Failure ] # TODO(crbug.com/1276153) uncomment after fix for updated part of test applies
diff --git a/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt index fd51d83..a611857 100644 --- a/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt
@@ -232,9 +232,9 @@ crbug.com/1175419 [ fuchsia ] conformance/extensions/khr-parallel-shader-compile.html [ Skip ] crbug.com/angleproject/5259 [ fuchsia ] conformance/uniforms/uniform-default-values.html [ Skip ] crbug.com/871352 [ fuchsia ] conformance/uniforms/uniform-samplers-test.html [ Skip ] -crbug.com/1143424 [ fuchsia ] deqp/data/gles2/shaders/conversions.html [ Skip ] +crbug.com/1143424 [ fuchsia ] deqp/data/gles2/shaders/conversions* [ Skip ] crbug.com/478572 [ fuchsia ] deqp/data/gles2/shaders/functions.html [ Skip ] -crbug.com/angleproject/3111 [ fuchsia ] deqp/data/gles2/shaders/swizzles.html [ Skip ] +crbug.com/angleproject/3111 [ fuchsia ] deqp/data/gles2/shaders/swizzles* [ Skip ] crbug.com/1218708 [ fuchsia ] conformance/rendering/many-draw-calls.html [ Skip ] crbug.com/1145858 [ fuchsia ] conformance/extensions/ext-disjoint-timer-query.html [ Skip ] @@ -593,6 +593,10 @@ crbug.com/1338214 [ android android-Nexus-5 passthrough ] conformance/textures/misc/texture-upload-size.html [ Failure ] crbug.com/1338214 [ android android-Nexus-5 passthrough ] WebglExtension_OES_texture_float_linear [ Failure ] +crbug.com/1357064 [ android android-nexus-5 no-passthrough ] conformance/rendering/blending.html [ Failure ] +crbug.com/1359027 [ android android-nexus-5 ] conformance/attribs/gl-enable-vertex-attrib.html [ Failure ] +crbug.com/1359027 [ android android-nexus-5 ] conformance/extensions/angle-instanced-arrays.html [ Failure ] + # Started failing after the upgrade to Marshmallow. crbug.com/1264880 [ android-marshmallow android-nexus-5 ] conformance/extensions/webgl-multi-draw.html [ Failure ] crbug.com/1264882 [ android-marshmallow android-nexus-5 ] conformance/glsl/bugs/sketchfab-lighting-shader-crash.html [ Failure ] @@ -600,14 +604,14 @@ # Nexus 5X # Was timing out randomly on android_optional_gpu_tests_rel, but became so # flaky (2018-09-10) that it had to be upgraded to Fail. -crbug.com/882323 [ android android-nexus-5x ] deqp/data/gles2/shaders/conversions.html [ Failure ] +crbug.com/882323 [ android android-nexus-5x ] deqp/data/gles2/shaders/conversions* [ Failure ] crbug.com/609883 [ android android-nexus-5x ] conformance/glsl/bugs/sampler-struct-function-arg.html [ Failure ] crbug.com/1043431 [ android android-nexus-5x ] conformance/limits/gl-max-texture-dimensions.html [ RetryOnFailure ] crbug.com/951628 [ android android-nexus-5x no-passthrough ] conformance/rendering/blending.html [ Failure ] crbug.com/1083320 [ android android-nexus-5x ] conformance/misc/uninitialized-test.html [ Failure ] crbug.com/1056830 [ android android-nexus-5x ] conformance/extensions/webgl-compressed-texture-astc.html [ Failure ] # Timing out on this device for unknown reasons. -crbug.com/1099148 [ android android-nexus-5x ] deqp/data/gles2/shaders/swizzles.html [ Failure ] +crbug.com/1099148 [ android android-nexus-5x ] deqp/data/gles2/shaders/swizzles* [ Failure ] crbug.com/1122644 [ android android-nexus-5x ] conformance/textures/misc/texture-upload-size.html [ Failure ] crbug.com/1270815 [ android android-nexus-5x ] conformance/textures/misc/texture-size.html [ RetryOnFailure ] # Flakily returning RGBA(0,0,0,0) for pixels in video related tests @@ -675,8 +679,8 @@ # crbug.com/957807 [ chromeos ] conformance/context/context-attributes-alpha-depth-stencil-antialias.html [ Failure ] crbug.com/957807 [ chromeos ] conformance/rendering/clipping-wide-points.html [ Failure ] crbug.com/957807 [ chromeos ] conformance/uniforms/uniform-samplers-test.html [ Failure ] -crbug.com/957807 [ chromeos ] deqp/data/gles2/shaders/conversions.html [ Failure ] -crbug.com/957807 [ chromeos ] deqp/data/gles2/shaders/swizzles.html [ Failure ] +crbug.com/957807 [ chromeos ] deqp/data/gles2/shaders/conversions* [ Failure ] +crbug.com/957807 [ chromeos ] deqp/data/gles2/shaders/swizzles* [ Failure ] # finder:disable-unused Reported by Intel but not currently testable in Chromium crbug.com/1237319 [ chromeos chromeos-board-eve passthrough intel ] conformance/textures/misc/texture-size-limit.html [ Failure ] @@ -699,6 +703,7 @@ # Failing on chromeos-amd64-generic-rel. crbug.com/1232446 [ chromeos chromeos-board-amd64-generic ] conformance/rendering/gl-scissor-test.html [ Failure ] crbug.com/1271227 [ chromeos chromeos-board-amd64-generic ] conformance/attribs/gl-bindAttribLocation-aliasing.html [ RetryOnFailure ] +crbug.com/1357064 [ chromeos chromeos-board-amd64-generic no-passthrough ] conformance/rendering/blending.html [ Failure ] # Failures on validating command decoder only; won't fix. crbug.com/angleproject/5038 [ chromeos no-passthrough ] conformance/extensions/ext-color-buffer-half-float.html [ Failure ]
diff --git a/content/test/gpu/gpu_tests/test_expectations_unittest.py b/content/test/gpu/gpu_tests/test_expectations_unittest.py index 2da46fb..d25a91e 100644 --- a/content/test/gpu/gpu_tests/test_expectations_unittest.py +++ b/content/test/gpu/gpu_tests/test_expectations_unittest.py
@@ -302,7 +302,8 @@ if not 'WebglExtension_' in pattern: full_path = os.path.normpath( os.path.join(webgl_test_util.conformance_path, pattern)) - self.assertTrue(os.path.exists(full_path)) + self.assertTrue(os.path.exists(full_path), + '%s does not exist' % full_path) webgl_test_class = ( webgl_conformance_integration_test.WebGLConformanceIntegrationTest)
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_revision.txt b/content/test/gpu/gpu_tests/webgl_conformance_revision.txt index 9823836..c54774d 100644 --- a/content/test/gpu/gpu_tests/webgl_conformance_revision.txt +++ b/content/test/gpu/gpu_tests/webgl_conformance_revision.txt
@@ -1,3 +1,3 @@ # AUTOGENERATED FILE - DO NOT EDIT # SEE roll_webgl_conformance.py -Current webgl revision 44e4c8770158c505b03ee7feafa4859d083b0912 +Current webgl revision d1b65aa5a88f6efd900604dfcda840154e9f16e2
diff --git a/device/vr/android/arcore/arcore_gl.cc b/device/vr/android/arcore/arcore_gl.cc index 2dd51af..e044c29 100644 --- a/device/vr/android/arcore/arcore_gl.cc +++ b/device/vr/android/arcore/arcore_gl.cc
@@ -696,10 +696,10 @@ // Warn the compositor that we're expecting to have data to submit this frame. if (ar_compositor_) { base::TimeDelta frametime = EstimatedArCoreFrameTime(); - base::TimeTicks now = base::TimeTicks::Now(); base::TimeDelta render_margin = kScheduleFrametimeMarginForRender * frametime; - base::TimeTicks deadline = now + (frametime - render_margin); + base::TimeTicks deadline = + base::TimeTicks::Now() + (frametime - render_margin); ar_compositor_->RequestBeginFrame(frametime, deadline); }
diff --git a/docs/updater/dev_manual.md b/docs/updater/dev_manual.md index dac72503..1472c017 100644 --- a/docs/updater/dev_manual.md +++ b/docs/updater/dev_manual.md
@@ -11,14 +11,27 @@ quickly. ### Adding Builders * Update files as needed: - * `testing/buildbot/chromium.updater.json` - * `testing/buildbot/waterfalls.pyl` - * `infra/config/subprojects/chromium/ci/chromium.updater.star` -* Run the following command to generate LUCI config files: - ``` - lucicfg infra\config\main.star - ``` -* Reference CL: https://crrev.com/c/3472270 + - `testing/buildbot/waterfalls.pyl` + - `infra/config/subprojects/chromium/ci/chromium.updater.star` +* Re-generate `chromium.updater.json`: +``` +vpython3 .\testing\buildbot\generate_buildbot_json.py +``` + +* (Optional) Re-format the builder definition file if necessary. +``` +lucicfg fmt .\infra\config\subprojects\chromium\ci\chromium.updater.star +``` + +* Generate builder property and configuration files: + +``` +lucicfg infra\config\main.star +git add . +``` + +* Reference CL: https://crrev.com/c/3864352 + ### Update builder configuration Each builder has a configuration that governs the GN args. The mapping is defined in file `tools/mb/mb_config.pyl`. Steps to update the config:
diff --git a/extensions/common/BUILD.gn b/extensions/common/BUILD.gn index 827f88c8..792d49a 100644 --- a/extensions/common/BUILD.gn +++ b/extensions/common/BUILD.gn
@@ -578,6 +578,7 @@ "manifest_handlers/incognito_manifest_unittest.cc", "manifest_handlers/kiosk_mode_info_unittest.cc", "manifest_handlers/manifest_v3_permissions_unittest.cc", + "manifest_handlers/mime_types_handler_unittest.cc", "manifest_handlers/oauth2_manifest_unittest.cc", "manifest_handlers/replacement_apps_unittest.cc", "manifest_handlers/shared_module_manifest_unittest.cc",
diff --git a/extensions/common/manifest_handlers/mime_types_handler_unittest.cc b/extensions/common/manifest_handlers/mime_types_handler_unittest.cc new file mode 100644 index 0000000..a8ead6d --- /dev/null +++ b/extensions/common/manifest_handlers/mime_types_handler_unittest.cc
@@ -0,0 +1,68 @@ +// Copyright 2022 The Chromium Authors. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "extensions/common/manifest_handlers/mime_types_handler.h" + +#include <string> + +#include "base/memory/scoped_refptr.h" +#include "base/test/values_test_util.h" +#include "extensions/common/constants.h" +#include "extensions/common/extension.h" +#include "extensions/common/manifest_test.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace extensions { + +namespace { + +using ::testing::ElementsAre; + +using MimeTypesHandlerNotAllowedTest = ManifestTest; + +class MimeTypesHandlerTest : public ManifestTest { + protected: + std::string GetTestExtensionID() const override { + // Extension ID must correspond to a hashed extension ID in the allowlist + // for "mime_types" and "mime_types_handler" in _manifest_features.json. + return extension_misc::kMimeHandlerPrivateTestExtensionId; + } +}; + +} // namespace + +TEST_F(MimeTypesHandlerNotAllowedTest, Load) { + scoped_refptr<Extension> extension = + LoadAndExpectSuccess(ManifestData(base::test::ParseJson(R"({ + "name": "Test Extension", + "manifest_version": 3, + "version": "0.1", + "mime_types": ["text/plain", "application/octet-stream"], + "mime_types_handler": "index.html" + })"))); + ASSERT_TRUE(extension); + + EXPECT_FALSE(MimeTypesHandler::GetHandler(extension.get())); +} + +TEST_F(MimeTypesHandlerTest, Load) { + scoped_refptr<Extension> extension = + LoadAndExpectSuccess(ManifestData(base::test::ParseJson(R"({ + "name": "Test Extension", + "manifest_version": 3, + "version": "0.1", + "mime_types": ["text/plain", "application/octet-stream"], + "mime_types_handler": "index.html" + })"))); + ASSERT_TRUE(extension); + + MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension.get()); + ASSERT_TRUE(handler); + + EXPECT_THAT(handler->mime_type_set(), + ElementsAre("application/octet-stream", "text/plain")); +} + +} // namespace extensions
diff --git a/google_apis/BUILD.gn b/google_apis/BUILD.gn index f904395..e696c43 100644 --- a/google_apis/BUILD.gn +++ b/google_apis/BUILD.gn
@@ -17,13 +17,14 @@ # Set the variable to false to not use the internal file, even for # Chrome-branded builds or when it exists in your checkout. # - # Leave it set to "" to have the variable implicitly set to true for - # Chrome-branded builds or if - # //src/google_apis/internal/google_chrome_api_keys.h is present and false - # otherwise. - # This does not apply to iOS builds, which use different mechanisms and always - # evaluate to use_official_google_api_keys=false. - # See https://crbug.com/1183709. + # Leave it unset or set to "" to have the variable + # implicitly set to true if you have + # src/google_apis/internal/google_chrome_api_keys.h in your + # checkout, and implicitly set to false if not. + # + # Note that Chrome-branded builds always behave as if the variable + # was explicitly set to true, i.e. they always use official keys, + # and will fail to build if the internal file is missing. use_official_google_api_keys = "" # Set these to bake the specified API keys and OAuth client @@ -35,8 +36,9 @@ # require server-side APIs may fail to work if no keys are # provided. # - # Note that if `use_official_google_api_keys` has been set to true - # (explicitly or implicitly), these values will be ignored and the official + # Note that when building a Chrome-branded build or if + # `use_official_google_api_keys` has been set to `true` (explicitly or + # implicitly), these values will be ignored and the official # keys will be used instead. google_api_key = "" @@ -48,42 +50,21 @@ } if (use_official_google_api_keys == "") { - # No override set. Determine the default behavior. - if (is_chrome_branded) { - # Chrome-branded builds default to behaving as if - #`use_official_google_api_keys` was explicitly set to true and will fail to - # build if the file is missing. - use_official_google_api_keys = true - - # TODO(crbug.com/1294931): Remove this override when fixing the issue. - if (is_fuchsia) { - use_official_google_api_keys = false - } - } else { - # Check if the key file exists. - check_internal_result = - exec_script("build/check_internal.py", - [ rebase_path("internal/google_chrome_api_keys.h", - root_build_dir) ], - "value") - use_official_google_api_keys = check_internal_result == 1 - } + # Default behavior, check if the key file exists. + check_internal_result = + exec_script("build/check_internal.py", + [ rebase_path("internal/google_chrome_api_keys.h", + root_build_dir) ], + "value") + use_official_google_api_keys = check_internal_result == 1 } -# Official API keys should always be used for Chrome-branded builds except on -# iOS (see https://crbug.com/1183709) and Fuchsia (see the description of -# https://crbug.com/1171510 for background). -assert( - use_official_google_api_keys || !is_chrome_branded || is_ios || is_fuchsia) - -# This arg should always be false on iOS. See https://crbug.com/1183709. -assert(!use_official_google_api_keys || !is_ios) - config("key_defines") { defines = [] - # On iOS, Chrome branding controls this define. See https://crbug.com/1183709. - if (use_official_google_api_keys || (is_ios && is_chrome_branded)) { + # TODO(crbug.com/1294915): Refactor so use_official_google_api_keys can be + # used for Fuchsia. + if (!is_fuchsia && (is_chrome_branded || use_official_google_api_keys)) { defines += [ "USE_OFFICIAL_GOOGLE_API_KEYS=1" ] } if (google_api_key != "") { @@ -162,8 +143,7 @@ "//services/network/public/cpp", ] - # On iOS, Chrome branding controls this deps. See https://crbug.com/1183709. - if (use_official_google_api_keys || (is_ios && is_chrome_branded)) { + if (is_chrome_branded || use_official_google_api_keys) { deps += [ "internal:generate_metrics_key_header" ] }
diff --git a/google_apis/google_api_keys.cc b/google_apis/google_api_keys.cc index ea30106..81bbb67 100644 --- a/google_apis/google_api_keys.cc +++ b/google_apis/google_api_keys.cc
@@ -205,8 +205,7 @@ } std::string api_key() const { return api_key_; } -#if BUILDFLAG(IS_IOS) || \ - (BUILDFLAG(IS_FUCHSIA) && !defined(USE_OFFICIAL_GOOGLE_API_KEYS)) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) void set_api_key(const std::string& api_key) { api_key_ = api_key; } #endif std::string api_key_non_stable() const { return api_key_non_stable_; } @@ -302,10 +301,7 @@ } if (key_value == DUMMY_API_TOKEN) { -// iOS does not use USE_OFFICIAL_GOOGLE_API_KEYS. See https://crbug.com/1183709. -// TODO(Tcrbug.com/1183709): The GN logic is inconsistent with this. -#if defined(USE_OFFICIAL_GOOGLE_API_KEYS) || \ - (BUILDFLAG(IS_IOS) && BUILDFLAG(GOOGLE_CHROME_BRANDING)) +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_FUCHSIA) // No key should be unset in an official build except the // GOOGLE_DEFAULT_* keys. The default keys don't trigger this // check as their "unset" value is not DUMMY_API_TOKEN. @@ -373,8 +369,7 @@ return g_api_key_cache.Get().api_key_fresnel(); } -#if BUILDFLAG(IS_IOS) || \ - (BUILDFLAG(IS_FUCHSIA) && !defined(USE_OFFICIAL_GOOGLE_API_KEYS)) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) void SetAPIKey(const std::string& api_key) { g_api_key_cache.Get().set_api_key(api_key); }
diff --git a/google_apis/google_api_keys.h b/google_apis/google_api_keys.h index 0e07680..1f0b4e6b6 100644 --- a/google_apis/google_api_keys.h +++ b/google_apis/google_api_keys.h
@@ -89,8 +89,7 @@ // Retrieves the Fresnel API Key. std::string GetFresnelAPIKey(); -#if BUILDFLAG(IS_IOS) || \ - (BUILDFLAG(IS_FUCHSIA) && !defined(USE_OFFICIAL_GOOGLE_API_KEYS)) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) // Sets the API key. This should be called as early as possible before this // API key is even accessed. It must be called before GetAPIKey. // TODO(https://crbug.com/1166007): Enforce this is called before GetAPIKey.
diff --git "a/infra/config/generated/builders/ci/GPU FYI Mac Builder \050asan\051/properties.json" "b/infra/config/generated/builders/ci/GPU FYI Mac Builder \050asan\051/properties.json" index ee3d727..1c9949f 100644 --- "a/infra/config/generated/builders/ci/GPU FYI Mac Builder \050asan\051/properties.json" +++ "b/infra/config/generated/builders/ci/GPU FYI Mac Builder \050asan\051/properties.json"
@@ -1,8 +1,8 @@ { - "$build/goma": { - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 250, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/ios-catalyst/properties.json b/infra/config/generated/builders/ci/ios-catalyst/properties.json index 32497f9..f8f0f32 100644 --- a/infra/config/generated/builders/ci/ios-catalyst/properties.json +++ b/infra/config/generated/builders/ci/ios-catalyst/properties.json
@@ -63,5 +63,5 @@ "chromium", "ios" ], - "xcode_build_version": "13c100" + "xcode_build_version": "14a5294g" } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-updater-builder-dbg/properties.json b/infra/config/generated/builders/ci/win-updater-builder-dbg/properties.json index f1706766..39a8001 100644 --- a/infra/config/generated/builders/ci/win-updater-builder-dbg/properties.json +++ b/infra/config/generated/builders/ci/win-updater-builder-dbg/properties.json
@@ -81,6 +81,34 @@ "project": "chromium" } } + }, + { + "builder_id": { + "bucket": "ci", + "builder": "win11-updater-tester-dbg-uac", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.updater", + "execution_mode": "TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Release", + "config": "chromium", + "target_bits": 64, + "target_platform": "win" + }, + "legacy_gclient_config": { + "config": "chromium" + }, + "parent": { + "bucket": "ci", + "builder": "win-updater-builder-dbg", + "project": "chromium" + } + } } ] }, @@ -101,6 +129,11 @@ "bucket": "ci", "builder": "win10-updater-tester-dbg-uac", "project": "chromium" + }, + { + "bucket": "ci", + "builder": "win11-updater-tester-dbg-uac", + "project": "chromium" } ], "mirroring_builder_group_and_names": [
diff --git a/infra/config/generated/builders/ci/win11-updater-tester-dbg-uac/properties.json b/infra/config/generated/builders/ci/win11-updater-tester-dbg-uac/properties.json new file mode 100644 index 0000000..f8d4eb4 --- /dev/null +++ b/infra/config/generated/builders/ci/win11-updater-tester-dbg-uac/properties.json
@@ -0,0 +1,77 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "win-updater-builder-dbg", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.updater", + "execution_mode": "COMPILE_AND_TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Release", + "config": "chromium", + "target_bits": 64, + "target_platform": "win" + }, + "legacy_gclient_config": { + "config": "chromium" + } + } + }, + { + "builder_id": { + "bucket": "ci", + "builder": "win11-updater-tester-dbg-uac", + "project": "chromium" + }, + "builder_spec": { + "builder_group": "chromium.updater", + "execution_mode": "TEST", + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Release", + "config": "chromium", + "target_bits": 64, + "target_platform": "win" + }, + "legacy_gclient_config": { + "config": "chromium" + }, + "parent": { + "bucket": "ci", + "builder": "win-updater-builder-dbg", + "project": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "win11-updater-tester-dbg-uac", + "project": "chromium" + } + ] + } + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "chromium.updater", + "recipe": "chromium" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/ios-catalyst/properties.json b/infra/config/generated/builders/try/ios-catalyst/properties.json index 3b7d80f..3191258e 100644 --- a/infra/config/generated/builders/try/ios-catalyst/properties.json +++ b/infra/config/generated/builders/try/ios-catalyst/properties.json
@@ -53,5 +53,5 @@ }, "builder_group": "tryserver.chromium.mac", "recipe": "chromium_trybot", - "xcode_build_version": "13c100" + "xcode_build_version": "14a5294g" } \ No newline at end of file
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index 0e91217..448b0ac 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -32302,8 +32302,8 @@ '}' execution_timeout_secs: 10800 caches { - name: "xcode_ios_13c100" - path: "xcode_ios_13c100.app" + name: "xcode_ios_14a5294g" + path: "xcode_ios_14a5294g.app" } build_numbers: YES service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" @@ -44158,6 +44158,86 @@ } } builders { + name: "win11-updater-tester-dbg-uac" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "free_space:standard" + dimensions: "os:Ubuntu-18.04" + dimensions: "pool:luci.chromium.ci" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/ci/win11-updater-tester-dbg-uac/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "chromium.updater",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium"' + '}' + execution_timeout_secs: 10800 + build_numbers: YES + service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_ci_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_ci_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*blink_wpt_tests/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + } + builders { name: "win32-archive-dbg" swarming_host: "chromium-swarm.appspot.com" dimensions: "builder:win32-archive-dbg" @@ -65567,8 +65647,8 @@ path: "win_toolchain" } caches { - name: "xcode_ios_13c100" - path: "xcode_ios_13c100.app" + name: "xcode_ios_14a5294g" + path: "xcode_ios_14a5294g.app" } build_numbers: YES service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com"
diff --git a/infra/config/generated/luci/luci-milo.cfg b/infra/config/generated/luci/luci-milo.cfg index 16076a37..eded3df6 100644 --- a/infra/config/generated/luci/luci-milo.cfg +++ b/infra/config/generated/luci/luci-milo.cfg
@@ -13577,6 +13577,11 @@ short_name: "UAC10" } builders { + name: "buildbucket/luci.chromium.ci/win11-updater-tester-dbg-uac" + category: "debug|win (64)" + short_name: "UAC11" + } + builders { name: "buildbucket/luci.chromium.ci/win-updater-builder-dbg" category: "debug|win (64)" short_name: "bld"
diff --git a/infra/config/generated/luci/luci-scheduler.cfg b/infra/config/generated/luci/luci-scheduler.cfg index 0fbb43b..c2d5d2c 100644 --- a/infra/config/generated/luci/luci-scheduler.cfg +++ b/infra/config/generated/luci/luci-scheduler.cfg
@@ -7174,6 +7174,20 @@ } } job { + id: "win11-updater-tester-dbg-uac" + realm: "ci" + acls { + role: TRIGGERER + granted_to: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + } + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "ci" + builder: "win11-updater-tester-dbg-uac" + } +} +job { id: "win32-archive-dbg" realm: "ci" acl_sets: "ci"
diff --git a/infra/config/generated/luci/realms.cfg b/infra/config/generated/luci/realms.cfg index d855e28..2be5866 100644 --- a/infra/config/generated/luci/realms.cfg +++ b/infra/config/generated/luci/realms.cfg
@@ -200,6 +200,7 @@ values: "win10-updater-tester-dbg" values: "win10-updater-tester-dbg-uac" values: "win10-updater-tester-rel" + values: "win11-updater-tester-dbg-uac" values: "win7(32)-updater-tester-rel" values: "win7-updater-tester-rel" }
diff --git a/infra/config/subprojects/chromium/ci/chromium.gpu.fyi.star b/infra/config/subprojects/chromium/ci/chromium.gpu.fyi.star index bd5bd44..296201e6 100644 --- a/infra/config/subprojects/chromium/ci/chromium.gpu.fyi.star +++ b/infra/config/subprojects/chromium/ci/chromium.gpu.fyi.star
@@ -301,8 +301,6 @@ category = "Mac|Builder", short_name = "asn", ), - goma_backend = goma.backend.RBE_PROD, - reclient_instance = None, ) ci.gpu.mac_builder(
diff --git a/infra/config/subprojects/chromium/ci/chromium.mac.star b/infra/config/subprojects/chromium/ci/chromium.mac.star index 5830f81..06fe139 100644 --- a/infra/config/subprojects/chromium/ci/chromium.mac.star +++ b/infra/config/subprojects/chromium/ci/chromium.mac.star
@@ -415,9 +415,6 @@ # We don't have necessary capacity to run this configuration in CQ, but it # is part of the main waterfall name = "ios-catalyst", - - # TODO(crbug.com/1350126): Move ios-catalyst to xcode.x14main when fixed. - xcode = xcode.x13main, builder_spec = builder_config.builder_spec( gclient_config = builder_config.gclient_config( config = "ios",
diff --git a/infra/config/subprojects/chromium/ci/chromium.updater.star b/infra/config/subprojects/chromium/ci/chromium.updater.star index dd83361..af43812 100644 --- a/infra/config/subprojects/chromium/ci/chromium.updater.star +++ b/infra/config/subprojects/chromium/ci/chromium.updater.star
@@ -633,3 +633,27 @@ ), triggered_by = ["win-updater-builder-rel"], ) + +ci.thin_tester( + name = "win11-updater-tester-dbg-uac", + builder_spec = builder_config.builder_spec( + execution_mode = builder_config.execution_mode.TEST, + gclient_config = builder_config.gclient_config( + config = "chromium", + ), + chromium_config = builder_config.chromium_config( + config = "chromium", + apply_configs = [ + "mb", + ], + build_config = builder_config.build_config.RELEASE, + target_bits = 64, + target_platform = builder_config.target_platform.WIN, + ), + ), + console_view_entry = consoles.console_view_entry( + category = "debug|win (64)", + short_name = "UAC11", + ), + triggered_by = ["win-updater-builder-dbg"], +)
diff --git a/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star b/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star index 12f3ee8..2ea9ce10 100644 --- a/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star +++ b/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star
@@ -275,9 +275,6 @@ ios_builder( name = "ios-catalyst", - - # TODO(crbug.com/1350126): Move ios-catalyst to xcode.x14main when fixed. - xcode = xcode.x13main, mirrors = [ "ci/ios-catalyst", ],
diff --git a/infra/orchestrator/BUILD.gn b/infra/orchestrator/BUILD.gn index e86122955..d2178fb 100644 --- a/infra/orchestrator/BUILD.gn +++ b/infra/orchestrator/BUILD.gn
@@ -79,12 +79,20 @@ python_library("process_perf_results_py") { pydeps_file = "//tools/perf/process_perf_results.pydeps" - # Telemetry fails if catapult's vendored libs aren't present on the - # filesystem. But since process_perf_results.py doesn't ever import any of - # them, build/print_python_deps.py doesn't detect them. So to appease - # telemetry, just add the needed dirs directly. data = [ + # Telemetry fails if catapult's vendored libs aren't present on the + # filesystem. But since process_perf_results.py doesn't ever import any of + # them, build/print_python_deps.py doesn't detect them. So to appease + # telemetry, just add the needed dirs directly. "//third_party/catapult/telemetry/third_party/", + "//third_party/catapult/third_party/polymer/", "//third_party/catapult/third_party/six/", + "//third_party/catapult/third_party/vinn/", + "//third_party/catapult/tracing/bin/add_reserved_diagnostics", + "//third_party/catapult/tracing/third_party/", + "//third_party/catapult/tracing/tracing/", + + # This file is read at script run-time. + "//tools/perf/core/perf_dashboard_machine_group_mapping.json", ] }
diff --git a/ios/chrome/browser/flags/BUILD.gn b/ios/chrome/browser/flags/BUILD.gn index 22bd29d8..9efb99d 100644 --- a/ios/chrome/browser/flags/BUILD.gn +++ b/ios/chrome/browser/flags/BUILD.gn
@@ -63,6 +63,7 @@ "//ios/chrome/browser/sessions:features", "//ios/chrome/browser/text_selection", "//ios/chrome/browser/ui:feature_flags", + "//ios/chrome/browser/ui/app_store_rating:features", "//ios/chrome/browser/ui/autofill:features", "//ios/chrome/browser/ui/bubble:features", "//ios/chrome/browser/ui/content_suggestions:feature_flags",
diff --git a/ios/chrome/browser/flags/about_flags.mm b/ios/chrome/browser/flags/about_flags.mm index 41f9a78..2691abc8 100644 --- a/ios/chrome/browser/flags/about_flags.mm +++ b/ios/chrome/browser/flags/about_flags.mm
@@ -74,6 +74,7 @@ #include "ios/chrome/browser/screen_time/screen_time_buildflags.h" #import "ios/chrome/browser/sessions/session_features.h" #import "ios/chrome/browser/text_selection/text_selection_util.h" +#import "ios/chrome/browser/ui/app_store_rating/features.h" #include "ios/chrome/browser/ui/autofill/features.h" #include "ios/chrome/browser/ui/bubble/bubble_features.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h" @@ -1211,7 +1212,11 @@ flag_descriptions::kAutofillBrandingIOSDescription, flags_ui::kOsIos, FEATURE_WITH_PARAMS_VALUE_TYPE(autofill::features::kAutofillBrandingIOS, kAutofillBrandingIOSVariations, - "AutofillBrandingIOS")}}; + "AutofillBrandingIOS")}, + {"app-store-rating", flag_descriptions::kAppStoreRatingName, + flag_descriptions::kAppStoreRatingDescription, flags_ui::kOsIos, + FEATURE_VALUE_TYPE(kAppStoreRating)}, +}; bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) { return false;
diff --git a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc index 568f4b0..34d7806 100644 --- a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc +++ b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc
@@ -16,6 +16,11 @@ "Allows Omnibox to dynamically adjust number of offered suggestions to " "fill in the space between Omnibox and the soft keyboard."; +const char kAppStoreRatingName[] = "Enable the App Store Rating promo."; +const char kAppStoreRatingDescription[] = + "When enabled, App Store Rating promo will be presented to eligible " + "users."; + const char kAutofillBrandingIOSName[] = "Autofill Branding on iOS"; const char kAutofillBrandingIOSDescription[] = "Adds the Chrome logo in the form input suggestions bar. Full color by "
diff --git a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h index c01d98e..9777b7c 100644 --- a/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h +++ b/ios/chrome/browser/flags/ios_chrome_flag_descriptions.h
@@ -18,6 +18,10 @@ extern const char kAdaptiveSuggestionsCountName[]; extern const char kAdaptiveSuggestionsCountDescription[]; +// Title and description for the flag to enable the App Store Rating promo. +extern const char kAppStoreRatingName[]; +extern const char kAppStoreRatingDescription[]; + // Title and description for the flag to enable Chrome branding on form input // suggestions. extern const char kAutofillBrandingIOSName[];
diff --git a/ios/chrome/browser/prefs/browser_prefs.mm b/ios/chrome/browser/prefs/browser_prefs.mm index 1c611324..78c57ef 100644 --- a/ios/chrome/browser/prefs/browser_prefs.mm +++ b/ios/chrome/browser/prefs/browser_prefs.mm
@@ -153,6 +153,7 @@ registry->RegisterListPref(prefs::kIosPromosManagerActivePromos); registry->RegisterListPref(prefs::kIosPromosManagerImpressions); + registry->RegisterListPref(prefs::kIosPromosManagerSingleDisplayActivePromos); registry->RegisterBooleanPref(enterprise_reporting::kCloudReportingEnabled, false);
diff --git a/ios/chrome/browser/prefs/pref_names.cc b/ios/chrome/browser/prefs/pref_names.cc index accacf57..a712578 100644 --- a/ios/chrome/browser/prefs/pref_names.cc +++ b/ios/chrome/browser/prefs/pref_names.cc
@@ -91,12 +91,18 @@ const char kIosDiscoverFeedLastRefreshTime[] = "ios.discover_feed.last_refresh_time"; -// List preference maintaining the list of active promo campaigns. +// List preference maintaining the list of continuous-display, active promo +// campaigns. const char kIosPromosManagerActivePromos[] = "ios.promos_manager.active_promos"; // List preference containing the promo impression history. const char kIosPromosManagerImpressions[] = "ios.promos_manager.impressions"; +// List preference maintaining the list of single-display, active promo +// campaigns. +const char kIosPromosManagerSingleDisplayActivePromos[] = + "ios.promos_manager.single_display_active_promos"; + // Preference that hold a boolean indicating if the user has already dismissed // the sign-in promo in settings view. const char kIosSettingsPromoAlreadySeen[] = "ios.settings.promo_already_seen";
diff --git a/ios/chrome/browser/prefs/pref_names.h b/ios/chrome/browser/prefs/pref_names.h index 714d54a..a546098 100644 --- a/ios/chrome/browser/prefs/pref_names.h +++ b/ios/chrome/browser/prefs/pref_names.h
@@ -33,6 +33,7 @@ extern const char kIosDiscoverFeedLastRefreshTime[]; extern const char kIosPromosManagerActivePromos[]; extern const char kIosPromosManagerImpressions[]; +extern const char kIosPromosManagerSingleDisplayActivePromos[]; extern const char kIosSettingsPromoAlreadySeen[]; extern const char kIosSettingsSigninPromoDisplayedCount[]; extern const char kIosNtpFeedTopPromoAlreadySeen[];
diff --git a/ios/chrome/browser/push_notification/BUILD.gn b/ios/chrome/browser/push_notification/BUILD.gn index e22c848..cfe67d7 100644 --- a/ios/chrome/browser/push_notification/BUILD.gn +++ b/ios/chrome/browser/push_notification/BUILD.gn
@@ -12,5 +12,29 @@ "push_notification_util.h", "push_notification_util.mm", ] + deps = [ + ":push_notification_client_manager", + "//base", + ] +} +source_set("push_notification_client_manager") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "push_notification_client_manager.h", + "push_notification_client_manager.mm", + ] + deps = [ + ":push_notification_client", + "//base", + ] +} + +source_set("push_notification_client") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "push_notification_client.h", + "push_notification_client.mm", + "push_notification_client_id.h", + ] deps = [ "//base" ] }
diff --git a/ios/chrome/browser/push_notification/push_notification_client.h b/ios/chrome/browser/push_notification/push_notification_client.h new file mode 100644 index 0000000..2d78182 --- /dev/null +++ b/ios/chrome/browser/push_notification/push_notification_client.h
@@ -0,0 +1,50 @@ +// Copyright 2022 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. + +#ifndef IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_H_ +#define IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_H_ + +#import <Foundation/Foundation.h> +#import <UserNotifications/UserNotifications.h> +#import <string> + +#import "ios/chrome/browser/push_notification/push_notification_client_id.h" + +// The PushNotificationClient class is an abstract class that provides a +// framework for implementing push notification support. Feature teams that +// intend to support push notifications should create a class that inherits from +// the PushNotificationClient class. +class PushNotificationClient { + public: + PushNotificationClient(PushNotificationClientId client_id); + virtual ~PushNotificationClient() = 0; + + // When the user interacts with a push notification, this function is called + // to route the user to the appropriate destination. + virtual void HandleInteractedNotification( + UNNotificationResponse* notification_response) = 0; + + // When the device receives a push notification, this function is called to + // allow the client to process any logic needed at this point in time. + virtual void HandleReceivedNotification( + NSDictionary<NSString*, id>* notification) = 0; + + // Actionable Notifications are push notifications that provide the user + // with predetermined actions that the user can select to manipulate the + // application without ever entering the application. Actionable + // notifications must be registered during application startup. + virtual void RegisterActionableNotifications() = 0; + + // Returns the feature's `client_id_`. + PushNotificationClientId GetClientId(); + + protected: + // The unique string that is used to associate incoming push notifications to + // their destination feature. This identifier must match the identifier + // used inside the notification's payload when sending the notification to the + // push notification server. + PushNotificationClientId client_id_; +}; + +#endif // IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_H_ \ No newline at end of file
diff --git a/ios/chrome/browser/push_notification/push_notification_client.mm b/ios/chrome/browser/push_notification/push_notification_client.mm new file mode 100644 index 0000000..0ec1319 --- /dev/null +++ b/ios/chrome/browser/push_notification/push_notification_client.mm
@@ -0,0 +1,19 @@ +// Copyright 2022 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. + +#import "ios/chrome/browser/push_notification/push_notification_client.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +PushNotificationClient::PushNotificationClient( + PushNotificationClientId client_id) + : client_id_(client_id) {} + +PushNotificationClient::~PushNotificationClient() = default; + +PushNotificationClientId PushNotificationClient::GetClientId() { + return client_id_; +} \ No newline at end of file
diff --git a/ios/chrome/browser/push_notification/push_notification_client_id.h b/ios/chrome/browser/push_notification/push_notification_client_id.h new file mode 100644 index 0000000..dd58454 --- /dev/null +++ b/ios/chrome/browser/push_notification/push_notification_client_id.h
@@ -0,0 +1,21 @@ +// Copyright 2022 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. + +#ifndef IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_ID_H_ +#define IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_ID_H_ + +// The PushNotificationClientId class enumerates Chrome's push notification +// enabled features. The PushNotificationClientId is intended to be used as an +// identifier by the PushNotificationClientManager to assign ownership of an +// incoming push notification to a feature. As a result, the value a feature's +// PushNotificationClientId evaluates to must match the value inside an incoming +// push notification's `push_notification_client_id` for the +// PushNotificationClientManager to accurately associate the notification to the +// desired feature. +enum class PushNotificationClientId { + // TODO(crbug.com/1353801): Once Chrome has a push notification enabled + // feature, add that feature's identifier to this class. +}; + +#endif // IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_ID_H_
diff --git a/ios/chrome/browser/push_notification/push_notification_client_manager.h b/ios/chrome/browser/push_notification/push_notification_client_manager.h new file mode 100644 index 0000000..4f0845c --- /dev/null +++ b/ios/chrome/browser/push_notification/push_notification_client_manager.h
@@ -0,0 +1,54 @@ +// Copyright 2022 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. + +#ifndef IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_MANAGER_H_ +#define IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_MANAGER_H_ + +#import <UserNotifications/UserNotifications.h> +#import <memory> +#import <unordered_map> + +#import "ios/chrome/browser/push_notification/push_notification_client.h" +#import "ios/chrome/browser/push_notification/push_notification_client_id.h" + +class PushNotificationClient; + +// A PushNotificationClientManager maintains a list of push notification enabled +// features. The PushNotificationClientManger's purpose is to associate and +// delegate push notifications and its processing logic to the features that own +// the notification. The PushNotificationClientManager routes each notification +// to its appropriate PushNotificationClient based on the incoming +// notification's `push_notification_client_id` property. +class PushNotificationClientManager { + public: + PushNotificationClientManager(); + ~PushNotificationClientManager(); + + // This function dynamically adds a mapping between a PushNotificationClientId + // and a PushNotificationClient to the PushNotificationClientManager. + void AddPushNotificationClient( + PushNotificationClientId client_id, + std::unique_ptr<PushNotificationClient> client); + + // This function is called when the user interacts with the delievered + // notification. This function identifies and delegates the interacted with + // notification to the appropriate PushNotificationClient. + void OnNotificationInteraction(UNNotificationResponse* notification_response); + + // When a push notification is sent from the server and delievered to the + // device, UIApplicationDelegate::didReceiveRemoteNotification is invoked. + // During that invocation, this function is called. This function identifies + // and delegates the delievered notification to the appropriate + // PushNotificationClient. + void OnNotificationReceived(NSDictionary<NSString*, id>* notification); + + private: + // A list of features that support push notifications. + std::unordered_map<PushNotificationClientId, + std::unique_ptr<PushNotificationClient>> + clients_ = std::unordered_map<PushNotificationClientId, + std::unique_ptr<PushNotificationClient>>(); +}; + +#endif // IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_CLIENT_MANAGER_H_ \ No newline at end of file
diff --git a/ios/chrome/browser/push_notification/push_notification_client_manager.mm b/ios/chrome/browser/push_notification/push_notification_client_manager.mm new file mode 100644 index 0000000..75015f33 --- /dev/null +++ b/ios/chrome/browser/push_notification/push_notification_client_manager.mm
@@ -0,0 +1,53 @@ +// Copyright 2022 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. + +#import "ios/chrome/browser/push_notification/push_notification_client_manager.h" + +#import <Foundation/Foundation.h> + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace { +NSString* kClientIdPushNotificationDictionaryKey = + @"push_notification_client_id"; +} // namespace + +PushNotificationClientManager::PushNotificationClientManager() = default; + +PushNotificationClientManager::~PushNotificationClientManager() = default; + +void PushNotificationClientManager::AddPushNotificationClient( + PushNotificationClientId client_id, + std::unique_ptr<PushNotificationClient> client) { + clients_.insert(std::make_pair(client_id, std::move(client))); +} + +void PushNotificationClientManager::OnNotificationInteraction( + UNNotificationResponse* notification_response) { + NSDictionary* notification = + notification_response.notification.request.content.userInfo; + + PushNotificationClientId client_id = + static_cast<PushNotificationClientId>([[notification + objectForKey:kClientIdPushNotificationDictionaryKey] integerValue]); + + auto it = clients_.find(client_id); + if (it != clients_.end()) { + it->second->HandleInteractedNotification(notification_response); + } +} + +void PushNotificationClientManager::OnNotificationReceived( + NSDictionary<NSString*, id>* notification) { + PushNotificationClientId client_id = + static_cast<PushNotificationClientId>([[notification + objectForKey:kClientIdPushNotificationDictionaryKey] integerValue]); + + auto it = clients_.find(client_id); + if (it != clients_.end()) { + it->second->HandleReceivedNotification(notification); + } +}
diff --git a/ios/chrome/browser/push_notification/push_notification_service.h b/ios/chrome/browser/push_notification/push_notification_service.h index 5fa28487..4168b275 100644 --- a/ios/chrome/browser/push_notification/push_notification_service.h +++ b/ios/chrome/browser/push_notification/push_notification_service.h
@@ -5,8 +5,12 @@ #ifndef IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_SERVICE_H_ #define IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_SERVICE_H_ +#import <memory> + #import "ios/chrome/browser/push_notification/push_notification_configuration.h" +class PushNotificationClientManager; + // Service responsible for establishing connection and interacting // with the push notification server. class PushNotificationService { @@ -24,6 +28,14 @@ // notification server. `completion_handler` is invoked asynchronously when // the operation successfully or unsuccessfully completes. virtual void UnregisterDevice(void (^completion_handler)(NSError* error)) = 0; + + // Returns PushNotificationService's PushNotificationClientManager. + PushNotificationClientManager* GetPushNotificationClientManager(); + + private: + // The PushNotificationClientManager manages all interactions between the + // system and push notification enabled features. + std::unique_ptr<PushNotificationClientManager> client_manager_; }; #endif // IOS_CHROME_BROWSER_PUSH_NOTIFICATION_PUSH_NOTIFICATION_SERVICE_H_ \ No newline at end of file
diff --git a/ios/chrome/browser/push_notification/push_notification_service.mm b/ios/chrome/browser/push_notification/push_notification_service.mm index c70508d..6ad56c0 100644 --- a/ios/chrome/browser/push_notification/push_notification_service.mm +++ b/ios/chrome/browser/push_notification/push_notification_service.mm
@@ -4,10 +4,18 @@ #import "ios/chrome/browser/push_notification/push_notification_service.h" +#import "ios/chrome/browser/push_notification/push_notification_client_manager.h" + #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." #endif -PushNotificationService::PushNotificationService() = default; +PushNotificationService::PushNotificationService() + : client_manager_(std::make_unique<PushNotificationClientManager>()) {} -PushNotificationService::~PushNotificationService() = default; \ No newline at end of file +PushNotificationService::~PushNotificationService() = default; + +PushNotificationClientManager* +PushNotificationService::GetPushNotificationClientManager() { + return client_manager_.get(); +}
diff --git a/ios/chrome/browser/tabs_search/tabs_search_service.h b/ios/chrome/browser/tabs_search/tabs_search_service.h index 6fcc106..d04de83 100644 --- a/ios/chrome/browser/tabs_search/tabs_search_service.h +++ b/ios/chrome/browser/tabs_search/tabs_search_service.h
@@ -40,7 +40,7 @@ ~TabsSearchService() override; // A container to store matched WebStates with a reference to their associated - // |browser|. + // `browser`. struct TabsSearchBrowserResults { TabsSearchBrowserResults(const Browser*, const std::vector<web::WebState*>); ~TabsSearchBrowserResults(); @@ -50,29 +50,29 @@ const Browser* browser; const std::vector<web::WebState*> web_states; }; - // Searches through tabs in all the Browsers associated with |browser_state| - // for WebStates with current titles or URLs matching |term|. The matching - // WebStates are returned to the |completion| callback in instances of + // Searches through tabs in all the Browsers associated with `browser_state` + // for WebStates with current titles or URLs matching `term`. The matching + // WebStates are returned to the `completion` callback in instances of // TabsSearchBrowserResults along with their associated Browser. void Search(const std::u16string& term, base::OnceCallback<void(std::vector<TabsSearchBrowserResults>)> completion); - // A pair representing a recently closed item. The |SessionID| can be used to + // A pair representing a recently closed item. The `SessionID` can be used to // restore the item and is safe to store without lifetime concerns. The - // |SerializedNavigationEntry| describes the visible navigation in order to + // `SerializedNavigationEntry` describes the visible navigation in order to // present the results to the user. typedef std::pair<SessionID, const sessions::SerializedNavigationEntry> RecentlyClosedItemPair; - // Searches through recently closed tabs within |browser_state| in the same - // manner as |Search|. Can't be called on an off the record |browser_state|. + // Searches through recently closed tabs within `browser_state` in the same + // manner as `Search`. Can't be called on an off the record `browser_state`. void SearchRecentlyClosed( const std::u16string& term, base::OnceCallback<void(std::vector<RecentlyClosedItemPair>)> completion); - // Searches through Remote Tabs for tabs matching |term|. The matching tabs + // Searches through Remote Tabs for tabs matching `term`. The matching tabs // returned in the vector are owned by the SyncedSessions instance passed to - // the callback. Can't be called on an off the record |browser_state|. + // the callback. Can't be called on an off the record `browser_state`. void SearchRemoteTabs( const std::u16string& term, base::OnceCallback<void(std::unique_ptr<synced_sessions::SyncedSessions>, @@ -81,10 +81,10 @@ // Searches through synced history for the count of history results matching // term. - // |completion| will be called with the result unless a new call to - // SearchHistory is made. Only the last call to |SearchHistory| will continue + // `completion` will be called with the result unless a new call to + // SearchHistory is made. Only the last call to `SearchHistory` will continue // to be processed. Completion callbacks to earlier calls will not be run. - // Can't be called on an off the record |browser_state|. + // Can't be called on an off the record `browser_state`. void SearchHistory(const std::u16string& term, base::OnceCallback<void(size_t result_count)> completion); @@ -92,8 +92,8 @@ TabsSearchService& operator=(const TabsSearchService&) = delete; private: - // Performs a search for |term| within |browsers|, returning the matching - // WebStates and associated Browser to |completion|. Results are passed back + // Performs a search for `term` within `browsers`, returning the matching + // WebStates and associated Browser to `completion`. Results are passed back // in instances of TabsSearchBrowserResults. void SearchWithinBrowsers( const std::set<Browser*>& browsers, @@ -120,7 +120,7 @@ // A callback to return history search results once the current in progress // history search completes. Will be null if no search is in progress. base::OnceCallback<void(size_t result_count)> history_search_callback_; - // A history service instance for the associated |browser_state_|. + // A history service instance for the associated `browser_state_`. std::unique_ptr<history::BrowsingHistoryService> history_service_; // Provides dependencies and funnels callbacks from BrowsingHistoryService. std::unique_ptr<IOSBrowsingHistoryDriver> history_driver_;
diff --git a/ios/chrome/browser/tabs_search/tabs_search_service_unittest.mm b/ios/chrome/browser/tabs_search/tabs_search_service_unittest.mm index 35b9862..7f41fdc 100644 --- a/ios/chrome/browser/tabs_search/tabs_search_service_unittest.mm +++ b/ios/chrome/browser/tabs_search/tabs_search_service_unittest.mm
@@ -96,7 +96,7 @@ } protected: - // Appends a new web state to the web state list of |browser|. + // Appends a new web state to the web state list of `browser`. web::WebState* AppendNewWebState(Browser* browser, const std::u16string& title, const GURL& url) { @@ -543,7 +543,7 @@ TEST_F(TabsSearchServiceTest, RecentlyClosedMatchTitleAllClosed) { AppendNewWebState(browser_.get(), kWebState1Title, GURL(kWebState1Url)); AppendNewWebState(browser_.get(), kWebState2Title, GURL(kWebState2Url)); - // Add a webstate which will not match |kSearchQueryMatchesAll|. + // Add a webstate which will not match `kSearchQueryMatchesAll`. AppendNewWebState(browser_.get(), u"X", GURL("http://abc.xyz")); browser_->GetWebStateList()->CloseAllWebStates(WebStateList::CLOSE_NO_FLAGS);
diff --git a/ios/chrome/browser/translate/chrome_ios_translate_client.h b/ios/chrome/browser/translate/chrome_ios_translate_client.h index 540f33c..609fe5e 100644 --- a/ios/chrome/browser/translate/chrome_ios_translate_client.h +++ b/ios/chrome/browser/translate/chrome_ios_translate_client.h
@@ -43,7 +43,7 @@ ~ChromeIOSTranslateClient() override; - // Creates a translation client tab helper and attaches it to |web_state| + // Creates a translation client tab helper and attaches it to `web_state` static void CreateForWebState(web::WebState* web_state); // Helper method to return a new TranslatePrefs instance.
diff --git a/ios/chrome/browser/translate/fake_translate_infobar_delegate.h b/ios/chrome/browser/translate/fake_translate_infobar_delegate.h index c76f4e8..86e0eaf3 100644 --- a/ios/chrome/browser/translate/fake_translate_infobar_delegate.h +++ b/ios/chrome/browser/translate/fake_translate_infobar_delegate.h
@@ -40,7 +40,7 @@ void RemoveObserver(Observer* observer) override; // Call the OnTranslateStepChanged() observer method on all - // |OnTranslateStepChanged|. + // `OnTranslateStepChanged`. void TriggerOnTranslateStepChanged(translate::TranslateStep step, translate::TranslateErrors error_type); @@ -61,7 +61,7 @@ ~FakeTranslateInfoBarDelegateFactory(); // Create a FakeTranslateInfoBarDelegate unique_ptr with - // |source_language|, |target_language|, |translate_step| and |error_type|. + // `source_language`, `target_language`, `translate_step` and `error_type`. std::unique_ptr<FakeTranslateInfoBarDelegate> CreateFakeTranslateInfoBarDelegate( const std::string& source_language,
diff --git a/ios/chrome/browser/translate/language_detection_javascript_unittest.mm b/ios/chrome/browser/translate/language_detection_javascript_unittest.mm index edc3b74..6e5219f 100644 --- a/ios/chrome/browser/translate/language_detection_javascript_unittest.mm +++ b/ios/chrome/browser/translate/language_detection_javascript_unittest.mm
@@ -31,7 +31,7 @@ const char kExpectedLanguage[] = "Foo"; -// Returns an NSString filled with the char 'a' of length |length|. +// Returns an NSString filled with the char 'a' of length `length`. NSString* GetLongString(NSUInteger length) { NSMutableData* data = [[NSMutableData alloc] initWithLength:length]; memset([data mutableBytes], 'a', length); @@ -62,7 +62,7 @@ EXPECT_NSEQ(expected_result, web::test::ExecuteJavaScript(js, web_state())); } - // Injects JS, and spins the run loop until |condition| block returns true + // Injects JS, and spins the run loop until `condition` block returns true void InjectJSAndWaitUntilCondition(NSString* js, ConditionBlock condition) { web::test::ExecuteJavaScript(js, web_state()); base::test::ios::WaitUntilCondition(^bool() { @@ -71,19 +71,19 @@ } // Verifies if the notranslate meta tag is present or not on the page based on - // |expected_value|. + // `expected_value`. void ExpectHasNoTranslate(BOOL expected_value) { InjectJsAndVerify(@"__gCrWeb.languageDetection.hasNoTranslate();", @(expected_value)); } - // Verifies if |lang| attribute of the HTML tag is the |expected_html_lang|, + // Verifies if `lang` attribute of the HTML tag is the `expected_html_lang`, void ExpectHtmlLang(NSString* expected_html_lang) { InjectJsAndVerify(@"document.documentElement.lang;", expected_html_lang); } - // Verifies if the value of the |Content-Language| meta tag is the same as - // |expected_http_content_language|. + // Verifies if the value of the `Content-Language` meta tag is the same as + // `expected_http_content_language`. void ExpectHttpContentLanguage(NSString* expected_http_content_language) { NSString* const kMetaTagContentJS = @"__gCrWeb.languageDetection.getMetaContentByHttpEquiv(" @@ -91,7 +91,7 @@ InjectJsAndVerify(kMetaTagContentJS, expected_http_content_language); } - // Verifies if |__gCrWeb.languageDetection.getTextContent| correctly extracts + // Verifies if `__gCrWeb.languageDetection.getTextContent` correctly extracts // the text content from an HTML page. void ExpectTextContent(NSString* expected_text_content) { NSString* script = [[NSString alloc] @@ -109,7 +109,7 @@ std::unique_ptr<web::WebState> web_state_; }; -// Tests |__gCrWeb.languageDetection.hasNoTranslate| JS call. +// Tests `__gCrWeb.languageDetection.hasNoTranslate` JS call. TEST_F(JsLanguageDetectionManagerTest, PageHasNoTranslate) { web::test::LoadHtml(@"<html></html>", web_state()); ExpectHasNoTranslate(NO); @@ -127,7 +127,7 @@ ExpectHasNoTranslate(YES); } -// Tests correctness of |document.documentElement.lang| attribute. +// Tests correctness of `document.documentElement.lang` attribute. TEST_F(JsLanguageDetectionManagerTest, HtmlLang) { NSString* html; // Non-empty attribute. @@ -147,7 +147,7 @@ ExpectHtmlLang(@(kExpectedLanguage)); } -// Tests |__gCrWeb.languageDetection.getMetaContentByHttpEquiv| JS call. +// Tests `__gCrWeb.languageDetection.getMetaContentByHttpEquiv` JS call. TEST_F(JsLanguageDetectionManagerTest, HttpContentLanguage) { // No content language. web::test::LoadHtml(@"<html></html>", web_state()); @@ -173,7 +173,7 @@ ExpectHttpContentLanguage(@(kExpectedLanguage)); } -// Tests |__gCrWeb.languageDetection.getTextContent| JS call. +// Tests `__gCrWeb.languageDetection.getTextContent` JS call. TEST_F(JsLanguageDetectionManagerTest, ExtractTextContent) { web::test::LoadHtml( @"<html><body>" @@ -187,7 +187,7 @@ ExpectTextContent(@"\nSome text here and there."); } -// Tests that |__gCrWeb.languageDetection.getTextContent| correctly truncates +// Tests that `__gCrWeb.languageDetection.getTextContent` correctly truncates // text. TEST_F(JsLanguageDetectionManagerTest, Truncation) { web::test::LoadHtml( @@ -205,16 +205,16 @@ // HTML elements introduce a line break, except inline ones. TEST_F(JsLanguageDetectionManagerTest, ExtractWhitespace) { - // |b| and |span| do not break lines. - // |br| and |div| do. + // `b` and `span` do not break lines. + // `br` and `div` do. web::test::LoadHtml(@"<html><body>" "O<b>n</b>e<br>Two\tT<span>hr</span>ee<div>Four</div>" "</body></html>", web_state()); ExpectTextContent(@"One\nTwo\tThree\nFour"); - // |a| does not break lines. - // |li|, |p| and |ul| do. + // `a` does not break lines. + // `li`, `p` and `ul` do. web::test::LoadHtml( @"<html><body>" "<ul><li>One</li><li>T<a href='foo'>wo</a></li></ul><p>Three</p>" @@ -223,7 +223,7 @@ ExpectTextContent(@"\n\nOne\nTwo\nThree"); } -// Tests that |__gCrWeb.languageDetection.getTextContent| returns only until the +// Tests that `__gCrWeb.languageDetection.getTextContent` returns only until the // kMaxIndexChars number of characters even if the text content is very large. TEST_F(JsLanguageDetectionManagerTest, LongTextContent) { // Very long string. @@ -244,7 +244,7 @@ EXPECT_EQ(translate::kMaxIndexChars, [result length]); } -// Tests if |__gCrWeb.languageDetection.retrieveBufferedTextContent| correctly +// Tests if `__gCrWeb.languageDetection.retrieveBufferedTextContent` correctly // retrieves the cache and then purges it. TEST_F(JsLanguageDetectionManagerTest, RetrieveBufferedTextContent) { web::test::LoadHtml(@"<html></html>", web_state()); @@ -262,7 +262,7 @@ [NSNull null]); } -// Test fixture to test |__gCrWeb.languageDetection.detectLanguage|. +// Test fixture to test `__gCrWeb.languageDetection.detectLanguage`. class JsLanguageDetectionManagerDetectLanguageTest : public JsLanguageDetectionManagerTest { public: @@ -290,7 +290,7 @@ base::CallbackListSubscription subscription_; }; -// Tests if |__gCrWeb.languageDetection.hasNoTranslate| correctly informs the +// Tests if `__gCrWeb.languageDetection.hasNoTranslate` correctly informs the // native side when the notranslate meta tag is specified. TEST_F(JsLanguageDetectionManagerDetectLanguageTest, DetectLanguageWithNoTranslateMeta) { @@ -325,7 +325,7 @@ EXPECT_TRUE(*has_notranslate); } -// Tests if |__gCrWeb.languageDetection.detectLanguage| correctly informs the +// Tests if `__gCrWeb.languageDetection.detectLanguage` correctly informs the // native side when no notranslate meta tag is specified. TEST_F(JsLanguageDetectionManagerDetectLanguageTest, DetectLanguageWithoutNoTranslateMeta) {
diff --git a/ios/chrome/browser/translate/translate_app_interface.h b/ios/chrome/browser/translate/translate_app_interface.h index ec03f2d..4e0fe09 100644 --- a/ios/chrome/browser/translate/translate_app_interface.h +++ b/ios/chrome/browser/translate/translate_app_interface.h
@@ -9,7 +9,7 @@ @interface TranslateAppInterface : NSObject -// Sets up the app for testing. |translateScriptServer| is the URL +// Sets up the app for testing. `translateScriptServer` is the URL // for the server that can serve up translate scripts to app. + (void)setUpWithScriptServer:(NSString*)translateScriptServerURL; @@ -46,15 +46,15 @@ // manager fakes the translation and does not depend on the real JavaScript. + (void)setUpFakeJSTranslateManagerInCurrentTab; -/// Whether user has set a preference to translate from |source| language to -// |target| language. +/// Whether user has set a preference to translate from `source` language to +// `target` language. + (BOOL)shouldAutoTranslateFromLanguage:(NSString*)source toLanguage:(NSString*)target; -// Whether user has set a preference to block the translation of |language|. +// Whether user has set a preference to block the translation of `language`. + (BOOL)isBlockedLanguage:(NSString*)language; -// Whether user has set a preference to translate any pages on |hostName|. +// Whether user has set a preference to translate any pages on `hostName`. + (BOOL)isBlockedSite:(NSString*)hostName; // The following are Translate Infobar UI constants. Test client needs to know
diff --git a/ios/chrome/browser/translate/translate_app_interface.mm b/ios/chrome/browser/translate/translate_app_interface.mm index bd5fed95..393f091 100644 --- a/ios/chrome/browser/translate/translate_app_interface.mm +++ b/ios/chrome/browser/translate/translate_app_interface.mm
@@ -140,7 +140,7 @@ } - (void)injectWithTranslateScript:(const std::string&)translate_script { - // No need to set the |translate_script| JavaScript since it will never be + // No need to set the `translate_script` JavaScript since it will never be // used by this fake object. Instead just invoke host with 'translate.ready' // followed by 'translate.status'. base::Value translate_ready_dict(base::Value::Type::DICTIONARY);
diff --git a/ios/chrome/browser/translate/translate_infobar_metrics_recorder.h b/ios/chrome/browser/translate/translate_infobar_metrics_recorder.h index 1a97f94..0ce246c 100644 --- a/ios/chrome/browser/translate/translate_infobar_metrics_recorder.h +++ b/ios/chrome/browser/translate/translate_infobar_metrics_recorder.h
@@ -56,11 +56,11 @@ // This class records metrics for Translate-specific Messages events. @interface TranslateInfobarMetricsRecorder : NSObject -// Records a histogram for |bannerEvent|. +// Records a histogram for `bannerEvent`. + (void)recordBannerEvent:(MobileMessagesTranslateBannerEvent)bannerEvent; -// Records a histogram for |event|. +// Records a histogram for `event`. + (void)recordModalEvent:(MobileMessagesTranslateModalEvent)event; -// Records a histogram for |presentEvent|. +// Records a histogram for `presentEvent`. + (void)recordModalPresent:(MobileMessagesTranslateModalPresent)presentEvent; // Records a histogram for an infobar (both legacy and Messages) that the user // did not interact with throughout its lifetime.
diff --git a/ios/chrome/browser/ui/app_store_rating/BUILD.gn b/ios/chrome/browser/ui/app_store_rating/BUILD.gn new file mode 100644 index 0000000..9eca291 --- /dev/null +++ b/ios/chrome/browser/ui/app_store_rating/BUILD.gn
@@ -0,0 +1,12 @@ +# Copyright 2022 The Chromium Authors. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("features") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "features.h", + "features.mm", + ] + deps = [ "//base" ] +}
diff --git a/ios/chrome/browser/ui/app_store_rating/OWNERS b/ios/chrome/browser/ui/app_store_rating/OWNERS new file mode 100644 index 0000000..7ef4b2b7 --- /dev/null +++ b/ios/chrome/browser/ui/app_store_rating/OWNERS
@@ -0,0 +1,3 @@ +bwwilliams@google.com +sebsg@chromium.org +gujen@google.com
diff --git a/ios/chrome/browser/ui/app_store_rating/features.h b/ios/chrome/browser/ui/app_store_rating/features.h new file mode 100644 index 0000000..d986da2 --- /dev/null +++ b/ios/chrome/browser/ui/app_store_rating/features.h
@@ -0,0 +1,16 @@ +// Copyright 2022 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_APP_STORE_RATING_FEATURES_H_ +#define IOS_CHROME_BROWSER_UI_APP_STORE_RATING_FEATURES_H_ + +#import "base/feature_list.h" + +// Feature flag to enable the App Store Rating feature. +extern const base::Feature kAppStoreRating; + +// Returns true if App Store Rating feature is enabled. +bool IsAppStoreRatingEnabled(); + +#endif // IOS_CHROME_BROWSER_UI_APP_STORE_RATING_FEATURES_H_
diff --git a/ios/chrome/browser/ui/app_store_rating/features.mm b/ios/chrome/browser/ui/app_store_rating/features.mm new file mode 100644 index 0000000..eba33005 --- /dev/null +++ b/ios/chrome/browser/ui/app_store_rating/features.mm
@@ -0,0 +1,18 @@ +// Copyright 2022 The Chromium Authors. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ios/chrome/browser/ui/app_store_rating/features.h" + +#import "base/feature_list.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +const base::Feature kAppStoreRating{"AppStoreRating", + base::FEATURE_DISABLED_BY_DEFAULT}; + +bool IsAppStoreRatingEnabled() { + return base::FeatureList::IsEnabled(kAppStoreRating); +}
diff --git a/ios/chrome/browser/ui/authentication/authentication_flow.mm b/ios/chrome/browser/ui/authentication/authentication_flow.mm index 2c1e236..9d7136f 100644 --- a/ios/chrome/browser/ui/authentication/authentication_flow.mm +++ b/ios/chrome/browser/ui/authentication/authentication_flow.mm
@@ -57,6 +57,9 @@ // Whether this flow is curently handling an error. @property(nonatomic, assign) BOOL handlingError; +// The action to perform following account sign-in. +@property(nonatomic, assign) PostSignInAction postSignInAction; + // Indicates how to handle existing data when the signed in account is being // switched. Possible values: // * User choice: present an alert view asking the user whether the data @@ -85,7 +88,6 @@ @end @implementation AuthenticationFlow { - PostSignInAction _postSignInAction; UIViewController* _presentingViewController; CompletionCallback _signInCompletion; AuthenticationFlowPerformer* _performer; @@ -217,8 +219,8 @@ return CHECK_MERGE_CASE; case CHECK_MERGE_CASE: // If the user enabled Sync, expect the data clearing strategy to be set. - DCHECK(_postSignInAction == POST_SIGNIN_ACTION_NONE || - (_postSignInAction == POST_SIGNIN_ACTION_COMMIT_SYNC && + DCHECK(self.postSignInAction == POST_SIGNIN_ACTION_NONE || + (self.postSignInAction == POST_SIGNIN_ACTION_COMMIT_SYNC && self.localDataClearingStrategy != SHOULD_CLEAR_DATA_USER_CHOICE)); if (_shouldShowManagedConfirmation) return SHOW_MANAGED_CONFIRMATION; @@ -242,7 +244,7 @@ case CLEAR_DATA: return SIGN_IN; case SIGN_IN: - switch (_postSignInAction) { + switch (self.postSignInAction) { case POST_SIGNIN_ACTION_COMMIT_SYNC: return COMMIT_SYNC; case POST_SIGNIN_ACTION_NONE: @@ -293,32 +295,34 @@ forIdentity:_identityToSignIn]; return; - case CHECK_MERGE_CASE: + case CHECK_MERGE_CASE: { DCHECK_EQ(SHOULD_CLEAR_DATA_USER_CHOICE, self.localDataClearingStrategy); - if (_postSignInAction == POST_SIGNIN_ACTION_COMMIT_SYNC) { - if (base::FeatureList::IsEnabled( - signin::kEnableUnicornAccountSupport)) { - ios::ChromeIdentityService* identity_service = - ios::GetChromeBrowserProvider().GetChromeIdentityService(); - __weak AuthenticationFlow* weakSelf = self; - identity_service->IsSubjectToParentalControls( - _identityToSignIn, ^(ios::ChromeIdentityCapabilityResult result) { - if (result == ios::ChromeIdentityCapabilityResult::kTrue) { - weakSelf.localDataClearingStrategy = - SHOULD_CLEAR_DATA_CLEAR_DATA; - [weakSelf continueSignin]; - return; - } + __weak AuthenticationFlow* weakSelf = self; + ios::CapabilitiesCallback callback = + ^(ios::ChromeIdentityCapabilityResult result) { + if (result == ios::ChromeIdentityCapabilityResult::kTrue) { + [weakSelf didChooseClearDataPolicy:SHOULD_CLEAR_DATA_CLEAR_DATA]; + return; + } + switch (weakSelf.postSignInAction) { + case POST_SIGNIN_ACTION_COMMIT_SYNC: [weakSelf checkMergeCaseForUnsupervisedAccounts]; - }); - } else { - [self checkMergeCaseForUnsupervisedAccounts]; - } - return; + break; + case POST_SIGNIN_ACTION_NONE: + [weakSelf continueSignin]; + break; + } + }; + if (base::FeatureList::IsEnabled(signin::kEnableUnicornAccountSupport)) { + ios::ChromeIdentityService* identity_service = + ios::GetChromeBrowserProvider().GetChromeIdentityService(); + identity_service->IsSubjectToParentalControls(_identityToSignIn, + callback); + } else { + callback(ios::ChromeIdentityCapabilityResult::kFalse); } - [self continueSignin]; return; - + } case SHOW_MANAGED_CONFIRMATION: [_performer showManagedConfirmationForHostedDomain:_identityToSignInHostedDomain @@ -436,7 +440,7 @@ bool isManagedAccount = _identityToSignInHostedDomain.length > 0; signin_metrics::RecordSigninAccountType(signin::ConsentLevel::kSignin, isManagedAccount); - if (_postSignInAction == POST_SIGNIN_ACTION_COMMIT_SYNC) + if (self.postSignInAction == POST_SIGNIN_ACTION_COMMIT_SYNC) signin_metrics::RecordSigninAccountType(signin::ConsentLevel::kSync, isManagedAccount); } @@ -511,7 +515,7 @@ DCHECK_EQ(FETCH_MANAGED_STATUS, _state); _shouldShowManagedConfirmation = [hostedDomain length] > 0 && - (_postSignInAction == POST_SIGNIN_ACTION_COMMIT_SYNC); + (self.postSignInAction == POST_SIGNIN_ACTION_COMMIT_SYNC); _identityToSignInHostedDomain = hostedDomain; _shouldFetchUserPolicy = YES; [self continueSignin];
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/BUILD.gn b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/BUILD.gn index 670de51..51243e4 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/BUILD.gn +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/BUILD.gn
@@ -15,6 +15,7 @@ deps = [ ":layout", "//components/prefs", + "//components/signin/ios/browser:features", "//components/signin/public/identity_manager/objc", "//ios/chrome/app/strings", "//ios/chrome/browser/browser_state", @@ -28,6 +29,7 @@ "//ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_account_chooser", "//ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_default_account", "//ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_sheet", + "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/image_util", "//ios/chrome/browser/ui/util", "//ios/chrome/common/ui/colors",
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.mm b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.mm index b69cd407..4f4acc1 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.mm +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_coordinator.mm
@@ -24,6 +24,8 @@ #import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_sheet/consistency_sheet_presentation_controller.h" #import "ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_sheet/consistency_sheet_slide_transition_animator.h" #import "ios/chrome/browser/ui/authentication/signin/signin_coordinator+protected.h" +#import "ios/chrome/browser/ui/commands/browsing_data_commands.h" +#import "ios/chrome/browser/ui/commands/command_dispatcher.h" #import "ios/chrome/common/ui/colors/semantic_color_names.h" #import "ios/chrome/grit/ios_strings.h" #import "ios/public/provider/chrome/browser/signin/chrome_identity.h" @@ -297,6 +299,8 @@ identity:self.selectedIdentity postSignInAction:POST_SIGNIN_ACTION_NONE presentingViewController:self.navigationController]; + authenticationFlow.dispatcher = HandlerForProtocol( + self.browser->GetCommandDispatcher(), BrowsingDataCommands); [self.consistencyPromoSigninMediator signinWithAuthenticationFlow:authenticationFlow]; }
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.mm b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.mm index 611ecda..9f3391e6 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.mm +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator.mm
@@ -7,6 +7,7 @@ #import "base/cancelable_callback.h" #import "base/threading/thread_task_runner_handle.h" #import "components/prefs/pref_service.h" +#import "components/signin/ios/browser/features.h" #import "components/signin/public/base/signin_metrics.h" #import "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" #import "components/signin/public/identity_manager/objc/identity_manager_observer_bridge.h" @@ -234,6 +235,13 @@ - (void)onAccountsInCookieUpdated: (const signin::AccountsInCookieJarInfo&)accountsInCookieJarInfo error:(const GoogleServiceAuthError&)error { + if (base::FeatureList::IsEnabled(signin::kEnableUnicornAccountSupport) && + _authenticationFlow) { + // Ignore if `_authenticationFlow` is in progress since + // `onAccountsInCookieUpdated` may be called when data is cleared on + // sign-in. + return; + } if (!self.signingIdentity) { // TODO(crbug.com/1204528): This case should not happen, but // `onAccountsInCookieUpdated:error:` can be called twice when there is an
diff --git a/ios/chrome/browser/ui/browser_view/BUILD.gn b/ios/chrome/browser/ui/browser_view/BUILD.gn index ce7763ab..d7d52bb 100644 --- a/ios/chrome/browser/ui/browser_view/BUILD.gn +++ b/ios/chrome/browser/ui/browser_view/BUILD.gn
@@ -72,6 +72,7 @@ "//ios/chrome/browser/passwords", "//ios/chrome/browser/prefs", "//ios/chrome/browser/prerender", + "//ios/chrome/browser/promos_manager:features", "//ios/chrome/browser/reading_list", "//ios/chrome/browser/send_tab_to_self", "//ios/chrome/browser/sessions", @@ -144,6 +145,7 @@ "//ios/chrome/browser/ui/popup_menu", "//ios/chrome/browser/ui/presenters", "//ios/chrome/browser/ui/print", + "//ios/chrome/browser/ui/promos_manager", "//ios/chrome/browser/ui/qr_generator", "//ios/chrome/browser/ui/qr_scanner:coordinator", "//ios/chrome/browser/ui/reading_list",
diff --git a/ios/chrome/browser/ui/browser_view/browser_coordinator.mm b/ios/chrome/browser/ui/browser_view/browser_coordinator.mm index c92423b..eb42ee52 100644 --- a/ios/chrome/browser/ui/browser_view/browser_coordinator.mm +++ b/ios/chrome/browser/ui/browser_view/browser_coordinator.mm
@@ -35,6 +35,7 @@ #import "ios/chrome/browser/prerender/preload_controller_delegate.h" #import "ios/chrome/browser/prerender/prerender_service.h" #import "ios/chrome/browser/prerender/prerender_service_factory.h" +#import "ios/chrome/browser/promos_manager/features.h" #import "ios/chrome/browser/signin/account_consistency_browser_agent.h" #import "ios/chrome/browser/signin/account_consistency_service_factory.h" #import "ios/chrome/browser/ssl/captive_portal_tab_helper.h" @@ -112,6 +113,7 @@ #import "ios/chrome/browser/ui/popup_menu/popup_menu_coordinator.h" #import "ios/chrome/browser/ui/presenters/vertical_animation_container.h" #import "ios/chrome/browser/ui/print/print_controller.h" +#import "ios/chrome/browser/ui/promos_manager/promos_manager_coordinator.h" #import "ios/chrome/browser/ui/qr_generator/qr_generator_coordinator.h" #import "ios/chrome/browser/ui/qr_scanner/qr_scanner_legacy_coordinator.h" #import "ios/chrome/browser/ui/reading_list/reading_list_coordinator.h" @@ -293,6 +295,9 @@ // TODO(crbug.com/910017): Convert to coordinator. @property(nonatomic, strong) PrintController* printController; +// Coordinator for app-wide promos. +@property(nonatomic, strong) PromosManagerCoordinator* promosManagerCoordinator; + // Coordinator for the QR scanner. @property(nonatomic, strong) QRScannerLegacyCoordinator* qrScannerCoordinator; @@ -855,6 +860,13 @@ self.printController = [[PrintController alloc] initWithBaseViewController:self.viewController]; + if (IsFullscreenPromosManagerEnabled()) { + self.promosManagerCoordinator = [[PromosManagerCoordinator alloc] + initWithBaseViewController:self.viewController + browser:self.browser]; + [self.promosManagerCoordinator start]; + } + // Help should only show in regular, non-incognito. if (!self.browser->GetBrowserState()->IsOffTheRecord()) { [self.popupMenuCoordinator startPopupMenuHelpCoordinator]; @@ -973,6 +985,11 @@ self.printController = nil; + if (IsFullscreenPromosManagerEnabled()) { + [self.promosManagerCoordinator stop]; + self.promosManagerCoordinator = nil; + } + [self.readingListCoordinator stop]; self.readingListCoordinator = nil;
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_tile_view.h b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_tile_view.h index 275e42c..3cb46a1a 100644 --- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_tile_view.h +++ b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_tile_view.h
@@ -13,7 +13,7 @@ @interface ContentSuggestionsTileView : UIView <UIPointerInteractionDelegate> // Initializer that will lay itself out as placeholder tile with no text or -// favicon if |isPlaceholder| is YES. +// favicon if `isPlaceholder` is YES. - (instancetype)initWithFrame:(CGRect)frame placeholder:(BOOL)isPlaceholder; // Container for the image view. Used in subclasses.
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm index aaa4c30..8b22f16 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
@@ -91,7 +91,7 @@ // The Return To Recent Tab view. @property(nonatomic, strong) ContentSuggestionsReturnToRecentTabView* returnToRecentTabTile; -// Module container of |returnToRecentTabTile|. +// Module container of `returnToRecentTabTile`. @property(nonatomic, strong) ContentSuggestionsModuleContainer* returnToRecentTabContainer; // The WhatsNew view.
diff --git a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_view_controller.mm b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_view_controller.mm index 8d8a23f..03e256e2 100644 --- a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_view_controller.mm +++ b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_view_controller.mm
@@ -322,6 +322,9 @@ } - (void)highlightNextSuggestion { + if ([self.tableView numberOfRowsInSection:0] == 0) { + return; + } if (!self.highlightedIndexPath) { // Initialize the highlighted row to -1, so that pressing down when nothing // is highlighted highlights the first row (at index 0).
diff --git a/ios/chrome/browser/ui/promos_manager/BUILD.gn b/ios/chrome/browser/ui/promos_manager/BUILD.gn index b442e1aa..ea954df7 100644 --- a/ios/chrome/browser/ui/promos_manager/BUILD.gn +++ b/ios/chrome/browser/ui/promos_manager/BUILD.gn
@@ -36,6 +36,8 @@ source_set("promos_manager") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ + "promos_manager_coordinator.h", + "promos_manager_coordinator.mm", "promos_manager_mediator.h", "promos_manager_mediator.mm", ] @@ -43,9 +45,14 @@ ":promos", "//ios/chrome/browser/promos_manager", "//ios/chrome/browser/ui/commands", + "//ios/chrome/browser/ui/coordinators:chrome_coordinators", ] deps = [ + ":promos_manager_scene_agent", + "//ios/chrome/browser", + "//ios/chrome/browser/application_context", "//ios/chrome/browser/promos_manager:constants", + "//ios/chrome/browser/ui/main:scene_state_header", "//third_party/abseil-cpp:absl", ] }
diff --git a/ios/chrome/browser/ui/promos_manager/promos_manager_coordinator.h b/ios/chrome/browser/ui/promos_manager/promos_manager_coordinator.h new file mode 100644 index 0000000..4266ebd1 --- /dev/null +++ b/ios/chrome/browser/ui/promos_manager/promos_manager_coordinator.h
@@ -0,0 +1,14 @@ +// Copyright 2022 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_PROMOS_MANAGER_PROMOS_MANAGER_COORDINATOR_H_ +#define IOS_CHROME_BROWSER_UI_PROMOS_MANAGER_PROMOS_MANAGER_COORDINATOR_H_ + +#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h" + +// Coordinator for displaying app-wide promos. +@interface PromosManagerCoordinator : ChromeCoordinator +@end + +#endif // IOS_CHROME_BROWSER_UI_PROMOS_MANAGER_PROMOS_MANAGER_COORDINATOR_H_
diff --git a/ios/chrome/browser/ui/promos_manager/promos_manager_coordinator.mm b/ios/chrome/browser/ui/promos_manager/promos_manager_coordinator.mm new file mode 100644 index 0000000..bd77a6d --- /dev/null +++ b/ios/chrome/browser/ui/promos_manager/promos_manager_coordinator.mm
@@ -0,0 +1,67 @@ +// Copyright 2022 The Chromium Authors. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ios/chrome/browser/ui/promos_manager/promos_manager_coordinator.h" + +#import "ios/chrome/browser/application_context/application_context.h" +#import "ios/chrome/browser/ui/commands/command_dispatcher.h" +#import "ios/chrome/browser/ui/commands/promos_manager_commands.h" +#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h" +#import "ios/chrome/browser/ui/main/scene_state_browser_agent.h" +#import "ios/chrome/browser/ui/promos_manager/promos_manager_mediator.h" +#import "ios/chrome/browser/ui/promos_manager/promos_manager_scene_agent.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#pragma mark - Public methods + +@interface PromosManagerCoordinator () <PromosManagerCommands> + +// A mediator that observes when it's a good time to display a promo. +@property(nonatomic, strong) PromosManagerMediator* mediator; + +@end + +@implementation PromosManagerCoordinator + +- (void)start { + [self.browser->GetCommandDispatcher() + startDispatchingToTarget:self + forProtocol:@protocol(PromosManagerCommands)]; + + id<PromosManagerCommands> handler = HandlerForProtocol( + self.browser->GetCommandDispatcher(), PromosManagerCommands); + + self.mediator = [[PromosManagerMediator alloc] + initWithPromosManager:GetApplicationContext()->GetPromosManager() + handler:handler]; + + SceneState* sceneState = + SceneStateBrowserAgent::FromBrowser(self.browser)->GetSceneState(); + + PromosManagerSceneAgent* sceneAgent = + [PromosManagerSceneAgent agentFromScene:sceneState]; + + [sceneAgent addObserver:self.mediator]; +} + +- (void)stop { + [self.browser->GetCommandDispatcher() stopDispatchingToTarget:self]; + + self.mediator = nil; +} + +#pragma mark - PromosManagerCommands + +- (void)displayPromo:(promos_manager::Promo)promo { + // TODO(crbug.com/1358991): + // 1. Grab the proper view provider or display handler that's registered with + // the coordinator + // 2. Call the proper view provider or display handler. + // 3. Let the mediator know that `promo` was displayed. +} + +@end
diff --git a/ios/chrome/browser/ui/promos_manager/promos_manager_mediator.h b/ios/chrome/browser/ui/promos_manager/promos_manager_mediator.h index 127147e..cf13fe9 100644 --- a/ios/chrome/browser/ui/promos_manager/promos_manager_mediator.h +++ b/ios/chrome/browser/ui/promos_manager/promos_manager_mediator.h
@@ -20,7 +20,7 @@ // Designated initializer. - (instancetype)initWithPromosManager:(PromosManager*)promosManager - andHandler:(id<PromosManagerCommands>)handler + handler:(id<PromosManagerCommands>)handler NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE;
diff --git a/ios/chrome/browser/ui/promos_manager/promos_manager_mediator.mm b/ios/chrome/browser/ui/promos_manager/promos_manager_mediator.mm index 897b6471..d208e6bd 100644 --- a/ios/chrome/browser/ui/promos_manager/promos_manager_mediator.mm +++ b/ios/chrome/browser/ui/promos_manager/promos_manager_mediator.mm
@@ -14,7 +14,7 @@ @implementation PromosManagerMediator - (instancetype)initWithPromosManager:(PromosManager*)promosManager - andHandler:(id<PromosManagerCommands>)handler { + handler:(id<PromosManagerCommands>)handler { if (self = [super init]) { _promosManager = promosManager; _handler = handler;
diff --git a/ios/chrome/browser/ui/send_tab_to_self/send_tab_to_self_coordinator.mm b/ios/chrome/browser/ui/send_tab_to_self/send_tab_to_self_coordinator.mm index d9e90cd..d169596 100644 --- a/ios/chrome/browser/ui/send_tab_to_self/send_tab_to_self_coordinator.mm +++ b/ios/chrome/browser/ui/send_tab_to_self/send_tab_to_self_coordinator.mm
@@ -64,9 +64,9 @@ using GetDisplayReasonCallback = base::RepeatingCallback< absl::optional<send_tab_to_self::EntryPointDisplayReason>()>; - // Queries |get_display_reason_callback| until it indicates the device list is + // Queries `get_display_reason_callback` until it indicates the device list is // known (i.e. until it returns kOfferFeature or kInformNoTargetDevice), then - // calls |on_list_known_callback|. Destroying the object aborts the waiting. + // calls `on_list_known_callback`. Destroying the object aborts the waiting. TargetDeviceListWaiter( syncer::SyncService* sync_service, const GetDisplayReasonCallback& get_display_reason_callback,
diff --git a/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm b/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm index 9b25711..bc45007 100644 --- a/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm
@@ -425,7 +425,7 @@ - (void)allowUserInteraction { DCHECK(self.navigationController) - << "|allowUserInteraction` should always be called before this settings" + << "`allowUserInteraction` should always be called before this settings" " controller is popped or dismissed."; [self.navigationController.view setUserInteractionEnabled:YES];
diff --git a/ios/chrome/browser/web/blocked_popup_tab_helper.h b/ios/chrome/browser/web/blocked_popup_tab_helper.h index bd972e6..5187707 100644 --- a/ios/chrome/browser/web/blocked_popup_tab_helper.h +++ b/ios/chrome/browser/web/blocked_popup_tab_helper.h
@@ -36,12 +36,12 @@ ~BlockedPopupTabHelper() override; - // Returns true if popup requested by the page with the given |source_url| + // Returns true if popup requested by the page with the given `source_url` // should be blocked. bool ShouldBlockPopup(const GURL& source_url); // Shows the popup blocker infobar for the popup with given popup_url. - // |referrer| represents the frame which requested this popup. + // `referrer` represents the frame which requested this popup. void HandlePopup(const GURL& popup_url, const web::Referrer& referrer); // infobars::InfoBarManager::Observer implementation. @@ -72,7 +72,7 @@ ChromeBrowserState* GetBrowserState() const; // Registers this object as an observer for the InfoBarManager associated with - // |web_state_|. Does nothing if already registered. + // `web_state_`. Does nothing if already registered. void RegisterAsInfoBarManagerObserverIfNeeded( infobars::InfoBarManager* infobar_manager);
diff --git a/ios/chrome/browser/web/blocked_popup_tab_helper_unittest.mm b/ios/chrome/browser/web/blocked_popup_tab_helper_unittest.mm index 5ed186b8..1663687c 100644 --- a/ios/chrome/browser/web/blocked_popup_tab_helper_unittest.mm +++ b/ios/chrome/browser/web/blocked_popup_tab_helper_unittest.mm
@@ -53,7 +53,7 @@ return BlockedPopupTabHelper::FromWebState(web_state()); } - // Returns InfoBarManager attached to |web_state()|. + // Returns InfoBarManager attached to `web_state()`. infobars::InfoBarManager* GetInfobarManager() { return InfoBarManagerImpl::FromWebState(web_state()); } @@ -73,7 +73,7 @@ const GURL source_url1("https://source-url1"); EXPECT_TRUE(GetBlockedPopupTabHelper()->ShouldBlockPopup(source_url1)); - // Allow popups for |source_url1|. + // Allow popups for `source_url1`. scoped_refptr<HostContentSettingsMap> settings_map( ios::HostContentSettingsMapFactory::GetForBrowserState( browser_state_.get())); @@ -113,7 +113,7 @@ ASSERT_FALSE(web_state_delegate_.last_open_url_request()); delegate->Accept(); - // Verify that popups are allowed for |test_url|. + // Verify that popups are allowed for `test_url`. EXPECT_FALSE(GetBlockedPopupTabHelper()->ShouldBlockPopup(source_url)); // Verify that child window was open. @@ -151,7 +151,7 @@ EXPECT_EQ(0U, GetInfobarManager()->infobar_count()); EXPECT_FALSE(IsObservingSources()); - // Call |HandlePopup| to show an infobar. + // Call `HandlePopup` to show an infobar. const GURL test_url("https://popups.example.com"); GetBlockedPopupTabHelper()->HandlePopup(test_url, web::Referrer()); ASSERT_EQ(1U, GetInfobarManager()->infobar_count()); @@ -169,7 +169,7 @@ TEST_F(BlockedPopupTabHelperTest, RecordDismissMetrics) { base::HistogramTester histogram_tester; - // Call |HandlePopup| to show an infobar and check that the Presented + // Call `HandlePopup` to show an infobar and check that the Presented // histogram was recorded correctly. const GURL test_url("https://popups.example.com"); GetBlockedPopupTabHelper()->HandlePopup(test_url, web::Referrer());
diff --git a/ios/chrome/browser/web/certificate_policy_app_agent.mm b/ios/chrome/browser/web/certificate_policy_app_agent.mm index b05826d..516e837de 100644 --- a/ios/chrome/browser/web/certificate_policy_app_agent.mm +++ b/ios/chrome/browser/web/certificate_policy_app_agent.mm
@@ -23,8 +23,8 @@ namespace { -// Updates |policy_cache| by adding entries from the session policy cache in -// |web_state|. +// Updates `policy_cache` by adding entries from the session policy cache in +// `web_state`. void UpdateCertificatePolicyCacheFromWebState( const scoped_refptr<web::CertificatePolicyCache>& policy_cache, const web::WebState* web_state) { @@ -41,7 +41,7 @@ } // Populates the certificate policy cache based on all of the WebStates in -// the |incognito| browsers in |browser_list|. Because this is called +// the `incognito` browsers in `browser_list`. Because this is called // asynchronously, it needs to be resilient to shutdown having happened before // it is invoked. void RestoreCertificatePolicyCacheFromBrowsers( @@ -66,7 +66,7 @@ } // Scrubs the certificate policy cache of all certificates policies except -// those for the current |incognito| browsers in |browser_list|. +// those for the current `incognito` browsers in `browser_list`. // Clearing the cache is done on the IO thread, and then cache repopulation is // done on the UI thread. void CleanCertificatePolicyCache(
diff --git a/ios/chrome/browser/web/certificate_policy_app_agent_unittest.mm b/ios/chrome/browser/web/certificate_policy_app_agent_unittest.mm index a002fbe7..2a48c2173 100644 --- a/ios/chrome/browser/web/certificate_policy_app_agent_unittest.mm +++ b/ios/chrome/browser/web/certificate_policy_app_agent_unittest.mm
@@ -90,7 +90,7 @@ [app_state_ addAgent:app_agent_]; } - // Adds a web state with |host| as the active URL to |browser|. + // Adds a web state with `host` as the active URL to `browser`. void AddWebStateToBrowser(std::string host, Browser* browser) { auto test_web_state = std::make_unique<web::FakeWebStateWithPolicyCache>( browser->GetBrowserState()); @@ -102,8 +102,8 @@ WebStateList::INSERT_NO_FLAGS, WebStateOpener()); } - // Adds a web state with |host| as the active URL, and with |host| registered - // as having a valid certificate to |browser|. + // Adds a web state with `host` as the active URL, and with `host` registered + // as having a valid certificate to `browser`. void AddCertifiedWebStateToBrowser(std::string host, Browser* browser) { auto test_web_state = std::make_unique<web::FakeWebStateWithPolicyCache>( browser->GetBrowserState()); @@ -158,9 +158,9 @@ })); } - // Checks |cache| to see if the policy for |host| is "allowed". For the - // purposes of this test, that's effectively testing if |host| is "in" - // |cache|. Checking the cache is async, so this method handles synchronous + // Checks `cache` to see if the policy for `host` is "allowed". For the + // purposes of this test, that's effectively testing if `host` is "in" + // `cache`. Checking the cache is async, so this method handles synchronous // waiting for the result. bool IsHostCertAllowed( const scoped_refptr<web::CertificatePolicyCache>& cache, @@ -179,7 +179,7 @@ return judgement == web::CertPolicy::Judgment::ALLOWED; } - // Clears all entries from |cache|. This is posted to the IO thread and this + // Clears all entries from `cache`. This is posted to the IO thread and this // method sync-waits for this to complete. void ClearPolicyCache( const scoped_refptr<web::CertificatePolicyCache>& cache) { @@ -214,7 +214,7 @@ return IsHostCertAllowed(IncognitoPolicyCache(), host); } - // Populates |cache| with allowed certs for the hosts in |hosts|. This is done + // Populates `cache` with allowed certs for the hosts in `hosts`. This is done // in a single async call, and this method sync-waits on it completing. void PopulatePolicyCache(std::vector<std::string> hosts, scoped_refptr<web::CertificatePolicyCache> cache) {
diff --git a/ios/chrome/browser/web/chrome_web_client_unittest.mm b/ios/chrome/browser/web/chrome_web_client_unittest.mm index 8b70cab8..6f70de3f 100644 --- a/ios/chrome/browser/web/chrome_web_client_unittest.mm +++ b/ios/chrome/browser/web/chrome_web_client_unittest.mm
@@ -305,7 +305,7 @@ // Tests PrepareErrorPage for a safe browsing error, which results in a // committed safe browsing interstitial. TEST_F(ChromeWebClientTest, PrepareErrorPageForSafeBrowsingError) { - // Store an unsafe resource in |web_state|'s container. + // Store an unsafe resource in `web_state`'s container. web::FakeWebState web_state; web_state.SetBrowserState(browser_state()); SafeBrowsingUrlAllowList::CreateForWebState(&web_state);
diff --git a/ios/chrome/browser/web/dom_altering_lock.h b/ios/chrome/browser/web/dom_altering_lock.h index bef0dc94..09486d4 100644 --- a/ios/chrome/browser/web/dom_altering_lock.h +++ b/ios/chrome/browser/web/dom_altering_lock.h
@@ -23,7 +23,7 @@ // Method called when another class wants to acquire the lock. // Return YES if the class is ready to restore the DOM tree to its initial state -// and release the lock. A call to |releaseDOMLockWithCompletionHandler:| +// and release the lock. A call to `releaseDOMLockWithCompletionHandler:` // will follow to do the actual cleaning. // Return NO if the class wants to keep an exclusive access to the DOM tree. // Other features must account for the fact that they may not be able to acquire @@ -32,7 +32,7 @@ // Method called when another class wants to acquire the lock. // The class must restore the DOM tree, call DOMAlteringLock::Release() and then -// |completionHandler|. +// `completionHandler`. - (void)releaseDOMLockWithCompletionHandler:(ProceduralBlock)completionHandler; @end
diff --git a/ios/chrome/browser/web/font_size/font_size_java_script_feature.h b/ios/chrome/browser/web/font_size/font_size_java_script_feature.h index 94d6d5a..1a33130 100644 --- a/ios/chrome/browser/web/font_size/font_size_java_script_feature.h +++ b/ios/chrome/browser/web/font_size/font_size_java_script_feature.h
@@ -18,10 +18,10 @@ public: static FontSizeJavaScriptFeature* GetInstance(); - // Adjusts the font size in all frames of |web_state| by |size| percentage. + // Adjusts the font size in all frames of `web_state` by `size` percentage. void AdjustFontSize(web::WebState* web_state, int size); - // Adjusts the font size in |web_frame| by |size| percentage. + // Adjusts the font size in `web_frame` by `size` percentage. void AdjustFontSize(web::WebFrame* web_frame, int size); private:
diff --git a/ios/chrome/browser/web/font_size/font_size_js_unittest.mm b/ios/chrome/browser/web/font_size/font_size_js_unittest.mm index c476209..7e82d52 100644 --- a/ios/chrome/browser/web/font_size/font_size_js_unittest.mm +++ b/ios/chrome/browser/web/font_size/font_size_js_unittest.mm
@@ -38,7 +38,7 @@ FontSizeJsTest(const FontSizeJsTest&) = delete; FontSizeJsTest& operator=(const FontSizeJsTest&) = delete; - // Find DOM element by |element_id| and get computed font size in px. + // Find DOM element by `element_id` and get computed font size in px. float GetElementFontSize(NSString* element_id) { NSNumber* res = web::test::ExecuteJavaScript( [NSString @@ -50,10 +50,10 @@ return res.floatValue; } - // Wraps |html| in <html> and loads. Adds <meta name='viewport' + // Wraps `html` in <html> and loads. Adds <meta name='viewport' // content='initial-scale=1.0'> to avoid implicit font size inflation (e.g. // for <div style='font-size:10px'>d<div style='font-size:10px'>d</div></div> - // the |GetElementFontSize| returns 17px instead of 10px under default + // the `GetElementFontSize` returns 17px instead of 10px under default // viewport and '-webkit-text-size-adjust=auto'). Setting // '-webkit-text-size-adjust=none' also works. void LoadHtml(NSString* html) { @@ -72,8 +72,8 @@ web_state()); } - // Executes JavaScript "__gCrWeb.font_size.adjustFontSize(|scale|)" to - // adjust font size to |scale|% and return if it is executed without + // Executes JavaScript "__gCrWeb.font_size.adjustFontSize(`scale`)" to + // adjust font size to `scale|% and return if it is executed without // exception. [[nodiscard]] bool AdjustFontSize(int scale) { id script_result = web::test::ExecuteJavaScript(
diff --git a/ios/chrome/browser/web/font_size/font_size_tab_helper.h b/ios/chrome/browser/web/font_size/font_size_tab_helper.h index 61b84f4..f693eb8 100644 --- a/ios/chrome/browser/web/font_size/font_size_tab_helper.h +++ b/ios/chrome/browser/web/font_size/font_size_tab_helper.h
@@ -28,7 +28,7 @@ }; // Adjusts font size of web page by mapping -// |UIApplication.sharedApplication.preferredContentSizeCategory| to a scaling +// `UIApplication.sharedApplication.preferredContentSizeCategory` to a scaling // percentage and setting it to "-webkit-font-size-adjust" style on <body> when // the page is successfully loaded or system font size changes. class FontSizeTabHelper : public web::WebStateObserver, @@ -63,7 +63,7 @@ // Text zoom is currently only supported on HTML pages. bool CurrentPageSupportsTextZoom() const; - // Remove any stored zoom levels from the provided |PrefService|. + // Remove any stored zoom levels from `pref_service`. static void ClearUserZoomPrefs(PrefService* pref_service); static void RegisterBrowserStatePrefs(
diff --git a/ios/chrome/browser/web/font_size/font_size_tab_helper.mm b/ios/chrome/browser/web/font_size/font_size_tab_helper.mm index f25646d1..2908911 100644 --- a/ios/chrome/browser/web/font_size/font_size_tab_helper.mm +++ b/ios/chrome/browser/web/font_size/font_size_tab_helper.mm
@@ -103,7 +103,7 @@ } // namespace FontSizeTabHelper::~FontSizeTabHelper() { - // Remove observer in destructor because |this| is captured by the usingBlock + // Remove observer in destructor because `this` is captured by the usingBlock // in calling [NSNotificationCenter.defaultCenter // addObserverForName:object:queue:usingBlock] in constructor. [NSNotificationCenter.defaultCenter
diff --git a/ios/chrome/browser/web/font_size/font_size_tab_helper_unittest.mm b/ios/chrome/browser/web/font_size/font_size_tab_helper_unittest.mm index fe9e894..c0ea24e4 100644 --- a/ios/chrome/browser/web/font_size/font_size_tab_helper_unittest.mm +++ b/ios/chrome/browser/web/font_size/font_size_tab_helper_unittest.mm
@@ -175,8 +175,8 @@ } // Waits for the text size adjustment value of the main frame to be - // |adjustment|. Returns true if the value matches |adjustment| within - // |kWaitForJSCompletionTimeout|, false otherwise. + // `adjustment`. Returns true if the value matches `adjustment` within + // `kWaitForJSCompletionTimeout`, false otherwise. bool WaitForMainFrameTextSizeAdjustmentEqualTo(int adjustment) { return base::test::ios::WaitUntilConditionOrTimeout( base::test::ios::kWaitForJSCompletionTimeout, ^bool { @@ -200,7 +200,7 @@ }; // Tests that a web page's font size is set properly in a procedure started -// with default |UIApplication.sharedApplication.preferredContentSizeCategory|. +// with default `UIApplication.sharedApplication.preferredContentSizeCategory`. TEST_F(FontSizeTabHelperTest, PageLoadedWithDefaultFontSize) { LoadWebpage(); ASSERT_EQ(0ul, [GetMainFrameTextSizeAdjustment() length]); @@ -219,7 +219,7 @@ } // Tests that a web page's font size is set properly in a procedure started -// with special |UIApplication.sharedApplication.preferredContentSizeCategory|. +// with special `UIApplication.sharedApplication.preferredContentSizeCategory`. TEST_F(FontSizeTabHelperTest, PageLoadedWithExtraLargeFontSize) { preferred_content_size_category_ = UIContentSizeCategoryExtraLarge; @@ -238,7 +238,7 @@ } // Tests that UMA log is sent when -// |UIApplication.sharedApplication.preferredContentSizeCategory| returns an +// `UIApplication.sharedApplication.preferredContentSizeCategory` returns an // unrecognizable category. TEST_F(FontSizeTabHelperTest, PageLoadedWithUnrecognizableFontSize) { preferred_content_size_category_ = @"This is a new Category";
diff --git a/ios/chrome/browser/web/forms_egtest.mm b/ios/chrome/browser/web/forms_egtest.mm index 11143da..40b1bd8 100644 --- a/ios/chrome/browser/web/forms_egtest.mm +++ b/ios/chrome/browser/web/forms_egtest.mm
@@ -40,10 +40,10 @@ namespace { -// Response shown on the page of |GetDestinationUrl|. +// Response shown on the page of `GetDestinationUrl`. const char kDestinationText[] = "bar!"; -// Response shown on the page of |GetGenericUrl|. +// Response shown on the page of `GetGenericUrl`. const char kGenericText[] = "A generic page"; // Label for the button in the form. @@ -61,29 +61,29 @@ return web::test::HttpServer::MakeUrl("http://generic"); } -// GURL of a page with a form that posts data to |GetDestinationUrl|. +// GURL of a page with a form that posts data to `GetDestinationUrl`. const GURL GetFormUrl() { return web::test::HttpServer::MakeUrl("http://form"); } -// GURL of a page with a form that posts data to |GetDestinationUrl|. +// GURL of a page with a form that posts data to `GetDestinationUrl`. const GURL GetFormPostOnSamePageUrl() { return web::test::HttpServer::MakeUrl("http://form"); } -// GURL of the page to which the |GetFormUrl| posts data to. +// GURL of the page to which the `GetFormUrl` posts data to. const GURL GetDestinationUrl() { return web::test::HttpServer::MakeUrl("http://destination"); } #pragma mark - TestFormResponseProvider -// URL that redirects to |GetDestinationUrl| with a 302. +// URL that redirects to `GetDestinationUrl` with a 302. const GURL GetRedirectUrl() { return web::test::HttpServer::MakeUrl("http://redirect"); } -// URL to return a page that posts to |GetRedirectUrl|. +// URL to return a page that posts to `GetRedirectUrl`. const GURL GetRedirectFormUrl() { return web::test::HttpServer::MakeUrl("http://formRedirect"); } @@ -205,7 +205,7 @@ } // Sets up a basic simple http server for form test with a form located at -// |GetFormUrl|, and posts data to |GetDestinationUrl| upon submission. +// `GetFormUrl`, and posts data to `GetDestinationUrl` upon submission. - (void)setUpFormTestSimpleHttpServer { std::map<GURL, std::string> responses; responses[GetGenericUrl()] = kGenericText; @@ -269,7 +269,7 @@ [ChromeEarlGrey loadURL:GetGenericUrl()]; [ChromeEarlGrey goBack]; - // NavigationManager doesn't trigger repost on |goForward| due to WKWebView's + // NavigationManager doesn't trigger repost on `goForward` due to WKWebView's // back-forward cache. Force reload to trigger repost. Not waiting because // NavigationManager presents repost confirmation dialog before loading stops. [ChromeEarlGrey reloadAndWaitForCompletion:NO]; @@ -312,7 +312,7 @@ [ChromeEarlGrey goBack]; [ChromeEarlGrey goForward]; - // NavigationManager doesn't trigger repost on |goForward| due to WKWebView's + // NavigationManager doesn't trigger repost on `goForward` due to WKWebView's // back-forward cache. Force reload to trigger repost. Not waiting because // NavigationManager presents repost confirmation dialog before loading stops. [ChromeEarlGrey reloadAndWaitForCompletion:NO]; @@ -357,7 +357,7 @@ [self openBackHistory]; [self waitForTabHistoryView]; - // Mimic |web::GetDisplayTitleForUrl| behavior which uses FormatUrl + // Mimic `web::GetDisplayTitleForUrl` behavior which uses FormatUrl // internally. It can't be called directly from the EarlGrey 2 test process. std::u16string title = url_formatter::FormatUrl(destinationURL); id<GREYMatcher> historyItem = grey_text(base::SysUTF16ToNSString(title)); @@ -385,7 +385,7 @@ [ChromeEarlGrey goBack]; [ChromeEarlGrey goForward]; - // NavigationManager doesn't trigger repost on |goForward| due to WKWebView's + // NavigationManager doesn't trigger repost on `goForward` due to WKWebView's // back-forward cache. Force reload to trigger repost. Not waiting because // NavigationManager presents repost confirmation dialog before loading stops. [ChromeEarlGrey reloadAndWaitForCompletion:NO]; @@ -408,8 +408,8 @@ [ChromeEarlGrey waitForPageToFinishLoading]; - // NavigationManagerImpl displays repost on |reload|. So after - // cancelling, web view should show |destinationURL|. + // NavigationManagerImpl displays repost on `reload`. So after + // cancelling, web view should show `destinationURL`. [ChromeEarlGrey waitForWebStateContainingText:kDestinationText]; [[EarlGrey selectElementWithMatcher:OmniboxText(destinationURL.GetContent())] assertWithMatcher:grey_notNil()]; @@ -559,7 +559,7 @@ assertWithMatcher:grey_notNil()]; } -// Tap the text field indicated by |ID| to open the keyboard, and then +// Tap the text field indicated by `ID` to open the keyboard, and then // press the keyboard's "Go" button to submit the form. - (void)submitFormUsingKeyboardGoButtonWithInputID:(const std::string&)ID { // Disable EarlGrey's synchronization since it is blocked by opening the
diff --git a/ios/chrome/browser/web/image_fetch/image_fetch_java_script_feature.h b/ios/chrome/browser/web/image_fetch/image_fetch_java_script_feature.h index 3bc7eab2..36bf4ea 100644 --- a/ios/chrome/browser/web/image_fetch/image_fetch_java_script_feature.h +++ b/ios/chrome/browser/web/image_fetch/image_fetch_java_script_feature.h
@@ -22,15 +22,15 @@ public: virtual ~Handler() = default; - // Called when the webpage successfully sends back image data. |call_id| was - // the token originally passed to GetImageData(). |decoded_data| is the raw - // image data. |from| is a string explaining how the image data was + // Called when the webpage successfully sends back image data. `call_id` was + // the token originally passed to GetImageData(). `decoded_data` is the raw + // image data. `from` is a string explaining how the image data was // retrieved and may be empty. virtual void HandleJsSuccess(int call_id, std::string& decoded_data, std::string& from) = 0; - // Called when the webpage fails to retrieve image data. |call_id| was the + // Called when the webpage fails to retrieve image data. `call_id` was the // token originally passed to GetImageData(). virtual void HandleJsFailure(int call_id) = 0; }; @@ -39,8 +39,8 @@ // 1. Draw <img> to <canvas> and export its data; // 2. Download the image by XMLHttpRequest and hopefully get responded from // cache. - // |url| should be equal to the resolved "src" attribute of <img>, otherwise - // method 1 will fail. |call_id| is an opaque token that will be passed back + // `url` should be equal to the resolved "src" attribute of <img>, otherwise + // method 1 will fail. `call_id` is an opaque token that will be passed back // along with the response. // // Upon success or failure, this will invoke the appropriate Handler method. @@ -55,9 +55,9 @@ friend class base::NoDestructor<ImageFetchJavaScriptFeature>; // Constructs an ImageFetchJavaScriptFeature which uses the given - // |handler_factory|. Production code will generally install a factory which + // `handler_factory`. Production code will generally install a factory which // returns the ImageFetchTabHelper for the given WebState, while test code can - // install a custom factory to make testing easier. |handler_factory| can + // install a custom factory to make testing easier. `handler_factory` can // return nullptr and will always be passed a non-nullptr WebState. ImageFetchJavaScriptFeature( base::RepeatingCallback<Handler*(web::WebState*)> handler_factory);
diff --git a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.h b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.h index 2189a5c..8fcedc9 100644 --- a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.h +++ b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.h
@@ -41,7 +41,7 @@ ~ImageFetchTabHelper() override; - // Callback for GetImageData. |data| will be in binary format, or nil if + // Callback for GetImageData. `data` will be in binary format, or nil if // GetImageData failed. typedef void (^ImageDataCallback)(NSData* data); @@ -69,14 +69,14 @@ web::NavigationContext* navigation_context) override; void WebStateDestroyed(web::WebState* web_state) override; - // Callback for GetImageDataByJs. |data| will be in binary format, or nullptr + // Callback for GetImageDataByJs. `data` will be in binary format, or nullptr // if GetImageDataByJs failed. typedef base::OnceCallback<void(const std::string* data)> JsCallback; // Gets image data in binary format via ImageFetchJavaScriptFeature. - // |url| should be equal to the resolved "src" attribute of <img>, otherwise + // `url` should be equal to the resolved "src" attribute of <img>, otherwise // the method 1 would fail. If the JavaScript does not respond after - // |timeout|, the |callback| will be invoked with nullptr. + // `timeout`, the `callback` will be invoked with nullptr. void GetImageDataByJs(const GURL& url, base::TimeDelta timeout, JsCallback&& callback); @@ -99,10 +99,10 @@ // Store callbacks for GetImageData, with url as key. std::unordered_map<int, JsCallback> js_callbacks_; - // |GetImageData| uses this counter as ID to match calls with callbacks. Each - // call on |GetImageData| will increment |call_id_| by 1 and pass it as ID + // `GetImageData` uses this counter as ID to match calls with callbacks. Each + // call on `GetImageData` will increment `call_id_` by 1 and pass it as ID // when calling JavaScript. The ID will be regained in the message received in - // |OnImageDataReceived| and used to invoke the corresponding callback. + // `OnImageDataReceived` and used to invoke the corresponding callback. int call_id_ = 0; base::WeakPtrFactory<ImageFetchTabHelper> weak_ptr_factory_;
diff --git a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.mm b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.mm index ade554d..fee54c1e 100644 --- a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.mm +++ b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper.mm
@@ -90,8 +90,8 @@ void ImageFetchTabHelper::GetImageData(const GURL& url, const web::Referrer& referrer, ImageDataCallback callback) { - // |this| is captured into the callback of GetImageDataByJs, which will always - // be invoked before the |this| is destroyed, so it's safe. + // `this` is captured into the callback of GetImageDataByJs, which will always + // be invoked before the `this` is destroyed, so it's safe. GetImageDataByJs( url, base::Milliseconds(kGetImageDataByJsTimeout), base::BindOnce(&ImageFetchTabHelper::JsCallbackOfGetImageData,
diff --git a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper_unittest.mm b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper_unittest.mm index 70123d42..f632f0d 100644 --- a/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper_unittest.mm +++ b/ios/chrome/browser/web/image_fetch/image_fetch_tab_helper_unittest.mm
@@ -126,7 +126,7 @@ // Tests that ImageFetchTabHelper::GetImageData can get image data from Js. TEST_F(ImageFetchTabHelperTest, GetImageDataWithJsSucceedFromCanvas) { - // Inject fake |__gCrWeb.imageFetch.getImageData| that returns |kImageData| + // Inject fake `__gCrWeb.imageFetch.getImageData` that returns `kImageData` // in base64 format. id script_result = ExecuteJavaScriptForFeature( [NSString @@ -158,7 +158,7 @@ // Tests that ImageFetchTabHelper::GetImageData can get image data from Js. TEST_F(ImageFetchTabHelperTest, GetImageDataWithJsSucceedFromXmlHttpRequest) { - // Inject fake |__gCrWeb.imageFetch.getImageData| that returns |kImageData| + // Inject fake `__gCrWeb.imageFetch.getImageData` that returns `kImageData` // in base64 format. id script_result = ExecuteJavaScriptForFeature( [NSString @@ -218,7 +218,7 @@ // Tests that ImageFetchTabHelper::GetImageData gets image data from server when // Js does not send a message back. TEST_F(ImageFetchTabHelperTest, GetImageDataWithJsTimeout) { - // Inject fake |__gCrWeb.imageFetch.getImageData| that does not do anything. + // Inject fake `__gCrWeb.imageFetch.getImageData` that does not do anything. id script_result = ExecuteJavaScriptForFeature( @"__gCrWeb.imageFetch = {}; __gCrWeb.imageFetch.getImageData = " @"function(id, url) {}; true;", @@ -245,7 +245,7 @@ // Tests that ImageFetchTabHelper::GetImageData gets image data from server when // WebState is destroyed. TEST_F(ImageFetchTabHelperTest, GetImageDataWithWebStateDestroy) { - // Inject fake |__gCrWeb.imageFetch.getImageData| that does not do anything. + // Inject fake `__gCrWeb.imageFetch.getImageData` that does not do anything. id script_result = ExecuteJavaScriptForFeature( @"__gCrWeb.imageFetch = {}; __gCrWeb.imageFetch.getImageData = " @"function(id, url) {}; true;", @@ -272,7 +272,7 @@ // Tests that ImageFetchTabHelper::GetImageData gets image data from server when // WebState navigates to a new web page. TEST_F(ImageFetchTabHelperTest, GetImageDataWithWebStateNavigate) { - // Inject fake |__gCrWeb.imageFetch.getImageData| that does not do anything. + // Inject fake `__gCrWeb.imageFetch.getImageData` that does not do anything. id script_result = ExecuteJavaScriptForFeature( @"__gCrWeb.imageFetch = {}; __gCrWeb.imageFetch.getImageData = " @"function(id, url) {}; true;",
diff --git a/ios/chrome/browser/web/invalid_url_tab_helper_unittest.mm b/ios/chrome/browser/web/invalid_url_tab_helper_unittest.mm index 80073be..7d2cfb9 100644 --- a/ios/chrome/browser/web/invalid_url_tab_helper_unittest.mm +++ b/ios/chrome/browser/web/invalid_url_tab_helper_unittest.mm
@@ -24,7 +24,7 @@ InvalidUrlTabHelper::CreateForWebState(&web_state_); } - // Returns PolicyDecision for URL request with given |spec| and |transition|. + // Returns PolicyDecision for URL request with given `spec` and `transition`. web::WebStatePolicyDecider::PolicyDecision GetPolicy( NSString* spec, ui::PageTransition transition) {
diff --git a/ios/chrome/browser/web/navigation_egtest.mm b/ios/chrome/browser/web/navigation_egtest.mm index 8815199d..a6a7b2b 100644 --- a/ios/chrome/browser/web/navigation_egtest.mm +++ b/ios/chrome/browser/web/navigation_egtest.mm
@@ -31,13 +31,13 @@ // URL for the test window.history.go() test file. The page at this URL // contains several buttons that trigger window.history commands. Additionally // the page contains several divs used to display the state of the page: -// - A div that is populated with |kOnLoadText| when the onload event fires. -// - A div that is populated with |kNoOpText| 1s after a button is tapped. -// - A div that is populated with |kPopStateReceivedText| when a popstate event +// - A div that is populated with `kOnLoadText` when the onload event fires. +// - A div that is populated with `kNoOpText` 1s after a button is tapped. +// - A div that is populated with `kPopStateReceivedText` when a popstate event // is received by the page. // - A div that is populated with the state object (if it's a string) upon the // receipt of a popstate event. -// - A div that is populated with |kHashChangeReceivedText| when a hashchange +// - A div that is populated with `kHashChangeReceivedText` when a hashchange // event is received. // When a button on the page is tapped, all pre-existing div text is cleared, // so matching against this webview text after a button is tapped ensures that @@ -67,8 +67,8 @@ "/page1/#hashChangedWithoutHistory"; const char kNoHashChangeText[] = "No hash change"; // An HTML page with two links that run JavaScript when they're clicked. The -// first link updates |window.location.hash|, the second link changes -// |window.location|. +// first link updates `window.location.hash`, the second link changes +// `window.location`. const char kHashChangedHTML[] = "<html><body>" "<a href='javascript:window.location.hash=\"#hashChangedWithHistory\"' " @@ -133,10 +133,10 @@ @interface NavigationTestCase : ChromeTestCase // Adds hashchange listener to the page that changes the inner html of the page -// to |content| when a hashchange is detected. +// to `content` when a hashchange is detected. - (void)addHashChangeListenerWithContent:(std::string)content; -// Loads index page for redirect operations, taps the link with |redirectLabel| +// Loads index page for redirect operations, taps the link with `redirectLabel` // and then perform series of back-forward navigations asserting the proper // behavior. - (void)verifyBackAndForwardAfterRedirect:(std::string)redirectLabel; @@ -156,8 +156,8 @@ [ChromeEarlGrey loadURL:windowHistoryURL]; [ChromeEarlGrey waitForWebStateContainingText:kOnLoadText]; - // Tap on the window.history.go() button. This will clear |kOnLoadText|, so - // the subsequent check for |kOnLoadText| will only pass if a reload has + // Tap on the window.history.go() button. This will clear `kOnLoadText`, so + // the subsequent check for `kOnLoadText` will only pass if a reload has // occurred. [ChromeEarlGrey tapWebStateElementWithID:kGoNoParameterID]; @@ -174,8 +174,8 @@ [ChromeEarlGrey loadURL:windowHistoryURL]; [ChromeEarlGrey waitForWebStateContainingText:kOnLoadText]; - // Tap on the window.history.go() button. This will clear |kOnLoadText|, so - // the subsequent check for |kOnLoadText| will only pass if a reload has + // Tap on the window.history.go() button. This will clear `kOnLoadText`, so + // the subsequent check for `kOnLoadText` will only pass if a reload has // occurred. [ChromeEarlGrey tapWebStateElementWithID:kGoZeroID]; @@ -194,13 +194,13 @@ [ChromeEarlGrey waitForWebStateContainingText:kOnLoadText]; // Tap on the window.history.go(2) button. This will clear all div text, so - // the subsequent check for |kNoOpText| will only pass if no navigations have + // the subsequent check for `kNoOpText` will only pass if no navigations have // occurred. [ChromeEarlGrey tapWebStateElementWithID:kGoTwoID]; [ChromeEarlGrey waitForWebStateContainingText:kNoOpText]; // Tap on the window.history.go(-2) button. This will clear all div text, so - // the subsequent check for |kNoOpText| will only pass if no navigations have + // the subsequent check for `kNoOpText` will only pass if no navigations have // occurred. [ChromeEarlGrey tapWebStateElementWithID:kGoBackTwoID]; [ChromeEarlGrey waitForWebStateContainingText:kNoOpText]; @@ -251,7 +251,7 @@ [ChromeEarlGrey waitForWebStateContainingText:kOnLoadText]; // Tap the window.history.go(-2) button. This will clear the current page's - // |kOnLoadText|, so the subsequent check will only pass if another load + // `kOnLoadText`, so the subsequent check will only pass if another load // occurs. [ChromeEarlGrey tapWebStateElementWithID:kGoBackTwoID]; [ChromeEarlGrey waitForWebStateContainingText:kOnLoadText];
diff --git a/ios/chrome/browser/web/page_placeholder_tab_helper.h b/ios/chrome/browser/web/page_placeholder_tab_helper.h index 60b77f33..eb5ab731 100644 --- a/ios/chrome/browser/web/page_placeholder_tab_helper.h +++ b/ios/chrome/browser/web/page_placeholder_tab_helper.h
@@ -62,8 +62,8 @@ void AddPlaceholder(); void RemovePlaceholder(); - // Adds the given |snapshot| image to the |web_state_|'s view. The - // |web_state_|'s view must be visible, and it must be in a view hierarchy + // Adds the given `snapshot` image to the `web_state_`'s view. The + // `web_state_`'s view must be visible, and it must be in a view hierarchy // that has the Content Area named guide. void DisplaySnapshotImage(UIImage* snapshot);
diff --git a/ios/chrome/browser/web/print/print_tab_helper.h b/ios/chrome/browser/web/print/print_tab_helper.h index 51c9cbc..cd8f019 100644 --- a/ios/chrome/browser/web/print/print_tab_helper.h +++ b/ios/chrome/browser/web/print/print_tab_helper.h
@@ -20,10 +20,10 @@ ~PrintTabHelper() override; - // Sets the |printer|, which is held weakly by this object. + // Sets the `printer`, which is held weakly by this object. void set_printer(id<WebStatePrinter> printer); - // Prints |web_state_| using |printer_|. Does nothing if printing is + // Prints `web_state_` using `printer_`. Does nothing if printing is // disabled, for example by policy. void Print();
diff --git a/ios/chrome/browser/web/print/web_state_printer.h b/ios/chrome/browser/web/print/web_state_printer.h index 96890a3..b477017 100644 --- a/ios/chrome/browser/web/print/web_state_printer.h +++ b/ios/chrome/browser/web/print/web_state_printer.h
@@ -16,7 +16,7 @@ @protocol WebStatePrinter <NSObject> // Print WebState. -// Print preview will be presented on top of |baseViewController|. +// Print preview will be presented on top of `baseViewController`. - (void)printWebState:(web::WebState*)webState baseViewController:(UIViewController*)baseViewController;
diff --git a/ios/chrome/browser/web/progress_indicator_app_interface.h b/ios/chrome/browser/web/progress_indicator_app_interface.h index ddca4b8732..ef2a4ece 100644 --- a/ios/chrome/browser/web/progress_indicator_app_interface.h +++ b/ios/chrome/browser/web/progress_indicator_app_interface.h
@@ -15,7 +15,7 @@ // called from either app or test code. @interface ProgressIndicatorAppInterface : NSObject -// Matcher for an MDCProgressView with |progress|. +// Matcher for an MDCProgressView with `progress`. + (id<GREYMatcher>)progressViewWithProgress:(CGFloat)progress; @end
diff --git a/ios/chrome/browser/web/progress_indicator_egtest.mm b/ios/chrome/browser/web/progress_indicator_egtest.mm index 81608c1d..4223c13 100644 --- a/ios/chrome/browser/web/progress_indicator_egtest.mm +++ b/ios/chrome/browser/web/progress_indicator_egtest.mm
@@ -43,7 +43,7 @@ // URL string for an infinite pending page. const char kInfinitePendingPageURL[] = "http://infinite"; -// URL string for a simple page containing |kPageText|. +// URL string for a simple page containing `kPageText`. const char kSimplePageURL[] = "http://simplepage"; // Matcher for progress view. @@ -133,7 +133,7 @@ @implementation ProgressIndicatorTestCase // Returns an HTML string for a form with the submission action set to -// |submitURL|. +// `submitURL`. - (std::string)formPageHTMLWithFormSubmitURL:(GURL)submitURL { return base::StringPrintf( "<p>%s</p><form id='%s' method='post' action='%s'>"
diff --git a/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm b/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm index ed8cb76f6..86990c23 100644 --- a/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm +++ b/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm
@@ -398,7 +398,7 @@ #pragma mark - Utility methods -// Assert that status text |status|, if non-nil, is displayed in the webview, +// Assert that status text `status`, if non-nil, is displayed in the webview, // that the omnibox text is as expected, and that "onload" text is not // displayed. - (void)assertStatusText:(NSString*)status
diff --git a/ios/chrome/browser/web/repost_form_tab_helper.h b/ios/chrome/browser/web/repost_form_tab_helper.h index 3787428..8f9ff910 100644 --- a/ios/chrome/browser/web/repost_form_tab_helper.h +++ b/ios/chrome/browser/web/repost_form_tab_helper.h
@@ -24,7 +24,7 @@ ~RepostFormTabHelper() override; - // Presents a repost form dialog at the given |location|. |callback| is called + // Presents a repost form dialog at the given `location`. `callback` is called // with true if the repost was confirmed and with false if it was cancelled. void PresentDialog(CGPoint location, base::OnceCallback<void(bool)> callback);
diff --git a/ios/chrome/browser/web/repost_form_tab_helper_delegate.h b/ios/chrome/browser/web/repost_form_tab_helper_delegate.h index 8a271f6..5dc5e124 100644 --- a/ios/chrome/browser/web/repost_form_tab_helper_delegate.h +++ b/ios/chrome/browser/web/repost_form_tab_helper_delegate.h
@@ -12,8 +12,8 @@ // Delegate for RepostFormTabHelper. @protocol RepostFormTabHelperDelegate<NSObject> -// Asks the delegate to present repost form dialog at the given |location|. -// Delegate must call |completionHandler| with YES if form data should be +// Asks the delegate to present repost form dialog at the given `location`. +// Delegate must call `completionHandler` with YES if form data should be // reposted and with NO otherwise. - (void)repostFormTabHelper:(RepostFormTabHelper*)helper presentRepostFormDialogForWebState:(web::WebState*)webState
diff --git a/ios/chrome/browser/web/repost_form_tab_helper_unittest.mm b/ios/chrome/browser/web/repost_form_tab_helper_unittest.mm index 5489f12..6dd5200 100644 --- a/ios/chrome/browser/web/repost_form_tab_helper_unittest.mm +++ b/ios/chrome/browser/web/repost_form_tab_helper_unittest.mm
@@ -29,7 +29,7 @@ // Tab helper which delegates to this class. @property(nonatomic, assign) RepostFormTabHelper* tabHelper; -// Calls |repostFormTabHelper:presentRepostFromDialogAtPoint:completionHandler:| +// Calls `repostFormTabHelper:presentRepostFromDialogAtPoint:completionHandler:` // completion handler. - (void)allowRepost:(BOOL)shouldContinue;
diff --git a/ios/chrome/browser/web/restore_egtest.mm b/ios/chrome/browser/web/restore_egtest.mm index 475bd5b..b22e9ac 100644 --- a/ios/chrome/browser/web/restore_egtest.mm +++ b/ios/chrome/browser/web/restore_egtest.mm
@@ -44,7 +44,7 @@ const char kCountURL[] = "/countme.html"; // Response handler for page1 and page2 that supports 'airplane mode' by -// returning an empty RawHttpResponse when |responds_with_content| us false. +// returning an empty RawHttpResponse when `responds_with_content` us false. std::unique_ptr<net::test_server::HttpResponse> RestoreResponse( const bool& responds_with_content, const net::test_server::HttpRequest& request) { @@ -73,7 +73,7 @@ return std::move(http_response); } -// Response handler for |kCountURL| that counts the number of page loads. +// Response handler for `kCountURL` that counts the number of page loads. std::unique_ptr<net::test_server::HttpResponse> CountResponse( int* counter, const net::test_server::HttpRequest& request) { @@ -89,7 +89,7 @@ return std::move(http_response); } -// Returns true when omnibox contains |text|, otherwise returns false after +// Returns true when omnibox contains `text`, otherwise returns false after // after a timeout. [[nodiscard]] bool WaitForOmniboxContaining(std::string text) { return base::test::ios::WaitUntilConditionOrTimeout( @@ -130,7 +130,7 @@ // Verify that each page visited in -loadTestPages is properly restored by // navigating to each page and triggering a restore, confirming that pages are -// reloaded and back-forward history is preserved. If |checkServerData| is YES, +// reloaded and back-forward history is preserved. If `checkServerData` is YES, // also check that the proper content is restored. - (void)verifyRestoredTestPages:(BOOL)checkServerData;
diff --git a/ios/chrome/browser/web/sad_tab_tab_helper.h b/ios/chrome/browser/web/sad_tab_tab_helper.h index 2954e3b6..b35f02c 100644 --- a/ios/chrome/browser/web/sad_tab_tab_helper.h +++ b/ios/chrome/browser/web/sad_tab_tab_helper.h
@@ -23,7 +23,7 @@ static void CreateForWebState(web::WebState* web_state); // Creates a SadTabTabHelper and attaches it to a specific web_state object, - // |repeat_failure_interval| sets the corresponding instance variable used for + // `repeat_failure_interval` sets the corresponding instance variable used for // determining repeat failures. static void CreateForWebState(web::WebState* web_state, double repeat_failure_interval); @@ -33,8 +33,8 @@ ~SadTabTabHelper() override; - // Sets the SadTabHelper delegate. |delegate| will be in charge of presenting - // the SadTabView. |delegate| is not retained by TabHelper. + // Sets the SadTabHelper delegate. `delegate` will be in charge of presenting + // the SadTabView. `delegate` is not retained by TabHelper. void SetDelegate(id<SadTabTabHelperDelegate> delegate); // true if Sad Tab has currently being shown. @@ -47,14 +47,14 @@ // default repeat_failure_interval will be used. explicit SadTabTabHelper(web::WebState* web_state); - // Constructs a SadTabTabHelper allowing an optional |repeat_failure_interval| + // Constructs a SadTabTabHelper allowing an optional `repeat_failure_interval` // value to be passed in, representing a timeout period in seconds during // which a second failure will be considered a 'repeated' crash rather than an // initial event. SadTabTabHelper(web::WebState* web_state, double repeat_failure_interval); - // Registers that a visible crash occurred for |url_causing_failure|. Updates - // |repeated_failure_|. + // Registers that a visible crash occurred for `url_causing_failure`. Updates + // `repeated_failure_`. void OnVisibleCrash(const GURL& url_causing_failure); // Presents a new SadTabView via the web_state object. @@ -104,7 +104,7 @@ // used to determine time window for repeated crashes. std::unique_ptr<base::ElapsedTimer> last_failed_timer_; - // Whether a Sad Tab is being shown over |web_state_|'s content area. + // Whether a Sad Tab is being shown over `web_state_`'s content area. bool showing_sad_tab_ = false; // true if Sad Tab is presented and presented for repeated load failure.
diff --git a/ios/chrome/browser/web/sad_tab_tab_helper.mm b/ios/chrome/browser/web/sad_tab_tab_helper.mm index d5ac576a..f00bc7e7 100644 --- a/ios/chrome/browser/web/sad_tab_tab_helper.mm +++ b/ios/chrome/browser/web/sad_tab_tab_helper.mm
@@ -138,7 +138,7 @@ web::NavigationContext* navigation_context) { // The sad tab is removed when a new navigation begins. SetIsShowingSadTab(false); - // NO-OP is fine if |delegate_| is nil since the |delegate_| will be updated + // NO-OP is fine if `delegate_` is nil since the `delegate_` will be updated // when it is set. [delegate_ sadTabTabHelperDismissSadTab:this]; } @@ -176,7 +176,7 @@ } void SadTabTabHelper::PresentSadTab() { - // NO-OP is fine if |delegate_| is nil since the |delegate_| will be updated + // NO-OP is fine if `delegate_` is nil since the `delegate_` will be updated // when it is set. [delegate_ sadTabTabHelper:this presentSadTabForWebState:web_state_
diff --git a/ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm b/ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm index 84d0a64..d881cd7 100644 --- a/ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm +++ b/ios/chrome/browser/web/sad_tab_tab_helper_unittest.mm
@@ -29,7 +29,7 @@ // Delegate for testing. @interface SadTabTabHelperTestDelegate : NSObject<SadTabTabHelperDelegate> -// |repeatedFailure| could be used by the delegate to display different types of +// `repeatedFailure` could be used by the delegate to display different types of // SadTabs. @property(nonatomic, assign) BOOL repeatedFailure; // YES if SadTab is currently being shown. @@ -345,7 +345,7 @@ OCMStub([application_ applicationState]).andReturn(UIApplicationStateActive); // N.B. The test fixture web_state_ is not used for this test as a custom - // |repeat_failure_interval| is required. + // `repeat_failure_interval` is required. std::unique_ptr<ChromeBrowserState> browser_state = TestChromeBrowserState::Builder().Build();
diff --git a/ios/chrome/browser/web/session_state/web_session_state_cache.h b/ios/chrome/browser/web/session_state/web_session_state_cache.h index 073aad6..c6dacc844f 100644 --- a/ios/chrome/browser/web/session_state/web_session_state_cache.h +++ b/ios/chrome/browser/web/session_state/web_session_state_cache.h
@@ -32,22 +32,22 @@ - (instancetype)init NS_UNAVAILABLE; -// Persists |data| in a background thread based on |webState|'s tab id. +// Persists `data` in a background thread based on `webState`'s tab id. - (void)persistSessionStateData:(NSData*)data forWebState:(const web::WebState*)webState; -// Retrieves the persisted session state based on |webState|'s tab id. Returns +// Retrieves the persisted session state based on `webState`'s tab id. Returns // nil if file does not exist. - (NSData*)sessionStateDataForWebState:(const web::WebState*)webState; -// Deletes the persisted session state based on |webState|'s tab id in a -// background thread. If |_delayRemove| is set, purge is instead called on a +// Deletes the persisted session state based on `webState`'s tab id in a +// background thread. If `_delayRemove` is set, purge is instead called on a // short delay. - (void)removeSessionStateDataForWebState:(const web::WebState*)webState; // Removes any persisted session data for tabs that no longer exist. Usually // this happens because of a crash, but may also be used internally if any tabs -// are removed when |_delayRemove| is true. +// are removed when `_delayRemove` is true. - (void)purgeUnassociatedData; // Delay any removes triggered by -removeSessionStateDataForWebState. This is
diff --git a/ios/chrome/browser/web/session_state/web_session_state_cache.mm b/ios/chrome/browser/web/session_state/web_session_state_cache.mm index 0a355ec..04edf000 100644 --- a/ios/chrome/browser/web/session_state/web_session_state_cache.mm +++ b/ios/chrome/browser/web/session_state/web_session_state_cache.mm
@@ -37,11 +37,11 @@ namespace { // The delay, in seconds, for cleaning up any unassociated session state files -// when -removeSessionStateDataForWebState is called while |_delayRemove| is +// when -removeSessionStateDataForWebState is called while `_delayRemove` is // true. const int kRemoveSessionStateDataDelay = 10; -// Writes |sessionData| to |cacheDirectory|. If -writeToFile fails, deletes +// Writes `sessionData` to `cacheDirectory`. If -writeToFile fails, deletes // the old (now stale) data. void WriteSessionData(NSData* sessionData, base::FilePath cacheDirectory, @@ -142,7 +142,7 @@ if (!data || !sessionID || !_taskRunner) return; - // Copy ivars used by the block so that it does not reference |self|. + // Copy ivars used by the block so that it does not reference `self`. const base::FilePath cacheDirectory = _cacheDirectory; // Save the session to disk. @@ -225,7 +225,7 @@ } // Deletes any files from the session cache directory that don't exist in -// |liveSessionIDs|. +// `liveSessionIDs`. - (void)purgeCacheExcept:(NSSet*)liveSessionIDs { DCHECK_CALLED_ON_VALID_SEQUENCE(_sequenceChecker);
diff --git a/ios/chrome/browser/web/session_state/web_session_state_tab_helper.h b/ios/chrome/browser/web/session_state/web_session_state_tab_helper.h index 7b8c7b4..9095bc3 100644 --- a/ios/chrome/browser/web/session_state/web_session_state_tab_helper.h +++ b/ios/chrome/browser/web/session_state/web_session_state_tab_helper.h
@@ -32,7 +32,7 @@ // Returns true if the feature is enabled and running iOS 15 or newer. static bool IsEnabled(); - // If kRestoreSessionFromCache is enabled restore |web_state|'s WKWebView + // If kRestoreSessionFromCache is enabled restore `web_state`'s WKWebView // using the previously saved sessionState data via the WebSessionStateCache. // Returns true if the session could be restored. bool RestoreSessionFromCache(); @@ -65,7 +65,7 @@ // SaveSessionState(). bool stale_ = false; - // Cache the values of this |web_state|'s navigation manager GetItemCount() + // Cache the values of this `web_state`'s navigation manager GetItemCount() // and GetLastCommittedItemIndex(). int item_count_ = 0; int last_committed_item_index_ = 0;
diff --git a/ios/chrome/browser/web/session_state/web_session_state_tab_helper.mm b/ios/chrome/browser/web/session_state/web_session_state_tab_helper.mm index f211cff..1343644 100644 --- a/ios/chrome/browser/web/session_state/web_session_state_tab_helper.mm +++ b/ios/chrome/browser/web/session_state/web_session_state_tab_helper.mm
@@ -118,7 +118,7 @@ WebSessionStateCache* cache = WebSessionStateCacheFactory::GetForBrowserState(GetBrowserState()); // To prevent very large session states from using too much space, don't - // persist any |data| larger than 5MB. If this happens, remove the now + // persist any `data` larger than 5MB. If this happens, remove the now // stale session state data. if (size_kb > kMaxSessionState) { [cache removeSessionStateDataForWebState:web_state_]; @@ -156,7 +156,7 @@ return; // -WebFrameDidBecomeAvailable is called much more often than navigations, so - // check if either |item_count_| or |last_committed_item_index_| has changed + // check if either `item_count_` or `last_committed_item_index_` has changed // before marking a page as stale. web::NavigationManager* navigation_manager = web_state->GetNavigationManager();
diff --git a/ios/chrome/browser/web/tab_order_egtest.mm b/ios/chrome/browser/web/tab_order_egtest.mm index 96ecdae..6600597 100644 --- a/ios/chrome/browser/web/tab_order_egtest.mm +++ b/ios/chrome/browser/web/tab_order_egtest.mm
@@ -26,16 +26,16 @@ // URL for a test page that contains a link. const char kLinksTestURL1[] = "/links.html"; -// Some text in |kLinksTestURL1|. +// Some text in `kLinksTestURL1`. const char kLinksTestURL1Text[] = "Normal Link"; -// ID of the <a> link in |kLinksTestURL1|. +// ID of the <a> link in `kLinksTestURL1`. const char kLinkSelectorID[] = "normal-link"; // URL for a different test page. const char kLinksTestURL2[] = "/destination.html"; -// Some text in |kLinksTestURL2|. +// Some text in `kLinksTestURL2`. const char kLinksTestURL2Text[] = "arrived"; } // namespace @@ -65,7 +65,7 @@ [ChromeEarlGrey waitForMainTabCount:2U]; NSString* childTab1ID = [ChromeEarlGrey nextTabID]; - // New child tab should be inserted after the tab with |childTab1ID|. + // New child tab should be inserted after the tab with `childTab1ID`. [[EarlGrey selectElementWithMatcher:WebViewMatcher()] performAction:chrome_test_util::LongPressElementForContextMenu( [ElementSelector selectorWithElementID:kLinkSelectorID], @@ -76,7 +76,7 @@ GREYAssertEqualObjects(childTab1ID, [ChromeEarlGrey nextTabID], @"Unexpected next tab"); - // Navigate the parent tab away and again to |kLinksTestURL1| to break + // Navigate the parent tab away and again to `kLinksTestURL1` to break // grouping with the current child tabs. Total number of tabs should not // change. const GURL URL2 = self.testServer->GetURL(kLinksTestURL2); @@ -90,7 +90,7 @@ GREYAssertEqual(3U, [ChromeEarlGrey mainTabCount], @"Unexpected number of tabs"); - // New child tab should be inserted before the tab with |childTab1ID|. + // New child tab should be inserted before the tab with `childTab1ID`. [[EarlGrey selectElementWithMatcher:WebViewMatcher()] performAction:chrome_test_util::LongPressElementForContextMenu( [ElementSelector selectorWithElementID:kLinkSelectorID], @@ -102,7 +102,7 @@ GREYAssertNotEqualObjects(childTab1ID, childTab3ID, @"Unexpected next tab"); - // New child tab should be inserted after the tab with |childTab3ID|. + // New child tab should be inserted after the tab with `childTab3ID`. [[EarlGrey selectElementWithMatcher:WebViewMatcher()] performAction:chrome_test_util::LongPressElementForContextMenu( [ElementSelector selectorWithElementID:kLinkSelectorID], @@ -113,7 +113,7 @@ GREYAssertEqualObjects(childTab3ID, [ChromeEarlGrey nextTabID], @"Unexpected next web state"); - // Verify that tab with |childTab1ID| is now at index 3. + // Verify that tab with `childTab1ID` is now at index 3. [ChromeEarlGrey selectTabAtIndex:3]; GREYAssertEqualObjects(childTab1ID, [ChromeEarlGrey currentTabID], @"Unexpected current web state"); @@ -126,7 +126,7 @@ GREYAssertEqualObjects(parentTabID, [ChromeEarlGrey nextTabID], @"Unexpected next web state"); - // Verify that tab with |anotherTabID| is at index 5. + // Verify that tab with `anotherTabID` is at index 5. NSString* anotherTabID = [ChromeEarlGrey currentTabID]; [ChromeEarlGrey selectTabAtIndex:5]; GREYAssertEqualObjects(anotherTabID, [ChromeEarlGrey currentTabID],
diff --git a/ios/chrome/browser/web/visible_url_egtest.mm b/ios/chrome/browser/web/visible_url_egtest.mm index 0f53dd3..889e788 100644 --- a/ios/chrome/browser/web/visible_url_egtest.mm +++ b/ios/chrome/browser/web/visible_url_egtest.mm
@@ -53,7 +53,7 @@ } // Response provider which can be paused. When it is paused it buffers all -// requests and does not respond to them until |set_paused(false)| is called. +// requests and does not respond to them until `set_paused(false)` is called. class PausableResponseProvider : public HtmlResponseProvider { public: explicit PausableResponseProvider( @@ -114,7 +114,7 @@ // Pauses response server. - (void)setServerPaused:(BOOL)paused; -// Waits until |_responseProvider| receives a request with the given |URL|. +// Waits until `_responseProvider` receives a request with the given `URL`. // Returns YES if request was received, NO on timeout. - (BOOL)waitForServerToReceiveRequestWithURL:(GURL)URL;
diff --git a/ios/chrome/browser/web/web_navigation_browser_agent.h b/ios/chrome/browser/web/web_navigation_browser_agent.h index f294f6b..792315a 100644 --- a/ios/chrome/browser/web/web_navigation_browser_agent.h +++ b/ios/chrome/browser/web/web_navigation_browser_agent.h
@@ -58,9 +58,9 @@ explicit WebNavigationBrowserAgent(Browser* browser); // Reloads the original url of the last non-redirect item (including - // non-history items) with |userAgentType|. + // non-history items) with `userAgentType`. void ReloadWithUserAgentType(web::UserAgentType userAgentType); - // Return the UserAgentType for a given |web_state|. + // Return the UserAgentType for a given `web_state`. web::UserAgentType UserAgentType(web::WebState* web_state); // The web state list for the associated browser. This should never be
diff --git a/ios/chrome/browser/web/web_navigation_browser_agent.mm b/ios/chrome/browser/web/web_navigation_browser_agent.mm index d8944e6..e3c094a27 100644 --- a/ios/chrome/browser/web/web_navigation_browser_agent.mm +++ b/ios/chrome/browser/web/web_navigation_browser_agent.mm
@@ -60,7 +60,7 @@ if (delegate_.NTPActiveForCurrentWebState) { [delegate_ reloadNTPForWebState:web_state_list_->GetActiveWebState()]; } else { - // |check_for_repost| is true because the reload is explicitly initiated + // `check_for_repost` is true because the reload is explicitly initiated // by the user. web_state_list_->GetActiveWebState()->GetNavigationManager()->Reload( web::ReloadType::NORMAL, true /* check_for_repost */);
diff --git a/ios/chrome/browser/web/web_navigation_browser_agent_unittest.mm b/ios/chrome/browser/web/web_navigation_browser_agent_unittest.mm index cdaf252..7ebffd0 100644 --- a/ios/chrome/browser/web/web_navigation_browser_agent_unittest.mm +++ b/ios/chrome/browser/web/web_navigation_browser_agent_unittest.mm
@@ -29,7 +29,7 @@ @property(nonatomic, readwrite, getter=isNTPActiveForCurrentWebState) BOOL NTPActiveForCurrentWebState; -// YES if reloadNTPForWebState was called for |webState| +// YES if reloadNTPForWebState was called for `webState` - (BOOL)didReloadForWebState:(web::WebState*)webState; @end @@ -76,7 +76,7 @@ std::unique_ptr<TestBrowser> browser_; FakeNTPDelegate* delegate_; WebNavigationBrowserAgent* agent_; - // Navigation manager for the web state at index 0 in |browser_|'s web state + // Navigation manager for the web state at index 0 in `browser_`'s web state // list. web::FakeNavigationManager* navigation_manager_; };
diff --git a/ios/chrome/browser/web/web_navigation_ntp_delegate.h b/ios/chrome/browser/web/web_navigation_ntp_delegate.h index 6a6e6f20..3f63d89 100644 --- a/ios/chrome/browser/web/web_navigation_ntp_delegate.h +++ b/ios/chrome/browser/web/web_navigation_ntp_delegate.h
@@ -24,7 +24,7 @@ @property(nonatomic, readonly, getter=isNTPActiveForCurrentWebState) BOOL NTPActiveForCurrentWebState; -// Tells the delegate to reload the NTP for |webState|, if any. +// Tells the delegate to reload the NTP for `webState`, if any. - (void)reloadNTPForWebState:(web::WebState*)webState; @end
diff --git a/ios/chrome/browser/web/web_navigation_util.h b/ios/chrome/browser/web/web_navigation_util.h index 2dac993..32caae0 100644 --- a/ios/chrome/browser/web/web_navigation_util.h +++ b/ios/chrome/browser/web/web_navigation_util.h
@@ -17,21 +17,21 @@ namespace web_navigation_util { -// Creates a WebLoadParams object for loading |url| with |transition_type|. If -// |post_data| is nonnull, the data and content-type of the post data will be +// Creates a WebLoadParams object for loading `url` with `transition_type`. If +// `post_data` is nonnull, the data and content-type of the post data will be // added to the return value as well. web::NavigationManager::WebLoadParams CreateWebLoadParams( const GURL& url, ui::PageTransition transition_type, TemplateURLRef::PostContent* post_data); -// Navigates to the previous item on the navigation stack for |web_state|. -// |web_state| can't be null. This method is for user initiated navigations as +// Navigates to the previous item on the navigation stack for `web_state`. +// `web_state` can't be null. This method is for user initiated navigations as // it logs "Back" user action. void GoBack(web::WebState* web_state); -// Navigates to the next item on the navigation stack for |web_state|. -// |web_state| can't be null. This method is for user initiated navigations as +// Navigates to the next item on the navigation stack for `web_state`. +// `web_state` can't be null. This method is for user initiated navigations as // it logs "Forward" user action. void GoForward(web::WebState* web_state);
diff --git a/ios/chrome/browser/web/web_navigation_util.mm b/ios/chrome/browser/web/web_navigation_util.mm index 961a031..aba53267 100644 --- a/ios/chrome/browser/web/web_navigation_util.mm +++ b/ios/chrome/browser/web/web_navigation_util.mm
@@ -26,7 +26,7 @@ web::NavigationManager::WebLoadParams params(URL); params.transition_type = transition_type; if (post_data) { - // Extract the content type and post params from |postData| and add them + // Extract the content type and post params from `postData` and add them // to the load params. NSString* contentType = base::SysUTF8ToNSString(post_data->first); NSData* data = [NSData dataWithBytes:(void*)post_data->second.data()
diff --git a/ios/chrome/browser/web/web_performance_metrics/web_performance_metrics_tab_helper.h b/ios/chrome/browser/web/web_performance_metrics/web_performance_metrics_tab_helper.h index 1a6ce80..8c4c1b5 100644 --- a/ios/chrome/browser/web/web_performance_metrics/web_performance_metrics_tab_helper.h +++ b/ios/chrome/browser/web/web_performance_metrics/web_performance_metrics_tab_helper.h
@@ -39,7 +39,7 @@ double absolute_first_contentful_paint); // If the web page has logged its First Input Delay, the function - // returns |true| otherwise it returns |false| + // returns `true` otherwise it returns `false` bool GetFirstInputDelayLoggingStatus() const; // Returns whether the WebState has been hidden at any point since the start
diff --git a/ios/chrome/browser/web_state_list/active_web_state_observation_forwarder.h b/ios/chrome/browser/web_state_list/active_web_state_observation_forwarder.h index 682b87d..a178e77 100644 --- a/ios/chrome/browser/web_state_list/active_web_state_observation_forwarder.h +++ b/ios/chrome/browser/web_state_list/active_web_state_observation_forwarder.h
@@ -16,9 +16,9 @@ // changes. class ActiveWebStateObservationForwarder : public WebStateListObserver { public: - // Creates an object which forwards observation methods to |observer| and - // tracks |web_state_list| to keep track of the currently-active WebState. - // |web_state_list| and |observer| must both outlive this object. + // Creates an object which forwards observation methods to `observer` and + // tracks `web_state_list` to keep track of the currently-active WebState. + // `web_state_list` and `observer` must both outlive this object. ActiveWebStateObservationForwarder(WebStateList* web_state_list, web::WebStateObserver* observer);
diff --git a/ios/chrome/browser/web_state_list/all_web_state_observation_forwarder.h b/ios/chrome/browser/web_state_list/all_web_state_observation_forwarder.h index 02dd7a5..d77cd9c1 100644 --- a/ios/chrome/browser/web_state_list/all_web_state_observation_forwarder.h +++ b/ios/chrome/browser/web_state_list/all_web_state_observation_forwarder.h
@@ -17,9 +17,9 @@ // removed, or replaced. class AllWebStateObservationForwarder : public WebStateListObserver { public: - // Creates an object which forwards observation methods to |observer| and - // tracks the set of WebStates in |web_state_list|. |web_state_list| and - // |observer| must both outlive this object. + // Creates an object which forwards observation methods to `observer` and + // tracks the set of WebStates in `web_state_list`. `web_state_list` and + // `observer` must both outlive this object. AllWebStateObservationForwarder(WebStateList* web_state_list, web::WebStateObserver* observer);
diff --git a/ios/chrome/browser/web_state_list/session_metrics.h b/ios/chrome/browser/web_state_list/session_metrics.h index 0d87f4d..b0b12e5 100644 --- a/ios/chrome/browser/web_state_list/session_metrics.h +++ b/ios/chrome/browser/web_state_list/session_metrics.h
@@ -43,7 +43,7 @@ SessionMetrics(const SessionMetrics&) = delete; SessionMetrics& operator=(const SessionMetrics&) = delete; - // Record metrics counters specified by |metrics_to_record| which is a + // Record metrics counters specified by `metrics_to_record` which is a // bitwise "or" combination of MetricsToRecordFlags. All other metrics // are cleared. void RecordAndClearSessionMetrics(MetricsToRecordFlagSet flag_set);
diff --git a/ios/chrome/browser/web_state_list/view_source_browser_agent.h b/ios/chrome/browser/web_state_list/view_source_browser_agent.h index 326e17d..c9a9561 100644 --- a/ios/chrome/browser/web_state_list/view_source_browser_agent.h +++ b/ios/chrome/browser/web_state_list/view_source_browser_agent.h
@@ -39,7 +39,7 @@ explicit ViewSourceBrowserAgent(Browser* browser); - // Inserts a tab into |browser_| showing the |source| for |web_state|. + // Inserts a tab into `browser_` showing the `source` for `web_state`. void InsertSourceViewTab(NSString* source, web::WebState* web_state); // OnHandleViewSourceForActiveWebStateResult is called asynchronously with
diff --git a/ios/chrome/browser/web_state_list/web_state_dependency_installation_observer.h b/ios/chrome/browser/web_state_list/web_state_dependency_installation_observer.h index e96ded3..b6d1d0b1 100644 --- a/ios/chrome/browser/web_state_list/web_state_dependency_installation_observer.h +++ b/ios/chrome/browser/web_state_list/web_state_dependency_installation_observer.h
@@ -74,10 +74,10 @@ // The class which installs/uninstalls dependencies in response to changes to // the WebStateList DependencyInstaller* dependency_installer_; - // Automatically detaches |this| from the WebStateList when destroyed + // Automatically detaches `this` from the WebStateList when destroyed base::ScopedObservation<WebStateList, WebStateListObserver> web_state_list_observation_{this}; - // Automatically detaches |this| from the WebStates when destroyed. + // Automatically detaches `this` from the WebStates when destroyed. base::ScopedMultiSourceObservation<web::WebState, web::WebStateObserver> web_state_observations_{this}; };
diff --git a/ios/chrome/browser/web_state_list/web_state_dependency_installer_bridge.h b/ios/chrome/browser/web_state_list/web_state_dependency_installer_bridge.h index 0dafbdb..9d6db5f 100644 --- a/ios/chrome/browser/web_state_list/web_state_dependency_installer_bridge.h +++ b/ios/chrome/browser/web_state_list/web_state_dependency_installer_bridge.h
@@ -44,7 +44,7 @@ id<DependencyInstalling> installing_; // The observer which informs this bridge that a dependency needs to be - // installed/uninstalled; those calls are then forwarded to |installing_|. + // installed/uninstalled; those calls are then forwarded to `installing_`. WebStateDependencyInstallationObserver observer_; };
diff --git a/ios/chrome/browser/web_state_list/web_state_list.h b/ios/chrome/browser/web_state_list/web_state_list.h index d41843e..ccebcc7 100644 --- a/ios/chrome/browser/web_state_list/web_state_list.h +++ b/ios/chrome/browser/web_state_list/web_state_list.h
@@ -96,7 +96,7 @@ web::WebState* GetActiveWebState() const; // Returns the WebState at the specified index. It is invalid to call this - // with an index such that |ContainsIndex(index)| returns false. + // with an index such that `ContainsIndex(index)` returns false. web::WebState* GetWebStateAt(int index) const; // Returns the index of the specified WebState or kInvalidIndex if the @@ -104,34 +104,34 @@ int GetIndexOfWebState(const web::WebState* web_state) const; // Returns the index of the first WebState in the model whose visible URL is - // |url| or kInvalidIndex if no WebState with that URL exists. + // `url` or kInvalidIndex if no WebState with that URL exists. int GetIndexOfWebStateWithURL(const GURL& url) const; // Returns the index of the first WebState, ignoring the currently active - // WebState, in the model whose visible URL is |url| or kInvalidIndex if no + // WebState, in the model whose visible URL is `url` or kInvalidIndex if no // non-active WebState with that URL exists. int GetIndexOfInactiveWebStateWithURL(const GURL& url) const; // Returns information about the opener of the WebState at the specified - // index. The structure |opener| will be null if there is no opener. + // index. The structure `opener` will be null if there is no opener. WebStateOpener GetOpenerOfWebStateAt(int index) const; // Stores information about the opener of the WebState at the specified - // index. The WebStateOpener |opener| must be non-null and the WebState + // index. The WebStateOpener `opener` must be non-null and the WebState // must be in WebStateList. void SetOpenerOfWebStateAt(int index, WebStateOpener opener); // Returns the index of the next WebState in the sequence of WebStates opened - // from the specified WebState after |start_index|, or kInvalidIndex if there - // are no such WebState. If |use_group| is true, the opener's navigation index + // from the specified WebState after `start_index`, or kInvalidIndex if there + // are no such WebState. If `use_group` is true, the opener's navigation index // is used to detect navigation changes within the same session. int GetIndexOfNextWebStateOpenedBy(const web::WebState* opener, int start_index, bool use_group) const; // Returns the index of the last WebState in the sequence of WebStates opened - // from the specified WebState after |start_index|, or kInvalidIndex if there - // are no such WebState. If |use_group| is true, the opener's navigation index + // from the specified WebState after `start_index`, or kInvalidIndex if there + // are no such WebState. If `use_group` is true, the opener's navigation index // is used to detect navigation changes within the same session. int GetIndexOfLastWebStateOpenedBy(const web::WebState* opener, int start_index, @@ -139,7 +139,7 @@ // Inserts the specified WebState at the best position in the WebStateList // given the specified opener, recommended index, insertion flags, ... The - // |insertion_flags| is a bitwise combination of InsertionFlags values. + // `insertion_flags` is a bitwise combination of InsertionFlags values. // Returns the effective insertion index. int InsertWebState(int index, std::unique_ptr<web::WebState> web_state, @@ -160,11 +160,11 @@ // to the caller (abandon ownership of the returned WebState). std::unique_ptr<web::WebState> DetachWebStateAt(int index); - // Closes and destroys the WebState at the specified index. The |close_flags| + // Closes and destroys the WebState at the specified index. The `close_flags` // is a bitwise combination of ClosingFlags values. void CloseWebStateAt(int index, int close_flags); - // Closes and destroys all WebStates. The |close_flags| is a bitwise + // Closes and destroys all WebStates. The `close_flags` is a bitwise // combination of ClosingFlags values. void CloseAllWebStates(int close_flags); @@ -179,7 +179,7 @@ // Performs mutating operations on the WebStateList as batched operation. // The observers will be notified by WillBeginBatchOperation() before the - // |operation| callback is executed and by BatchOperationEnded() after it + // `operation` callback is executed and by BatchOperationEnded() after it // has completed. void PerformBatchOperation(base::OnceCallback<void(WebStateList*)> operation); @@ -196,7 +196,7 @@ // Inserts the specified WebState at the best position in the WebStateList // given the specified opener, recommended index, insertion flags, ... The - // |insertion_flags| is a bitwise combination of InsertionFlags values. + // `insertion_flags` is a bitwise combination of InsertionFlags values. // Returns the effective insertion index. // // Assumes that the WebStateList is locked. @@ -225,13 +225,13 @@ // Assumes that the WebStateList is locked. std::unique_ptr<web::WebState> DetachWebStateAtImpl(int index); - // Closes and destroys the WebState at the specified index. The |close_flags| + // Closes and destroys the WebState at the specified index. The `close_flags` // is a bitwise combination of ClosingFlags values. // // Assumes that the WebStateList is locked. void CloseWebStateAtImpl(int index, int close_flags); - // Closes and destroys all WebStates. The |close_flags| is a bitwise + // Closes and destroys all WebStates. The `close_flags` is a bitwise // combination of ClosingFlags values. // // Assumes that the WebStateList is locked. @@ -246,16 +246,16 @@ // specified index to null. void ClearOpenersReferencing(int index); - // Notify the observers if the active WebState change. |reason| is the value + // Notify the observers if the active WebState change. `reason` is the value // passed to the WebStateListObservers. void NotifyIfActiveWebStateChanged(web::WebState* old_web_state, ActiveWebStateChangeReason reason); - // Returns the index of the |n|-th WebState (with n > 0) in the sequence of + // Returns the index of the `n`-th WebState (with n > 0) in the sequence of // WebStates opened from the specified WebState starting the search from - // |start_index| (the returned index may be smaller than |start_index| if + // `start_index` (the returned index may be smaller than `start_index` if // the element have been rearranged), or kInvalidIndex if there are no such - // WebState. If |use_group| is true, the opener's navigation index is used + // WebState. If `use_group` is true, the opener's navigation index is used // to detect navigation changes within the same session. int GetIndexOfNthWebStateOpenedBy(const web::WebState* opener, int start_index, @@ -267,7 +267,7 @@ WebStateWrapper* GetActiveWebStateWrapper() const; // Returns the wrapper of the WebState at the specified index. It is invalid - // to call this with an index such that |ContainsIndex(index)| returns false. + // to call this with an index such that `ContainsIndex(index)` returns false. WebStateWrapper* GetWebStateWrapperAt(int index) const; // The WebStateList delegate.
diff --git a/ios/chrome/browser/web_state_list/web_state_list.mm b/ios/chrome/browser/web_state_list/web_state_list.mm index fac13b7..e1b1aaea 100644 --- a/ios/chrome/browser/web_state_list/web_state_list.mm +++ b/ios/chrome/browser/web_state_list/web_state_list.mm
@@ -65,7 +65,7 @@ bool ShouldResetOpenerOnActiveWebStateChange() const; void SetShouldResetOpenerOnActiveWebStateChange(bool should_reset_opener); - // Returns whether |opener| spawned the wrapped WebState. If |use_group| is + // Returns whether `opener` spawned the wrapped WebState. If `use_group` is // true, also use the opener navigation index to detect navigation changes // during the same session. bool WasOpenedBy(const web::WebState* opener,
diff --git a/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer.h b/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer.h index 2a6577d..7a0f8da1 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer.h +++ b/ios/chrome/browser/web_state_list/web_state_list_favicon_driver_observer.h
@@ -18,7 +18,7 @@ } // namespace web @protocol WebStateFaviconDriverObserver -// Forward the call from |driver| OnFaviconUpdated method. +// Forward the call from `driver` OnFaviconUpdated method. - (void)faviconDriver:(favicon::FaviconDriver*)driver didUpdateFaviconForWebState:(web::WebState*)webState; @end @@ -62,8 +62,8 @@ const gfx::Image& image) override; private: - // Observes the FaviconDriver for |web_state| and updates the - // |driver_to_web_state_map_|. + // Observes the FaviconDriver for `web_state` and updates the + // `driver_to_web_state_map_`. void AddNewWebState(web::WebState* web_state); // The WebStateFaviconDriverObserver to which the FaviconDriver notification
diff --git a/ios/chrome/browser/web_state_list/web_state_list_metrics_browser_agent.h b/ios/chrome/browser/web_state_list/web_state_list_metrics_browser_agent.h index 24bbd4e..0c7b1481 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_metrics_browser_agent.h +++ b/ios/chrome/browser/web_state_list/web_state_list_metrics_browser_agent.h
@@ -28,7 +28,7 @@ ~WebStateListMetricsBrowserAgent() override; - // Creates the WebStateListMetricsBrowserAgent associating it with |browser|. + // Creates the WebStateListMetricsBrowserAgent associating it with `browser`. static void CreateForBrowser(Browser* browser, SessionMetrics* session_metrics);
diff --git a/ios/chrome/browser/web_state_list/web_state_list_observer.h b/ios/chrome/browser/web_state_list/web_state_list_observer.h index c77fcabd..dbb5866 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_observer.h +++ b/ios/chrome/browser/web_state_list/web_state_list_observer.h
@@ -42,7 +42,7 @@ ~WebStateListObserver() override; // Invoked after a new WebState has been added to the WebStateList at the - // specified index. |activating| will be true if the WebState will become + // specified index. `activating` will be true if the WebState will become // the new active WebState after the insertion. virtual void WebStateInsertedAt(WebStateList* web_state_list, web::WebState* web_state, @@ -77,15 +77,15 @@ // Invoked before the specified WebState is destroyed via the WebStateList. // The WebState is still valid but is no longer in the WebStateList. If the - // WebState is closed due to user action, |user_action| will be true. + // WebState is closed due to user action, `user_action` will be true. virtual void WillCloseWebStateAt(WebStateList* web_state_list, web::WebState* web_state, int index, bool user_action); - // Invoked after |new_web_state| was activated at the specified index. Both + // Invoked after `new_web_state` was activated at the specified index. Both // WebState are either valid or null (if there was no selection or there is - // no selection). See ChangeReason enum for possible values for |reason|. + // no selection). See ChangeReason enum for possible values for `reason`. virtual void WebStateActivatedAt(WebStateList* web_state_list, web::WebState* old_web_state, web::WebState* new_web_state,
diff --git a/ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h b/ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h index 4a5b188..35962354 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h +++ b/ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h
@@ -16,7 +16,7 @@ @optional // Invoked after a new WebState has been added to the WebStateList at the -// specified index. |activating| will be YES if the WebState will become +// specified index. `activating` will be YES if the WebState will become // the new active WebState after the insertion. - (void)webStateList:(WebStateList*)webStateList didInsertWebState:(web::WebState*)webState @@ -50,15 +50,15 @@ // Invoked before the specified WebState is destroyed via the WebStateList. // The WebState is still valid but is no longer in the WebStateList. If the -// WebState is closed due to user action, |userAction| will be true. +// WebState is closed due to user action, `userAction` will be true. - (void)webStateList:(WebStateList*)webStateList willCloseWebState:(web::WebState*)webState atIndex:(int)atIndex userAction:(BOOL)userAction; -// Invoked after |newWebState| was activated at the specified index. Both +// Invoked after `newWebState` was activated at the specified index. Both // WebState are either valid or null (if there was no selection or there is -// no selection). See ChangeReason enum for possible values for |reason|. +// no selection). See ChangeReason enum for possible values for `reason`. - (void)webStateList:(WebStateList*)webStateList didChangeActiveWebState:(web::WebState*)newWebState oldWebState:(web::WebState*)oldWebState
diff --git a/ios/chrome/browser/web_state_list/web_state_list_order_controller.h b/ios/chrome/browser/web_state_list/web_state_list_order_controller.h index 3e035d6d..d35fad4 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_order_controller.h +++ b/ios/chrome/browser/web_state_list/web_state_list_order_controller.h
@@ -25,7 +25,7 @@ // Determines where to shift the active index after a WebState is closed. // The returned index will either be WebStateList::kInvalidIndex or in be // in range for the WebStateList once the element has been removed (i.e. - // this function accounts for the fact that the element at |removing_index| + // this function accounts for the fact that the element at `removing_index` // will be removed from the WebStateList). int DetermineNewActiveIndex( int active_index,
diff --git a/ios/chrome/browser/web_state_list/web_state_list_order_controller.mm b/ios/chrome/browser/web_state_list/web_state_list_order_controller.mm index a08af5b..8ca9c18d 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_order_controller.mm +++ b/ios/chrome/browser/web_state_list/web_state_list_order_controller.mm
@@ -18,7 +18,7 @@ namespace { -// Find the index of next non-removed WebState opened by |web_state|. It +// Find the index of next non-removed WebState opened by `web_state`. It // may return WebStateList::kInvalidIndex if there is no such indexes. int FindIndexOfNextNonRemovedWebStateOpenedBy( const WebStateListRemovingIndexes& removing_indexes,
diff --git a/ios/chrome/browser/web_state_list/web_state_list_order_controller_unittest.mm b/ios/chrome/browser/web_state_list/web_state_list_order_controller_unittest.mm index efb2e48..c466d78 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_order_controller_unittest.mm +++ b/ios/chrome/browser/web_state_list/web_state_list_order_controller_unittest.mm
@@ -63,21 +63,21 @@ InsertNewWebState(1, WebStateOpener()); web::WebState* opener = web_state_list_.GetWebStateAt(0); - // Verify that first child WebState is inserted after |opener| if there are + // Verify that first child WebState is inserted after `opener` if there are // no other children. EXPECT_EQ(1, order_controller_.DetermineInsertionIndex(opener)); // Verify that WebState is inserted at the end if it has no opener. EXPECT_EQ(2, order_controller_.DetermineInsertionIndex(nullptr)); - // Add a child WebState to |opener|, and verify that a second child would be + // Add a child WebState to `opener`, and verify that a second child would be // inserted after the first. InsertNewWebState(2, WebStateOpener(opener)); EXPECT_EQ(3, order_controller_.DetermineInsertionIndex(opener)); - // Add a grand-child to |opener|, and verify that adding another child to - // |opener| would be inserted before the grand-child. + // Add a grand-child to `opener`, and verify that adding another child to + // `opener` would be inserted before the grand-child. InsertNewWebState(3, WebStateOpener(web_state_list_.GetWebStateAt(1))); EXPECT_EQ(3, order_controller_.DetermineInsertionIndex(opener));
diff --git a/ios/chrome/browser/web_state_list/web_state_list_serialization.h b/ios/chrome/browser/web_state_list/web_state_list_serialization.h index 47997135..028dc4a 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_serialization.h +++ b/ios/chrome/browser/web_state_list/web_state_list_serialization.h
@@ -24,17 +24,17 @@ base::RepeatingCallback<std::unique_ptr<web::WebState>(CRWSessionStorage*)>; // Returns an array of serialised sessions. -// If |web_states_to_serialize| is nil, all web states in |web_state_list| are +// If `web_states_to_serialize` is nil, all web states in `web_state_list` are // serialized and their data is returned in SessionWindowIOS.tabContents. -// If |web_states_to_serialize| is not nil, it can contain the ID of the +// If `web_states_to_serialize` is not nil, it can contain the ID of the // WebStates for which the content should be serialized. If a WebState ID is not // in web_states_to_serialize, the result SessionWindowIOS.tabContents will not // contain its data. // All webStates are included in SessionWindowIOS.sessions and // SessionWindowIOS.sessionSummary. -// |web_states_to_serialize| is ignored if kSaveSessionTabsToSeparateFiles is +// `web_states_to_serialize` is ignored if kSaveSessionTabsToSeparateFiles is // disabled. -// Until legacy session saving is disabled, setting |web_states_to_serialize| +// Until legacy session saving is disabled, setting `web_states_to_serialize` // will not provide any performance improvement as legacy session saving // serializes every webStates. SessionWindowIOS* SerializeWebStateList(WebStateList* web_state_list, @@ -43,7 +43,7 @@ // Returns an array of serialised sessions. SessionWindowIOS* SerializeWebStateList(WebStateList* web_state_list); -// Restores a |web_state_list| from |session_window| using |web_state_factory| +// Restores a `web_state_list` from `session_window` using `web_state_factory` // to create the restored WebStates. void DeserializeWebStateList(WebStateList* web_state_list, SessionWindowIOS* session_window,
diff --git a/ios/chrome/browser/web_state_list/web_state_list_serialization_unittest.mm b/ios/chrome/browser/web_state_list/web_state_list_serialization_unittest.mm index 76325c08..0ec7bd2 100644 --- a/ios/chrome/browser/web_state_list/web_state_list_serialization_unittest.mm +++ b/ios/chrome/browser/web_state_list/web_state_list_serialization_unittest.mm
@@ -49,9 +49,9 @@ return web_state; } -// Compares whether both WebStateList |original| and |restored| have the same -// opener-opened relationship. The |restored| WebStateList may have additional -// WebState, so only indices from |restored_index| to |count()| are compared. +// Compares whether both WebStateList `original` and `restored` have the same +// opener-opened relationship. The `restored` WebStateList may have additional +// WebState, so only indices from `restored_index` to `count()` are compared. void ExpectRelationshipIdenticalFrom(int restored_index, WebStateList* original, WebStateList* restored) {
diff --git a/ios/chrome/browser/web_state_list/web_state_opener.h b/ios/chrome/browser/web_state_list/web_state_opener.h index 3baac57..f4f0395 100644 --- a/ios/chrome/browser/web_state_list/web_state_opener.h +++ b/ios/chrome/browser/web_state_list/web_state_opener.h
@@ -15,16 +15,16 @@ // the WebState has no opener. web::WebState* opener; - // Recorded value of the |opener| last committed navigation index when the - // WebState was open. Value is undefined if |opener| is null. + // Recorded value of the `opener` last committed navigation index when the + // WebState was open. Value is undefined if `opener` is null. int navigation_index; - // Creates WebStateOpener with a null |opener|. + // Creates WebStateOpener with a null `opener`. WebStateOpener(); - // Creates WebStateOpener initialising the members from |opener| (the - // |navigation_index| will be initialised from |opener|'s navigation - // manager if |opener| is not null). + // Creates WebStateOpener initialising the members from `opener` (the + // `navigation_index` will be initialised from `opener`'s navigation + // manager if `opener` is not null). explicit WebStateOpener(web::WebState* opener); // Creates WebStateOpener initialising the members from the parameters.
diff --git a/ios/chrome/browser/web_state_list/web_usage_enabler/web_usage_enabler_browser_agent.h b/ios/chrome/browser/web_state_list/web_usage_enabler/web_usage_enabler_browser_agent.h index 7b5bba1b..843630fa 100644 --- a/ios/chrome/browser/web_state_list/web_usage_enabler/web_usage_enabler_browser_agent.h +++ b/ios/chrome/browser/web_state_list/web_usage_enabler/web_usage_enabler_browser_agent.h
@@ -32,10 +32,10 @@ // Sets the WebUsageEnabled property for all WebStates in the list. When new // WebStates are added to the list, their web usage will be set to the - // |web_usage_enabled| as well. Initially |false|. + // `web_usage_enabled` as well. Initially `false`. void SetWebUsageEnabled(bool web_usage_enabled); - // The current value set with |SetWebUsageEnabled|. + // The current value set with `SetWebUsageEnabled`. bool IsWebUsageEnabled() const; private: @@ -44,11 +44,11 @@ explicit WebUsageEnablerBrowserAgent(Browser* browser); - // Updates the web usage enabled status of all WebStates in |browser_|'s web - // state list to |web_usage_enabled_|. + // Updates the web usage enabled status of all WebStates in `browser_`'s web + // state list to `web_usage_enabled_`. void UpdateWebUsageForAllWebStates(); - // Updates the web usage enabled status of |web_state|, triggering the initial - // load if |triggers_initial_load| is true. + // Updates the web usage enabled status of `web_state`, triggering the initial + // load if `triggers_initial_load` is true. void UpdateWebUsageForAddedWebState(web::WebState* web_state, bool triggers_initial_load); @@ -75,7 +75,7 @@ // The browser whose WebStates' web usage is being managed. Browser* browser_ = nullptr; - // Whether web usage is enabled for the WebState in |web_state_list_|. + // Whether web usage is enabled for the WebState in `web_state_list_`. bool web_usage_enabled_ = false; // Scoped observations of Browser, WebStateList and WebStates.
diff --git a/ios/chrome/test/earl_grey/chrome_earl_grey.mm b/ios/chrome/test/earl_grey/chrome_earl_grey.mm index c1c8a80..c6bc081 100644 --- a/ios/chrome/test/earl_grey/chrome_earl_grey.mm +++ b/ios/chrome/test/earl_grey/chrome_earl_grey.mm
@@ -427,7 +427,7 @@ }; bool matched = WaitUntilConditionOrTimeout(timeout, condition); - GREYAssert(matched, errorDescription); + EG_TEST_HELPER_ASSERT_TRUE(matched, errorDescription); } - (void)waitForUIElementToDisappearWithMatcher:(id<GREYMatcher>)matcher { @@ -449,7 +449,7 @@ }; bool matched = WaitUntilConditionOrTimeout(timeout, condition); - GREYAssert(matched, errorDescription); + EG_TEST_HELPER_ASSERT_TRUE(matched, errorDescription); } - (NSString*)currentTabTitle {
diff --git a/ios/testing/earl_grey/base_eg_test_helper_impl.mm b/ios/testing/earl_grey/base_eg_test_helper_impl.mm index 8a2ddd4..3f7ffee 100644 --- a/ios/testing/earl_grey/base_eg_test_helper_impl.mm +++ b/ios/testing/earl_grey/base_eg_test_helper_impl.mm
@@ -4,6 +4,8 @@ #import "ios/testing/earl_grey/base_eg_test_helper_impl.h" +#import "base/debug/stack_trace.h" +#import "base/logging.h" #include "ios/testing/earl_grey/earl_grey_test.h" #if !defined(__has_feature) || !__has_feature(objc_arc) @@ -48,6 +50,8 @@ if (!fail) return; + DLOG(WARNING) << "\n" << base::debug::StackTrace(/*count=*/15).ToString(); + NSString* reason = [NSString stringWithFormat:@"%@ is false: %@", expression, description]; [self failWithExceptionName:@"expression error" reason:reason];
diff --git a/media/gpu/av1_picture.cc b/media/gpu/av1_picture.cc index 6f3b803..393f1072 100644 --- a/media/gpu/av1_picture.cc +++ b/media/gpu/av1_picture.cc
@@ -9,10 +9,6 @@ AV1Picture::AV1Picture() = default; AV1Picture::~AV1Picture() = default; -V4L2AV1Picture* AV1Picture::AsV4L2AV1Picture() { - return nullptr; -} - scoped_refptr<AV1Picture> AV1Picture::Duplicate() { scoped_refptr<AV1Picture> dup_pic = CreateDuplicate(); if (!dup_pic)
diff --git a/media/gpu/av1_picture.h b/media/gpu/av1_picture.h index a6c6ce2c..b9c4b64 100644 --- a/media/gpu/av1_picture.h +++ b/media/gpu/av1_picture.h
@@ -11,8 +11,6 @@ namespace media { -class V4L2AV1Picture; - // AV1Picture carries the parsed frame header needed for decoding an AV1 frame. // It also owns the decoded frame itself. class MEDIA_GPU_EXPORT AV1Picture : public CodecPicture { @@ -21,10 +19,6 @@ AV1Picture(const AV1Picture&) = delete; AV1Picture& operator=(const AV1Picture&) = delete; - // TODO(stevecho): remove to use reinterpret_cast<> instead - // when similar changes are made with other codecs (vp8, vp9, etc.) - virtual V4L2AV1Picture* AsV4L2AV1Picture(); - // Create a duplicate instance and copy the data to it. It is used to support // the AV1 show_existing_frame feature. Return the scoped_refptr pointing to // the duplicate instance, or nullptr on failure.
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_av1.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_av1.cc index 5dff0ee..18ca578 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_av1.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_av1.cc
@@ -14,13 +14,15 @@ class V4L2AV1Picture : public AV1Picture { public: - explicit V4L2AV1Picture(scoped_refptr<V4L2DecodeSurface> dec_surface) + V4L2AV1Picture(scoped_refptr<V4L2DecodeSurface> dec_surface) : dec_surface_(std::move(dec_surface)) {} V4L2AV1Picture(const V4L2AV1Picture&) = delete; V4L2AV1Picture& operator=(const V4L2AV1Picture&) = delete; - V4L2AV1Picture* AsV4L2AV1Picture() override { return this; } + const scoped_refptr<V4L2DecodeSurface>& dec_surface() const { + return dec_surface_; + } private: ~V4L2AV1Picture() override = default; @@ -43,4 +45,25 @@ V4L2VideoDecoderDelegateAV1::~V4L2VideoDecoderDelegateAV1() = default; +scoped_refptr<AV1Picture> V4L2VideoDecoderDelegateAV1::CreateAV1Picture( + bool apply_grain) { + scoped_refptr<V4L2DecodeSurface> dec_surface = + surface_handler_->CreateSurface(); + if (!dec_surface) + return nullptr; + + return new V4L2AV1Picture(std::move(dec_surface)); +} + +bool V4L2VideoDecoderDelegateAV1::OutputPicture(const AV1Picture& pic) { + VLOGF(3); + const auto* v4l2_pic = static_cast<const V4L2AV1Picture*>(&pic); + + surface_handler_->SurfaceReady( + v4l2_pic->dec_surface(), v4l2_pic->bitstream_id(), + v4l2_pic->visible_rect(), v4l2_pic->get_colorspace()); + + return true; +} + } // namespace media
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_av1.h b/media/gpu/v4l2/v4l2_video_decoder_delegate_av1.h index 4dbfbe53..a8cd80b 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_av1.h +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_av1.h
@@ -23,6 +23,10 @@ ~V4L2VideoDecoderDelegateAV1() override; + // AV1Decoder::AV1Accelerator implementation. + scoped_refptr<AV1Picture> CreateAV1Picture(bool apply_grain) override; + bool OutputPicture(const AV1Picture& pic) override; + private: V4L2DecodeSurfaceHandler* const surface_handler_; V4L2Device* const device_;
diff --git a/media/remoting/BUILD.gn b/media/remoting/BUILD.gn index eaf2b231..82557e4 100644 --- a/media/remoting/BUILD.gn +++ b/media/remoting/BUILD.gn
@@ -47,6 +47,18 @@ sources = [ "remoting_constants.h" ] } +source_set("remoting_device_capability") { + sources = [ + "device_capability_checker.cc", + "device_capability_checker.h", + ] + + deps = [ + "//base", + "//media", + ] +} + source_set("remoting_renderer") { sources = [ "receiver.cc", @@ -73,6 +85,7 @@ source_set("media_remoting_tests") { testonly = true sources = [ + "device_capability_checker_unittest.cc", "fake_remoter.cc", "fake_remoter.h", "mock_receiver_controller.cc", @@ -85,6 +98,7 @@ ] deps = [ + ":remoting_device_capability", ":remoting_renderer", ":remoting_sender", "//base",
diff --git a/media/remoting/device_capability_checker.cc b/media/remoting/device_capability_checker.cc new file mode 100644 index 0000000..0396f3fe --- /dev/null +++ b/media/remoting/device_capability_checker.cc
@@ -0,0 +1,47 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "media/remoting/device_capability_checker.h" + +#include "base/strings/string_util.h" +#include "media/base/audio_codecs.h" +#include "media/base/video_codecs.h" + +namespace media::remoting { + +bool IsChromecast(const std::string& model_name) { + // This is a workaround for Nest Hub devices, which do not support remoting. + // TODO(crbug.com/1198616): filtering hack should be removed. See b/135725157 + // for more information. + return base::StartsWith(model_name, "Chromecast", + base::CompareCase::SENSITIVE) || + base::StartsWith(model_name, "Eureka Dongle", + base::CompareCase::SENSITIVE); +} + +bool IsVideoCodecCompatible(const std::string& model_name, + VideoCodec video_codec) { + if (!IsChromecast(model_name)) { + return false; + } + + if (video_codec == VideoCodec::kH264 || video_codec == VideoCodec::kVP8) { + return true; + } + if (model_name == "Chromecast Ultra" && + (video_codec == VideoCodec::kHEVC || video_codec == VideoCodec::kVP9)) { + return true; + } + return false; +} + +bool IsAudioCodecCompatible(const std::string& model_name, + AudioCodec audio_codec) { + if (!IsChromecast(model_name)) { + return false; + } + return (audio_codec == AudioCodec::kAAC) || + (audio_codec == AudioCodec::kOpus); +} +} // namespace media::remoting
diff --git a/media/remoting/device_capability_checker.h b/media/remoting/device_capability_checker.h new file mode 100644 index 0000000..8910d32 --- /dev/null +++ b/media/remoting/device_capability_checker.h
@@ -0,0 +1,29 @@ +// Copyright 2022 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. + +#ifndef MEDIA_REMOTING_DEVICE_CAPABILITY_CHECKER_H_ +#define MEDIA_REMOTING_DEVICE_CAPABILITY_CHECKER_H_ + +#include <string> + +namespace media { +enum class AudioCodec; +enum class VideoCodec; + +namespace remoting { +// Return true if the device is a Chromecast device according to its +// `model_name`. +bool IsChromecast(const std::string& model_name); + +// Return true if the device is compatible to render `video_codec`. +bool IsVideoCodecCompatible(const std::string& model_name, + media::VideoCodec video_codec); + +// Return true if the device is compatible to render `audio_codec`. +bool IsAudioCodecCompatible(const std::string& model_name, + media::AudioCodec audio_codec); +} // namespace remoting +} // namespace media + +#endif // MEDIA_REMOTING_DEVICE_CAPABILITY_CHECKER_H_
diff --git a/media/remoting/device_capability_checker_unittest.cc b/media/remoting/device_capability_checker_unittest.cc new file mode 100644 index 0000000..669c83b --- /dev/null +++ b/media/remoting/device_capability_checker_unittest.cc
@@ -0,0 +1,38 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "media/remoting/device_capability_checker.h" + +#include "media/base/audio_codecs.h" +#include "media/base/video_codecs.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace media::remoting { + +namespace { +constexpr char cc_model_name[] = "Chromecast"; +constexpr char cc_ultra_model_name[] = "Chromecast Ultra"; +constexpr char cc_dongle_model_name[] = "Eureka Dongle"; +} // namespace + +TEST(DeviceCapabilityCheckerTest, CheckDeviceCapability) { + EXPECT_TRUE(IsChromecast(cc_model_name)); + EXPECT_TRUE(IsChromecast(cc_ultra_model_name)); + EXPECT_TRUE(IsChromecast(cc_dongle_model_name)); + EXPECT_FALSE(IsChromecast("Nest")); +} + +TEST(DeviceCapabilityCheckerTest, CheckVideoCapability) { + EXPECT_FALSE(IsVideoCodecCompatible(cc_model_name, VideoCodec::kHEVC)); + EXPECT_TRUE(IsVideoCodecCompatible(cc_ultra_model_name, VideoCodec::kHEVC)); + EXPECT_TRUE(IsVideoCodecCompatible(cc_ultra_model_name, VideoCodec::kVP9)); + EXPECT_TRUE(IsVideoCodecCompatible(cc_dongle_model_name, VideoCodec::kVP8)); +} + +TEST(DeviceCapabilityCheckerTest, CheckAudioCapability) { + EXPECT_FALSE(IsAudioCodecCompatible(cc_ultra_model_name, AudioCodec::kMP3)); + EXPECT_TRUE(IsAudioCodecCompatible(cc_model_name, AudioCodec::kAAC)); + EXPECT_TRUE(IsAudioCodecCompatible(cc_dongle_model_name, AudioCodec::kOpus)); +} +} // namespace media::remoting \ No newline at end of file
diff --git a/net/BUILD.gn b/net/BUILD.gn index bcffc018..2a65348e 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn
@@ -434,10 +434,6 @@ "cookies/cookie_store.h", "cookies/cookie_util.cc", "cookies/cookie_util.h", - "cookies/first_party_set_metadata.cc", - "cookies/first_party_set_metadata.h", - "cookies/first_party_sets_context_config.cc", - "cookies/first_party_sets_context_config.h", "cookies/parsed_cookie.cc", "cookies/parsed_cookie.h", "cookies/same_party_context.cc", @@ -546,6 +542,10 @@ "filter/source_stream.h", "first_party_sets/first_party_set_entry.cc", "first_party_sets/first_party_set_entry.h", + "first_party_sets/first_party_set_metadata.cc", + "first_party_sets/first_party_set_metadata.h", + "first_party_sets/first_party_sets_context_config.cc", + "first_party_sets/first_party_sets_context_config.h", "http/alternative_service.cc", "http/alternative_service.h", "http/bidirectional_stream.cc",
diff --git a/net/cookies/cookie_access_delegate.h b/net/cookies/cookie_access_delegate.h index d9becb3..07140b6 100644 --- a/net/cookies/cookie_access_delegate.h +++ b/net/cookies/cookie_access_delegate.h
@@ -15,9 +15,9 @@ #include "net/cookies/canonical_cookie.h" #include "net/cookies/cookie_constants.h" #include "net/cookies/cookie_partition_key.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h"
diff --git a/net/cookies/cookie_util.cc b/net/cookies/cookie_util.cc index f3d214cf..478b412a 100644 --- a/net/cookies/cookie_util.cc +++ b/net/cookies/cookie_util.cc
@@ -31,8 +31,8 @@ #include "net/cookies/cookie_inclusion_status.h" #include "net/cookies/cookie_monster.h" #include "net/cookies/cookie_options.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "net/http/http_util.h" #include "url/gurl.h" #include "url/url_constants.h"
diff --git a/net/cookies/cookie_util.h b/net/cookies/cookie_util.h index 27dd170..9ba7bac 100644 --- a/net/cookies/cookie_util.h +++ b/net/cookies/cookie_util.h
@@ -15,8 +15,8 @@ #include "net/cookies/cookie_access_result.h" #include "net/cookies/cookie_constants.h" #include "net/cookies/cookie_options.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/site_for_cookies.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/origin.h"
diff --git a/net/cookies/test_cookie_access_delegate.cc b/net/cookies/test_cookie_access_delegate.cc index f272470..5f25f75 100644 --- a/net/cookies/test_cookie_access_delegate.cc +++ b/net/cookies/test_cookie_access_delegate.cc
@@ -20,9 +20,9 @@ #include "net/base/schemeful_site.h" #include "net/cookies/cookie_constants.h" #include "net/cookies/cookie_util.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" namespace net {
diff --git a/net/cookies/test_cookie_access_delegate.h b/net/cookies/test_cookie_access_delegate.h index f82be072e..0124675 100644 --- a/net/cookies/test_cookie_access_delegate.h +++ b/net/cookies/test_cookie_access_delegate.h
@@ -15,8 +15,8 @@ #include "net/base/schemeful_site.h" #include "net/cookies/cookie_access_delegate.h" #include "net/cookies/cookie_constants.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace net {
diff --git a/net/data/ssl/ev_roots/ev_roots.certs b/net/data/ssl/ev_roots/ev_roots.certs index 374cefa..c93be55 100644 --- a/net/data/ssl/ev_roots/ev_roots.certs +++ b/net/data/ssl/ev_roots/ev_roots.certs
@@ -884,85 +884,6 @@ jLMi6Et8Vcad+qMUu2WFbm5PEn4KPJ2V -----END CERTIFICATE----- -# 16af57a9f676b0ab126095aa5ebadef22ab31119d644ac95cd4b93dbf3f26aeb -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 33554617 (0x20000b9) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root - Validity - Not Before: May 12 18:46:00 2000 GMT - Not After : May 12 23:59:00 2025 GMT - Subject: C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:a3:04:bb:22:ab:98:3d:57:e8:26:72:9a:b5:79: - d4:29:e2:e1:e8:95:80:b1:b0:e3:5b:8e:2b:29:9a: - 64:df:a1:5d:ed:b0:09:05:6d:db:28:2e:ce:62:a2: - 62:fe:b4:88:da:12:eb:38:eb:21:9d:c0:41:2b:01: - 52:7b:88:77:d3:1c:8f:c7:ba:b9:88:b5:6a:09:e7: - 73:e8:11:40:a7:d1:cc:ca:62:8d:2d:e5:8f:0b:a6: - 50:d2:a8:50:c3:28:ea:f5:ab:25:87:8a:9a:96:1c: - a9:67:b8:3f:0c:d5:f7:f9:52:13:2f:c2:1b:d5:70: - 70:f0:8f:c0:12:ca:06:cb:9a:e1:d9:ca:33:7a:77: - d6:f8:ec:b9:f1:68:44:42:48:13:d2:c0:c2:a4:ae: - 5e:60:fe:b6:a6:05:fc:b4:dd:07:59:02:d4:59:18: - 98:63:f5:a5:63:e0:90:0c:7d:5d:b2:06:7a:f3:85: - ea:eb:d4:03:ae:5e:84:3e:5f:ff:15:ed:69:bc:f9: - 39:36:72:75:cf:77:52:4d:f3:c9:90:2c:b9:3d:e5: - c9:23:53:3f:1f:24:98:21:5c:07:99:29:bd:c6:3a: - ec:e7:6e:86:3a:6b:97:74:63:33:bd:68:18:31:f0: - 78:8d:76:bf:fc:9e:8e:5d:2a:86:a7:4d:90:dc:27: - 1a:39 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - E5:9D:59:30:82:47:58:CC:AC:FA:08:54:36:86:7B:3A:B5:04:4D:F0 - X509v3 Basic Constraints: critical - CA:TRUE, pathlen:3 - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - Signature Algorithm: sha1WithRSAEncryption - 85:0c:5d:8e:e4:6f:51:68:42:05:a0:dd:bb:4f:27:25:84:03: - bd:f7:64:fd:2d:d7:30:e3:a4:10:17:eb:da:29:29:b6:79:3f: - 76:f6:19:13:23:b8:10:0a:f9:58:a4:d4:61:70:bd:04:61:6a: - 12:8a:17:d5:0a:bd:c5:bc:30:7c:d6:e9:0c:25:8d:86:40:4f: - ec:cc:a3:7e:38:c6:37:11:4f:ed:dd:68:31:8e:4c:d2:b3:01: - 74:ee:be:75:5e:07:48:1a:7f:70:ff:16:5c:84:c0:79:85:b8: - 05:fd:7f:be:65:11:a3:0f:c0:02:b4:f8:52:37:39:04:d5:a9: - 31:7a:18:bf:a0:2a:f4:12:99:f7:a3:45:82:e3:3c:5e:f5:9d: - 9e:b5:c8:9e:7c:2e:c8:a4:9e:4e:08:14:4b:6d:fd:70:6d:6b: - 1a:63:bd:64:e6:1f:b7:ce:f0:f2:9f:2e:bb:1b:b7:f2:50:88: - 73:92:c2:e2:e3:16:8d:9a:32:02:ab:8e:18:dd:e9:10:11:ee: - 7e:35:ab:90:af:3e:30:94:7a:d0:33:3d:a7:65:0f:f5:fc:8e: - 9e:62:cf:47:44:2c:01:5d:bb:1d:b5:32:d2:47:d2:38:2e:d0: - fe:81:dc:32:6a:1e:b5:ee:3c:d5:fc:e7:81:1d:19:c3:24:42: - ea:63:39:a9 ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ -RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD -VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX -DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y -ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy -VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr -mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr -IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK -mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu -XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy -dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye -jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1 -BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3 -DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92 -9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx -jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0 -Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz -ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS -R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp ------END CERTIFICATE----- - # edf7ebbca27a2a384d387b7d4010c666e2edb4843e4c29b4ae1d5b9332e6b24d Certificate: Data: @@ -1408,110 +1329,21 @@ 5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su -----END CERTIFICATE----- -# 0c2cd63df7806fa399ede809116b575bf87989f06518f9808c860503178baf66 -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - 4e:81:2d:8a:82:65:e0:0b:02:ee:3e:35:02:46:e5:3d - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO Certification Authority - Validity - Not Before: Dec 1 00:00:00 2006 GMT - Not After : Dec 31 23:59:59 2029 GMT - Subject: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO Certification Authority - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:d0:40:8b:8b:72:e3:91:1b:f7:51:c1:1b:54:04: - 98:d3:a9:bf:c1:e6:8a:5d:3b:87:fb:bb:88:ce:0d: - e3:2f:3f:06:96:f0:a2:29:50:99:ae:db:3b:a1:57: - b0:74:51:71:cd:ed:42:91:4d:41:fe:a9:c8:d8:6a: - 86:77:44:bb:59:66:97:50:5e:b4:d4:2c:70:44:cf: - da:37:95:42:69:3c:30:c4:71:b3:52:f0:21:4d:a1: - d8:ba:39:7c:1c:9e:a3:24:9d:f2:83:16:98:aa:16: - 7c:43:9b:15:5b:b7:ae:34:91:fe:d4:62:26:18:46: - 9a:3f:eb:c1:f9:f1:90:57:eb:ac:7a:0d:8b:db:72: - 30:6a:66:d5:e0:46:a3:70:dc:68:d9:ff:04:48:89: - 77:de:b5:e9:fb:67:6d:41:e9:bc:39:bd:32:d9:62: - 02:f1:b1:a8:3d:6e:37:9c:e2:2f:e2:d3:a2:26:8b: - c6:b8:55:43:88:e1:23:3e:a5:d2:24:39:6a:47:ab: - 00:d4:a1:b3:a9:25:fe:0d:3f:a7:1d:ba:d3:51:c1: - 0b:a4:da:ac:38:ef:55:50:24:05:65:46:93:34:4f: - 2d:8d:ad:c6:d4:21:19:d2:8e:ca:05:61:71:07:73: - 47:e5:8a:19:12:bd:04:4d:ce:4e:9c:a5:48:ac:bb: - 26:f7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 0B:58:E5:8B:C6:4C:15:37:A4:40:A9:30:A9:21:BE:47:36:5A:56:FF - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - X509v3 CRL Distribution Points: - - Full Name: - URI:http://crl.comodoca.com/COMODOCertificationAuthority.crl - - Signature Algorithm: sha1WithRSAEncryption - 3e:98:9e:9b:f6:1b:e9:d7:39:b7:78:ae:1d:72:18:49:d3:87: - e4:43:82:eb:3f:c9:aa:f5:a8:b5:ef:55:7c:21:52:65:f9:d5: - 0d:e1:6c:f4:3e:8c:93:73:91:2e:02:c4:4e:07:71:6f:c0:8f: - 38:61:08:a8:1e:81:0a:c0:2f:20:2f:41:8b:91:dc:48:45:bc: - f1:c6:de:ba:76:6b:33:c8:00:2d:31:46:4c:ed:e7:9d:cf:88: - 94:ff:33:c0:56:e8:24:86:26:b8:d8:38:38:df:2a:6b:dd:12: - cc:c7:3f:47:17:4c:a2:c2:06:96:09:d6:db:fe:3f:3c:46:41: - df:58:e2:56:0f:3c:3b:c1:1c:93:35:d9:38:52:ac:ee:c8:ec: - 2e:30:4e:94:35:b4:24:1f:4b:78:69:da:f2:02:38:cc:95:52: - 93:f0:70:25:59:9c:20:67:c4:ee:f9:8b:57:61:f4:92:76:7d: - 3f:84:8d:55:b7:e8:e5:ac:d5:f1:f5:19:56:a6:5a:fb:90:1c: - af:93:eb:e5:1c:d4:67:97:5d:04:0e:be:0b:83:a6:17:83:b9: - 30:12:a0:c5:33:15:05:b9:0d:fb:c7:05:76:e3:d8:4a:8d:fc: - 34:17:a3:c6:21:28:be:30:45:31:1e:c7:78:be:58:61:38:ac: - 3b:e2:01:65 ------BEGIN CERTIFICATE----- -MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB -gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G -A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV -BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw -MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl -YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P -RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0 -aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3 -UcEbVASY06m/weaKXTuH+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI -2GqGd0S7WWaXUF601CxwRM/aN5VCaTwwxHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8 -Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV4EajcNxo2f8ESIl33rXp -+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA1KGzqSX+ -DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5O -nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW -/zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g -PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u -QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY -SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv -IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ -RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4 -zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd -BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB -ZQ== ------END CERTIFICATE----- - # 1a0d20445de5ba1862d19ef880858cbce50102b36e8f0a040c3c69e74522fe6e Certificate: Data: Version: 3 (0x2) Serial Number: 20:a4:c4:7f:dd:df:e1:c7:53:63:07:13:88:77:60:12 - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO Certification Authority + Signature Algorithm: sha1WithRSAEncryption + Issuer: C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO Certification Authority Validity Not Before: Jan 1 00:00:00 2011 GMT Not After : Dec 31 23:59:59 2030 GMT - Subject: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO Certification Authority + Subject: C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO Certification Authority Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) + RSA Public-Key: (2048 bit) Modulus: 00:d0:40:8b:8b:72:e3:91:1b:f7:51:c1:1b:54:04: 98:d3:a9:bf:c1:e6:8a:5d:3b:87:fb:bb:88:ce:0d: @@ -1758,90 +1590,6 @@ NVOFBkpdn627G190 -----END CERTIFICATE----- -# 3e9099b5015e8f486c00bcea9d111ee721faba355a89bcf1df69561e3dc6325c -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - 0c:e7:e0:e5:17:d8:46:fe:8f:e5:60:fc:1b:f0:30:39 - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA - Validity - Not Before: Nov 10 00:00:00 2006 GMT - Not After : Nov 10 00:00:00 2031 GMT - Subject: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:ad:0e:15:ce:e4:43:80:5c:b1:87:f3:b7:60:f9: - 71:12:a5:ae:dc:26:94:88:aa:f4:ce:f5:20:39:28: - 58:60:0c:f8:80:da:a9:15:95:32:61:3c:b5:b1:28: - 84:8a:8a:dc:9f:0a:0c:83:17:7a:8f:90:ac:8a:e7: - 79:53:5c:31:84:2a:f6:0f:98:32:36:76:cc:de:dd: - 3c:a8:a2:ef:6a:fb:21:f2:52:61:df:9f:20:d7:1f: - e2:b1:d9:fe:18:64:d2:12:5b:5f:f9:58:18:35:bc: - 47:cd:a1:36:f9:6b:7f:d4:b0:38:3e:c1:1b:c3:8c: - 33:d9:d8:2f:18:fe:28:0f:b3:a7:83:d6:c3:6e:44: - c0:61:35:96:16:fe:59:9c:8b:76:6d:d7:f1:a2:4b: - 0d:2b:ff:0b:72:da:9e:60:d0:8e:90:35:c6:78:55: - 87:20:a1:cf:e5:6d:0a:c8:49:7c:31:98:33:6c:22: - e9:87:d0:32:5a:a2:ba:13:82:11:ed:39:17:9d:99: - 3a:72:a1:e6:fa:a4:d9:d5:17:31:75:ae:85:7d:22: - ae:3f:01:46:86:f6:28:79:c8:b1:da:e4:57:17:c4: - 7e:1c:0e:b0:b4:92:a6:56:b3:bd:b2:97:ed:aa:a7: - f0:b7:c5:a8:3f:95:16:d0:ff:a1:96:eb:08:5f:18: - 77:4f - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Key Usage: critical - Digital Signature, Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - X509v3 Subject Key Identifier: - 45:EB:A2:AF:F4:92:CB:82:31:2D:51:8B:A7:A7:21:9D:F3:6D:C8:0F - X509v3 Authority Key Identifier: - keyid:45:EB:A2:AF:F4:92:CB:82:31:2D:51:8B:A7:A7:21:9D:F3:6D:C8:0F - - Signature Algorithm: sha1WithRSAEncryption - a2:0e:bc:df:e2:ed:f0:e3:72:73:7a:64:94:bf:f7:72:66:d8: - 32:e4:42:75:62:ae:87:eb:f2:d5:d9:de:56:b3:9f:cc:ce:14: - 28:b9:0d:97:60:5c:12:4c:58:e4:d3:3d:83:49:45:58:97:35: - 69:1a:a8:47:ea:56:c6:79:ab:12:d8:67:81:84:df:7f:09:3c: - 94:e6:b8:26:2c:20:bd:3d:b3:28:89:f7:5f:ff:22:e2:97:84: - 1f:e9:65:ef:87:e0:df:c1:67:49:b3:5d:eb:b2:09:2a:eb:26: - ed:78:be:7d:3f:2b:f3:b7:26:35:6d:5f:89:01:b6:49:5b:9f: - 01:05:9b:ab:3d:25:c1:cc:b6:7f:c2:f1:6f:86:c6:fa:64:68: - eb:81:2d:94:eb:42:b7:fa:8c:1e:dd:62:f1:be:50:67:b7:6c: - bd:f3:f1:1f:6b:0c:36:07:16:7f:37:7c:a9:5b:6d:7a:f1:12: - 46:60:83:d7:27:04:be:4b:ce:97:be:c3:67:2a:68:11:df:80: - e7:0c:33:66:bf:13:0d:14:6e:f3:7f:1f:63:10:1e:fa:8d:1b: - 25:6d:6c:8f:a5:b7:61:01:b1:d2:a3:26:a1:10:71:9d:ad:e2: - c3:f9:c3:99:51:b7:2b:07:08:ce:2e:e6:50:b2:a7:fa:0a:45: - 2f:a2:f0:f2 ------BEGIN CERTIFICATE----- -MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv -b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl -cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi -MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c -JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP -mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+ -wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4 -VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/ -AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB -AAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW -BBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun -pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC -dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf -fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm -NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx -H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe -+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== ------END CERTIFICATE----- - # 7d05ebb682339f8c9451ee094eebfefa7953a114edb2f44949452fab7d2fc185 Certificate: Data: @@ -1978,90 +1726,6 @@ 6pZjamVFkpUBtA== -----END CERTIFICATE----- -# 4348a0e9444c78cb265e058d5e8944b4d84f9662bd26db257f8934a443c70161 -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - 08:3b:e0:56:90:42:46:b1:a1:75:6a:c9:59:91:c7:4a - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA - Validity - Not Before: Nov 10 00:00:00 2006 GMT - Not After : Nov 10 00:00:00 2031 GMT - Subject: C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:e2:3b:e1:11:72:de:a8:a4:d3:a3:57:aa:50:a2: - 8f:0b:77:90:c9:a2:a5:ee:12:ce:96:5b:01:09:20: - cc:01:93:a7:4e:30:b7:53:f7:43:c4:69:00:57:9d: - e2:8d:22:dd:87:06:40:00:81:09:ce:ce:1b:83:bf: - df:cd:3b:71:46:e2:d6:66:c7:05:b3:76:27:16:8f: - 7b:9e:1e:95:7d:ee:b7:48:a3:08:da:d6:af:7a:0c: - 39:06:65:7f:4a:5d:1f:bc:17:f8:ab:be:ee:28:d7: - 74:7f:7a:78:99:59:85:68:6e:5c:23:32:4b:bf:4e: - c0:e8:5a:6d:e3:70:bf:77:10:bf:fc:01:f6:85:d9: - a8:44:10:58:32:a9:75:18:d5:d1:a2:be:47:e2:27: - 6a:f4:9a:33:f8:49:08:60:8b:d4:5f:b4:3a:84:bf: - a1:aa:4a:4c:7d:3e:cf:4f:5f:6c:76:5e:a0:4b:37: - 91:9e:dc:22:e6:6d:ce:14:1a:8e:6a:cb:fe:cd:b3: - 14:64:17:c7:5b:29:9e:32:bf:f2:ee:fa:d3:0b:42: - d4:ab:b7:41:32:da:0c:d4:ef:f8:81:d5:bb:8d:58: - 3f:b5:1b:e8:49:28:a2:70:da:31:04:dd:f7:b2:16: - f2:4c:0a:4e:07:a8:ed:4a:3d:5e:b5:7f:a3:90:c3: - af:27 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Key Usage: critical - Digital Signature, Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - X509v3 Subject Key Identifier: - 03:DE:50:35:56:D1:4C:BB:66:F0:A3:E2:1B:1B:C3:97:B2:3D:D1:55 - X509v3 Authority Key Identifier: - keyid:03:DE:50:35:56:D1:4C:BB:66:F0:A3:E2:1B:1B:C3:97:B2:3D:D1:55 - - Signature Algorithm: sha1WithRSAEncryption - cb:9c:37:aa:48:13:12:0a:fa:dd:44:9c:4f:52:b0:f4:df:ae: - 04:f5:79:79:08:a3:24:18:fc:4b:2b:84:c0:2d:b9:d5:c7:fe: - f4:c1:1f:58:cb:b8:6d:9c:7a:74:e7:98:29:ab:11:b5:e3:70: - a0:a1:cd:4c:88:99:93:8c:91:70:e2:ab:0f:1c:be:93:a9:ff: - 63:d5:e4:07:60:d3:a3:bf:9d:5b:09:f1:d5:8e:e3:53:f4:8e: - 63:fa:3f:a7:db:b4:66:df:62:66:d6:d1:6e:41:8d:f2:2d:b5: - ea:77:4a:9f:9d:58:e2:2b:59:c0:40:23:ed:2d:28:82:45:3e: - 79:54:92:26:98:e0:80:48:a8:37:ef:f0:d6:79:60:16:de:ac: - e8:0e:cd:6e:ac:44:17:38:2f:49:da:e1:45:3e:2a:b9:36:53: - cf:3a:50:06:f7:2e:e8:c4:57:49:6c:61:21:18:d5:04:ad:78: - 3c:2c:3a:80:6b:a7:eb:af:15:14:e9:d8:89:c1:b9:38:6c:e2: - 91:6c:8a:ff:64:b9:77:25:57:30:c0:1b:24:a3:e1:dc:e9:df: - 47:7c:b5:b4:24:08:05:30:ec:2d:bd:0b:bf:45:bf:50:b9:a9: - f3:eb:98:01:12:ad:c8:88:c6:98:34:5f:8d:0a:3c:c6:e9:d5: - 95:95:6d:de ------BEGIN CERTIFICATE----- -MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD -QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT -MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j -b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG -9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB -CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97 -nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt -43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P -T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4 -gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO -BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR -TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw -DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr -hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg -06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF -PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls -YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk -CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= ------END CERTIFICATE----- - # cb3ccbb76031e5e0138f8dd39a23f9de47ffc35e43c1144cea27d46a5ab1cb5f Certificate: Data: @@ -4298,262 +3962,6 @@ QyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== -----END CERTIFICATE----- -# 23804203ca45d8cde716b8c13bf3b448457fa06cc10250997fa01458317c41e5 -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - 06:e8:46:27:2f:1f:0a:8f:d1:84:5c:e3:69:f6:d5 - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=ES, O=IZENPE S.A., CN=Izenpe.com - Validity - Not Before: Dec 13 13:08:27 2007 GMT - Not After : Dec 13 08:27:25 2037 GMT - Subject: C=ES, O=IZENPE S.A., CN=Izenpe.com - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (4096 bit) - Modulus: - 00:c9:d3:7a:ca:0f:1e:ac:a7:86:e8:16:65:6a:b1: - c2:1b:45:32:71:95:d9:fe:10:5b:cc:af:e7:a5:79: - 01:8f:89:c3:ca:f2:55:71:f7:77:be:77:94:f3:72: - a4:2c:44:d8:9e:92:9b:14:3a:a1:e7:24:90:0a:0a: - 56:8e:c5:d8:26:94:e1:d9:48:e1:2d:3e:da:0a:72: - dd:a3:99:15:da:81:a2:87:f4:7b:6e:26:77:89:58: - ad:d6:eb:0c:b2:41:7a:73:6e:6d:db:7a:78:41:e9: - 08:88:12:7e:87:2e:66:11:63:6c:54:fb:3c:9d:72: - c0:bc:2e:ff:c2:b7:dd:0d:76:e3:3a:d7:f7:b4:68: - be:a2:f5:e3:81:6e:c1:46:6f:5d:8d:e0:4d:c6:54: - 55:89:1a:33:31:0a:b1:57:b9:a3:8a:98:c3:ec:3b: - 34:c5:95:41:69:7e:75:c2:3c:20:c5:61:ba:51:47: - a0:20:90:93:a1:90:4b:f3:4e:7c:85:45:54:9a:d1: - 05:26:41:b0:b5:4d:1d:33:be:c4:03:c8:25:7c:c1: - 70:db:3b:f4:09:2d:54:27:48:ac:2f:e1:c4:ac:3e: - c8:cb:92:4c:53:39:37:23:ec:d3:01:f9:e0:09:44: - 4d:4d:64:c0:e1:0d:5a:87:22:bc:ad:1b:a3:fe:26: - b5:15:f3:a7:fc:84:19:e9:ec:a1:88:b4:44:69:84: - 83:f3:89:d1:74:06:a9:cc:0b:d6:c2:de:27:85:50: - 26:ca:17:b8:c9:7a:87:56:2c:1a:01:1e:6c:be:13: - ad:10:ac:b5:24:f5:38:91:a1:d6:4b:da:f1:bb:d2: - de:47:b5:f1:bc:81:f6:59:6b:cf:19:53:e9:8d:15: - cb:4a:cb:a9:6f:44:e5:1b:41:cf:e1:86:a7:ca:d0: - 6a:9f:bc:4c:8d:06:33:5a:a2:85:e5:90:35:a0:62: - 5c:16:4e:f0:e3:a2:fa:03:1a:b4:2c:71:b3:58:2c: - de:7b:0b:db:1a:0f:eb:de:21:1f:06:77:06:03:b0: - c9:ef:99:fc:c0:b9:4f:0b:86:28:fe:d2:b9:ea:e3: - da:a5:c3:47:69:12:e0:db:f0:f6:19:8b:ed:7b:70: - d7:02:d6:ed:87:18:28:2c:04:24:4c:77:e4:48:8a: - 1a:c6:3b:9a:d4:0f:ca:fa:75:d2:01:40:5a:8d:79: - bf:8b:cf:4b:cf:aa:16:c1:95:e4:ad:4c:8a:3e:17: - 91:d4:b1:62:e5:82:e5:80:04:a4:03:7e:8d:bf:da: - 7f:a2:0f:97:4f:0c:d3:0d:fb:d7:d1:e5:72:7e:1c: - c8:77:ff:5b:9a:0f:b7:ae:05:46:e5:f1:a8:16:ec: - 47:a4:17 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Alternative Name: - email:info@izenpe.com, DirName:/O=IZENPE S.A. - CIF A01337260-RMerc.Vitoria-Gasteiz T1055 F62 S8/street=Avda del Mediterraneo Etorbidea 14 - 01010 Vitoria-Gasteiz - X509v3 Basic Constraints: critical - CA:TRUE - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Subject Key Identifier: - 1D:1C:65:0E:A8:F2:25:7B:B4:91:CF:E4:B1:B1:E6:BD:55:74:6C:05 - Signature Algorithm: sha1WithRSAEncryption - c7:81:46:6f:21:18:4f:a0:05:ef:e7:d5:ba:97:50:a2:60:ed: - a5:92:14:1a:52:9b:f9:f1:88:4a:a0:dc:78:75:d1:d5:1f:95: - 4e:c5:e7:b7:69:e6:22:f4:f8:29:a8:2a:89:be:cf:cf:76:8f: - e3:31:73:9d:26:d3:1c:1b:47:16:29:07:68:84:8a:d2:fb:b1: - 1b:24:3e:d2:98:18:2c:24:8e:af:f6:7b:ea:44:16:1b:2a:c4: - fa:a0:97:e9:ea:6c:58:a4:ef:75:ab:00:62:d1:9d:ed:13:36: - db:22:0b:b6:f0:d1:f4:6e:7b:46:87:c2:9d:bc:bd:be:42:3b: - b7:73:d0:9a:2a:3c:b4:5b:12:16:00:af:19:39:8d:ad:83:50: - 1c:c8:81:4f:bd:02:0f:3d:9e:35:96:ee:ef:e4:c2:03:7c:29: - 1c:02:7e:bd:34:27:5e:af:53:d6:9d:17:bf:57:6c:e9:d0:83: - 10:af:bf:5d:4d:ef:90:7b:5d:2b:ac:ec:ea:7d:00:26:17:cc: - 02:5c:63:d7:19:18:a7:ec:2b:c7:8a:3e:58:0e:8a:87:e6:83: - 9f:4e:b2:34:1e:ac:54:09:4f:1d:02:0b:39:7e:81:08:15:b9: - a0:69:13:c8:32:2b:e3:ad:6c:13:d6:83:9d:23:2d:b2:6d:a2: - 88:86:7e:a8:0d:01:26:09:40:d9:ed:28:4e:8c:93:24:0f:db: - f1:1e:4d:7a:7a:5a:e2:a5:58:f1:dc:8f:5f:99:82:0c:2e:cf: - b2:dd:98:cc:92:94:3f:f9:09:b3:a5:96:25:5b:37:f5:12:85: - 41:e2:19:4c:c6:8a:08:c1:dc:18:7a:0f:1e:3f:82:59:a2:9a: - 3e:3f:f9:e0:09:9f:fd:c1:91:4b:5d:c9:7b:d6:b6:89:fc:df: - 1d:7c:86:aa:cd:03:f2:0b:52:92:f1:62:6f:7f:87:ea:ab:76: - c9:6c:50:c2:19:82:af:aa:1d:f5:20:28:68:2e:d5:fc:64:37: - 4f:cf:a5:44:c4:be:72:b4:8c:74:b4:6c:a7:fa:f2:bd:74:38: - 43:2b:de:af:f9:dc:d8:e0:9d:9f:dc:3d:ca:a5:63:44:bf:92: - a2:4f:4c:80:1c:bb:1a:c3:9a:4a:04:55:4d:ca:ee:26:0b:1c: - bf:02:c5:64:d3:9e:7e:d2:d3:91:1c:4b:a2:f5:1c:e5:17:1c: - 0d:0c:52:a3:91:1f:9c:f0:21:ed:02:94:6f:a9:a0:49:ca:e8: - 43:8c:c4:f4:34:da:7c:22:a3:c6:66:3e:b8:1b:05:88:5d:ba: - bc:f7:bc:e5:dc:14:3d:a7:86:a8:b6:59:52:21:03:5e:8b:e3: - 04:ed:4b:2a:1e:a3:4f:50 ------BEGIN CERTIFICATE----- -MIIF8DCCA9igAwIBAgIPBuhGJy8fCo/RhFzjafbVMA0GCSqGSIb3DQEBBQUAMDgx -CzAJBgNVBAYTAkVTMRQwEgYDVQQKDAtJWkVOUEUgUy5BLjETMBEGA1UEAwwKSXpl -bnBlLmNvbTAeFw0wNzEyMTMxMzA4MjdaFw0zNzEyMTMwODI3MjVaMDgxCzAJBgNV -BAYTAkVTMRQwEgYDVQQKDAtJWkVOUEUgUy5BLjETMBEGA1UEAwwKSXplbnBlLmNv -bTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMnTesoPHqynhugWZWqx -whtFMnGV2f4QW8yv56V5AY+Jw8ryVXH3d753lPNypCxE2J6SmxQ6oeckkAoKVo7F -2CaU4dlI4S0+2gpy3aOZFdqBoof0e24md4lYrdbrDLJBenNubdt6eEHpCIgSfocu -ZhFjbFT7PJ1ywLwu/8K33Q124zrX97RovqL144FuwUZvXY3gTcZUVYkaMzEKsVe5 -o4qYw+w7NMWVQWl+dcI8IMVhulFHoCCQk6GQS/NOfIVFVJrRBSZBsLVNHTO+xAPI -JXzBcNs79AktVCdIrC/hxKw+yMuSTFM5NyPs0wH54AlETU1kwOENWocivK0bo/4m -tRXzp/yEGensoYi0RGmEg/OJ0XQGqcwL1sLeJ4VQJsoXuMl6h1YsGgEebL4TrRCs -tST1OJGh1kva8bvS3ke18byB9llrzxlT6Y0Vy0rLqW9E5RtBz+GGp8rQap+8TI0G -M1qiheWQNaBiXBZO8OOi+gMatCxxs1gs3nsL2xoP694hHwZ3BgOwye+Z/MC5TwuG -KP7Suerj2qXDR2kS4Nvw9hmL7Xtw1wLW7YcYKCwEJEx35EiKGsY7mtQPyvp10gFA -Wo15v4vPS8+qFsGV5K1Mij4XkdSxYuWC5YAEpAN+jb/af6IPl08M0w3719Hlcn4c -yHf/W5oPt64FRuXxqBbsR6QXAgMBAAGjgfYwgfMwgbAGA1UdEQSBqDCBpYEPaW5m -b0BpemVucGUuY29tpIGRMIGOMUcwRQYDVQQKDD5JWkVOUEUgUy5BLiAtIENJRiBB -MDEzMzcyNjAtUk1lcmMuVml0b3JpYS1HYXN0ZWl6IFQxMDU1IEY2MiBTODFDMEEG -A1UECQw6QXZkYSBkZWwgTWVkaXRlcnJhbmVvIEV0b3JiaWRlYSAxNCAtIDAxMDEw -IFZpdG9yaWEtR2FzdGVpejAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB -BjAdBgNVHQ4EFgQUHRxlDqjyJXu0kc/ksbHmvVV0bAUwDQYJKoZIhvcNAQEFBQAD -ggIBAMeBRm8hGE+gBe/n1bqXUKJg7aWSFBpSm/nxiEqg3Hh10dUflU7F57dp5iL0 -+CmoKom+z892j+Mxc50m0xwbRxYpB2iEitL7sRskPtKYGCwkjq/2e+pEFhsqxPqg -l+nqbFik73WrAGLRne0TNtsiC7bw0fRue0aHwp28vb5CO7dz0JoqPLRbEhYArxk5 -ja2DUBzIgU+9Ag89njWW7u/kwgN8KRwCfr00J16vU9adF79XbOnQgxCvv11N75B7 -XSus7Op9ACYXzAJcY9cZGKfsK8eKPlgOiofmg59OsjQerFQJTx0CCzl+gQgVuaBp -E8gyK+OtbBPWg50jLbJtooiGfqgNASYJQNntKE6MkyQP2/EeTXp6WuKlWPHcj1+Z -ggwuz7LdmMySlD/5CbOlliVbN/UShUHiGUzGigjB3Bh6Dx4/glmimj4/+eAJn/3B -kUtdyXvWton83x18hqrNA/ILUpLxYm9/h+qrdslsUMIZgq+qHfUgKGgu1fxkN0/P -pUTEvnK0jHS0bKf68r10OEMr3q/53NjgnZ/cPcqlY0S/kqJPTIAcuxrDmkoEVU3K -7iYLHL8CxWTTnn7S05EcS6L1HOUXHA0MUqORH5zwIe0ClG+poEnK6EOMxPQ02nwi -o8ZmPrgbBYhdurz3vOXcFD2nhqi2WVIhA16L4wTtSyoeo09Q ------END CERTIFICATE----- - -# 54455f7129c20b1447c418f997168f24c58fc5023bf5da5be2eb6e1dd8902ed5 -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - 0a:7e:a6:df:4b:44:9e:da:6a:24:85:9e:e6:b8:15:d3:16:7f:bb:b1 - Signature Algorithm: sha256WithRSAEncryption - Issuer: C=LU, O=LuxTrust S.A., CN=LuxTrust Global Root 2 - Validity - Not Before: Mar 5 13:21:57 2015 GMT - Not After : Mar 5 13:21:57 2035 GMT - Subject: C=LU, O=LuxTrust S.A., CN=LuxTrust Global Root 2 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (4096 bit) - Modulus: - 00:d7:85:97:bf:11:98:e9:f0:62:83:4c:3c:87:f9: - 53:6a:37:0b:f2:0f:3c:87:ce:6f:dc:26:29:bd:c5: - 89:ba:c9:83:3d:f7:ee:ca:5b:c6:6d:49:73:b4:c9: - 46:a3:1b:34:13:3f:c1:89:45:57:f4:d9:b1:fb:36: - 65:4b:fb:08:e2:48:71:11:c8:6e:3b:9e:9d:df:89: - 65:37:a6:85:f6:3b:44:18:b6:c6:37:30:62:44:92: - 97:69:7d:42:30:24:e4:0d:0c:89:6b:63:de:c5:e1: - df:4e:a9:14:6c:53:e0:61:ce:f6:17:2f:1d:3c:bd: - e6:22:4c:1d:93:f5:10:c4:a1:76:ec:6a:de:c5:6c: - df:96:b4:56:40:42:c0:62:92:30:a1:2d:15:94:a0: - d2:20:06:09:6e:6a:6d:e5:eb:b7:be:d4:f0:f1:15: - 7c:8b:e6:4e:ba:13:cc:4b:27:5e:99:3c:17:5d:8f: - 81:7f:33:3d:4f:d3:3f:1b:ec:5c:3f:f0:3c:4c:75: - 6e:f2:a6:d5:9d:da:2d:07:63:02:c6:72:e9:94:bc: - 4c:49:95:4f:88:52:c8:db:e8:69:82:f8:cc:34:5b: - 22:f0:86:a7:89:bd:48:0a:6d:66:81:6d:c8:c8:64: - fb:01:e1:f4:e1:de:d9:9e:dd:db:5b:d4:2a:99:26: - 15:1b:1e:4c:92:29:82:9e:d5:92:81:92:41:70:19: - f7:a4:e5:93:4b:bc:77:67:31:dd:1c:fd:31:70:0d: - 17:99:0c:f9:0c:39:19:2a:17:b5:30:71:55:d5:0f: - ae:58:e1:3d:2f:34:9b:cf:9f:f6:78:85:c2:93:7a: - 72:3e:66:8f:9c:16:11:60:8f:9e:89:6f:67:be:e0: - 47:5a:3b:0c:9a:67:8b:cf:46:c6:ae:38:a3:f2:a7: - bc:e6:d6:85:6b:33:24:70:22:4b:cb:08:9b:bb:c8: - f8:02:29:1d:be:20:0c:46:bf:6b:87:9b:b3:2a:66: - 42:35:46:6c:aa:ba:ad:f9:98:7b:e9:50:55:14:31: - bf:b1:da:2d:ed:80:ad:68:24:fb:69:ab:d8:71:13: - 30:e6:67:b3:87:40:fd:89:7e:f2:43:d1:11:df:2f: - 65:2f:64:ce:5f:14:b9:b1:bf:31:bd:87:78:5a:59: - 65:88:aa:fc:59:32:48:86:d6:4c:b9:29:4b:95:d3: - 76:f3:77:25:6d:42:1c:38:83:4d:fd:a3:5f:9b:7f: - 2d:ac:79:1b:0e:42:31:97:63:a4:fb:8a:69:d5:22: - 0d:34:90:30:2e:a8:b4:e0:6d:b6:94:ac:bc:8b:4e: - d7:70:fc:c5:38:8e:64:25:e1:4d:39:90:ce:c9:87: - 84:58:71 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: critical - CA:TRUE - X509v3 Certificate Policies: - Policy: 1.3.171.1.1.1.10 - CPS: https://repository.luxtrust.lu - - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Authority Key Identifier: - keyid:FF:18:28:76:F9:48:05:2C:A1:AE:F1:2B:1B:2B:B2:53:F8:4B:7C:B3 - - X509v3 Subject Key Identifier: - FF:18:28:76:F9:48:05:2C:A1:AE:F1:2B:1B:2B:B2:53:F8:4B:7C:B3 - Signature Algorithm: sha256WithRSAEncryption - 6a:19:14:ed:6e:79:c1:2c:87:d4:0d:70:7e:d7:f6:78:c9:0b: - 04:4e:c4:b1:ce:93:70:fe:b0:54:c0:32:cd:99:30:64:17:bf: - 0f:e5:e2:33:fd:07:36:40:72:0e:1a:b6:6a:59:d6:00:e5:68: - 20:dd:2e:72:0d:1f:6a:64:31:20:84:7d:49:a6:5a:37:eb:45: - c9:85:f5:d4:c7:17:99:07:e6:9b:55:e4:0c:e8:a9:b4:ce:8c: - 5b:b5:11:5c:cf:8a:0e:0d:d6:ac:77:81:fe:32:9c:24:9e:72: - ce:54:f3:d0:6f:a2:56:d6:ec:c3:37:2c:65:58:be:57:00:1a: - f2:35:fa:eb:7b:31:5d:c2:c1:12:3d:96:81:88:96:89:c1:59: - 5c:7a:e6:7f:70:34:e7:83:e2:b1:e1:e1:b8:58:ef:d4:95:e4: - 60:9c:f0:96:97:72:8c:eb:84:02:2e:65:8f:a4:b7:d2:7f:67: - dd:c8:d3:9e:5c:aa:a9:a4:a0:25:14:06:9b:ec:4f:7e:2d:0b: - 7f:1d:75:f1:33:d8:ed:ce:b8:75:6d:3e:5b:b9:98:1d:31:0d: - 56:d8:43:0f:30:91:b2:04:6b:dd:56:be:95:80:55:67:be:d8: - cd:83:d9:18:ee:2e:0f:86:2d:92:9e:70:13:ec:de:51:c9:43: - 78:02:a5:4d:c8:f9:5f:c4:91:58:46:16:77:5a:74:aa:40:bc: - 07:9f:30:b9:b1:f7:12:17:dd:e3:ff:24:40:1d:7a:6a:d1:4f: - 18:0a:aa:90:1d:eb:40:1e:df:a1:1e:44:92:10:9a:f2:8d:e1: - d1:4b:46:9e:e8:45:42:97:ea:45:99:f3:ec:66:d5:02:fa:f2: - a6:4a:24:aa:de:ce:b9:ca:f9:3f:93:6f:f9:a3:ba:ea:a5:3e: - 99:ad:fd:ff:7b:99:f5:65:ee:f0:59:28:67:d7:90:95:a4:13: - 84:a9:84:c1:e8:ce:ce:75:93:63:1a:bc:3c:ea:d5:64:1f:2d: - 2a:12:39:c6:c3:5a:32:ed:47:91:16:0e:bc:38:c1:50:de:8f: - ca:2a:90:34:1c:ee:41:94:9c:5e:19:2e:f8:45:49:99:74:91: - b0:04:6f:e3:04:5a:b1:ab:2a:ab:fe:c7:d0:96:b6:da:e1:4a: - 64:06:6e:60:4d:bd:42:4e:ff:78:da:24:ca:1b:b4:d7:96:39: - 6c:ae:f1:0e:aa:a7:7d:48:8b:20:4c:cf:64:d6:b8:97:46:b0: - 4e:d1:2a:56:3a:a0:93:bd:af:80:24:e0:0a:7e:e7:ca:d5:ca: - e8:85:55:dc:36:2a:e1:94:68:93:c7:66:72:44:0f:80:21:32: - 6c:25:c7:23:80:83:0a:eb ------BEGIN CERTIFICATE----- -MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQEL -BQAwRjELMAkGA1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNV -BAMMFkx1eFRydXN0IEdsb2JhbCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUw -MzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMVTEWMBQGA1UECgwNTHV4VHJ1c3QgUy5B -LjEfMB0GA1UEAwwWTHV4VHJ1c3QgR2xvYmFsIFJvb3QgMjCCAiIwDQYJKoZIhvcN -AQEBBQADggIPADCCAgoCggIBANeFl78RmOnwYoNMPIf5U2o3C/IPPIfOb9wmKb3F -ibrJgz337spbxm1Jc7TJRqMbNBM/wYlFV/TZsfs2ZUv7COJIcRHIbjuend+JZTem -hfY7RBi2xjcwYkSSl2l9QjAk5A0MiWtj3sXh306pFGxT4GHO9hcvHTy95iJMHZP1 -EMShduxq3sVs35a0VkBCwGKSMKEtFZSg0iAGCW5qbeXrt77U8PEVfIvmTroTzEsn -Xpk8F12PgX8zPU/TPxvsXD/wPEx1bvKm1Z3aLQdjAsZy6ZS8TEmVT4hSyNvoaYL4 -zDRbIvCGp4m9SAptZoFtyMhk+wHh9OHe2Z7d21vUKpkmFRseTJIpgp7VkoGSQXAZ -96Tlk0u8d2cx3Rz9MXANF5kM+Qw5GSoXtTBxVdUPrljhPS80m8+f9niFwpN6cj5m -j5wWEWCPnolvZ77gR1o7DJpni89Gxq44o/KnvObWhWszJHAiS8sIm7vI+AIpHb4g -DEa/a4ebsypmQjVGbKq6rfmYe+lQVRQxv7HaLe2ArWgk+2mr2HETMOZns4dA/Yl+ -8kPREd8vZS9kzl8UubG/Mb2HeFpZZYiq/FkySIbWTLkpS5XTdvN3JW1CHDiDTf2j -X5t/Lax5Gw5CMZdjpPuKadUiDTSQMC6otOBttpSsvItO13D8xTiOZCXhTTmQzsmH -hFhxAgMBAAGjgagwgaUwDwYDVR0TAQH/BAUwAwEB/zBCBgNVHSAEOzA5MDcGByuB -KwEBAQowLDAqBggrBgEFBQcCARYeaHR0cHM6Ly9yZXBvc2l0b3J5Lmx1eHRydXN0 -Lmx1MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBT/GCh2+UgFLKGu8SsbK7JT -+Et8szAdBgNVHQ4EFgQU/xgodvlIBSyhrvErGyuyU/hLfLMwDQYJKoZIhvcNAQEL -BQADggIBAGoZFO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9 -BzZAcg4atmpZ1gDlaCDdLnINH2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTO -jFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW7MM3LGVYvlcAGvI1+ut7MV3CwRI9 -loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIuZY+kt9J/Z93I055c -qqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWAVWe+ -2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/ -JEAdemrRTxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKre -zrnK+T+Tb/mjuuqlPpmt/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQf -LSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+ -x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31IiyBMz2TWuJdGsE7RKlY6 -oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr ------END CERTIFICATE----- - # 6c61dac3a2def031506be036d2a6fe401994fbd13df9c8d466599274c446ec98 Certificate: Data: @@ -4636,93 +4044,6 @@ XjG4Kvte9nHfRCaexOYNkbQudZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= -----END CERTIFICATE----- -# 15f0ba00a3ac7af3ac884c072b1011a077bd77c097f40164b2f8598abd83860c -Certificate: - Data: - Version: 3 (0x2) - Serial Number: - 57:cb:33:6f:c2:5c:16:e6:47:16:17:e3:90:31:68:e0 - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, O=Network Solutions L.L.C., CN=Network Solutions Certificate Authority - Validity - Not Before: Dec 1 00:00:00 2006 GMT - Not After : Dec 31 23:59:59 2029 GMT - Subject: C=US, O=Network Solutions L.L.C., CN=Network Solutions Certificate Authority - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:e4:bc:7e:92:30:6d:c6:d8:8e:2b:0b:bc:46:ce: - e0:27:96:de:de:f9:fa:12:d3:3c:33:73:b3:04:2f: - bc:71:8c:e5:9f:b6:22:60:3e:5f:5d:ce:09:ff:82: - 0c:1b:9a:51:50:1a:26:89:dd:d5:61:5d:19:dc:12: - 0f:2d:0a:a2:43:5d:17:d0:34:92:20:ea:73:cf:38: - 2c:06:26:09:7a:72:f7:fa:50:32:f8:c2:93:d3:69: - a2:23:ce:41:b1:cc:e4:d5:1f:36:d1:8a:3a:f8:8c: - 63:e2:14:59:69:ed:0d:d3:7f:6b:e8:b8:03:e5:4f: - 6a:e5:98:63:69:48:05:be:2e:ff:33:b6:e9:97:59: - 69:f8:67:19:ae:93:61:96:44:15:d3:72:b0:3f:bc: - 6a:7d:ec:48:7f:8d:c3:ab:aa:71:2b:53:69:41:53: - 34:b5:b0:b9:c5:06:0a:c4:b0:45:f5:41:5d:6e:89: - 45:7b:3d:3b:26:8c:74:c2:e5:d2:d1:7d:b2:11:d4: - fb:58:32:22:9a:80:c9:dc:fd:0c:e9:7f:5e:03:97: - ce:3b:00:14:87:27:70:38:a9:8e:6e:b3:27:76:98: - 51:e0:05:e3:21:ab:1a:d5:85:22:3c:29:b5:9a:16: - c5:80:a8:f4:bb:6b:30:8f:2f:46:02:a2:b1:0c:22: - e0:d3 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 21:30:C9:FB:00:D7:4E:98:DA:87:AA:2A:D0:A7:2E:B1:40:31:A7:4C - X509v3 Key Usage: critical - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - X509v3 CRL Distribution Points: - - Full Name: - URI:http://crl.netsolssl.com/NetworkSolutionsCertificateAuthority.crl - - Signature Algorithm: sha1WithRSAEncryption - bb:ae:4b:e7:b7:57:eb:7f:aa:2d:b7:73:47:85:6a:c1:e4:a5: - 1d:e4:e7:3c:e9:f4:59:65:77:b5:7a:5b:5a:8d:25:36:e0:7a: - 97:2e:38:c0:57:60:83:98:06:83:9f:b9:76:7a:6e:50:e0:ba: - 88:2c:fc:45:cc:18:b0:99:95:51:0e:ec:1d:b8:88:ff:87:50: - 1c:82:c2:e3:e0:32:80:bf:a0:0b:47:c8:c3:31:ef:99:67:32: - 80:4f:17:21:79:0c:69:5c:de:5e:34:ae:02:b5:26:ea:50:df: - 7f:18:65:2c:c9:f2:63:e1:a9:07:fe:7c:71:1f:6b:33:24:6a: - 1e:05:f7:05:68:c0:6a:12:cb:2e:5e:61:cb:ae:28:d3:7e:c2: - b4:66:91:26:5f:3c:2e:24:5f:cb:58:0f:eb:28:ec:af:11:96: - f3:dc:7b:6f:c0:a7:88:f2:53:77:b3:60:5e:ae:ae:28:da:35: - 2c:6f:34:45:d3:26:e1:de:ec:5b:4f:27:6b:16:7c:bd:44:04: - 18:82:b3:89:79:17:10:71:3d:7a:a2:16:4e:f5:01:cd:a4:6c: - 65:68:a1:49:76:5c:43:c9:d8:bc:36:67:6c:a5:94:b5:d4:cc: - b9:bd:6a:35:56:21:de:d8:c3:eb:fb:cb:a4:60:4c:b0:55:a0: - a0:7b:57:b2 ------BEGIN CERTIFICATE----- -MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi -MQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu -MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3Jp -dHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMxMjM1OTU5WjBiMQswCQYDVQQGEwJV -UzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydO -ZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwz -c7MEL7xxjOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPP -OCwGJgl6cvf6UDL4wpPTaaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rl -mGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXTcrA/vGp97Eh/jcOrqnErU2lBUzS1sLnF -BgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc/Qzpf14Dl847ABSHJ3A4 -qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMBAAGjgZcw -gZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIB -BjAPBgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwu -bmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3Jp -dHkuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc8 -6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/ -h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH -/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv -wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN -pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey ------END CERTIFICATE----- - # 001686cd181f83a1b1217d305b365c41e3470a78a1d37b134a98cd547b92dab3 Certificate: Data: @@ -5315,84 +4636,6 @@ f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW -----END CERTIFICATE----- -# e75e72ed9f560eec6eb4800073a43fc3ad19195a392282017895974a99026b6c -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 0 (0x0) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=JP, O=SECOM Trust.net, OU=Security Communication RootCA1 - Validity - Not Before: Sep 30 04:20:49 2003 GMT - Not After : Sep 30 04:20:49 2023 GMT - Subject: C=JP, O=SECOM Trust.net, OU=Security Communication RootCA1 - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (2048 bit) - Modulus: - 00:b3:b3:fe:7f:d3:6d:b1:ef:16:7c:57:a5:0c:6d: - 76:8a:2f:4b:bf:64:fb:4c:ee:8a:f0:f3:29:7c:f5: - ff:ee:2a:e0:e9:e9:ba:5b:64:22:9a:9a:6f:2c:3a: - 26:69:51:05:99:26:dc:d5:1c:6a:71:c6:9a:7d:1e: - 9d:dd:7c:6c:c6:8c:67:67:4a:3e:f8:71:b0:19:27: - a9:09:0c:a6:95:bf:4b:8c:0c:fa:55:98:3b:d8:e8: - 22:a1:4b:71:38:79:ac:97:92:69:b3:89:7e:ea:21: - 68:06:98:14:96:87:d2:61:36:bc:6d:27:56:9e:57: - ee:c0:c0:56:fd:32:cf:a4:d9:8e:c2:23:d7:8d:a8: - f3:d8:25:ac:97:e4:70:38:f4:b6:3a:b4:9d:3b:97: - 26:43:a3:a1:bc:49:59:72:4c:23:30:87:01:58:f6: - 4e:be:1c:68:56:66:af:cd:41:5d:c8:b3:4d:2a:55: - 46:ab:1f:da:1e:e2:40:3d:db:cd:7d:b9:92:80:9c: - 37:dd:0c:96:64:9d:dc:22:f7:64:8b:df:61:de:15: - 94:52:15:a0:7d:52:c9:4b:a8:21:c9:c6:b1:ed:cb: - c3:95:60:d1:0f:f0:ab:70:f8:df:cb:4d:7e:ec:d6: - fa:ab:d9:bd:7f:54:f2:a5:e9:79:fa:d9:d6:76:24: - 28:73 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - A0:73:49:99:68:DC:85:5B:65:E3:9B:28:2F:57:9F:BD:33:BC:07:48 - X509v3 Key Usage: - Certificate Sign, CRL Sign - X509v3 Basic Constraints: critical - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption - 68:40:a9:a8:bb:e4:4f:5d:79:b3:05:b5:17:b3:60:13:eb:c6: - 92:5d:e0:d1:d3:6a:fe:fb:be:9b:6d:bf:c7:05:6d:59:20:c4: - 1c:f0:b7:da:84:58:02:63:fa:48:16:ef:4f:a5:0b:f7:4a:98: - f2:3f:9e:1b:ad:47:6b:63:ce:08:47:eb:52:3f:78:9c:af:4d: - ae:f8:d5:4f:cf:9a:98:2a:10:41:39:52:c4:dd:d9:9b:0e:ef: - 93:01:ae:b2:2e:ca:68:42:24:42:6c:b0:b3:3a:3e:cd:e9:da: - 48:c4:15:cb:e9:f9:07:0f:92:50:49:8a:dd:31:97:5f:c9:e9: - 37:aa:3b:59:65:97:94:32:c9:b3:9f:3e:3a:62:58:c5:49:ad: - 62:0e:71:a5:32:aa:2f:c6:89:76:43:40:13:13:67:3d:a2:54: - 25:10:cb:f1:3a:f2:d9:fa:db:49:56:bb:a6:fe:a7:41:35:c3: - e0:88:61:c9:88:c7:df:36:10:22:98:59:ea:b0:4a:fb:56:16: - 73:6e:ac:4d:f7:22:a1:4f:ad:1d:7a:2d:45:27:e5:30:c1:5e: - f2:da:13:cb:25:42:51:95:47:03:8c:6c:21:cc:74:42:ed:53: - ff:33:8b:8f:0f:57:01:16:2f:cf:a6:ee:c9:70:22:14:bd:fd: - be:6c:0b:03 ------BEGIN CERTIFICATE----- -MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEY -MBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21t -dW5pY2F0aW9uIFJvb3RDQTEwHhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5 -WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYD -VQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEwggEiMA0GCSqGSIb3 -DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw8yl8 -9f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJ -DKaVv0uMDPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9 -Ms+k2Y7CI9eNqPPYJayX5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/N -QV3Is00qVUarH9oe4kA92819uZKAnDfdDJZkndwi92SL32HeFZRSFaB9UslLqCHJ -xrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2JChzAgMBAAGjPzA9MB0G -A1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYwDwYDVR0T -AQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vG -kl3g0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfr -Uj94nK9NrvjVT8+amCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5 -Bw+SUEmK3TGXX8npN6o7WWWXlDLJs58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJU -JRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ6rBK+1YWc26sTfcioU+tHXot -RSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAiFL39vmwLAw== ------END CERTIFICATE----- - # 513b2cecb810d4cde5dd85391adfc6c2dd60d87bb736d2b521484aa47a0ebef6 Certificate: Data:
diff --git a/net/data/ssl/ev_roots/ev_roots.textproto b/net/data/ssl/ev_roots/ev_roots.textproto index d52ed0d2..c234286 100644 --- a/net/data/ssl/ev_roots/ev_roots.textproto +++ b/net/data/ssl/ev_roots/ev_roots.textproto
@@ -72,13 +72,6 @@ ev_policy_oids: "1.3.6.1.4.1.13177.10.1.3.10" } -# Baltimore CyberTrust Root -# https://secure.omniroot.com/repository/ -trust_anchors { - sha256_hex: "16af57a9f676b0ab126095aa5ebadef22ab31119d644ac95cd4b93dbf3f26aeb" - ev_policy_oids: "1.3.6.1.4.1.6334.1.100.1" -} - # Buypass Class 3 Root CA # https://valid.evident.ca23.ssl.buypass.no/ trust_anchors { @@ -110,15 +103,6 @@ # COMODO Certification Authority # https://secure.comodo.com/ trust_anchors { - sha256_hex: "0c2cd63df7806fa399ede809116b575bf87989f06518f9808c860503178baf66" - - ev_policy_oids: "1.3.6.1.4.1.6449.1.2.1.5.1" -} - -# COMODO Certification Authority (reissued certificate with NotBefore of -# Jan 1 00:00:00 2011 GMT) -# https://secure.comodo.com/ -trust_anchors { sha256_hex: "1a0d20445de5ba1862d19ef880858cbce50102b36e8f0a040c3c69e74522fe6e" ev_policy_oids: "1.3.6.1.4.1.6449.1.2.1.5.1" @@ -140,14 +124,6 @@ ev_policy_oids: "1.3.6.1.4.1.6449.1.2.1.5.1" } -# DigiCert Assured ID Root CA -# https://assured-id-root-ca.chain-demos.digicert.com/ -trust_anchors { - sha256_hex: "3e9099b5015e8f486c00bcea9d111ee721faba355a89bcf1df69561e3dc6325c" - - ev_policy_oids: "2.16.840.1.114412.2.1" -} - # DigiCert Assured ID Root G2 # https://assured-id-root-g2.chain-demos.digicert.com/ trust_anchors { @@ -164,14 +140,6 @@ ev_policy_oids: "2.16.840.1.114412.2.1" } -# DigiCert Global Root CA -# https://global-root-ca.chain-demos.digicert.com/ -trust_anchors { - sha256_hex: "4348a0e9444c78cb265e058d5e8944b4d84f9662bd26db257f8934a443c70161" - - ev_policy_oids: "2.16.840.1.114412.2.1" -} - # DigiCert Global Root G2 # https://global-root-g2.chain-demos.digicert.com/ trust_anchors { @@ -361,24 +329,6 @@ ev_policy_oids: "1.3.6.1.4.1.14777.6.1.2" } -# Izenpe.com - SHA1 root -# Windows XP finds this, SHA1, root instead. The policy OIDs are the same -# as for the SHA256 root, above. -trust_anchors { - sha256_hex: "23804203ca45d8cde716b8c13bf3b448457fa06cc10250997fa01458317c41e5" - - ev_policy_oids: "1.3.6.1.4.1.14777.6.1.1" - ev_policy_oids: "1.3.6.1.4.1.14777.6.1.2" -} - -# LuxTrust Global Root 2 -# https://ltsslca5.trustme.lu/ -trust_anchors { - sha256_hex: "54455f7129c20b1447c418f997168f24c58fc5023bf5da5be2eb6e1dd8902ed5" - - ev_policy_oids: "1.3.171.1.1.10.5.2" -} - # NetLock Arany (Class Gold) FÅ‘tanúsítvány # https://valid.ev.tanusitvany.hu trust_anchors { @@ -386,14 +336,6 @@ ev_policy_oids: "2.23.140.1.1" } -# Network Solutions Certificate Authority -# https://www.networksolutions.com/website-packages/index.jsp -trust_anchors { - sha256_hex: "15f0ba00a3ac7af3ac884c072b1011a077bd77c097f40164b2f8598abd83860c" - - ev_policy_oids: "1.3.6.1.4.1.782.1.2.1.8.1" -} - # Network Solutions Certificate Authority (reissued certificate with # NotBefore of Jan 1 00:00:00 2011 GMT). # https://www.networksolutions.com/website-packages/index.jsp @@ -443,14 +385,6 @@ ev_policy_oids: "2.16.840.1.114404.1.1.2.4.1" } -# Security Communication RootCA1 -# https://www.secomtrust.net/contact/form.html -trust_anchors { - sha256_hex: "e75e72ed9f560eec6eb4800073a43fc3ad19195a392282017895974a99026b6c" - - ev_policy_oids: "1.2.392.200091.100.721.1" -} - # Security Communication EV RootCA2 # https://www.secomtrust.net/contact/form.html trust_anchors {
diff --git a/net/cookies/first_party_set_metadata.cc b/net/first_party_sets/first_party_set_metadata.cc similarity index 95% rename from net/cookies/first_party_set_metadata.cc rename to net/first_party_sets/first_party_set_metadata.cc index e7c9c24c..8b88332d 100644 --- a/net/cookies/first_party_set_metadata.cc +++ b/net/first_party_sets/first_party_set_metadata.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 "net/cookies/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include <tuple>
diff --git a/net/cookies/first_party_set_metadata.h b/net/first_party_sets/first_party_set_metadata.h similarity index 91% rename from net/cookies/first_party_set_metadata.h rename to net/first_party_sets/first_party_set_metadata.h index ddc89a8..115e068 100644 --- a/net/cookies/first_party_set_metadata.h +++ b/net/first_party_sets/first_party_set_metadata.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 NET_COOKIES_FIRST_PARTY_SET_METADATA_H_ -#define NET_COOKIES_FIRST_PARTY_SET_METADATA_H_ +#ifndef NET_FIRST_PARTY_SETS_FIRST_PARTY_SET_METADATA_H_ +#define NET_FIRST_PARTY_SETS_FIRST_PARTY_SET_METADATA_H_ #include "net/base/net_export.h" #include "net/cookies/same_party_context.h" @@ -54,4 +54,4 @@ } // namespace net -#endif // NET_COOKIES_FIRST_PARTY_SET_METADATA_H_ +#endif // NET_FIRST_PARTY_SETS_FIRST_PARTY_SET_METADATA_H_
diff --git a/net/cookies/first_party_sets_context_config.cc b/net/first_party_sets/first_party_sets_context_config.cc similarity index 90% rename from net/cookies/first_party_sets_context_config.cc rename to net/first_party_sets/first_party_sets_context_config.cc index e075437..11d87634 100644 --- a/net/cookies/first_party_sets_context_config.cc +++ b/net/first_party_sets/first_party_sets_context_config.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 "net/cookies/first_party_sets_context_config.h" +#include "net/first_party_sets/first_party_sets_context_config.h" namespace net {
diff --git a/net/cookies/first_party_sets_context_config.h b/net/first_party_sets/first_party_sets_context_config.h similarity index 84% rename from net/cookies/first_party_sets_context_config.h rename to net/first_party_sets/first_party_sets_context_config.h index 5b6ff92..6b546f9be 100644 --- a/net/cookies/first_party_sets_context_config.h +++ b/net/first_party_sets/first_party_sets_context_config.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 NET_COOKIES_FIRST_PARTY_SETS_CONTEXT_CONFIG_H_ -#define NET_COOKIES_FIRST_PARTY_SETS_CONTEXT_CONFIG_H_ +#ifndef NET_FIRST_PARTY_SETS_FIRST_PARTY_SETS_CONTEXT_CONFIG_H_ +#define NET_FIRST_PARTY_SETS_FIRST_PARTY_SETS_CONTEXT_CONFIG_H_ #include "base/containers/flat_map.h" #include "net/base/schemeful_site.h" @@ -39,4 +39,4 @@ } // namespace net -#endif // NET_COOKIES_FIRST_PARTY_SETS_CONTEXT_CONFIG_H_ \ No newline at end of file +#endif // NET_FIRST_PARTY_SETS_FIRST_PARTY_SETS_CONTEXT_CONFIG_H_ \ No newline at end of file
diff --git a/net/reporting/reporting_cache_unittest.cc b/net/reporting/reporting_cache_unittest.cc index d7669ca..13fec3bb 100644 --- a/net/reporting/reporting_cache_unittest.cc +++ b/net/reporting/reporting_cache_unittest.cc
@@ -1649,7 +1649,16 @@ EXPECT_TRUE(FindEndpointInCache(kGroupKey12_, kEndpoint1_)); } -TEST_P(ReportingCacheTest, EvictEndpointsOverGlobalLimitFromStalestClient) { +// Test is flaky on Linux (https://crbug.com/1358967) +#if BUILDFLAG(IS_LINUX) +#define MAYBE_EvictEndpointsOverGlobalLimitFromStalestClient \ + DISABLED_EvictEndpointsOverGlobalLimitFromStalestClient +#else +#define MAYBE_EvictEndpointsOverGlobalLimitFromStalestClient \ + EvictEndpointsOverGlobalLimitFromStalestClient +#endif +TEST_P(ReportingCacheTest, + MAYBE_EvictEndpointsOverGlobalLimitFromStalestClient) { LoadReportingClients(); // Set enough endpoints to reach the global endpoint limit.
diff --git a/net/socket/tcp_socket_unittest.cc b/net/socket/tcp_socket_unittest.cc index be9ab1b5..52399751 100644 --- a/net/socket/tcp_socket_unittest.cc +++ b/net/socket/tcp_socket_unittest.cc
@@ -1024,12 +1024,11 @@ // Try binding to this IP to trigger the underlying BindToNetwork call. const IPEndPoint ip(IPAddress::IPv4Localhost(), 0); // TestCompletionCallback connect_callback; - TCPClientSocket connecting_socket(local_address_list(), nullptr, nullptr, - nullptr, NetLogSource(), - wrong_network_handle); + TCPClientSocket wrong_socket(local_address_list(), nullptr, nullptr, nullptr, + NetLogSource(), wrong_network_handle); // Different Android versions might report different errors. Hence, just check // what shouldn't happen. - int rv = connecting_socket.Bind(ip); + int rv = wrong_socket.Bind(ip); EXPECT_NE(OK, rv); EXPECT_NE(ERR_NOT_IMPLEMENTED, rv); @@ -1037,10 +1036,9 @@ const handles::NetworkHandle network_handle = NetworkChangeNotifier::GetDefaultNetwork(); if (network_handle != handles::kInvalidNetworkHandle) { - TCPClientSocket connecting_socket(local_address_list(), nullptr, nullptr, - nullptr, NetLogSource(), - wrong_network_handle); - EXPECT_EQ(OK, connecting_socket.Bind(ip)); + TCPClientSocket correct_socket(local_address_list(), nullptr, nullptr, + nullptr, NetLogSource(), network_handle); + EXPECT_EQ(OK, correct_socket.Bind(ip)); } }
diff --git a/net/socket/udp_socket_unittest.cc b/net/socket/udp_socket_unittest.cc index 854b476..d58ceff7 100644 --- a/net/socket/udp_socket_unittest.cc +++ b/net/socket/udp_socket_unittest.cc
@@ -1438,23 +1438,23 @@ // Binding the socket to a not existing network should fail at connect time. const handles::NetworkHandle wrong_network_handle = 65536; - UDPClientSocket socket(DatagramSocket::RANDOM_BIND, nullptr, NetLogSource(), - wrong_network_handle); + UDPClientSocket wrong_socket(DatagramSocket::RANDOM_BIND, nullptr, + NetLogSource(), wrong_network_handle); // Different Android versions might report different errors. Hence, just check // what shouldn't happen. - int rv = socket.Connect(fake_server_address); + int rv = wrong_socket.Connect(fake_server_address); EXPECT_NE(OK, rv); EXPECT_NE(ERR_NOT_IMPLEMENTED, rv); - EXPECT_NE(wrong_network_handle, socket.GetBoundNetwork()); + EXPECT_NE(wrong_network_handle, wrong_socket.GetBoundNetwork()); // Binding the socket to an existing network should succeed. const handles::NetworkHandle network_handle = NetworkChangeNotifier::GetDefaultNetwork(); if (network_handle != handles::kInvalidNetworkHandle) { - UDPClientSocket socket(DatagramSocket::RANDOM_BIND, nullptr, NetLogSource(), - network_handle); - EXPECT_EQ(OK, socket.Connect(fake_server_address)); - EXPECT_EQ(network_handle, socket.GetBoundNetwork()); + UDPClientSocket correct_socket(DatagramSocket::RANDOM_BIND, nullptr, + NetLogSource(), network_handle); + EXPECT_EQ(OK, correct_socket.Connect(fake_server_address)); + EXPECT_EQ(network_handle, correct_socket.GetBoundNetwork()); } }
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc index 2a39aed..9a518785 100644 --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc
@@ -54,13 +54,13 @@ #include "net/cookies/cookie_constants.h" #include "net/cookies/cookie_store.h" #include "net/cookies/cookie_util.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/parsed_cookie.h" #include "net/cookies/same_party_context.h" #include "net/filter/brotli_source_stream.h" #include "net/filter/filter_source_stream.h" #include "net/filter/gzip_source_stream.h" #include "net/filter/source_stream.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "net/http/http_content_disposition.h" #include "net/http/http_log_util.h" #include "net/http/http_network_session.h"
diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h index 9d9e968..97f542c 100644 --- a/net/url_request/url_request_http_job.h +++ b/net/url_request/url_request_http_job.h
@@ -24,7 +24,7 @@ #include "net/base/privacy_mode.h" #include "net/cookies/cookie_inclusion_status.h" #include "net/cookies/cookie_partition_key.h" -#include "net/cookies/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "net/http/http_request_info.h" #include "net/socket/connection_attempts.h" #include "net/url_request/url_request_job.h"
diff --git a/remoting/codec/webrtc_video_encoder_av1.cc b/remoting/codec/webrtc_video_encoder_av1.cc index 779d99bf..3645f62 100644 --- a/remoting/codec/webrtc_video_encoder_av1.cc +++ b/remoting/codec/webrtc_video_encoder_av1.cc
@@ -179,6 +179,12 @@ DCHECK_EQ(error, AOM_CODEC_OK) << "Failed to set AV1E_SET_MAX_REFERENCE_FRAMES"; + // Suggested by the AOM team to decrease encode time per frame. Setting this + // value to 2 decreased per-frame encode time by ~1ms at 3840x2160 with no + // noticeable loss of quality. + error = aom_codec_control(codec.get(), AV1E_SET_CDF_UPDATE_MODE, 2); + DCHECK_EQ(error, AOM_CODEC_OK) << "Failed to set AV1E_SET_CDF_UPDATE_MODE"; + codec_ = std::move(codec); return true; }
diff --git a/remoting/host/BUILD.gn b/remoting/host/BUILD.gn index 599a685..691e767 100644 --- a/remoting/host/BUILD.gn +++ b/remoting/host/BUILD.gn
@@ -510,6 +510,8 @@ "linux/remote_desktop_portal_injector.h", "linux/wayland_desktop_capturer.cc", "linux/wayland_desktop_capturer.h", + "linux/wayland_manager.cc", + "linux/wayland_manager.h", ] public_deps += [ "//third_party/wayland-protocols:xdg_shell_protocol" ] }
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc index 2915b5d..0e5069ab 100644 --- a/remoting/host/client_session.cc +++ b/remoting/host/client_session.cc
@@ -520,14 +520,6 @@ clipboard_echo_filter_.set_client_stub(connection_->client_stub()); } -#if defined(WEBRTC_USE_GIO) -void ClientSession::ExtractAndSetInputInjectorMetadata( - webrtc::DesktopCaptureMetadata capture_metadata) { - input_injector_->SetMetadata( - {.session_details = std::move(capture_metadata.session_details)}); -} -#endif - void ClientSession::CreateMediaStreams() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -539,16 +531,6 @@ video_stream.composer = composer->GetWeakPtr(); video_stream.stream = connection_->StartVideoStream(kStreamName, std::move(composer)); -#if defined(WEBRTC_USE_GIO) - if (webrtc::DesktopCapturer::IsRunningUnderWayland() && - video_stream.composer) { - // Unretained(this) is safe because |this| owns the composer, which will - // not run any callback after it is destroyed. - video_stream.composer->GetMetadataAsync( - base::BindOnce(&ClientSession::ExtractAndSetInputInjectorMetadata, - base::Unretained(this))); - } -#endif // defined(WEBRTC_USE_GIO) } else { video_stream.stream = connection_->StartVideoStream( kStreamName, desktop_environment_->CreateVideoCapturer());
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h index 1cb7eb56..5c2c005 100644 --- a/remoting/host/client_session.h +++ b/remoting/host/client_session.h
@@ -268,11 +268,6 @@ // display). bool IsValidDisplayIndex(webrtc::ScreenId index) const; -#if defined(WEBRTC_USE_GIO) - void ExtractAndSetInputInjectorMetadata( - webrtc::DesktopCaptureMetadata capture_metadata); -#endif - raw_ptr<EventHandler> event_handler_; // Used to create a DesktopEnvironment instance for this session.
diff --git a/remoting/host/disconnect_window_mac.mm b/remoting/host/disconnect_window_mac.mm index 8246994..80b1f0e 100644 --- a/remoting/host/disconnect_window_mac.mm +++ b/remoting/host/disconnect_window_mac.mm
@@ -123,6 +123,8 @@ } - (void)dealloc { + [_connectedToField release]; + [_disconnectButton release]; [super dealloc]; }
diff --git a/remoting/host/installer/mac/uninstaller/remoting_uninstaller_app.mm b/remoting/host/installer/mac/uninstaller/remoting_uninstaller_app.mm index 8c30d28..3583ffc 100644 --- a/remoting/host/installer/mac/uninstaller/remoting_uninstaller_app.mm +++ b/remoting/host/installer/mac/uninstaller/remoting_uninstaller_app.mm
@@ -45,6 +45,7 @@ @synthesize window = _window; - (void)dealloc { + [_window release]; [super dealloc]; }
diff --git a/remoting/host/it2me/it2me_host.cc b/remoting/host/it2me/it2me_host.cc index 4ea26f2..5ce734fe 100644 --- a/remoting/host/it2me/it2me_host.cc +++ b/remoting/host/it2me/it2me_host.cc
@@ -42,6 +42,10 @@ #include "remoting/signaling/signaling_id_util.h" #include "services/network/public/cpp/shared_url_loader_factory.h" +#if defined(REMOTING_USE_WAYLAND) +#include "remoting/host/linux/wayland_manager.h" +#endif // defined(REMOTING_USE_WAYLAND) + namespace remoting { using protocol::ErrorCode; @@ -134,6 +138,10 @@ OnPolicyUpdate(std::move(policies)); +#if defined(REMOTING_USE_WAYLAND) + WaylandManager::Get()->Init(host_context_->ui_task_runner()); +#endif // defined(REMOTING_USE_WAYLAND) + desktop_environment_factory_ = std::make_unique<It2MeDesktopEnvironmentFactory>( host_context_->network_task_runner(),
diff --git a/remoting/host/linux/input_injector_wayland.cc b/remoting/host/linux/input_injector_wayland.cc index d560f34..b2d228ea 100644 --- a/remoting/host/linux/input_injector_wayland.cc +++ b/remoting/host/linux/input_injector_wayland.cc
@@ -28,6 +28,7 @@ #include "remoting/host/input_injector_metadata.h" #include "remoting/host/linux/remote_desktop_portal_injector.h" #include "remoting/host/linux/unicode_to_keysym.h" +#include "remoting/host/linux/wayland_manager.h" #include "remoting/proto/internal.pb.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" @@ -195,6 +196,16 @@ InputInjectorWayland::InputInjectorWayland( scoped_refptr<base::SingleThreadTaskRunner> task_runner) { core_ = new Core(task_runner); + + // Register callback with the wayland manager so that it can get details + // about the desktop capture metadata (which include session details of the + // portal). + auto converting_cb = + base::BindRepeating([](const webrtc::DesktopCaptureMetadata metadata) { + return metadata.session_details; + }); + WaylandManager::Get()->AddCapturerMetadataCallback( + converting_cb.Then(base::BindRepeating(&Core::SetSessionDetails, core_))); } InputInjectorWayland::~InputInjectorWayland() {}
diff --git a/remoting/host/linux/remote_desktop_portal.cc b/remoting/host/linux/remote_desktop_portal.cc index 55e6dfa..290ebe6c 100644 --- a/remoting/host/linux/remote_desktop_portal.cc +++ b/remoting/host/linux/remote_desktop_portal.cc
@@ -42,16 +42,16 @@ webrtc::ScreenCastPortal::PortalNotifier* notifier) : notifier_(notifier) { screencast_portal_ = std::make_unique<webrtc::ScreenCastPortal>( - webrtc::ScreenCastPortal::CaptureSourceType::kAnyScreenContent, this, + webrtc::ScreenCastPortal::CaptureSourceType::kScreen, this, OnScreenCastPortalProxyRequested, OnSourcesRequestResponseSignal, this); DETACH_FROM_SEQUENCE(sequence_checker_); } RemoteDesktopPortal::~RemoteDesktopPortal() { - Cleanup(); + Stop(); } -void RemoteDesktopPortal::Cleanup() { +void RemoteDesktopPortal::Stop() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (context_) { g_main_context_pop_thread_default(context_); @@ -399,7 +399,7 @@ LOG(INFO) << "Remote desktop portal setup is done: " << webrtc::xdg_portal::RequestResponseToString(result); if (result != RequestResponse::kSuccess) { - Cleanup(); + Stop(); } }
diff --git a/remoting/host/linux/remote_desktop_portal.h b/remoting/host/linux/remote_desktop_portal.h index 4787dc0..7dfdc885 100644 --- a/remoting/host/linux/remote_desktop_portal.h +++ b/remoting/host/linux/remote_desktop_portal.h
@@ -40,6 +40,7 @@ // ScreenCapturePortalInterface overrides. void Start() override; + void Stop() override; void OnPortalDone(webrtc::xdg_portal::RequestResponse result) override; webrtc::xdg_portal::SessionDetails GetSessionDetails() override; void RequestSession(GDBusProxy* proxy) override; @@ -51,7 +52,6 @@ void OnScreenCastSessionClosed() override; private: - void Cleanup(); void UnsubscribeSignalHandlers(); void RequestSources(); void SelectDevices();
diff --git a/remoting/host/linux/remote_desktop_portal_injector.cc b/remoting/host/linux/remote_desktop_portal_injector.cc index f632f3b2..25d8a961 100644 --- a/remoting/host/linux/remote_desktop_portal_injector.cc +++ b/remoting/host/linux/remote_desktop_portal_injector.cc
@@ -139,10 +139,6 @@ webrtc::xdg_portal::SessionDetails session_details) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); HOST_LOG << "Desktop portal session details received"; - DCHECK(session_details.proxy); - DCHECK(session_details.cancellable); - DCHECK(!session_details.session_handle.empty()); - DCHECK(session_details.pipewire_stream_node_id); proxy_ = session_details.proxy; cancellable_ = session_details.cancellable; session_handle_ = session_details.session_handle;
diff --git a/remoting/host/linux/wayland_desktop_capturer.cc b/remoting/host/linux/wayland_desktop_capturer.cc index fc8ee5e..db5ec350 100644 --- a/remoting/host/linux/wayland_desktop_capturer.cc +++ b/remoting/host/linux/wayland_desktop_capturer.cc
@@ -8,6 +8,7 @@ #include "base/time/time.h" #include "remoting/base/logging.h" #include "remoting/host/linux/remote_desktop_portal.h" +#include "remoting/host/linux/wayland_manager.h" #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" #include "third_party/webrtc/modules/desktop_capture/linux/wayland/xdg_session_details.h" @@ -47,21 +48,12 @@ #if defined(WEBRTC_USE_GIO) webrtc::DesktopCaptureMetadata WaylandDesktopCapturer::GetMetadata() { - constexpr base::TimeDelta kMetadataTimeout = base::Seconds(3); - base::Time start_time = base::Time::Now(); - do { - SessionDetails session_details = - base_capturer_pipewire_.GetSessionDetails(); - if (session_details.proxy && session_details.cancellable && - !session_details.session_handle.empty() && - session_details.pipewire_stream_node_id > 0) { - return {.session_details = std::move(session_details)}; - } - base::PlatformThread::Sleep(base::Milliseconds(10)); - } while (base::Time::Now() - start_time < kMetadataTimeout); - LOG(ERROR) << "Unable to retrievel portal session details in time: " - << kMetadataTimeout << ". CRD session will fail."; - return {}; + SessionDetails session_details = base_capturer_pipewire_.GetSessionDetails(); + DCHECK(session_details.proxy); + DCHECK(session_details.cancellable); + DCHECK(!session_details.session_handle.empty()); + DCHECK(session_details.pipewire_stream_node_id > 0); + return {.session_details = std::move(session_details)}; } #endif @@ -69,6 +61,12 @@ uint32_t stream_node_id, int fd) { base_capturer_pipewire_.OnScreenCastRequestResult(result, stream_node_id, fd); + if (result == RequestResponse::kSuccess) { + WaylandManager::Get()->OnDesktopCapturerMetadata(GetMetadata()); + } else { + LOG(WARNING) << "Screen cast request didn't succeed, injector won't be " + "enabled"; + } } void WaylandDesktopCapturer::OnScreenCastSessionClosed() {
diff --git a/remoting/host/linux/wayland_desktop_capturer.h b/remoting/host/linux/wayland_desktop_capturer.h index 3fc6d3be..2c761d70 100644 --- a/remoting/host/linux/wayland_desktop_capturer.h +++ b/remoting/host/linux/wayland_desktop_capturer.h
@@ -34,8 +34,8 @@ #if defined(WEBRTC_USE_GIO) // Gets session related details in the metadata so that input injection // module can make use of the same remote desktop session to inject inputs - // on the remote host. Valid metadata can only be populated after the - // capturer has been started using call to `Start()`. + // on the remote host. This must be called only if capturer has been + // successfully started. webrtc::DesktopCaptureMetadata GetMetadata() override; #endif
diff --git a/remoting/host/linux/wayland_manager.cc b/remoting/host/linux/wayland_manager.cc new file mode 100644 index 0000000..78d0d1f --- /dev/null +++ b/remoting/host/linux/wayland_manager.cc
@@ -0,0 +1,55 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "remoting/host/linux/wayland_manager.h" + +#include "base/no_destructor.h" +#include "base/task/bind_post_task.h" +#include "base/threading/thread_task_runner_handle.h" + +namespace remoting { + +WaylandManager::WaylandManager() {} + +WaylandManager::~WaylandManager() {} + +// static +WaylandManager* WaylandManager::Get() { + static base::NoDestructor<WaylandManager> instance; + return instance.get(); +} + +void WaylandManager::Init( + scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { + ui_task_runner_ = ui_task_runner; +} + +void WaylandManager::AddCapturerMetadataCallback( + DesktopMetadataCallback callback) { + if (!ui_task_runner_->RunsTasksInCurrentSequence()) { + ui_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&WaylandManager::AddCapturerMetadataCallback, + base::Unretained(this), + base::BindPostTask(base::ThreadTaskRunnerHandle::Get(), + std::move(callback)))); + return; + } + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + capturer_metadata_callbacks_.AddUnsafe(std::move(callback)); +} + +void WaylandManager::OnDesktopCapturerMetadata( + webrtc::DesktopCaptureMetadata metadata) { + if (!ui_task_runner_->RunsTasksInCurrentSequence()) { + ui_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&WaylandManager::OnDesktopCapturerMetadata, + base::Unretained(this), std::move(metadata))); + return; + } + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + capturer_metadata_callbacks_.Notify(std::move(metadata)); +} + +} // namespace remoting
diff --git a/remoting/host/linux/wayland_manager.h b/remoting/host/linux/wayland_manager.h new file mode 100644 index 0000000..ce7759f --- /dev/null +++ b/remoting/host/linux/wayland_manager.h
@@ -0,0 +1,51 @@ +// Copyright 2022 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. + +#ifndef REMOTING_HOST_LINUX_WAYLAND_MANAGER_H_ +#define REMOTING_HOST_LINUX_WAYLAND_MANAGER_H_ + +#include "base/callback.h" +#include "base/callback_list.h" +#include "base/memory/scoped_refptr.h" +#include "base/task/single_thread_task_runner.h" +#include "third_party/webrtc/modules/desktop_capture/desktop_capture_metadata.h" + +namespace remoting { + +// Helper class that facilitates interaction of different Wayland related +// components under chromoting. +class WaylandManager { + public: + using DesktopMetadataCallbackSignature = void(webrtc::DesktopCaptureMetadata); + using DesktopMetadataCallback = + base::OnceCallback<DesktopMetadataCallbackSignature>; + + WaylandManager(); + ~WaylandManager(); + WaylandManager(const WaylandManager&) = delete; + WaylandManager& operator=(const WaylandManager&) = delete; + + static WaylandManager* Get(); + + // The singleton instance should be initialized by the host process on the + // UI thread right after creation. + void Init(scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); + + // Adds callback to be invoked when a desktop capturer has metadata available. + void AddCapturerMetadataCallback(DesktopMetadataCallback callback); + + // Invoked by the desktop capturer(s), upon successful start. + void OnDesktopCapturerMetadata(webrtc::DesktopCaptureMetadata metadata); + + private: + SEQUENCE_CHECKER(sequence_checker_); + + scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; + base::OnceCallbackList<DesktopMetadataCallbackSignature> + capturer_metadata_callbacks_ GUARDED_BY_CONTEXT(sequence_checker_); +}; + +} // namespace remoting + +#endif // REMOTING_HOST_LINUX_WAYLAND_MANAGER_H_
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index 4b1dd4f..1c37442 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc
@@ -152,6 +152,10 @@ #include "remoting/host/win/session_desktop_environment.h" #endif // BUILDFLAG(IS_WIN) +#if defined(REMOTING_USE_WAYLAND) +#include "remoting/host/linux/wayland_manager.h" +#endif // defined(REMOTING_USE_WAYLAND) + using remoting::protocol::PairingRegistry; using remoting::protocol::NetworkSettings; @@ -937,6 +941,10 @@ base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)), base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this))); +#if defined(REMOTING_USE_WAYLAND) + WaylandManager::Get()->Init(context_->ui_task_runner()); +#endif // defined(REMOTING_USE_WAYLAND + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // If an audio pipe is specific on the command-line then initialize // AudioCapturerLinux to capture from it.
diff --git a/services/network/cookie_access_delegate_impl.cc b/services/network/cookie_access_delegate_impl.cc index 35c4653..b082fa4c 100644 --- a/services/network/cookie_access_delegate_impl.cc +++ b/services/network/cookie_access_delegate_impl.cc
@@ -12,7 +12,7 @@ #include "net/base/schemeful_site.h" #include "net/cookies/cookie_constants.h" #include "net/cookies/cookie_util.h" -#include "net/cookies/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/cpp/is_potentially_trustworthy.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/services/network/cookie_access_delegate_impl.h b/services/network/cookie_access_delegate_impl.h index 3bf540d9..b59061e3 100644 --- a/services/network/cookie_access_delegate_impl.h +++ b/services/network/cookie_access_delegate_impl.h
@@ -15,7 +15,7 @@ #include "net/base/schemeful_site.h" #include "net/cookies/cookie_access_delegate.h" #include "net/cookies/cookie_constants.h" -#include "net/cookies/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/cookie_settings.h" #include "services/network/first_party_sets/first_party_sets_access_delegate.h" #include "services/network/public/mojom/cookie_manager.mojom.h"
diff --git a/services/network/cookie_access_delegate_impl_unittest.cc b/services/network/cookie_access_delegate_impl_unittest.cc index 425e4f41..b08d3f28 100644 --- a/services/network/cookie_access_delegate_impl_unittest.cc +++ b/services/network/cookie_access_delegate_impl_unittest.cc
@@ -6,8 +6,8 @@ #include "base/test/task_environment.h" #include "net/base/schemeful_site.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/first_party_sets/first_party_sets_manager.h" #include "services/network/public/mojom/cookie_manager.mojom-shared.h" #include "testing/gmock/include/gmock/gmock-matchers.h"
diff --git a/services/network/first_party_sets/first_party_sets_access_delegate.cc b/services/network/first_party_sets/first_party_sets_access_delegate.cc index 5550a2d..7dfb7dd 100644 --- a/services/network/first_party_sets/first_party_sets_access_delegate.cc +++ b/services/network/first_party_sets/first_party_sets_access_delegate.cc
@@ -11,7 +11,7 @@ #include "base/time/time.h" #include "base/types/optional_util.h" #include "net/base/schemeful_site.h" -#include "net/cookies/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_set_metadata.h" namespace network {
diff --git a/services/network/first_party_sets/first_party_sets_access_delegate.h b/services/network/first_party_sets/first_party_sets_access_delegate.h index 2fb9dfa..ece98e0 100644 --- a/services/network/first_party_sets/first_party_sets_access_delegate.h +++ b/services/network/first_party_sets/first_party_sets_access_delegate.h
@@ -15,7 +15,7 @@ #include "base/timer/elapsed_timer.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" -#include "net/cookies/first_party_sets_context_config.h" +#include "net/first_party_sets/first_party_sets_context_config.h" #include "services/network/first_party_sets/first_party_sets_manager.h" #include "services/network/public/mojom/first_party_sets_access_delegate.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/services/network/first_party_sets/first_party_sets_access_delegate_unittest.cc b/services/network/first_party_sets/first_party_sets_access_delegate_unittest.cc index ae906d7..f15a28fc 100644 --- a/services/network/first_party_sets/first_party_sets_access_delegate_unittest.cc +++ b/services/network/first_party_sets/first_party_sets_access_delegate_unittest.cc
@@ -14,9 +14,9 @@ #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" #include "net/base/schemeful_site.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/mojom/first_party_sets.mojom.h" #include "services/network/public/mojom/first_party_sets_access_delegate.mojom.h" #include "testing/gmock/include/gmock/gmock-matchers.h"
diff --git a/services/network/first_party_sets/first_party_sets_manager.cc b/services/network/first_party_sets/first_party_sets_manager.cc index 9d3af266..e0e6c1f 100644 --- a/services/network/first_party_sets/first_party_sets_manager.cc +++ b/services/network/first_party_sets/first_party_sets_manager.cc
@@ -22,9 +22,9 @@ #include "base/timer/elapsed_timer.h" #include "base/types/optional_util.h" #include "net/base/schemeful_site.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/mojom/first_party_sets.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/services/network/first_party_sets/first_party_sets_manager.h b/services/network/first_party_sets/first_party_sets_manager.h index 6486a2dc..52bfb995 100644 --- a/services/network/first_party_sets/first_party_sets_manager.h +++ b/services/network/first_party_sets/first_party_sets_manager.h
@@ -18,9 +18,9 @@ #include "base/time/time.h" #include "base/timer/elapsed_timer.h" #include "net/base/schemeful_site.h" -#include "net/cookies/first_party_set_metadata.h" -#include "net/cookies/first_party_sets_context_config.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_sets_context_config.h" #include "services/network/public/mojom/first_party_sets.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/services/network/first_party_sets/first_party_sets_manager_unittest.cc b/services/network/first_party_sets/first_party_sets_manager_unittest.cc index 4d1a5e7..2f4eda8 100644 --- a/services/network/first_party_sets/first_party_sets_manager_unittest.cc +++ b/services/network/first_party_sets/first_party_sets_manager_unittest.cc
@@ -12,9 +12,9 @@ #include "base/test/test_future.h" #include "net/base/schemeful_site.h" #include "net/cookies/cookie_constants.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/mojom/first_party_sets.mojom.h" #include "testing/gmock/include/gmock/gmock-matchers.h" #include "testing/gmock/include/gmock/gmock.h"
diff --git a/services/network/network_context.cc b/services/network/network_context.cc index f94a0b6..5c1bfe4 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc
@@ -59,10 +59,10 @@ #include "net/cert_net/cert_net_fetcher_url_request.h" #include "net/cookies/cookie_access_delegate.h" #include "net/cookies/cookie_monster.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/dns/host_cache.h" #include "net/dns/mapped_host_resolver.h" #include "net/extras/sqlite/sqlite_persistent_cookie_store.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "net/http/http_auth.h" #include "net/http/http_auth_handler_factory.h" #include "net/http/http_auth_preferences.h"
diff --git a/services/network/network_context.h b/services/network/network_context.h index 5fe6fd5..9b6e6c7d 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h
@@ -36,9 +36,9 @@ #include "net/base/network_isolation_key.h" #include "net/cert/cert_verifier.h" #include "net/cert/cert_verify_result.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/dns/host_resolver.h" #include "net/dns/public/dns_config_overrides.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "net/http/http_auth_preferences.h" #include "net/net_buildflags.h" #include "services/network/cors/preflight_controller.h"
diff --git a/services/network/public/cpp/cookie_manager_mojom_traits_unittest.cc b/services/network/public/cpp/cookie_manager_mojom_traits_unittest.cc index 0d58e5b..473317b 100644 --- a/services/network/public/cpp/cookie_manager_mojom_traits_unittest.cc +++ b/services/network/public/cpp/cookie_manager_mojom_traits_unittest.cc
@@ -10,8 +10,8 @@ #include "mojo/public/cpp/base/time_mojom_traits.h" #include "mojo/public/cpp/test_support/test_utils.h" #include "net/cookies/cookie_constants.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/cpp/cookie_manager_mojom_traits.h" #include "services/network/public/mojom/cookie_manager.mojom-shared.h" #include "services/network/public/mojom/cookie_manager.mojom.h"
diff --git a/services/network/public/cpp/first_party_sets_mojom_traits.cc b/services/network/public/cpp/first_party_sets_mojom_traits.cc index faa2da6..85a1aade 100644 --- a/services/network/public/cpp/first_party_sets_mojom_traits.cc +++ b/services/network/public/cpp/first_party_sets_mojom_traits.cc
@@ -8,9 +8,9 @@ #include "base/types/optional_util.h" #include "mojo/public/cpp/bindings/enum_traits.h" #include "net/base/schemeful_site.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/cpp/schemeful_site_mojom_traits.h" #include "services/network/public/mojom/first_party_sets.mojom-shared.h"
diff --git a/services/network/public/cpp/first_party_sets_mojom_traits.h b/services/network/public/cpp/first_party_sets_mojom_traits.h index 29bc8ed1c..b23bb9c 100644 --- a/services/network/public/cpp/first_party_sets_mojom_traits.h +++ b/services/network/public/cpp/first_party_sets_mojom_traits.h
@@ -7,9 +7,9 @@ #include "mojo/public/cpp/bindings/enum_traits.h" #include "net/base/schemeful_site.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/mojom/first_party_sets.mojom-shared.h" namespace mojo {
diff --git a/services/network/public/cpp/first_party_sets_mojom_traits_unittest.cc b/services/network/public/cpp/first_party_sets_mojom_traits_unittest.cc index 9ec543b7..867cb2f 100644 --- a/services/network/public/cpp/first_party_sets_mojom_traits_unittest.cc +++ b/services/network/public/cpp/first_party_sets_mojom_traits_unittest.cc
@@ -8,6 +8,7 @@ #include "mojo/public/cpp/test_support/test_utils.h" #include "net/base/schemeful_site.h" #include "net/first_party_sets/first_party_set_entry.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/mojom/first_party_sets.mojom.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h"
diff --git a/services/network/public/mojom/first_party_sets.mojom b/services/network/public/mojom/first_party_sets.mojom index d144aec..085385c 100644 --- a/services/network/public/mojom/first_party_sets.mojom +++ b/services/network/public/mojom/first_party_sets.mojom
@@ -41,7 +41,7 @@ }; // This struct must match the class fields defined in -// //net/cookies/first_party_set_metadata.h. +// //net/first_party_sets/first_party_set_metadata.h. struct FirstPartySetMetadata { SamePartyContext context; // absl::nullopt indicates that the frame's site is not associated with any
diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc index eb22528..39fcb4b0 100644 --- a/services/network/restricted_cookie_manager.cc +++ b/services/network/restricted_cookie_manager.cc
@@ -33,8 +33,8 @@ #include "net/cookies/cookie_partition_key.h" #include "net/cookies/cookie_store.h" #include "net/cookies/cookie_util.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/site_for_cookies.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/cookie_settings.h" #include "services/network/public/cpp/features.h" #include "services/network/public/mojom/cookie_access_observer.mojom.h"
diff --git a/services/network/restricted_cookie_manager.h b/services/network/restricted_cookie_manager.h index 158a6fc..be990aa 100644 --- a/services/network/restricted_cookie_manager.h +++ b/services/network/restricted_cookie_manager.h
@@ -22,7 +22,7 @@ #include "net/cookies/cookie_inclusion_status.h" #include "net/cookies/cookie_partition_key_collection.h" #include "net/cookies/cookie_store.h" -#include "net/cookies/first_party_set_metadata.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/public/mojom/cookie_access_observer.mojom.h" #include "services/network/public/mojom/restricted_cookie_manager.mojom.h" #include "url/gurl.h"
diff --git a/services/network/restricted_cookie_manager_unittest.cc b/services/network/restricted_cookie_manager_unittest.cc index 3a4d7ee..1b3eb4b 100644 --- a/services/network/restricted_cookie_manager_unittest.cc +++ b/services/network/restricted_cookie_manager_unittest.cc
@@ -31,10 +31,10 @@ #include "net/cookies/cookie_store.h" #include "net/cookies/cookie_store_test_callbacks.h" #include "net/cookies/cookie_util.h" -#include "net/cookies/first_party_set_metadata.h" #include "net/cookies/same_party_context.h" #include "net/cookies/site_for_cookies.h" #include "net/cookies/test_cookie_access_delegate.h" +#include "net/first_party_sets/first_party_set_metadata.h" #include "services/network/cookie_access_delegate_impl.h" #include "services/network/cookie_settings.h" #include "services/network/first_party_sets/first_party_sets_access_delegate.h"
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json index f03ca82..bc49cad 100644 --- a/testing/buildbot/chromium.mac.json +++ b/testing/buildbot/chromium.mac.json
@@ -14151,8 +14151,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14204,8 +14205,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14257,8 +14259,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14310,8 +14313,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14363,8 +14367,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14416,8 +14421,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14469,8 +14475,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14522,8 +14529,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14575,8 +14583,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14628,8 +14637,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14681,8 +14691,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14734,8 +14745,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14787,8 +14799,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14840,8 +14853,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14893,8 +14907,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14946,8 +14961,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -14999,8 +15015,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15052,8 +15069,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15106,8 +15124,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15160,8 +15179,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15214,8 +15234,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15268,8 +15289,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15322,8 +15344,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15376,8 +15399,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15430,8 +15454,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15485,8 +15510,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15540,8 +15566,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15595,8 +15622,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15650,8 +15678,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15705,8 +15734,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15760,8 +15790,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15815,8 +15846,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15870,8 +15902,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15925,8 +15958,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -15980,8 +16014,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16035,8 +16070,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16090,8 +16126,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16145,8 +16182,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16200,8 +16238,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16255,8 +16294,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16310,8 +16350,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16364,8 +16405,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16418,8 +16460,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16472,8 +16515,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16526,8 +16570,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16580,8 +16625,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16634,8 +16680,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16689,8 +16736,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16744,8 +16792,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16799,8 +16848,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16854,8 +16904,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16908,8 +16959,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -16961,8 +17013,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17014,8 +17067,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17067,8 +17121,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17121,8 +17176,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17175,8 +17231,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17229,8 +17286,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17283,8 +17341,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17337,8 +17396,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17391,8 +17451,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17444,8 +17505,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17497,8 +17559,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17551,8 +17614,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17605,8 +17669,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17659,8 +17724,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17713,8 +17779,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17767,8 +17834,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17821,8 +17889,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17875,8 +17944,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17928,8 +17998,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -17981,8 +18052,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18034,8 +18106,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18087,8 +18160,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18140,8 +18214,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18194,8 +18269,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18248,8 +18324,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18302,8 +18379,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18356,8 +18434,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18410,8 +18489,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18463,8 +18543,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18516,8 +18597,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18569,8 +18651,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18622,8 +18705,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18675,8 +18759,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18728,8 +18813,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18781,8 +18867,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18834,8 +18921,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18887,8 +18975,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18940,8 +19029,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -18993,8 +19083,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19046,8 +19137,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19099,8 +19191,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19152,8 +19245,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19205,8 +19299,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19258,8 +19353,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19311,8 +19407,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19364,8 +19461,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19417,8 +19515,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19470,8 +19569,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19523,8 +19623,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19576,8 +19677,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19629,8 +19731,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [ @@ -19682,8 +19785,9 @@ ], "dimension_sets": [ { - "cpu": "arm64", - "os": "Mac-12" + "cpu": "x86-64", + "mac_model": "Macmini8,1", + "os": "Mac-12.4" } ], "named_caches": [
diff --git a/testing/buildbot/chromium.updater.json b/testing/buildbot/chromium.updater.json index fdaa43f4..9c24b35 100644 --- a/testing/buildbot/chromium.updater.json +++ b/testing/buildbot/chromium.updater.json
@@ -736,6 +736,59 @@ } ] }, + "win11-updater-tester-dbg-uac": { + "gtest_tests": [ + { + "args": [ + "--test-launcher-timeout=90000", + "--ui-test-action-max-timeout=45000", + "--ui-test-action-timeout=40000" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "integrity": "high", + "os": "Windows-11-22000", + "pool": "chromium.win.uac" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "updater_tests_system", + "test_id_prefix": "ninja://chrome/updater:updater_tests_system/" + }, + { + "args": [ + "--test-launcher-timeout=90000", + "--ui-test-action-max-timeout=45000", + "--ui-test-action-timeout=40000" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-11-22000", + "pool": "chromium.win.uac" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "updater_tests_win_uac", + "test_id_prefix": "ninja://chrome/updater:updater_tests_win_uac/" + } + ] + }, "win7(32)-updater-tester-rel": { "gtest_tests": [ {
diff --git a/testing/buildbot/filters/fuchsia.unit_tests.filter b/testing/buildbot/filters/fuchsia.unit_tests.filter index 3693cf2..7ca6552 100644 --- a/testing/buildbot/filters/fuchsia.unit_tests.filter +++ b/testing/buildbot/filters/fuchsia.unit_tests.filter
@@ -5,6 +5,7 @@ -DiagnosticsModelTest.Run* -DialServiceImplTest.TestMultiple* -DialServiceImplTest.TestSend* +-DownloadItemModelTest.GetBubbleStatusMessageWithBytes -EnterpriseHardwarePlatformAPITest.GetHardwarePlatformInfoAllowed -ExtensionInstalledBubbleModelTest.Extension* -ExtensionServiceTest.InstallTheme @@ -28,6 +29,12 @@ -ToolbarActionViewUnitTest.Basic* -UDPSocketUnitTest.TestUDPMulticastJoin* -UDPSocketUnitTest.TestUDPMulticastRecv +-UserNoteUICoordinatorTest.AddNoteEndUserSidePanel +-UserNoteUICoordinatorTest.AddNoteMiddleUserSidePanel +-UserNoteUICoordinatorTest.PopulateUserNoteSidePanel +-UserNoteUICoordinatorTest.RemoveAllNoteUserSidePanel +-UserNoteUICoordinatorTest.RemoveEndUserSidePanel +-UserNoteUICoordinatorTest.RemoveMiddleUserSidePanel # https://crbug.com/851641 -DevToolsFileWatcher*
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index cf1d296a..c5f82907 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -5207,7 +5207,7 @@ 'mixins': [ 'has_native_resultdb_integration', 'isolate_profile_data', - 'mac_12_arm64', + 'mac_12_t2_x64', 'mac_toolchain', 'out_dir_arg', 'xcode_14_main', @@ -6043,6 +6043,22 @@ ] }, }, + 'win11-updater-tester-dbg-uac': { + 'mixins': [ + 'win11', + 'x86-64', + ], + 'test_suites': { + 'gtest_tests': 'updater_gtests_win_uac', + }, + 'swarming': { + 'dimension_sets': [ + { + 'pool': 'chromium.win.uac', + } + ] + }, + }, 'win7(32)-updater-tester-rel': { 'mixins': [ 'win7',
diff --git a/testing/merge_scripts/code_coverage/merge_lib.py b/testing/merge_scripts/code_coverage/merge_lib.py index d95fc3f..6d19fba8 100644 --- a/testing/merge_scripts/code_coverage/merge_lib.py +++ b/testing/merge_scripts/code_coverage/merge_lib.py
@@ -98,7 +98,7 @@ Doc: https://llvm.org/docs/CommandGuide/llvm-profdata.html#profdata-merge Returns: - A tulple: + A tuple: A list of converted .profdata files of *valid* profraw files. A list of *invalid* profraw files. A list of profraw files that have counter overflows. @@ -118,15 +118,19 @@ invalid_profraw_files = multiprocessing.Manager().list() counter_overflows = multiprocessing.Manager().list() + results = [] for profraw_file in profraw_files: - pool.apply_async( - _validate_and_convert_profraw, - (profraw_file, output_profdata_files, invalid_profraw_files, - counter_overflows, profdata_tool_path, sparse)) + results.append(pool.apply_async( + _validate_and_convert_profraw, + (profraw_file, output_profdata_files, invalid_profraw_files, + counter_overflows, profdata_tool_path, sparse))) pool.close() pool.join() + for x in results: + x.get() + # Remove inputs, as they won't be needed and they can be pretty large. for input_file in profraw_files: os.remove(input_file) @@ -161,7 +165,7 @@ # writes the error output to stderr and our error handling logic relies on # that output. validation_output = subprocess.check_output( - subprocess_cmd, stderr=subprocess.STDOUT) + subprocess_cmd, stderr=subprocess.STDOUT, encoding = 'UTF-8') if 'Counter overflow' in validation_output: counter_overflow = True else:
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index a8b09ad..71ef08f 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -8228,6 +8228,7 @@ "android_webview", "chromeos", "chromeos_lacros", + "ios", "linux", "mac", "windows"
diff --git a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom index 4538070..f7cc256c 100644 --- a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom +++ b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
@@ -3667,6 +3667,8 @@ kV8TurboFanOsrCompileStarted = 4346, kV8Document_HasRedemptionRecord_Method = 4347, kDeferredShaping2ReshapedByLastResort = 4348, + kAudioContextSinkId = 4349, + kAudioContextSetSinkId = 4350, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/renderer/core/events/event_type_names.json5 b/third_party/blink/renderer/core/events/event_type_names.json5 index d1c665b..13a9968 100644 --- a/third_party/blink/renderer/core/events/event_type_names.json5 +++ b/third_party/blink/renderer/core/events/event_type_names.json5
@@ -276,6 +276,7 @@ "shippingoptionchange", "show", "signalingstatechange", + "sinkchange", "slotchange", "soundend", "soundstart",
diff --git a/third_party/blink/renderer/core/fragment_directive/text_fragment_handler_test.cc b/third_party/blink/renderer/core/fragment_directive/text_fragment_handler_test.cc index 1d16f2c..b0a0c378 100644 --- a/third_party/blink/renderer/core/fragment_directive/text_fragment_handler_test.cc +++ b/third_party/blink/renderer/core/fragment_directive/text_fragment_handler_test.cc
@@ -433,11 +433,11 @@ GetDocument().GetFrame()->View()->FrameToViewport(rect); // ExtractFirstTextFragmentsRect should return the first matched scaled // viewport relative location since the page is loaded zoomed in 4X - ASSERT_EQ(expected_rect.ToString(), "432,296 360x44"); + ASSERT_EQ(gfx::Rect(432, 300, 360, 40), expected_rect); gfx::Rect text_fragment_rect = ExtractFirstTextFragmentsRect(); - EXPECT_EQ(expected_rect.ToString(), text_fragment_rect.ToString()); + EXPECT_EQ(expected_rect, text_fragment_rect); } TEST_F(TextFragmentHandlerTest, ExtractFirstTextFragmentRectMultipleHighlight) {
diff --git a/third_party/blink/renderer/core/frame/visual_viewport.cc b/third_party/blink/renderer/core/frame/visual_viewport.cc index 34ed2aa..b336aa6c 100644 --- a/third_party/blink/renderer/core/frame/visual_viewport.cc +++ b/third_party/blink/renderer/core/frame/visual_viewport.cc
@@ -79,6 +79,23 @@ namespace blink { +namespace { + +OverscrollType ComputeOverscrollType() { + if (!Platform::Current()->IsElasticOverscrollEnabled()) + return OverscrollType::kNone; +#if BUILDFLAG(IS_ANDROID) + if (base::GetFieldTrialParamValueByFeature( + ::features::kElasticOverscroll, ::features::kElasticOverscrollType) == + ::features::kElasticOverscrollTypeFilter) { + return OverscrollType::kFilter; + } +#endif + return OverscrollType::kTransform; +} + +} // anonymous namespace + VisualViewport::VisualViewport(Page& owner) : ScrollableArea(owner.GetAgentGroupScheduler().CompositorTaskRunner()), page_(&owner), @@ -88,7 +105,8 @@ browser_controls_adjustment_(0), max_page_scale_(-1), track_pinch_zoom_stats_for_page_(false), - needs_paint_property_update_(true) { + needs_paint_property_update_(true), + overscroll_type_(ComputeOverscrollType()) { UniqueObjectId unique_id = NewUniqueObjectId(); page_scale_element_id_ = CompositorElementIdFromUniqueObjectId( unique_id, CompositorElementIdNamespace::kPrimary); @@ -99,33 +117,45 @@ Reset(); } -TransformPaintPropertyNode* VisualViewport::GetDeviceEmulationTransformNode() - const { +const TransformPaintPropertyNode* +VisualViewport::GetDeviceEmulationTransformNode() const { return device_emulation_transform_node_.get(); } -TransformPaintPropertyNode* +const TransformPaintPropertyNode* VisualViewport::GetOverscrollElasticityTransformNode() const { return overscroll_elasticity_transform_node_.get(); } -EffectPaintPropertyNode* VisualViewport::GetOverscrollElasticityEffectNode() - const { +const EffectPaintPropertyNode* +VisualViewport::GetOverscrollElasticityEffectNode() const { return overscroll_elasticity_effect_node_.get(); } -TransformPaintPropertyNode* VisualViewport::GetPageScaleNode() const { +const TransformPaintPropertyNode* VisualViewport::GetPageScaleNode() const { return page_scale_node_.get(); } -TransformPaintPropertyNode* VisualViewport::GetScrollTranslationNode() const { +const TransformPaintPropertyNode* VisualViewport::GetScrollTranslationNode() + const { return scroll_translation_node_.get(); } -ScrollPaintPropertyNode* VisualViewport::GetScrollNode() const { +const ScrollPaintPropertyNode* VisualViewport::GetScrollNode() const { return scroll_node_.get(); } +const TransformPaintPropertyNode* +VisualViewport::TransformNodeForViewportScrollbars() const { + // Viewport scrollbars don't move with elastic overscroll or scale with + // page scale. + if (overscroll_elasticity_transform_node_) + return overscroll_elasticity_transform_node_->UnaliasedParent(); + if (page_scale_node_) + return page_scale_node_->UnaliasedParent(); + return nullptr; +} + PaintPropertyChangeType VisualViewport::UpdatePaintPropertyNodesIfNeeded( PaintPropertyTreeBuilderFragmentContext& context) { DCHECK(IsActiveViewport()); @@ -170,7 +200,7 @@ } } - { + if (overscroll_type_ == OverscrollType::kTransform) { DCHECK(!transform_parent->Unalias().IsInSubtreeOfPageScale()); TransformPaintPropertyNode::State state; @@ -186,9 +216,16 @@ change = std::max(change, overscroll_elasticity_transform_node_->Update( *transform_parent, std::move(state))); } + } else { + DCHECK(!overscroll_elasticity_transform_node_); } { + auto* parent = overscroll_elasticity_transform_node_ + ? overscroll_elasticity_transform_node_.get() + : transform_parent; + DCHECK(!parent->Unalias().IsInSubtreeOfPageScale()); + TransformPaintPropertyNode::State state; if (scale_ != 1.f) state.transform_and_origin = {TransformationMatrix().Scale(scale_)}; @@ -197,12 +234,12 @@ state.compositor_element_id = page_scale_element_id_; if (!page_scale_node_) { - page_scale_node_ = TransformPaintPropertyNode::Create( - *overscroll_elasticity_transform_node_.get(), std::move(state)); + page_scale_node_ = + TransformPaintPropertyNode::Create(*parent, std::move(state)); change = PaintPropertyChangeType::kNodeAddedOrRemoved; } else { - auto effective_change_type = page_scale_node_->Update( - *overscroll_elasticity_transform_node_.get(), std::move(state)); + auto effective_change_type = + page_scale_node_->Update(*parent, std::move(state)); // As an optimization, attempt to directly update the compositor // scale translation node and return kChangedOnlyCompositedValues which // avoids an expensive PaintArtifactCompositor update. @@ -302,10 +339,7 @@ } #if BUILDFLAG(IS_ANDROID) - if (Platform::Current()->IsElasticOverscrollEnabled() && - base::GetFieldTrialParamValueByFeature( - ::features::kElasticOverscroll, ::features::kElasticOverscrollType) == - ::features::kElasticOverscrollTypeFilter) { + if (overscroll_type_ == OverscrollType::kFilter) { bool needs_overscroll_effect_node = !MaximumScrollOffset().IsZero(); if (needs_overscroll_effect_node && !overscroll_elasticity_effect_node_) { EffectPaintPropertyNode::State state;
diff --git a/third_party/blink/renderer/core/frame/visual_viewport.h b/third_party/blink/renderer/core/frame/visual_viewport.h index 49ef3647..06950ba 100644 --- a/third_party/blink/renderer/core/frame/visual_viewport.h +++ b/third_party/blink/renderer/core/frame/visual_viewport.h
@@ -55,6 +55,7 @@ } namespace blink { + enum class PaintPropertyChangeType : unsigned char; class EffectPaintPropertyNode; class GraphicsContext; @@ -67,6 +68,8 @@ class TransformPaintPropertyNode; struct PaintPropertyTreeBuilderFragmentContext; +enum class OverscrollType { kNone, kTransform, kFilter }; + // Represents the visual viewport the user is currently seeing the page through. // This class corresponds to the InnerViewport on the compositor. It is a // ScrollableArea; it's offset is set through the GraphicsLayer <-> CC sync @@ -267,12 +270,15 @@ // for viewing websites that are not optimized for mobile devices. bool ShouldDisableDesktopWorkarounds() const; - TransformPaintPropertyNode* GetDeviceEmulationTransformNode() const; - TransformPaintPropertyNode* GetOverscrollElasticityTransformNode() const; - EffectPaintPropertyNode* GetOverscrollElasticityEffectNode() const; - TransformPaintPropertyNode* GetPageScaleNode() const; - TransformPaintPropertyNode* GetScrollTranslationNode() const; - ScrollPaintPropertyNode* GetScrollNode() const; + const TransformPaintPropertyNode* GetDeviceEmulationTransformNode() const; + const TransformPaintPropertyNode* GetOverscrollElasticityTransformNode() + const; + const EffectPaintPropertyNode* GetOverscrollElasticityEffectNode() const; + const TransformPaintPropertyNode* GetPageScaleNode() const; + const TransformPaintPropertyNode* GetScrollTranslationNode() const; + const ScrollPaintPropertyNode* GetScrollNode() const; + + const TransformPaintPropertyNode* TransformNodeForViewportScrollbars() const; // Create/update the page scale translation, viewport scroll, and viewport // translation property nodes. Returns the maximum paint property change @@ -305,6 +311,12 @@ // viewport. bool IsActiveViewport() const; + OverscrollType GetOverscrollType() const { return overscroll_type_; } + void SetOverscrollTypeForTesting(OverscrollType type) { + overscroll_type_ = type; + SetNeedsPaintPropertyUpdate(); + } + private: bool DidSetScaleOrLocation(float scale, bool is_pinch_gesture_active, @@ -393,6 +405,8 @@ CompositorElementId elasticity_effect_node_id_; bool needs_paint_property_update_; + + OverscrollType overscroll_type_; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/visual_viewport_test.cc b/third_party/blink/renderer/core/frame/visual_viewport_test.cc index 69081a7..62abcf9d 100644 --- a/third_party/blink/renderer/core/frame/visual_viewport_test.cc +++ b/third_party/blink/renderer/core/frame/visual_viewport_test.cc
@@ -2314,6 +2314,19 @@ UpdateAllLifecyclePhases(); VisualViewport& visual_viewport = GetFrame()->GetPage()->GetVisualViewport(); + EXPECT_EQ(visual_viewport.GetOverscrollType() == OverscrollType::kTransform, + !!visual_viewport.GetOverscrollElasticityTransformNode()); + + visual_viewport.SetOverscrollTypeForTesting(OverscrollType::kNone); + UpdateAllLifecyclePhases(); + EXPECT_FALSE(visual_viewport.GetOverscrollElasticityTransformNode()); + + visual_viewport.SetOverscrollTypeForTesting(OverscrollType::kFilter); + UpdateAllLifecyclePhases(); + EXPECT_FALSE(visual_viewport.GetOverscrollElasticityTransformNode()); + + visual_viewport.SetOverscrollTypeForTesting(OverscrollType::kTransform); + UpdateAllLifecyclePhases(); EXPECT_TRUE(visual_viewport.GetOverscrollElasticityTransformNode()); }
diff --git a/third_party/blink/renderer/core/layout/layout_box.cc b/third_party/blink/renderer/core/layout/layout_box.cc index 072eba4..cecbfcc 100644 --- a/third_party/blink/renderer/core/layout/layout_box.cc +++ b/third_party/blink/renderer/core/layout/layout_box.cc
@@ -8079,8 +8079,17 @@ return paint_location; } -bool LayoutBox::IsFixedToView() const { - return IsFixedPositioned() && Container() == View(); +bool LayoutBox::IsFixedToView( + const LayoutObject* container_for_fixed_position) const { + if (!IsFixedPositioned()) + return false; + + const auto* container = container_for_fixed_position; + if (!container) + container = Container(); + else + DCHECK_EQ(container, Container()); + return container->IsLayoutView(); } PhysicalRect LayoutBox::ComputeStickyConstrainingRect() const {
diff --git a/third_party/blink/renderer/core/layout/layout_box.h b/third_party/blink/renderer/core/layout/layout_box.h index 4113811..c4186f9 100644 --- a/third_party/blink/renderer/core/layout/layout_box.h +++ b/third_party/blink/renderer/core/layout/layout_box.h
@@ -2113,8 +2113,10 @@ } // Returns true if this box is fixed position and will not move with - // scrolling. - bool IsFixedToView() const; + // scrolling. If the caller can pre-calculate |container_for_fixed_position|, + // it should pass it to avoid recalculation. + bool IsFixedToView( + const LayoutObject* container_for_fixed_position = nullptr) const; // Returns true if the overflow property should be respected. Otherwise // HasNonVisibleOverflow() will be false and we won't create scrollable area
diff --git a/third_party/blink/renderer/core/layout/ng/ng_anchor_query.cc b/third_party/blink/renderer/core/layout/ng/ng_anchor_query.cc index ebc56c1..3af94b2 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_anchor_query.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_anchor_query.cc
@@ -344,18 +344,24 @@ const AtomicString& anchor_name, AnchorValue anchor_value) const { has_anchor_functions_ = true; - return anchor_query_.EvaluateAnchor( - anchor_name, anchor_value, available_size_, container_converter_, - offset_to_padding_box_, is_y_axis_, is_right_or_bottom_); + if (anchor_query_) { + return anchor_query_->EvaluateAnchor( + anchor_name, anchor_value, available_size_, container_converter_, + offset_to_padding_box_, is_y_axis_, is_right_or_bottom_); + } + return absl::nullopt; } absl::optional<LayoutUnit> NGAnchorEvaluatorImpl::EvaluateAnchorSize( const AtomicString& anchor_name, AnchorSizeValue anchor_size_value) const { has_anchor_functions_ = true; - return anchor_query_.EvaluateSize(anchor_name, anchor_size_value, - container_converter_.GetWritingMode(), - self_writing_mode_); + if (anchor_query_) { + return anchor_query_->EvaluateSize(anchor_name, anchor_size_value, + container_converter_.GetWritingMode(), + self_writing_mode_); + } + return absl::nullopt; } void NGLogicalAnchorReference::Trace(Visitor* visitor) const { @@ -367,6 +373,10 @@ visitor->Trace(fragment); } +void NGLogicalAnchorQuery::Trace(Visitor* visitor) const { + visitor->Trace(anchor_references_); +} + void NGPhysicalAnchorQuery::Trace(Visitor* visitor) const { visitor->Trace(anchor_references_); }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_anchor_query.h b/third_party/blink/renderer/core/layout/ng/ng_anchor_query.h index 4f62119f..b4244ed 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_anchor_query.h +++ b/third_party/blink/renderer/core/layout/ng/ng_anchor_query.h
@@ -11,6 +11,7 @@ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/layout/geometry/logical_rect.h" #include "third_party/blink/renderer/core/layout/geometry/physical_rect.h" +#include "third_party/blink/renderer/core/layout/geometry/writing_mode_converter.h" #include "third_party/blink/renderer/platform/geometry/anchor_query_enums.h" #include "third_party/blink/renderer/platform/geometry/length.h" #include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h" @@ -21,7 +22,6 @@ class NGLogicalAnchorQuery; class NGPhysicalFragment; -class WritingModeConverter; struct NGLogicalAnchorReference; struct NGLogicalLink; @@ -87,9 +87,8 @@ bool is_invalid = false; }; -class CORE_EXPORT NGLogicalAnchorQuery { - STACK_ALLOCATED(); - +class CORE_EXPORT NGLogicalAnchorQuery + : public GarbageCollected<NGLogicalAnchorQuery> { public: bool IsEmpty() const { return anchor_references_.IsEmpty(); } @@ -123,6 +122,8 @@ WritingMode container_writing_mode, WritingMode self_writing_mode) const; + void Trace(Visitor* visitor) const; + private: friend class NGPhysicalAnchorQuery; @@ -136,11 +137,15 @@ STACK_ALLOCATED(); public: + // An empty evaluator that always return `nullopt`. This instance can still + // compute `HasAnchorFunctions()`. + NGAnchorEvaluatorImpl() = default; + NGAnchorEvaluatorImpl(const NGLogicalAnchorQuery& anchor_query, const WritingModeConverter& container_converter, const PhysicalOffset& offset_to_padding_box, WritingMode self_writing_mode) - : anchor_query_(anchor_query), + : anchor_query_(&anchor_query), container_converter_(container_converter), offset_to_padding_box_(offset_to_padding_box), self_writing_mode_(self_writing_mode) {} @@ -166,8 +171,9 @@ AnchorSizeValue anchor_size_value) const override; private: - const NGLogicalAnchorQuery& anchor_query_; - const WritingModeConverter& container_converter_; + const NGLogicalAnchorQuery* anchor_query_ = nullptr; + const WritingModeConverter container_converter_{ + {WritingMode::kHorizontalTb, TextDirection::kLtr}}; PhysicalOffset offset_to_padding_box_; WritingMode self_writing_mode_; LayoutUnit available_size_;
diff --git a/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.cc b/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.cc index 1ebb761..a13af70 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.cc
@@ -34,6 +34,12 @@ children_[index] = NGLogicalLink{std::move(&new_child), offset}; } +NGLogicalAnchorQuery& NGContainerFragmentBuilder::EnsureAnchorQuery() { + if (!anchor_query_) + anchor_query_ = MakeGarbageCollected<NGLogicalAnchorQuery>(); + return *anchor_query_; +} + void NGContainerFragmentBuilder::PropagateChildAnchors( const NGPhysicalFragment& child, const LogicalOffset& child_offset) { @@ -43,16 +49,17 @@ if (const AtomicString& anchor_name = child.Style().AnchorName(); !anchor_name.IsNull()) { DCHECK(RuntimeEnabledFeatures::CSSAnchorPositioningEnabled()); - anchor_query_.Set(anchor_name, child, - LogicalRect{child_offset, child.Size().ConvertToLogical( - GetWritingMode())}); + EnsureAnchorQuery().Set( + anchor_name, child, + LogicalRect{child_offset, + child.Size().ConvertToLogical(GetWritingMode())}); } } // Propagate any descendants' anchor references. if (const NGPhysicalAnchorQuery* anchor_query = child.AnchorQuery()) { const WritingModeConverter converter(GetWritingDirection(), child.Size()); - anchor_query_.SetFromPhysical( + EnsureAnchorQuery().SetFromPhysical( *anchor_query, converter, child_offset, /* is_invalid */ child.IsOutOfFlowPositioned()); }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.h b/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.h index 6630478a..8f94b0e 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.h +++ b/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.h
@@ -358,7 +358,7 @@ const NGConstraintSpace& ConstraintSpace() const { return space_; } - const NGLogicalAnchorQuery& AnchorQuery() const { return anchor_query_; } + const NGLogicalAnchorQuery* AnchorQuery() const { return anchor_query_; } const NGLayoutResult* Abort(NGLayoutResult::EStatus); @@ -371,6 +371,8 @@ friend class NGLayoutResult; friend class NGPhysicalFragment; + NGLogicalAnchorQuery& EnsureAnchorQuery(); + NGContainerFragmentBuilder(NGLayoutInputNode node, scoped_refptr<const ComputedStyle> style, const NGConstraintSpace& space, @@ -413,7 +415,7 @@ HeapVector<NGLogicalOOFNodeForFragmentation> oof_positioned_fragmentainer_descendants_; HeapVector<NGLogicalOutOfFlowPositionedNode> oof_positioned_descendants_; - NGLogicalAnchorQuery anchor_query_; + NGLogicalAnchorQuery* anchor_query_ = nullptr; MulticolCollection multicols_with_pending_oofs_;
diff --git a/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc b/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc index 82bd941d7ee..0c8975d 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc
@@ -1464,12 +1464,15 @@ *stitched_anchor_query, container_converter, container_converter.ToPhysical(node_info.container_info.rect).offset, candidate_writing_direction.GetWritingMode()); - } else { + } else if (const NGLogicalAnchorQuery* anchor_query = + container_builder_->AnchorQuery()) { // Otherwise the |container_builder_| is the containing block. anchor_evaluator_storage.emplace( - container_builder_->AnchorQuery(), container_converter, + *anchor_query, container_converter, container_converter.ToPhysical(node_info.container_info.rect).offset, candidate_writing_direction.GetWritingMode()); + } else { + anchor_evaluator_storage.emplace(); } NGAnchorEvaluatorImpl* anchor_evaluator = &*anchor_evaluator_storage;
diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc index 78e4970..3dbd011 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc
@@ -366,7 +366,7 @@ builder->HasOutOfFlowInFragmentainerSubtree()), break_token_(std::move(builder->break_token_)), oof_data_(builder->oof_positioned_descendants_.IsEmpty() && - builder->anchor_query_.IsEmpty() && + !builder->AnchorQuery() && !has_fragmented_out_of_flow_data_ ? nullptr : OutOfFlowDataFromBuilder(builder)) { @@ -405,12 +405,11 @@ } } - if (!builder->anchor_query_.IsEmpty()) { + if (const NGLogicalAnchorQuery* anchor_query = builder->AnchorQuery()) { DCHECK(RuntimeEnabledFeatures::CSSAnchorPositioningEnabled()); if (!oof_data) oof_data = MakeGarbageCollected<OutOfFlowData>(); - - oof_data->anchor_query.SetFromLogical(builder->anchor_query_, converter); + oof_data->anchor_query.SetFromLogical(*anchor_query, converter); } return oof_data;
diff --git a/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.cc b/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.cc index 37e59b4..c651dd4d 100644 --- a/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.cc +++ b/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.cc
@@ -12,6 +12,7 @@ #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/settings.h" +#include "third_party/blink/renderer/core/frame/visual_viewport.h" #include "third_party/blink/renderer/core/fullscreen/fullscreen.h" #include "third_party/blink/renderer/core/html/html_body_element.h" #include "third_party/blink/renderer/core/layout/layout_embedded_content.h" @@ -26,8 +27,9 @@ namespace blink { -static bool ShouldPreferCompositingForLayoutView( - const LayoutView& layout_view) { +namespace { + +bool ShouldPreferCompositingForLayoutView(const LayoutView& layout_view) { auto has_direct_compositing_reasons = [](const LayoutObject* object) -> bool { return object && CompositingReasonFinder:: @@ -48,7 +50,7 @@ return false; } -static CompositingReasons BackfaceInvisibility3DAncestorReason( +CompositingReasons BackfaceInvisibility3DAncestorReason( const PaintLayer& layer) { if (RuntimeEnabledFeatures::BackfaceVisibilityInteropEnabled()) { if (auto* compositing_container = layer.CompositingContainer()) { @@ -61,8 +63,7 @@ return CompositingReason::kNone; } -static CompositingReasons CompositingReasonsForWillChange( - const ComputedStyle& style) { +CompositingReasons CompositingReasonsForWillChange(const ComputedStyle& style) { CompositingReasons reasons = CompositingReason::kNone; if (style.SubtreeWillChangeContents()) return reasons; @@ -91,7 +92,7 @@ return reasons; } -static CompositingReasons CompositingReasonsFor3DTransform( +CompositingReasons CompositingReasonsFor3DTransform( const LayoutObject& layout_object) { // Note that we ask the layoutObject if it has a transform, because the style // may have transforms, but the layoutObject may be an inline that doesn't @@ -130,7 +131,7 @@ return reasons; } -static CompositingReasons CompositingReasonsFor3DSceneLeaf( +CompositingReasons CompositingReasonsFor3DSceneLeaf( const LayoutObject& layout_object) { // An effect node (and, eventually, a render pass created due to // cc::RenderSurfaceReason::k3dTransformFlattening) is required for an @@ -165,7 +166,7 @@ return CompositingReason::kNone; } -static CompositingReasons DirectReasonsForSVGChildPaintProperties( +CompositingReasons DirectReasonsForSVGChildPaintProperties( const LayoutObject& object) { DCHECK(object.IsSVGChild()); if (object.IsText()) @@ -189,38 +190,40 @@ return reasons; } -static CompositingReasons CompositingReasonsForViewportScrollEffect( - const LayoutObject& layout_object) { +CompositingReasons CompositingReasonsForViewportScrollEffect( + const LayoutObject& layout_object, + const LayoutObject* container_for_fixed_position) { if (!layout_object.IsBox()) return CompositingReason::kNone; // The viewport scroll effect should never apply to objects inside an // embedded frame tree. - if (!layout_object.GetFrame()->Tree().Top().IsOutermostMainFrame()) + const LocalFrame* frame = layout_object.GetFrame(); + if (!frame->Tree().Top().IsOutermostMainFrame()) return CompositingReason::kNone; - DCHECK_EQ(layout_object.GetFrame()->IsMainFrame(), - layout_object.GetFrame()->IsOutermostMainFrame()); + DCHECK_EQ(frame->IsMainFrame(), frame->IsOutermostMainFrame()); // Objects inside an iframe that's the root scroller should get the same // "pushed by top controls" behavior as for the main frame. - auto& controller = - layout_object.GetFrame()->GetPage()->GlobalRootScrollerController(); - if (!layout_object.GetFrame()->IsMainFrame() && - layout_object.GetFrame()->GetDocument() != - controller.GlobalRootScroller()) + auto& controller = frame->GetPage()->GlobalRootScrollerController(); + if (!frame->IsMainFrame() && + frame->GetDocument() != controller.GlobalRootScroller()) { return CompositingReason::kNone; + } - if (!To<LayoutBox>(layout_object).IsFixedToView()) + if (!To<LayoutBox>(layout_object).IsFixedToView(container_for_fixed_position)) return CompositingReason::kNone; CompositingReasons reasons = CompositingReason::kNone; // This ensures that the scroll_translation_for_fixed will be initialized in // FragmentPaintPropertyTreeBuilder::UpdatePaintOffsetTranslation which in // turn ensures that a TransformNode is created (for fixed elements) in cc. - if (RuntimeEnabledFeatures::FixedElementsDontOverscrollEnabled()) { + if (RuntimeEnabledFeatures::FixedElementsDontOverscrollEnabled() && + frame->GetPage()->GetVisualViewport().GetOverscrollType() == + OverscrollType::kTransform) { reasons |= - CompositingReason::kFixedPosition | CompositingReason::kFixedToViewport; + CompositingReason::kFixedPosition | CompositingReason::kUndoOverscroll; } if (layout_object.StyleRef().IsFixedToBottom()) { @@ -231,9 +234,59 @@ return reasons; } +CompositingReasons CompositingReasonsForScrollDependentPosition( + const PaintLayer& layer, + const LayoutObject* container_for_fixed_position) { + CompositingReasons reasons = CompositingReason::kNone; + // Don't promote fixed position elements that are descendants of a non-view + // container, e.g. transformed elements. They will stay fixed wrt the + // container rather than the enclosing frame. + if (const auto* box = layer.GetLayoutBox()) { + if (box->IsFixedToView(container_for_fixed_position)) { + // We check for |HasOverflow| instead of |ScrollsOverflow| to ensure fixed + // position elements are composited under overflow: hidden, which can + // still have smooth scroll animations. + LocalFrameView* frame_view = layer.GetLayoutObject().GetFrameView(); + if (frame_view->LayoutViewport()->HasOverflow()) + reasons |= CompositingReason::kFixedPosition; + } + + if (box->AnchorScrollContainer()) + reasons |= CompositingReason::kAnchorScroll; + } + + // Don't promote sticky position elements that cannot move with scrolls. + // We check for |HasOverflow| instead of |ScrollsOverflow| to ensure sticky + // position elements are composited under overflow: hidden, which can still + // have smooth scroll animations. + if (const auto* constraints = layer.GetLayoutObject().StickyConstraints()) { + if (!constraints->is_fixed_to_view && + constraints->containing_scroll_container_layer->GetScrollableArea() + ->HasOverflow()) + reasons |= CompositingReason::kStickyPosition; + } + + return reasons; +} + +bool ObjectTypeSupportsCompositedTransformAnimation( + const LayoutObject& object) { + if (object.IsSVGChild()) { + // Transforms are not supported on hidden containers, inlines, text, or + // filter primitives. + return !object.IsSVGHiddenContainer() && !object.IsLayoutInline() && + !object.IsText() && !object.IsSVGFilterPrimitive(); + } + // Transforms don't apply on non-replaced inline elements. + return object.IsBox(); +} + +} // anonymous namespace + CompositingReasons CompositingReasonFinder::DirectReasonsForPaintPropertiesExceptScrolling( - const LayoutObject& object) { + const LayoutObject& object, + const LayoutObject* container_for_fixed_position) { if (object.GetDocument().Printing()) return CompositingReason::kNone; @@ -271,9 +324,11 @@ if (RequiresCompositingForRootScroller(*layer)) reasons |= CompositingReason::kRootScroller; - reasons |= CompositingReasonsForScrollDependentPosition(*layer); + reasons |= CompositingReasonsForScrollDependentPosition( + *layer, container_for_fixed_position); - reasons |= CompositingReasonsForViewportScrollEffect(object); + reasons |= CompositingReasonsForViewportScrollEffect( + object, container_for_fixed_position); if (style.HasBackdropFilter()) reasons |= CompositingReason::kBackdropFilter; @@ -379,18 +434,6 @@ return reasons; } -static bool ObjectTypeSupportsCompositedTransformAnimation( - const LayoutObject& object) { - if (object.IsSVGChild()) { - // Transforms are not supported on hidden containers, inlines, text, or - // filter primitives. - return !object.IsSVGHiddenContainer() && !object.IsLayoutInline() && - !object.IsText() && !object.IsSVGFilterPrimitive(); - } - // Transforms don't apply on non-replaced inline elements. - return object.IsBox(); -} - CompositingReasons CompositingReasonFinder::CompositingReasonsForAnimation( const LayoutObject& object) { CompositingReasons reasons = CompositingReason::kNone; @@ -432,39 +475,4 @@ return layer.GetLayoutObject().IsGlobalRootScroller(); } -CompositingReasons -CompositingReasonFinder::CompositingReasonsForScrollDependentPosition( - const PaintLayer& layer) { - CompositingReasons reasons = CompositingReason::kNone; - // Don't promote fixed position elements that are descendants of a non-view - // container, e.g. transformed elements. They will stay fixed wrt the - // container rather than the enclosing frame. - if (const auto* box = layer.GetLayoutBox()) { - if (box->IsFixedToView()) { - // We check for |HasOverflow| instead of |ScrollsOverflow| to ensure fixed - // position elements are composited under overflow: hidden, which can - // still have smooth scroll animations. - LocalFrameView* frame_view = layer.GetLayoutObject().GetFrameView(); - if (frame_view->LayoutViewport()->HasOverflow()) - reasons |= CompositingReason::kFixedPosition; - } - - if (box->AnchorScrollContainer()) - reasons |= CompositingReason::kAnchorScroll; - } - - // Don't promote sticky position elements that cannot move with scrolls. - // We check for |HasOverflow| instead of |ScrollsOverflow| to ensure sticky - // position elements are composited under overflow: hidden, which can still - // have smooth scroll animations. - if (const auto* constraints = layer.GetLayoutObject().StickyConstraints()) { - if (!constraints->is_fixed_to_view && - constraints->containing_scroll_container_layer->GetScrollableArea() - ->HasOverflow()) - reasons |= CompositingReason::kStickyPosition; - } - - return reasons; -} - } // namespace blink
diff --git a/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.h b/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.h index 94e4333c..c5e3135 100644 --- a/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.h +++ b/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder.h
@@ -26,7 +26,8 @@ // PaintLayerScrollableArea needs the result of this function to determine // composited scrolling status. static CompositingReasons DirectReasonsForPaintPropertiesExceptScrolling( - const LayoutObject&); + const LayoutObject&, + const LayoutObject* container_for_fixed_position = nullptr); static bool ShouldForcePreferCompositingToLCDText( const LayoutObject&, @@ -46,9 +47,6 @@ static CompositingReasons PotentialCompositingReasonsFor3DTransform( const ComputedStyle&); static bool RequiresCompositingForRootScroller(const PaintLayer&); - - static CompositingReasons CompositingReasonsForScrollDependentPosition( - const PaintLayer&); }; } // namespace blink
diff --git a/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder_test.cc b/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder_test.cc index 32ffd402..37a8edc 100644 --- a/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder_test.cc +++ b/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder_test.cc
@@ -8,6 +8,7 @@ #include "third_party/blink/public/common/features.h" #include "third_party/blink/renderer/core/css/resolver/style_resolver.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" +#include "third_party/blink/renderer/core/frame/visual_viewport.h" #include "third_party/blink/renderer/core/html/html_frame_owner_element.h" #include "third_party/blink/renderer/core/layout/layout_block.h" #include "third_party/blink/renderer/core/paint/paint_layer.h" @@ -92,7 +93,7 @@ DirectReasonsForPaintProperties(*GetLayoutObjectByElementId("target"))); } -TEST_P(CompositingReasonFinderTest, FixedElementShouldHaveCompositingReason) { +TEST_P(CompositingReasonFinderTest, UndoOverscroll) { SetBodyInnerHTML(R"HTML( <style> .fixedDivStyle { @@ -107,9 +108,25 @@ </body> )HTML"); - ScopedFixedElementsDontOverscrollForTest fixed_elements_dont_overscroll(true); + auto& visual_viewport = GetDocument().GetPage()->GetVisualViewport(); + auto default_overscroll_type = visual_viewport.GetOverscrollType(); EXPECT_REASONS( - CompositingReason::kFixedPosition | CompositingReason::kFixedToViewport, + default_overscroll_type == OverscrollType::kTransform + ? CompositingReason::kFixedPosition | + CompositingReason::kUndoOverscroll + : CompositingReason::kNone, + DirectReasonsForPaintProperties(*GetLayoutObjectByElementId("fixedDiv"))); + + visual_viewport.SetOverscrollTypeForTesting(OverscrollType::kNone); + UpdateAllLifecyclePhasesForTest(); + EXPECT_REASONS( + CompositingReason::kNone, + DirectReasonsForPaintProperties(*GetLayoutObjectByElementId("fixedDiv"))); + + visual_viewport.SetOverscrollTypeForTesting(OverscrollType::kTransform); + UpdateAllLifecyclePhasesForTest(); + EXPECT_REASONS( + CompositingReason::kFixedPosition | CompositingReason::kUndoOverscroll, DirectReasonsForPaintProperties(*GetLayoutObjectByElementId("fixedDiv"))); } @@ -176,30 +193,25 @@ < div style='height: 2000px;"></div> )HTML"); - EXPECT_REASONS( - CompositingReason::kStickyPosition, - CompositingReasonFinder::CompositingReasonsForScrollDependentPosition( - *GetPaintLayerByElementId("sticky-scrolling"))); + EXPECT_REASONS(CompositingReason::kStickyPosition, + DirectReasonsForPaintProperties( + *GetLayoutObjectByElementId("sticky-scrolling"))); - EXPECT_REASONS( - CompositingReason::kNone, - CompositingReasonFinder::CompositingReasonsForScrollDependentPosition( - *GetPaintLayerByElementId("sticky-no-scrolling"))); + EXPECT_REASONS(CompositingReason::kNone, + DirectReasonsForPaintProperties( + *GetLayoutObjectByElementId("sticky-no-scrolling"))); - EXPECT_REASONS( - CompositingReason::kStickyPosition, - CompositingReasonFinder::CompositingReasonsForScrollDependentPosition( - *GetPaintLayerByElementId("overflow-hidden-scrolling"))); + EXPECT_REASONS(CompositingReason::kStickyPosition, + DirectReasonsForPaintProperties( + *GetLayoutObjectByElementId("overflow-hidden-scrolling"))); - EXPECT_REASONS( - CompositingReason::kNone, - CompositingReasonFinder::CompositingReasonsForScrollDependentPosition( - *GetPaintLayerByElementId("overflow-hidden-no-scrolling"))); + EXPECT_REASONS(CompositingReason::kNone, + DirectReasonsForPaintProperties(*GetLayoutObjectByElementId( + "overflow-hidden-no-scrolling"))); - EXPECT_REASONS( - CompositingReason::kNone, - CompositingReasonFinder::CompositingReasonsForScrollDependentPosition( - *GetPaintLayerByElementId("under-fixed"))); + EXPECT_REASONS(CompositingReason::kNone, + DirectReasonsForPaintProperties( + *GetLayoutObjectByElementId("under-fixed"))); } void CompositingReasonFinderTest::CheckCompositingReasonsForAnimation(
diff --git a/third_party/blink/renderer/core/paint/cull_rect_updater_test.cc b/third_party/blink/renderer/core/paint/cull_rect_updater_test.cc index 230faaa..8d50a228 100644 --- a/third_party/blink/renderer/core/paint/cull_rect_updater_test.cc +++ b/third_party/blink/renderer/core/paint/cull_rect_updater_test.cc
@@ -217,8 +217,6 @@ </div> )HTML"); - // The cull rect is inflated when scrolling, because fixed elements don't - // participate in overscroll. EXPECT_EQ(gfx::Rect(-200, -100, 800, 600), GetCullRect("target").Rect()); }
diff --git a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc index d75e4a85..2a9a709 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
@@ -1865,9 +1865,8 @@ // The global root scrollbars and corner also paint as overlay so that they // appear on top of all content within the viewport. This is important since - // these scrollbar's transform parent is the 'overscroll elasticity' - // transform node of the visual viewport, i.e. they don't move during elastic - // overscroll or on pinch zoom. + // these scrollbar's transform state is + // VisualViewport::TransformNodeForViewportScrollbars(). return GetLayoutBox() && GetLayoutBox()->IsGlobalRootScroller(); }
diff --git a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area_test.cc b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area_test.cc index a2161a8..0e3bc35 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area_test.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area_test.cc
@@ -1521,12 +1521,14 @@ const auto& paint_chunks = ContentPaintChunks(); bool found_root_scrollbar = false; + const auto* parent_transform = + visual_viewport.GetOverscrollElasticityTransformNode() + ? visual_viewport.GetOverscrollElasticityTransformNode()->Parent() + : visual_viewport.GetPageScaleNode()->Parent(); for (const auto& chunk : paint_chunks) { if (chunk.id == PaintChunk::Id(root_scrollable->VerticalScrollbar()->Id(), DisplayItem::kScrollbarHitTest)) { - EXPECT_EQ( - &chunk.properties.Transform(), - visual_viewport.GetOverscrollElasticityTransformNode()->Parent()); + EXPECT_EQ(parent_transform, &chunk.properties.Transform()); found_root_scrollbar = true; } }
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc index f4022d7..f5f9790 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
@@ -471,7 +471,8 @@ static bool NeedsPaintOffsetTranslation( const LayoutObject& object, - CompositingReasons direct_compositing_reasons) { + CompositingReasons direct_compositing_reasons, + const LayoutObject* container_for_fixed_position) { if (!object.IsBoxModelObject()) return false; @@ -517,6 +518,11 @@ object.HasReflection())) return true; + if (auto* box = DynamicTo<LayoutBox>(box_model)) { + if (box->IsFixedToView(container_for_fixed_position)) + return true; + } + // Though we don't treat hidden backface as a direct compositing reason, it's // very likely that the object will be composited, so a paint offset // translation will be beneficial. @@ -568,8 +574,9 @@ void FragmentPaintPropertyTreeBuilder::UpdateForPaintOffsetTranslation( absl::optional<gfx::Vector2d>& paint_offset_translation) { - if (!NeedsPaintOffsetTranslation( - object_, full_context_.direct_compositing_reasons)) + if (!NeedsPaintOffsetTranslation(object_, + full_context_.direct_compositing_reasons, + full_context_.container_for_fixed_position)) return; // We should use the same subpixel paint offset values for snapping regardless @@ -635,12 +642,14 @@ state.direct_compositing_reasons = full_context_.direct_compositing_reasons & CompositingReason::kDirectReasonsForPaintOffsetTranslationProperty; - if (state.direct_compositing_reasons & CompositingReason::kFixedPosition && - object_.View()->FirstFragment().PaintProperties()->Scroll()) { - state.scroll_translation_for_fixed = object_.View() - ->FirstFragment() - .PaintProperties() - ->ScrollTranslation(); + if (auto* box = DynamicTo<LayoutBox>(object_)) { + if (box->IsFixedToView(full_context_.container_for_fixed_position) && + object_.View()->FirstFragment().PaintProperties()->Scroll()) { + state.scroll_translation_for_fixed = object_.View() + ->FirstFragment() + .PaintProperties() + ->ScrollTranslation(); + } } if (IsA<LayoutView>(object_)) { @@ -3915,8 +3924,8 @@ // If DCHECK is not on, use fast path for text. !object_.IsText() && #endif - (NeedsPaintOffsetTranslation(object_, - context_.direct_compositing_reasons) || + (NeedsPaintOffsetTranslation(object_, context_.direct_compositing_reasons, + context_.container_for_fixed_position) || NeedsStickyTranslation(object_) || NeedsAnchorScrollTranslation(object_) || NeedsTranslate(object_, context_.direct_compositing_reasons) ||
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc index ade37f26..b6622f9 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc
@@ -6042,10 +6042,12 @@ EXPECT_EQ(3u, NumFragments(fixed)); for (int i = 0; i < 3; i++) { const auto& fragment = FragmentAt(fixed, i); - // We don't composite and create PaintOffsetTranslation for the - // fixed-position element during printing. - EXPECT_EQ(PhysicalOffset(20, 400 * i - 180), fragment.PaintOffset()); - EXPECT_FALSE(fragment.PaintProperties()); + auto* properties = fragment.PaintProperties(); + ASSERT_TRUE(properties); + ASSERT_TRUE(properties->PaintOffsetTranslation()); + EXPECT_EQ(gfx::Vector2dF(20, 400 * i - 180), + properties->PaintOffsetTranslation()->Translation2D()); + EXPECT_EQ(PhysicalOffset(), fragment.PaintOffset()); EXPECT_EQ(LayoutUnit(400 * i), fragment.LogicalTopInFlowThread()); }
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc b/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc index 3079982f0..17d09399 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_printer.cc
@@ -217,17 +217,17 @@ void UpdateDebugNames(const VisualViewport& viewport) { if (auto* device_emulation_node = viewport.GetDeviceEmulationTransformNode()) - device_emulation_node->SetDebugName("Device Emulation Node"); + SetDebugName(device_emulation_node, "Device Emulation Node"); if (auto* overscroll_effect_node = viewport.GetOverscrollElasticityEffectNode()) { - overscroll_effect_node->SetDebugName("Overscroll Elasticity Effect Node"); + SetDebugName(overscroll_effect_node, "Overscroll Elasticity Effect Node"); } if (auto* overscroll_node = viewport.GetOverscrollElasticityTransformNode()) - overscroll_node->SetDebugName("Overscroll Elasticity Node"); - viewport.GetPageScaleNode()->SetDebugName("VisualViewport Scale Node"); - viewport.GetScrollTranslationNode()->SetDebugName( - "VisualViewport Translate Node"); - viewport.GetScrollNode()->SetDebugName("VisualViewport Scroll Node"); + SetDebugName(overscroll_node, "Overscroll Elasticity Node"); + SetDebugName(viewport.GetPageScaleNode(), "VisualViewport Scale Node"); + SetDebugName(viewport.GetScrollTranslationNode(), + "VisualViewport Translate Node"); + SetDebugName(viewport.GetScrollNode(), "VisualViewport Scroll Node"); } void UpdateDebugNames(const LayoutObject& object,
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc b/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc index 23e91c9d..4cd44a1 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc
@@ -1734,24 +1734,24 @@ <div id="fixed" style="position: fixed; top: 50px; left: 60px">Fixed</div> )HTML"); - // Still paint properties because we composite fixed-position elements to - // avoid overscroll. - EXPECT_TRUE(PaintPropertiesForElement("fixed")); - - auto* space = GetDocument().getElementById("space"); - space->setAttribute(html_names::kStyleAttr, "height: 2000px"); - UpdateAllLifecyclePhasesForTest(); auto* properties = PaintPropertiesForElement("fixed"); ASSERT_TRUE(properties); auto* paint_offset_translation = properties->PaintOffsetTranslation(); ASSERT_TRUE(paint_offset_translation); EXPECT_EQ(gfx::Vector2dF(60, 50), paint_offset_translation->Translation2D()); + EXPECT_FALSE(paint_offset_translation->HasDirectCompositingReasons()); + + auto* space = GetDocument().getElementById("space"); + space->setAttribute(html_names::kStyleAttr, "height: 2000px"); + UpdateAllLifecyclePhasesForTest(); + EXPECT_EQ(gfx::Vector2dF(60, 50), paint_offset_translation->Translation2D()); EXPECT_TRUE(paint_offset_translation->HasDirectCompositingReasons()); EXPECT_FALSE(properties->Transform()); space->setAttribute(html_names::kStyleAttr, "height: 100px"); UpdateAllLifecyclePhasesForTest(); - EXPECT_TRUE(PaintPropertiesForElement("fixed")); + EXPECT_EQ(gfx::Vector2dF(60, 50), paint_offset_translation->Translation2D()); + EXPECT_FALSE(paint_offset_translation->HasDirectCompositingReasons()); } TEST_P(PaintPropertyTreeUpdateTest, InlineFilterReferenceBoxChange) {
diff --git a/third_party/blink/renderer/core/paint/scrollable_area_painter.cc b/third_party/blink/renderer/core/paint/scrollable_area_painter.cc index 38d2a9a..ed73617 100644 --- a/third_party/blink/renderer/core/paint/scrollable_area_painter.cc +++ b/third_party/blink/renderer/core/paint/scrollable_area_painter.cc
@@ -195,9 +195,9 @@ DCHECK(frame_view); const auto* page = frame_view->GetPage(); const auto& viewport = page->GetVisualViewport(); - if (const auto* overscroll_transform = - viewport.GetOverscrollElasticityTransformNode()) { - transform = overscroll_transform->Parent(); + if (const auto* scrollbar_transform = + viewport.TransformNodeForViewportScrollbars()) { + transform = scrollbar_transform; } }
diff --git a/third_party/blink/renderer/core/script/html_parser_script_runner.cc b/third_party/blink/renderer/core/script/html_parser_script_runner.cc index 87f88eb3..579f63f 100644 --- a/third_party/blink/renderer/core/script/html_parser_script_runner.cc +++ b/third_party/blink/renderer/core/script/html_parser_script_runner.cc
@@ -72,23 +72,17 @@ return value; } -std::unique_ptr<TracedValue> GetTraceArgsForScriptElement( - const PendingScript* pending_script) { - DCHECK(pending_script); - return GetTraceArgsForScriptElement( - pending_script->GetElement()->GetDocument(), - pending_script->StartingPosition(), pending_script->UrlForTracing()); -} - -void DoExecuteScript(PendingScript* pending_script) { - TRACE_EVENT_WITH_FLOW1("blink", "HTMLParserScriptRunner ExecuteScript", - pending_script->GetElement(), TRACE_EVENT_FLAG_FLOW_IN, - "data", GetTraceArgsForScriptElement(pending_script)); +void DoExecuteScript(PendingScript* pending_script, Document& document) { + TRACE_EVENT_WITH_FLOW1( + "blink", "HTMLParserScriptRunner ExecuteScript", + pending_script->GetElement(), TRACE_EVENT_FLAG_FLOW_IN, "data", + GetTraceArgsForScriptElement(document, pending_script->StartingPosition(), + pending_script->UrlForTracing())); pending_script->ExecuteScriptBlock(); } void TraceParserBlockingScript(const PendingScript* pending_script, - bool waiting_for_resources) { + Document& document) { // The HTML parser must yield before executing script in the following // cases: // * the script's execution is blocked on the completed load of the script @@ -109,21 +103,24 @@ ScriptElementBase* element = pending_script->GetElement(); if (!element) return; + bool waiting_for_resources = !document.IsScriptExecutionReady(); + std::unique_ptr<TracedValue> args = + GetTraceArgsForScriptElement(document, pending_script->StartingPosition(), + pending_script->UrlForTracing()); if (!pending_script->IsReady()) { if (waiting_for_resources) { - TRACE_EVENT_WITH_FLOW1("blink", - "YieldParserForScriptLoadAndBlockingResources", - element, TRACE_EVENT_FLAG_FLOW_OUT, "data", - GetTraceArgsForScriptElement(pending_script)); + TRACE_EVENT_WITH_FLOW1( + "blink", "YieldParserForScriptLoadAndBlockingResources", element, + TRACE_EVENT_FLAG_FLOW_OUT, "data", std::move(args)); } else { TRACE_EVENT_WITH_FLOW1("blink", "YieldParserForScriptLoad", element, TRACE_EVENT_FLAG_FLOW_OUT, "data", - GetTraceArgsForScriptElement(pending_script)); + std::move(args)); } } else if (waiting_for_resources) { TRACE_EVENT_WITH_FLOW1("blink", "YieldParserForScriptBlockingResources", element, TRACE_EVENT_FLAG_FLOW_OUT, "data", - GetTraceArgsForScriptElement(pending_script)); + std::move(args)); } } @@ -221,7 +218,7 @@ // <spec step="B.11">Execute the script element the script.</spec> DCHECK(IsExecutingScript()); - DoExecuteScript(pending_script); + DoExecuteScript(pending_script, *document_); // <spec step="B.12">Decrement the parser's script nesting level by one. If // the parser's script nesting level is zero (which it always should be at @@ -253,7 +250,7 @@ Microtask::PerformCheckpoint(V8PerIsolateData::MainThreadIsolate()); } - DoExecuteScript(pending_script); + DoExecuteScript(pending_script, *document_); } void HTMLParserScriptRunner::PendingScriptFinished( @@ -317,8 +314,7 @@ // - "Otherwise": - TraceParserBlockingScript(ParserBlockingScript(), - !document_->IsScriptExecutionReady()); + TraceParserBlockingScript(ParserBlockingScript(), *document_); parser_blocking_script_->MarkParserBlockingLoadStartTime(); // If preload scanner got created, it is missing the source after the @@ -423,7 +419,7 @@ // checked to avoid double execution of this code block. When // `IsWatchingForLoad()` is true, its existing client is always `this`. script->WatchForLoad(this); - TraceParserBlockingScript(script, !document_->IsScriptExecutionReady()); + TraceParserBlockingScript(script, *document_); script->MarkParserBlockingLoadStartTime(); } return nullptr;
diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc index f930f6d..394b4be 100644 --- a/third_party/blink/renderer/modules/webaudio/audio_context.cc +++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
@@ -883,4 +883,34 @@ : kOutputLatencyQuatizingFactor; } +String AudioContext::sinkId() const { + DCHECK(IsMainThread()); + + return sink_id_; +} + +ScriptPromise AudioContext::setSinkId(ScriptState* script_state, + const String& sink_id, + ExceptionState& exception_state) { + DCHECK(IsMainThread()); + + ScriptPromise promise = ScriptPromise(); + + if (ContextState() == kClosed) { + exception_state.ThrowDOMException( + DOMExceptionCode::kInvalidStateError, + "Cannot invoke setSinkId() on a closed AudioContext."); + return promise; + } + + exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError, + "setSinkId is not supported."); + + return promise; +} + +void AudioContext::NotifySetSinkIdIsDone() { + DispatchEvent(*Event::Create(event_type_names::kSinkchange)); +} + } // namespace blink
diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.h b/third_party/blink/renderer/modules/webaudio/audio_context.h index 620a168..3338ce9 100644 --- a/third_party/blink/renderer/modules/webaudio/audio_context.h +++ b/third_party/blink/renderer/modules/webaudio/audio_context.h
@@ -48,6 +48,9 @@ const WebAudioLatencyHint&, absl::optional<float> sample_rate); ~AudioContext() override; + + DEFINE_ATTRIBUTE_EVENT_LISTENER(sinkchange, kSinkchange) + void Trace(Visitor*) const override; // For ContextLifeCycleObserver @@ -95,6 +98,12 @@ // mojom::blink::PermissionObserver void OnPermissionStatusChange(mojom::blink::PermissionStatus) override; + String sinkId() const; + + ScriptPromise setSinkId(ScriptState*, const String&, ExceptionState&); + + void NotifySetSinkIdIsDone(); + protected: void Uninitialize() final; @@ -228,6 +237,9 @@ HeapMojoRemote<mojom::blink::PermissionService> permission_service_; HeapMojoReceiver<mojom::blink::PermissionObserver, AudioContext> permission_receiver_; + + // Initializes `sink_id_` with "" for the default audio output device. + String sink_id_ = ""; }; } // namespace blink
diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.idl b/third_party/blink/renderer/modules/webaudio/audio_context.idl index a614c1e..7c7aba10 100644 --- a/third_party/blink/renderer/modules/webaudio/audio_context.idl +++ b/third_party/blink/renderer/modules/webaudio/audio_context.idl
@@ -52,4 +52,7 @@ [RaisesException, MeasureAs=AudioContextCreateMediaStreamSource] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream); [RaisesException, MeasureAs=AudioContextCreateMediaStreamDestination] MediaStreamAudioDestinationNode createMediaStreamDestination(); + [RuntimeEnabled=AudioContextSetSinkId, MeasureAs=AudioContextSinkId] readonly attribute DOMString sinkId; + [RuntimeEnabled=AudioContextSetSinkId, MeasureAs=AudioContextSetSinkId, RaisesException, CallWith=ScriptState] Promise<void> setSinkId(DOMString sinkId); + [RuntimeEnabled=AudioContextSetSinkId] attribute EventHandler onsinkchange; };
diff --git a/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc b/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc index 8928624..87fb6b9 100644 --- a/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc +++ b/third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.cc
@@ -637,8 +637,6 @@ } } - property_tree_manager.SetFixedElementsDontOverscroll( - RuntimeEnabledFeatures::FixedElementsDontOverscrollEnabled()); layer_tree_host->RegisterViewportPropertyIds(ids); }
diff --git a/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.cc b/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.cc index f1a57c1..18a7d07 100644 --- a/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.cc +++ b/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.cc
@@ -386,10 +386,6 @@ } } -void PropertyTreeManager::SetFixedElementsDontOverscroll(const bool value) { - transform_tree_.set_fixed_elements_dont_overscroll(value); -} - int PropertyTreeManager::EnsureCompositorTransformNode( const TransformPaintPropertyNode& transform_node) { int id = transform_node.CcNodeId(new_sequence_number_); @@ -418,7 +414,7 @@ cc::TransformNode& compositor_node = *transform_tree_.Node(id); UpdateCcTransformLocalMatrix(compositor_node, transform_node); - compositor_node.is_fixed_to_viewport = + compositor_node.should_undo_overscroll = transform_node.RequiresCompositingForFixedToViewport(); compositor_node.transform_changed = transform_node.NodeChangeAffectsRaster(); compositor_node.flattens_inherited_transform =
diff --git a/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.h b/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.h index a6beb99..9d98ea7 100644 --- a/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.h +++ b/third_party/blink/renderer/platform/graphics/compositing/property_tree_manager.h
@@ -113,8 +113,6 @@ int EnsureCompositorPageScaleTransformNode(const TransformPaintPropertyNode&); - void SetFixedElementsDontOverscroll(const bool value); - // This function is expected to be invoked right before emitting each layer. // It keeps track of the nesting of clip and effects, output a composited // effect node whenever an effect is entered, or a non-trivial clip is
diff --git a/third_party/blink/renderer/platform/graphics/compositing_reasons.cc b/third_party/blink/renderer/platform/graphics/compositing_reasons.cc index 349b5f3..1854c75 100644 --- a/third_party/blink/renderer/platform/graphics/compositing_reasons.cc +++ b/third_party/blink/renderer/platform/graphics/compositing_reasons.cc
@@ -106,9 +106,8 @@ "Secondary layer, the horizontal scrollbar layer"}, {CompositingReason::kLayerForVerticalScrollbar, "layerForVerticalScrollbar", "Secondary layer, the vertical scrollbar layer"}, - {CompositingReason::kFixedToViewport, - "layerForViewportAttachedFixedPositionElement", - "Layer for fixed position elements that are fixed to the viewport."}, + {CompositingReason::kUndoOverscroll, "UndoOverscroll", + "The layer is fixed to viewport and doesn't move with overscroll"}, {CompositingReason::kLayerForOther, "layerForOther", "Layer for link highlight, frame overlay, etc."}, {CompositingReason::kBackfaceInvisibility3DAncestor,
diff --git a/third_party/blink/renderer/platform/graphics/compositing_reasons.h b/third_party/blink/renderer/platform/graphics/compositing_reasons.h index 900aa582..0cd4774f 100644 --- a/third_party/blink/renderer/platform/graphics/compositing_reasons.h +++ b/third_party/blink/renderer/platform/graphics/compositing_reasons.h
@@ -37,7 +37,7 @@ V(ActiveBackdropFilterAnimation) \ V(AffectedByOuterViewportBoundsDelta) \ V(FixedPosition) \ - V(FixedToViewport) \ + V(UndoOverscroll) \ V(StickyPosition) \ V(AnchorScroll) \ V(OverflowScrolling) \ @@ -125,8 +125,8 @@ kPreventingSubpixelAccumulationReasons = kWillChangeTransform | kWillChangeScale | kWillChangeRotate, kDirectReasonsForPaintOffsetTranslationProperty = - kFixedPosition | kAffectedByOuterViewportBoundsDelta | - kFixedToViewport | kVideo | kCanvas | kPlugin | kIFrame, + kFixedPosition | kAffectedByOuterViewportBoundsDelta | kUndoOverscroll | + kVideo | kCanvas | kPlugin | kIFrame, // TODO(dbaron): kWillChangeOther probably shouldn't be in this list. kDirectReasonsForTransformProperty = k3DTransform | kTrivial3DTransform | kWillChangeTransform |
diff --git a/third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h b/third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h index b564f63..141f4a1 100644 --- a/third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h +++ b/third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h
@@ -382,7 +382,7 @@ } bool RequiresCompositingForFixedToViewport() const { - return DirectCompositingReasons() & CompositingReason::kFixedToViewport; + return DirectCompositingReasons() & CompositingReason::kUndoOverscroll; } bool RequiresCompositingForStickyPosition() const {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index b82ca1d..992fdfc 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -200,6 +200,12 @@ origin_trial_allows_third_party: true, status: "experimental", }, + // The runtime flag for AudioContext.setSinkID(). + // See: https://github.com/WebAudio/web-audio-api/pull/2498 + { + name: "AudioContextSetSinkId", + status: "test", + }, { name: "AudioOutputDevices", // Android does not yet support switching of audio output devices @@ -381,7 +387,6 @@ }, { name: "CloseWatcher", - status: "experimental", }, { name: "CLSScrollAnchoring", @@ -1116,7 +1121,7 @@ }, { name: "FractionalScrollOffsets", - status: "experimental", + implied_by: ["PercentBasedScrolling"], }, { name: "FreezeFramesOnVisibility",
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py index 5477b5ce..b9306139 100644 --- a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py +++ b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor.py
@@ -50,6 +50,12 @@ return test_name if index == -1 else test_name[:index] +def _wptrunner_to_resultdb_status(status): + """Map a test-level wptrunner status to a ResultDB one.""" + # Test timeouts are a special case of aborts. + return 'ABORT' if status == 'TIMEOUT' else status + + class WPTResultsProcessor(object): def __init__(self, host, @@ -498,12 +504,17 @@ text=False, ) - def _add_result_to_sink(self, node, test_name, test_name_prefix=''): """Add test results to the result sink.""" - actual_statuses = node['actual'].split() + actual_statuses = [ + _wptrunner_to_resultdb_status(status) + for status in node['actual'].split() + ] flaky = len(set(actual_statuses)) > 1 - expected = set(node['expected'].split()) + expected = { + _wptrunner_to_resultdb_status(status) + for status in node['expected'].split() + } durations = node.get('times') or [0] * len(actual_statuses) artifacts = Artifacts( @@ -521,19 +532,14 @@ for iteration, (actual, duration) in enumerate(zip(actual_statuses, durations)): - # Test timeouts are a special case of aborts. We must report "ABORT" - # to result sink for tests that timed out. - if actual == 'TIMEOUT': - actual = 'ABORT' - result = Result( name=test_name, actual=actual, - started=self.host.time() - duration, + started=(self.host.time() - duration), took=duration, worker=0, expected=expected, - unexpected=actual not in expected, + unexpected=(actual not in expected), flaky=flaky, # TODO(crbug/1314847): wptrunner merges output from all runs # together. Until it outputs per-test-run artifacts instead, we
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor_unittest.py b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor_unittest.py index f71e134d..b11f87b 100644 --- a/third_party/blink/tools/blinkpy/w3c/wpt_results_processor_unittest.py +++ b/third_party/blink/tools/blinkpy/w3c/wpt_results_processor_unittest.py
@@ -198,12 +198,14 @@ 'tests': { 'fail': { 'test.html?variant1': { - 'expected': 'PASS', - 'actual': 'FAIL', + 'expected': 'TIMEOUT', + 'actual': 'TIMEOUT', 'artifacts': { - 'wpt_actual_status': ['OK'], + 'wpt_actual_status': ['TIMEOUT'], 'wpt_actual_metadata': ['test.html actual text'], }, + 'time': 1000, + 'times': [1000], }, }, }, @@ -225,10 +227,10 @@ 'test_path': test_abs_path, 'result': { 'name': test_name, - 'actual': 'FAIL', - 'expected': {'PASS'}, - 'unexpected': True, - 'took': 0, + 'actual': 'ABORT', + 'expected': {'ABORT'}, + 'unexpected': False, + 'took': 1000, 'flaky': False, 'artifacts': { 'actual_text': [path_from_out_dir],
diff --git a/third_party/blink/web_tests/FlagExpectations/disable-layout-ng b/third_party/blink/web_tests/FlagExpectations/disable-layout-ng index bff1374..07a2a31 100644 --- a/third_party/blink/web_tests/FlagExpectations/disable-layout-ng +++ b/third_party/blink/web_tests/FlagExpectations/disable-layout-ng
@@ -11,6 +11,8 @@ # Tests that fail in legacy but pass in NG # ====== New tests from wpt-importer added here ====== +crbug.com/626703 external/wpt/css/css-sizing/svg-intrinsic-size-001.html [ Failure ] +crbug.com/626703 external/wpt/css/css-sizing/svg-intrinsic-size-003.html [ Failure ] crbug.com/626703 external/wpt/dom/nodes/NodeList-static-length-getter-tampered-indexOf-1.html [ Timeout ] crbug.com/626703 external/wpt/dom/nodes/NodeList-static-length-getter-tampered-indexOf-2.html [ Timeout ] crbug.com/626703 external/wpt/dom/nodes/NodeList-static-length-getter-tampered-indexOf-3.html [ Timeout ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 7904161a..941c81d 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -6824,6 +6824,25 @@ crbug.com/1354433 [ Mac ] external/wpt/html/browsers/the-window-object/window-properties.https.html [ Failure Pass ] crbug.com/1354433 [ Linux ] external/wpt/html/browsers/the-window-object/window-properties.https.html [ Failure Pass ] +# Failures with FractionalScrollOffsets disabled for web tests by default. +crbug.com/1358383 fast/scrolling/scrollbars/touch-scrolling-on-root-scrollbar.html [ Failure ] +crbug.com/1358383 [ Mac ] fast/scrolling/scrollbars/scrollbar-rtl-manipulation.html [ Failure ] +crbug.com/1358383 fast/scrolling/scrollbars/dsf-ready/mouse-interactions-dsf-2.html [ Failure ] +crbug.com/1358383 virtual/compositor_threaded_scrollbar_scrolling/fast/scrolling/scrollbars/mouse-scrolling-on-root-scrollbar-thumb.html [ Failure ] +crbug.com/1358383 virtual/threaded-prefer-compositing/fast/scrolling/scrollbars/mouse-scrolling-on-root-scrollbar-thumb.html [ Failure ] +virtual/percent-based-scrolling/fast/scrolling/scrollbars/touch-scrolling-on-root-scrollbar.html [ Pass ] +virtual/main-threaded-percent-based-scrolling/fast/scrolling/scrollbars/touch-scrolling-on-root-scrollbar.html [ Pass ] +virtual/compositor-threaded-percent-based-scrolling/fast/scrolling/scrollbars/touch-scrolling-on-root-scrollbar.html [ Pass ] +virtual/fractional-scroll-offsets/fast/scrolling/scrollbars/touch-scrolling-on-root-scrollbar.html [ Pass ] +[ Mac ] virtual/percent-based-scrolling/fast/scrolling/scrollbars/scrollbar-rtl-manipulation.html [ Pass ] +[ Mac ] virtual/main-threaded-percent-based-scrolling/fast/scrolling/scrollbars/scrollbar-rtl-manipulation.html [ Pass ] +[ Mac ] virtual/compositor-threaded-percent-based-scrolling/fast/scrolling/scrollbars/scrollbar-rtl-manipulation.html [ Pass ] +[ Mac ] virtual/fractional-scroll-offsets/fast/scrolling/scrollbars/scrollbar-rtl-manipulation.html [ Pass ] +virtual/percent-based-scrolling/fast/scrolling/scrollbars/dsf-ready/mouse-interactions-dsf-2.html [ Pass ] +virtual/main-threaded-percent-based-scrolling/fast/scrolling/scrollbars/dsf-ready/mouse-interactions-dsf-2.html [ Pass ] +virtual/compositor-threaded-percent-based-scrolling/fast/scrolling/scrollbars/dsf-ready/mouse-interactions-dsf-2.html [ Pass ] +virtual/fractional-scroll-offsets/fast/scrolling/scrollbars/dsf-ready/mouse-interactions-dsf-2.html [ Pass ] + # Sheriff 2022-08-24 crbug.com/1356118 [ Mac ] virtual/fenced-frame-shadow-dom/external/wpt/html/anonymous-iframe/local-storage-initial-empty-document.tentative.https.window.html [ Failure Pass ] crbug.com/1356118 [ Linux ] virtual/fenced-frame-shadow-dom/external/wpt/html/anonymous-iframe/local-storage-initial-empty-document.tentative.https.window.html [ Failure Pass ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index c0e038d..a7e906e 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -208,7 +208,8 @@ { "prefix": "fractional-scroll-offsets", "platforms": ["Linux", "Mac", "Win"], - "bases": ["external/wpt/css/css-position/sticky/"], + "bases": ["external/wpt/css/css-position/sticky/", + "fast/scrolling/"], "args": ["--enable-blink-features=FractionalScrollOffsets"] }, { @@ -1217,5 +1218,13 @@ "fast/encoding/css-charset-default.xhtml" ], "args": ["--enable-features=PretokenizeCSS"] + }, + { + "prefix": "close-watcher", + "platforms": ["Linux", "Mac", "Win"], + "bases": [ + "external/wpt/close-watcher" + ], + "args": ["--enable-blink-features=CloseWatcher"] } ]
diff --git a/third_party/blink/web_tests/android/WebviewWPTExpectations b/third_party/blink/web_tests/android/WebviewWPTExpectations index 1fcaa606..f67bb54 100644 --- a/third_party/blink/web_tests/android/WebviewWPTExpectations +++ b/third_party/blink/web_tests/android/WebviewWPTExpectations
@@ -1408,14 +1408,11 @@ crbug.com/1050754 external/wpt/css/css-transforms/animation/transform-skew-composition.html [ Failure Pass ] crbug.com/1050754 external/wpt/css/css-transforms/animation/transform-translate-composition.html [ Failure Pass ] crbug.com/1050754 external/wpt/css/css-transforms/animation/translate-composition.html [ Failure ] -crbug.com/1050754 external/wpt/css/css-transforms/animation/translate-interpolation.html [ Failure Pass ] crbug.com/1050754 external/wpt/css/css-transforms/inheritance.html [ Failure Pass ] crbug.com/1050754 external/wpt/css/css-transforms/parsing/rotate-parsing-valid.html [ Failure ] crbug.com/1050754 external/wpt/css/css-transforms/parsing/scale-parsing-valid.html [ Failure Pass ] crbug.com/1050754 external/wpt/css/css-transforms/parsing/transform-box-computed.html [ Failure Pass ] crbug.com/1050754 external/wpt/css/css-transforms/parsing/transform-box-valid.html [ Failure Pass ] -crbug.com/1050754 external/wpt/css/css-transforms/parsing/transform-valid.html [ Failure Pass ] -crbug.com/1050754 external/wpt/css/css-transforms/parsing/translate-parsing-valid.html [ Failure Pass ] crbug.com/1050754 external/wpt/css/css-transforms/preserve-3d-flat-grouping-properties.tentative.html [ Failure ] crbug.com/1050754 external/wpt/css/css-transforms/transform-origin-014.html [ Failure ] crbug.com/1050754 external/wpt/css/css-transforms/transform-percent-009.html [ Failure ] @@ -2836,7 +2833,6 @@ crbug.com/1050754 external/wpt/html/semantics/embedded-content/the-img-element/image-loading-lazy-to-eager.html [ Pass Timeout ] crbug.com/1050754 external/wpt/html/semantics/embedded-content/the-img-element/img.complete.html [ Failure Pass ] crbug.com/1050754 external/wpt/html/semantics/embedded-content/the-img-element/move-element-and-scroll.html [ Failure Pass ] -crbug.com/1050754 external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations.html [ Failure Pass ] crbug.com/1050754 external/wpt/html/semantics/embedded-content/the-img-element/sizes/implicit-sizes-ignores-width.html [ Timeout ] crbug.com/1050754 external/wpt/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-display-none.html [ Failure Pass ] crbug.com/1050754 external/wpt/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-quirks-mode.html [ Failure Pass ]
diff --git a/third_party/blink/web_tests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt b/third_party/blink/web_tests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt index d01d0de..a44e5ba 100644 --- a/third_party/blink/web_tests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt +++ b/third_party/blink/web_tests/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt
@@ -35,10 +35,10 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV class='yellow fixed'", + "position": [200, 13], "bounds": [100, 100], "contentsOpaque": true, - "backgroundColor": "#FFFF00", - "transform": 2 + "backgroundColor": "#FFFF00" } ], "transforms": [ @@ -50,15 +50,6 @@ [0, 0, 1, 0], [8, 13, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [200, 13, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt b/third_party/blink/web_tests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt index 08abbee7..d508429 100644 --- a/third_party/blink/web_tests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt +++ b/third_party/blink/web_tests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt
@@ -24,10 +24,10 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV id='fixed'", + "position": [60, 60], "bounds": [80, 80], "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 2 + "backgroundColor": "#008000" }, { "name": "LayoutNGBlockFlow (relative positioned) DIV class='scrolled'", @@ -54,15 +54,6 @@ [0, 0, 1, 0], [98, 90, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [60, 60, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/compositing/rtl/rtl-fixed-expected.txt b/third_party/blink/web_tests/compositing/rtl/rtl-fixed-expected.txt index aee0b84..8e14921 100644 --- a/third_party/blink/web_tests/compositing/rtl/rtl-fixed-expected.txt +++ b/third_party/blink/web_tests/compositing/rtl/rtl-fixed-expected.txt
@@ -8,17 +8,17 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV class='positioned indicator'", + "position": [50, 50], "bounds": [100, 100], "contentsOpaque": true, - "backgroundColor": "#FF0000", - "transform": 1 + "backgroundColor": "#FF0000" }, { "name": "LayoutNGBlockFlow (positioned) DIV class='positioned layer'", "bounds": [100, 100], "contentsOpaque": true, "backgroundColor": "#008000", - "transform": 2 + "transform": 1 } ], "transforms": [ @@ -30,15 +30,6 @@ [0, 0, 1, 0], [50, 50, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt b/third_party/blink/web_tests/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt index d53f5201..5df99f0 100644 --- a/third_party/blink/web_tests/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt +++ b/third_party/blink/web_tests/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt
@@ -8,17 +8,17 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV class='fixedpos'", + "position": [0, 50], "bounds": [800, 550], "contentsOpaque": true, - "backgroundColor": "#ADD8E6", - "transform": 1 + "backgroundColor": "#ADD8E6" }, { "name": "LayoutNGBlockFlow (positioned) DIV class='compositedlayer'", "bounds": [24, 100], "contentsOpaque": true, "backgroundColor": "#D3D3D3", - "transform": 2 + "transform": 1 }, { "name": "LayoutNGBlockFlow (positioned) DIV class='notsquashedelement'", @@ -34,15 +34,6 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, 50, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], [400, 40, 0, 1] ] }
diff --git a/third_party/blink/web_tests/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt b/third_party/blink/web_tests/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt index 11d1401..d548346 100644 --- a/third_party/blink/web_tests/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt +++ b/third_party/blink/web_tests/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt
@@ -15,20 +15,13 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#D3D3D3", - "transform": 2 - }, - { - "name": "LayoutNGBlockFlow (positioned) DIV id='foo'", - "bounds": [100, 100], + "position": [8, 25], + "bounds": [100, 125], "contentsOpaque": true, "backgroundColor": "#FF0000", "invalidations": [ - [0, 0, 100, 100] - ], - "transform": 3 + [0, 25, 100, 100] + ] } ], "transforms": [ @@ -40,24 +33,6 @@ [0, 0, 1, 0], [8, 8, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 25, 0, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 50, 0, 1] - ] } ] } @@ -78,20 +53,13 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#D3D3D3", - "transform": 2 - }, - { - "name": "LayoutNGBlockFlow (positioned) DIV id='foo'", - "bounds": [100, 100], + "position": [8, 25], + "bounds": [100, 125], "contentsOpaque": true, "backgroundColor": "#0000FF", "invalidations": [ - [0, 0, 100, 100] - ], - "transform": 3 + [0, 25, 100, 100] + ] } ], "transforms": [ @@ -103,24 +71,6 @@ [0, 0, 1, 0], [8, 8, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 25, 0, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 50, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/external/PRESUBMIT.py b/third_party/blink/web_tests/external/PRESUBMIT.py index e433d2780..b5274dc 100644 --- a/third_party/blink/web_tests/external/PRESUBMIT.py +++ b/third_party/blink/web_tests/external/PRESUBMIT.py
@@ -52,7 +52,7 @@ if abs_path.endswith(input_api.os_path.relpath(abs_path, wpt_path)): paths_in_wpt.append(abs_path) - # If there are changes in LayoutTests/external that aren't in wpt, e.g. + # If there are changes in web_tests/external that aren't in wpt, e.g. # changes to wpt_automation or this presubmit script, then we can return # to avoid running the linter on all files in wpt (which is slow). if not paths_in_wpt: @@ -70,6 +70,7 @@ 'lint', '--repo-root=%s' % wpt_path, '--ignore-glob=*-expected.txt', + '--ignore-glob=*.ini', '--ignore-glob=*DIR_METADATA', '--ignore-glob=*OWNERS', '--paths-file=%s' % paths_name,
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 6e7a916..453c8a4 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
@@ -268380,6 +268380,10 @@ [] ], "container-queries": { + "at-container-serialization-expected.txt": [ + "5d60cc54acfd860a14759d93c9c5724452a182fb", + [] + ], "canvas-as-container-006-expected.txt": [ "bd5ae30045f5964e6c2f0d4609e30a5f38984517", [] @@ -280740,11 +280744,11 @@ [] ], "grid-self-baseline-002-b-ref.html": [ - "460a4537eb71c60983b798d4ba23ff3f728c19ce", + "1b563f1f42ad319879ef13f9798ceb771184f136", [] ], "grid-self-baseline-002-ref.html": [ - "9c2f6e45218962edc0839401ddc6abf9a7998023", + "8593ea1abce9757b07f04da3b8b257cff5448d3d", [] ], "grid-self-baseline-003-ref.html": [ @@ -280796,7 +280800,7 @@ [] ], "grid-self-baseline-horiz-007-ref.html": [ - "e92a90ef26941dc82e72484db2706e793c1c3f63", + "cba725f4256d67ce022635aea66ce5be2f8bf8dd", [] ], "grid-self-baseline-vertical-lr-001-ref.html": [ @@ -280824,7 +280828,7 @@ [] ], "grid-self-baseline-vertical-lr-007-ref.html": [ - "fe00a5f5a2eb74848e9af20b2cba80fe29526ef6", + "6f5641448d588dcf58ada8560ddaa069c07d4101", [] ], "grid-self-baseline-vertical-rl-001-ref.html": [ @@ -280852,7 +280856,7 @@ [] ], "grid-self-baseline-vertical-rl-007-ref.html": [ - "ffa3e0512a90d436669c41a64bbaf561046dd079", + "30658b8cc730598817d055f8ba6d0d2ae1f74b81", [] ] }, @@ -294443,7 +294447,7 @@ [] ], "translate-parsing-valid-expected.txt": [ - "6ab0457f1922503e980649c4defde331a92b8b0e", + "9e1b609a8c513f5bc4f93654b23fc3bfe90ba0e9", [] ] }, @@ -300813,6 +300817,10 @@ ] }, "cssom": { + "CSSContainerRule.tentative-expected.txt": [ + "d7df92df5a0401ab06819deab209dc79287c6d43", + [] + ], "CSSGroupingRule-insertRule-expected.txt": [ "44e8aaa155eef7b2f14b1d86cee6ec9de789162a", [] @@ -304776,7 +304784,7 @@ [] ], "inserttext.js": [ - "59057d03c9136d4135cf72577cb88516c1a48440", + "ca90b9ae9cadcb46a41c5546ca31a30a832f4918", [] ], "insertunorderedlist.js": [ @@ -311237,7 +311245,7 @@ [] ], "generic-sensor-tests.js": [ - "42821465b59872861b76f33d2e73c9e523fc9647", + "da55e741bfccf69f978efb304910820f320b9f98", [] ], "resources": { @@ -316816,7 +316824,7 @@ [] ], "idlharness.https_exclude=(Document_Window_HTML._)-expected.txt": [ - "e312e1b82313318ebf7306b6ae6f86bf19887c56", + "2834183b5cc3d7a34a3167dd734a0623fe4af012", [] ], "idlharness.https_include=(Document_Window)-expected.txt": [ @@ -316828,7 +316836,7 @@ [] ], "idlharness.worker-expected.txt": [ - "10bb02bc614c01248fc4f06b9eced9b2175e8644", + "7e83ccd58853163c1a0a2d9213347dd1d00c9ed2", [] ], "new-harness.js": [ @@ -323088,7 +323096,7 @@ [] ], "relevant-mutations-expected.txt": [ - "82d1f15911f2d4aea44abbba4795e46d4d942c1b", + "8b1e99bab06109431f7318db25826ea9e393a253", [] ], "resources": { @@ -329269,7 +329277,7 @@ [] ], "html.idl": [ - "f17d6810b542f9fc93db17857f6acfdc6c6204ea", + "b8896dc761f946f328865b9d7efa9a32aad8f407", [] ], "idle-detection.idl": [ @@ -329385,7 +329393,7 @@ [] ], "mediacapture-viewport.idl": [ - "187bdf28df22ec11e0679325e6b8b1dc958dc1aa", + "a9dcf74e17cdf38d3d3cea8c7323c510d07653a1", [] ], "mediasession.idl": [ @@ -329537,7 +329545,7 @@ [] ], "resource-timing.idl": [ - "235963b804bf9a86ac83f6d46c2d34bfdbbf00e3", + "e8a19f4bcd4f4e5a09015c55c68738ee7fa707e7", [] ], "sanitizer-api.idl": [ @@ -329557,7 +329565,7 @@ [] ], "screen-capture.idl": [ - "5e684bc4b1b00e7aba12bad6a3801a896064c59d", + "06b1ae6706350dc192823f99ff8ab0275ffae513", [] ], "screen-orientation.idl": [ @@ -329577,7 +329585,7 @@ [] ], "secure-payment-confirmation.idl": [ - "d3e26b1324bd8ead8dfed902bcb626988a26706f", + "5f1bd93dfcfbf8699266c3acc05b4ec95d5b8e57", [] ], "selection-api.idl": [ @@ -329585,7 +329593,7 @@ [] ], "serial.idl": [ - "8a1231a9ca433fe6fcee786688edbf736198132f", + "ee46a8562bb79a899160f39f0db9940cf684f64c", [] ], "server-timing.idl": [ @@ -329681,7 +329689,7 @@ [] ], "wai-aria.idl": [ - "5c4926a72b2a620b92b4627dc73a9020ab407c34", + "61c103cc8a473a805a53dcedc79ecf0fa9e35539", [] ], "wasm-js-api.idl": [ @@ -329749,7 +329757,7 @@ [] ], "webgpu.idl": [ - "16db1867471edc502e8b996313481d8f98b1cb25", + "f5aa3dfb01f8c72842ea187a307397cd2122cf5f", [] ], "webhid.idl": [ @@ -329765,7 +329773,7 @@ [] ], "webnn.idl": [ - "63a0f156332733ee3765bf28afeee80a7a4f4155", + "2f900b505b9479a9d17bc05d4f64be6c9d405238", [] ], "webrtc-encoded-transform.idl": [ @@ -329801,7 +329809,7 @@ [] ], "webtransport.idl": [ - "78f362a4370b8c7299898d87f1e5a4908a08648f", + "ed21e2c350ef391ff91ab56e9248ed6d9e22907c", [] ], "webusb.idl": [ @@ -329845,7 +329853,7 @@ [] ], "webxr.idl": [ - "004f104c8e23c5200e8ef3d63f6ee85b6ec39365", + "939da53364deef0b436cb8f0757d33e775eb5ca8", [] ], "webxrlayers.idl": [ @@ -332904,6 +332912,10 @@ "016bca8d23669ac39ddfc7b072a0ee75e4c9d830", [] ], + "idlharness.window-expected.txt": [ + "8e8e3078448e77e5ee389515ceb2423fa074a82f", + [] + ], "nav2_data_uri.html": [ "851691d6c49808393376486e2616ce8d18075b18", [] @@ -337172,7 +337184,7 @@ [] ], "generic_sensor_mocks.js": [ - "b70b1135a858e016d729ecbabf4b4741c0b88080", + "86904d18b12ea4f960ce91fd2f5f28cffdfbd290", [] ], "generic_sensor_mocks.js.headers": [ @@ -344082,7 +344094,7 @@ [] ], "urlpatterntestdata.json": [ - "6773648da078247ab2c3414eb4aafcce6f057c2d", + "58a1ea31b4bfb0c533ffd21ed781850c8dc07a33", [] ], "urlpatterntests.js": [ @@ -347013,11 +347025,11 @@ [] ], "idlharness.https.any-expected.txt": [ - "e500a0f0fb580121de89405effa80b34a76007d7", + "e690e792606c100eb72ead2b77f7e255c70950cc", [] ], "idlharness.https.any.worker-expected.txt": [ - "6d0995420c2e6ac9b417fbc69e02b7c494356144", + "53c04a27703fe53fe16940e0b838228b5c303acc", [] ] }, @@ -350505,7 +350517,7 @@ ] }, "idlharness.https.window-expected.txt": [ - "67f5439ae475da2a13a15d425c453bc99929479e", + "71640ab661942f445c426204688eee379f923526", [] ], "layers": { @@ -388254,7 +388266,7 @@ ] ], "at-container-serialization.html": [ - "e1c4710b369725a9c3feab86139f053dfb9cc757", + "141062a8d4711c69e49b368a9ba88ecee2edaf4b", [ null, {} @@ -389059,7 +389071,7 @@ ] ], "content-visibility-081.html": [ - "ddd6593dc2e23fff198e512c3e7d5d378222c20e", + "b5f10cb6c891ffd6e55bdb3a2b95fc4f79b2e2d2", [ null, {} @@ -389075,6 +389087,13 @@ } ] ], + "content-visibility-forced-layout-client-rects.html": [ + "60e68498924d0f5dbbadf002ca78a37b6c3cf191", + [ + null, + {} + ] + ], "content-visibility-img.html": [ "94981aa2649514855a9304c4e673f7b7b04680d5", [ @@ -393319,14 +393338,14 @@ ] ], "grid-alignment-style-changes-003.html": [ - "5c63fd82b8ee76b081f9581ef0beb983cbdea618", + "dc7f350af51d5a7c4ffcdb5feec584c8c59d9493", [ null, {} ] ], "grid-alignment-style-changes-004.html": [ - "c7d004657ee8a68e8ecf7acc77976c3469af737e", + "84475fdbce99973e07e3659fae6707c16c2a3a03", [ null, {} @@ -393914,21 +393933,21 @@ ] ], "grid-row-axis-self-baseline-synthesized-001.html": [ - "3939c5b4620781960e1a60a0892747c3ca5f275e", + "c9e630cbac40c153048d2d671cedf9c1d26ae1e4", [ null, {} ] ], "grid-row-axis-self-baseline-synthesized-002.html": [ - "f2f23cbe2650dd308a2a2692d5eb7713e69bcd65", + "e96f8da6e724b0e47b11265463cb795c4d875308", [ null, {} ] ], "grid-row-axis-self-baseline-synthesized-003.html": [ - "1160895f401808c87aaa28394f3b507d20dd8511", + "19a4f5193bfb12917a7454d65b9fd5ad35e6bca7", [ null, {} @@ -395506,7 +395525,7 @@ ] ], "grid-minimum-contribution-baseline-shim-vertical-rl.html": [ - "e56de9f1b3dae00b06640819658a7c3a0f0f0a21", + "cd80fd3873b3f2d5af0e6cd378bd0f4205510ff7", [ null, {} @@ -402060,6 +402079,13 @@ {} ] ], + "contain-intrinsic-size-032.html": [ + "f55364b8abeb0ba105caf261ab426cc51ce9f63d", + [ + null, + {} + ] + ], "contain-intrinsic-size-logical-003.html": [ "48fedb11483342fd6f6fd580bab4f16b0b0fa334", [ @@ -402296,6 +402322,27 @@ {} ] ], + "svg-intrinsic-size-001.html": [ + "c0ba59819b7b2b14e847acc208456a5e48a40397", + [ + null, + {} + ] + ], + "svg-intrinsic-size-002.html": [ + "19ec3df87c608b57113c385de5e7eb79f653e8cd", + [ + null, + {} + ] + ], + "svg-intrinsic-size-003.html": [ + "cf9515308d2ad0ebe63f57790d5f4f7a34963589", + [ + null, + {} + ] + ], "table-percentage-max-width-beside-float.html": [ "be82ac0da66fcfb4e327580b11b491e2621b0629", [ @@ -406248,7 +406295,7 @@ ] ], "translate-interpolation.html": [ - "73bedf2f7b0bf84bd6fbb531988651fa041cef1e", + "4ece9721b8b9ced2acac04e8a1e51a4c746e91b0", [ null, { @@ -406413,7 +406460,7 @@ ] ], "transform-valid.html": [ - "0fb8ee1b196b7e97a0f09bbfffc0d94bd0f065e2", + "89a8b519b1b9c702d7bdedd3895e90c057a34dcb", [ null, {} @@ -406427,7 +406474,7 @@ ] ], "translate-parsing-valid.html": [ - "132e041676d8194da01dd33c1af05381737646f7", + "523bc6d652cc4cbd4e6957618125922800d2a39e", [ null, {} @@ -410070,7 +410117,7 @@ ] ], "outline-valid-mandatory.html": [ - "c5217185eb1293e0c922f0c3068277aaa00911cf", + "3c79f52712ce961caaae456d37dbfa39f17171ca", [ null, {} @@ -411681,6 +411728,13 @@ {} ] ], + "CSSContainerRule.tentative.html": [ + "4e01c0b47003a413c0853ba96011d10962ad00a5", + [ + null, + {} + ] + ], "CSSCounterStyleRule.html": [ "afae84b0b25f4aebf2461179cf5a5a2b769cce4f", [ @@ -488942,7 +488996,7 @@ ] ], "relevant-mutations.html": [ - "dc6e52f19df5aa74290f3ce8acbb7b48ce3ed337", + "2f1031bf83215e4c696ffaa526e978f6f956a28f", [ null, { @@ -519904,7 +519958,7 @@ ] ], "pointerevent_click_during_capture.html": [ - "2acd5dc1287bb6b47a37b9fb23821fa1ebbbd517", + "e7448c7a8bdc6915e833236df6b9458929646b9d", [ null, { @@ -535394,7 +535448,7 @@ ] ], "sanitizer-names.https.tentative.html": [ - "635b7975e65ecd15f7e9b34954f428848b89b2cc", + "e963761faacc47992c78313c49f8331639ab44e7", [ null, {} @@ -561305,6 +561359,13 @@ {} ] ], + "csp-blockes-bundle.https.tentative.html": [ + "06cef8c118a7ae43573cbb1c1e16e88bf4b7af3a", + [ + null, + {} + ] + ], "element-removal.https.tentative.html": [ "87ab8a9f15d02a986014a429cdfa7f1ee90fb2cc", [
diff --git a/third_party/blink/web_tests/external/wpt/close-watcher/abortsignal-expected.txt b/third_party/blink/web_tests/external/wpt/close-watcher/abortsignal-expected.txt new file mode 100644 index 0000000..38d38a3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/close-watcher/abortsignal-expected.txt
@@ -0,0 +1,12 @@ +This is a testharness.js-based test. +FAIL already-aborted AbortSignal then close() fires no events CloseWatcher is not defined +FAIL abortController.abort() then close() fires no events CloseWatcher is not defined +FAIL close() then abortController.abort() fires only one close event CloseWatcher is not defined +FAIL already-aborted AbortSignal then Esc key fires no events promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL abortController.abort() then close via Esc key fires no events promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL Esc key then abortController.abort() fires only one close event promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL abortController.abort()ing a free CloseWatcher allows a new one to be created without a user activation CloseWatcher is not defined +FAIL abortController.abort() inside oncancel promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL abortController.abort() inside onclose is benign CloseWatcher is not defined +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/close-watcher/after-other-listeners-expected.txt b/third_party/blink/web_tests/external/wpt/close-watcher/after-other-listeners-expected.txt new file mode 100644 index 0000000..fdbb59b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/close-watcher/after-other-listeners-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL normal event listeners come before CloseWatcher promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/close-watcher/basic-expected.txt b/third_party/blink/web_tests/external/wpt/close-watcher/basic-expected.txt new file mode 100644 index 0000000..7f58102 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/close-watcher/basic-expected.txt
@@ -0,0 +1,15 @@ +This is a testharness.js-based test. +FAIL close() with no user activation only fires close CloseWatcher is not defined +FAIL destroy() then close() fires no events CloseWatcher is not defined +FAIL close() then destroy() fires only one close event CloseWatcher is not defined +FAIL Esc key does not count as user activation, so it fires close but not cancel promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL destroy() then close via Esc key fires no events promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL Esc key then destroy() fires only one close event promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL close via synthesized escape key should not work CloseWatcher is not defined +FAIL destroy inside oncancel promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL destroy inside onclose is benign CloseWatcher is not defined +FAIL close inside oncancel should not trigger an infinite loop promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL close inside onclose should not trigger an infinite loop CloseWatcher is not defined +FAIL close with events added via addEventListener promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/close-watcher/frame-removal-expected.txt b/third_party/blink/web_tests/external/wpt/close-watcher/frame-removal-expected.txt new file mode 100644 index 0000000..4bb9858 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/close-watcher/frame-removal-expected.txt
@@ -0,0 +1,8 @@ +This is a testharness.js-based test. +FAIL detaching the iframe during the cancel event promise_test: Unhandled rejection with value: object "TypeError: i.contentWindow.CloseWatcher is not a constructor" +FAIL detaching the iframe during the close event promise_test: Unhandled rejection with value: object "TypeError: i.contentWindow.CloseWatcher is not a constructor" +FAIL detaching the iframe then calling destroy() promise_test: Unhandled rejection with value: object "TypeError: i.contentWindow.CloseWatcher is not a constructor" +FAIL detaching the iframe then calling close() promise_test: Unhandled rejection with value: object "TypeError: i.contentWindow.CloseWatcher is not a constructor" +FAIL detaching the iframe then constructing a CloseWatcher assert_throws_dom: function "() => new iCloseWatcher()" threw object "TypeError: iCloseWatcher is not a constructor" that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/close-watcher/user-activation-expected.txt b/third_party/blink/web_tests/external/wpt/close-watcher/user-activation-expected.txt new file mode 100644 index 0000000..60fc84b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/close-watcher/user-activation-expected.txt
@@ -0,0 +1,19 @@ +This is a testharness.js-based test. +FAIL CloseWatchers created without user activation, but close()d via user activation, fires cancel promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL CloseWatchers created without user activation, but close()d via user activation, fires cancel, which can be preventDefault()ed promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL CloseWatchers created without user activation, but closed via a close signal after user activation, fires cancel promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL CloseWatchers created without user activation, but closed via a close signal after user activation, fires cancel, which can be preventDefault()ed promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL Multiple CloseWatchers created without user activation close together (with no cancel) promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL Creating a CloseWatcher from user activation keeps it separate from the free CloseWatcher, but they don't fire cancel promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL Creating a CloseWatcher from user activation, and close()ing CloseWatchers with user activation, fires cancel promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL Creating a CloseWatcher from user activation, and closing CloseWatchers with a close signal after user activation, fires cancel promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL Multiple CloseWatchers created with user activation close in reverse order promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL 3 user activations let you have 3 + 1 = 4 ungrouped close watchers/0 cancel events promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL 3 user activations let you have 2 close watchers with 1 cancel event, even if the first cancel event is prevented promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL destroy()ing the free CloseWatcher allows a new free one to be created without user activation, and it receives the close signal promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL close()ing the free CloseWatcher allows a new free one to be created without user activation, and it receives the close signal promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL closing the free CloseWatcher via a close signal allows a new free one to be created without user activation, and it receives a second close signal promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL The second watcher can be the free watcher, if the first is created with user activation promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +FAIL The third watcher can be the free watcher, if the first two are created with user activation promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/close-watcher/user-activation-multiple-plus-free-expected.txt b/third_party/blink/web_tests/external/wpt/close-watcher/user-activation-multiple-plus-free-expected.txt new file mode 100644 index 0000000..7a7c9634e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/close-watcher/user-activation-multiple-plus-free-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Multiple CloseWatchers created from a single user activation close together, but original free CloseWatcher closes separately promise_test: Unhandled rejection with value: object "ReferenceError: CloseWatcher is not defined" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/at-container-serialization-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/at-container-serialization-expected.txt new file mode 100644 index 0000000..5d60cc5 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/at-container-serialization-expected.txt
@@ -0,0 +1,10 @@ +This is a testharness.js-based test. +FAIL Serialization of conditionText assert_equals: expected "\\!-name (inline-size > 200px)" but got "(inline-size > 200px)" +PASS Serialization of inner @container rule +PASS Serialization of nested @container rule +PASS Serialization of boolean condition syntax +PASS Serialization of colon condition syntax +PASS Serialization of range condition syntax +PASS Serialization of calc() +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/at-container-serialization.html b/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/at-container-serialization.html index e1c4710b..141062a 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/at-container-serialization.html +++ b/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/at-container-serialization.html
@@ -36,7 +36,7 @@ assert_equals(rules[0].cssRules.length, 2); assert_equals(rules[0].conditionText, "(width = 100px)"); - assert_equals(rules[0].cssRules[0].conditionText, "(inline-size > 200px)"); + assert_equals(rules[0].cssRules[0].conditionText, "\\!-name (inline-size > 200px)"); }, "Serialization of conditionText"); test(() => {
diff --git a/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-081.html b/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-081.html index ddd6593d..b5f10cb 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-081.html +++ b/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-081.html
@@ -5,6 +5,7 @@ <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> <meta name="assert" content="if an scroller is hidden via content-visibility and then shown again, its scroll offset should be restored"> +<meta name="viewport" content="width=device-width"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-forced-layout-client-rects.html b/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-forced-layout-client-rects.html new file mode 100644 index 0000000..60e68498 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-contain/content-visibility/content-visibility-forced-layout-client-rects.html
@@ -0,0 +1,105 @@ +<!doctype HTML> +<html> +<meta charset="utf8"> +<title>Content Visibility: nested forced layouts</title> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> +<meta name="assert" content="nested content-visibility items are all processed when layout is forced"> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +body, html { + padding: 0; + margin: 0; +} +.spacer { + height: 3000px; +} +.target { + width: 12px; + height: 34px; + + position: relative; + left: 5px; + top: 7px; +} + +.hidden { + content-visibility: hidden; +} + +.will-hide { + contain: style; + contain: size; + contain: layout; + contain: paint; +} +</style> + +<div class=spacer></div> + +<div class="will-hide"> + <div id=one>A line of a certain length...</div> +</div> + +<div class="will-hide"> + <div class=target id=two></div> +</div> + +<div class="will-hide"> + <div class=target id=three></div> +</div> + +<div class="will-hide"> + <div class="will-hide"> + <div class=target id=four></div> + </div> +</div> + +<div class="will-hide"> + <div class="will-hide"> + <div class="will-hide"> + <div class="will-hide"> + <div class="will-hide"> + <div class=target id=five></div> + </div> + </div> + </div> + </div> +</div> + +<script> +function hideContent() { + document + .querySelectorAll('.will-hide') + .forEach(content => content.classList.add("hidden")); +} + +function showContent() { + document + .querySelectorAll('.will-hide') + .forEach(content => content.classList.remove("hidden")); +} + +const ids = ["one", "two", "three", "four", "five"]; +for (let i = 0; i < ids.length; ++i) { + test(() => { + const expectedRect = document.getElementById(ids[i]).getClientRects()[0]; + const expectedBoundingRect = document.getElementById(ids[i]).getBoundingClientRect(); + hideContent(); + + const rect = document.getElementById(ids[i]).getClientRects()[0]; + assert_equals(rect.width, expectedRect.width, `width for "${ids[i]}"`); + assert_equals(rect.height, expectedRect.height, `height for "${ids[i]}`); + + const boundingRect = document.getElementById(ids[i]).getClientRects()[0]; + assert_equals(boundingRect.width, expectedBoundingRect.width, `width for "${ids[i]}"`); + assert_equals(boundingRect.height, expectedBoundingRect.height, `height for "${ids[i]}`); + + showContent(); + }, `${ids[i]}.getBoundingClientRect(): `); +} +</script> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-032.html b/third_party/blink/web_tests/external/wpt/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-032.html new file mode 100644 index 0000000..f55364b8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-032.html
@@ -0,0 +1,68 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS contain-intrinsic-size: single-select list box</title> +<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#list-box"> +<style> +.ciw-0 { + contain-intrinsic-width: 0px; +} +.ciw-100 { + contain-intrinsic-width: 100px; +} +.cih-0 { + contain-intrinsic-height: 0px; +} +.cih-100 { + contain-intrinsic-height: 100px; +} +select { + padding: 0; +} +.test { + contain: size; + border: solid; + margin: 5px; +} +</style> + +<!-- To measure the size of an empty <select> without size containment --> +<select id="reference"></select> + +<select class="test ciw-none cih-none" + data-expected-client-width="default" data-expected-client-height="default"></select> +<select class="test ciw-none cih-0" + data-expected-client-width="default" data-expected-client-height="0"></select> +<select class="test ciw-none cih-100" + data-expected-client-width="default" data-expected-client-height="100"></select> + +<select class="test ciw-0 cih-none" + data-expected-client-width="0" data-expected-client-height="default"></select> +<select class="test ciw-0 cih-0" + data-expected-client-width="0" data-expected-client-height="0"></select> +<select class="test ciw-0 cih-100" + data-expected-client-width="0" data-expected-client-height="100"></select> + +<select class="test ciw-100 cih-none" + data-expected-client-width="100" data-expected-client-height="default"></select> +<select class="test ciw-100 cih-0" + data-expected-client-width="100" data-expected-client-height="0"></select> +<select class="test ciw-100 cih-100" + data-expected-client-width="100" data-expected-client-height="100"></select> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script> +const reference = document.getElementById("reference"); +const normalWidth = reference.clientWidth; +const normalHeight = reference.clientHeight; +for (let test of document.querySelectorAll(".ciw-none")) { + test.dataset.expectedClientWidth = normalWidth; +} +for (let test of document.querySelectorAll(".cih-none")) { + test.dataset.expectedClientHeight = normalHeight; +} +checkLayout('.test'); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-001.html b/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-001.html new file mode 100644 index 0000000..c0ba598 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-001.html
@@ -0,0 +1,54 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> +<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1638937"> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<style> +.flexbox { + display: flex; + width: 600px; + border: 2px solid black; +} +svg { + background: teal; + flex: none; +} +</style> + +<body onload="checkLayout('svg')"> + No intrinsic attributes: + <div class="flexbox"> + <svg data-expected-client-width="300" data-expected-client-height="150"></svg> + </div> + + viewBox and height: + <div class="flexbox"> + <svg height="40" viewBox="0 0 4 1" + data-expected-client-width="160" data-expected-client-height="40"></svg> + </div> + + viewBox and width: + <div class="flexbox"> + <svg width="40" viewBox="0 0 4 1" + data-expected-client-width="40" data-expected-client-height="10"></svg> + </div> + + viewBox, width, height: + <div class="flexbox"> + <svg width="40" height="40" viewBox="0 0 4 1" + data-expected-client-width="40" data-expected-client-height="40"></svg> + </div> + + Just viewBox: + <div class="flexbox"> + <svg viewBox="0 0 4 1" + data-expected-client-width="600" data-expected-client-height="150"></svg> + </div> +</body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-002.html b/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-002.html new file mode 100644 index 0000000..19ec3df --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-002.html
@@ -0,0 +1,54 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> +<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1638937"> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<style> +.block { + display: block; + width: 600px; + border: 2px solid black; + line-height: 0; +} +svg { + background: teal; +} +</style> + +<body onload="checkLayout('svg')"> + No intrinsic attributes: + <div class="block"> + <svg data-expected-client-width="300" data-expected-client-height="150"></svg> + </div> + + viewBox and height: + <div class="block"> + <svg height="40" viewBox="0 0 4 1" + data-expected-client-width="160" data-expected-client-height="40"></svg> + </div> + + viewBox and width: + <div class="block"> + <svg width="40" viewBox="0 0 4 1" + data-expected-client-width="40" data-expected-client-height="10"></svg> + </div> + + viewBox, width, height: + <div class="block"> + <svg width="40" height="40" viewBox="0 0 4 1" + data-expected-client-width="40" data-expected-client-height="40"></svg> + </div> + + Just viewBox: + <div class="block"> + <svg viewBox="0 0 4 1" + data-expected-client-width="600" data-expected-client-height="150"></svg> + </div> +</body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-003.html b/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-003.html new file mode 100644 index 0000000..cf95153 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-sizing/svg-intrinsic-size-003.html
@@ -0,0 +1,55 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> +<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1638937"> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<style> +.block { + display: block; + width: 600px; + border: 2px solid black; + line-height: 0; +} +svg { + background: teal; + width: max-content; +} +</style> + +<body onload="checkLayout('svg')"> + No intrinsic attributes: + <div class="block"> + <svg data-expected-client-width="300" data-expected-client-height="150"></svg> + </div> + + viewBox and height: + <div class="block"> + <svg height="40" viewBox="0 0 4 1" + data-expected-client-width="160" data-expected-client-height="40"></svg> + </div> + + viewBox and width: + <div class="block"> + <svg width="40" viewBox="0 0 4 1" + data-expected-client-width="40" data-expected-client-height="10"></svg> + </div> + + viewBox, width, height: + <div class="block"> + <svg width="40" height="40" viewBox="0 0 4 1" + data-expected-client-width="40" data-expected-client-height="40"></svg> + </div> + + Just viewBox: + <div class="block"> + <svg viewBox="0 0 4 1" + data-expected-client-width="600" data-expected-client-height="150"></svg> + </div> +</body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-transforms/animation/translate-interpolation.html b/third_party/blink/web_tests/external/wpt/css/css-transforms/animation/translate-interpolation.html index 73bedf2..4ece972 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-transforms/animation/translate-interpolation.html +++ b/third_party/blink/web_tests/external/wpt/css/css-transforms/animation/translate-interpolation.html
@@ -150,7 +150,7 @@ to: '8px 80% 800px', }, [ {at: -1, expect: '-8px -80% -800px'}, - {at: 0, expect: '0px'}, + {at: 0, expect: '0px 0%'}, {at: 0.125, expect: '1px 10% 100px'}, {at: 0.875, expect: '7px 70% 700px'}, {at: 1, expect: '8px 80% 800px'},
diff --git a/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/transform-valid.html b/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/transform-valid.html index 0fb8ee1..89a8b51 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/transform-valid.html +++ b/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/transform-valid.html
@@ -18,6 +18,7 @@ test_valid_value("transform", "matrix(-0.1, -0.2, -0.3, -0.4, -0.5, -0.6)"); test_valid_value("transform", "translate(1px)"); +test_valid_value("transform", "translate(1px, 0%)"); test_valid_value("transform", "translate(2%, -3%)"); test_valid_value("transform", "translateX(-4px)");
diff --git a/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/translate-parsing-valid-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/translate-parsing-valid-expected.txt index 6ab0457..9e1b609 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/translate-parsing-valid-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/translate-parsing-valid-expected.txt
@@ -4,7 +4,7 @@ PASS e.style['translate'] = "100%" should set the property value PASS e.style['translate'] = "100px 0px" should set the property value PASS e.style['translate'] = "100px 0.1px" should set the property value -PASS e.style['translate'] = "100px 0%" should set the property value +FAIL e.style['translate'] = "100px 0%" should set the property value assert_equals: serialization should be canonical expected "100px 0%" but got "100px" FAIL e.style['translate'] = "100px calc(10px - 10%)" should set the property value assert_equals: serialization should be canonical expected "100px calc(-10% + 10px)" but got "100px calc(10px - 10%)" PASS e.style['translate'] = "100px 200%" should set the property value PASS e.style['translate'] = "100% 200px" should set the property value
diff --git a/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/translate-parsing-valid.html b/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/translate-parsing-valid.html index 132e0416..523bc6d 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/translate-parsing-valid.html +++ b/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/translate-parsing-valid.html
@@ -18,7 +18,7 @@ test_valid_value("translate", "100px 0px", "100px"); test_valid_value("translate", "100px 0.1px", "100px 0.1px"); -test_valid_value("translate", "100px 0%", "100px"); +test_valid_value("translate", "100px 0%"); test_valid_value("translate", "100px calc(10px - 10%)", "100px calc(-10% + 10px)"); test_valid_value("translate", "100px 200%"); test_valid_value("translate", "100% 200px");
diff --git a/third_party/blink/web_tests/external/wpt/css/css-ui/parsing/outline-valid-mandatory.html b/third_party/blink/web_tests/external/wpt/css/css-ui/parsing/outline-valid-mandatory.html index c5217185..3c79f5271 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-ui/parsing/outline-valid-mandatory.html +++ b/third_party/blink/web_tests/external/wpt/css/css-ui/parsing/outline-valid-mandatory.html
@@ -16,7 +16,7 @@ test_valid_value("outline", "rgba(10, 20, 30, 0.4)"); test_valid_value("outline", "auto"); -test_valid_value("outline", "none"); // Edge serializes as "invert" +test_valid_value("outline", "none", ["none", "medium"]); // Edge serializes as "invert" test_valid_value("outline", "dotted"); test_valid_value("outline", "dashed"); test_valid_value("outline", "solid"); @@ -30,7 +30,7 @@ test_valid_value("outline", "1px"); test_valid_value("outline", "calc(2em + 3ex)"); test_valid_value("outline", "thin"); -test_valid_value("outline", "medium"); // Edge serializes as "invert" +test_valid_value("outline", "medium", ["none", "medium"]); // Edge serializes as "invert" test_valid_value("outline", "thick"); test_valid_value("outline", "dashed thin");
diff --git a/third_party/blink/web_tests/external/wpt/css/cssom/CSSContainerRule.tentative-expected.txt b/third_party/blink/web_tests/external/wpt/css/cssom/CSSContainerRule.tentative-expected.txt new file mode 100644 index 0000000..d7df92d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/cssom/CSSContainerRule.tentative-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +FAIL @container name (min-width: 100px) {} assert_equals: containerName expected (string) "name" but got (undefined) undefined +FAIL @container (min-width: 100px) {} assert_equals: containerName expected (string) "" but got (undefined) undefined +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/cssom/CSSContainerRule.tentative.html b/third_party/blink/web_tests/external/wpt/css/cssom/CSSContainerRule.tentative.html new file mode 100644 index 0000000..4e01c0b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/cssom/CSSContainerRule.tentative.html
@@ -0,0 +1,35 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSContainerRule</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<style id="sheet"></style> +<script> + const kTests = [ + { + rule: "@container name (min-width: 100px) {}", + name: "name", + query: "(min-width: 100px)", + }, + { + rule: "@container (min-width: 100px) {}", + name: "", + query: "(min-width: 100px)", + }, + ]; + + const sheet = document.getElementById("sheet").sheet; + for (let { rule, name, query } of kTests) { + test(function() { + sheet.insertRule(rule, 0); + let r = sheet.cssRules[0]; + assert_true(r instanceof CSSContainerRule); + assert_equals(r.containerName, name, "containerName"); + assert_equals(r.containerQuery, query, "containerQuery"); + assert_equals(r.conditionText, name ? `${name} ${query}` : query, "conditionText"); + }, rule) + } +</script>
diff --git a/third_party/blink/web_tests/external/wpt/editing/data/inserttext.js b/third_party/blink/web_tests/external/wpt/editing/data/inserttext.js index 59057d03..ca90b9ae 100644 --- a/third_party/blink/web_tests/external/wpt/editing/data/inserttext.js +++ b/third_party/blink/web_tests/external/wpt/editing/data/inserttext.js
@@ -1374,4 +1374,10 @@ "<div style=\"white-space:pre-wrap\">a<br><span style=\"padding:1px\"></span><p>bc</p></div>", [true], {"inserttext":[false,false,"",false,false,""]}], +// https://bugzilla.mozilla.org/show_bug.cgi?id=1785801 +["<div>abc{</div><div>}efg</div>", + [["inserttext", "d"]], + "<div>abcdefg</div>", + [true], + {"inserttext":[false,false,"",false,false,""]}], ]
diff --git "a/third_party/blink/web_tests/external/wpt/html/dom/idlharness.https_exclude=\050Document_Window_HTML._\051-expected.txt" "b/third_party/blink/web_tests/external/wpt/html/dom/idlharness.https_exclude=\050Document_Window_HTML._\051-expected.txt" index e312e1b8..2834183b 100644 --- "a/third_party/blink/web_tests/external/wpt/html/dom/idlharness.https_exclude=\050Document_Window_HTML._\051-expected.txt" +++ "b/third_party/blink/web_tests/external/wpt/html/dom/idlharness.https_exclude=\050Document_Window_HTML._\051-expected.txt"
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 1396 tests; 1365 PASS, 31 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 1390 tests; 1360 PASS, 30 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idl_test setup PASS idl_test validation PASS Partial interface Document: original interface defined @@ -643,12 +643,6 @@ PASS CanvasRenderingContext2D interface: calling arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type PASS CanvasRenderingContext2D interface: calling ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasFilter interface: existence and properties of interface object -FAIL CanvasFilter interface object length assert_equals: wrong value for CanvasFilter.length expected 0 but got 1 -PASS CanvasFilter interface object name -PASS CanvasFilter interface: existence and properties of interface prototype object -PASS CanvasFilter interface: existence and properties of interface prototype object's "constructor" property -PASS CanvasFilter interface: existence and properties of interface prototype object's @@unscopables property PASS CanvasGradient interface: existence and properties of interface object PASS CanvasGradient interface object length PASS CanvasGradient interface object name
diff --git a/third_party/blink/web_tests/external/wpt/html/dom/idlharness.worker-expected.txt b/third_party/blink/web_tests/external/wpt/html/dom/idlharness.worker-expected.txt index 10bb02b..7e83ccd 100644 --- a/third_party/blink/web_tests/external/wpt/html/dom/idlharness.worker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/html/dom/idlharness.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 751 tests; 742 PASS, 9 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 745 tests; 737 PASS, 8 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idl_test setup PASS idl_test validation PASS Partial interface Document: original interface defined @@ -251,12 +251,6 @@ PASS HTMLSlotElement interface: existence and properties of interface object PASS HTMLCanvasElement interface: existence and properties of interface object PASS CanvasRenderingContext2D interface: existence and properties of interface object -PASS CanvasFilter interface: existence and properties of interface object -FAIL CanvasFilter interface object length assert_equals: wrong value for CanvasFilter.length expected 0 but got 1 -PASS CanvasFilter interface object name -PASS CanvasFilter interface: existence and properties of interface prototype object -PASS CanvasFilter interface: existence and properties of interface prototype object's "constructor" property -PASS CanvasFilter interface: existence and properties of interface prototype object's @@unscopables property PASS CanvasGradient interface: existence and properties of interface object PASS CanvasGradient interface object length PASS CanvasGradient interface object name
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations-expected.txt b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations-expected.txt index 82d1f159..8b1e99ba 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations-expected.txt +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 113 tests; 106 PASS, 7 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 113 tests; 108 PASS, 5 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS src set PASS src changed PASS src removed @@ -72,8 +72,8 @@ PASS parent is picture, previous source has type set PASS parent is picture, previous source has type changed PASS parent is picture, previous source has type removed -FAIL srcset is set to same value assert_unreached: update the image data was run Reached unreachable code -FAIL sizes is set to same value assert_unreached: update the image data was run Reached unreachable code +PASS srcset is set to same value +PASS sizes is set to same value PASS crossorigin state not changed: absent, removeAttribute PASS crossorigin state not changed: empty to anonymous PASS crossorigin state not changed: anonymous to foobar
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations.html b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations.html index dc6e52f1..2f1031bf 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/relevant-mutations.html
@@ -95,8 +95,6 @@ <picture><source type=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has type changed"></picture> <picture><source type=""><img src="/images/green-2x2.png" data-desc="parent is picture, previous source has type removed"></picture> -<!-- should not invoke update the image data --> - <img srcset="/images/green-2x2.png" data-desc="srcset is set to same value"> <img srcset="/images/green-2x2.png" sizes data-desc="sizes is set to same value"> @@ -475,11 +473,11 @@ t('srcset is set to same value', function(img) { img.srcset = "/images/green-2x2.png"; - }, 'timeout'); + }, 'load'); t('sizes is set to same value', function(img) { img.sizes = ''; - }, 'timeout'); + }, 'load'); t('crossorigin state not changed: absent, removeAttribute', function(img) { img.removeAttribute('crossorigin');
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt b/third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt deleted file mode 100644 index 9d6f525..0000000 --- a/third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-events-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Test cancel event is fired when the dialog is closed by user interaction Uncaught Error: assert_true: cancel event should be fired before close event expected true got false -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt b/third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt deleted file mode 100644 index ab815bd..0000000 --- a/third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-dialog-element/dialog-cancel-preventDefault-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Test cancel event with preventDefault on cancel event for dialog element Uncaught Error: assert_true: close event should not be fired expected true got false -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-hidden-display.tentative.html b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-hidden-display.tentative.html index d66611a0..acc3c62d 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-hidden-display.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-hidden-display.tentative.html
@@ -3,6 +3,7 @@ <link rel=author href="mailto:masonf@chromium.org"> <link rel=help href="https://open-ui.org/components/popup.research.explainer"> <link rel=match href="popup-hidden-display-ref.tentative.html"> +<meta name=fuzzy content="0-1;0-15"> <div class=nottoplayer popup >This content should be visible and green</div> <div class=nottoplayer popup=invalid style="top:100px;">This content should be visible and green</div>
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/html.idl b/third_party/blink/web_tests/external/wpt/interfaces/html.idl index f17d6810..b8896dc 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/html.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/html.idl
@@ -1364,14 +1364,7 @@ interface mixin CanvasFilters { // filters - attribute (DOMString or CanvasFilter) filter; // (default "none") -}; - -typedef record<DOMString, any> CanvasFilterInput; - -[Exposed=(Window,Worker,PaintWorklet)] -interface CanvasFilter { - constructor(optional (CanvasFilterInput or sequence<CanvasFilterInput>) filters); + attribute DOMString filter; // (default "none") }; interface mixin CanvasRect {
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/mediacapture-viewport.idl b/third_party/blink/web_tests/external/wpt/interfaces/mediacapture-viewport.idl index 187bdf2..a9dcf74 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/mediacapture-viewport.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/mediacapture-viewport.idl
@@ -5,5 +5,10 @@ partial interface MediaDevices { Promise<MediaStream> getViewportMedia( - optional DisplayMediaStreamConstraints constraints = {}); + optional ViewportMediaStreamConstraints constraints = {}); +}; + +dictionary ViewportMediaStreamConstraints { + (boolean or MediaTrackConstraints) video = true; + (boolean or MediaTrackConstraints) audio = false; };
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/resource-timing.idl b/third_party/blink/web_tests/external/wpt/interfaces/resource-timing.idl index 235963b..e8a19f4 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/resource-timing.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/resource-timing.idl
@@ -22,9 +22,15 @@ readonly attribute unsigned long long transferSize; readonly attribute unsigned long long encodedBodySize; readonly attribute unsigned long long decodedBodySize; + readonly attribute RenderBlockingStatusType renderBlockingStatus; [Default] object toJSON(); }; +enum RenderBlockingStatusType { + "blocking", + "non-blocking" +}; + partial interface Performance { undefined clearResourceTimings (); undefined setResourceTimingBufferSize (unsigned long maxSize);
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/screen-capture.idl b/third_party/blink/web_tests/external/wpt/interfaces/screen-capture.idl index 5e684bc4..06b1ae67 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/screen-capture.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/screen-capture.idl
@@ -4,7 +4,7 @@ // Source: Screen Capture (https://w3c.github.io/mediacapture-screen-share/) partial interface MediaDevices { - Promise<MediaStream> getDisplayMedia(optional DisplayMediaStreamConstraints constraints = {}); + Promise<MediaStream> getDisplayMedia(optional DisplayMediaStreamOptions options = {}); }; enum SelfCapturePreferenceEnum { @@ -22,7 +22,7 @@ "exclude" }; -dictionary DisplayMediaStreamConstraints { +dictionary DisplayMediaStreamOptions { (boolean or MediaTrackConstraints) video = true; (boolean or MediaTrackConstraints) audio = false; SelfCapturePreferenceEnum selfBrowserSurface;
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/secure-payment-confirmation.idl b/third_party/blink/web_tests/external/wpt/interfaces/secure-payment-confirmation.idl index d3e26b1..5f1bd93 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/secure-payment-confirmation.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/secure-payment-confirmation.idl
@@ -22,7 +22,7 @@ boolean isPayment; // Only used for authentication. - USVString rp; + USVString rpId; USVString topOrigin; DOMString payeeName; USVString payeeOrigin; @@ -35,7 +35,7 @@ }; dictionary CollectedClientAdditionalPaymentData { - required USVString rp; + required USVString rpId; required USVString topOrigin; DOMString payeeName; USVString payeeOrigin;
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/serial.idl b/third_party/blink/web_tests/external/wpt/interfaces/serial.idl index 8a1231a..ee46a856 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/serial.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/serial.idl
@@ -52,7 +52,7 @@ }; dictionary SerialOptions { - required [EnforceRange] unsigned long baudRate; + [EnforceRange] required unsigned long baudRate; [EnforceRange] octet dataBits = 8; [EnforceRange] octet stopBits = 1; ParityType parity = "none";
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/wai-aria.idl b/third_party/blink/web_tests/external/wpt/interfaces/wai-aria.idl index 5c4926a..61c103c 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/wai-aria.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/wai-aria.idl
@@ -4,56 +4,56 @@ // Source: Accessible Rich Internet Applications (WAI-ARIA) 1.3 (https://w3c.github.io/aria/) interface mixin ARIAMixin { - attribute DOMString? role; - attribute Element? ariaActiveDescendantElement; - attribute DOMString? ariaAtomic; - attribute DOMString? ariaAutoComplete; - attribute DOMString? ariaBusy; - attribute DOMString? ariaChecked; - attribute DOMString? ariaColCount; - attribute DOMString? ariaColIndex; - attribute DOMString? ariaColIndexText; - attribute DOMString? ariaColSpan; - attribute FrozenArray<Element>? ariaControlsElements; - attribute DOMString? ariaCurrent; - attribute FrozenArray<Element>? ariaDescribedByElements; - attribute DOMString? ariaDescription; - attribute FrozenArray<Element>? ariaDetailsElements; - attribute DOMString? ariaDisabled; - attribute Element? ariaErrorMessageElement; - attribute DOMString? ariaExpanded; - attribute FrozenArray<Element>? ariaFlowToElements; - attribute DOMString? ariaHasPopup; - attribute DOMString? ariaHidden; - attribute DOMString? ariaInvalid; - attribute DOMString? ariaKeyShortcuts; - attribute DOMString? ariaLabel; - attribute FrozenArray<Element>? ariaLabelledByElements; - attribute DOMString? ariaLevel; - attribute DOMString? ariaLive; - attribute DOMString? ariaModal; - attribute DOMString? ariaMultiLine; - attribute DOMString? ariaMultiSelectable; - attribute DOMString? ariaOrientation; - attribute FrozenArray<Element>? ariaOwnsElements; - attribute DOMString? ariaPlaceholder; - attribute DOMString? ariaPosInSet; - attribute DOMString? ariaPressed; - attribute DOMString? ariaReadOnly; + [CEReactions] attribute DOMString? role; + [CEReactions] attribute Element? ariaActiveDescendantElement; + [CEReactions] attribute DOMString? ariaAtomic; + [CEReactions] attribute DOMString? ariaAutoComplete; + [CEReactions] attribute DOMString? ariaBusy; + [CEReactions] attribute DOMString? ariaChecked; + [CEReactions] attribute DOMString? ariaColCount; + [CEReactions] attribute DOMString? ariaColIndex; + [CEReactions] attribute DOMString? ariaColIndexText; + [CEReactions] attribute DOMString? ariaColSpan; + [CEReactions] attribute FrozenArray<Element>? ariaControlsElements; + [CEReactions] attribute DOMString? ariaCurrent; + [CEReactions] attribute FrozenArray<Element>? ariaDescribedByElements; + [CEReactions] attribute DOMString? ariaDescription; + [CEReactions] attribute FrozenArray<Element>? ariaDetailsElements; + [CEReactions] attribute DOMString? ariaDisabled; + [CEReactions] attribute Element? ariaErrorMessageElement; + [CEReactions] attribute DOMString? ariaExpanded; + [CEReactions] attribute FrozenArray<Element>? ariaFlowToElements; + [CEReactions] attribute DOMString? ariaHasPopup; + [CEReactions] attribute DOMString? ariaHidden; + [CEReactions] attribute DOMString? ariaInvalid; + [CEReactions] attribute DOMString? ariaKeyShortcuts; + [CEReactions] attribute DOMString? ariaLabel; + [CEReactions] attribute FrozenArray<Element>? ariaLabelledByElements; + [CEReactions] attribute DOMString? ariaLevel; + [CEReactions] attribute DOMString? ariaLive; + [CEReactions] attribute DOMString? ariaModal; + [CEReactions] attribute DOMString? ariaMultiLine; + [CEReactions] attribute DOMString? ariaMultiSelectable; + [CEReactions] attribute DOMString? ariaOrientation; + [CEReactions] attribute FrozenArray<Element>? ariaOwnsElements; + [CEReactions] attribute DOMString? ariaPlaceholder; + [CEReactions] attribute DOMString? ariaPosInSet; + [CEReactions] attribute DOMString? ariaPressed; + [CEReactions] attribute DOMString? ariaReadOnly; - attribute DOMString? ariaRequired; - attribute DOMString? ariaRoleDescription; - attribute DOMString? ariaRowCount; - attribute DOMString? ariaRowIndex; - attribute DOMString? ariaRowIndexText; - attribute DOMString? ariaRowSpan; - attribute DOMString? ariaSelected; - attribute DOMString? ariaSetSize; - attribute DOMString? ariaSort; - attribute DOMString? ariaValueMax; - attribute DOMString? ariaValueMin; - attribute DOMString? ariaValueNow; - attribute DOMString? ariaValueText; + [CEReactions] attribute DOMString? ariaRequired; + [CEReactions] attribute DOMString? ariaRoleDescription; + [CEReactions] attribute DOMString? ariaRowCount; + [CEReactions] attribute DOMString? ariaRowIndex; + [CEReactions] attribute DOMString? ariaRowIndexText; + [CEReactions] attribute DOMString? ariaRowSpan; + [CEReactions] attribute DOMString? ariaSelected; + [CEReactions] attribute DOMString? ariaSetSize; + [CEReactions] attribute DOMString? ariaSort; + [CEReactions] attribute DOMString? ariaValueMax; + [CEReactions] attribute DOMString? ariaValueMin; + [CEReactions] attribute DOMString? ariaValueNow; + [CEReactions] attribute DOMString? ariaValueText; }; Element includes ARIAMixin;
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/webgpu.idl b/third_party/blink/web_tests/external/wpt/interfaces/webgpu.idl index 16db186..f5aa3df 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/webgpu.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/webgpu.idl
@@ -18,6 +18,7 @@ readonly attribute unsigned long maxTextureDimension3D; readonly attribute unsigned long maxTextureArrayLayers; readonly attribute unsigned long maxBindGroups; + readonly attribute unsigned long maxBindingsPerBindGroup; readonly attribute unsigned long maxDynamicUniformBuffersPerPipelineLayout; readonly attribute unsigned long maxDynamicStorageBuffersPerPipelineLayout; readonly attribute unsigned long maxSampledTexturesPerShaderStage; @@ -30,11 +31,13 @@ readonly attribute unsigned long minUniformBufferOffsetAlignment; readonly attribute unsigned long minStorageBufferOffsetAlignment; readonly attribute unsigned long maxVertexBuffers; + readonly attribute unsigned long long maxBufferSize; readonly attribute unsigned long maxVertexAttributes; readonly attribute unsigned long maxVertexBufferArrayStride; readonly attribute unsigned long maxInterStageShaderComponents; readonly attribute unsigned long maxInterStageShaderVariables; readonly attribute unsigned long maxColorAttachments; + readonly attribute unsigned long maxColorAttachmentBytesPerPixel; readonly attribute unsigned long maxComputeWorkgroupStorageSize; readonly attribute unsigned long maxComputeInvocationsPerWorkgroup; readonly attribute unsigned long maxComputeWorkgroupSizeX; @@ -1157,26 +1160,32 @@ readonly attribute Promise<GPUDeviceLostInfo> lost; }; -enum GPUErrorFilter { - "out-of-memory", - "validation" -}; - [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUError { readonly attribute DOMString message; }; [Exposed=(Window, DedicatedWorker), SecureContext] +interface GPUValidationError : GPUError { + constructor(DOMString message); +}; + +[Exposed=(Window, DedicatedWorker), SecureContext] interface GPUOutOfMemoryError : GPUError { constructor(DOMString message); }; [Exposed=(Window, DedicatedWorker), SecureContext] -interface GPUValidationError : GPUError { +interface GPUInternalError : GPUError { constructor(DOMString message); }; +enum GPUErrorFilter { + "validation", + "out-of-memory", + "internal" +}; + partial interface GPUDevice { undefined pushErrorScope(GPUErrorFilter filter); Promise<GPUError?> popErrorScope(); @@ -1188,7 +1197,7 @@ DOMString type, GPUUncapturedErrorEventInit gpuUncapturedErrorEventInitDict ); - readonly attribute GPUError error; + [SameObject] readonly attribute GPUError error; }; dictionary GPUUncapturedErrorEventInit : EventInit {
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/webnn.idl b/third_party/blink/web_tests/external/wpt/interfaces/webnn.idl index 63a0f156..2f900b5 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/webnn.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/webnn.idl
@@ -31,26 +31,20 @@ MLContext createContext(GPUDevice gpuDevice); }; -dictionary MLArrayInput { - required ArrayBufferView resource; - required sequence<long> dimensions; -}; - -typedef record<DOMString, (ArrayBufferView or MLArrayInput)> MLNamedArrayInputs; -typedef record<DOMString, ArrayBufferView> MLNamedArrayOutputs; +typedef record<DOMString, ArrayBufferView> MLNamedArrayBufferViews; [SecureContext, Exposed=(Window, DedicatedWorker)] interface MLContext {}; partial interface MLContext { [Exposed=(DedicatedWorker)] - undefined compute(MLGraph graph, MLNamedArrayInputs inputs, MLNamedArrayOutputs outputs); + undefined compute( + MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs); }; partial interface MLContext { - Promise<undefined> computeAsync(MLGraph graph, MLNamedArrayInputs inputs, - - MLNamedArrayOutputs outputs); + Promise<undefined> computeAsync( + MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs); }; partial interface MLContext { @@ -76,8 +70,7 @@ required MLOperandType type; // The dimensions field is only required for tensor operands. - // The negative value means an unknown dimension. - sequence<long> dimensions; + sequence<unsigned long> dimensions; }; [SecureContext, Exposed=(Window, DedicatedWorker)] @@ -484,13 +477,7 @@ typedef (GPUBuffer or GPUTexture) MLGPUResource; -dictionary MLGPUInput { - required MLGPUResource resource; - required sequence<long> dimensions; -}; - -typedef record<DOMString, (MLGPUResource or MLGPUInput)> MLNamedGPUInputs; -typedef record<DOMString, MLGPUResource> MLNamedGPUOutputs; +typedef record<DOMString, MLGPUResource> MLNamedGPUResources; [SecureContext, Exposed=(Window, DedicatedWorker)] interface MLCommandEncoder {}; @@ -500,7 +487,7 @@ }; partial interface MLCommandEncoder { - undefined dispatch(MLGraph graph, MLNamedGPUInputs inputs, MLNamedGPUOutputs outputs); + undefined dispatch(MLGraph graph, MLNamedGPUResources inputs, MLNamedGPUResources outputs); }; partial interface MLCommandEncoder {
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/webtransport.idl b/third_party/blink/web_tests/external/wpt/interfaces/webtransport.idl index 78f362a..ed21e2c 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/webtransport.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/webtransport.idl
@@ -22,6 +22,7 @@ Promise<WebTransportStats> getStats(); readonly attribute Promise<undefined> ready; readonly attribute WebTransportReliabilityMode reliability; + readonly attribute WebTransportCongestionControl congestionControl; readonly attribute Promise<WebTransportCloseInfo> closed; undefined close(optional WebTransportCloseInfo closeInfo = {}); @@ -51,6 +52,13 @@ boolean allowPooling = false; boolean requireUnreliable = false; sequence<WebTransportHash> serverCertificateHashes; + WebTransportCongestionControl congestionControl = "default"; +}; + +enum WebTransportCongestionControl { + "default", + "throughput", + "low-latency", }; dictionary WebTransportCloseInfo {
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/webxr.idl b/third_party/blink/web_tests/external/wpt/interfaces/webxr.idl index 004f104..939da53 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/webxr.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/webxr.idl
@@ -23,8 +23,8 @@ }; dictionary XRSessionInit { - sequence<any> requiredFeatures; - sequence<any> optionalFeatures; + sequence<DOMString> requiredFeatures; + sequence<DOMString> optionalFeatures; }; enum XRVisibilityState { @@ -40,6 +40,7 @@ readonly attribute Float32Array? supportedFrameRates; [SameObject] readonly attribute XRRenderState renderState; [SameObject] readonly attribute XRInputSourceArray inputSources; + readonly attribute FrozenArray<DOMString> enabledFeatures; // Methods undefined updateRenderState(optional XRRenderStateInit state = {}); @@ -283,11 +284,11 @@ dictionary XRPermissionDescriptor: PermissionDescriptor { XRSessionMode mode; - sequence<any> requiredFeatures; - sequence<any> optionalFeatures; + sequence<DOMString> requiredFeatures; + sequence<DOMString> optionalFeatures; }; [Exposed=Window] interface XRPermissionStatus: PermissionStatus { - attribute FrozenArray<any> granted; + attribute FrozenArray<DOMString> granted; };
diff --git a/third_party/blink/web_tests/external/wpt/navigation-timing/idlharness.window-expected.txt b/third_party/blink/web_tests/external/wpt/navigation-timing/idlharness.window-expected.txt new file mode 100644 index 0000000..8e8e307 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/navigation-timing/idlharness.window-expected.txt
@@ -0,0 +1,150 @@ +This is a testharness.js-based test. +Found 146 tests; 145 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. +PASS idl_test setup +PASS idl_test validation +PASS Partial interface Performance: original interface defined +PASS Partial interface Performance: valid exposure set +PASS Partial interface Performance: member names are unique +PASS Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined +PASS Partial interface mixin WindowOrWorkerGlobalScope: member names are unique +PASS Partial interface Window: member names are unique +PASS Window includes GlobalEventHandlers: member names are unique +PASS Window includes WindowEventHandlers: member names are unique +PASS Window includes WindowOrWorkerGlobalScope: member names are unique +PASS WorkerGlobalScope includes WindowOrWorkerGlobalScope: member names are unique +PASS Window includes AnimationFrameProvider: member names are unique +PASS Window includes WindowSessionStorage: member names are unique +PASS Window includes WindowLocalStorage: member names are unique +PASS PerformanceNavigationTiming interface: existence and properties of interface object +PASS PerformanceNavigationTiming interface object length +PASS PerformanceNavigationTiming interface object name +PASS PerformanceNavigationTiming interface: existence and properties of interface prototype object +PASS PerformanceNavigationTiming interface: existence and properties of interface prototype object's "constructor" property +PASS PerformanceNavigationTiming interface: existence and properties of interface prototype object's @@unscopables property +PASS PerformanceNavigationTiming interface: attribute unloadEventStart +PASS PerformanceNavigationTiming interface: attribute unloadEventEnd +PASS PerformanceNavigationTiming interface: attribute domInteractive +PASS PerformanceNavigationTiming interface: attribute domContentLoadedEventStart +PASS PerformanceNavigationTiming interface: attribute domContentLoadedEventEnd +PASS PerformanceNavigationTiming interface: attribute domComplete +PASS PerformanceNavigationTiming interface: attribute loadEventStart +PASS PerformanceNavigationTiming interface: attribute loadEventEnd +PASS PerformanceNavigationTiming interface: attribute type +PASS PerformanceNavigationTiming interface: attribute redirectCount +PASS PerformanceNavigationTiming interface: operation toJSON() +PASS PerformanceNavigationTiming must be primary interface of performance.getEntriesByType("navigation")[0] +PASS Stringification of performance.getEntriesByType("navigation")[0] +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "unloadEventStart" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "unloadEventEnd" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "domInteractive" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "domContentLoadedEventStart" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "domContentLoadedEventEnd" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "domComplete" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "loadEventStart" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "loadEventEnd" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "type" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "redirectCount" with the proper type +PASS PerformanceNavigationTiming interface: performance.getEntriesByType("navigation")[0] must inherit property "toJSON()" with the proper type +FAIL PerformanceNavigationTiming interface: default toJSON operation on performance.getEntriesByType("navigation")[0] Type RenderBlockingStatusType not found +PASS PerformanceTiming interface: existence and properties of interface object +PASS PerformanceTiming interface object length +PASS PerformanceTiming interface object name +PASS PerformanceTiming interface: existence and properties of interface prototype object +PASS PerformanceTiming interface: existence and properties of interface prototype object's "constructor" property +PASS PerformanceTiming interface: existence and properties of interface prototype object's @@unscopables property +PASS PerformanceTiming interface: attribute navigationStart +PASS PerformanceTiming interface: attribute unloadEventStart +PASS PerformanceTiming interface: attribute unloadEventEnd +PASS PerformanceTiming interface: attribute redirectStart +PASS PerformanceTiming interface: attribute redirectEnd +PASS PerformanceTiming interface: attribute fetchStart +PASS PerformanceTiming interface: attribute domainLookupStart +PASS PerformanceTiming interface: attribute domainLookupEnd +PASS PerformanceTiming interface: attribute connectStart +PASS PerformanceTiming interface: attribute connectEnd +PASS PerformanceTiming interface: attribute secureConnectionStart +PASS PerformanceTiming interface: attribute requestStart +PASS PerformanceTiming interface: attribute responseStart +PASS PerformanceTiming interface: attribute responseEnd +PASS PerformanceTiming interface: attribute domLoading +PASS PerformanceTiming interface: attribute domInteractive +PASS PerformanceTiming interface: attribute domContentLoadedEventStart +PASS PerformanceTiming interface: attribute domContentLoadedEventEnd +PASS PerformanceTiming interface: attribute domComplete +PASS PerformanceTiming interface: attribute loadEventStart +PASS PerformanceTiming interface: attribute loadEventEnd +PASS PerformanceTiming interface: operation toJSON() +PASS PerformanceTiming must be primary interface of performance.timing +PASS Stringification of performance.timing +PASS PerformanceTiming interface: performance.timing must inherit property "navigationStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "unloadEventStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "unloadEventEnd" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "redirectStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "redirectEnd" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "fetchStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "domainLookupStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "domainLookupEnd" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "connectStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "connectEnd" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "secureConnectionStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "requestStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "responseStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "responseEnd" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "domLoading" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "domInteractive" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "domContentLoadedEventStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "domContentLoadedEventEnd" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "domComplete" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "loadEventStart" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "loadEventEnd" with the proper type +PASS PerformanceTiming interface: performance.timing must inherit property "toJSON()" with the proper type +PASS PerformanceTiming interface: default toJSON operation on performance.timing +PASS PerformanceNavigation interface: existence and properties of interface object +PASS PerformanceNavigation interface object length +PASS PerformanceNavigation interface object name +PASS PerformanceNavigation interface: existence and properties of interface prototype object +PASS PerformanceNavigation interface: existence and properties of interface prototype object's "constructor" property +PASS PerformanceNavigation interface: existence and properties of interface prototype object's @@unscopables property +PASS PerformanceNavigation interface: constant TYPE_NAVIGATE on interface object +PASS PerformanceNavigation interface: constant TYPE_NAVIGATE on interface prototype object +PASS PerformanceNavigation interface: constant TYPE_RELOAD on interface object +PASS PerformanceNavigation interface: constant TYPE_RELOAD on interface prototype object +PASS PerformanceNavigation interface: constant TYPE_BACK_FORWARD on interface object +PASS PerformanceNavigation interface: constant TYPE_BACK_FORWARD on interface prototype object +PASS PerformanceNavigation interface: constant TYPE_RESERVED on interface object +PASS PerformanceNavigation interface: constant TYPE_RESERVED on interface prototype object +PASS PerformanceNavigation interface: attribute type +PASS PerformanceNavigation interface: attribute redirectCount +PASS PerformanceNavigation interface: operation toJSON() +PASS PerformanceNavigation must be primary interface of performance.navigation +PASS Stringification of performance.navigation +PASS PerformanceNavigation interface: performance.navigation must inherit property "TYPE_NAVIGATE" with the proper type +PASS PerformanceNavigation interface: performance.navigation must inherit property "TYPE_RELOAD" with the proper type +PASS PerformanceNavigation interface: performance.navigation must inherit property "TYPE_BACK_FORWARD" with the proper type +PASS PerformanceNavigation interface: performance.navigation must inherit property "TYPE_RESERVED" with the proper type +PASS PerformanceNavigation interface: performance.navigation must inherit property "type" with the proper type +PASS PerformanceNavigation interface: performance.navigation must inherit property "redirectCount" with the proper type +PASS PerformanceNavigation interface: performance.navigation must inherit property "toJSON()" with the proper type +PASS PerformanceNavigation interface: default toJSON operation on performance.navigation +PASS Performance interface: existence and properties of interface object +PASS Performance interface object length +PASS Performance interface object name +PASS Performance interface: existence and properties of interface prototype object +PASS Performance interface: existence and properties of interface prototype object's "constructor" property +PASS Performance interface: existence and properties of interface prototype object's @@unscopables property +PASS Performance interface: operation now() +PASS Performance interface: attribute timeOrigin +PASS Performance interface: operation toJSON() +PASS Performance interface: attribute timing +PASS Performance interface: attribute navigation +PASS Performance must be primary interface of performance +PASS Stringification of performance +PASS Performance interface: performance must inherit property "now()" with the proper type +PASS Performance interface: performance must inherit property "timeOrigin" with the proper type +PASS Performance interface: performance must inherit property "toJSON()" with the proper type +PASS Performance interface: default toJSON operation on performance +PASS Performance interface: performance must inherit property "timing" with the proper type +PASS Performance interface: performance must inherit property "navigation" with the proper type +PASS Window interface: attribute performance +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/sanitizer-api/sanitizer-names.https.tentative.html b/third_party/blink/web_tests/external/wpt/sanitizer-api/sanitizer-names.https.tentative.html index 635b797..e963761 100644 --- a/third_party/blink/web_tests/external/wpt/sanitizer-api/sanitizer-names.https.tentative.html +++ b/third_party/blink/web_tests/external/wpt/sanitizer-api/sanitizer-names.https.tentative.html
@@ -65,9 +65,12 @@ [ "potato:math", "<potato:math>Hello</potato:math>", "Hello" ], ].forEach(([elem, probe, expected], index) => { test(t => { - const sanitizer = new Sanitizer({allowElements: [elem]}); - assert_equals(sanitizer.sanitizeFor("template", probe).innerHTML, - expected ?? probe); + const sanitizer = new Sanitizer({allowElements: [elem], + // TODO(https://github.com/WICG/sanitizer-api/issues/167) + allowUnknownMarkup: true}); + const template = document.createElement("template"); + template.setHTML(probe, {sanitizer}); + assert_equals(template.innerHTML, expected ?? probe); }, `Namespaced elements #${index}: allowElements: ["${elem}"]`); }); @@ -81,39 +84,46 @@ [ "href", "<p xlink:href='bla'></p>", "<p></p>" ], ].forEach(([attr, probe, expected], index) => { test(t => { - const sanitizer = new Sanitizer({allowAttributes: {[attr]: ["*"]}}); - assert_equals(sanitizer.sanitizeFor("template", probe).innerHTML, - expected ?? probe); + const sanitizer = new Sanitizer({allowAttributes: {[attr]: ["*"]}, + // TODO(https://github.com/WICG/sanitizer-api/issues/167) + allowUnknownMarkup: true}); + const template = document.createElement("template"); + template.setHTML(probe, {sanitizer}); + assert_equals(template.innerHTML, expected ?? probe); }, `Namespaced attributes #${index}: allowAttributes: {"${attr}": ["*"]}`); }); // Most element and attribute names are lower-cased, but "foreign content" // like SVG and MathML have some mixed-cased names. [ - [ "svg:feBlend", "<feBlend></feBlend>" ], - [ "svg:feColorMatrix", "<feColorMatrix></feColorMatrix>" ], - [ "svg:textPath", "<textPath></textPath>" ], + [ "feBlend", "<feBlend></feBlend>" ], + [ "feColorMatrix", "<feColorMatrix></feColorMatrix>" ], + [ "textPath", "<textPath></textPath>" ], ].forEach(([elem, probe], index) => { const sanitize = (elem, probe) => { - return new Sanitizer({allowElements: ["svg:svg", elem]}). - sanitizeFor("template", `<svg>${probe}</svg`). - content.firstElementChild.innerHTML; + const sanitizer = new Sanitizer({allowElements: ["svg:svg", "svg:" + elem], + // TODO(https://github.com/WICG/sanitizer-api/issues/167) + allowUnknownMarkup: true}); + const template = document.createElement("template"); + template.setHTML(`<svg>${probe}</svg>`, {sanitizer}); + return template.content.firstElementChild.innerHTML; }; test(t => { assert_equals(sanitize(elem, probe), probe); - }, `Mixed-case element names #${index}: "${elem}"`); + }, `Mixed-case element names #${index}: "svg:${elem}"`); test(t => { - assert_not_equals(sanitize(elem.toLowerCase(), probe), probe); - }, `Mixed-case element names #${index}: "${elem.toLowerCase()}"`); + // Lowercase element names should be normalized to mixed-case. + assert_equals(sanitize(elem.toLowerCase(), probe), probe); + }, `Lower-case element names #${index}: "svg:${elem.toLowerCase()}"`); test(t => { assert_not_equals(sanitize(elem.toUpperCase(), probe), probe); - }, `Mixed-case element names #${index}: "${elem.toUpperCase()}"`); + }, `Upper-case element names #${index}: "svg:${elem.toUpperCase()}"`); test(t => { - const elems = [elem]; + const elems = ["svg:" + elem]; assert_array_equals( new Sanitizer({allowElements: elems}).getConfiguration().allowElements, elems); - }, `Mixed case element names #${index}: "${elem}" is preserved in config.`); + }, `Mixed case element names #${index}: "svg:${elem}" is preserved in config.`); }); </script> </body>
diff --git a/third_party/blink/web_tests/external/wpt/webnn/idlharness.https.any-expected.txt b/third_party/blink/web_tests/external/wpt/webnn/idlharness.https.any-expected.txt index e500a0f..e690e792 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/idlharness.https.any-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webnn/idlharness.https.any-expected.txt
@@ -124,13 +124,13 @@ PASS MLContext interface: existence and properties of interface prototype object's "constructor" property PASS MLContext interface: existence and properties of interface prototype object's @@unscopables property PASS MLContext interface: member compute -FAIL MLContext interface: operation computeAsync(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs) assert_own_property: interface prototype object missing non-static operation expected property "computeAsync" missing +FAIL MLContext interface: operation computeAsync(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews) assert_own_property: interface prototype object missing non-static operation expected property "computeAsync" missing FAIL MLContext interface: operation createCommandEncoder() assert_own_property: interface prototype object missing non-static operation expected property "createCommandEncoder" missing FAIL MLContext must be primary interface of context assert_equals: context's prototype is not MLContext.prototype expected object "[object MLContext]" but got object "[object Promise]" FAIL Stringification of context assert_class_string: class string of context expected "[object MLContext]" but got "[object Promise]" PASS MLContext interface: context must not have property "compute" -FAIL MLContext interface: context must inherit property "computeAsync(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs)" with the proper type assert_inherits: property "computeAsync" not found in prototype chain -FAIL MLContext interface: calling computeAsync(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs) on context with too few arguments must throw TypeError assert_inherits: property "computeAsync" not found in prototype chain +FAIL MLContext interface: context must inherit property "computeAsync(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews)" with the proper type assert_inherits: property "computeAsync" not found in prototype chain +FAIL MLContext interface: calling computeAsync(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews) on context with too few arguments must throw TypeError assert_inherits: property "computeAsync" not found in prototype chain FAIL MLContext interface: context must inherit property "createCommandEncoder()" with the proper type assert_inherits: property "createCommandEncoder" not found in prototype chain PASS MLOperand interface: existence and properties of interface object PASS MLOperand interface object length @@ -386,7 +386,7 @@ FAIL MLCommandEncoder interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing FAIL MLCommandEncoder interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing FAIL MLCommandEncoder interface: operation initializeGraph(MLGraph) assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing -FAIL MLCommandEncoder interface: operation dispatch(MLGraph, MLNamedGPUInputs, MLNamedGPUOutputs) assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing +FAIL MLCommandEncoder interface: operation dispatch(MLGraph, MLNamedGPUResources, MLNamedGPUResources) assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing FAIL MLCommandEncoder interface: operation finish(optional GPUCommandBufferDescriptor) assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing PASS Navigator interface: attribute ml PASS Navigator interface: navigator must inherit property "ml" with the proper type
diff --git a/third_party/blink/web_tests/external/wpt/webnn/idlharness.https.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/webnn/idlharness.https.any.worker-expected.txt index 6d099542..53c04a2 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/idlharness.https.any.worker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webnn/idlharness.https.any.worker-expected.txt
@@ -119,15 +119,15 @@ FAIL MLContext interface: existence and properties of interface prototype object assert_own_property: self does not have own property "MLContext" expected property "MLContext" missing FAIL MLContext interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "MLContext" expected property "MLContext" missing FAIL MLContext interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "MLContext" expected property "MLContext" missing -FAIL MLContext interface: operation compute(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs) assert_own_property: self does not have own property "MLContext" expected property "MLContext" missing -FAIL MLContext interface: operation computeAsync(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs) assert_own_property: self does not have own property "MLContext" expected property "MLContext" missing +FAIL MLContext interface: operation compute(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews) assert_own_property: self does not have own property "MLContext" expected property "MLContext" missing +FAIL MLContext interface: operation computeAsync(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews) assert_own_property: self does not have own property "MLContext" expected property "MLContext" missing FAIL MLContext interface: operation createCommandEncoder() assert_own_property: self does not have own property "MLContext" expected property "MLContext" missing FAIL MLContext must be primary interface of context assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" FAIL Stringification of context assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" -FAIL MLContext interface: context must inherit property "compute(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" -FAIL MLContext interface: calling compute(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs) on context with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" -FAIL MLContext interface: context must inherit property "computeAsync(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" -FAIL MLContext interface: calling computeAsync(MLGraph, MLNamedArrayInputs, MLNamedArrayOutputs) on context with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" +FAIL MLContext interface: context must inherit property "compute(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" +FAIL MLContext interface: calling compute(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews) on context with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" +FAIL MLContext interface: context must inherit property "computeAsync(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews)" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" +FAIL MLContext interface: calling computeAsync(MLGraph, MLNamedArrayBufferViews, MLNamedArrayBufferViews) on context with too few arguments must throw TypeError assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" FAIL MLContext interface: context must inherit property "createCommandEncoder()" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "ReferenceError: context is not defined" FAIL MLOperand interface: existence and properties of interface object assert_own_property: self does not have own property "MLOperand" expected property "MLOperand" missing FAIL MLOperand interface object length assert_own_property: self does not have own property "MLOperand" expected property "MLOperand" missing @@ -384,7 +384,7 @@ FAIL MLCommandEncoder interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing FAIL MLCommandEncoder interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing FAIL MLCommandEncoder interface: operation initializeGraph(MLGraph) assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing -FAIL MLCommandEncoder interface: operation dispatch(MLGraph, MLNamedGPUInputs, MLNamedGPUOutputs) assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing +FAIL MLCommandEncoder interface: operation dispatch(MLGraph, MLNamedGPUResources, MLNamedGPUResources) assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing FAIL MLCommandEncoder interface: operation finish(optional GPUCommandBufferDescriptor) assert_own_property: self does not have own property "MLCommandEncoder" expected property "MLCommandEncoder" missing FAIL WorkerNavigator interface: attribute ml assert_true: The prototype object must have a property "ml" expected true got false FAIL WorkerNavigator interface: navigator must inherit property "ml" with the proper type assert_inherits: property "ml" not found in prototype chain
diff --git a/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window-expected.txt b/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window-expected.txt index 67f5439a..71640ab 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 294 tests; 272 PASS, 22 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 296 tests; 272 PASS, 24 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idl_test setup PASS idl_test validation PASS Partial interface Navigator: original interface defined @@ -39,6 +39,7 @@ FAIL XRSession interface: attribute supportedFrameRates assert_true: The prototype object must have a property "supportedFrameRates" expected true got false PASS XRSession interface: attribute renderState PASS XRSession interface: attribute inputSources +FAIL XRSession interface: attribute enabledFeatures assert_true: The prototype object must have a property "enabledFeatures" expected true got false PASS XRSession interface: operation updateRenderState(optional XRRenderStateInit) FAIL XRSession interface: operation updateTargetFrameRate(float) assert_own_property: interface prototype object missing non-static operation expected property "updateTargetFrameRate" missing PASS XRSession interface: operation requestReferenceSpace(XRReferenceSpaceType) @@ -62,6 +63,7 @@ FAIL XRSession interface: xrSession must inherit property "supportedFrameRates" with the proper type assert_inherits: property "supportedFrameRates" not found in prototype chain PASS XRSession interface: xrSession must inherit property "renderState" with the proper type PASS XRSession interface: xrSession must inherit property "inputSources" with the proper type +FAIL XRSession interface: xrSession must inherit property "enabledFeatures" with the proper type assert_inherits: property "enabledFeatures" not found in prototype chain PASS XRSession interface: xrSession must inherit property "updateRenderState(optional XRRenderStateInit)" with the proper type PASS XRSession interface: calling updateRenderState(optional XRRenderStateInit) on xrSession with too few arguments must throw TypeError FAIL XRSession interface: xrSession must inherit property "updateTargetFrameRate(float)" with the proper type assert_inherits: property "updateTargetFrameRate" not found in prototype chain
diff --git a/third_party/blink/web_tests/fast/events/scale-and-scroll-div.html b/third_party/blink/web_tests/fast/events/scale-and-scroll-div.html index 79d54775..ff6688b 100644 --- a/third_party/blink/web_tests/fast/events/scale-and-scroll-div.html +++ b/third_party/blink/web_tests/fast/events/scale-and-scroll-div.html
@@ -33,7 +33,7 @@ if (internals.runtimeFlags.fractionalScrollOffsetsEnabled) expectedScrollDistance = scrollDistance/scaleFactor; else - expectedScrollDistance = Math.floor(scrollDistance/scaleFactor); + expectedScrollDistance = Math.round(scrollDistance/scaleFactor); scrollBox.scrollTop = 0; @@ -63,7 +63,7 @@ if (internals.runtimeFlags.fractionalScrollOffsetsEnabled) expectedScrollDistance = 20 - scrollDistance/scaleFactor; else - expectedScrollDistance = Math.floor(20 - scrollDistance/scaleFactor); + expectedScrollDistance = Math.round(20 - scrollDistance/scaleFactor); assert_approx_equals(scrollBox.scrollTop, expectedScrollDistance,
diff --git a/third_party/blink/web_tests/fast/hidpi/static/gesture-scroll-amount.html b/third_party/blink/web_tests/fast/hidpi/static/gesture-scroll-amount.html index 3db59d2d..3d45e843 100644 --- a/third_party/blink/web_tests/fast/hidpi/static/gesture-scroll-amount.html +++ b/third_party/blink/web_tests/fast/hidpi/static/gesture-scroll-amount.html
@@ -14,17 +14,17 @@ await smoothScrollWithXY(1, 1, 50, 50, GestureSourceType.MOUSE_INPUT, SPEED_INSTANT); await waitFor( () => { - return document.scrollingElement.scrollTop == 1; + return Math.round(document.scrollingElement.scrollTop) == 1; }); - assert_equals(document.scrollingElement.scrollTop, 1); - assert_equals(document.scrollingElement.scrollLeft, 1); + assert_equals(Math.round(document.scrollingElement.scrollTop), 1); + assert_equals(Math.round(document.scrollingElement.scrollLeft), 1); await smoothScrollWithXY(2, 2, 50, 50, GestureSourceType.MOUSE_INPUT, SPEED_INSTANT); await waitFor( () => { - return document.scrollingElement.scrollTop == 3; + return Math.round(document.scrollingElement.scrollTop) == 3; }); - assert_equals(document.scrollingElement.scrollTop, 3); - assert_equals(document.scrollingElement.scrollLeft, 3); + assert_equals(Math.round(document.scrollingElement.scrollTop), 3); + assert_equals(Math.round(document.scrollingElement.scrollLeft), 3); }, "Scrolling in a high dpi settings yeilds in the correct offset"); </script>
diff --git a/third_party/blink/web_tests/fast/hidpi/static/mousewheel-scroll-amount.html b/third_party/blink/web_tests/fast/hidpi/static/mousewheel-scroll-amount.html index 328c8b8..445a8c84 100644 --- a/third_party/blink/web_tests/fast/hidpi/static/mousewheel-scroll-amount.html +++ b/third_party/blink/web_tests/fast/hidpi/static/mousewheel-scroll-amount.html
@@ -27,8 +27,13 @@ }); const {x: expectedScrollX, y: expectedScrollY} = calculateExpectedScroll(document.scrollingElement, 0, pixelsPerTick()); - assert_approx_equals(document.scrollingElement.scrollLeft, expectedScrollX, 0.0001); - assert_approx_equals(document.scrollingElement.scrollTop, expectedScrollY, 0.0001); + if (internals.runtimeFlags.fractionalScrollOffsetsEnabled) { + assert_approx_equals(document.scrollingElement.scrollLeft, expectedScrollX, 0.0001); + assert_approx_equals(document.scrollingElement.scrollTop, expectedScrollY, 0.0001); + } else { + assert_equals(Math.round(document.scrollingElement.scrollLeft), expectedScrollX); + assert_equals(Math.round(document.scrollingElement.scrollTop), expectedScrollY); + } }, "One vertical wheel tick scrolls the right number of pixels in high dpi mode."); promise_test(async () => { @@ -39,8 +44,13 @@ }); const {x: expectedScrollX, y: expectedScrollY} = calculateExpectedScroll(document.scrollingElement, pixelsPerTick(), 0); - assert_approx_equals(document.scrollingElement.scrollLeft, expectedScrollX, 0.0001); - assert_approx_equals(document.scrollingElement.scrollTop, expectedScrollY, 0.0001); + if (internals.runtimeFlags.fractionalScrollOffsetsEnabled) { + assert_approx_equals(document.scrollingElement.scrollLeft, expectedScrollX, 0.0001); + assert_approx_equals(document.scrollingElement.scrollTop, expectedScrollY, 0.0001); + } else { + assert_equals(Math.round(document.scrollingElement.scrollLeft), expectedScrollX); + assert_equals(Math.round(document.scrollingElement.scrollTop), expectedScrollY); + } }, "One horizontal wheel tick scrolls the right number of pixels in high dpi mode."); promise_test(async () => { @@ -51,8 +61,13 @@ }); const {x: expectedScrollX, y: expectedScrollY} = calculateExpectedScroll(document.scrollingElement, 0, pixelsPerTick() * 2); - assert_approx_equals(document.scrollingElement.scrollLeft, expectedScrollX, 0.0001); - assert_approx_equals(document.scrollingElement.scrollTop, expectedScrollY, 0.0001); + if (internals.runtimeFlags.fractionalScrollOffsetsEnabled) { + assert_approx_equals(document.scrollingElement.scrollLeft, expectedScrollX, 0.0001); + assert_approx_equals(document.scrollingElement.scrollTop, expectedScrollY, 0.0001); + } else { + assert_equals(Math.round(document.scrollingElement.scrollLeft), expectedScrollX); + assert_equals(Math.round(document.scrollingElement.scrollTop), expectedScrollY); + } }, "Two vertical wheel ticks scroll the right number of pixels in high dpi mode."); promise_test(async () => { @@ -63,7 +78,12 @@ }); const {x: expectedScrollX, y: expectedScrollY} = calculateExpectedScroll(document.scrollingElement, pixelsPerTick() * 2, 0); - assert_approx_equals(document.scrollingElement.scrollLeft, expectedScrollX, 0.0001); - assert_approx_equals(document.scrollingElement.scrollTop, expectedScrollY, 0.0001); + if (internals.runtimeFlags.fractionalScrollOffsetsEnabled) { + assert_approx_equals(document.scrollingElement.scrollLeft, expectedScrollX, 0.0001); + assert_approx_equals(document.scrollingElement.scrollTop, expectedScrollY, 0.0001); + } else { + assert_equals(Math.round(document.scrollingElement.scrollLeft), expectedScrollX); + assert_equals(Math.round(document.scrollingElement.scrollTop), expectedScrollY); + } }, "Two horizontal wheel ticks scroll the right number of pixels in high dpi mode."); </script>
diff --git a/third_party/blink/web_tests/fast/scroll-snap/snap-to-area-with-fractional-offset.html b/third_party/blink/web_tests/fast/scroll-snap/snap-to-area-with-fractional-offset.html index 9d642455..5ef51c8 100644 --- a/third_party/blink/web_tests/fast/scroll-snap/snap-to-area-with-fractional-offset.html +++ b/third_party/blink/web_tests/fast/scroll-snap/snap-to-area-with-fractional-offset.html
@@ -77,7 +77,9 @@ async function waitForScrollEndWithFractionalValue(targetElement, value) { return waitForScrollEnd(targetElement, () => { - return Math.abs(scrollTop() - value) < 1; + if (internals.runtimeFlags.fractionalScrollOffsetsEnabled) + return Math.abs(scrollTop() - value) < 1; + return Math.abs(scrollTop() - value) <= 1; }, true); }
diff --git a/third_party/blink/web_tests/fast/scrolling/scrollbars/mouse-scrolling-on-root-scrollbar-thumb.html b/third_party/blink/web_tests/fast/scrolling/scrollbars/mouse-scrolling-on-root-scrollbar-thumb.html index 60f555c..de5279f 100644 --- a/third_party/blink/web_tests/fast/scrolling/scrollbars/mouse-scrolling-on-root-scrollbar-thumb.html +++ b/third_party/blink/web_tests/fast/scrolling/scrollbars/mouse-scrolling-on-root-scrollbar-thumb.html
@@ -22,12 +22,12 @@ let x = window.innerWidth - TRACK_WIDTH / 2; let y = BUTTON_WIDTH + 10; let asc_increments = [25, 10, 35, 7, 23]; - let asc_offsets = [45, 64, 128, 141, 183]; - let asc_offsets_mac = [43, 60, 121, 133, 173]; + let asc_offsets = [46, 64, 128, 142, 183]; + let asc_offsets_mac = [43, 61, 122, 134, 174]; let desc_increments = [33, 11, 21, 5, 30]; - let desc_offsets = [122, 102, 64, 55, 0]; - let desc_offsets_mac = [116, 97, 60, 52, 0]; + let desc_offsets = [123, 103, 64, 55, 0]; + let desc_offsets_mac = [116, 97, 61, 52, 0]; await mouseMoveTo(x, y); await mouseDownAt(x, y);
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt index 19b91aa..1fd8caf 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt
@@ -35,10 +35,10 @@ }, { "name": "LayoutBlockFlow (positioned) DIV class='yellow fixed'", + "position": [200, 13], "bounds": [100, 100], "contentsOpaque": true, - "backgroundColor": "#FFFF00", - "transform": 2 + "backgroundColor": "#FFFF00" } ], "transforms": [ @@ -50,15 +50,6 @@ [0, 0, 1, 0], [8, 13, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [200, 13, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt index 3fdc385..11ad1c4 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt
@@ -38,10 +38,10 @@ }, { "name": "LayoutBlockFlow (positioned) DIV class='fixed lime box'", + "position": [10, 100], "bounds": [100, 100], "contentsOpaque": true, - "backgroundColor": "#00FF00", - "transform": 2 + "backgroundColor": "#00FF00" } ], "transforms": [ @@ -53,15 +53,6 @@ [0, 0, 1, 0], [8, 72, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [10, 100, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt index d0697b0..aba2ec5 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt
@@ -9,19 +9,8 @@ }, { "name": "LayoutBlockFlow (positioned) DIV class='fixed'", - "bounds": [39, 20], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [10, 10, 0, 1] - ] + "position": [10, 10], + "bounds": [39, 20] } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt index 460f3cb..46533b2 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt
@@ -24,10 +24,10 @@ }, { "name": "LayoutBlockFlow (positioned) DIV id='fixed'", + "position": [60, 60], "bounds": [80, 80], "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 2 + "backgroundColor": "#008000" }, { "name": "LayoutBlockFlow (relative positioned) DIV class='scrolled'", @@ -54,15 +54,6 @@ [0, 0, 1, 0], [98, 90, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [60, 60, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/rtl/rtl-fixed-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/rtl/rtl-fixed-expected.txt index db9008e..9bfe6a4 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/rtl/rtl-fixed-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/rtl/rtl-fixed-expected.txt
@@ -8,17 +8,17 @@ }, { "name": "LayoutBlockFlow (positioned) DIV class='positioned indicator'", + "position": [50, 50], "bounds": [100, 100], "contentsOpaque": true, - "backgroundColor": "#FF0000", - "transform": 1 + "backgroundColor": "#FF0000" }, { "name": "LayoutBlockFlow (positioned) DIV class='positioned layer'", "bounds": [100, 100], "contentsOpaque": true, "backgroundColor": "#008000", - "transform": 2 + "transform": 1 } ], "transforms": [ @@ -30,15 +30,6 @@ [0, 0, 1, 0], [50, 50, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt index 91cb274..bfe3de9e 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt
@@ -8,17 +8,17 @@ }, { "name": "LayoutBlockFlow (positioned) DIV class='fixedpos'", + "position": [0, 50], "bounds": [800, 550], "contentsOpaque": true, - "backgroundColor": "#ADD8E6", - "transform": 1 + "backgroundColor": "#ADD8E6" }, { "name": "LayoutBlockFlow (positioned) DIV class='compositedlayer'", "bounds": [24, 100], "contentsOpaque": true, "backgroundColor": "#D3D3D3", - "transform": 2 + "transform": 1 }, { "name": "LayoutBlockFlow (positioned) DIV class='notsquashedelement'", @@ -34,15 +34,6 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, 50, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], [400, 40, 0, 1] ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt index c7b6cbf4..7349f23 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt
@@ -15,20 +15,13 @@ }, { "name": "LayoutBlockFlow (positioned) DIV", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#D3D3D3", - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='foo'", - "bounds": [100, 100], + "position": [8, 25], + "bounds": [100, 125], "contentsOpaque": true, "backgroundColor": "#FF0000", "invalidations": [ - [0, 0, 100, 100] - ], - "transform": 3 + [0, 25, 100, 100] + ] } ], "transforms": [ @@ -40,24 +33,6 @@ [0, 0, 1, 0], [8, 8, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 25, 0, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 50, 0, 1] - ] } ] } @@ -78,20 +53,13 @@ }, { "name": "LayoutBlockFlow (positioned) DIV", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#D3D3D3", - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='foo'", - "bounds": [100, 100], + "position": [8, 25], + "bounds": [100, 125], "contentsOpaque": true, "backgroundColor": "#0000FF", "invalidations": [ - [0, 0, 100, 100] - ], - "transform": 3 + [0, 25, 100, 100] + ] } ], "transforms": [ @@ -103,24 +71,6 @@ [0, 0, 1, 0], [8, 8, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 25, 0, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 50, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/clip/overflow-border-radius-fixed-position-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/clip/overflow-border-radius-fixed-position-expected.png index fd2cfd5..5a9afca2 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/clip/overflow-border-radius-fixed-position-expected.png +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/clip/overflow-border-radius-fixed-position-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/table/multiple-captions-display-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/table/multiple-captions-display-expected.png deleted file mode 100644 index 20660354..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/table/multiple-captions-display-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/compositing/containing-block-removed-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/compositing/containing-block-removed-expected.txt index 5c0799c..8c38f095 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/compositing/containing-block-removed-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/compositing/containing-block-removed-expected.txt
@@ -18,13 +18,13 @@ }, { "name": "LayoutBlockFlow (positioned) DIV class='fixed'", + "position": [50, 50], "bounds": [75, 75], "contentsOpaque": true, "backgroundColor": "#008000", "invalidations": [ [0, 0, 75, 75] - ], - "transform": 2 + ] } ], "transforms": [ @@ -36,15 +36,6 @@ [0, 0, 1, 0], [200, 100, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/compositing/containing-block-removed-individual-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/compositing/containing-block-removed-individual-expected.txt index 6693d29..1708ba96 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/compositing/containing-block-removed-individual-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/compositing/containing-block-removed-individual-expected.txt
@@ -19,13 +19,13 @@ }, { "name": "LayoutBlockFlow (positioned) DIV class='fixed'", + "position": [50, 50], "bounds": [75, 75], "contentsOpaque": true, "backgroundColor": "#008000", "invalidations": [ [0, 0, 75, 75] - ], - "transform": 2 + ] } ], "transforms": [ @@ -37,15 +37,6 @@ [0, 0, 1, 0], [200, 100, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/flexbox/repaint-on-layout-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/flexbox/repaint-on-layout-expected.txt index 007112b..aa4bba7 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/flexbox/repaint-on-layout-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/flexbox/repaint-on-layout-expected.txt
@@ -11,21 +11,10 @@ }, { "name": "LayoutFlexibleBox (positioned) NAV class='nav-bar'", + "position": [8, 0], "bounds": [200, 600], "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 0, 0, 1] - ] + "backgroundColor": "#008000" } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/fixed-element-repaint-after-compositing-update-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/fixed-element-repaint-after-compositing-update-expected.txt index e9046b4..4a64cf7 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/fixed-element-repaint-after-compositing-update-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/fixed-element-repaint-after-compositing-update-expected.txt
@@ -8,36 +8,12 @@ }, { "name": "LayoutBlockFlow (positioned) DIV id='fixedOverlapping'", - "bounds": [800, 600], + "position": [8, 88], + "bounds": [792, 512], "contentsOpaqueForText": true, - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='moveMe'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 88, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [150, 150, 0, 1] + "invalidations": [ + [142, 62, 100, 100], + [0, 0, 100, 100] ] } ]
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/fixed-margin-change-repaint-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/fixed-margin-change-repaint-expected.txt index 41da0aa..b6c4ad5 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/fixed-margin-change-repaint-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/fixed-margin-change-repaint-expected.txt
@@ -8,21 +8,10 @@ }, { "name": "LayoutBlockFlow (positioned) DIV id='test'", + "position": [0, 60], "bounds": [100, 100], "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 60, 0, 1] - ] + "backgroundColor": "#008000" } ] }
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/position-change-keeping-geometry-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/position-change-keeping-geometry-expected.txt index 71b5026..a703212 100644 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/position-change-keeping-geometry-expected.txt +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/paint/invalidation/position/position-change-keeping-geometry-expected.txt
@@ -12,23 +12,12 @@ }, { "name": "LayoutBlockFlow (positioned) DIV id='target3'", + "position": [420, 20], "bounds": [100, 100], "contentsOpaque": true, "backgroundColor": "#0000FF", "invalidations": [ [0, 0, 100, 100] - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [420, 20, 0, 1] ] } ]
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/compositing/checkerboard-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/compositing/checkerboard-expected.png index 0c5703c..95e575a 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/compositing/checkerboard-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/compositing/checkerboard-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/compositor_threaded_scrollbar_scrolling/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/virtual/compositor_threaded_scrollbar_scrolling/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky-expected.txt index 1192fdd..5cb4cee 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/compositor_threaded_scrollbar_scrolling/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/compositor_threaded_scrollbar_scrolling/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky-expected.txt
@@ -68,7 +68,7 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, -52.5, 0, 1] + [0, -53, 0, 1] ] }, { @@ -78,7 +78,7 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, 52.5, 0, 1] + [0, 53, 0, 1] ] } ]
diff --git a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/virtual/android/fullscreen/full-screen-is-in-top-layer-expected.png b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/virtual/android/fullscreen/full-screen-is-in-top-layer-expected.png index 6a363a7..43a4475 100644 --- a/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/virtual/android/fullscreen/full-screen-is-in-top-layer-expected.png +++ b/third_party/blink/web_tests/flag-specific/skia-vulkan-swiftshader/virtual/android/fullscreen/full-screen-is-in-top-layer-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/paint/invalidation/compositing/containing-block-removed-expected.txt b/third_party/blink/web_tests/paint/invalidation/compositing/containing-block-removed-expected.txt index 176b4b0..0c5fa48f 100644 --- a/third_party/blink/web_tests/paint/invalidation/compositing/containing-block-removed-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/compositing/containing-block-removed-expected.txt
@@ -18,13 +18,13 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV class='fixed'", + "position": [50, 50], "bounds": [75, 75], "contentsOpaque": true, "backgroundColor": "#008000", "invalidations": [ [0, 0, 75, 75] - ], - "transform": 2 + ] } ], "transforms": [ @@ -36,15 +36,6 @@ [0, 0, 1, 0], [200, 100, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/paint/invalidation/compositing/containing-block-removed-individual-expected.txt b/third_party/blink/web_tests/paint/invalidation/compositing/containing-block-removed-individual-expected.txt index 31a891f..0b6e1b07 100644 --- a/third_party/blink/web_tests/paint/invalidation/compositing/containing-block-removed-individual-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/compositing/containing-block-removed-individual-expected.txt
@@ -19,13 +19,13 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV class='fixed'", + "position": [50, 50], "bounds": [75, 75], "contentsOpaque": true, "backgroundColor": "#008000", "invalidations": [ [0, 0, 75, 75] - ], - "transform": 2 + ] } ], "transforms": [ @@ -37,15 +37,6 @@ [0, 0, 1, 0], [200, 100, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/paint/invalidation/flexbox/repaint-on-layout-expected.txt b/third_party/blink/web_tests/paint/invalidation/flexbox/repaint-on-layout-expected.txt index 4d28c6c..fdf61f8a 100644 --- a/third_party/blink/web_tests/paint/invalidation/flexbox/repaint-on-layout-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/flexbox/repaint-on-layout-expected.txt
@@ -11,21 +11,10 @@ }, { "name": "LayoutNGFlexibleBox (positioned) NAV class='nav-bar'", + "position": [8, 0], "bounds": [200, 600], "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 0, 0, 1] - ] + "backgroundColor": "#008000" } ] }
diff --git a/third_party/blink/web_tests/paint/invalidation/position/fixed-margin-change-repaint-expected.txt b/third_party/blink/web_tests/paint/invalidation/position/fixed-margin-change-repaint-expected.txt index 0f1fd89..cffd74ff 100644 --- a/third_party/blink/web_tests/paint/invalidation/position/fixed-margin-change-repaint-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/position/fixed-margin-change-repaint-expected.txt
@@ -8,21 +8,10 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV id='test'", + "position": [0, 60], "bounds": [100, 100], "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 60, 0, 1] - ] + "backgroundColor": "#008000" } ] }
diff --git a/third_party/blink/web_tests/paint/invalidation/position/position-change-keeping-geometry-expected.txt b/third_party/blink/web_tests/paint/invalidation/position/position-change-keeping-geometry-expected.txt index 44c1e6f..62af46b 100644 --- a/third_party/blink/web_tests/paint/invalidation/position/position-change-keeping-geometry-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/position/position-change-keeping-geometry-expected.txt
@@ -12,23 +12,12 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV id='target3'", + "position": [420, 20], "bounds": [100, 100], "contentsOpaque": true, "backgroundColor": "#0000FF", "invalidations": [ [0, 0, 100, 100] - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [420, 20, 0, 1] ] } ]
diff --git a/third_party/blink/web_tests/platform/linux/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt b/third_party/blink/web_tests/platform/linux/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt index df08b9d..8837496 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt +++ b/third_party/blink/web_tests/platform/linux/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt
@@ -9,19 +9,8 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV class='fixed'", - "bounds": [39, 20], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [10, 10, 0, 1] - ] + "position": [10, 10], + "bounds": [39, 20] } ] }
diff --git a/third_party/blink/web_tests/platform/linux/fast/clip/overflow-border-radius-fixed-position-expected.png b/third_party/blink/web_tests/platform/linux/fast/clip/overflow-border-radius-fixed-position-expected.png index 4906f6f..2945081 100644 --- a/third_party/blink/web_tests/platform/linux/fast/clip/overflow-border-radius-fixed-position-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/clip/overflow-border-radius-fixed-position-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/table/multiple-captions-display-expected.png b/third_party/blink/web_tests/platform/linux/fast/table/multiple-captions-display-expected.png index 20660354..3a3808f9 100644 --- a/third_party/blink/web_tests/platform/linux/fast/table/multiple-captions-display-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/table/multiple-captions-display-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fullscreen/full-screen-is-in-top-layer-expected.png b/third_party/blink/web_tests/platform/linux/fullscreen/full-screen-is-in-top-layer-expected.png index 8d4947c..d948832 100644 --- a/third_party/blink/web_tests/platform/linux/fullscreen/full-screen-is-in-top-layer-expected.png +++ b/third_party/blink/web_tests/platform/linux/fullscreen/full-screen-is-in-top-layer-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/android/fullscreen/full-screen-is-in-top-layer-expected.png b/third_party/blink/web_tests/platform/linux/virtual/android/fullscreen/full-screen-is-in-top-layer-expected.png index 8d4947c..d948832 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/android/fullscreen/full-screen-is-in-top-layer-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/android/fullscreen/full-screen-is-in-top-layer-expected.png Binary files differ
diff --git "a/third_party/blink/web_tests/platform/mac-mac12-arm64/external/wpt/html/dom/idlharness.https_exclude=\050Document_Window_HTML._\051-expected.txt" "b/third_party/blink/web_tests/platform/mac-mac12-arm64/external/wpt/html/dom/idlharness.https_exclude=\050Document_Window_HTML._\051-expected.txt" deleted file mode 100644 index 7cee8f3..0000000 --- "a/third_party/blink/web_tests/platform/mac-mac12-arm64/external/wpt/html/dom/idlharness.https_exclude=\050Document_Window_HTML._\051-expected.txt" +++ /dev/null
@@ -1,1463 +0,0 @@ -This is a testharness.js-based test. -Found 1459 tests; 1422 PASS, 37 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS idl_test setup -PASS idl_test validation -PASS Partial interface Document: original interface defined -PASS Partial interface Document: member names are unique -PASS Partial interface mixin DocumentOrShadowRoot: original interface mixin defined -PASS Partial interface mixin DocumentOrShadowRoot: member names are unique -PASS Partial interface mixin NavigatorID: original interface mixin defined -PASS Partial interface mixin NavigatorID: member names are unique -PASS Partial interface HTMLAnchorElement: original interface defined -PASS Partial interface HTMLAnchorElement: member names are unique -PASS Partial interface HTMLAreaElement: original interface defined -PASS Partial interface HTMLAreaElement: member names are unique -PASS Partial interface HTMLBodyElement: original interface defined -PASS Partial interface HTMLBodyElement: member names are unique -PASS Partial interface HTMLBRElement: original interface defined -PASS Partial interface HTMLBRElement: member names are unique -PASS Partial interface HTMLTableCaptionElement: original interface defined -PASS Partial interface HTMLTableCaptionElement: member names are unique -PASS Partial interface HTMLTableColElement: original interface defined -PASS Partial interface HTMLTableColElement: member names are unique -PASS Partial interface HTMLDivElement: original interface defined -PASS Partial interface HTMLDivElement: member names are unique -PASS Partial interface HTMLDListElement: original interface defined -PASS Partial interface HTMLDListElement: member names are unique -PASS Partial interface HTMLEmbedElement: original interface defined -PASS Partial interface HTMLEmbedElement: member names are unique -PASS Partial interface HTMLHeadingElement: original interface defined -PASS Partial interface HTMLHeadingElement: member names are unique -PASS Partial interface HTMLHRElement: original interface defined -PASS Partial interface HTMLHRElement: member names are unique -PASS Partial interface HTMLHtmlElement: original interface defined -PASS Partial interface HTMLHtmlElement: member names are unique -PASS Partial interface HTMLIFrameElement: original interface defined -PASS Partial interface HTMLIFrameElement: member names are unique -PASS Partial interface HTMLImageElement: original interface defined -PASS Partial interface HTMLImageElement: member names are unique -PASS Partial interface HTMLInputElement: original interface defined -PASS Partial interface HTMLInputElement: member names are unique -PASS Partial interface HTMLLegendElement: original interface defined -PASS Partial interface HTMLLegendElement: member names are unique -PASS Partial interface HTMLLIElement: original interface defined -PASS Partial interface HTMLLIElement: member names are unique -PASS Partial interface HTMLLinkElement: original interface defined -PASS Partial interface HTMLLinkElement: member names are unique -PASS Partial interface HTMLMenuElement: original interface defined -PASS Partial interface HTMLMenuElement: member names are unique -PASS Partial interface HTMLMetaElement: original interface defined -PASS Partial interface HTMLMetaElement: member names are unique -PASS Partial interface HTMLObjectElement: original interface defined -PASS Partial interface HTMLObjectElement: member names are unique -PASS Partial interface HTMLOListElement: original interface defined -PASS Partial interface HTMLOListElement: member names are unique -PASS Partial interface HTMLParagraphElement: original interface defined -PASS Partial interface HTMLParagraphElement: member names are unique -PASS Partial interface HTMLParamElement: original interface defined -PASS Partial interface HTMLParamElement: member names are unique -PASS Partial interface HTMLPreElement: original interface defined -PASS Partial interface HTMLPreElement: member names are unique -PASS Partial interface HTMLStyleElement: original interface defined -PASS Partial interface HTMLStyleElement: member names are unique -PASS Partial interface HTMLScriptElement: original interface defined -PASS Partial interface HTMLScriptElement: member names are unique -PASS Partial interface HTMLTableElement: original interface defined -PASS Partial interface HTMLTableElement: member names are unique -PASS Partial interface HTMLTableSectionElement: original interface defined -PASS Partial interface HTMLTableSectionElement: member names are unique -PASS Partial interface HTMLTableCellElement: original interface defined -PASS Partial interface HTMLTableCellElement: member names are unique -PASS Partial interface HTMLTableRowElement: original interface defined -PASS Partial interface HTMLTableRowElement: member names are unique -PASS Partial interface HTMLUListElement: original interface defined -PASS Partial interface HTMLUListElement: member names are unique -PASS Partial interface Document[2]: original interface defined -PASS Partial interface Document[2]: member names are unique -PASS Partial interface Window: original interface defined -PASS Partial interface Window: member names are unique -PASS Partial interface Document[3]: member names are unique -PASS Partial interface mixin DocumentOrShadowRoot[2]: member names are unique -PASS Partial interface UIEvent: member names are unique -PASS Partial interface MouseEvent: member names are unique -PASS Partial interface UIEvent[2]: member names are unique -PASS Partial dictionary UIEventInit: member names are unique -PASS Document includes GlobalEventHandlers: member names are unique -PASS Document includes DocumentAndElementEventHandlers: member names are unique -PASS HTMLElement includes GlobalEventHandlers: member names are unique -PASS HTMLElement includes DocumentAndElementEventHandlers: member names are unique -PASS HTMLElement includes ElementContentEditable: member names are unique -PASS HTMLElement includes HTMLOrSVGElement: member names are unique -PASS HTMLLinkElement includes LinkStyle: member names are unique -PASS HTMLStyleElement includes LinkStyle: member names are unique -PASS HTMLBodyElement includes WindowEventHandlers: member names are unique -PASS HTMLAnchorElement includes HTMLHyperlinkElementUtils: member names are unique -PASS HTMLAreaElement includes HTMLHyperlinkElementUtils: member names are unique -PASS CanvasRenderingContext2D includes CanvasState: member names are unique -PASS CanvasRenderingContext2D includes CanvasTransform: member names are unique -PASS CanvasRenderingContext2D includes CanvasCompositing: member names are unique -PASS CanvasRenderingContext2D includes CanvasImageSmoothing: member names are unique -PASS CanvasRenderingContext2D includes CanvasFillStrokeStyles: member names are unique -PASS CanvasRenderingContext2D includes CanvasShadowStyles: member names are unique -PASS CanvasRenderingContext2D includes CanvasFilters: member names are unique -PASS CanvasRenderingContext2D includes CanvasRect: member names are unique -PASS CanvasRenderingContext2D includes CanvasDrawPath: member names are unique -PASS CanvasRenderingContext2D includes CanvasUserInterface: member names are unique -PASS CanvasRenderingContext2D includes CanvasText: member names are unique -PASS CanvasRenderingContext2D includes CanvasDrawImage: member names are unique -PASS CanvasRenderingContext2D includes CanvasImageData: member names are unique -PASS CanvasRenderingContext2D includes CanvasPathDrawingStyles: member names are unique -PASS CanvasRenderingContext2D includes CanvasTextDrawingStyles: member names are unique -PASS CanvasRenderingContext2D includes CanvasPath: member names are unique -PASS Path2D includes CanvasPath: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasState: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasTransform: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasCompositing: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasImageSmoothing: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasFillStrokeStyles: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasShadowStyles: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasFilters: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasRect: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasDrawPath: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasText: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasDrawImage: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasImageData: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasPathDrawingStyles: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasTextDrawingStyles: member names are unique -PASS OffscreenCanvasRenderingContext2D includes CanvasPath: member names are unique -PASS ElementInternals includes ARIAMixin: member names are unique -PASS Window includes GlobalEventHandlers: member names are unique -PASS Window includes WindowEventHandlers: member names are unique -PASS Window includes WindowOrWorkerGlobalScope: member names are unique -PASS WorkerGlobalScope includes WindowOrWorkerGlobalScope: member names are unique -PASS Navigator includes NavigatorID: member names are unique -PASS Navigator includes NavigatorLanguage: member names are unique -PASS Navigator includes NavigatorOnLine: member names are unique -PASS Navigator includes NavigatorContentUtils: member names are unique -PASS Navigator includes NavigatorCookies: member names are unique -PASS Navigator includes NavigatorPlugins: member names are unique -PASS Navigator includes NavigatorConcurrentHardware: member names are unique -PASS Window includes AnimationFrameProvider: member names are unique -PASS DedicatedWorkerGlobalScope includes AnimationFrameProvider: member names are unique -PASS Worker includes AbstractWorker: member names are unique -PASS SharedWorker includes AbstractWorker: member names are unique -PASS WorkerNavigator includes NavigatorID: member names are unique -PASS WorkerNavigator includes NavigatorLanguage: member names are unique -PASS WorkerNavigator includes NavigatorOnLine: member names are unique -PASS WorkerNavigator includes NavigatorConcurrentHardware: member names are unique -PASS Window includes WindowSessionStorage: member names are unique -PASS Window includes WindowLocalStorage: member names are unique -PASS HTMLFrameSetElement includes WindowEventHandlers: member names are unique -PASS Element includes ARIAMixin: member names are unique -PASS SVGElement includes GlobalEventHandlers: member names are unique -PASS SVGElement includes DocumentAndElementEventHandlers: member names are unique -PASS SVGElement includes SVGElementInstance: member names are unique -PASS SVGElement includes HTMLOrSVGElement: member names are unique -PASS SVGGraphicsElement includes SVGTests: member names are unique -PASS SVGSVGElement includes SVGFitToViewBox: member names are unique -PASS SVGSVGElement includes WindowEventHandlers: member names are unique -PASS SVGImageElement includes SVGURIReference: member names are unique -PASS SVGScriptElement includes SVGURIReference: member names are unique -PASS HTMLElement includes ElementCSSInlineStyle: member names are unique -PASS SVGElement includes ElementCSSInlineStyle: member names are unique -PASS Document includes NonElementParentNode: member names are unique -PASS DocumentFragment includes NonElementParentNode: member names are unique -PASS Document includes DocumentOrShadowRoot: member names are unique -PASS ShadowRoot includes DocumentOrShadowRoot: member names are unique -PASS Document includes ParentNode: member names are unique -PASS DocumentFragment includes ParentNode: member names are unique -PASS Element includes ParentNode: member names are unique -PASS Element includes NonDocumentTypeChildNode: member names are unique -PASS Element includes ChildNode: member names are unique -PASS Element includes Slottable: member names are unique -PASS Document includes XPathEvaluatorBase: member names are unique -PASS RadioNodeList interface: existence and properties of interface object -PASS RadioNodeList interface object length -PASS RadioNodeList interface object name -PASS RadioNodeList interface: existence and properties of interface prototype object -PASS RadioNodeList interface: existence and properties of interface prototype object's "constructor" property -PASS RadioNodeList interface: existence and properties of interface prototype object's @@unscopables property -PASS RadioNodeList interface: attribute value -PASS DOMStringList interface: existence and properties of interface object -PASS DOMStringList interface object length -PASS DOMStringList interface object name -PASS DOMStringList interface: existence and properties of interface prototype object -PASS DOMStringList interface: existence and properties of interface prototype object's "constructor" property -PASS DOMStringList interface: existence and properties of interface prototype object's @@unscopables property -PASS DOMStringList interface: attribute length -PASS DOMStringList interface: operation item(unsigned long) -PASS DOMStringList interface: operation contains(DOMString) -PASS DOMStringList must be primary interface of location.ancestorOrigins -PASS Stringification of location.ancestorOrigins -PASS DOMStringList interface: location.ancestorOrigins must inherit property "length" with the proper type -PASS DOMStringList interface: location.ancestorOrigins must inherit property "item(unsigned long)" with the proper type -PASS DOMStringList interface: calling item(unsigned long) on location.ancestorOrigins with too few arguments must throw TypeError -PASS DOMStringList interface: location.ancestorOrigins must inherit property "contains(DOMString)" with the proper type -PASS DOMStringList interface: calling contains(DOMString) on location.ancestorOrigins with too few arguments must throw TypeError -PASS DOMStringMap interface: existence and properties of interface object -PASS DOMStringMap interface object length -PASS DOMStringMap interface object name -PASS DOMStringMap interface: existence and properties of interface prototype object -PASS DOMStringMap interface: existence and properties of interface prototype object's "constructor" property -PASS DOMStringMap interface: existence and properties of interface prototype object's @@unscopables property -PASS DOMStringMap must be primary interface of document.head.dataset -PASS Stringification of document.head.dataset -PASS MediaError interface: existence and properties of interface object -PASS MediaError interface object length -PASS MediaError interface object name -PASS MediaError interface: existence and properties of interface prototype object -PASS MediaError interface: existence and properties of interface prototype object's "constructor" property -PASS MediaError interface: existence and properties of interface prototype object's @@unscopables property -PASS MediaError interface: constant MEDIA_ERR_ABORTED on interface object -PASS MediaError interface: constant MEDIA_ERR_ABORTED on interface prototype object -PASS MediaError interface: constant MEDIA_ERR_NETWORK on interface object -PASS MediaError interface: constant MEDIA_ERR_NETWORK on interface prototype object -PASS MediaError interface: constant MEDIA_ERR_DECODE on interface object -PASS MediaError interface: constant MEDIA_ERR_DECODE on interface prototype object -PASS MediaError interface: constant MEDIA_ERR_SRC_NOT_SUPPORTED on interface object -PASS MediaError interface: constant MEDIA_ERR_SRC_NOT_SUPPORTED on interface prototype object -PASS MediaError interface: attribute code -PASS MediaError interface: attribute message -PASS MediaError must be primary interface of errorVideo.error -PASS Stringification of errorVideo.error -PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_ABORTED" with the proper type -PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_NETWORK" with the proper type -PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_DECODE" with the proper type -PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_SRC_NOT_SUPPORTED" with the proper type -PASS MediaError interface: errorVideo.error must inherit property "code" with the proper type -PASS MediaError interface: errorVideo.error must inherit property "message" with the proper type -PASS AudioTrackList interface: existence and properties of interface object -PASS AudioTrackList interface object length -PASS AudioTrackList interface object name -PASS AudioTrackList interface: existence and properties of interface prototype object -PASS AudioTrackList interface: existence and properties of interface prototype object's "constructor" property -PASS AudioTrackList interface: existence and properties of interface prototype object's @@unscopables property -PASS AudioTrackList interface: attribute length -PASS AudioTrackList interface: operation getTrackById(DOMString) -PASS AudioTrackList interface: attribute onchange -PASS AudioTrackList interface: attribute onaddtrack -PASS AudioTrackList interface: attribute onremovetrack -PASS AudioTrack interface: existence and properties of interface object -PASS AudioTrack interface object length -PASS AudioTrack interface object name -PASS AudioTrack interface: existence and properties of interface prototype object -PASS AudioTrack interface: existence and properties of interface prototype object's "constructor" property -PASS AudioTrack interface: existence and properties of interface prototype object's @@unscopables property -PASS AudioTrack interface: attribute id -PASS AudioTrack interface: attribute kind -PASS AudioTrack interface: attribute label -PASS AudioTrack interface: attribute language -PASS AudioTrack interface: attribute enabled -PASS VideoTrackList interface: existence and properties of interface object -PASS VideoTrackList interface object length -PASS VideoTrackList interface object name -PASS VideoTrackList interface: existence and properties of interface prototype object -PASS VideoTrackList interface: existence and properties of interface prototype object's "constructor" property -PASS VideoTrackList interface: existence and properties of interface prototype object's @@unscopables property -PASS VideoTrackList interface: attribute length -PASS VideoTrackList interface: operation getTrackById(DOMString) -PASS VideoTrackList interface: attribute selectedIndex -PASS VideoTrackList interface: attribute onchange -PASS VideoTrackList interface: attribute onaddtrack -PASS VideoTrackList interface: attribute onremovetrack -PASS VideoTrack interface: existence and properties of interface object -PASS VideoTrack interface object length -PASS VideoTrack interface object name -PASS VideoTrack interface: existence and properties of interface prototype object -PASS VideoTrack interface: existence and properties of interface prototype object's "constructor" property -PASS VideoTrack interface: existence and properties of interface prototype object's @@unscopables property -PASS VideoTrack interface: attribute id -PASS VideoTrack interface: attribute kind -PASS VideoTrack interface: attribute label -PASS VideoTrack interface: attribute language -PASS VideoTrack interface: attribute selected -PASS TextTrackList interface: existence and properties of interface object -PASS TextTrackList interface object length -PASS TextTrackList interface object name -PASS TextTrackList interface: existence and properties of interface prototype object -PASS TextTrackList interface: existence and properties of interface prototype object's "constructor" property -PASS TextTrackList interface: existence and properties of interface prototype object's @@unscopables property -PASS TextTrackList interface: attribute length -PASS TextTrackList interface: operation getTrackById(DOMString) -PASS TextTrackList interface: attribute onchange -PASS TextTrackList interface: attribute onaddtrack -PASS TextTrackList interface: attribute onremovetrack -PASS TextTrackList must be primary interface of document.createElement("video").textTracks -PASS Stringification of document.createElement("video").textTracks -PASS TextTrackList interface: document.createElement("video").textTracks must inherit property "length" with the proper type -PASS TextTrackList interface: document.createElement("video").textTracks must inherit property "getTrackById(DOMString)" with the proper type -PASS TextTrackList interface: calling getTrackById(DOMString) on document.createElement("video").textTracks with too few arguments must throw TypeError -PASS TextTrackList interface: document.createElement("video").textTracks must inherit property "onchange" with the proper type -PASS TextTrackList interface: document.createElement("video").textTracks must inherit property "onaddtrack" with the proper type -PASS TextTrackList interface: document.createElement("video").textTracks must inherit property "onremovetrack" with the proper type -PASS TextTrack interface: existence and properties of interface object -PASS TextTrack interface object length -PASS TextTrack interface object name -PASS TextTrack interface: existence and properties of interface prototype object -PASS TextTrack interface: existence and properties of interface prototype object's "constructor" property -PASS TextTrack interface: existence and properties of interface prototype object's @@unscopables property -PASS TextTrack interface: attribute kind -PASS TextTrack interface: attribute label -PASS TextTrack interface: attribute language -PASS TextTrack interface: attribute id -FAIL TextTrack interface: attribute inBandMetadataTrackDispatchType assert_true: The prototype object must have a property "inBandMetadataTrackDispatchType" expected true got false -PASS TextTrack interface: attribute mode -PASS TextTrack interface: attribute cues -PASS TextTrack interface: attribute activeCues -PASS TextTrack interface: operation addCue(TextTrackCue) -PASS TextTrack interface: operation removeCue(TextTrackCue) -PASS TextTrack interface: attribute oncuechange -PASS TextTrack must be primary interface of document.createElement("track").track -PASS Stringification of document.createElement("track").track -PASS TextTrack interface: document.createElement("track").track must inherit property "kind" with the proper type -PASS TextTrack interface: document.createElement("track").track must inherit property "label" with the proper type -PASS TextTrack interface: document.createElement("track").track must inherit property "language" with the proper type -PASS TextTrack interface: document.createElement("track").track must inherit property "id" with the proper type -FAIL TextTrack interface: document.createElement("track").track must inherit property "inBandMetadataTrackDispatchType" with the proper type assert_inherits: property "inBandMetadataTrackDispatchType" not found in prototype chain -PASS TextTrack interface: document.createElement("track").track must inherit property "mode" with the proper type -PASS TextTrack interface: document.createElement("track").track must inherit property "cues" with the proper type -PASS TextTrack interface: document.createElement("track").track must inherit property "activeCues" with the proper type -PASS TextTrack interface: document.createElement("track").track must inherit property "addCue(TextTrackCue)" with the proper type -PASS TextTrack interface: calling addCue(TextTrackCue) on document.createElement("track").track with too few arguments must throw TypeError -PASS TextTrack interface: document.createElement("track").track must inherit property "removeCue(TextTrackCue)" with the proper type -PASS TextTrack interface: calling removeCue(TextTrackCue) on document.createElement("track").track with too few arguments must throw TypeError -PASS TextTrack interface: document.createElement("track").track must inherit property "oncuechange" with the proper type -PASS TextTrackCueList interface: existence and properties of interface object -PASS TextTrackCueList interface object length -PASS TextTrackCueList interface object name -PASS TextTrackCueList interface: existence and properties of interface prototype object -PASS TextTrackCueList interface: existence and properties of interface prototype object's "constructor" property -PASS TextTrackCueList interface: existence and properties of interface prototype object's @@unscopables property -PASS TextTrackCueList interface: attribute length -PASS TextTrackCueList interface: operation getCueById(DOMString) -PASS TextTrackCueList must be primary interface of document.createElement("video").addTextTrack("subtitles").cues -PASS Stringification of document.createElement("video").addTextTrack("subtitles").cues -PASS TextTrackCueList interface: document.createElement("video").addTextTrack("subtitles").cues must inherit property "length" with the proper type -PASS TextTrackCueList interface: document.createElement("video").addTextTrack("subtitles").cues must inherit property "getCueById(DOMString)" with the proper type -PASS TextTrackCueList interface: calling getCueById(DOMString) on document.createElement("video").addTextTrack("subtitles").cues with too few arguments must throw TypeError -PASS TextTrackCue interface: existence and properties of interface object -PASS TextTrackCue interface object length -PASS TextTrackCue interface object name -PASS TextTrackCue interface: existence and properties of interface prototype object -PASS TextTrackCue interface: existence and properties of interface prototype object's "constructor" property -PASS TextTrackCue interface: existence and properties of interface prototype object's @@unscopables property -PASS TextTrackCue interface: attribute track -PASS TextTrackCue interface: attribute id -PASS TextTrackCue interface: attribute startTime -PASS TextTrackCue interface: attribute endTime -PASS TextTrackCue interface: attribute pauseOnExit -PASS TextTrackCue interface: attribute onenter -PASS TextTrackCue interface: attribute onexit -PASS TimeRanges interface: existence and properties of interface object -PASS TimeRanges interface object length -PASS TimeRanges interface object name -PASS TimeRanges interface: existence and properties of interface prototype object -PASS TimeRanges interface: existence and properties of interface prototype object's "constructor" property -PASS TimeRanges interface: existence and properties of interface prototype object's @@unscopables property -PASS TimeRanges interface: attribute length -PASS TimeRanges interface: operation start(unsigned long) -PASS TimeRanges interface: operation end(unsigned long) -PASS TimeRanges must be primary interface of document.createElement("video").buffered -PASS Stringification of document.createElement("video").buffered -PASS TimeRanges interface: document.createElement("video").buffered must inherit property "length" with the proper type -PASS TimeRanges interface: document.createElement("video").buffered must inherit property "start(unsigned long)" with the proper type -PASS TimeRanges interface: calling start(unsigned long) on document.createElement("video").buffered with too few arguments must throw TypeError -PASS TimeRanges interface: document.createElement("video").buffered must inherit property "end(unsigned long)" with the proper type -PASS TimeRanges interface: calling end(unsigned long) on document.createElement("video").buffered with too few arguments must throw TypeError -PASS TrackEvent interface: existence and properties of interface object -PASS TrackEvent interface object length -PASS TrackEvent interface object name -PASS TrackEvent interface: existence and properties of interface prototype object -PASS TrackEvent interface: existence and properties of interface prototype object's "constructor" property -PASS TrackEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS TrackEvent interface: attribute track -PASS TrackEvent must be primary interface of new TrackEvent("addtrack", {track:document.createElement("track").track}) -PASS Stringification of new TrackEvent("addtrack", {track:document.createElement("track").track}) -PASS TrackEvent interface: new TrackEvent("addtrack", {track:document.createElement("track").track}) must inherit property "track" with the proper type -PASS ValidityState interface: existence and properties of interface object -PASS ValidityState interface object length -PASS ValidityState interface object name -PASS ValidityState interface: existence and properties of interface prototype object -PASS ValidityState interface: existence and properties of interface prototype object's "constructor" property -PASS ValidityState interface: existence and properties of interface prototype object's @@unscopables property -PASS ValidityState interface: attribute valueMissing -PASS ValidityState interface: attribute typeMismatch -PASS ValidityState interface: attribute patternMismatch -PASS ValidityState interface: attribute tooLong -PASS ValidityState interface: attribute tooShort -PASS ValidityState interface: attribute rangeUnderflow -PASS ValidityState interface: attribute rangeOverflow -PASS ValidityState interface: attribute stepMismatch -PASS ValidityState interface: attribute badInput -PASS ValidityState interface: attribute customError -PASS ValidityState interface: attribute valid -PASS ValidityState must be primary interface of document.createElement("input").validity -PASS Stringification of document.createElement("input").validity -PASS ValidityState interface: document.createElement("input").validity must inherit property "valueMissing" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "typeMismatch" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "patternMismatch" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "tooLong" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "tooShort" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "rangeUnderflow" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "rangeOverflow" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "stepMismatch" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "badInput" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "customError" with the proper type -PASS ValidityState interface: document.createElement("input").validity must inherit property "valid" with the proper type -PASS SubmitEvent interface: existence and properties of interface object -PASS SubmitEvent interface object length -PASS SubmitEvent interface object name -PASS SubmitEvent interface: existence and properties of interface prototype object -PASS SubmitEvent interface: existence and properties of interface prototype object's "constructor" property -PASS SubmitEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS SubmitEvent interface: attribute submitter -PASS FormDataEvent interface: existence and properties of interface object -PASS FormDataEvent interface object length -PASS FormDataEvent interface object name -PASS FormDataEvent interface: existence and properties of interface prototype object -PASS FormDataEvent interface: existence and properties of interface prototype object's "constructor" property -PASS FormDataEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS FormDataEvent interface: attribute formData -PASS FormDataEvent must be primary interface of new FormDataEvent("formdata", { formData: new FormData() }) -PASS Stringification of new FormDataEvent("formdata", { formData: new FormData() }) -PASS FormDataEvent interface: new FormDataEvent("formdata", { formData: new FormData() }) must inherit property "formData" with the proper type -PASS CanvasRenderingContext2D interface: existence and properties of interface object -PASS CanvasRenderingContext2D interface object length -PASS CanvasRenderingContext2D interface object name -PASS CanvasRenderingContext2D interface: existence and properties of interface prototype object -PASS CanvasRenderingContext2D interface: existence and properties of interface prototype object's "constructor" property -PASS CanvasRenderingContext2D interface: existence and properties of interface prototype object's @@unscopables property -PASS CanvasRenderingContext2D interface: attribute canvas -PASS CanvasRenderingContext2D interface: operation getContextAttributes() -PASS CanvasRenderingContext2D interface: operation save() -PASS CanvasRenderingContext2D interface: operation restore() -PASS CanvasRenderingContext2D interface: operation reset() -PASS CanvasRenderingContext2D interface: operation isContextLost() -PASS CanvasRenderingContext2D interface: operation scale(unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation rotate(unrestricted double) -PASS CanvasRenderingContext2D interface: operation translate(unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation transform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation getTransform() -PASS CanvasRenderingContext2D interface: operation setTransform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation setTransform(optional DOMMatrix2DInit) -PASS CanvasRenderingContext2D interface: operation resetTransform() -PASS CanvasRenderingContext2D interface: attribute globalAlpha -PASS CanvasRenderingContext2D interface: attribute globalCompositeOperation -PASS CanvasRenderingContext2D interface: attribute imageSmoothingEnabled -PASS CanvasRenderingContext2D interface: attribute imageSmoothingQuality -PASS CanvasRenderingContext2D interface: attribute strokeStyle -PASS CanvasRenderingContext2D interface: attribute fillStyle -PASS CanvasRenderingContext2D interface: operation createLinearGradient(double, double, double, double) -PASS CanvasRenderingContext2D interface: operation createRadialGradient(double, double, double, double, double, double) -PASS CanvasRenderingContext2D interface: operation createConicGradient(double, double, double) -PASS CanvasRenderingContext2D interface: operation createPattern(CanvasImageSource, DOMString) -PASS CanvasRenderingContext2D interface: attribute shadowOffsetX -PASS CanvasRenderingContext2D interface: attribute shadowOffsetY -PASS CanvasRenderingContext2D interface: attribute shadowBlur -PASS CanvasRenderingContext2D interface: attribute shadowColor -PASS CanvasRenderingContext2D interface: attribute filter -PASS CanvasRenderingContext2D interface: operation clearRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation fillRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation strokeRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation beginPath() -PASS CanvasRenderingContext2D interface: operation fill(optional CanvasFillRule) -PASS CanvasRenderingContext2D interface: operation fill(Path2D, optional CanvasFillRule) -PASS CanvasRenderingContext2D interface: operation stroke() -PASS CanvasRenderingContext2D interface: operation stroke(Path2D) -PASS CanvasRenderingContext2D interface: operation clip(optional CanvasFillRule) -PASS CanvasRenderingContext2D interface: operation clip(Path2D, optional CanvasFillRule) -PASS CanvasRenderingContext2D interface: operation isPointInPath(unrestricted double, unrestricted double, optional CanvasFillRule) -PASS CanvasRenderingContext2D interface: operation isPointInPath(Path2D, unrestricted double, unrestricted double, optional CanvasFillRule) -PASS CanvasRenderingContext2D interface: operation isPointInStroke(unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation isPointInStroke(Path2D, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation drawFocusIfNeeded(Element) -PASS CanvasRenderingContext2D interface: operation drawFocusIfNeeded(Path2D, Element) -PASS CanvasRenderingContext2D interface: operation scrollPathIntoView() -PASS CanvasRenderingContext2D interface: operation scrollPathIntoView(Path2D) -PASS CanvasRenderingContext2D interface: operation fillText(DOMString, unrestricted double, unrestricted double, optional unrestricted double) -PASS CanvasRenderingContext2D interface: operation strokeText(DOMString, unrestricted double, unrestricted double, optional unrestricted double) -PASS CanvasRenderingContext2D interface: operation measureText(DOMString) -PASS CanvasRenderingContext2D interface: operation drawImage(CanvasImageSource, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation drawImage(CanvasImageSource, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation drawImage(CanvasImageSource, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation createImageData(long, long, optional ImageDataSettings) -PASS CanvasRenderingContext2D interface: operation createImageData(ImageData) -PASS CanvasRenderingContext2D interface: operation getImageData(long, long, long, long, optional ImageDataSettings) -PASS CanvasRenderingContext2D interface: operation putImageData(ImageData, long, long) -PASS CanvasRenderingContext2D interface: operation putImageData(ImageData, long, long, long, long, long, long) -PASS CanvasRenderingContext2D interface: attribute lineWidth -PASS CanvasRenderingContext2D interface: attribute lineCap -PASS CanvasRenderingContext2D interface: attribute lineJoin -PASS CanvasRenderingContext2D interface: attribute miterLimit -PASS CanvasRenderingContext2D interface: operation setLineDash(sequence<unrestricted double>) -PASS CanvasRenderingContext2D interface: operation getLineDash() -PASS CanvasRenderingContext2D interface: attribute lineDashOffset -PASS CanvasRenderingContext2D interface: attribute font -PASS CanvasRenderingContext2D interface: attribute textAlign -PASS CanvasRenderingContext2D interface: attribute textBaseline -PASS CanvasRenderingContext2D interface: attribute direction -FAIL CanvasRenderingContext2D interface: attribute textLetterSpacing assert_true: The prototype object must have a property "textLetterSpacing" expected true got false -FAIL CanvasRenderingContext2D interface: attribute textWordSpacing assert_true: The prototype object must have a property "textWordSpacing" expected true got false -PASS CanvasRenderingContext2D interface: attribute fontKerning -PASS CanvasRenderingContext2D interface: attribute fontStretch -PASS CanvasRenderingContext2D interface: attribute fontVariantCaps -PASS CanvasRenderingContext2D interface: attribute textRendering -PASS CanvasRenderingContext2D interface: operation closePath() -PASS CanvasRenderingContext2D interface: operation moveTo(unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation lineTo(unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation quadraticCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS CanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) -PASS CanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) -PASS CanvasRenderingContext2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) -PASS CanvasRenderingContext2D must be primary interface of document.createElement("canvas").getContext("2d") -PASS Stringification of document.createElement("canvas").getContext("2d") -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "canvas" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "getContextAttributes()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "save()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "restore()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "reset()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "isContextLost()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "scale(unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling scale(unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "rotate(unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling rotate(unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "translate(unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling translate(unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "transform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling transform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "getTransform()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "setTransform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling setTransform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "setTransform(optional DOMMatrix2DInit)" with the proper type -PASS CanvasRenderingContext2D interface: calling setTransform(optional DOMMatrix2DInit) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "resetTransform()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "globalAlpha" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "globalCompositeOperation" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "imageSmoothingEnabled" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "imageSmoothingQuality" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "strokeStyle" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fillStyle" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createLinearGradient(double, double, double, double)" with the proper type -PASS CanvasRenderingContext2D interface: calling createLinearGradient(double, double, double, double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createRadialGradient(double, double, double, double, double, double)" with the proper type -PASS CanvasRenderingContext2D interface: calling createRadialGradient(double, double, double, double, double, double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createConicGradient(double, double, double)" with the proper type -PASS CanvasRenderingContext2D interface: calling createConicGradient(double, double, double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createPattern(CanvasImageSource, DOMString)" with the proper type -PASS CanvasRenderingContext2D interface: calling createPattern(CanvasImageSource, DOMString) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "shadowOffsetX" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "shadowOffsetY" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "shadowBlur" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "shadowColor" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "filter" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "clearRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling clearRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fillRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling fillRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "strokeRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling strokeRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "beginPath()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fill(optional CanvasFillRule)" with the proper type -PASS CanvasRenderingContext2D interface: calling fill(optional CanvasFillRule) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fill(Path2D, optional CanvasFillRule)" with the proper type -PASS CanvasRenderingContext2D interface: calling fill(Path2D, optional CanvasFillRule) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "stroke()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "stroke(Path2D)" with the proper type -PASS CanvasRenderingContext2D interface: calling stroke(Path2D) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "clip(optional CanvasFillRule)" with the proper type -PASS CanvasRenderingContext2D interface: calling clip(optional CanvasFillRule) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "clip(Path2D, optional CanvasFillRule)" with the proper type -PASS CanvasRenderingContext2D interface: calling clip(Path2D, optional CanvasFillRule) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "isPointInPath(unrestricted double, unrestricted double, optional CanvasFillRule)" with the proper type -PASS CanvasRenderingContext2D interface: calling isPointInPath(unrestricted double, unrestricted double, optional CanvasFillRule) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "isPointInPath(Path2D, unrestricted double, unrestricted double, optional CanvasFillRule)" with the proper type -PASS CanvasRenderingContext2D interface: calling isPointInPath(Path2D, unrestricted double, unrestricted double, optional CanvasFillRule) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "isPointInStroke(unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling isPointInStroke(unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "isPointInStroke(Path2D, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling isPointInStroke(Path2D, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "drawFocusIfNeeded(Element)" with the proper type -PASS CanvasRenderingContext2D interface: calling drawFocusIfNeeded(Element) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "drawFocusIfNeeded(Path2D, Element)" with the proper type -PASS CanvasRenderingContext2D interface: calling drawFocusIfNeeded(Path2D, Element) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "scrollPathIntoView()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "scrollPathIntoView(Path2D)" with the proper type -PASS CanvasRenderingContext2D interface: calling scrollPathIntoView(Path2D) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fillText(DOMString, unrestricted double, unrestricted double, optional unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling fillText(DOMString, unrestricted double, unrestricted double, optional unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "strokeText(DOMString, unrestricted double, unrestricted double, optional unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling strokeText(DOMString, unrestricted double, unrestricted double, optional unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "measureText(DOMString)" with the proper type -PASS CanvasRenderingContext2D interface: calling measureText(DOMString) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "drawImage(CanvasImageSource, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling drawImage(CanvasImageSource, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "drawImage(CanvasImageSource, unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling drawImage(CanvasImageSource, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "drawImage(CanvasImageSource, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling drawImage(CanvasImageSource, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createImageData(long, long, optional ImageDataSettings)" with the proper type -PASS CanvasRenderingContext2D interface: calling createImageData(long, long, optional ImageDataSettings) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createImageData(ImageData)" with the proper type -PASS CanvasRenderingContext2D interface: calling createImageData(ImageData) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "getImageData(long, long, long, long, optional ImageDataSettings)" with the proper type -PASS CanvasRenderingContext2D interface: calling getImageData(long, long, long, long, optional ImageDataSettings) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "putImageData(ImageData, long, long)" with the proper type -PASS CanvasRenderingContext2D interface: calling putImageData(ImageData, long, long) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "putImageData(ImageData, long, long, long, long, long, long)" with the proper type -PASS CanvasRenderingContext2D interface: calling putImageData(ImageData, long, long, long, long, long, long) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "lineWidth" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "lineCap" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "lineJoin" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "miterLimit" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "setLineDash(sequence<unrestricted double>)" with the proper type -PASS CanvasRenderingContext2D interface: calling setLineDash(sequence<unrestricted double>) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "getLineDash()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "lineDashOffset" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "font" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "textAlign" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "textBaseline" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "direction" with the proper type -FAIL CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "textLetterSpacing" with the proper type assert_inherits: property "textLetterSpacing" not found in prototype chain -FAIL CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "textWordSpacing" with the proper type assert_inherits: property "textWordSpacing" not found in prototype chain -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fontKerning" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fontStretch" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fontVariantCaps" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "textRendering" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "closePath()" with the proper type -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "moveTo(unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling moveTo(unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "lineTo(unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling lineTo(unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "quadraticCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling quadraticCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type -PASS CanvasRenderingContext2D interface: calling rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)" with the proper type -PASS CanvasRenderingContext2D interface: calling roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type -PASS CanvasRenderingContext2D interface: calling arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type -PASS CanvasRenderingContext2D interface: calling ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError -PASS CanvasGradient interface: existence and properties of interface object -PASS CanvasGradient interface object length -PASS CanvasGradient interface object name -PASS CanvasGradient interface: existence and properties of interface prototype object -PASS CanvasGradient interface: existence and properties of interface prototype object's "constructor" property -PASS CanvasGradient interface: existence and properties of interface prototype object's @@unscopables property -PASS CanvasGradient interface: operation addColorStop(double, DOMString) -PASS CanvasPattern interface: existence and properties of interface object -PASS CanvasPattern interface object length -PASS CanvasPattern interface object name -PASS CanvasPattern interface: existence and properties of interface prototype object -PASS CanvasPattern interface: existence and properties of interface prototype object's "constructor" property -PASS CanvasPattern interface: existence and properties of interface prototype object's @@unscopables property -PASS CanvasPattern interface: operation setTransform(optional DOMMatrix2DInit) -PASS TextMetrics interface: existence and properties of interface object -PASS TextMetrics interface object length -PASS TextMetrics interface object name -PASS TextMetrics interface: existence and properties of interface prototype object -PASS TextMetrics interface: existence and properties of interface prototype object's "constructor" property -PASS TextMetrics interface: existence and properties of interface prototype object's @@unscopables property -PASS TextMetrics interface: attribute width -PASS TextMetrics interface: attribute actualBoundingBoxLeft -PASS TextMetrics interface: attribute actualBoundingBoxRight -PASS TextMetrics interface: attribute fontBoundingBoxAscent -PASS TextMetrics interface: attribute fontBoundingBoxDescent -PASS TextMetrics interface: attribute actualBoundingBoxAscent -PASS TextMetrics interface: attribute actualBoundingBoxDescent -PASS TextMetrics interface: attribute emHeightAscent -PASS TextMetrics interface: attribute emHeightDescent -FAIL TextMetrics interface: attribute hangingBaseline assert_true: The prototype object must have a property "hangingBaseline" expected true got false -FAIL TextMetrics interface: attribute alphabeticBaseline assert_true: The prototype object must have a property "alphabeticBaseline" expected true got false -FAIL TextMetrics interface: attribute ideographicBaseline assert_true: The prototype object must have a property "ideographicBaseline" expected true got false -PASS ImageData interface: existence and properties of interface object -PASS ImageData interface object length -PASS ImageData interface object name -PASS ImageData interface: existence and properties of interface prototype object -PASS ImageData interface: existence and properties of interface prototype object's "constructor" property -PASS ImageData interface: existence and properties of interface prototype object's @@unscopables property -PASS ImageData interface: attribute width -PASS ImageData interface: attribute height -PASS ImageData interface: attribute data -PASS ImageData interface: attribute colorSpace -PASS ImageData must be primary interface of new ImageData(10, 10) -PASS Stringification of new ImageData(10, 10) -PASS ImageData interface: new ImageData(10, 10) must inherit property "width" with the proper type -PASS ImageData interface: new ImageData(10, 10) must inherit property "height" with the proper type -FAIL ImageData interface: new ImageData(10, 10) must inherit property "data" with the proper type assert_inherits: property "data" found on object expected in prototype chain -PASS ImageData interface: new ImageData(10, 10) must inherit property "colorSpace" with the proper type -PASS Path2D interface: existence and properties of interface object -PASS Path2D interface object length -PASS Path2D interface object name -PASS Path2D interface: existence and properties of interface prototype object -PASS Path2D interface: existence and properties of interface prototype object's "constructor" property -PASS Path2D interface: existence and properties of interface prototype object's @@unscopables property -PASS Path2D interface: operation addPath(Path2D, optional DOMMatrix2DInit) -PASS Path2D interface: operation closePath() -PASS Path2D interface: operation moveTo(unrestricted double, unrestricted double) -PASS Path2D interface: operation lineTo(unrestricted double, unrestricted double) -PASS Path2D interface: operation quadraticCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS Path2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS Path2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) -PASS Path2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) -PASS Path2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) -PASS ImageBitmapRenderingContext interface: existence and properties of interface object -PASS ImageBitmapRenderingContext interface object length -PASS ImageBitmapRenderingContext interface object name -PASS ImageBitmapRenderingContext interface: existence and properties of interface prototype object -PASS ImageBitmapRenderingContext interface: existence and properties of interface prototype object's "constructor" property -PASS ImageBitmapRenderingContext interface: existence and properties of interface prototype object's @@unscopables property -PASS ImageBitmapRenderingContext interface: attribute canvas -PASS ImageBitmapRenderingContext interface: operation transferFromImageBitmap(ImageBitmap?) -PASS OffscreenCanvas interface: existence and properties of interface object -PASS OffscreenCanvas interface object length -PASS OffscreenCanvas interface object name -PASS OffscreenCanvas interface: existence and properties of interface prototype object -PASS OffscreenCanvas interface: existence and properties of interface prototype object's "constructor" property -PASS OffscreenCanvas interface: existence and properties of interface prototype object's @@unscopables property -PASS OffscreenCanvas interface: attribute width -PASS OffscreenCanvas interface: attribute height -PASS OffscreenCanvas interface: operation getContext(OffscreenRenderingContextId, optional any) -PASS OffscreenCanvas interface: operation transferToImageBitmap() -PASS OffscreenCanvas interface: operation convertToBlob(optional ImageEncodeOptions) -FAIL OffscreenCanvas interface: attribute oncontextlost assert_true: The prototype object must have a property "oncontextlost" expected true got false -FAIL OffscreenCanvas interface: attribute oncontextrestored assert_true: The prototype object must have a property "oncontextrestored" expected true got false -PASS OffscreenCanvasRenderingContext2D interface: existence and properties of interface object -PASS OffscreenCanvasRenderingContext2D interface object length -PASS OffscreenCanvasRenderingContext2D interface object name -PASS OffscreenCanvasRenderingContext2D interface: existence and properties of interface prototype object -PASS OffscreenCanvasRenderingContext2D interface: existence and properties of interface prototype object's "constructor" property -PASS OffscreenCanvasRenderingContext2D interface: existence and properties of interface prototype object's @@unscopables property -PASS OffscreenCanvasRenderingContext2D interface: operation commit() -PASS OffscreenCanvasRenderingContext2D interface: attribute canvas -PASS OffscreenCanvasRenderingContext2D interface: operation save() -PASS OffscreenCanvasRenderingContext2D interface: operation restore() -PASS OffscreenCanvasRenderingContext2D interface: operation reset() -PASS OffscreenCanvasRenderingContext2D interface: operation isContextLost() -PASS OffscreenCanvasRenderingContext2D interface: operation scale(unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation rotate(unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation translate(unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation transform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation getTransform() -PASS OffscreenCanvasRenderingContext2D interface: operation setTransform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation setTransform(optional DOMMatrix2DInit) -PASS OffscreenCanvasRenderingContext2D interface: operation resetTransform() -PASS OffscreenCanvasRenderingContext2D interface: attribute globalAlpha -PASS OffscreenCanvasRenderingContext2D interface: attribute globalCompositeOperation -PASS OffscreenCanvasRenderingContext2D interface: attribute imageSmoothingEnabled -PASS OffscreenCanvasRenderingContext2D interface: attribute imageSmoothingQuality -PASS OffscreenCanvasRenderingContext2D interface: attribute strokeStyle -PASS OffscreenCanvasRenderingContext2D interface: attribute fillStyle -PASS OffscreenCanvasRenderingContext2D interface: operation createLinearGradient(double, double, double, double) -PASS OffscreenCanvasRenderingContext2D interface: operation createRadialGradient(double, double, double, double, double, double) -PASS OffscreenCanvasRenderingContext2D interface: operation createConicGradient(double, double, double) -PASS OffscreenCanvasRenderingContext2D interface: operation createPattern(CanvasImageSource, DOMString) -PASS OffscreenCanvasRenderingContext2D interface: attribute shadowOffsetX -PASS OffscreenCanvasRenderingContext2D interface: attribute shadowOffsetY -PASS OffscreenCanvasRenderingContext2D interface: attribute shadowBlur -PASS OffscreenCanvasRenderingContext2D interface: attribute shadowColor -PASS OffscreenCanvasRenderingContext2D interface: attribute filter -PASS OffscreenCanvasRenderingContext2D interface: operation clearRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation fillRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation strokeRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation beginPath() -PASS OffscreenCanvasRenderingContext2D interface: operation fill(optional CanvasFillRule) -PASS OffscreenCanvasRenderingContext2D interface: operation fill(Path2D, optional CanvasFillRule) -PASS OffscreenCanvasRenderingContext2D interface: operation stroke() -PASS OffscreenCanvasRenderingContext2D interface: operation stroke(Path2D) -PASS OffscreenCanvasRenderingContext2D interface: operation clip(optional CanvasFillRule) -PASS OffscreenCanvasRenderingContext2D interface: operation clip(Path2D, optional CanvasFillRule) -PASS OffscreenCanvasRenderingContext2D interface: operation isPointInPath(unrestricted double, unrestricted double, optional CanvasFillRule) -PASS OffscreenCanvasRenderingContext2D interface: operation isPointInPath(Path2D, unrestricted double, unrestricted double, optional CanvasFillRule) -PASS OffscreenCanvasRenderingContext2D interface: operation isPointInStroke(unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation isPointInStroke(Path2D, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation fillText(DOMString, unrestricted double, unrestricted double, optional unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation strokeText(DOMString, unrestricted double, unrestricted double, optional unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation measureText(DOMString) -PASS OffscreenCanvasRenderingContext2D interface: operation drawImage(CanvasImageSource, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation drawImage(CanvasImageSource, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation drawImage(CanvasImageSource, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation createImageData(long, long, optional ImageDataSettings) -PASS OffscreenCanvasRenderingContext2D interface: operation createImageData(ImageData) -PASS OffscreenCanvasRenderingContext2D interface: operation getImageData(long, long, long, long, optional ImageDataSettings) -PASS OffscreenCanvasRenderingContext2D interface: operation putImageData(ImageData, long, long) -PASS OffscreenCanvasRenderingContext2D interface: operation putImageData(ImageData, long, long, long, long, long, long) -PASS OffscreenCanvasRenderingContext2D interface: attribute lineWidth -PASS OffscreenCanvasRenderingContext2D interface: attribute lineCap -PASS OffscreenCanvasRenderingContext2D interface: attribute lineJoin -PASS OffscreenCanvasRenderingContext2D interface: attribute miterLimit -PASS OffscreenCanvasRenderingContext2D interface: operation setLineDash(sequence<unrestricted double>) -PASS OffscreenCanvasRenderingContext2D interface: operation getLineDash() -PASS OffscreenCanvasRenderingContext2D interface: attribute lineDashOffset -PASS OffscreenCanvasRenderingContext2D interface: attribute font -PASS OffscreenCanvasRenderingContext2D interface: attribute textAlign -PASS OffscreenCanvasRenderingContext2D interface: attribute textBaseline -PASS OffscreenCanvasRenderingContext2D interface: attribute direction -FAIL OffscreenCanvasRenderingContext2D interface: attribute textLetterSpacing assert_true: The prototype object must have a property "textLetterSpacing" expected true got false -FAIL OffscreenCanvasRenderingContext2D interface: attribute textWordSpacing assert_true: The prototype object must have a property "textWordSpacing" expected true got false -PASS OffscreenCanvasRenderingContext2D interface: attribute fontKerning -PASS OffscreenCanvasRenderingContext2D interface: attribute fontStretch -PASS OffscreenCanvasRenderingContext2D interface: attribute fontVariantCaps -PASS OffscreenCanvasRenderingContext2D interface: attribute textRendering -PASS OffscreenCanvasRenderingContext2D interface: operation closePath() -PASS OffscreenCanvasRenderingContext2D interface: operation moveTo(unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation lineTo(unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation quadraticCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) -PASS OffscreenCanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) -PASS OffscreenCanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) -PASS OffscreenCanvasRenderingContext2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) -PASS CustomElementRegistry interface: existence and properties of interface object -PASS CustomElementRegistry interface object length -PASS CustomElementRegistry interface object name -PASS CustomElementRegistry interface: existence and properties of interface prototype object -PASS CustomElementRegistry interface: existence and properties of interface prototype object's "constructor" property -PASS CustomElementRegistry interface: existence and properties of interface prototype object's @@unscopables property -PASS CustomElementRegistry interface: operation define(DOMString, CustomElementConstructor, optional ElementDefinitionOptions) -PASS CustomElementRegistry interface: operation get(DOMString) -PASS CustomElementRegistry interface: operation whenDefined(DOMString) -PASS CustomElementRegistry interface: operation upgrade(Node) -PASS ElementInternals interface: existence and properties of interface object -PASS ElementInternals interface object length -PASS ElementInternals interface object name -PASS ElementInternals interface: existence and properties of interface prototype object -PASS ElementInternals interface: existence and properties of interface prototype object's "constructor" property -PASS ElementInternals interface: existence and properties of interface prototype object's @@unscopables property -PASS ElementInternals interface: attribute shadowRoot -PASS ElementInternals interface: operation setFormValue((File or USVString or FormData)?, optional (File or USVString or FormData)?) -PASS ElementInternals interface: attribute form -FAIL ElementInternals interface: operation setValidity(optional ValidityStateFlags, optional DOMString, optional HTMLElement) assert_equals: property has wrong .length expected 0 but got 1 -PASS ElementInternals interface: attribute willValidate -PASS ElementInternals interface: attribute validity -PASS ElementInternals interface: attribute validationMessage -PASS ElementInternals interface: operation checkValidity() -PASS ElementInternals interface: operation reportValidity() -PASS ElementInternals interface: attribute labels -PASS DataTransfer interface: existence and properties of interface object -PASS DataTransfer interface object length -PASS DataTransfer interface object name -PASS DataTransfer interface: existence and properties of interface prototype object -PASS DataTransfer interface: existence and properties of interface prototype object's "constructor" property -PASS DataTransfer interface: existence and properties of interface prototype object's @@unscopables property -PASS DataTransfer interface: attribute dropEffect -PASS DataTransfer interface: attribute effectAllowed -PASS DataTransfer interface: attribute items -PASS DataTransfer interface: operation setDragImage(Element, long, long) -PASS DataTransfer interface: attribute types -PASS DataTransfer interface: operation getData(DOMString) -PASS DataTransfer interface: operation setData(DOMString, DOMString) -PASS DataTransfer interface: operation clearData(optional DOMString) -PASS DataTransfer interface: attribute files -PASS DataTransferItemList interface: existence and properties of interface object -PASS DataTransferItemList interface object length -PASS DataTransferItemList interface object name -PASS DataTransferItemList interface: existence and properties of interface prototype object -PASS DataTransferItemList interface: existence and properties of interface prototype object's "constructor" property -PASS DataTransferItemList interface: existence and properties of interface prototype object's @@unscopables property -PASS DataTransferItemList interface: attribute length -PASS DataTransferItemList interface: operation add(DOMString, DOMString) -PASS DataTransferItemList interface: operation add(File) -PASS DataTransferItemList interface: operation remove(unsigned long) -PASS DataTransferItemList interface: operation clear() -PASS DataTransferItem interface: existence and properties of interface object -PASS DataTransferItem interface object length -PASS DataTransferItem interface object name -PASS DataTransferItem interface: existence and properties of interface prototype object -PASS DataTransferItem interface: existence and properties of interface prototype object's "constructor" property -PASS DataTransferItem interface: existence and properties of interface prototype object's @@unscopables property -PASS DataTransferItem interface: attribute kind -PASS DataTransferItem interface: attribute type -PASS DataTransferItem interface: operation getAsString(FunctionStringCallback?) -PASS DataTransferItem interface: operation getAsFile() -PASS DragEvent interface: existence and properties of interface object -PASS DragEvent interface object length -PASS DragEvent interface object name -PASS DragEvent interface: existence and properties of interface prototype object -PASS DragEvent interface: existence and properties of interface prototype object's "constructor" property -PASS DragEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS DragEvent interface: attribute dataTransfer -PASS BarProp interface: existence and properties of interface object -PASS BarProp interface object length -PASS BarProp interface object name -PASS BarProp interface: existence and properties of interface prototype object -PASS BarProp interface: existence and properties of interface prototype object's "constructor" property -PASS BarProp interface: existence and properties of interface prototype object's @@unscopables property -PASS BarProp interface: attribute visible -PASS History interface: existence and properties of interface object -PASS History interface object length -PASS History interface object name -PASS History interface: existence and properties of interface prototype object -PASS History interface: existence and properties of interface prototype object's "constructor" property -PASS History interface: existence and properties of interface prototype object's @@unscopables property -PASS History interface: attribute length -PASS History interface: attribute scrollRestoration -PASS History interface: attribute state -PASS History interface: operation go(optional long) -PASS History interface: operation back() -PASS History interface: operation forward() -PASS History interface: operation pushState(any, DOMString, optional USVString?) -PASS History interface: operation replaceState(any, DOMString, optional USVString?) -PASS History must be primary interface of window.history -PASS Stringification of window.history -PASS History interface: window.history must inherit property "length" with the proper type -PASS History interface: window.history must inherit property "scrollRestoration" with the proper type -PASS History interface: window.history must inherit property "state" with the proper type -PASS History interface: window.history must inherit property "go(optional long)" with the proper type -PASS History interface: calling go(optional long) on window.history with too few arguments must throw TypeError -PASS History interface: window.history must inherit property "back()" with the proper type -PASS History interface: window.history must inherit property "forward()" with the proper type -PASS History interface: window.history must inherit property "pushState(any, DOMString, optional USVString?)" with the proper type -PASS History interface: calling pushState(any, DOMString, optional USVString?) on window.history with too few arguments must throw TypeError -PASS History interface: window.history must inherit property "replaceState(any, DOMString, optional USVString?)" with the proper type -PASS History interface: calling replaceState(any, DOMString, optional USVString?) on window.history with too few arguments must throw TypeError -PASS Location interface: existence and properties of interface object -PASS Location interface object length -PASS Location interface object name -PASS Location interface: existence and properties of interface prototype object -PASS Location interface: existence and properties of interface prototype object's "constructor" property -PASS Location interface: existence and properties of interface prototype object's @@unscopables property -FAIL Location interface: stringifier assert_own_property: interface prototype object missing non-static operation expected property "toString" missing -PASS Location must be primary interface of window.location -PASS Stringification of window.location -PASS Location interface: window.location must have own property "href" -PASS Location interface: window.location must have own property "origin" -PASS Location interface: window.location must have own property "protocol" -PASS Location interface: window.location must have own property "host" -PASS Location interface: window.location must have own property "hostname" -PASS Location interface: window.location must have own property "port" -PASS Location interface: window.location must have own property "pathname" -PASS Location interface: window.location must have own property "search" -PASS Location interface: window.location must have own property "hash" -PASS Location interface: window.location must have own property "assign" -PASS Location interface: calling assign(USVString) on window.location with too few arguments must throw TypeError -PASS Location interface: window.location must have own property "replace" -PASS Location interface: calling replace(USVString) on window.location with too few arguments must throw TypeError -PASS Location interface: window.location must have own property "reload" -PASS Location interface: window.location must have own property "ancestorOrigins" -PASS PopStateEvent interface: existence and properties of interface object -PASS PopStateEvent interface object length -PASS PopStateEvent interface object name -PASS PopStateEvent interface: existence and properties of interface prototype object -PASS PopStateEvent interface: existence and properties of interface prototype object's "constructor" property -PASS PopStateEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS PopStateEvent interface: attribute state -PASS PopStateEvent must be primary interface of new PopStateEvent("popstate", { data: {} }) -PASS Stringification of new PopStateEvent("popstate", { data: {} }) -PASS PopStateEvent interface: new PopStateEvent("popstate", { data: {} }) must inherit property "state" with the proper type -PASS HashChangeEvent interface: existence and properties of interface object -PASS HashChangeEvent interface object length -PASS HashChangeEvent interface object name -PASS HashChangeEvent interface: existence and properties of interface prototype object -PASS HashChangeEvent interface: existence and properties of interface prototype object's "constructor" property -PASS HashChangeEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS HashChangeEvent interface: attribute oldURL -PASS HashChangeEvent interface: attribute newURL -PASS PageTransitionEvent interface: existence and properties of interface object -PASS PageTransitionEvent interface object length -PASS PageTransitionEvent interface object name -PASS PageTransitionEvent interface: existence and properties of interface prototype object -PASS PageTransitionEvent interface: existence and properties of interface prototype object's "constructor" property -PASS PageTransitionEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS PageTransitionEvent interface: attribute persisted -PASS BeforeUnloadEvent interface: existence and properties of interface object -PASS BeforeUnloadEvent interface object length -PASS BeforeUnloadEvent interface object name -PASS BeforeUnloadEvent interface: existence and properties of interface prototype object -PASS BeforeUnloadEvent interface: existence and properties of interface prototype object's "constructor" property -PASS BeforeUnloadEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS BeforeUnloadEvent interface: attribute returnValue -PASS ErrorEvent interface: existence and properties of interface object -PASS ErrorEvent interface object length -PASS ErrorEvent interface object name -PASS ErrorEvent interface: existence and properties of interface prototype object -PASS ErrorEvent interface: existence and properties of interface prototype object's "constructor" property -PASS ErrorEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS ErrorEvent interface: attribute message -PASS ErrorEvent interface: attribute filename -PASS ErrorEvent interface: attribute lineno -PASS ErrorEvent interface: attribute colno -PASS ErrorEvent interface: attribute error -PASS PromiseRejectionEvent interface: existence and properties of interface object -PASS PromiseRejectionEvent interface object length -PASS PromiseRejectionEvent interface object name -PASS PromiseRejectionEvent interface: existence and properties of interface prototype object -PASS PromiseRejectionEvent interface: existence and properties of interface prototype object's "constructor" property -PASS PromiseRejectionEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS PromiseRejectionEvent interface: attribute promise -PASS PromiseRejectionEvent interface: attribute reason -PASS DOMParser interface: existence and properties of interface object -PASS DOMParser interface object length -PASS DOMParser interface object name -PASS DOMParser interface: existence and properties of interface prototype object -PASS DOMParser interface: existence and properties of interface prototype object's "constructor" property -PASS DOMParser interface: existence and properties of interface prototype object's @@unscopables property -PASS DOMParser interface: operation parseFromString(DOMString, DOMParserSupportedType) -PASS DOMParser must be primary interface of new DOMParser() -PASS Stringification of new DOMParser() -PASS DOMParser interface: new DOMParser() must inherit property "parseFromString(DOMString, DOMParserSupportedType)" with the proper type -PASS DOMParser interface: calling parseFromString(DOMString, DOMParserSupportedType) on new DOMParser() with too few arguments must throw TypeError -PASS Navigator interface: existence and properties of interface object -PASS Navigator interface object length -PASS Navigator interface object name -PASS Navigator interface: existence and properties of interface prototype object -PASS Navigator interface: existence and properties of interface prototype object's "constructor" property -PASS Navigator interface: existence and properties of interface prototype object's @@unscopables property -PASS Navigator interface: attribute appCodeName -PASS Navigator interface: attribute appName -PASS Navigator interface: attribute appVersion -PASS Navigator interface: attribute platform -PASS Navigator interface: attribute product -PASS Navigator interface: attribute productSub -PASS Navigator interface: attribute userAgent -PASS Navigator interface: attribute vendor -PASS Navigator interface: attribute vendorSub -FAIL Navigator interface: operation taintEnabled() assert_own_property: interface prototype object missing non-static operation expected property "taintEnabled" missing -FAIL Navigator interface: attribute oscpu assert_true: The prototype object must have a property "oscpu" expected true got false -PASS Navigator interface: attribute language -PASS Navigator interface: attribute languages -PASS Navigator interface: attribute onLine -PASS Navigator interface: operation registerProtocolHandler(DOMString, USVString) -PASS Navigator interface: operation unregisterProtocolHandler(DOMString, USVString) -PASS Navigator interface: attribute cookieEnabled -PASS Navigator interface: attribute plugins -PASS Navigator interface: attribute mimeTypes -PASS Navigator interface: operation javaEnabled() -PASS Navigator interface: attribute pdfViewerEnabled -PASS Navigator interface: attribute hardwareConcurrency -PASS Navigator must be primary interface of window.navigator -PASS Stringification of window.navigator -PASS Navigator interface: window.navigator must inherit property "appCodeName" with the proper type -PASS Navigator interface: window.navigator must inherit property "appName" with the proper type -PASS Navigator interface: window.navigator must inherit property "appVersion" with the proper type -PASS Navigator interface: window.navigator must inherit property "platform" with the proper type -PASS Navigator interface: window.navigator must inherit property "product" with the proper type -PASS Navigator interface: window.navigator must inherit property "productSub" with the proper type -PASS Navigator interface: window.navigator must inherit property "userAgent" with the proper type -PASS Navigator interface: window.navigator must inherit property "vendor" with the proper type -PASS Navigator interface: window.navigator must inherit property "vendorSub" with the proper type -FAIL Navigator interface: window.navigator must inherit property "taintEnabled()" with the proper type assert_inherits: property "taintEnabled" not found in prototype chain -FAIL Navigator interface: window.navigator must inherit property "oscpu" with the proper type assert_inherits: property "oscpu" not found in prototype chain -PASS Navigator interface: window.navigator must inherit property "language" with the proper type -PASS Navigator interface: window.navigator must inherit property "languages" with the proper type -PASS Navigator interface: window.navigator must inherit property "onLine" with the proper type -PASS Navigator interface: window.navigator must inherit property "registerProtocolHandler(DOMString, USVString)" with the proper type -PASS Navigator interface: calling registerProtocolHandler(DOMString, USVString) on window.navigator with too few arguments must throw TypeError -PASS Navigator interface: window.navigator must inherit property "unregisterProtocolHandler(DOMString, USVString)" with the proper type -PASS Navigator interface: calling unregisterProtocolHandler(DOMString, USVString) on window.navigator with too few arguments must throw TypeError -PASS Navigator interface: window.navigator must inherit property "cookieEnabled" with the proper type -PASS Navigator interface: window.navigator must inherit property "plugins" with the proper type -PASS Navigator interface: window.navigator must inherit property "mimeTypes" with the proper type -PASS Navigator interface: window.navigator must inherit property "javaEnabled()" with the proper type -PASS Navigator interface: window.navigator must inherit property "pdfViewerEnabled" with the proper type -PASS Navigator interface: window.navigator must inherit property "hardwareConcurrency" with the proper type -PASS PluginArray interface: existence and properties of interface object -PASS PluginArray interface object length -PASS PluginArray interface object name -PASS PluginArray interface: existence and properties of interface prototype object -PASS PluginArray interface: existence and properties of interface prototype object's "constructor" property -PASS PluginArray interface: existence and properties of interface prototype object's @@unscopables property -PASS PluginArray interface: operation refresh() -PASS PluginArray interface: attribute length -PASS PluginArray interface: operation item(unsigned long) -PASS PluginArray interface: operation namedItem(DOMString) -PASS MimeTypeArray interface: existence and properties of interface object -PASS MimeTypeArray interface object length -PASS MimeTypeArray interface object name -PASS MimeTypeArray interface: existence and properties of interface prototype object -PASS MimeTypeArray interface: existence and properties of interface prototype object's "constructor" property -PASS MimeTypeArray interface: existence and properties of interface prototype object's @@unscopables property -PASS MimeTypeArray interface: attribute length -PASS MimeTypeArray interface: operation item(unsigned long) -PASS MimeTypeArray interface: operation namedItem(DOMString) -PASS Plugin interface: existence and properties of interface object -PASS Plugin interface object length -PASS Plugin interface object name -PASS Plugin interface: existence and properties of interface prototype object -PASS Plugin interface: existence and properties of interface prototype object's "constructor" property -PASS Plugin interface: existence and properties of interface prototype object's @@unscopables property -PASS Plugin interface: attribute name -PASS Plugin interface: attribute description -PASS Plugin interface: attribute filename -PASS Plugin interface: attribute length -PASS Plugin interface: operation item(unsigned long) -PASS Plugin interface: operation namedItem(DOMString) -PASS MimeType interface: existence and properties of interface object -PASS MimeType interface object length -PASS MimeType interface object name -PASS MimeType interface: existence and properties of interface prototype object -PASS MimeType interface: existence and properties of interface prototype object's "constructor" property -PASS MimeType interface: existence and properties of interface prototype object's @@unscopables property -PASS MimeType interface: attribute type -PASS MimeType interface: attribute description -PASS MimeType interface: attribute suffixes -PASS MimeType interface: attribute enabledPlugin -PASS ImageBitmap interface: existence and properties of interface object -PASS ImageBitmap interface object length -PASS ImageBitmap interface object name -PASS ImageBitmap interface: existence and properties of interface prototype object -PASS ImageBitmap interface: existence and properties of interface prototype object's "constructor" property -PASS ImageBitmap interface: existence and properties of interface prototype object's @@unscopables property -PASS ImageBitmap interface: attribute width -PASS ImageBitmap interface: attribute height -PASS ImageBitmap interface: operation close() -PASS MessageEvent interface: existence and properties of interface object -PASS MessageEvent interface object length -PASS MessageEvent interface object name -PASS MessageEvent interface: existence and properties of interface prototype object -PASS MessageEvent interface: existence and properties of interface prototype object's "constructor" property -PASS MessageEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS MessageEvent interface: attribute data -PASS MessageEvent interface: attribute origin -PASS MessageEvent interface: attribute lastEventId -PASS MessageEvent interface: attribute source -PASS MessageEvent interface: attribute ports -PASS MessageEvent interface: operation initMessageEvent(DOMString, optional boolean, optional boolean, optional any, optional USVString, optional DOMString, optional MessageEventSource?, optional sequence<MessagePort>) -PASS MessageEvent must be primary interface of new MessageEvent("message", { data: 5 }) -PASS Stringification of new MessageEvent("message", { data: 5 }) -PASS MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "data" with the proper type -PASS MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "origin" with the proper type -PASS MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "lastEventId" with the proper type -PASS MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "source" with the proper type -PASS MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "ports" with the proper type -PASS MessageEvent interface: new MessageEvent("message", { data: 5 }) must inherit property "initMessageEvent(DOMString, optional boolean, optional boolean, optional any, optional USVString, optional DOMString, optional MessageEventSource?, optional sequence<MessagePort>)" with the proper type -PASS MessageEvent interface: calling initMessageEvent(DOMString, optional boolean, optional boolean, optional any, optional USVString, optional DOMString, optional MessageEventSource?, optional sequence<MessagePort>) on new MessageEvent("message", { data: 5 }) with too few arguments must throw TypeError -PASS EventSource interface: existence and properties of interface object -PASS EventSource interface object length -PASS EventSource interface object name -PASS EventSource interface: existence and properties of interface prototype object -PASS EventSource interface: existence and properties of interface prototype object's "constructor" property -PASS EventSource interface: existence and properties of interface prototype object's @@unscopables property -PASS EventSource interface: attribute url -PASS EventSource interface: attribute withCredentials -PASS EventSource interface: constant CONNECTING on interface object -PASS EventSource interface: constant CONNECTING on interface prototype object -PASS EventSource interface: constant OPEN on interface object -PASS EventSource interface: constant OPEN on interface prototype object -PASS EventSource interface: constant CLOSED on interface object -PASS EventSource interface: constant CLOSED on interface prototype object -PASS EventSource interface: attribute readyState -PASS EventSource interface: attribute onopen -PASS EventSource interface: attribute onmessage -PASS EventSource interface: attribute onerror -PASS EventSource interface: operation close() -PASS EventSource must be primary interface of new EventSource("http://invalid") -PASS Stringification of new EventSource("http://invalid") -PASS EventSource interface: new EventSource("http://invalid") must inherit property "url" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "withCredentials" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "CONNECTING" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "OPEN" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "CLOSED" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "readyState" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "onopen" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "onmessage" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "onerror" with the proper type -PASS EventSource interface: new EventSource("http://invalid") must inherit property "close()" with the proper type -PASS WebSocket interface: existence and properties of interface object -PASS WebSocket interface object length -PASS WebSocket interface object name -PASS WebSocket interface: existence and properties of interface prototype object -PASS WebSocket interface: existence and properties of interface prototype object's "constructor" property -PASS WebSocket interface: existence and properties of interface prototype object's @@unscopables property -PASS WebSocket interface: attribute url -PASS WebSocket interface: constant CONNECTING on interface object -PASS WebSocket interface: constant CONNECTING on interface prototype object -PASS WebSocket interface: constant OPEN on interface object -PASS WebSocket interface: constant OPEN on interface prototype object -PASS WebSocket interface: constant CLOSING on interface object -PASS WebSocket interface: constant CLOSING on interface prototype object -PASS WebSocket interface: constant CLOSED on interface object -PASS WebSocket interface: constant CLOSED on interface prototype object -PASS WebSocket interface: attribute readyState -PASS WebSocket interface: attribute bufferedAmount -PASS WebSocket interface: attribute onopen -PASS WebSocket interface: attribute onerror -PASS WebSocket interface: attribute onclose -PASS WebSocket interface: attribute extensions -PASS WebSocket interface: attribute protocol -PASS WebSocket interface: operation close(optional unsigned short, optional USVString) -PASS WebSocket interface: attribute onmessage -PASS WebSocket interface: attribute binaryType -PASS WebSocket interface: operation send(USVString) -PASS WebSocket interface: operation send(Blob) -PASS WebSocket interface: operation send(ArrayBuffer) -PASS WebSocket interface: operation send(ArrayBufferView) -PASS WebSocket must be primary interface of new WebSocket("wss://nonexistent.web-platform.test") -PASS Stringification of new WebSocket("wss://nonexistent.web-platform.test") -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "url" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "CONNECTING" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "OPEN" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "CLOSING" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "CLOSED" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "readyState" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "bufferedAmount" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "onopen" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "onerror" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "onclose" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "extensions" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "protocol" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "close(optional unsigned short, optional USVString)" with the proper type -PASS WebSocket interface: calling close(optional unsigned short, optional USVString) on new WebSocket("wss://nonexistent.web-platform.test") with too few arguments must throw TypeError -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "onmessage" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "binaryType" with the proper type -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "send(USVString)" with the proper type -PASS WebSocket interface: calling send(USVString) on new WebSocket("wss://nonexistent.web-platform.test") with too few arguments must throw TypeError -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "send(Blob)" with the proper type -PASS WebSocket interface: calling send(Blob) on new WebSocket("wss://nonexistent.web-platform.test") with too few arguments must throw TypeError -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "send(ArrayBuffer)" with the proper type -PASS WebSocket interface: calling send(ArrayBuffer) on new WebSocket("wss://nonexistent.web-platform.test") with too few arguments must throw TypeError -PASS WebSocket interface: new WebSocket("wss://nonexistent.web-platform.test") must inherit property "send(ArrayBufferView)" with the proper type -PASS WebSocket interface: calling send(ArrayBufferView) on new WebSocket("wss://nonexistent.web-platform.test") with too few arguments must throw TypeError -PASS CloseEvent interface: existence and properties of interface object -PASS CloseEvent interface object length -PASS CloseEvent interface object name -PASS CloseEvent interface: existence and properties of interface prototype object -PASS CloseEvent interface: existence and properties of interface prototype object's "constructor" property -PASS CloseEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS CloseEvent interface: attribute wasClean -PASS CloseEvent interface: attribute code -PASS CloseEvent interface: attribute reason -PASS CloseEvent must be primary interface of new CloseEvent("close") -PASS Stringification of new CloseEvent("close") -PASS CloseEvent interface: new CloseEvent("close") must inherit property "wasClean" with the proper type -PASS CloseEvent interface: new CloseEvent("close") must inherit property "code" with the proper type -PASS CloseEvent interface: new CloseEvent("close") must inherit property "reason" with the proper type -PASS MessageChannel interface: existence and properties of interface object -PASS MessageChannel interface object length -PASS MessageChannel interface object name -PASS MessageChannel interface: existence and properties of interface prototype object -PASS MessageChannel interface: existence and properties of interface prototype object's "constructor" property -PASS MessageChannel interface: existence and properties of interface prototype object's @@unscopables property -PASS MessageChannel interface: attribute port1 -PASS MessageChannel interface: attribute port2 -PASS MessagePort interface: existence and properties of interface object -PASS MessagePort interface object length -PASS MessagePort interface object name -PASS MessagePort interface: existence and properties of interface prototype object -PASS MessagePort interface: existence and properties of interface prototype object's "constructor" property -PASS MessagePort interface: existence and properties of interface prototype object's @@unscopables property -PASS MessagePort interface: operation postMessage(any, sequence<object>) -PASS MessagePort interface: operation postMessage(any, optional StructuredSerializeOptions) -PASS MessagePort interface: operation start() -PASS MessagePort interface: operation close() -PASS MessagePort interface: attribute onmessage -PASS MessagePort interface: attribute onmessageerror -PASS BroadcastChannel interface: existence and properties of interface object -PASS BroadcastChannel interface object length -PASS BroadcastChannel interface object name -PASS BroadcastChannel interface: existence and properties of interface prototype object -PASS BroadcastChannel interface: existence and properties of interface prototype object's "constructor" property -PASS BroadcastChannel interface: existence and properties of interface prototype object's @@unscopables property -PASS BroadcastChannel interface: attribute name -PASS BroadcastChannel interface: operation postMessage(any) -PASS BroadcastChannel interface: operation close() -PASS BroadcastChannel interface: attribute onmessage -PASS BroadcastChannel interface: attribute onmessageerror -PASS WorkerGlobalScope interface: existence and properties of interface object -PASS DedicatedWorkerGlobalScope interface: existence and properties of interface object -PASS SharedWorkerGlobalScope interface: existence and properties of interface object -PASS Worker interface: existence and properties of interface object -PASS Worker interface object length -PASS Worker interface object name -PASS Worker interface: existence and properties of interface prototype object -PASS Worker interface: existence and properties of interface prototype object's "constructor" property -PASS Worker interface: existence and properties of interface prototype object's @@unscopables property -PASS Worker interface: operation terminate() -PASS Worker interface: operation postMessage(any, sequence<object>) -PASS Worker interface: operation postMessage(any, optional StructuredSerializeOptions) -PASS Worker interface: attribute onmessage -FAIL Worker interface: attribute onmessageerror assert_true: The prototype object must have a property "onmessageerror" expected true got false -PASS Worker interface: attribute onerror -PASS SharedWorker interface: existence and properties of interface object -PASS SharedWorker interface object length -PASS SharedWorker interface object name -PASS SharedWorker interface: existence and properties of interface prototype object -PASS SharedWorker interface: existence and properties of interface prototype object's "constructor" property -PASS SharedWorker interface: existence and properties of interface prototype object's @@unscopables property -PASS SharedWorker interface: attribute port -PASS SharedWorker interface: attribute onerror -PASS WorkerNavigator interface: existence and properties of interface object -PASS WorkerLocation interface: existence and properties of interface object -PASS WorkletGlobalScope interface: existence and properties of interface object -PASS Worklet interface: existence and properties of interface object -PASS Worklet interface object length -PASS Worklet interface object name -PASS Worklet interface: existence and properties of interface prototype object -PASS Worklet interface: existence and properties of interface prototype object's "constructor" property -PASS Worklet interface: existence and properties of interface prototype object's @@unscopables property -PASS Worklet interface: operation addModule(USVString, optional WorkletOptions) -PASS Storage interface: existence and properties of interface object -PASS Storage interface object length -PASS Storage interface object name -PASS Storage interface: existence and properties of interface prototype object -PASS Storage interface: existence and properties of interface prototype object's "constructor" property -PASS Storage interface: existence and properties of interface prototype object's @@unscopables property -PASS Storage interface: attribute length -PASS Storage interface: operation key(unsigned long) -PASS Storage interface: operation getItem(DOMString) -PASS Storage interface: operation setItem(DOMString, DOMString) -PASS Storage interface: operation removeItem(DOMString) -PASS Storage interface: operation clear() -PASS Storage must be primary interface of localStorage -PASS Stringification of localStorage -PASS Storage interface: localStorage must inherit property "length" with the proper type -PASS Storage interface: localStorage must inherit property "key(unsigned long)" with the proper type -PASS Storage interface: calling key(unsigned long) on localStorage with too few arguments must throw TypeError -PASS Storage interface: localStorage must inherit property "getItem(DOMString)" with the proper type -PASS Storage interface: calling getItem(DOMString) on localStorage with too few arguments must throw TypeError -PASS Storage interface: localStorage must inherit property "setItem(DOMString, DOMString)" with the proper type -PASS Storage interface: calling setItem(DOMString, DOMString) on localStorage with too few arguments must throw TypeError -PASS Storage interface: localStorage must inherit property "removeItem(DOMString)" with the proper type -PASS Storage interface: calling removeItem(DOMString) on localStorage with too few arguments must throw TypeError -PASS Storage interface: localStorage must inherit property "clear()" with the proper type -PASS Storage must be primary interface of sessionStorage -PASS Stringification of sessionStorage -PASS Storage interface: sessionStorage must inherit property "length" with the proper type -PASS Storage interface: sessionStorage must inherit property "key(unsigned long)" with the proper type -PASS Storage interface: calling key(unsigned long) on sessionStorage with too few arguments must throw TypeError -PASS Storage interface: sessionStorage must inherit property "getItem(DOMString)" with the proper type -PASS Storage interface: calling getItem(DOMString) on sessionStorage with too few arguments must throw TypeError -PASS Storage interface: sessionStorage must inherit property "setItem(DOMString, DOMString)" with the proper type -PASS Storage interface: calling setItem(DOMString, DOMString) on sessionStorage with too few arguments must throw TypeError -PASS Storage interface: sessionStorage must inherit property "removeItem(DOMString)" with the proper type -PASS Storage interface: calling removeItem(DOMString) on sessionStorage with too few arguments must throw TypeError -PASS Storage interface: sessionStorage must inherit property "clear()" with the proper type -PASS StorageEvent interface: existence and properties of interface object -PASS StorageEvent interface object length -PASS StorageEvent interface object name -PASS StorageEvent interface: existence and properties of interface prototype object -PASS StorageEvent interface: existence and properties of interface prototype object's "constructor" property -PASS StorageEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS StorageEvent interface: attribute key -PASS StorageEvent interface: attribute oldValue -PASS StorageEvent interface: attribute newValue -PASS StorageEvent interface: attribute url -PASS StorageEvent interface: attribute storageArea -PASS StorageEvent interface: operation initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?) -PASS StorageEvent must be primary interface of new StorageEvent("storage") -PASS Stringification of new StorageEvent("storage") -PASS StorageEvent interface: new StorageEvent("storage") must inherit property "key" with the proper type -PASS StorageEvent interface: new StorageEvent("storage") must inherit property "oldValue" with the proper type -PASS StorageEvent interface: new StorageEvent("storage") must inherit property "newValue" with the proper type -PASS StorageEvent interface: new StorageEvent("storage") must inherit property "url" with the proper type -PASS StorageEvent interface: new StorageEvent("storage") must inherit property "storageArea" with the proper type -PASS StorageEvent interface: new StorageEvent("storage") must inherit property "initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?)" with the proper type -PASS StorageEvent interface: calling initStorageEvent(DOMString, optional boolean, optional boolean, optional DOMString?, optional DOMString?, optional DOMString?, optional USVString, optional Storage?) on new StorageEvent("storage") with too few arguments must throw TypeError -PASS External interface: existence and properties of interface object -PASS External interface object length -PASS External interface object name -PASS External interface: existence and properties of interface prototype object -PASS External interface: existence and properties of interface prototype object's "constructor" property -PASS External interface: existence and properties of interface prototype object's @@unscopables property -PASS External interface: operation AddSearchProvider() -PASS External interface: operation IsSearchProviderInstalled() -PASS External must be primary interface of window.external -PASS Stringification of window.external -PASS External interface: window.external must inherit property "AddSearchProvider()" with the proper type -PASS External interface: window.external must inherit property "IsSearchProviderInstalled()" with the proper type -PASS SVGElement interface: attribute onabort -PASS SVGElement interface: attribute onauxclick -PASS SVGElement interface: attribute onblur -PASS SVGElement interface: attribute oncancel -PASS SVGElement interface: attribute oncanplay -PASS SVGElement interface: attribute oncanplaythrough -PASS SVGElement interface: attribute onchange -PASS SVGElement interface: attribute onclick -PASS SVGElement interface: attribute onclose -PASS SVGElement interface: attribute oncontextlost -PASS SVGElement interface: attribute oncontextmenu -PASS SVGElement interface: attribute oncontextrestored -PASS SVGElement interface: attribute oncuechange -PASS SVGElement interface: attribute ondblclick -PASS SVGElement interface: attribute ondrag -PASS SVGElement interface: attribute ondragend -PASS SVGElement interface: attribute ondragenter -PASS SVGElement interface: attribute ondragleave -PASS SVGElement interface: attribute ondragover -PASS SVGElement interface: attribute ondragstart -PASS SVGElement interface: attribute ondrop -PASS SVGElement interface: attribute ondurationchange -PASS SVGElement interface: attribute onemptied -PASS SVGElement interface: attribute onended -PASS SVGElement interface: attribute onerror -PASS SVGElement interface: attribute onfocus -PASS SVGElement interface: attribute onformdata -PASS SVGElement interface: attribute oninput -PASS SVGElement interface: attribute oninvalid -PASS SVGElement interface: attribute onkeydown -PASS SVGElement interface: attribute onkeypress -PASS SVGElement interface: attribute onkeyup -PASS SVGElement interface: attribute onload -PASS SVGElement interface: attribute onloadeddata -PASS SVGElement interface: attribute onloadedmetadata -PASS SVGElement interface: attribute onloadstart -PASS SVGElement interface: attribute onmousedown -PASS SVGElement interface: attribute onmouseenter -PASS SVGElement interface: attribute onmouseleave -PASS SVGElement interface: attribute onmousemove -PASS SVGElement interface: attribute onmouseout -PASS SVGElement interface: attribute onmouseover -PASS SVGElement interface: attribute onmouseup -PASS SVGElement interface: attribute onpause -PASS SVGElement interface: attribute onplay -PASS SVGElement interface: attribute onplaying -PASS SVGElement interface: attribute onprogress -PASS SVGElement interface: attribute onratechange -PASS SVGElement interface: attribute onreset -PASS SVGElement interface: attribute onresize -PASS SVGElement interface: attribute onscroll -PASS SVGElement interface: attribute onsecuritypolicyviolation -PASS SVGElement interface: attribute onseeked -PASS SVGElement interface: attribute onseeking -PASS SVGElement interface: attribute onselect -PASS SVGElement interface: attribute onslotchange -PASS SVGElement interface: attribute onstalled -PASS SVGElement interface: attribute onsubmit -PASS SVGElement interface: attribute onsuspend -PASS SVGElement interface: attribute ontimeupdate -PASS SVGElement interface: attribute ontoggle -PASS SVGElement interface: attribute onvolumechange -PASS SVGElement interface: attribute onwaiting -PASS SVGElement interface: attribute onwebkitanimationend -PASS SVGElement interface: attribute onwebkitanimationiteration -PASS SVGElement interface: attribute onwebkitanimationstart -PASS SVGElement interface: attribute onwebkittransitionend -PASS SVGElement interface: attribute onwheel -PASS SVGElement interface: attribute oncopy -PASS SVGElement interface: attribute oncut -PASS SVGElement interface: attribute onpaste -PASS SVGElement interface: attribute dataset -PASS SVGElement interface: attribute nonce -PASS SVGElement interface: attribute autofocus -PASS SVGElement interface: attribute tabIndex -PASS SVGElement interface: operation focus(optional FocusOptions) -PASS SVGElement interface: operation blur() -FAIL SVGSVGElement interface: attribute onafterprint assert_true: The prototype object must have a property "onafterprint" expected true got false -FAIL SVGSVGElement interface: attribute onbeforeprint assert_true: The prototype object must have a property "onbeforeprint" expected true got false -FAIL SVGSVGElement interface: attribute onbeforeunload assert_true: The prototype object must have a property "onbeforeunload" expected true got false -FAIL SVGSVGElement interface: attribute onhashchange assert_true: The prototype object must have a property "onhashchange" expected true got false -FAIL SVGSVGElement interface: attribute onlanguagechange assert_true: The prototype object must have a property "onlanguagechange" expected true got false -FAIL SVGSVGElement interface: attribute onmessage assert_true: The prototype object must have a property "onmessage" expected true got false -FAIL SVGSVGElement interface: attribute onmessageerror assert_true: The prototype object must have a property "onmessageerror" expected true got false -FAIL SVGSVGElement interface: attribute onoffline assert_true: The prototype object must have a property "onoffline" expected true got false -FAIL SVGSVGElement interface: attribute ononline assert_true: The prototype object must have a property "ononline" expected true got false -FAIL SVGSVGElement interface: attribute onpagehide assert_true: The prototype object must have a property "onpagehide" expected true got false -FAIL SVGSVGElement interface: attribute onpageshow assert_true: The prototype object must have a property "onpageshow" expected true got false -FAIL SVGSVGElement interface: attribute onpopstate assert_true: The prototype object must have a property "onpopstate" expected true got false -FAIL SVGSVGElement interface: attribute onrejectionhandled assert_true: The prototype object must have a property "onrejectionhandled" expected true got false -FAIL SVGSVGElement interface: attribute onstorage assert_true: The prototype object must have a property "onstorage" expected true got false -FAIL SVGSVGElement interface: attribute onunhandledrejection assert_true: The prototype object must have a property "onunhandledrejection" expected true got false -FAIL SVGSVGElement interface: attribute onunload assert_true: The prototype object must have a property "onunload" expected true got false -PASS ShadowRoot interface: attribute activeElement -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt b/third_party/blink/web_tests/platform/mac/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt new file mode 100644 index 0000000..d01d0de --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt
@@ -0,0 +1,65 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='overflow fixed'", + "bounds": [800, 600], + "contentsOpaqueForText": true, + "drawsContent": false, + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='overflow fixed'", + "bounds": [785, 600], + "drawsContent": false, + "transform": 1 + }, + { + "name": "VerticalScrollbar", + "position": [785, 0], + "bounds": [15, 600], + "contentsOpaque": true, + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='overflow fixed'", + "bounds": [100, 1000], + "contentsOpaque": true, + "backgroundColor": "#0000FF", + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='yellow fixed'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#FFFF00", + "transform": 2 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 13, 0, 1] + ] + }, + { + "id": 2, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [200, 13, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt b/third_party/blink/web_tests/platform/mac/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt new file mode 100644 index 0000000..08abbee7 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt
@@ -0,0 +1,69 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow DIV id='intervening'", + "bounds": [300, 300], + "contentsOpaque": true, + "backfaceVisibility": "hidden", + "backgroundColor": "#FFEFD5", + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow DIV id='scroller'", + "position": [1, 1], + "bounds": [100, 100], + "drawsContent": false, + "backfaceVisibility": "hidden", + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV id='fixed'", + "bounds": [80, 80], + "contentsOpaque": true, + "backgroundColor": "#008000", + "transform": 2 + }, + { + "name": "LayoutNGBlockFlow (relative positioned) DIV class='scrolled'", + "position": [5, 5], + "bounds": [60, 172], + "contentsOpaqueForText": true, + "backfaceVisibility": "hidden", + "transform": 1 + }, + { + "name": "VerticalScrollbar", + "position": [94, 1], + "bounds": [7, 100], + "backfaceVisibility": "hidden", + "transform": 1 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [98, 90, 0, 1] + ] + }, + { + "id": 2, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [60, 60, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/compositing/rtl/rtl-fixed-expected.txt b/third_party/blink/web_tests/platform/mac/compositing/rtl/rtl-fixed-expected.txt new file mode 100644 index 0000000..aee0b84 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/compositing/rtl/rtl-fixed-expected.txt
@@ -0,0 +1,45 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='positioned indicator'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#FF0000", + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='positioned layer'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#008000", + "transform": 2 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [50, 50, 0, 1] + ] + }, + { + "id": 2, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [50, 50, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt b/third_party/blink/web_tests/platform/mac/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt new file mode 100644 index 0000000..d53f5201 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt
@@ -0,0 +1,51 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='fixedpos'", + "bounds": [800, 550], + "contentsOpaque": true, + "backgroundColor": "#ADD8E6", + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='compositedlayer'", + "bounds": [24, 100], + "contentsOpaque": true, + "backgroundColor": "#D3D3D3", + "transform": 2 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='notsquashedelement'", + "bounds": [800, 60], + "contentsOpaque": true, + "backgroundColor": "#008000" + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [0, 50, 0, 1] + ] + }, + { + "id": 2, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [400, 40, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt b/third_party/blink/web_tests/platform/mac/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt new file mode 100644 index 0000000..11d1401 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/compositing/squashing/squash-paint-invalidation-fixed-position-expected.txt
@@ -0,0 +1,127 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV", + "bounds": [100, 5000], + "contentsOpaque": true, + "backgroundColor": "#ADD8E6", + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#D3D3D3", + "transform": 2 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV id='foo'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#FF0000", + "invalidations": [ + [0, 0, 100, 100] + ], + "transform": 3 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 8, 0, 1] + ] + }, + { + "id": 2, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 25, 0, 1] + ] + }, + { + "id": 3, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 50, 0, 1] + ] + } + ] +} + { + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV", + "bounds": [100, 5000], + "contentsOpaque": true, + "backgroundColor": "#ADD8E6", + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#D3D3D3", + "transform": 2 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV id='foo'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#0000FF", + "invalidations": [ + [0, 0, 100, 100] + ], + "transform": 3 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 8, 0, 1] + ] + }, + { + "id": 2, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 25, 0, 1] + ] + }, + { + "id": 3, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 50, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/external/wpt/css/css-scroll-snap/scroll-target-margin-005-expected.txt b/third_party/blink/web_tests/platform/mac/external/wpt/css/css-scroll-snap/scroll-target-margin-005-expected.txt index 714a65a..a1112ef 100644 --- a/third_party/blink/web_tests/platform/mac/external/wpt/css/css-scroll-snap/scroll-target-margin-005-expected.txt +++ b/third_party/blink/web_tests/platform/mac/external/wpt/css/css-scroll-snap/scroll-target-margin-005-expected.txt
@@ -1,4 +1,4 @@ This is a testharness.js-based test. -FAIL scroll-margin on input widget assert_between_exclusive: Should honor date input scroll-margin expected a number greater than 4750 and less than 4850 but got 4718.65625 +FAIL scroll-margin on input widget assert_between_exclusive: Should honor date input scroll-margin expected a number greater than 4750 and less than 4850 but got 4718 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/containing-block-removed-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/containing-block-removed-expected.txt new file mode 100644 index 0000000..176b4b0 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/containing-block-removed-expected.txt
@@ -0,0 +1,51 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV id='container'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#0000FF", + "invalidations": [ + [50, 50, 75, 75] + ], + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='fixed'", + "bounds": [75, 75], + "contentsOpaque": true, + "backgroundColor": "#008000", + "invalidations": [ + [0, 0, 75, 75] + ], + "transform": 2 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [200, 100, 0, 1] + ] + }, + { + "id": 2, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [50, 50, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/containing-block-removed-individual-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/containing-block-removed-individual-expected.txt new file mode 100644 index 0000000..31a891f --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/containing-block-removed-individual-expected.txt
@@ -0,0 +1,52 @@ +CONSOLE MESSAGE: debug +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV id='container'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#0000FF", + "invalidations": [ + [50, 50, 75, 75] + ], + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV class='fixed'", + "bounds": [75, 75], + "contentsOpaque": true, + "backgroundColor": "#008000", + "invalidations": [ + [0, 0, 75, 75] + ], + "transform": 2 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [200, 100, 0, 1] + ] + }, + { + "id": 2, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [50, 50, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/flexbox/repaint-on-layout-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/flexbox/repaint-on-layout-expected.txt new file mode 100644 index 0000000..4d28c6c --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/flexbox/repaint-on-layout-expected.txt
@@ -0,0 +1,32 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "invalidations": [ + [712, 8, 80, 20] + ] + }, + { + "name": "LayoutNGFlexibleBox (positioned) NAV class='nav-bar'", + "bounds": [200, 600], + "contentsOpaque": true, + "backgroundColor": "#008000", + "transform": 1 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 0, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/position/fixed-margin-change-repaint-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/position/fixed-margin-change-repaint-expected.txt new file mode 100644 index 0000000..0f1fd89 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/position/fixed-margin-change-repaint-expected.txt
@@ -0,0 +1,29 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV id='test'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#008000", + "transform": 1 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [0, 60, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/position/position-change-keeping-geometry-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/position/position-change-keeping-geometry-expected.txt new file mode 100644 index 0000000..44c1e6f --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/position/position-change-keeping-geometry-expected.txt
@@ -0,0 +1,36 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "invalidations": [ + [420, 20, 100, 100], + [220, 20, 100, 100] + ] + }, + { + "name": "LayoutNGBlockFlow (positioned) DIV id='target3'", + "bounds": [100, 100], + "contentsOpaque": true, + "backgroundColor": "#0000FF", + "invalidations": [ + [0, 0, 100, 100] + ], + "transform": 1 + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [420, 20, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/win/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt b/third_party/blink/web_tests/platform/win/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt index 7b84d9d..2a0a793 100644 --- a/third_party/blink/web_tests/platform/win/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt +++ b/third_party/blink/web_tests/platform/win/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers-expected.txt
@@ -38,10 +38,10 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV class='fixed lime box'", + "position": [10, 100], "bounds": [100, 100], "contentsOpaque": true, - "backgroundColor": "#00FF00", - "transform": 2 + "backgroundColor": "#00FF00" } ], "transforms": [ @@ -53,15 +53,6 @@ [0, 0, 1, 0], [8, 72, 0, 1] ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [10, 100, 0, 1] - ] } ] }
diff --git a/third_party/blink/web_tests/platform/win/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt b/third_party/blink/web_tests/platform/win/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt index 165f63a..9af3a3b 100644 --- a/third_party/blink/web_tests/platform/win/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt +++ b/third_party/blink/web_tests/platform/win/compositing/layer-creation/impl-thread-scrolling-non-composited-fixed-no-scroll-expected.txt
@@ -9,19 +9,8 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV class='fixed'", - "bounds": [36, 20], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [10, 10, 0, 1] - ] + "position": [10, 10], + "bounds": [36, 20] } ] }
diff --git a/third_party/blink/web_tests/platform/win/fast/clip/overflow-border-radius-fixed-position-expected.png b/third_party/blink/web_tests/platform/win/fast/clip/overflow-border-radius-fixed-position-expected.png index 64d506770..fbd032f 100644 --- a/third_party/blink/web_tests/platform/win/fast/clip/overflow-border-radius-fixed-position-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/clip/overflow-border-radius-fixed-position-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/table/multiple-captions-display-expected.png b/third_party/blink/web_tests/platform/win/fast/table/multiple-captions-display-expected.png index 07382118..5d42064 100644 --- a/third_party/blink/web_tests/platform/win/fast/table/multiple-captions-display-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/table/multiple-captions-display-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/position/fixed-element-repaint-after-compositing-update-expected.txt b/third_party/blink/web_tests/platform/win/paint/invalidation/position/fixed-element-repaint-after-compositing-update-expected.txt index 57b4bd7..d51cb60 100644 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/position/fixed-element-repaint-after-compositing-update-expected.txt +++ b/third_party/blink/web_tests/platform/win/paint/invalidation/position/fixed-element-repaint-after-compositing-update-expected.txt
@@ -8,36 +8,12 @@ }, { "name": "LayoutNGBlockFlow (positioned) DIV id='fixedOverlapping'", - "bounds": [800, 600], + "position": [8, 88], + "bounds": [792, 512], "contentsOpaqueForText": true, - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutNGBlockFlow (positioned) DIV id='moveMe'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 88, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [150, 150, 0, 1] + "invalidations": [ + [142, 62, 100, 100], + [0, 0, 100, 100] ] } ]
diff --git a/third_party/blink/web_tests/virtual/close-watcher/README.md b/third_party/blink/web_tests/virtual/close-watcher/README.md new file mode 100644 index 0000000..807eb755 --- /dev/null +++ b/third_party/blink/web_tests/virtual/close-watcher/README.md
@@ -0,0 +1,8 @@ +This is a virtual test suite for the new CloseWatcher feature. It was simply +enabled in experimental web platform features, but since it causes some +interop2022 tracked WPTs to fail, we need to keep it out of experimental web +platform features for now. Since it isn't in experimental web platform features, +we need this virtual test suite in order to get any test coverage. + +Flag: --enable-blink-features=CloseWatcher +Bug: crbug.com/1171318
diff --git a/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/abortsignal-expected.txt b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/abortsignal-expected.txt new file mode 100644 index 0000000..51cf37e --- /dev/null +++ b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/abortsignal-expected.txt
@@ -0,0 +1,12 @@ +This is a testharness.js-based test. +PASS already-aborted AbortSignal then close() fires no events +PASS abortController.abort() then close() fires no events +PASS close() then abortController.abort() fires only one close event +PASS already-aborted AbortSignal then Esc key fires no events +PASS abortController.abort() then close via Esc key fires no events +PASS Esc key then abortController.abort() fires only one close event +PASS abortController.abort()ing a free CloseWatcher allows a new one to be created without a user activation +PASS abortController.abort() inside oncancel +PASS abortController.abort() inside onclose is benign +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/after-other-listeners-expected.txt b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/after-other-listeners-expected.txt new file mode 100644 index 0000000..a21020c --- /dev/null +++ b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/after-other-listeners-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +PASS normal event listeners come before CloseWatcher +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/basic-expected.txt b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/basic-expected.txt new file mode 100644 index 0000000..c26783c --- /dev/null +++ b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/basic-expected.txt
@@ -0,0 +1,15 @@ +This is a testharness.js-based test. +PASS close() with no user activation only fires close +PASS destroy() then close() fires no events +PASS close() then destroy() fires only one close event +PASS Esc key does not count as user activation, so it fires close but not cancel +PASS destroy() then close via Esc key fires no events +PASS Esc key then destroy() fires only one close event +PASS close via synthesized escape key should not work +PASS destroy inside oncancel +PASS destroy inside onclose is benign +PASS close inside oncancel should not trigger an infinite loop +PASS close inside onclose should not trigger an infinite loop +PASS close with events added via addEventListener +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/frame-removal-expected.txt b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/frame-removal-expected.txt new file mode 100644 index 0000000..1e4e615e --- /dev/null +++ b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/frame-removal-expected.txt
@@ -0,0 +1,8 @@ +This is a testharness.js-based test. +PASS detaching the iframe during the cancel event +PASS detaching the iframe during the close event +PASS detaching the iframe then calling destroy() +PASS detaching the iframe then calling close() +PASS detaching the iframe then constructing a CloseWatcher +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/user-activation-expected.txt b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/user-activation-expected.txt new file mode 100644 index 0000000..94c06eb --- /dev/null +++ b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/user-activation-expected.txt
@@ -0,0 +1,19 @@ +This is a testharness.js-based test. +PASS CloseWatchers created without user activation, but close()d via user activation, fires cancel +PASS CloseWatchers created without user activation, but close()d via user activation, fires cancel, which can be preventDefault()ed +PASS CloseWatchers created without user activation, but closed via a close signal after user activation, fires cancel +PASS CloseWatchers created without user activation, but closed via a close signal after user activation, fires cancel, which can be preventDefault()ed +PASS Multiple CloseWatchers created without user activation close together (with no cancel) +PASS Creating a CloseWatcher from user activation keeps it separate from the free CloseWatcher, but they don't fire cancel +PASS Creating a CloseWatcher from user activation, and close()ing CloseWatchers with user activation, fires cancel +PASS Creating a CloseWatcher from user activation, and closing CloseWatchers with a close signal after user activation, fires cancel +PASS Multiple CloseWatchers created with user activation close in reverse order +PASS 3 user activations let you have 3 + 1 = 4 ungrouped close watchers/0 cancel events +PASS 3 user activations let you have 2 close watchers with 1 cancel event, even if the first cancel event is prevented +PASS destroy()ing the free CloseWatcher allows a new free one to be created without user activation, and it receives the close signal +PASS close()ing the free CloseWatcher allows a new free one to be created without user activation, and it receives the close signal +PASS closing the free CloseWatcher via a close signal allows a new free one to be created without user activation, and it receives a second close signal +PASS The second watcher can be the free watcher, if the first is created with user activation +PASS The third watcher can be the free watcher, if the first two are created with user activation +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/user-activation-multiple-plus-free-expected.txt b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/user-activation-multiple-plus-free-expected.txt new file mode 100644 index 0000000..00a7897 --- /dev/null +++ b/third_party/blink/web_tests/virtual/close-watcher/external/wpt/close-watcher/user-activation-multiple-plus-free-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +PASS Multiple CloseWatchers created from a single user activation close together, but original free CloseWatcher closes separately +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/fractional-scroll-offsets/README.md b/third_party/blink/web_tests/virtual/fractional-scroll-offsets/README.md new file mode 100644 index 0000000..e9dbee8 --- /dev/null +++ b/third_party/blink/web_tests/virtual/fractional-scroll-offsets/README.md
@@ -0,0 +1 @@ +This suite runs test with --enable-blink-features=FractionalScrollOffsets
diff --git a/third_party/blink/web_tests/virtual/fractional-scroll-offsets/external/wpt/css/css-position/sticky/README.txt b/third_party/blink/web_tests/virtual/fractional-scroll-offsets/external/wpt/css/css-position/sticky/README.txt deleted file mode 100644 index 690ec4bf..0000000 --- a/third_party/blink/web_tests/virtual/fractional-scroll-offsets/external/wpt/css/css-position/sticky/README.txt +++ /dev/null
@@ -1,2 +0,0 @@ -# This suite runs the test in external/wpt/css/css-position/sticky with -# --enable-blink-features=FractionalScrollOffsets
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt index eafab62..9bab0dad6 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
@@ -273,7 +273,9 @@ interface AudioContext : BaseAudioContext attribute @@toStringTag getter baseLatency + getter onsinkchange getter outputLatency + getter sinkId method close method constructor method createMediaElementSource @@ -281,7 +283,9 @@ method createMediaStreamSource method getOutputTimestamp method resume + method setSinkId method suspend + setter onsinkchange interface AudioData attribute @@toStringTag getter duration @@ -1260,15 +1264,6 @@ getter reason getter wasClean method constructor -interface CloseWatcher : EventTarget - attribute @@toStringTag - getter oncancel - getter onclose - method close - method constructor - method destroy - setter oncancel - setter onclose interface Comment : CharacterData attribute @@toStringTag method constructor
diff --git a/third_party/closure_compiler/externs/autofill_private.js b/third_party/closure_compiler/externs/autofill_private.js index 483c261..7c7ff06 100644 --- a/third_party/closure_compiler/externs/autofill_private.js +++ b/third_party/closure_compiler/externs/autofill_private.js
@@ -106,6 +106,7 @@ * expirationYear: (string|undefined), * nickname: (string|undefined), * network: (string|undefined), + * imageSrc: (string|undefined), * metadata: (!chrome.autofillPrivate.AutofillMetadata|undefined) * }} */
diff --git a/third_party/libaom/README.chromium b/third_party/libaom/README.chromium index 74056b2..1b38805 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: 3.4.0 -Date: Thursday August 18 2022 -Revision: 2fcb0760ea632ef250465819f7d979a695b7c149 +Date: Wednesday August 31 2022 +Revision: ff7b753a63a536423a91b64a066bd385c52ceacc CPEPrefix: cpe:/a:aomedia:aomedia:3.4.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 7005dd5..69719b71 100644 --- a/third_party/libaom/libaom_srcs.gni +++ b/third_party/libaom/libaom_srcs.gni
@@ -592,8 +592,10 @@ "//third_party/libaom/source/libaom/aom_dsp/x86/variance_sse2.c", ] -aom_dsp_encoder_intrin_sse4_1 = - [ "//third_party/libaom/source/libaom/aom_dsp/x86/sse_sse4.c" ] +aom_dsp_encoder_intrin_sse4_1 = [ + "//third_party/libaom/source/libaom/aom_dsp/x86/avg_intrin_sse4.c", + "//third_party/libaom/source/libaom/aom_dsp/x86/sse_sse4.c", +] aom_dsp_encoder_intrin_ssse3 = [ "//third_party/libaom/source/libaom/aom_dsp/x86/masked_sad_intrin_ssse3.h",
diff --git a/third_party/libaom/source/config/config/aom_version.h b/third_party/libaom/source/config/config/aom_version.h index 4e3d8749..8b440922 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 4 #define VERSION_PATCH 0 -#define VERSION_EXTRA "254-g2fcb0760e" +#define VERSION_EXTRA "318-gff7b753a6" #define VERSION_PACKED \ ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | (VERSION_PATCH)) -#define VERSION_STRING_NOSP "3.4.0-254-g2fcb0760e" -#define VERSION_STRING " 3.4.0-254-g2fcb0760e" +#define VERSION_STRING_NOSP "3.4.0-318-gff7b753a6" +#define VERSION_STRING " 3.4.0-318-gff7b753a6"
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 c13fd6a..fd5239c8 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
@@ -9117,7 +9117,12 @@ #define aom_variance8x8 aom_variance8x8_sse2 int aom_vector_var_c(const int16_t* ref, const int16_t* src, const int bwl); -#define aom_vector_var aom_vector_var_c +int aom_vector_var_sse4_1(const int16_t* ref, + const int16_t* src, + const int bwl); +RTCD_EXTERN int (*aom_vector_var)(const int16_t* ref, + const int16_t* src, + const int bwl); void aom_dsp_rtcd(void); @@ -10205,6 +10210,9 @@ aom_variance64x64 = aom_variance64x64_sse2; if (flags & HAS_AVX2) aom_variance64x64 = aom_variance64x64_avx2; + aom_vector_var = aom_vector_var_c; + if (flags & HAS_SSE4_1) + aom_vector_var = aom_vector_var_sse4_1; } #endif
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 35ac584..01815d58 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
@@ -9153,7 +9153,12 @@ #define aom_variance8x8 aom_variance8x8_sse2 int aom_vector_var_c(const int16_t* ref, const int16_t* src, const int bwl); -#define aom_vector_var aom_vector_var_c +int aom_vector_var_sse4_1(const int16_t* ref, + const int16_t* src, + const int bwl); +RTCD_EXTERN int (*aom_vector_var)(const int16_t* ref, + const int16_t* src, + const int bwl); void aom_dsp_rtcd(void); @@ -10248,6 +10253,9 @@ aom_variance64x64 = aom_variance64x64_sse2; if (flags & HAS_AVX2) aom_variance64x64 = aom_variance64x64_avx2; + aom_vector_var = aom_vector_var_c; + if (flags & HAS_SSE4_1) + aom_vector_var = aom_vector_var_sse4_1; } #endif
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 c13fd6a..fd5239c8 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
@@ -9117,7 +9117,12 @@ #define aom_variance8x8 aom_variance8x8_sse2 int aom_vector_var_c(const int16_t* ref, const int16_t* src, const int bwl); -#define aom_vector_var aom_vector_var_c +int aom_vector_var_sse4_1(const int16_t* ref, + const int16_t* src, + const int bwl); +RTCD_EXTERN int (*aom_vector_var)(const int16_t* ref, + const int16_t* src, + const int bwl); void aom_dsp_rtcd(void); @@ -10205,6 +10210,9 @@ aom_variance64x64 = aom_variance64x64_sse2; if (flags & HAS_AVX2) aom_variance64x64 = aom_variance64x64_avx2; + aom_vector_var = aom_vector_var_c; + if (flags & HAS_SSE4_1) + aom_vector_var = aom_vector_var_sse4_1; } #endif
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 35ac584..01815d58 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
@@ -9153,7 +9153,12 @@ #define aom_variance8x8 aom_variance8x8_sse2 int aom_vector_var_c(const int16_t* ref, const int16_t* src, const int bwl); -#define aom_vector_var aom_vector_var_c +int aom_vector_var_sse4_1(const int16_t* ref, + const int16_t* src, + const int bwl); +RTCD_EXTERN int (*aom_vector_var)(const int16_t* ref, + const int16_t* src, + const int bwl); void aom_dsp_rtcd(void); @@ -10248,6 +10253,9 @@ aom_variance64x64 = aom_variance64x64_sse2; if (flags & HAS_AVX2) aom_variance64x64 = aom_variance64x64_avx2; + aom_vector_var = aom_vector_var_c; + if (flags & HAS_SSE4_1) + aom_vector_var = aom_vector_var_sse4_1; } #endif
diff --git a/third_party/libvpx/README.chromium b/third_party/libvpx/README.chromium index 12844a37..b3e6bf7 100644 --- a/third_party/libvpx/README.chromium +++ b/third_party/libvpx/README.chromium
@@ -1,8 +1,8 @@ Name: libvpx URL: https://chromium.googlesource.com/webm/libvpx Version: v1.12.0 -Date: Tuesday August 09 2022 -Revision: 8786aee5821801fe6b5a285be009ba67ea7f4e63 +Date: Tuesday August 30 2022 +Revision: 9d6d0624d7943a09cc0be9df1a7402522989ac1a CPEPrefix: cpe:/a:webmproject:libvpx:1.12.0 License: BSD License File: source/libvpx/LICENSE
diff --git a/third_party/libvpx/libvpx_srcs.gni b/third_party/libvpx/libvpx_srcs.gni index cd686aa8..7fbb8b1 100644 --- a/third_party/libvpx/libvpx_srcs.gni +++ b/third_party/libvpx/libvpx_srcs.gni
@@ -2768,6 +2768,9 @@ "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_idct8x8_add_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_intrapred_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_loopfilter_neon.c", + "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_quantize_neon.c", + "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_sad_neon.c", + "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_variance_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_vpx_convolve8_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_vpx_convolve_avg_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_vpx_convolve_copy_neon.c", @@ -3214,6 +3217,9 @@ "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_idct8x8_add_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_intrapred_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_loopfilter_neon.c", + "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_quantize_neon.c", + "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_sad_neon.c", + "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_variance_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_vpx_convolve8_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_vpx_convolve_avg_neon.c", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/highbd_vpx_convolve_copy_neon.c",
diff --git a/third_party/libvpx/source/config/linux/arm-neon-highbd/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-highbd/vp9_rtcd.h index 9f01a61..687f13e 100644 --- a/third_party/libvpx/source/config/linux/arm-neon-highbd/vp9_rtcd.h +++ b/third_party/libvpx/source/config/linux/arm-neon-highbd/vp9_rtcd.h
@@ -227,7 +227,17 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c +void vp9_highbd_quantize_fp_neon(const tran_low_t* coeff_ptr, + intptr_t n_coeffs, + const int16_t* round_ptr, + const int16_t* quant_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 vp9_highbd_quantize_fp vp9_highbd_quantize_fp_neon void vp9_highbd_quantize_fp_32x32_c(const tran_low_t* coeff_ptr, intptr_t n_coeffs, @@ -239,7 +249,17 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c +void vp9_highbd_quantize_fp_32x32_neon(const tran_low_t* coeff_ptr, + intptr_t n_coeffs, + const int16_t* round_ptr, + const int16_t* quant_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 vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_neon void vp9_highbd_temporal_filter_apply_c(const uint8_t* frame1, unsigned int stride,
diff --git a/third_party/libvpx/source/config/linux/arm-neon-highbd/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-highbd/vpx_dsp_rtcd.h index 94827090..bc12d64 100644 --- a/third_party/libvpx/source/config/linux/arm-neon-highbd/vpx_dsp_rtcd.h +++ b/third_party/libvpx/source/config/linux/arm-neon-highbd/vpx_dsp_rtcd.h
@@ -734,7 +734,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c +void vpx_highbd_10_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_neon void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -742,35 +748,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c +void vpx_highbd_10_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_neon unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c +unsigned int vpx_highbd_10_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_neon unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c +unsigned int vpx_highbd_10_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_neon unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c +unsigned int vpx_highbd_10_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_neon unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c +unsigned int vpx_highbd_10_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c( const uint8_t* src_ptr, @@ -781,8 +813,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x16 \ - vpx_highbd_10_sub_pixel_avg_variance16x16_c + vpx_highbd_10_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c( const uint8_t* src_ptr, @@ -793,8 +834,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x32 \ - vpx_highbd_10_sub_pixel_avg_variance16x32_c + vpx_highbd_10_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -804,8 +854,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x8 \ - vpx_highbd_10_sub_pixel_avg_variance16x8_c + vpx_highbd_10_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c( const uint8_t* src_ptr, @@ -816,8 +875,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x16 \ - vpx_highbd_10_sub_pixel_avg_variance32x16_c + vpx_highbd_10_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c( const uint8_t* src_ptr, @@ -828,8 +896,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x32 \ - vpx_highbd_10_sub_pixel_avg_variance32x32_c + vpx_highbd_10_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c( const uint8_t* src_ptr, @@ -840,8 +917,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x64 \ - vpx_highbd_10_sub_pixel_avg_variance32x64_c + vpx_highbd_10_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -851,8 +937,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance4x4 \ - vpx_highbd_10_sub_pixel_avg_variance4x4_c + vpx_highbd_10_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -862,8 +957,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance4x8 \ - vpx_highbd_10_sub_pixel_avg_variance4x8_c + vpx_highbd_10_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c( const uint8_t* src_ptr, @@ -874,8 +978,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance64x32 \ - vpx_highbd_10_sub_pixel_avg_variance64x32_c + vpx_highbd_10_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c( const uint8_t* src_ptr, @@ -886,8 +999,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance64x64 \ - vpx_highbd_10_sub_pixel_avg_variance64x64_c + vpx_highbd_10_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -897,8 +1019,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x16 \ - vpx_highbd_10_sub_pixel_avg_variance8x16_c + vpx_highbd_10_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -908,8 +1039,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x4 \ - vpx_highbd_10_sub_pixel_avg_variance8x4_c + vpx_highbd_10_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -919,8 +1059,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x8 \ - vpx_highbd_10_sub_pixel_avg_variance8x8_c + vpx_highbd_10_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -929,8 +1078,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x16 \ - vpx_highbd_10_sub_pixel_variance16x16_c + vpx_highbd_10_sub_pixel_variance16x16_neon uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -939,8 +1095,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x32 \ - vpx_highbd_10_sub_pixel_variance16x32_c + vpx_highbd_10_sub_pixel_variance16x32_neon uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -949,8 +1112,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x8 \ - vpx_highbd_10_sub_pixel_variance16x8_c + vpx_highbd_10_sub_pixel_variance16x8_neon uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -959,8 +1129,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x16 \ - vpx_highbd_10_sub_pixel_variance32x16_c + vpx_highbd_10_sub_pixel_variance32x16_neon uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -969,8 +1146,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x32 \ - vpx_highbd_10_sub_pixel_variance32x32_c + vpx_highbd_10_sub_pixel_variance32x32_neon uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -979,8 +1163,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x64 \ - vpx_highbd_10_sub_pixel_variance32x64_c + vpx_highbd_10_sub_pixel_variance32x64_neon uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -989,8 +1180,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance4x4 \ - vpx_highbd_10_sub_pixel_variance4x4_c + vpx_highbd_10_sub_pixel_variance4x4_neon uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -999,8 +1197,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance4x8 \ - vpx_highbd_10_sub_pixel_variance4x8_c + vpx_highbd_10_sub_pixel_variance4x8_neon uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1009,8 +1214,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance64x32 \ - vpx_highbd_10_sub_pixel_variance64x32_c + vpx_highbd_10_sub_pixel_variance64x32_neon uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1019,8 +1231,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance64x64 \ - vpx_highbd_10_sub_pixel_variance64x64_c + vpx_highbd_10_sub_pixel_variance64x64_neon uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1029,8 +1248,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x16 \ - vpx_highbd_10_sub_pixel_variance8x16_c + vpx_highbd_10_sub_pixel_variance8x16_neon uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1039,8 +1265,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x4 \ - vpx_highbd_10_sub_pixel_variance8x4_c + vpx_highbd_10_sub_pixel_variance8x4_neon uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1049,99 +1282,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x8 \ - vpx_highbd_10_sub_pixel_variance8x8_c + vpx_highbd_10_sub_pixel_variance8x8_neon unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c +unsigned int vpx_highbd_10_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_neon unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c +unsigned int vpx_highbd_10_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_neon unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c +unsigned int vpx_highbd_10_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_neon unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c +unsigned int vpx_highbd_10_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_neon unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c +unsigned int vpx_highbd_10_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_neon unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c +unsigned int vpx_highbd_10_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_neon unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c +unsigned int vpx_highbd_10_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_neon unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c +unsigned int vpx_highbd_10_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_neon unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c +unsigned int vpx_highbd_10_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_neon unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c +unsigned int vpx_highbd_10_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_neon unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c +unsigned int vpx_highbd_10_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_neon unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c +unsigned int vpx_highbd_10_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_neon unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c +unsigned int vpx_highbd_10_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_neon void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr, int src_stride, @@ -1149,7 +1454,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c +void vpx_highbd_12_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_neon void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -1157,35 +1468,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c +void vpx_highbd_12_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_neon unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c +unsigned int vpx_highbd_12_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_neon unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c +unsigned int vpx_highbd_12_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_neon unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c +unsigned int vpx_highbd_12_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_neon unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c +unsigned int vpx_highbd_12_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c( const uint8_t* src_ptr, @@ -1196,8 +1533,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x16 \ - vpx_highbd_12_sub_pixel_avg_variance16x16_c + vpx_highbd_12_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c( const uint8_t* src_ptr, @@ -1208,8 +1554,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x32 \ - vpx_highbd_12_sub_pixel_avg_variance16x32_c + vpx_highbd_12_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1219,8 +1574,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x8 \ - vpx_highbd_12_sub_pixel_avg_variance16x8_c + vpx_highbd_12_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c( const uint8_t* src_ptr, @@ -1231,8 +1595,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x16 \ - vpx_highbd_12_sub_pixel_avg_variance32x16_c + vpx_highbd_12_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c( const uint8_t* src_ptr, @@ -1243,8 +1616,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x32 \ - vpx_highbd_12_sub_pixel_avg_variance32x32_c + vpx_highbd_12_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c( const uint8_t* src_ptr, @@ -1255,8 +1637,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x64 \ - vpx_highbd_12_sub_pixel_avg_variance32x64_c + vpx_highbd_12_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1266,8 +1657,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance4x4 \ - vpx_highbd_12_sub_pixel_avg_variance4x4_c + vpx_highbd_12_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1277,8 +1677,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance4x8 \ - vpx_highbd_12_sub_pixel_avg_variance4x8_c + vpx_highbd_12_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c( const uint8_t* src_ptr, @@ -1289,8 +1698,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance64x32 \ - vpx_highbd_12_sub_pixel_avg_variance64x32_c + vpx_highbd_12_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c( const uint8_t* src_ptr, @@ -1301,8 +1719,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance64x64 \ - vpx_highbd_12_sub_pixel_avg_variance64x64_c + vpx_highbd_12_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1312,8 +1739,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x16 \ - vpx_highbd_12_sub_pixel_avg_variance8x16_c + vpx_highbd_12_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1323,8 +1759,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x4 \ - vpx_highbd_12_sub_pixel_avg_variance8x4_c + vpx_highbd_12_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1334,8 +1779,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x8 \ - vpx_highbd_12_sub_pixel_avg_variance8x8_c + vpx_highbd_12_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1344,8 +1798,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x16 \ - vpx_highbd_12_sub_pixel_variance16x16_c + vpx_highbd_12_sub_pixel_variance16x16_neon uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1354,8 +1815,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x32 \ - vpx_highbd_12_sub_pixel_variance16x32_c + vpx_highbd_12_sub_pixel_variance16x32_neon uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1364,8 +1832,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x8 \ - vpx_highbd_12_sub_pixel_variance16x8_c + vpx_highbd_12_sub_pixel_variance16x8_neon uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1374,8 +1849,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x16 \ - vpx_highbd_12_sub_pixel_variance32x16_c + vpx_highbd_12_sub_pixel_variance32x16_neon uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1384,8 +1866,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x32 \ - vpx_highbd_12_sub_pixel_variance32x32_c + vpx_highbd_12_sub_pixel_variance32x32_neon uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1394,8 +1883,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x64 \ - vpx_highbd_12_sub_pixel_variance32x64_c + vpx_highbd_12_sub_pixel_variance32x64_neon uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1404,8 +1900,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance4x4 \ - vpx_highbd_12_sub_pixel_variance4x4_c + vpx_highbd_12_sub_pixel_variance4x4_neon uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1414,8 +1917,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance4x8 \ - vpx_highbd_12_sub_pixel_variance4x8_c + vpx_highbd_12_sub_pixel_variance4x8_neon uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1424,8 +1934,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance64x32 \ - vpx_highbd_12_sub_pixel_variance64x32_c + vpx_highbd_12_sub_pixel_variance64x32_neon uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1434,8 +1951,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance64x64 \ - vpx_highbd_12_sub_pixel_variance64x64_c + vpx_highbd_12_sub_pixel_variance64x64_neon uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1444,8 +1968,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x16 \ - vpx_highbd_12_sub_pixel_variance8x16_c + vpx_highbd_12_sub_pixel_variance8x16_neon uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1454,8 +1985,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x4 \ - vpx_highbd_12_sub_pixel_variance8x4_c + vpx_highbd_12_sub_pixel_variance8x4_neon uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1464,99 +2002,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x8 \ - vpx_highbd_12_sub_pixel_variance8x8_c + vpx_highbd_12_sub_pixel_variance8x8_neon unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c +unsigned int vpx_highbd_12_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_neon unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c +unsigned int vpx_highbd_12_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_neon unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c +unsigned int vpx_highbd_12_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_neon unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c +unsigned int vpx_highbd_12_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_neon unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c +unsigned int vpx_highbd_12_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_neon unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c +unsigned int vpx_highbd_12_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_neon unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c +unsigned int vpx_highbd_12_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_neon unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c +unsigned int vpx_highbd_12_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_neon unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c +unsigned int vpx_highbd_12_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_neon unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c +unsigned int vpx_highbd_12_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_neon unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c +unsigned int vpx_highbd_12_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_neon unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c +unsigned int vpx_highbd_12_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_neon unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c +unsigned int vpx_highbd_12_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_neon void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr, int src_stride, @@ -1564,7 +2174,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c +void vpx_highbd_8_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_neon void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -1572,35 +2188,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c +void vpx_highbd_8_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_neon unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c +unsigned int vpx_highbd_8_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_neon unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c +unsigned int vpx_highbd_8_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_neon unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c +unsigned int vpx_highbd_8_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_neon unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c +unsigned int vpx_highbd_8_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1610,8 +2252,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x16 \ - vpx_highbd_8_sub_pixel_avg_variance16x16_c + vpx_highbd_8_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1621,8 +2272,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x32 \ - vpx_highbd_8_sub_pixel_avg_variance16x32_c + vpx_highbd_8_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1632,8 +2292,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x8 \ - vpx_highbd_8_sub_pixel_avg_variance16x8_c + vpx_highbd_8_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1643,8 +2312,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x16 \ - vpx_highbd_8_sub_pixel_avg_variance32x16_c + vpx_highbd_8_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1654,8 +2332,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x32 \ - vpx_highbd_8_sub_pixel_avg_variance32x32_c + vpx_highbd_8_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1665,8 +2352,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x64 \ - vpx_highbd_8_sub_pixel_avg_variance32x64_c + vpx_highbd_8_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1676,8 +2372,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance4x4 \ - vpx_highbd_8_sub_pixel_avg_variance4x4_c + vpx_highbd_8_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1687,8 +2392,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance4x8 \ - vpx_highbd_8_sub_pixel_avg_variance4x8_c + vpx_highbd_8_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1698,8 +2412,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance64x32 \ - vpx_highbd_8_sub_pixel_avg_variance64x32_c + vpx_highbd_8_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1709,8 +2432,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance64x64 \ - vpx_highbd_8_sub_pixel_avg_variance64x64_c + vpx_highbd_8_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1720,8 +2452,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x16 \ - vpx_highbd_8_sub_pixel_avg_variance8x16_c + vpx_highbd_8_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1731,8 +2472,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x4 \ - vpx_highbd_8_sub_pixel_avg_variance8x4_c + vpx_highbd_8_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1742,8 +2492,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x8 \ - vpx_highbd_8_sub_pixel_avg_variance8x8_c + vpx_highbd_8_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1752,8 +2511,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x16 \ - vpx_highbd_8_sub_pixel_variance16x16_c + vpx_highbd_8_sub_pixel_variance16x16_neon uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1762,8 +2528,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x32 \ - vpx_highbd_8_sub_pixel_variance16x32_c + vpx_highbd_8_sub_pixel_variance16x32_neon uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1772,8 +2545,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x8 \ - vpx_highbd_8_sub_pixel_variance16x8_c + vpx_highbd_8_sub_pixel_variance16x8_neon uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1782,8 +2562,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x16 \ - vpx_highbd_8_sub_pixel_variance32x16_c + vpx_highbd_8_sub_pixel_variance32x16_neon uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1792,8 +2579,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x32 \ - vpx_highbd_8_sub_pixel_variance32x32_c + vpx_highbd_8_sub_pixel_variance32x32_neon uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1802,8 +2596,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x64 \ - vpx_highbd_8_sub_pixel_variance32x64_c + vpx_highbd_8_sub_pixel_variance32x64_neon uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1812,7 +2613,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c +uint32_t vpx_highbd_8_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance4x4 \ + vpx_highbd_8_sub_pixel_variance4x4_neon uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1821,7 +2630,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c +uint32_t vpx_highbd_8_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance4x8 \ + vpx_highbd_8_sub_pixel_variance4x8_neon uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1830,8 +2647,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance64x32 \ - vpx_highbd_8_sub_pixel_variance64x32_c + vpx_highbd_8_sub_pixel_variance64x32_neon uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1840,8 +2664,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance64x64 \ - vpx_highbd_8_sub_pixel_variance64x64_c + vpx_highbd_8_sub_pixel_variance64x64_neon uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1850,8 +2681,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance8x16 \ - vpx_highbd_8_sub_pixel_variance8x16_c + vpx_highbd_8_sub_pixel_variance8x16_neon uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1860,7 +2698,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c +uint32_t vpx_highbd_8_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance8x4 \ + vpx_highbd_8_sub_pixel_variance8x4_neon uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1869,98 +2715,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c +uint32_t vpx_highbd_8_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance8x8 \ + vpx_highbd_8_sub_pixel_variance8x8_neon unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c +unsigned int vpx_highbd_8_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_neon unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c +unsigned int vpx_highbd_8_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_neon unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c +unsigned int vpx_highbd_8_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_neon unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c +unsigned int vpx_highbd_8_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_neon unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c +unsigned int vpx_highbd_8_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_neon unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c +unsigned int vpx_highbd_8_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_neon unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c +unsigned int vpx_highbd_8_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_neon unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c +unsigned int vpx_highbd_8_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_neon unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c +unsigned int vpx_highbd_8_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_neon unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c +unsigned int vpx_highbd_8_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_neon unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c +unsigned int vpx_highbd_8_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_neon unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c +unsigned int vpx_highbd_8_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_neon unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c +unsigned int vpx_highbd_8_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_neon unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p); #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c @@ -1974,7 +2893,13 @@ int height, const uint16_t* ref, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c +void vpx_highbd_comp_avg_pred_neon(uint16_t* comp_pred, + const uint16_t* pred, + int width, + int height, + const uint16_t* ref, + int ref_stride); +#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_neon void vpx_highbd_convolve8_c(const uint16_t* src, ptrdiff_t src_stride, @@ -3040,7 +3965,19 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vpx_highbd_quantize_b vpx_highbd_quantize_b_c +void vpx_highbd_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 vpx_highbd_quantize_b vpx_highbd_quantize_b_neon void vpx_highbd_quantize_b_32x32_c(const tran_low_t* coeff_ptr, intptr_t n_coeffs, @@ -3054,267 +3991,461 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_c +void vpx_highbd_quantize_b_32x32_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 vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_neon unsigned int vpx_highbd_sad16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_c +unsigned int vpx_highbd_sad16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_neon unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_c +unsigned int vpx_highbd_sad16x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_neon void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c +void vpx_highbd_sad16x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_neon unsigned int vpx_highbd_sad16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_c +unsigned int vpx_highbd_sad16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_neon unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_c +unsigned int vpx_highbd_sad16x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_neon void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c +void vpx_highbd_sad16x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_neon unsigned int vpx_highbd_sad16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_c +unsigned int vpx_highbd_sad16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_neon unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_c +unsigned int vpx_highbd_sad16x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_neon void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c +void vpx_highbd_sad16x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_neon unsigned int vpx_highbd_sad32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_c +unsigned int vpx_highbd_sad32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_neon unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_c +unsigned int vpx_highbd_sad32x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_neon void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c +void vpx_highbd_sad32x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_neon unsigned int vpx_highbd_sad32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_c +unsigned int vpx_highbd_sad32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_neon unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_c +unsigned int vpx_highbd_sad32x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_neon void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c +void vpx_highbd_sad32x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_neon unsigned int vpx_highbd_sad32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_c +unsigned int vpx_highbd_sad32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_neon unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_c +unsigned int vpx_highbd_sad32x64_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_neon void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c +void vpx_highbd_sad32x64x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_neon unsigned int vpx_highbd_sad4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c +unsigned int vpx_highbd_sad4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_neon unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c +unsigned int vpx_highbd_sad4x4_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_neon void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c +void vpx_highbd_sad4x4x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_neon unsigned int vpx_highbd_sad4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c +unsigned int vpx_highbd_sad4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_neon unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c +unsigned int vpx_highbd_sad4x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_neon void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c +void vpx_highbd_sad4x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_neon unsigned int vpx_highbd_sad64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_c +unsigned int vpx_highbd_sad64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_neon unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_c +unsigned int vpx_highbd_sad64x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_neon void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c +void vpx_highbd_sad64x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_neon unsigned int vpx_highbd_sad64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_c +unsigned int vpx_highbd_sad64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_neon unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_c +unsigned int vpx_highbd_sad64x64_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_neon void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c +void vpx_highbd_sad64x64x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_neon unsigned int vpx_highbd_sad8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_c +unsigned int vpx_highbd_sad8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_neon unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_c +unsigned int vpx_highbd_sad8x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_neon void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c +void vpx_highbd_sad8x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_neon unsigned int vpx_highbd_sad8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_c +unsigned int vpx_highbd_sad8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_neon unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_c +unsigned int vpx_highbd_sad8x4_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_neon void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c +void vpx_highbd_sad8x4x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_neon unsigned int vpx_highbd_sad8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_c +unsigned int vpx_highbd_sad8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_neon unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_c +unsigned int vpx_highbd_sad8x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_neon void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c +void vpx_highbd_sad8x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_neon int vpx_highbd_satd_c(const tran_low_t* coeff, int length); #define vpx_highbd_satd vpx_highbd_satd_c @@ -3328,7 +4459,16 @@ const uint8_t* pred8_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c +void vpx_highbd_subtract_block_neon(int rows, + int cols, + int16_t* diff_ptr, + ptrdiff_t diff_stride, + const uint8_t* src8_ptr, + ptrdiff_t src_stride, + const uint8_t* pred8_ptr, + ptrdiff_t pred_stride, + int bd); +#define vpx_highbd_subtract_block vpx_highbd_subtract_block_neon void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst, ptrdiff_t stride,
diff --git a/third_party/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h index 9f01a61..687f13e 100644 --- a/third_party/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h +++ b/third_party/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h
@@ -227,7 +227,17 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c +void vp9_highbd_quantize_fp_neon(const tran_low_t* coeff_ptr, + intptr_t n_coeffs, + const int16_t* round_ptr, + const int16_t* quant_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 vp9_highbd_quantize_fp vp9_highbd_quantize_fp_neon void vp9_highbd_quantize_fp_32x32_c(const tran_low_t* coeff_ptr, intptr_t n_coeffs, @@ -239,7 +249,17 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c +void vp9_highbd_quantize_fp_32x32_neon(const tran_low_t* coeff_ptr, + intptr_t n_coeffs, + const int16_t* round_ptr, + const int16_t* quant_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 vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_neon void vp9_highbd_temporal_filter_apply_c(const uint8_t* frame1, unsigned int stride,
diff --git a/third_party/libvpx/source/config/linux/arm64-highbd/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm64-highbd/vpx_dsp_rtcd.h index 94827090..bc12d64 100644 --- a/third_party/libvpx/source/config/linux/arm64-highbd/vpx_dsp_rtcd.h +++ b/third_party/libvpx/source/config/linux/arm64-highbd/vpx_dsp_rtcd.h
@@ -734,7 +734,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c +void vpx_highbd_10_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_neon void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -742,35 +748,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c +void vpx_highbd_10_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_neon unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c +unsigned int vpx_highbd_10_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_neon unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c +unsigned int vpx_highbd_10_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_neon unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c +unsigned int vpx_highbd_10_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_neon unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c +unsigned int vpx_highbd_10_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c( const uint8_t* src_ptr, @@ -781,8 +813,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x16 \ - vpx_highbd_10_sub_pixel_avg_variance16x16_c + vpx_highbd_10_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c( const uint8_t* src_ptr, @@ -793,8 +834,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x32 \ - vpx_highbd_10_sub_pixel_avg_variance16x32_c + vpx_highbd_10_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -804,8 +854,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x8 \ - vpx_highbd_10_sub_pixel_avg_variance16x8_c + vpx_highbd_10_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c( const uint8_t* src_ptr, @@ -816,8 +875,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x16 \ - vpx_highbd_10_sub_pixel_avg_variance32x16_c + vpx_highbd_10_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c( const uint8_t* src_ptr, @@ -828,8 +896,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x32 \ - vpx_highbd_10_sub_pixel_avg_variance32x32_c + vpx_highbd_10_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c( const uint8_t* src_ptr, @@ -840,8 +917,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x64 \ - vpx_highbd_10_sub_pixel_avg_variance32x64_c + vpx_highbd_10_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -851,8 +937,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance4x4 \ - vpx_highbd_10_sub_pixel_avg_variance4x4_c + vpx_highbd_10_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -862,8 +957,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance4x8 \ - vpx_highbd_10_sub_pixel_avg_variance4x8_c + vpx_highbd_10_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c( const uint8_t* src_ptr, @@ -874,8 +978,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance64x32 \ - vpx_highbd_10_sub_pixel_avg_variance64x32_c + vpx_highbd_10_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c( const uint8_t* src_ptr, @@ -886,8 +999,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance64x64 \ - vpx_highbd_10_sub_pixel_avg_variance64x64_c + vpx_highbd_10_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -897,8 +1019,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x16 \ - vpx_highbd_10_sub_pixel_avg_variance8x16_c + vpx_highbd_10_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -908,8 +1039,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x4 \ - vpx_highbd_10_sub_pixel_avg_variance8x4_c + vpx_highbd_10_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -919,8 +1059,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x8 \ - vpx_highbd_10_sub_pixel_avg_variance8x8_c + vpx_highbd_10_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -929,8 +1078,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x16 \ - vpx_highbd_10_sub_pixel_variance16x16_c + vpx_highbd_10_sub_pixel_variance16x16_neon uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -939,8 +1095,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x32 \ - vpx_highbd_10_sub_pixel_variance16x32_c + vpx_highbd_10_sub_pixel_variance16x32_neon uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -949,8 +1112,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x8 \ - vpx_highbd_10_sub_pixel_variance16x8_c + vpx_highbd_10_sub_pixel_variance16x8_neon uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -959,8 +1129,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x16 \ - vpx_highbd_10_sub_pixel_variance32x16_c + vpx_highbd_10_sub_pixel_variance32x16_neon uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -969,8 +1146,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x32 \ - vpx_highbd_10_sub_pixel_variance32x32_c + vpx_highbd_10_sub_pixel_variance32x32_neon uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -979,8 +1163,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x64 \ - vpx_highbd_10_sub_pixel_variance32x64_c + vpx_highbd_10_sub_pixel_variance32x64_neon uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -989,8 +1180,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance4x4 \ - vpx_highbd_10_sub_pixel_variance4x4_c + vpx_highbd_10_sub_pixel_variance4x4_neon uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -999,8 +1197,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance4x8 \ - vpx_highbd_10_sub_pixel_variance4x8_c + vpx_highbd_10_sub_pixel_variance4x8_neon uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1009,8 +1214,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance64x32 \ - vpx_highbd_10_sub_pixel_variance64x32_c + vpx_highbd_10_sub_pixel_variance64x32_neon uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1019,8 +1231,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance64x64 \ - vpx_highbd_10_sub_pixel_variance64x64_c + vpx_highbd_10_sub_pixel_variance64x64_neon uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1029,8 +1248,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x16 \ - vpx_highbd_10_sub_pixel_variance8x16_c + vpx_highbd_10_sub_pixel_variance8x16_neon uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1039,8 +1265,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x4 \ - vpx_highbd_10_sub_pixel_variance8x4_c + vpx_highbd_10_sub_pixel_variance8x4_neon uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1049,99 +1282,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x8 \ - vpx_highbd_10_sub_pixel_variance8x8_c + vpx_highbd_10_sub_pixel_variance8x8_neon unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c +unsigned int vpx_highbd_10_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_neon unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c +unsigned int vpx_highbd_10_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_neon unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c +unsigned int vpx_highbd_10_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_neon unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c +unsigned int vpx_highbd_10_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_neon unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c +unsigned int vpx_highbd_10_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_neon unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c +unsigned int vpx_highbd_10_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_neon unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c +unsigned int vpx_highbd_10_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_neon unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c +unsigned int vpx_highbd_10_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_neon unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c +unsigned int vpx_highbd_10_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_neon unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c +unsigned int vpx_highbd_10_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_neon unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c +unsigned int vpx_highbd_10_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_neon unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c +unsigned int vpx_highbd_10_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_neon unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c +unsigned int vpx_highbd_10_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_neon void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr, int src_stride, @@ -1149,7 +1454,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c +void vpx_highbd_12_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_neon void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -1157,35 +1468,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c +void vpx_highbd_12_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_neon unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c +unsigned int vpx_highbd_12_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_neon unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c +unsigned int vpx_highbd_12_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_neon unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c +unsigned int vpx_highbd_12_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_neon unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c +unsigned int vpx_highbd_12_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c( const uint8_t* src_ptr, @@ -1196,8 +1533,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x16 \ - vpx_highbd_12_sub_pixel_avg_variance16x16_c + vpx_highbd_12_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c( const uint8_t* src_ptr, @@ -1208,8 +1554,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x32 \ - vpx_highbd_12_sub_pixel_avg_variance16x32_c + vpx_highbd_12_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1219,8 +1574,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x8 \ - vpx_highbd_12_sub_pixel_avg_variance16x8_c + vpx_highbd_12_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c( const uint8_t* src_ptr, @@ -1231,8 +1595,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x16 \ - vpx_highbd_12_sub_pixel_avg_variance32x16_c + vpx_highbd_12_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c( const uint8_t* src_ptr, @@ -1243,8 +1616,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x32 \ - vpx_highbd_12_sub_pixel_avg_variance32x32_c + vpx_highbd_12_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c( const uint8_t* src_ptr, @@ -1255,8 +1637,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x64 \ - vpx_highbd_12_sub_pixel_avg_variance32x64_c + vpx_highbd_12_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1266,8 +1657,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance4x4 \ - vpx_highbd_12_sub_pixel_avg_variance4x4_c + vpx_highbd_12_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1277,8 +1677,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance4x8 \ - vpx_highbd_12_sub_pixel_avg_variance4x8_c + vpx_highbd_12_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c( const uint8_t* src_ptr, @@ -1289,8 +1698,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance64x32 \ - vpx_highbd_12_sub_pixel_avg_variance64x32_c + vpx_highbd_12_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c( const uint8_t* src_ptr, @@ -1301,8 +1719,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance64x64 \ - vpx_highbd_12_sub_pixel_avg_variance64x64_c + vpx_highbd_12_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1312,8 +1739,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x16 \ - vpx_highbd_12_sub_pixel_avg_variance8x16_c + vpx_highbd_12_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1323,8 +1759,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x4 \ - vpx_highbd_12_sub_pixel_avg_variance8x4_c + vpx_highbd_12_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1334,8 +1779,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x8 \ - vpx_highbd_12_sub_pixel_avg_variance8x8_c + vpx_highbd_12_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1344,8 +1798,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x16 \ - vpx_highbd_12_sub_pixel_variance16x16_c + vpx_highbd_12_sub_pixel_variance16x16_neon uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1354,8 +1815,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x32 \ - vpx_highbd_12_sub_pixel_variance16x32_c + vpx_highbd_12_sub_pixel_variance16x32_neon uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1364,8 +1832,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x8 \ - vpx_highbd_12_sub_pixel_variance16x8_c + vpx_highbd_12_sub_pixel_variance16x8_neon uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1374,8 +1849,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x16 \ - vpx_highbd_12_sub_pixel_variance32x16_c + vpx_highbd_12_sub_pixel_variance32x16_neon uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1384,8 +1866,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x32 \ - vpx_highbd_12_sub_pixel_variance32x32_c + vpx_highbd_12_sub_pixel_variance32x32_neon uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1394,8 +1883,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x64 \ - vpx_highbd_12_sub_pixel_variance32x64_c + vpx_highbd_12_sub_pixel_variance32x64_neon uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1404,8 +1900,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance4x4 \ - vpx_highbd_12_sub_pixel_variance4x4_c + vpx_highbd_12_sub_pixel_variance4x4_neon uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1414,8 +1917,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance4x8 \ - vpx_highbd_12_sub_pixel_variance4x8_c + vpx_highbd_12_sub_pixel_variance4x8_neon uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1424,8 +1934,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance64x32 \ - vpx_highbd_12_sub_pixel_variance64x32_c + vpx_highbd_12_sub_pixel_variance64x32_neon uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1434,8 +1951,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance64x64 \ - vpx_highbd_12_sub_pixel_variance64x64_c + vpx_highbd_12_sub_pixel_variance64x64_neon uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1444,8 +1968,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x16 \ - vpx_highbd_12_sub_pixel_variance8x16_c + vpx_highbd_12_sub_pixel_variance8x16_neon uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1454,8 +1985,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x4 \ - vpx_highbd_12_sub_pixel_variance8x4_c + vpx_highbd_12_sub_pixel_variance8x4_neon uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1464,99 +2002,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x8 \ - vpx_highbd_12_sub_pixel_variance8x8_c + vpx_highbd_12_sub_pixel_variance8x8_neon unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c +unsigned int vpx_highbd_12_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_neon unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c +unsigned int vpx_highbd_12_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_neon unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c +unsigned int vpx_highbd_12_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_neon unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c +unsigned int vpx_highbd_12_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_neon unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c +unsigned int vpx_highbd_12_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_neon unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c +unsigned int vpx_highbd_12_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_neon unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c +unsigned int vpx_highbd_12_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_neon unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c +unsigned int vpx_highbd_12_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_neon unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c +unsigned int vpx_highbd_12_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_neon unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c +unsigned int vpx_highbd_12_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_neon unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c +unsigned int vpx_highbd_12_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_neon unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c +unsigned int vpx_highbd_12_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_neon unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c +unsigned int vpx_highbd_12_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_neon void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr, int src_stride, @@ -1564,7 +2174,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c +void vpx_highbd_8_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_neon void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -1572,35 +2188,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c +void vpx_highbd_8_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_neon unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c +unsigned int vpx_highbd_8_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_neon unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c +unsigned int vpx_highbd_8_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_neon unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c +unsigned int vpx_highbd_8_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_neon unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c +unsigned int vpx_highbd_8_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1610,8 +2252,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x16 \ - vpx_highbd_8_sub_pixel_avg_variance16x16_c + vpx_highbd_8_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1621,8 +2272,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x32 \ - vpx_highbd_8_sub_pixel_avg_variance16x32_c + vpx_highbd_8_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1632,8 +2292,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x8 \ - vpx_highbd_8_sub_pixel_avg_variance16x8_c + vpx_highbd_8_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1643,8 +2312,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x16 \ - vpx_highbd_8_sub_pixel_avg_variance32x16_c + vpx_highbd_8_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1654,8 +2332,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x32 \ - vpx_highbd_8_sub_pixel_avg_variance32x32_c + vpx_highbd_8_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1665,8 +2352,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x64 \ - vpx_highbd_8_sub_pixel_avg_variance32x64_c + vpx_highbd_8_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1676,8 +2372,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance4x4 \ - vpx_highbd_8_sub_pixel_avg_variance4x4_c + vpx_highbd_8_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1687,8 +2392,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance4x8 \ - vpx_highbd_8_sub_pixel_avg_variance4x8_c + vpx_highbd_8_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1698,8 +2412,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance64x32 \ - vpx_highbd_8_sub_pixel_avg_variance64x32_c + vpx_highbd_8_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1709,8 +2432,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance64x64 \ - vpx_highbd_8_sub_pixel_avg_variance64x64_c + vpx_highbd_8_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1720,8 +2452,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x16 \ - vpx_highbd_8_sub_pixel_avg_variance8x16_c + vpx_highbd_8_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1731,8 +2472,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x4 \ - vpx_highbd_8_sub_pixel_avg_variance8x4_c + vpx_highbd_8_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1742,8 +2492,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x8 \ - vpx_highbd_8_sub_pixel_avg_variance8x8_c + vpx_highbd_8_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1752,8 +2511,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x16 \ - vpx_highbd_8_sub_pixel_variance16x16_c + vpx_highbd_8_sub_pixel_variance16x16_neon uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1762,8 +2528,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x32 \ - vpx_highbd_8_sub_pixel_variance16x32_c + vpx_highbd_8_sub_pixel_variance16x32_neon uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1772,8 +2545,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x8 \ - vpx_highbd_8_sub_pixel_variance16x8_c + vpx_highbd_8_sub_pixel_variance16x8_neon uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1782,8 +2562,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x16 \ - vpx_highbd_8_sub_pixel_variance32x16_c + vpx_highbd_8_sub_pixel_variance32x16_neon uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1792,8 +2579,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x32 \ - vpx_highbd_8_sub_pixel_variance32x32_c + vpx_highbd_8_sub_pixel_variance32x32_neon uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1802,8 +2596,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x64 \ - vpx_highbd_8_sub_pixel_variance32x64_c + vpx_highbd_8_sub_pixel_variance32x64_neon uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1812,7 +2613,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c +uint32_t vpx_highbd_8_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance4x4 \ + vpx_highbd_8_sub_pixel_variance4x4_neon uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1821,7 +2630,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c +uint32_t vpx_highbd_8_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance4x8 \ + vpx_highbd_8_sub_pixel_variance4x8_neon uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1830,8 +2647,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance64x32 \ - vpx_highbd_8_sub_pixel_variance64x32_c + vpx_highbd_8_sub_pixel_variance64x32_neon uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1840,8 +2664,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance64x64 \ - vpx_highbd_8_sub_pixel_variance64x64_c + vpx_highbd_8_sub_pixel_variance64x64_neon uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1850,8 +2681,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance8x16 \ - vpx_highbd_8_sub_pixel_variance8x16_c + vpx_highbd_8_sub_pixel_variance8x16_neon uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1860,7 +2698,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c +uint32_t vpx_highbd_8_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance8x4 \ + vpx_highbd_8_sub_pixel_variance8x4_neon uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1869,98 +2715,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c +uint32_t vpx_highbd_8_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance8x8 \ + vpx_highbd_8_sub_pixel_variance8x8_neon unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c +unsigned int vpx_highbd_8_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_neon unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c +unsigned int vpx_highbd_8_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_neon unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c +unsigned int vpx_highbd_8_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_neon unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c +unsigned int vpx_highbd_8_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_neon unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c +unsigned int vpx_highbd_8_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_neon unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c +unsigned int vpx_highbd_8_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_neon unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c +unsigned int vpx_highbd_8_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_neon unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c +unsigned int vpx_highbd_8_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_neon unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c +unsigned int vpx_highbd_8_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_neon unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c +unsigned int vpx_highbd_8_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_neon unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c +unsigned int vpx_highbd_8_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_neon unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c +unsigned int vpx_highbd_8_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_neon unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c +unsigned int vpx_highbd_8_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_neon unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p); #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c @@ -1974,7 +2893,13 @@ int height, const uint16_t* ref, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c +void vpx_highbd_comp_avg_pred_neon(uint16_t* comp_pred, + const uint16_t* pred, + int width, + int height, + const uint16_t* ref, + int ref_stride); +#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_neon void vpx_highbd_convolve8_c(const uint16_t* src, ptrdiff_t src_stride, @@ -3040,7 +3965,19 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vpx_highbd_quantize_b vpx_highbd_quantize_b_c +void vpx_highbd_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 vpx_highbd_quantize_b vpx_highbd_quantize_b_neon void vpx_highbd_quantize_b_32x32_c(const tran_low_t* coeff_ptr, intptr_t n_coeffs, @@ -3054,267 +3991,461 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_c +void vpx_highbd_quantize_b_32x32_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 vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_neon unsigned int vpx_highbd_sad16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_c +unsigned int vpx_highbd_sad16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_neon unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_c +unsigned int vpx_highbd_sad16x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_neon void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c +void vpx_highbd_sad16x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_neon unsigned int vpx_highbd_sad16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_c +unsigned int vpx_highbd_sad16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_neon unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_c +unsigned int vpx_highbd_sad16x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_neon void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c +void vpx_highbd_sad16x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_neon unsigned int vpx_highbd_sad16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_c +unsigned int vpx_highbd_sad16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_neon unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_c +unsigned int vpx_highbd_sad16x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_neon void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c +void vpx_highbd_sad16x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_neon unsigned int vpx_highbd_sad32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_c +unsigned int vpx_highbd_sad32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_neon unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_c +unsigned int vpx_highbd_sad32x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_neon void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c +void vpx_highbd_sad32x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_neon unsigned int vpx_highbd_sad32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_c +unsigned int vpx_highbd_sad32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_neon unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_c +unsigned int vpx_highbd_sad32x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_neon void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c +void vpx_highbd_sad32x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_neon unsigned int vpx_highbd_sad32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_c +unsigned int vpx_highbd_sad32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_neon unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_c +unsigned int vpx_highbd_sad32x64_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_neon void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c +void vpx_highbd_sad32x64x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_neon unsigned int vpx_highbd_sad4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c +unsigned int vpx_highbd_sad4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_neon unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c +unsigned int vpx_highbd_sad4x4_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_neon void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c +void vpx_highbd_sad4x4x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_neon unsigned int vpx_highbd_sad4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c +unsigned int vpx_highbd_sad4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_neon unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c +unsigned int vpx_highbd_sad4x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_neon void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c +void vpx_highbd_sad4x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_neon unsigned int vpx_highbd_sad64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_c +unsigned int vpx_highbd_sad64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_neon unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_c +unsigned int vpx_highbd_sad64x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_neon void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c +void vpx_highbd_sad64x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_neon unsigned int vpx_highbd_sad64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_c +unsigned int vpx_highbd_sad64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_neon unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_c +unsigned int vpx_highbd_sad64x64_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_neon void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c +void vpx_highbd_sad64x64x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_neon unsigned int vpx_highbd_sad8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_c +unsigned int vpx_highbd_sad8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_neon unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_c +unsigned int vpx_highbd_sad8x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_neon void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c +void vpx_highbd_sad8x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_neon unsigned int vpx_highbd_sad8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_c +unsigned int vpx_highbd_sad8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_neon unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_c +unsigned int vpx_highbd_sad8x4_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_neon void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c +void vpx_highbd_sad8x4x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_neon unsigned int vpx_highbd_sad8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_c +unsigned int vpx_highbd_sad8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_neon unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_c +unsigned int vpx_highbd_sad8x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_neon void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c +void vpx_highbd_sad8x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_neon int vpx_highbd_satd_c(const tran_low_t* coeff, int length); #define vpx_highbd_satd vpx_highbd_satd_c @@ -3328,7 +4459,16 @@ const uint8_t* pred8_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c +void vpx_highbd_subtract_block_neon(int rows, + int cols, + int16_t* diff_ptr, + ptrdiff_t diff_stride, + const uint8_t* src8_ptr, + ptrdiff_t src_stride, + const uint8_t* pred8_ptr, + ptrdiff_t pred_stride, + int bd); +#define vpx_highbd_subtract_block vpx_highbd_subtract_block_neon void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst, ptrdiff_t stride,
diff --git a/third_party/libvpx/source/config/vpx_version.h b/third_party/libvpx/source/config/vpx_version.h index 39c6b9c..22e0862 100644 --- a/third_party/libvpx/source/config/vpx_version.h +++ b/third_party/libvpx/source/config/vpx_version.h
@@ -2,8 +2,8 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 12 #define VERSION_PATCH 0 -#define VERSION_EXTRA "88-g8786aee58" +#define VERSION_EXTRA "145-g9d6d0624d" #define VERSION_PACKED \ ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | (VERSION_PATCH)) -#define VERSION_STRING_NOSP "v1.12.0-88-g8786aee58" -#define VERSION_STRING " v1.12.0-88-g8786aee58" +#define VERSION_STRING_NOSP "v1.12.0-145-g9d6d0624d" +#define VERSION_STRING " v1.12.0-145-g9d6d0624d"
diff --git a/third_party/libvpx/source/config/win/arm64/vp9_rtcd.h b/third_party/libvpx/source/config/win/arm64/vp9_rtcd.h index 9f01a61..687f13e 100644 --- a/third_party/libvpx/source/config/win/arm64/vp9_rtcd.h +++ b/third_party/libvpx/source/config/win/arm64/vp9_rtcd.h
@@ -227,7 +227,17 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vp9_highbd_quantize_fp vp9_highbd_quantize_fp_c +void vp9_highbd_quantize_fp_neon(const tran_low_t* coeff_ptr, + intptr_t n_coeffs, + const int16_t* round_ptr, + const int16_t* quant_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 vp9_highbd_quantize_fp vp9_highbd_quantize_fp_neon void vp9_highbd_quantize_fp_32x32_c(const tran_low_t* coeff_ptr, intptr_t n_coeffs, @@ -239,7 +249,17 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_c +void vp9_highbd_quantize_fp_32x32_neon(const tran_low_t* coeff_ptr, + intptr_t n_coeffs, + const int16_t* round_ptr, + const int16_t* quant_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 vp9_highbd_quantize_fp_32x32 vp9_highbd_quantize_fp_32x32_neon void vp9_highbd_temporal_filter_apply_c(const uint8_t* frame1, unsigned int stride,
diff --git a/third_party/libvpx/source/config/win/arm64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/win/arm64/vpx_dsp_rtcd.h index 94827090..bc12d64 100644 --- a/third_party/libvpx/source/config/win/arm64/vpx_dsp_rtcd.h +++ b/third_party/libvpx/source/config/win/arm64/vpx_dsp_rtcd.h
@@ -734,7 +734,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c +void vpx_highbd_10_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_neon void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -742,35 +748,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c +void vpx_highbd_10_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_neon unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c +unsigned int vpx_highbd_10_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_neon unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c +unsigned int vpx_highbd_10_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_neon unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c +unsigned int vpx_highbd_10_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_neon unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c +unsigned int vpx_highbd_10_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c( const uint8_t* src_ptr, @@ -781,8 +813,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x16 \ - vpx_highbd_10_sub_pixel_avg_variance16x16_c + vpx_highbd_10_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c( const uint8_t* src_ptr, @@ -793,8 +834,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x32 \ - vpx_highbd_10_sub_pixel_avg_variance16x32_c + vpx_highbd_10_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -804,8 +854,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance16x8 \ - vpx_highbd_10_sub_pixel_avg_variance16x8_c + vpx_highbd_10_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c( const uint8_t* src_ptr, @@ -816,8 +875,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x16 \ - vpx_highbd_10_sub_pixel_avg_variance32x16_c + vpx_highbd_10_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c( const uint8_t* src_ptr, @@ -828,8 +896,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x32 \ - vpx_highbd_10_sub_pixel_avg_variance32x32_c + vpx_highbd_10_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c( const uint8_t* src_ptr, @@ -840,8 +917,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance32x64 \ - vpx_highbd_10_sub_pixel_avg_variance32x64_c + vpx_highbd_10_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -851,8 +937,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance4x4 \ - vpx_highbd_10_sub_pixel_avg_variance4x4_c + vpx_highbd_10_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -862,8 +957,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance4x8 \ - vpx_highbd_10_sub_pixel_avg_variance4x8_c + vpx_highbd_10_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c( const uint8_t* src_ptr, @@ -874,8 +978,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance64x32 \ - vpx_highbd_10_sub_pixel_avg_variance64x32_c + vpx_highbd_10_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c( const uint8_t* src_ptr, @@ -886,8 +999,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance64x64 \ - vpx_highbd_10_sub_pixel_avg_variance64x64_c + vpx_highbd_10_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -897,8 +1019,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x16 \ - vpx_highbd_10_sub_pixel_avg_variance8x16_c + vpx_highbd_10_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -908,8 +1039,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x4 \ - vpx_highbd_10_sub_pixel_avg_variance8x4_c + vpx_highbd_10_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -919,8 +1059,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_10_sub_pixel_avg_variance8x8 \ - vpx_highbd_10_sub_pixel_avg_variance8x8_c + vpx_highbd_10_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -929,8 +1078,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x16 \ - vpx_highbd_10_sub_pixel_variance16x16_c + vpx_highbd_10_sub_pixel_variance16x16_neon uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -939,8 +1095,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x32 \ - vpx_highbd_10_sub_pixel_variance16x32_c + vpx_highbd_10_sub_pixel_variance16x32_neon uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -949,8 +1112,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance16x8 \ - vpx_highbd_10_sub_pixel_variance16x8_c + vpx_highbd_10_sub_pixel_variance16x8_neon uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -959,8 +1129,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x16 \ - vpx_highbd_10_sub_pixel_variance32x16_c + vpx_highbd_10_sub_pixel_variance32x16_neon uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -969,8 +1146,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x32 \ - vpx_highbd_10_sub_pixel_variance32x32_c + vpx_highbd_10_sub_pixel_variance32x32_neon uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -979,8 +1163,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance32x64 \ - vpx_highbd_10_sub_pixel_variance32x64_c + vpx_highbd_10_sub_pixel_variance32x64_neon uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -989,8 +1180,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance4x4 \ - vpx_highbd_10_sub_pixel_variance4x4_c + vpx_highbd_10_sub_pixel_variance4x4_neon uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -999,8 +1197,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance4x8 \ - vpx_highbd_10_sub_pixel_variance4x8_c + vpx_highbd_10_sub_pixel_variance4x8_neon uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1009,8 +1214,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance64x32 \ - vpx_highbd_10_sub_pixel_variance64x32_c + vpx_highbd_10_sub_pixel_variance64x32_neon uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1019,8 +1231,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance64x64 \ - vpx_highbd_10_sub_pixel_variance64x64_c + vpx_highbd_10_sub_pixel_variance64x64_neon uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1029,8 +1248,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x16 \ - vpx_highbd_10_sub_pixel_variance8x16_c + vpx_highbd_10_sub_pixel_variance8x16_neon uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1039,8 +1265,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x4 \ - vpx_highbd_10_sub_pixel_variance8x4_c + vpx_highbd_10_sub_pixel_variance8x4_neon uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1049,99 +1282,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_10_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_10_sub_pixel_variance8x8 \ - vpx_highbd_10_sub_pixel_variance8x8_c + vpx_highbd_10_sub_pixel_variance8x8_neon unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c +unsigned int vpx_highbd_10_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_neon unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c +unsigned int vpx_highbd_10_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_neon unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c +unsigned int vpx_highbd_10_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_neon unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c +unsigned int vpx_highbd_10_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_neon unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c +unsigned int vpx_highbd_10_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_neon unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c +unsigned int vpx_highbd_10_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_neon unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c +unsigned int vpx_highbd_10_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_neon unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c +unsigned int vpx_highbd_10_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_neon unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c +unsigned int vpx_highbd_10_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_neon unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c +unsigned int vpx_highbd_10_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_neon unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c +unsigned int vpx_highbd_10_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_neon unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c +unsigned int vpx_highbd_10_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_neon unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c +unsigned int vpx_highbd_10_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_neon void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr, int src_stride, @@ -1149,7 +1454,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c +void vpx_highbd_12_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_neon void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -1157,35 +1468,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c +void vpx_highbd_12_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_neon unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c +unsigned int vpx_highbd_12_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_neon unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c +unsigned int vpx_highbd_12_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_neon unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c +unsigned int vpx_highbd_12_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_neon unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c +unsigned int vpx_highbd_12_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c( const uint8_t* src_ptr, @@ -1196,8 +1533,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x16 \ - vpx_highbd_12_sub_pixel_avg_variance16x16_c + vpx_highbd_12_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c( const uint8_t* src_ptr, @@ -1208,8 +1554,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x32 \ - vpx_highbd_12_sub_pixel_avg_variance16x32_c + vpx_highbd_12_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1219,8 +1574,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance16x8 \ - vpx_highbd_12_sub_pixel_avg_variance16x8_c + vpx_highbd_12_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c( const uint8_t* src_ptr, @@ -1231,8 +1595,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x16 \ - vpx_highbd_12_sub_pixel_avg_variance32x16_c + vpx_highbd_12_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c( const uint8_t* src_ptr, @@ -1243,8 +1616,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x32 \ - vpx_highbd_12_sub_pixel_avg_variance32x32_c + vpx_highbd_12_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c( const uint8_t* src_ptr, @@ -1255,8 +1637,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance32x64 \ - vpx_highbd_12_sub_pixel_avg_variance32x64_c + vpx_highbd_12_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1266,8 +1657,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance4x4 \ - vpx_highbd_12_sub_pixel_avg_variance4x4_c + vpx_highbd_12_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1277,8 +1677,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance4x8 \ - vpx_highbd_12_sub_pixel_avg_variance4x8_c + vpx_highbd_12_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c( const uint8_t* src_ptr, @@ -1289,8 +1698,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance64x32 \ - vpx_highbd_12_sub_pixel_avg_variance64x32_c + vpx_highbd_12_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c( const uint8_t* src_ptr, @@ -1301,8 +1719,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance64x64 \ - vpx_highbd_12_sub_pixel_avg_variance64x64_c + vpx_highbd_12_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1312,8 +1739,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x16 \ - vpx_highbd_12_sub_pixel_avg_variance8x16_c + vpx_highbd_12_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1323,8 +1759,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x4 \ - vpx_highbd_12_sub_pixel_avg_variance8x4_c + vpx_highbd_12_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1334,8 +1779,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_12_sub_pixel_avg_variance8x8 \ - vpx_highbd_12_sub_pixel_avg_variance8x8_c + vpx_highbd_12_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1344,8 +1798,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x16 \ - vpx_highbd_12_sub_pixel_variance16x16_c + vpx_highbd_12_sub_pixel_variance16x16_neon uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1354,8 +1815,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x32 \ - vpx_highbd_12_sub_pixel_variance16x32_c + vpx_highbd_12_sub_pixel_variance16x32_neon uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1364,8 +1832,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance16x8 \ - vpx_highbd_12_sub_pixel_variance16x8_c + vpx_highbd_12_sub_pixel_variance16x8_neon uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1374,8 +1849,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x16 \ - vpx_highbd_12_sub_pixel_variance32x16_c + vpx_highbd_12_sub_pixel_variance32x16_neon uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1384,8 +1866,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x32 \ - vpx_highbd_12_sub_pixel_variance32x32_c + vpx_highbd_12_sub_pixel_variance32x32_neon uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1394,8 +1883,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance32x64 \ - vpx_highbd_12_sub_pixel_variance32x64_c + vpx_highbd_12_sub_pixel_variance32x64_neon uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1404,8 +1900,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance4x4 \ - vpx_highbd_12_sub_pixel_variance4x4_c + vpx_highbd_12_sub_pixel_variance4x4_neon uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1414,8 +1917,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance4x8 \ - vpx_highbd_12_sub_pixel_variance4x8_c + vpx_highbd_12_sub_pixel_variance4x8_neon uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1424,8 +1934,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance64x32 \ - vpx_highbd_12_sub_pixel_variance64x32_c + vpx_highbd_12_sub_pixel_variance64x32_neon uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1434,8 +1951,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance64x64 \ - vpx_highbd_12_sub_pixel_variance64x64_c + vpx_highbd_12_sub_pixel_variance64x64_neon uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1444,8 +1968,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x16 \ - vpx_highbd_12_sub_pixel_variance8x16_c + vpx_highbd_12_sub_pixel_variance8x16_neon uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1454,8 +1985,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x4 \ - vpx_highbd_12_sub_pixel_variance8x4_c + vpx_highbd_12_sub_pixel_variance8x4_neon uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1464,99 +2002,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_12_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_12_sub_pixel_variance8x8 \ - vpx_highbd_12_sub_pixel_variance8x8_c + vpx_highbd_12_sub_pixel_variance8x8_neon unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c +unsigned int vpx_highbd_12_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_neon unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c +unsigned int vpx_highbd_12_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_neon unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c +unsigned int vpx_highbd_12_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_neon unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c +unsigned int vpx_highbd_12_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_neon unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c +unsigned int vpx_highbd_12_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_neon unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c +unsigned int vpx_highbd_12_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_neon unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c +unsigned int vpx_highbd_12_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_neon unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c +unsigned int vpx_highbd_12_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_neon unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c +unsigned int vpx_highbd_12_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_neon unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c +unsigned int vpx_highbd_12_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_neon unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c +unsigned int vpx_highbd_12_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_neon unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c +unsigned int vpx_highbd_12_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_neon unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c +unsigned int vpx_highbd_12_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_neon void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr, int src_stride, @@ -1564,7 +2174,13 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c +void vpx_highbd_8_get16x16var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_neon void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr, int src_stride, @@ -1572,35 +2188,61 @@ int ref_stride, unsigned int* sse, int* sum); -#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c +void vpx_highbd_8_get8x8var_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse, + int* sum); +#define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_neon unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c +unsigned int vpx_highbd_8_mse16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_neon unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c +unsigned int vpx_highbd_8_mse16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_neon unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c +unsigned int vpx_highbd_8_mse8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_neon unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c +unsigned int vpx_highbd_8_mse8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1610,8 +2252,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x16 \ - vpx_highbd_8_sub_pixel_avg_variance16x16_c + vpx_highbd_8_sub_pixel_avg_variance16x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1621,8 +2272,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x32 \ - vpx_highbd_8_sub_pixel_avg_variance16x32_c + vpx_highbd_8_sub_pixel_avg_variance16x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1632,8 +2292,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance16x8 \ - vpx_highbd_8_sub_pixel_avg_variance16x8_c + vpx_highbd_8_sub_pixel_avg_variance16x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1643,8 +2312,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x16 \ - vpx_highbd_8_sub_pixel_avg_variance32x16_c + vpx_highbd_8_sub_pixel_avg_variance32x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1654,8 +2332,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x32 \ - vpx_highbd_8_sub_pixel_avg_variance32x32_c + vpx_highbd_8_sub_pixel_avg_variance32x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1665,8 +2352,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance32x64 \ - vpx_highbd_8_sub_pixel_avg_variance32x64_c + vpx_highbd_8_sub_pixel_avg_variance32x64_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1676,8 +2372,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance4x4 \ - vpx_highbd_8_sub_pixel_avg_variance4x4_c + vpx_highbd_8_sub_pixel_avg_variance4x4_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1687,8 +2392,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance4x8 \ - vpx_highbd_8_sub_pixel_avg_variance4x8_c + vpx_highbd_8_sub_pixel_avg_variance4x8_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1698,8 +2412,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance64x32 \ - vpx_highbd_8_sub_pixel_avg_variance64x32_c + vpx_highbd_8_sub_pixel_avg_variance64x32_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1709,8 +2432,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance64x64 \ - vpx_highbd_8_sub_pixel_avg_variance64x64_c + vpx_highbd_8_sub_pixel_avg_variance64x64_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1720,8 +2452,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x16 \ - vpx_highbd_8_sub_pixel_avg_variance8x16_c + vpx_highbd_8_sub_pixel_avg_variance8x16_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1731,8 +2472,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x4 \ - vpx_highbd_8_sub_pixel_avg_variance8x4_c + vpx_highbd_8_sub_pixel_avg_variance8x4_neon uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1742,8 +2492,17 @@ int ref_stride, uint32_t* sse, const uint8_t* second_pred); +uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_neon( + const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse, + const uint8_t* second_pred); #define vpx_highbd_8_sub_pixel_avg_variance8x8 \ - vpx_highbd_8_sub_pixel_avg_variance8x8_c + vpx_highbd_8_sub_pixel_avg_variance8x8_neon uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr, int src_stride, @@ -1752,8 +2511,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x16 \ - vpx_highbd_8_sub_pixel_variance16x16_c + vpx_highbd_8_sub_pixel_variance16x16_neon uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr, int src_stride, @@ -1762,8 +2528,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x32 \ - vpx_highbd_8_sub_pixel_variance16x32_c + vpx_highbd_8_sub_pixel_variance16x32_neon uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr, int src_stride, @@ -1772,8 +2545,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance16x8 \ - vpx_highbd_8_sub_pixel_variance16x8_c + vpx_highbd_8_sub_pixel_variance16x8_neon uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr, int src_stride, @@ -1782,8 +2562,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x16 \ - vpx_highbd_8_sub_pixel_variance32x16_c + vpx_highbd_8_sub_pixel_variance32x16_neon uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr, int src_stride, @@ -1792,8 +2579,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x32 \ - vpx_highbd_8_sub_pixel_variance32x32_c + vpx_highbd_8_sub_pixel_variance32x32_neon uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr, int src_stride, @@ -1802,8 +2596,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance32x64 \ - vpx_highbd_8_sub_pixel_variance32x64_c + vpx_highbd_8_sub_pixel_variance32x64_neon uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr, int src_stride, @@ -1812,7 +2613,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c +uint32_t vpx_highbd_8_sub_pixel_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance4x4 \ + vpx_highbd_8_sub_pixel_variance4x4_neon uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr, int src_stride, @@ -1821,7 +2630,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c +uint32_t vpx_highbd_8_sub_pixel_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance4x8 \ + vpx_highbd_8_sub_pixel_variance4x8_neon uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr, int src_stride, @@ -1830,8 +2647,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance64x32 \ - vpx_highbd_8_sub_pixel_variance64x32_c + vpx_highbd_8_sub_pixel_variance64x32_neon uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr, int src_stride, @@ -1840,8 +2664,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance64x64 \ - vpx_highbd_8_sub_pixel_variance64x64_c + vpx_highbd_8_sub_pixel_variance64x64_neon uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr, int src_stride, @@ -1850,8 +2681,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); +uint32_t vpx_highbd_8_sub_pixel_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); #define vpx_highbd_8_sub_pixel_variance8x16 \ - vpx_highbd_8_sub_pixel_variance8x16_c + vpx_highbd_8_sub_pixel_variance8x16_neon uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr, int src_stride, @@ -1860,7 +2698,15 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c +uint32_t vpx_highbd_8_sub_pixel_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance8x4 \ + vpx_highbd_8_sub_pixel_variance8x4_neon uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr, int src_stride, @@ -1869,98 +2715,171 @@ const uint8_t* ref_ptr, int ref_stride, uint32_t* sse); -#define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c +uint32_t vpx_highbd_8_sub_pixel_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + int x_offset, + int y_offset, + const uint8_t* ref_ptr, + int ref_stride, + uint32_t* sse); +#define vpx_highbd_8_sub_pixel_variance8x8 \ + vpx_highbd_8_sub_pixel_variance8x8_neon unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c +unsigned int vpx_highbd_8_variance16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_neon unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c +unsigned int vpx_highbd_8_variance16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_neon unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c +unsigned int vpx_highbd_8_variance16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_neon unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c +unsigned int vpx_highbd_8_variance32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_neon unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c +unsigned int vpx_highbd_8_variance32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_neon unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c +unsigned int vpx_highbd_8_variance32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_neon unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c +unsigned int vpx_highbd_8_variance4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_neon unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c +unsigned int vpx_highbd_8_variance4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_neon unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c +unsigned int vpx_highbd_8_variance64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_neon unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c +unsigned int vpx_highbd_8_variance64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_neon unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c +unsigned int vpx_highbd_8_variance8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_neon unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c +unsigned int vpx_highbd_8_variance8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_neon unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, unsigned int* sse); -#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c +unsigned int vpx_highbd_8_variance8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + unsigned int* sse); +#define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_neon unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p); #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c @@ -1974,7 +2893,13 @@ int height, const uint16_t* ref, int ref_stride); -#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_c +void vpx_highbd_comp_avg_pred_neon(uint16_t* comp_pred, + const uint16_t* pred, + int width, + int height, + const uint16_t* ref, + int ref_stride); +#define vpx_highbd_comp_avg_pred vpx_highbd_comp_avg_pred_neon void vpx_highbd_convolve8_c(const uint16_t* src, ptrdiff_t src_stride, @@ -3040,7 +3965,19 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vpx_highbd_quantize_b vpx_highbd_quantize_b_c +void vpx_highbd_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 vpx_highbd_quantize_b vpx_highbd_quantize_b_neon void vpx_highbd_quantize_b_32x32_c(const tran_low_t* coeff_ptr, intptr_t n_coeffs, @@ -3054,267 +3991,461 @@ uint16_t* eob_ptr, const int16_t* scan, const int16_t* iscan); -#define vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_c +void vpx_highbd_quantize_b_32x32_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 vpx_highbd_quantize_b_32x32 vpx_highbd_quantize_b_32x32_neon unsigned int vpx_highbd_sad16x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_c +unsigned int vpx_highbd_sad16x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x16 vpx_highbd_sad16x16_neon unsigned int vpx_highbd_sad16x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_c +unsigned int vpx_highbd_sad16x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x16_avg vpx_highbd_sad16x16_avg_neon void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c +void vpx_highbd_sad16x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_neon unsigned int vpx_highbd_sad16x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_c +unsigned int vpx_highbd_sad16x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x32 vpx_highbd_sad16x32_neon unsigned int vpx_highbd_sad16x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_c +unsigned int vpx_highbd_sad16x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x32_avg vpx_highbd_sad16x32_avg_neon void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c +void vpx_highbd_sad16x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_neon unsigned int vpx_highbd_sad16x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_c +unsigned int vpx_highbd_sad16x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad16x8 vpx_highbd_sad16x8_neon unsigned int vpx_highbd_sad16x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_c +unsigned int vpx_highbd_sad16x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad16x8_avg vpx_highbd_sad16x8_avg_neon void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c +void vpx_highbd_sad16x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_neon unsigned int vpx_highbd_sad32x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_c +unsigned int vpx_highbd_sad32x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x16 vpx_highbd_sad32x16_neon unsigned int vpx_highbd_sad32x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_c +unsigned int vpx_highbd_sad32x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x16_avg vpx_highbd_sad32x16_avg_neon void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c +void vpx_highbd_sad32x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_neon unsigned int vpx_highbd_sad32x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_c +unsigned int vpx_highbd_sad32x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x32 vpx_highbd_sad32x32_neon unsigned int vpx_highbd_sad32x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_c +unsigned int vpx_highbd_sad32x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x32_avg vpx_highbd_sad32x32_avg_neon void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c +void vpx_highbd_sad32x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_neon unsigned int vpx_highbd_sad32x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_c +unsigned int vpx_highbd_sad32x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad32x64 vpx_highbd_sad32x64_neon unsigned int vpx_highbd_sad32x64_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_c +unsigned int vpx_highbd_sad32x64_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad32x64_avg vpx_highbd_sad32x64_avg_neon void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c +void vpx_highbd_sad32x64x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_neon unsigned int vpx_highbd_sad4x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_c +unsigned int vpx_highbd_sad4x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad4x4 vpx_highbd_sad4x4_neon unsigned int vpx_highbd_sad4x4_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_c +unsigned int vpx_highbd_sad4x4_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad4x4_avg vpx_highbd_sad4x4_avg_neon void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c +void vpx_highbd_sad4x4x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_neon unsigned int vpx_highbd_sad4x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_c +unsigned int vpx_highbd_sad4x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad4x8 vpx_highbd_sad4x8_neon unsigned int vpx_highbd_sad4x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_c +unsigned int vpx_highbd_sad4x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad4x8_avg vpx_highbd_sad4x8_avg_neon void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c +void vpx_highbd_sad4x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_neon unsigned int vpx_highbd_sad64x32_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_c +unsigned int vpx_highbd_sad64x32_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad64x32 vpx_highbd_sad64x32_neon unsigned int vpx_highbd_sad64x32_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_c +unsigned int vpx_highbd_sad64x32_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad64x32_avg vpx_highbd_sad64x32_avg_neon void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c +void vpx_highbd_sad64x32x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_neon unsigned int vpx_highbd_sad64x64_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_c +unsigned int vpx_highbd_sad64x64_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad64x64 vpx_highbd_sad64x64_neon unsigned int vpx_highbd_sad64x64_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_c +unsigned int vpx_highbd_sad64x64_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad64x64_avg vpx_highbd_sad64x64_avg_neon void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c +void vpx_highbd_sad64x64x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_neon unsigned int vpx_highbd_sad8x16_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_c +unsigned int vpx_highbd_sad8x16_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x16 vpx_highbd_sad8x16_neon unsigned int vpx_highbd_sad8x16_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_c +unsigned int vpx_highbd_sad8x16_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x16_avg vpx_highbd_sad8x16_avg_neon void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c +void vpx_highbd_sad8x16x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_neon unsigned int vpx_highbd_sad8x4_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_c +unsigned int vpx_highbd_sad8x4_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x4 vpx_highbd_sad8x4_neon unsigned int vpx_highbd_sad8x4_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_c +unsigned int vpx_highbd_sad8x4_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x4_avg vpx_highbd_sad8x4_avg_neon void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c +void vpx_highbd_sad8x4x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_neon unsigned int vpx_highbd_sad8x8_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride); -#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_c +unsigned int vpx_highbd_sad8x8_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride); +#define vpx_highbd_sad8x8 vpx_highbd_sad8x8_neon unsigned int vpx_highbd_sad8x8_avg_c(const uint8_t* src_ptr, int src_stride, const uint8_t* ref_ptr, int ref_stride, const uint8_t* second_pred); -#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_c +unsigned int vpx_highbd_sad8x8_avg_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* ref_ptr, + int ref_stride, + const uint8_t* second_pred); +#define vpx_highbd_sad8x8_avg vpx_highbd_sad8x8_avg_neon void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr, int src_stride, const uint8_t* const ref_array[4], int ref_stride, uint32_t sad_array[4]); -#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c +void vpx_highbd_sad8x8x4d_neon(const uint8_t* src_ptr, + int src_stride, + const uint8_t* const ref_array[4], + int ref_stride, + uint32_t sad_array[4]); +#define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_neon int vpx_highbd_satd_c(const tran_low_t* coeff, int length); #define vpx_highbd_satd vpx_highbd_satd_c @@ -3328,7 +4459,16 @@ const uint8_t* pred8_ptr, ptrdiff_t pred_stride, int bd); -#define vpx_highbd_subtract_block vpx_highbd_subtract_block_c +void vpx_highbd_subtract_block_neon(int rows, + int cols, + int16_t* diff_ptr, + ptrdiff_t diff_stride, + const uint8_t* src8_ptr, + ptrdiff_t src_stride, + const uint8_t* pred8_ptr, + ptrdiff_t pred_stride, + int bd); +#define vpx_highbd_subtract_block vpx_highbd_subtract_block_neon void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst, ptrdiff_t stride,
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 8118f3b..b17b0e62 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -565,7 +565,7 @@ 'GPU FYI Linux Builder': 'gpu_fyi_tests_release_trybot_reclient', 'GPU FYI Linux Builder (dbg)': 'gpu_fyi_tests_debug_trybot_reclient', 'GPU FYI Mac Builder': 'gpu_fyi_tests_release_trybot', - 'GPU FYI Mac Builder (asan)': 'gpu_fyi_tests_release_trybot_asan', + 'GPU FYI Mac Builder (asan)': 'gpu_fyi_tests_release_trybot_asan_reclient', 'GPU FYI Mac Builder (dbg)': 'gpu_fyi_tests_debug_trybot', 'GPU FYI Mac arm64 Builder': 'gpu_fyi_tests_release_trybot_arm64_reclient', 'GPU FYI Win Builder': 'gpu_fyi_tests_release_trybot_x86_reclient', @@ -619,7 +619,7 @@ 'ios-device': 'ios_device_release_compile_only', 'ios-device (reclient shadow)': 'ios_device_release_compile_only_reclient', 'ios-simulator': 'ios_simulator_debug_static_bot_xctest', - 'ios-simulator-full-configs': 'ios_simulator_debug_static_bot_xctest_arm64', + 'ios-simulator-full-configs': 'ios_simulator_debug_static_bot_xctest', 'ios-simulator-noncq': 'ios_simulator_debug_static_bot_xctest', 'mac-arm64-on-arm64-rel': 'mac_arm64_release_bot', 'mac-arm64-rel': 'mac_arm64_gpu_tests_release_bot_minimal_symbols_no_nacl', @@ -1226,7 +1226,7 @@ 'ios-simulator': 'ios_simulator_code_coverage_partial_instrumentation_xctest', 'ios-simulator-cr-recipe': 'ios_simulator_debug_static_bot_xctest', 'ios-simulator-cronet': 'ios_cronet_xctest', - 'ios-simulator-full-configs': 'ios_simulator_code_coverage_partial_instrumentation_xctest_arm64', + 'ios-simulator-full-configs': 'ios_simulator_code_coverage_partial_instrumentation_xctest', 'ios-simulator-inverse-fieldtrials-fyi': 'ios_simulator_debug_static_bot_invert_fieldtrials_xctest', 'ios-simulator-multi-window': 'ios_simulator_debug_static_bot_xctest', 'ios-simulator-noncq': 'ios_simulator_debug_static_bot_xctest', @@ -2581,6 +2581,10 @@ 'gpu_fyi_tests', 'release_trybot_minimal_symbols', 'asan', 'disable_nacl', ], + 'gpu_fyi_tests_release_trybot_asan_reclient': [ + 'gpu_fyi_tests', 'release_trybot_minimal_symbols_reclient', 'asan', 'disable_nacl', + ], + 'gpu_fyi_tests_release_trybot_reclient': [ 'gpu_fyi_tests', 'release_trybot_minimal_symbols_reclient', 'disable_nacl', ], @@ -2897,7 +2901,7 @@ ], 'ios_catalyst_debug_static_bot_compile_only_libfuzzer_asan_no_dsyms_no_remoting': [ - 'compile_only', 'debug_static_bot', 'ios', 'ios_catalyst', 'ios_cpu_x64', 'ios_disable_xcode_project_generation', 'asan', 'libfuzzer', 'no_dsyms', 'no_remoting', + 'compile_only', 'debug_static_bot', 'ios', 'ios_catalyst', 'ios_cpu_x64', 'ios_disable_xcode_project_generation', 'asan', 'libfuzzer', 'no_dsyms', 'no_remoting', 'no_hermetic_swift', ], 'ios_clang_device_tot_xctest': [ @@ -2937,10 +2941,6 @@ 'use_clang_coverage', 'debug_static_bot', 'x64', 'ios', 'ios_simulator', 'partial_code_coverage_instrumentation', 'xctest', 'ios_disable_xcode_project_generation', ], - 'ios_simulator_code_coverage_partial_instrumentation_xctest_arm64': [ - 'use_clang_coverage', 'debug_static_bot', 'arm64', 'ios', 'ios_simulator', 'partial_code_coverage_instrumentation', 'xctest', 'ios_disable_xcode_project_generation', - ], - 'ios_simulator_debug_static_bot_invert_fieldtrials_xctest': [ 'debug_static_bot', 'ios', 'ios_simulator', 'ios_cpu_x64', 'invert_fieldtrials', 'xctest', 'ios_disable_xcode_project_generation', ], @@ -4148,7 +4148,7 @@ }, 'fuchsia_include_chromebook_image': { - 'gn_args': 'fuchsia_additional_boot_images=["//third_party/fuchsia-sdk/images-internal/chromebook-x64-release/"]', + 'gn_args': 'fuchsia_additional_boot_images=["//third_party/fuchsia-sdk/images/chromebook-x64-release/"]', }, 'fuchsia_include_sd_images': { @@ -4347,6 +4347,10 @@ 'gn_args': 'use_goma=false', }, + 'no_hermetic_swift': { + 'gn_args': 'swift_toolchain_path=""', + }, + 'no_keystone_registration_framework': { 'gn_args': 'enable_keystone_registration_framework=false', },
diff --git a/tools/mb/mb_config_expectations/chromium.fuzz.json b/tools/mb/mb_config_expectations/chromium.fuzz.json index 17c4c16..d88404f 100644 --- a/tools/mb/mb_config_expectations/chromium.fuzz.json +++ b/tools/mb/mb_config_expectations/chromium.fuzz.json
@@ -397,6 +397,7 @@ "is_asan": true, "is_component_build": false, "is_debug": true, + "swift_toolchain_path": "", "symbol_level": 1, "target_cpu": "x64", "target_environment": "catalyst",
diff --git a/tools/mb/mb_config_expectations/chromium.gpu.fyi.json b/tools/mb/mb_config_expectations/chromium.gpu.fyi.json index 9ff37015..3d731ec 100644 --- a/tools/mb/mb_config_expectations/chromium.gpu.fyi.json +++ b/tools/mb/mb_config_expectations/chromium.gpu.fyi.json
@@ -114,7 +114,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_goma": true + "use_remoteexec": true } }, "GPU FYI Mac Builder (dbg)": {
diff --git a/tools/mb/mb_config_expectations/chromium.mac.json b/tools/mb/mb_config_expectations/chromium.mac.json index 39a800e..e872d71 100644 --- a/tools/mb/mb_config_expectations/chromium.mac.json +++ b/tools/mb/mb_config_expectations/chromium.mac.json
@@ -29,6 +29,7 @@ "is_asan": true, "is_component_build": false, "is_debug": true, + "swift_toolchain_path": "", "symbol_level": 1, "target_cpu": "x64", "target_environment": "catalyst", @@ -87,7 +88,7 @@ "is_component_build": false, "is_debug": true, "symbol_level": 1, - "target_cpu": "arm64", + "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", "use_goma": true
diff --git a/tools/mb/mb_config_expectations/chromium.perf.fyi.json b/tools/mb/mb_config_expectations/chromium.perf.fyi.json index 5d21a57..69dfa9759 100644 --- a/tools/mb/mb_config_expectations/chromium.perf.fyi.json +++ b/tools/mb/mb_config_expectations/chromium.perf.fyi.json
@@ -78,7 +78,7 @@ "gn_args": { "ffmpeg_branding": "Chrome", "fuchsia_additional_boot_images": [ - "//third_party/fuchsia-sdk/images-internal/chromebook-x64-release/" + "//third_party/fuchsia-sdk/images/chromebook-x64-release/" ], "is_chrome_branded": true, "is_official_build": true,
diff --git a/tools/mb/mb_config_expectations/tryserver.chromium.mac.json b/tools/mb/mb_config_expectations/tryserver.chromium.mac.json index bfc8dfa0..ed25a485 100644 --- a/tools/mb/mb_config_expectations/tryserver.chromium.mac.json +++ b/tools/mb/mb_config_expectations/tryserver.chromium.mac.json
@@ -210,6 +210,7 @@ "is_asan": true, "is_component_build": false, "is_debug": true, + "swift_toolchain_path": "", "symbol_level": 1, "target_cpu": "x64", "target_environment": "catalyst", @@ -345,7 +346,7 @@ "is_component_build": false, "is_debug": true, "symbol_level": 1, - "target_cpu": "arm64", + "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", "use_clang_coverage": true,
diff --git a/tools/mb/mb_config_expectations/tryserver.chromium.perf.json b/tools/mb/mb_config_expectations/tryserver.chromium.perf.json index 2b061ad..f511b3c 100644 --- a/tools/mb/mb_config_expectations/tryserver.chromium.perf.json +++ b/tools/mb/mb_config_expectations/tryserver.chromium.perf.json
@@ -90,7 +90,7 @@ "gn_args": { "ffmpeg_branding": "Chrome", "fuchsia_additional_boot_images": [ - "//third_party/fuchsia-sdk/images-internal/chromebook-x64-release/" + "//third_party/fuchsia-sdk/images/chromebook-x64-release/" ], "is_chrome_branded": true, "is_official_build": true,
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index fc2acb6..63103dd0 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -41261,6 +41261,8 @@ <int value="4346" label="V8TurboFanOsrCompileStarted"/> <int value="4347" label="V8Document_HasRedemptionRecord_Method"/> <int value="4348" label="DeferredShaping2ReshapedByLastResort"/> + <int value="4349" label="AudioContextSinkId"/> + <int value="4350" label="AudioContextSetSinkId"/> </enum> <enum name="FeaturePolicyAllowlistType"> @@ -57932,6 +57934,7 @@ <int value="-1014936248" label="SyncUSSBookmarks:enabled"/> <int value="-1014649471" label="committed-interstitials"/> <int value="-1013986101" label="FirstScrollLatencyMeasurement:disabled"/> + <int value="-1012657256" label="WebAuthenticationConditionalUI:enabled"/> <int value="-1011390415" label="AutofillRejectCompanyBirthyear:enabled"/> <int value="-1010588306" label="SlideTopChromeWithPageScrolls:disabled"/> <int value="-1009111883" label="NearbyShareVisibilityReminder:enabled"/> @@ -59103,6 +59106,7 @@ <int value="-290329565" label="CrosVmCupsProxy:disabled"/> <int value="-288316828" label="enable-delegated-renderer"/> <int value="-286603268" label="hide-android-files-in-files-app"/> + <int value="-285878046" label="CrosPrivacyHubDogfood:enabled"/> <int value="-284547865" label="UnifiedConsent:enabled"/> <int value="-284470280" label="ShelfPalmRejectionTouchArea:enabled"/> <int value="-284328071" label="LocalWebApprovals:enabled"/> @@ -60088,6 +60092,7 @@ <int value="332391072" label="cs-contextual-cards-bar-integration"/> <int value="332960119" label="PdfXfaSupport:disabled"/> <int value="333032941" label="CellularCustomAPNProfiles:enabled"/> + <int value="334330083" label="WebAuthenticationConditionalUI:disabled"/> <int value="334802038" label="OfflinePreviews:disabled"/> <int value="335976368" label="LoadCryptoTokenExtension:disabled"/> <int value="335976733" label="NotificationStackingBarRedesign:enabled"/> @@ -61940,6 +61945,8 @@ <int value="1478461926" label="GlobalMediaControlsPictureInPicture:enabled"/> <int value="1479248574" label="disable-voice-input"/> <int value="1480507924" label="EnableNetworkingInDiagnosticsApp:enabled"/> + <int value="1480940805" + label="AblateSendPendingAccessibilityEvents:disabled"/> <int value="1481562816" label="disable-password-link"/> <int value="1482039233" label="SearchSuggestionsOnLocalNtp:disabled"/> <int value="1482245628" label="OmniboxNativeVoiceSuggestProvider:enabled"/> @@ -62310,6 +62317,7 @@ <int value="1717987538" label="NTPTilesLowerResolutionFavicons:enabled"/> <int value="1718341860" label="NTPButton:enabled"/> <int value="1718421370" label="SharingHubLinkToggle:enabled"/> + <int value="1718868363" label="CrosPrivacyHubDogfood:disabled"/> <int value="1719189460" label="EnablePasswordSelection:disabled"/> <int value="1719958026" label="QueryTiles:enabled"/> <int value="1722748383" label="EnableAppReinstallZeroState:disabled"/> @@ -62780,6 +62788,7 @@ <int value="2004651603" label="NativeFileSystemAPI:disabled"/> <int value="2004829262" label="enable-webgl-draft-extensions"/> <int value="2005009211" label="OmniboxAdaptiveSuggestionsCount:disabled"/> + <int value="2005012791" label="AblateSendPendingAccessibilityEvents:enabled"/> <int value="2005245012" label="SecurityInterstitialsDarkMode:disabled"/> <int value="2005614493" label="tab-management-experiment-type-dill"/> <int value="2006413281"
diff --git a/tools/metrics/histograms/metadata/ash/histograms.xml b/tools/metrics/histograms/metadata/ash/histograms.xml index 5b2acbf..72d2343 100644 --- a/tools/metrics/histograms/metadata/ash/histograms.xml +++ b/tools/metrics/histograms/metadata/ash/histograms.xml
@@ -1918,7 +1918,7 @@ </histogram> <histogram name="Ash.DeskTemplate.UserTemplateCount" units="count" - expires_after="2022-10-04"> + expires_after="2023-04-04"> <owner>richui@chromium.org</owner> <owner>janetmac@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/bookmarks/histograms.xml b/tools/metrics/histograms/metadata/bookmarks/histograms.xml index 5a2efd85..b0a237e 100644 --- a/tools/metrics/histograms/metadata/bookmarks/histograms.xml +++ b/tools/metrics/histograms/metadata/bookmarks/histograms.xml
@@ -153,13 +153,6 @@ <histogram name="Bookmarks.Count.OnProfileLoad" units="bookmarks" expires_after="2023-02-26"> - <obsolete> - Logged on profile open, including for profiles that do not support - bookmarks. (We did not investigate thoroughly; we don't know what value - typically was logged. Presumably 0.) Replaced in M-107 with the histogram - Bookmarks.Count.OnProfileLoad3, which is similar but only emitted on - profiles that support bookmarks. - </obsolete> <owner>supertri@chromium.org</owner> <owner>isherman@chromium.org</owner> <owner>aidanday@google.com</owner> @@ -187,36 +180,9 @@ there is at least one duplicate. </summary> <token key="UniquenessCriterion"> - <variant name="Url2" summary="URL"> - <obsolete> - This histogram was fine. It is being replaced with a version - "3" for a simple reason. Some other - Bookmarks.Count.OnProfileLoad* histograms needed to switch to a version - 3. This one is making the switch so all these histograms have the same - suffix. - </obsolete> - </variant> - <variant name="Url3" summary="URL"/> - <variant name="UrlAndTitle" summary="URL-title pair"> - <obsolete> - This histogram was fine. It is being replaced with a version - "3" for a simple reason. Some other - Bookmarks.Count.OnProfileLoad* histograms needed to switch to a version - 3. This one is making the switch so all these histograms have the same - suffix. - </obsolete> - </variant> - <variant name="UrlAndTitle3" summary="URL-title pair"/> - <variant name="UrlAndTitleAndParent" summary="URL-title-parent triple"> - <obsolete> - This histogram was fine. It is being replaced with a version - "3" for a simple reason. Some other - Bookmarks.Count.OnProfileLoad* histograms needed to switch to a version - 3. This one is making the switch so all these histograms have the same - suffix. - </obsolete> - </variant> - <variant name="UrlAndTitleAndParent3" summary="URL-title-parent triple"/> + <variant name="Url2" summary="URL"/> + <variant name="UrlAndTitle" summary="URL-title pair"/> + <variant name="UrlAndTitleAndParent" summary="URL-title-parent triple"/> </token> </histogram> @@ -230,54 +196,12 @@ user. Recorded when bookmarks are loaded into storage from disk. </summary> <token key="UniquenessCriterion"> - <variant name="Url" summary="URL"> - <obsolete> - Logged on profile open, including for profiles that do not support - bookmarks. (We did not investigate thoroughly; we don't know what value - typically was logged. Presumably 0.) Replaced in M-107 with the - histogram name with a "3" at the end, which is similar but - only emitted on profiles that support bookmarks. - </obsolete> - </variant> - <variant name="Url3" summary="URL"/> - <variant name="UrlAndTitle" summary="URL-title pair"> - <obsolete> - Logged on profile open, including for profiles that do not support - bookmarks. (We did not investigate thoroughly; we don't know what value - typically was logged. Presumably 0.) Replaced in M-107 with the - histogram name with a "3" at the end, which is similar but - only emitted on profiles that support bookmarks. - </obsolete> - </variant> - <variant name="UrlAndTitle3" summary="URL-title pair"/> - <variant name="UrlAndTitleAndParent" summary="URL-title-parent triple"> - <obsolete> - Logged on profile open, including for profiles that do not support - bookmarks. (We did not investigate thoroughly; we don't know what value - typically was logged. Presumably 0.) Replaced in M-107 with the - histogram name with a "3" at the end, which is similar but - only emitted on profiles that support bookmarks. - </obsolete> - </variant> - <variant name="UrlAndTitleAndParent3" summary="URL-title-parent triple"/> + <variant name="Url" summary="URL"/> + <variant name="UrlAndTitle" summary="URL-title pair"/> + <variant name="UrlAndTitleAndParent" summary="URL-title-parent triple"/> </token> </histogram> -<histogram name="Bookmarks.Count.OnProfileLoad3" units="bookmarks" - expires_after="2023-02-19"> - <owner>supertri@chromium.org</owner> - <owner>isherman@chromium.org</owner> - <owner>aidanday@google.com</owner> - <owner>mamir@chromium.org</owner> - <component>UI>Browser>Bookmarks</component> - <summary> - The total number of bookmarks a user has saved, excluding folders. Recorded - when a profile is opened - precisely, when bookmarks are loaded into storage - from disk. The count includes all bookmarks both in the "Bookmarks - Bar" and also under "Other Bookmarks". - </summary> -</histogram> - <histogram name="Bookmarks.Count.OpenInIncognito" units="bookmarks" expires_after="M82"> <owner>twellington@google.com</owner> @@ -815,29 +739,10 @@ <histogram name="Bookmarks.Storage.FileSizeAtStartup" units="KB" expires_after="2023-04-21"> - <obsolete> - Logged on profile open, including for profiles that do not support - bookmarks. (We did not investigate thoroughly; we don't know what value - typically was logged. Presumably 0.) Replaced in M-107 with - Bookmarks.Storage.FileSizeAtStartup2, which is similar but only emitted on - profiles that support bookmarks. - </obsolete> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component> - <summary> - Size of the bookmarks file, recorded when the bookmarks model is loaded. - </summary> -</histogram> - -<histogram name="Bookmarks.Storage.FileSizeAtStartup2" units="KB" - expires_after="2023-04-21"> - <owner>wylieb@chromium.org</owner> - <owner>chrome-collections@google.com</owner> - <component>UI>Browser>Bookmarks</component> - <summary> - Size of the bookmarks file, recorded when the bookmarks model is loaded. - </summary> + <summary>Size of the bookmarks file, recorded at startup.</summary> </histogram> <histogram name="Bookmarks.Storage.TimeSinceLastScheduledSave" units="ms" @@ -853,24 +758,6 @@ <histogram name="Bookmarks.Storage.TimeToLoadAtStartup" units="ms" expires_after="2023-04-21"> - <obsolete> - Logged on profile open, including for profiles that do not support - bookmarks. (We did not investigate thoroughly; we don't know what value - typically was logged. Presumably something small.) Replaced in M-107 with - Bookmarks.Storage.TimeToLoadAtStartup2, which is similar but only emitted on - profiles that support bookmarks. - </obsolete> - <owner>wylieb@chromium.org</owner> - <owner>chrome-collections@google.com</owner> - <component>UI>Browser>Bookmarks</component> - <summary> - Duration of loading the bookmarks file, recorded when the bookmark model is - loaded. - </summary> -</histogram> - -<histogram name="Bookmarks.Storage.TimeToLoadAtStartup2" units="ms" - expires_after="2023-04-21"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component> @@ -882,24 +769,6 @@ <histogram name="Bookmarks.Times.OnProfileLoad.TimeSinceAdded" units="days" expires_after="2023-06-08"> - <obsolete> - Logged on profile open, including for profiles that do not support - bookmarks. (We did not investigate thoroughly; we don't know what value - typically was logged. Presumably 0.) Replaced in M-107 with - Bookmarks.Times.OnProfileLoad.TimeSinceAdded3, which is similar but only - emitted on profiles that support bookmarks. - </obsolete> - <owner>wylieb@chromium.org</owner> - <owner>chrome-collections@google.com</owner> - <component>UI>Browser>Bookmarks</component> - <summary> - Records the average number of days since each bookmark was added. Recorded - on profile load. - </summary> -</histogram> - -<histogram name="Bookmarks.Times.OnProfileLoad.TimeSinceAdded3" units="days" - expires_after="2023-06-08"> <owner>wylieb@chromium.org</owner> <owner>chrome-collections@google.com</owner> <component>UI>Browser>Bookmarks</component>
diff --git a/tools/metrics/histograms/metadata/cookie/histograms.xml b/tools/metrics/histograms/metadata/cookie/histograms.xml index 4fff4a12..a0d2b45 100644 --- a/tools/metrics/histograms/metadata/cookie/histograms.xml +++ b/tools/metrics/histograms/metadata/cookie/histograms.xml
@@ -392,7 +392,7 @@ </histogram> <histogram name="Cookie.FromStorageWithValidLength" enum="BooleanValid" - expires_after="2022-09-18"> + expires_after="2023-03-18"> <owner>bingler@chromium.org</owner> <owner>awillia@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index 2f22d9f..76391b60 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -12173,6 +12173,17 @@ </summary> </histogram> +<histogram name="Shutdown.BrowserExit.Time2" units="ms" expires_after="M110"> + <owner>etienneb@chromium.org</owner> + <owner>gab@chromium.org</owner> + <summary> + Time duration for shutdown initiated by the browser exit menu command. The + duration covers from the shutdown trigger to the deletion of the + BrowserImpl. Note: Android has an atomic shutdown and does not have shutdown + metrics. + </summary> +</histogram> + <histogram name="Shutdown.EndSession.Time" units="ms" expires_after="M110"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> @@ -12182,13 +12193,36 @@ </summary> </histogram> +<histogram name="Shutdown.EndSession.Time2" units="ms" expires_after="M110"> + <owner>etienneb@chromium.org</owner> + <owner>gab@chromium.org</owner> + <summary> + Time duration for shutdown initiated by an end session (user logs off, shuts + down or reboots without explicitly exiting).The duration covers from the + shutdown trigger to the deletion of the BrowserImpl. Note: Android has an + atomic shutdown and does not have shutdown metrics. + </summary> +</histogram> + <histogram name="Shutdown.NotValid.Time" units="ms" expires_after="M110"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> + Time duration for shutdown for a not valid exit. This situation happen when + a chrome process is already running and the process is terminated after the + process singleton rendez-vous. + </summary> +</histogram> + +<histogram name="Shutdown.NotValid.Time2" units="ms" expires_after="M110"> + <owner>etienneb@chromium.org</owner> + <owner>gab@chromium.org</owner> + <summary> Time for shutdown for a not valid exit. This situation happen when a chrome process is already running and the process is terminated after the process - singleton rendez-vous. + singleton rendez-vous. The duration covers from the shutdown trigger to the + deletion of the BrowserImpl. Note: Android has an atomic shutdown and does + not have shutdown metrics. </summary> </histogram> @@ -12218,12 +12252,33 @@ <summary>The type of the last shutdown.</summary> </histogram> +<histogram name="Shutdown.ShutdownType2" enum="ShutdownType" + expires_after="M110"> + <owner>etienneb@chromium.org</owner> + <owner>gab@chromium.org</owner> + <summary> + The action type that triggered a browser shutdown. The metric is emitted + just after BrowserImpl deletion. Note: Android has an atomic shutdown and + does not shutdown metrics. + </summary> +</histogram> + <histogram name="Shutdown.SilentExit.Time" units="ms" expires_after="M110"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> <summary>Time for shutdown for a silent exit.</summary> </histogram> +<histogram name="Shutdown.SilentExit.Time2" units="ms" expires_after="M110"> + <owner>etienneb@chromium.org</owner> + <owner>gab@chromium.org</owner> + <summary> + Time for shutdown for a silent exit. The duration covers from the shutdown + trigger to the deletion of the BrowserImpl. Note: Android has an atomic + shutdown and does not have shutdown metrics. + </summary> +</histogram> + <histogram name="Shutdown.WindowClose.Time" units="ms" expires_after="M110"> <owner>etienneb@chromium.org</owner> <owner>gab@chromium.org</owner> @@ -12232,6 +12287,17 @@ </summary> </histogram> +<histogram name="Shutdown.WindowClose.Time2" units="ms" expires_after="M110"> + <owner>etienneb@chromium.org</owner> + <owner>gab@chromium.org</owner> + <summary> + Time for shutdown initiated by the last browser window being closed. The + duration covers from the shutdown trigger to the deletion of the + BrowserImpl. Note: Android has an atomic shutdown and does not have shutdown + metrics. + </summary> +</histogram> + <histogram name="SignedExchange.CertificateFetch.CacheHit" enum="BooleanCacheHit" expires_after="2022-10-22"> <owner>ksakamoto@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 b58fc86..7763d03 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -6,7 +6,7 @@ }, "win": { "hash": "f499d491081fb689a75d89cd3183e30281669be2", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/f076cfd0a1971b5f71427c39fa2e5a7997cad02f/trace_processor_shell.exe" + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/13c35692e86358d64b2aa0f89195480ddacd8b37/trace_processor_shell.exe" }, "linux_arm": { "hash": "58893933be305d3bfe0a72ebebcacde2ac3ca893", @@ -21,8 +21,8 @@ "full_remote_path": "perfetto-luci-artifacts/v25.0/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "8a55f30f6e7fc424bd428cf3c5a04ef1700b540a", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/f076cfd0a1971b5f71427c39fa2e5a7997cad02f/trace_processor_shell" + "hash": "ec688db739a3781e079d0851bfc4e50df3c3eed4", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/13c35692e86358d64b2aa0f89195480ddacd8b37/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/tools/rust/update_rust.py b/tools/rust/update_rust.py index 4d4d400..75c7e77a 100755 --- a/tools/rust/update_rust.py +++ b/tools/rust/update_rust.py
@@ -45,7 +45,7 @@ # This should almost always be None. When a breakage happens the fallback should # be temporary. Once fixed, the applicable revision(s) above should be updated # and FALLBACK_CLANG_VERSION should be reset to None. -FALLBACK_CLANG_VERSION = 'llvmorg-16-init-907-g8b740747-4' +FALLBACK_CLANG_VERSION = None # Hash of src/stage0.json, which itself contains the stage0 toolchain hashes. # We trust the Rust build system checks, but to ensure it is not tampered with
diff --git a/tools/traffic_annotation/auditor/chromeos/safe_list.txt b/tools/traffic_annotation/auditor/chromeos/safe_list.txt index 296c69e..c13b95b 100644 --- a/tools/traffic_annotation/auditor/chromeos/safe_list.txt +++ b/tools/traffic_annotation/auditor/chromeos/safe_list.txt
@@ -7,7 +7,7 @@ all,chromeos/printing/printer_config_cache.cc all,chrome/browser/ash/customization/customization_document.cc all,ash/webui/projector_app/projector_xhr_sender.cc -all,ash/components/geolocation/simple_geolocation_request.cc +all,chromeos/ash/components/geolocation/simple_geolocation_request.cc all,ash/components/trial_group/trial_group_checker.cc all,chrome/browser/ash/net/network_portal_detector_impl.cc all,chrome/browser/ash/policy/uploading/system_log_uploader.cc
diff --git a/tools/typescript/definitions/autofill_private.d.ts b/tools/typescript/definitions/autofill_private.d.ts index da6bf63..9f9ce64 100644 --- a/tools/typescript/definitions/autofill_private.d.ts +++ b/tools/typescript/definitions/autofill_private.d.ts
@@ -81,6 +81,7 @@ expirationYear?: string; nickname?: string; network?: string; + imageSrc?: string; metadata?: AutofillMetadata; }
diff --git a/ui/accessibility/BUILD.gn b/ui/accessibility/BUILD.gn index cdb54b27..4df9187d 100644 --- a/ui/accessibility/BUILD.gn +++ b/ui/accessibility/BUILD.gn
@@ -402,6 +402,20 @@ } } +if (is_android) { + java_cpp_features("java_features_srcjar") { + # External code should depend on ":accessibility_features_java" instead. + visibility = [ ":*" ] + sources = [ "//ui/accessibility/accessibility_features.cc" ] + template = "//ui/accessibility/android/java_templates/AccessibilityFeatures.java.tmpl" + } + + # A minimal library used to expose accessibility features to webview. + android_library("accessibility_features_java") { + srcjar_deps = [ ":java_features_srcjar" ] + } +} + test("accessibility_perftests") { testonly = true sources = [ "ax_node_position_perftest.cc" ]
diff --git a/ui/accessibility/android/java_templates/AccessibilityFeatures.java.tmpl b/ui/accessibility/android/java_templates/AccessibilityFeatures.java.tmpl new file mode 100644 index 0000000..119f867 --- /dev/null +++ b/ui/accessibility/android/java_templates/AccessibilityFeatures.java.tmpl
@@ -0,0 +1,16 @@ +// Copyright 2022 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.ui.accessibility; + +/** +* Contains features that are specific to accessibility. +*/ +public final class AccessibilityFeatures {{ + +{NATIVE_FEATURES} + + // Prevents instantiation. + private AccessibilityFeatures() {{}} +}} \ No newline at end of file
diff --git a/ui/accessibility/ax_language_detection.cc b/ui/accessibility/ax_language_detection.cc index d13fb21d..0a390b3 100644 --- a/ui/accessibility/ax_language_detection.cc +++ b/ui/accessibility/ax_language_detection.cc
@@ -17,6 +17,7 @@ #include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/accessibility_switches.h" #include "ui/accessibility/ax_enums.mojom.h" +#include "ui/accessibility/ax_node.h" #include "ui/accessibility/ax_tree.h" namespace ui {
diff --git a/ui/accessibility/ax_node.cc b/ui/accessibility/ax_node.cc index b5214a8..4f7dcc2 100644 --- a/ui/accessibility/ax_node.cc +++ b/ui/accessibility/ax_node.cc
@@ -32,7 +32,7 @@ constexpr int AXNode::kEmbeddedObjectCharacterLengthUTF8; constexpr int AXNode::kEmbeddedObjectCharacterLengthUTF16; -AXNode::AXNode(AXNode::OwnerTree* tree, +AXNode::AXNode(AXTree* tree, AXNode* parent, AXNodeID id, size_t index_in_parent,
diff --git a/ui/accessibility/ax_node.h b/ui/accessibility/ax_node.h index 0ab5264..b97af3e 100644 --- a/ui/accessibility/ax_node.h +++ b/ui/accessibility/ax_node.h
@@ -34,7 +34,7 @@ class AXTreeManager; struct AXLanguageInfo; -struct AXTreeData; +class AXTree; // This class is used to represent a node in an accessibility tree (`AXTree`). class AX_EXPORT AXNode final { @@ -56,34 +56,6 @@ static constexpr int kEmbeddedObjectCharacterLengthUTF16 = std::char_traits<char16_t>::length(kEmbeddedObjectCharacterUTF16); - // Interface to the tree class that owns an AXNode. We use this instead - // of letting AXNode have a pointer to its AXTree directly so that we're - // forced to think twice before calling an AXTree interface that might not - // be necessary. - class OwnerTree { - public: - // See AXTree::GetAXTreeID. - virtual const AXTreeID& GetAXTreeID() const = 0; - // See `AXTree::GetTableInfo`. - virtual AXTableInfo* GetTableInfo(const AXNode* table_node) const = 0; - // See AXTree::GetFromId. - virtual AXNode* GetFromId(AXNodeID id) const = 0; - // See AXTree::data. - virtual const AXTreeData& data() const = 0; - - virtual absl::optional<int> GetPosInSet(const AXNode& node) = 0; - virtual absl::optional<int> GetSetSize(const AXNode& node) = 0; - - // See `AXTree::GetSelection`. - virtual AXSelection GetSelection() const = 0; - // See `AXTree::GetUnignoredSelection`. - virtual AXSelection GetUnignoredSelection() const = 0; - // See `AXTree::GetTreeUpdateInProgressState`. - virtual bool GetTreeUpdateInProgressState() const = 0; - // See `AXTree::HasPaginationSupport`. - virtual bool HasPaginationSupport() const = 0; - }; - template <typename NodeType, NodeType* (NodeType::*NextSibling)() const, NodeType* (NodeType::*PreviousSibling)() const, @@ -117,7 +89,7 @@ // the data is not required. After initialization, only index_in_parent // and unignored_index_in_parent is allowed to change, the others are // guaranteed to never change. - AXNode(OwnerTree* tree, + AXNode(AXTree* tree, AXNode* parent, AXNodeID id, size_t index_in_parent, @@ -125,7 +97,7 @@ virtual ~AXNode(); // Accessors. - OwnerTree* tree() const { return tree_; } + AXTree* tree() const { return tree_; } AXNodeID id() const { return data_.id; } const AXNodeData& data() const { return data_; } @@ -792,7 +764,7 @@ // blended with ancestor colors. SkColor ComputeColorAttribute(ax::mojom::IntAttribute color_attr) const; - const raw_ptr<OwnerTree> tree_; // Owns this. + const raw_ptr<AXTree> tree_; // Owns this. size_t index_in_parent_; size_t unignored_index_in_parent_; size_t unignored_child_count_ = 0;
diff --git a/ui/accessibility/ax_tree.h b/ui/accessibility/ax_tree.h index 84e63e86..bdf8a46 100644 --- a/ui/accessibility/ax_tree.h +++ b/ui/accessibility/ax_tree.h
@@ -21,18 +21,18 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/accessibility/ax_enums.mojom-forward.h" #include "ui/accessibility/ax_export.h" -#include "ui/accessibility/ax_node.h" -#include "ui/accessibility/ax_node_data.h" #include "ui/accessibility/ax_tree_data.h" #include "ui/accessibility/ax_tree_update.h" namespace ui { struct AXEvent; +class AXLanguageDetectionManager; +class AXNode; +struct AXNodeData; class AXTableInfo; class AXTreeObserver; struct AXTreeUpdateState; -class AXLanguageDetectionManager; class AXSelection; // These values are persisted to logs. Entries should not be renumbered and @@ -68,7 +68,7 @@ // used as a source for sending updates to another client tree. // It's designed to be subclassed to implement support for native // accessibility APIs on a specific platform. -class AX_EXPORT AXTree : public AXNode::OwnerTree { +class AX_EXPORT AXTree { public: using IntReverseRelationMap = std::map<ax::mojom::IntAttribute, std::map<AXNodeID, std::set<AXNodeID>>>; @@ -116,18 +116,26 @@ AXNode* root() const { return root_; } - const AXTreeData& data() const override; + const AXTreeData& data() const; // Destroys the tree and notifies all observers. void Destroy(); - // AXNode::OwnerTree override. // Returns the globally unique ID of this accessibility tree. - const AXTreeID& GetAXTreeID() const override; + const AXTreeID& GetAXTreeID() const; - // AXNode::OwnerTree override. + // Given a node in this accessibility tree that corresponds to a table + // or grid, return an object containing information about the + // table structure. This object is computed lazily on-demand and + // cached until the next time the tree is updated. Clients should + // not retain this pointer, they should just request it every time + // it's needed. + // + // Returns nullptr if the node is not a valid table. + AXTableInfo* GetTableInfo(const AXNode* table_node) const; + // Returns the AXNode with the given |id| if it is part of this AXTree. - AXNode* GetFromId(AXNodeID id) const override; + AXNode* GetFromId(AXNodeID id) const; // Returns true on success. If it returns false, it's a fatal error // and this tree should be destroyed, and the source of the tree update @@ -212,27 +220,27 @@ // Returns the PosInSet of |node|. Looks in node_set_size_pos_in_set_info_map_ // for cached value. Calls |ComputeSetSizePosInSetAndCache|if no value is // present in the cache. - absl::optional<int> GetPosInSet(const AXNode& node) override; + absl::optional<int> GetPosInSet(const AXNode& node); + // Returns the SetSize of |node|. Looks in node_set_size_pos_in_set_info_map_ // for cached value. Calls |ComputeSetSizePosInSetAndCache|if no value is // present in the cache. - absl::optional<int> GetSetSize(const AXNode& node) override; + absl::optional<int> GetSetSize(const AXNode& node); // Returns the part of the current selection that falls within this // accessibility tree, if any. - AXSelection GetSelection() const override; + AXSelection GetSelection() const; // Returns the part of the current selection that falls within this // accessibility tree, if any, adjusting its endpoints to be within unignored // nodes. (An "ignored" node is a node that is not exposed to platform APIs: // See `AXNode::IsIgnored`.) - AXSelection GetUnignoredSelection() const override; + AXSelection GetUnignoredSelection() const; - bool GetTreeUpdateInProgressState() const override; + bool GetTreeUpdateInProgressState() const; - // AXNode::OwnerTree override. // Returns true if the tree represents a paginated document - bool HasPaginationSupport() const override; + bool HasPaginationSupport() const; // Language detection manager, entry point to language detection features. // TODO(chrishall): Should this be stored by pointer or value? @@ -263,18 +271,6 @@ void RecordError(const AXTreeUpdateState& update_state, std::string new_error); - // AXNode::OwnerTree override. - // - // Given a node in this accessibility tree that corresponds to a table - // or grid, return an object containing information about the - // table structure. This object is computed lazily on-demand and - // cached until the next time the tree is updated. Clients should - // not retain this pointer, they should just request it every time - // it's needed. - // - // Returns nullptr if the node is not a valid table. - AXTableInfo* GetTableInfo(const AXNode* table_node) const override; - AXNode* CreateNode(AXNode* parent, AXNodeID id, size_t index_in_parent,
diff --git a/ui/accessibility/ax_tree_unittest.cc b/ui/accessibility/ax_tree_unittest.cc index f761e9d..f92bf19 100644 --- a/ui/accessibility/ax_tree_unittest.cc +++ b/ui/accessibility/ax_tree_unittest.cc
@@ -1205,8 +1205,9 @@ ASSERT_TRUE(test_observer.root_changed()); } +// https://crbug.com/1359080 // UAF caught by ax_tree_fuzzer -TEST(AXTreeTest, BogusAXTree) { +TEST(AXTreeTest, DISABLED_BogusAXTree) { AXTreeUpdate initial_state; AXNodeData node; node.id = 0;
diff --git a/ui/accessibility/platform/inspect/ax_element_wrapper_mac.h b/ui/accessibility/platform/inspect/ax_element_wrapper_mac.h index e02150cb..a3385b8 100644 --- a/ui/accessibility/platform/inspect/ax_element_wrapper_mac.h +++ b/ui/accessibility/platform/inspect/ax_element_wrapper_mac.h
@@ -39,7 +39,7 @@ // BrowserAccessibilityCocoa). static std::string DOMIdOf(const id node); - AXElementWrapper(const id node) : node_(node){}; + AXElementWrapper(const id node) : node_(node) {} // Returns true if the object is either an NSAccessibilityElement or // AXUIElement.
diff --git a/ui/android/java/src/org/chromium/ui/base/OverlayTransformApiHelper.java b/ui/android/java/src/org/chromium/ui/base/OverlayTransformApiHelper.java index b342b68..bd1278d 100644 --- a/ui/android/java/src/org/chromium/ui/base/OverlayTransformApiHelper.java +++ b/ui/android/java/src/org/chromium/ui/base/OverlayTransformApiHelper.java
@@ -23,9 +23,10 @@ final class OverlayTransformApiHelper implements AttachedSurfaceControl.OnBufferTransformHintChangedListener, Window.OnFrameMetricsAvailableListener { + private final WindowAndroid mWindowAndroid; + private final Window mWindow; private boolean mBufferTransformListenerAdded; private boolean mFrameMetricsListenerAdded; - private WindowAndroid mWindowAndroid; static OverlayTransformApiHelper create(WindowAndroid windowAndroid) { if (windowAndroid.getWindow() == null) return null; @@ -34,6 +35,8 @@ private OverlayTransformApiHelper(WindowAndroid windowAndroid) { mWindowAndroid = windowAndroid; + mWindow = windowAndroid.getWindow(); + assert mWindow != null; addOnBufferTransformHintChangedListener(); } @@ -43,7 +46,7 @@ } private void addOnBufferTransformHintChangedListener() { - AttachedSurfaceControl surfacecontrol = mWindowAndroid.getWindow().getRootSurfaceControl(); + AttachedSurfaceControl surfacecontrol = mWindow.getRootSurfaceControl(); if (surfacecontrol == null) { // If AttachedSurfaceControl is not available yet, wait until it's ready and set the // listener. @@ -60,7 +63,7 @@ private void doAddOnBufferTransformHintChangedListener() { if (mBufferTransformListenerAdded) return; - AttachedSurfaceControl surfacecontrol = mWindowAndroid.getWindow().getRootSurfaceControl(); + AttachedSurfaceControl surfacecontrol = mWindow.getRootSurfaceControl(); if (surfacecontrol != null) { surfacecontrol.addOnBufferTransformHintChangedListener(this); mBufferTransformListenerAdded = true; @@ -70,7 +73,7 @@ private void removeOnBufferTransformHintChangedListener() { if (!mBufferTransformListenerAdded) return; - AttachedSurfaceControl surfacecontrol = mWindowAndroid.getWindow().getRootSurfaceControl(); + AttachedSurfaceControl surfacecontrol = mWindow.getRootSurfaceControl(); if (surfacecontrol != null) { surfacecontrol.removeOnBufferTransformHintChangedListener(this); mBufferTransformListenerAdded = false; @@ -89,24 +92,30 @@ private void addOnFrameMetricsAvailableListener() { if (mFrameMetricsListenerAdded) return; - mWindowAndroid.getWindow().addOnFrameMetricsAvailableListener( - this, new Handler(Looper.myLooper())); + mWindow.addOnFrameMetricsAvailableListener(this, new Handler(Looper.myLooper())); mFrameMetricsListenerAdded = true; } private void removeOnFrameMetricsAvailableListener() { if (!mFrameMetricsListenerAdded) return; - mWindowAndroid.getWindow().removeOnFrameMetricsAvailableListener(this); + mWindow.removeOnFrameMetricsAvailableListener(this); mFrameMetricsListenerAdded = false; } @OverlayTransform int getOverlayTransform() { - Window window = mWindowAndroid.getWindow(); - if (window.getRootSurfaceControl() == null) { + AttachedSurfaceControl surfacecontrol = mWindow.getRootSurfaceControl(); + if (surfacecontrol == null) { return OverlayTransform.INVALID; } - int bufferTransform = window.getRootSurfaceControl().getBufferTransformHint(); + int bufferTransform; + try { + bufferTransform = surfacecontrol.getBufferTransformHint(); + } catch (NullPointerException e) { + // Can throw exception from implementation of getBufferTransformHint. + // See crbug.com/1358898. + return OverlayTransform.INVALID; + } return toOverlayTransform(bufferTransform); }
diff --git a/ui/base/cocoa/menu_controller_unittest.mm b/ui/base/cocoa/menu_controller_unittest.mm index 98e71a4..5005a2169 100644 --- a/ui/base/cocoa/menu_controller_unittest.mm +++ b/ui/base/cocoa/menu_controller_unittest.mm
@@ -677,9 +677,8 @@ item = [[controller menu] itemAtIndex:0]; EXPECT_TRUE(item); - // Simulate opening the menu and selecting an item. Without setting - // -setPostItemSelectedAsTask:YES, methods are always invoked by AppKit in - // the following order. + // Simulate opening the menu and selecting an item. Methods are always + // invoked by AppKit in the following order. [controller menuWillOpen:[controller menu]]; [controller menuDidClose:[controller menu]]; }
diff --git a/ui/base/test/menu_test_observer.mm b/ui/base/test/menu_test_observer.mm index 973d602..c3650f1 100644 --- a/ui/base/test/menu_test_observer.mm +++ b/ui/base/test/menu_test_observer.mm
@@ -5,7 +5,6 @@ #import "ui/base/test/menu_test_observer.h" #include "base/check_op.h" -#import "base/mac/objc_release_properties.h" @implementation MenuTestObserver @@ -17,7 +16,7 @@ - (instancetype)initWithMenu:(NSMenu*)menu { if ((self = [super init])) { - _menu = menu; + _menu = [menu retain]; NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; [center addObserver:self @@ -34,7 +33,8 @@ - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - base::mac::ReleaseProperties(self); + [_menu release]; + [_openCallback release]; [super dealloc]; }
diff --git a/ui/display/mac/test/virtual_display_mac_util.mm b/ui/display/mac/test/virtual_display_mac_util.mm index 19e84b1..6783ffc 100644 --- a/ui/display/mac/test/virtual_display_mac_util.mm +++ b/ui/display/mac/test/virtual_display_mac_util.mm
@@ -264,7 +264,7 @@ } ~DisplayMetricsChangeObserver() override { display::Screen::GetScreen()->RemoveObserver(this); - }; + } DisplayMetricsChangeObserver(const DisplayMetricsChangeObserver&) = delete; DisplayMetricsChangeObserver& operator=(const DisplayMetricsChangeObserver&) = @@ -292,8 +292,8 @@ if (run_loop_.running()) run_loop_.Quit(); } - void OnDisplayAdded(const display::Display& new_display) override{}; - void OnDisplayRemoved(const display::Display& old_display) override{}; + void OnDisplayAdded(const display::Display& new_display) override {} + void OnDisplayRemoved(const display::Display& old_display) override {} const int64_t display_id_; const gfx::Size size_;
diff --git a/ui/gfx/geometry/dip_util.cc b/ui/gfx/geometry/dip_util.cc index 561d10e..2804f208 100644 --- a/ui/gfx/geometry/dip_util.cc +++ b/ui/gfx/geometry/dip_util.cc
@@ -17,152 +17,79 @@ namespace gfx { -#if BUILDFLAG(IS_MAC) -// Returns true if the floating point value is holding an integer, modulo -// floating point error. The value `f` can be safely converted to its integer -// form with base::ClampRound(). -static bool IsIntegerInFloat(float f) { - return std::abs(f - base::ClampRound(f)) < 0.01f; -} -#endif - PointF ConvertPointToDips(const Point& point_in_pixels, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScalePoint(PointF(point_in_pixels), 1.f / device_scale_factor); } PointF ConvertPointToDips(const PointF& point_in_pixels, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScalePoint(point_in_pixels, 1.f / device_scale_factor); } PointF ConvertPointToPixels(const Point& point_in_dips, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScalePoint(PointF(point_in_dips), device_scale_factor); } PointF ConvertPointToPixels(const PointF& point_in_dips, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScalePoint(point_in_dips, device_scale_factor); } SizeF ConvertSizeToDips(const Size& size_in_pixels, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleSize(SizeF(size_in_pixels), 1.f / device_scale_factor); } SizeF ConvertSizeToDips(const SizeF& size_in_pixels, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleSize(size_in_pixels, 1.f / device_scale_factor); } SizeF ConvertSizeToPixels(const Size& size_in_dips, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleSize(SizeF(size_in_dips), device_scale_factor); } SizeF ConvertSizeToPixels(const SizeF& size_in_dips, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleSize(size_in_dips, device_scale_factor); } RectF ConvertRectToDips(const Rect& rect_in_pixels, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleRect(RectF(rect_in_pixels), 1.f / device_scale_factor); } RectF ConvertRectToDips(const RectF& rect_in_pixels, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleRect(rect_in_pixels, 1.f / device_scale_factor); } RectF ConvertRectToPixels(const Rect& rect_in_dips, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleRect(RectF(rect_in_dips), device_scale_factor); } RectF ConvertRectToPixels(const RectF& rect_in_dips, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleRect(rect_in_dips, device_scale_factor); } InsetsF ConvertInsetsToDips(const gfx::Insets& insets_in_pixels, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleInsets(InsetsF(insets_in_pixels), 1.f / device_scale_factor); } InsetsF ConvertInsetsToDips(const gfx::InsetsF& insets_in_pixels, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleInsets(insets_in_pixels, 1.f / device_scale_factor); } InsetsF ConvertInsetsToPixels(const gfx::Insets& insets_in_dips, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleInsets(InsetsF(insets_in_dips), device_scale_factor); } InsetsF ConvertInsetsToPixels(const gfx::InsetsF& insets_in_dips, float device_scale_factor) { -#if BUILDFLAG(IS_MAC) - // Device scale factor on MacOSX is always an integer. - DCHECK(IsIntegerInFloat(device_scale_factor)); -#endif return ScaleInsets(insets_in_dips, device_scale_factor); }
diff --git a/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc b/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc index 96ed4bc1..f001722 100644 --- a/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc +++ b/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc
@@ -629,7 +629,7 @@ EXPECT_EQ(drm_->get_commit_count() - setup_commits, 1); } -TEST_F(DrmOverlayValidatorTest, FourCandidatesTwoPlanes_MoreThanOneCommit) { +TEST_F(DrmOverlayValidatorTest, FourCandidatesTwoPlanes_OneCommit) { // Only two planes. CrtcState crtc_state = {.planes = {{.formats = {DRM_FORMAT_XRGB8888}}, {.formats = {DRM_FORMAT_XRGB8888}}}}; @@ -645,14 +645,15 @@ std::vector<ui::OverlayStatus> returns = overlay_validator_->TestPageFlip( overlay_params_, ui::DrmOverlayPlaneList()); - // All planes promoted. + // Two planes promoted. ASSERT_EQ(4u, returns.size()); EXPECT_EQ(returns[0], ui::OVERLAY_STATUS_ABLE); EXPECT_EQ(returns[1], ui::OVERLAY_STATUS_ABLE); EXPECT_EQ(returns[2], ui::OVERLAY_STATUS_NOT); EXPECT_EQ(returns[3], ui::OVERLAY_STATUS_NOT); - // First attempted with all 4 planes, then 3, then 2. - EXPECT_EQ(drm_->get_commit_count() - setup_commits, 3); + // We should only see one commit because we won't talk to DRM if we can't + // allocate planes. + EXPECT_EQ(drm_->get_commit_count() - setup_commits, 1); } TEST_F(DrmOverlayValidatorTest, TwoOfSixIgnored_OneCommit) {
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc index b3be210..686a592 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc +++ b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
@@ -172,9 +172,10 @@ base::MakeRefCounted<PageFlipRequest>(GetRefreshInterval()); gfx::GpuFenceHandle release_fence; - bool status = + PageFlipResult result = ScheduleOrTestPageFlip(plane_list, page_flip_request, &release_fence); - if (!status) { + + if (PageFlipResult::kSuccess != result) { for (const auto& plane : plane_list) { // If the page flip failed and we see that the buffer has been allocated // before the latest modeset, it could mean it was an in-flight buffer @@ -227,10 +228,12 @@ bool HardwareDisplayController::TestPageFlip( const DrmOverlayPlaneList& plane_list) { - return ScheduleOrTestPageFlip(plane_list, nullptr, nullptr); + return PageFlipResult::kSuccess == + ScheduleOrTestPageFlip(plane_list, nullptr, nullptr); } -bool HardwareDisplayController::ScheduleOrTestPageFlip( +HardwareDisplayController::PageFlipResult +HardwareDisplayController::ScheduleOrTestPageFlip( const DrmOverlayPlaneList& plane_list, scoped_refptr<PageFlipRequest> page_flip_request, gfx::GpuFenceHandle* release_fence) { @@ -239,7 +242,7 @@ // Ignore requests with no planes to schedule. if (plane_list.empty()) - return true; + return PageFlipResult::kSuccess; DrmOverlayPlaneList pending_planes = DrmOverlayPlane::Clone(plane_list); std::sort(pending_planes.begin(), pending_planes.end(), @@ -248,16 +251,17 @@ }); GetDrmDevice()->plane_manager()->BeginFrame(&owned_hardware_planes_); - bool status = true; for (const auto& controller : crtc_controllers_) { - status &= controller->AssignOverlayPlanes( - &owned_hardware_planes_, pending_planes, /*is_modesetting=*/false); + if (!controller->AssignOverlayPlanes( + &owned_hardware_planes_, pending_planes, /*is_modesetting=*/false)) + return PageFlipResult::kFailedPlaneAssignment; } - status &= GetDrmDevice()->plane_manager()->Commit( + bool commit_success = GetDrmDevice()->plane_manager()->Commit( &owned_hardware_planes_, page_flip_request, release_fence); - return status; + return commit_success ? PageFlipResult::kSuccess + : PageFlipResult::kFailedCommit; } std::vector<uint64_t> HardwareDisplayController::GetFormatModifiers(
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_controller.h b/ui/ozone/platform/drm/gpu/hardware_display_controller.h index 4e45eccf..e3dda5a 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_controller.h +++ b/ui/ozone/platform/drm/gpu/hardware_display_controller.h
@@ -182,6 +182,16 @@ void AsValueInto(base::trace_event::TracedValue* value) const; private: + enum PageFlipResult { + // Indicates that the page flip was committed successfully. + kSuccess = 0, + // Indicates that the page flip failed because we could not assign + // planes. + kFailedPlaneAssignment = 1, + // Indicates that we assigned planes but the DRM commit failed. + kFailedCommit = 2, + kMaxValue = kFailedCommit, + }; // Loops over |crtc_controllers_| and save their props into |commit_request| // to be enabled/modeset. void GetModesetPropsForCrtcs(CommitRequest* commit_request, @@ -189,9 +199,10 @@ bool use_current_crtc_mode, const drmModeModeInfo& mode); void OnModesetComplete(const DrmOverlayPlaneList& modeset_planes); - bool ScheduleOrTestPageFlip(const DrmOverlayPlaneList& plane_list, - scoped_refptr<PageFlipRequest> page_flip_request, - gfx::GpuFenceHandle* release_fence); + PageFlipResult ScheduleOrTestPageFlip( + const DrmOverlayPlaneList& plane_list, + scoped_refptr<PageFlipRequest> page_flip_request, + gfx::GpuFenceHandle* release_fence); void AllocateCursorBuffers(); DrmDumbBuffer* NextCursorBuffer(); void UpdateCursorImage();
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc b/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc index 2f27c269..ed18372e 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc +++ b/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc
@@ -965,6 +965,34 @@ EXPECT_EQ(1, successful_page_flips_count_); } +TEST_F(HardwareDisplayControllerTest, PageFlipWithUnassignablePlanes) { + ui::DrmOverlayPlaneList modeset_planes; + modeset_planes.emplace_back(CreateBuffer(), nullptr); + ASSERT_TRUE(ModesetWithPlanes(modeset_planes)); + + { + std::vector<ui::DrmOverlayPlane> page_flip_planes; + page_flip_planes.emplace_back( + CreateBuffer(), 1, gfx::OVERLAY_TRANSFORM_NONE, + gfx::Rect(kDefaultModeSize), gfx::RectF(0, 0, 1, 1), true, nullptr); + page_flip_planes.emplace_back( + CreateBuffer(), 1, gfx::OVERLAY_TRANSFORM_NONE, + gfx::Rect(kDefaultModeSize), gfx::RectF(0, 0, 1, 1), true, nullptr); + page_flip_planes.emplace_back( + CreateBuffer(), 1, gfx::OVERLAY_TRANSFORM_NONE, + gfx::Rect(kDefaultModeSize), gfx::RectF(0, 0, 1, 1), true, nullptr); + SchedulePageFlip(std::move(page_flip_planes)); + } + + drm_->RunCallbacks(); + + // It's important we don't do any real DRM flips here, since we know + // we can't allocate any planes, we avoid sending bad commits to the + // drivers. + EXPECT_EQ(0, drm_->get_page_flip_call_count()); + EXPECT_EQ(gfx::SwapResult::SWAP_FAILED, last_swap_result_); +} + TEST_F(HardwareDisplayControllerTest, AddCrtcMidPageFlip) { ui::DrmOverlayPlaneList planes; planes.emplace_back(CreateBuffer(), nullptr);
diff --git a/ui/views/controls/button/image_button_factory.cc b/ui/views/controls/button/image_button_factory.cc index 685410bb..52cc959 100644 --- a/ui/views/controls/button/image_button_factory.cc +++ b/ui/views/controls/button/image_button_factory.cc
@@ -6,6 +6,7 @@ #include <memory> #include <utility> +#include "ui/base/models/image_model.h" #include "ui/color/color_id.h" #include "ui/color/color_provider.h" #include "ui/gfx/color_palette.h" @@ -95,13 +96,13 @@ int dip_size, SkColor icon_color, SkColor icon_disabled_color) { - const gfx::ImageSkia& normal_image = - gfx::CreateVectorIcon(icon, dip_size, icon_color); - const gfx::ImageSkia& disabled_image = - gfx::CreateVectorIcon(icon, dip_size, icon_disabled_color); + const ui::ImageModel& normal_image = + ui::ImageModel::FromVectorIcon(icon, icon_color, dip_size); + const ui::ImageModel& disabled_image = + ui::ImageModel::FromVectorIcon(icon, icon_disabled_color, dip_size); - button->SetImage(Button::STATE_NORMAL, normal_image); - button->SetImage(Button::STATE_DISABLED, disabled_image); + button->SetImageModel(Button::STATE_NORMAL, normal_image); + button->SetImageModel(Button::STATE_DISABLED, disabled_image); InkDrop::Get(button)->SetBaseColor(icon_color); } @@ -110,13 +111,13 @@ int dip_size, SkColor icon_color, SkColor disabled_color) { - const gfx::ImageSkia normal_image = - gfx::CreateVectorIcon(icon, dip_size, icon_color); - const gfx::ImageSkia disabled_image = - gfx::CreateVectorIcon(icon, dip_size, disabled_color); + const ui::ImageModel& normal_image = + ui::ImageModel::FromVectorIcon(icon, icon_color, dip_size); + const ui::ImageModel& disabled_image = + ui::ImageModel::FromVectorIcon(icon, disabled_color, dip_size); - button->SetToggledImage(Button::STATE_NORMAL, &normal_image); - button->SetToggledImage(Button::STATE_DISABLED, &disabled_image); + button->SetToggledImageModel(Button::STATE_NORMAL, normal_image); + button->SetToggledImageModel(Button::STATE_DISABLED, disabled_image); } } // namespace views
diff --git a/ui/views/controls/button/image_button_factory_unittest.cc b/ui/views/controls/button/image_button_factory_unittest.cc index b75ac81..508cf44 100644 --- a/ui/views/controls/button/image_button_factory_unittest.cc +++ b/ui/views/controls/button/image_button_factory_unittest.cc
@@ -29,15 +29,6 @@ EXPECT_EQ(ImageButton::ALIGN_MIDDLE, button->v_alignment_); } -TEST_F(ImageButtonFactoryTest, SetImageFromVectorIconWithColor) { - auto button = CreateVectorImageButton(Button::PressedCallback()); - SetImageFromVectorIconWithColor(button.get(), vector_icons::kCloseRoundedIcon, - SK_ColorRED, SK_ColorRED); - EXPECT_FALSE(button->GetImage(Button::STATE_NORMAL).isNull()); - EXPECT_FALSE(button->GetImage(Button::STATE_DISABLED).isNull()); - EXPECT_EQ(SK_ColorRED, InkDrop::Get(button.get())->GetBaseColor()); -} - class ImageButtonFactoryWidgetTest : public ViewsTestBase { public: ImageButtonFactoryWidgetTest() = default; @@ -81,6 +72,15 @@ raw_ptr<ImageButton> button_ = nullptr; // owned by |widget_|. }; +TEST_F(ImageButtonFactoryWidgetTest, SetImageFromVectorIconWithColor) { + AddImageButton(CreateVectorImageButton(Button::PressedCallback())); + SetImageFromVectorIconWithColor(button(), vector_icons::kCloseRoundedIcon, + SK_ColorRED, SK_ColorRED); + EXPECT_FALSE(button()->GetImage(Button::STATE_NORMAL).isNull()); + EXPECT_FALSE(button()->GetImage(Button::STATE_DISABLED).isNull()); + EXPECT_EQ(SK_ColorRED, InkDrop::Get(button())->GetBaseColor()); +} + TEST_F(ImageButtonFactoryWidgetTest, CreateVectorImageButtonWithNativeTheme) { AddImageButton(CreateVectorImageButtonWithNativeTheme( Button::PressedCallback(), vector_icons::kCloseRoundedIcon));
diff --git a/ui/views/vector_icons/drag_general_selection.icon b/ui/views/vector_icons/drag_general_selection.icon index f27a6ae..c4a1aba 100644 --- a/ui/views/vector_icons/drag_general_selection.icon +++ b/ui/views/vector_icons/drag_general_selection.icon
@@ -2,93 +2,94 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -CANVAS_DIMENSIONS, 16, -MOVE_TO, 10, 2, -H_LINE_TO, 8.67f, -V_LINE_TO, 0.67f, -H_LINE_TO, 10, -V_LINE_TO, 2, +CANVAS_DIMENSIONS, 20, +MOVE_TO, 12.5f, 2.5f, +R_H_LINE_TO, -1.67f, +V_LINE_TO, 0.83f, +H_LINE_TO, 12.5f, +V_LINE_TO, 2.5f, CLOSE, -R_MOVE_TO, 1.33f, 2.67f, -R_H_LINE_TO, 1.33f, -V_LINE_TO, 3.33f, -R_H_LINE_TO, -1.33f, -R_V_LINE_TO, 1.33f, +R_MOVE_TO, 1.67f, 3.33f, +R_H_LINE_TO, 1.67f, +V_LINE_TO, 4.17f, +R_H_LINE_TO, -1.67f, +R_V_LINE_TO, 1.67f, CLOSE, -R_MOVE_TO, 0, 2.67f, -R_H_LINE_TO, 1.33f, -V_LINE_TO, 6, -R_H_LINE_TO, -1.33f, -R_V_LINE_TO, 1.33f, +R_MOVE_TO, 0, 3.33f, +R_H_LINE_TO, 1.67f, +V_LINE_TO, 7.5f, +R_H_LINE_TO, -1.67f, +R_V_LINE_TO, 1.67f, CLOSE, -MOVE_TO, 6, 12.67f, -R_H_LINE_TO, 1.33f, -R_V_LINE_TO, -1.33f, -H_LINE_TO, 6, -R_V_LINE_TO, 1.33f, +MOVE_TO, 7.5f, 15.83f, +H_LINE_TO, 9.17f, +R_V_LINE_TO, -1.67f, +H_LINE_TO, 7.5f, +R_V_LINE_TO, 1.67f, CLOSE, -MOVE_TO, 3.33f, 2, -R_H_LINE_TO, 1.33f, -V_LINE_TO, 0.67f, -H_LINE_TO, 3.33f, -V_LINE_TO, 2, +MOVE_TO, 4.17f, 2.5f, +R_H_LINE_TO, 1.67f, +V_LINE_TO, 0.83f, +H_LINE_TO, 4.17f, +V_LINE_TO, 2.5f, CLOSE, -MOVE_TO, 0.67f, 10, -H_LINE_TO, 2, -V_LINE_TO, 8.67f, -H_LINE_TO, 0.67f, -V_LINE_TO, 10, +MOVE_TO, 0.83f, 12.5f, +H_LINE_TO, 2.5f, +R_V_LINE_TO, -1.67f, +H_LINE_TO, 0.83f, +R_V_LINE_TO, 1.67f, CLOSE, -MOVE_TO, 2, 12.67f, -R_V_LINE_TO, -1.33f, -H_LINE_TO, 0.67f, -R_CUBIC_TO, 0, 0.73f, 0.6f, 1.33f, 1.33f, 1.33f, +R_MOVE_TO, 1.67f, 3.33f, +R_V_LINE_TO, -1.67f, +H_LINE_TO, 0.83f, +R_CUBIC_TO, 0, 0.92f, 0.75f, 1.67f, 1.67f, 1.67f, CLOSE, -R_MOVE_TO, 9.33f, -12, -V_LINE_TO, 2, -R_H_LINE_TO, 1.33f, -R_CUBIC_TO, 0, -0.73f, -0.6f, -1.33f, -1.33f, -1.33f, +MOVE_TO, 14.17f, 0.83f, +V_LINE_TO, 2.5f, +R_H_LINE_TO, 1.67f, +R_CUBIC_TO, 0, -0.92f, -0.75f, -1.67f, -1.67f, -1.67f, CLOSE, -MOVE_TO, 6, 2, -R_H_LINE_TO, 1.33f, -V_LINE_TO, 0.67f, -H_LINE_TO, 6, -V_LINE_TO, 2, +MOVE_TO, 7.5f, 2.5f, +H_LINE_TO, 9.17f, +V_LINE_TO, 0.83f, +H_LINE_TO, 7.5f, +V_LINE_TO, 2.5f, CLOSE, -MOVE_TO, 0.67f, 4.67f, -H_LINE_TO, 2, -V_LINE_TO, 3.33f, -H_LINE_TO, 0.67f, -R_V_LINE_TO, 1.33f, +MOVE_TO, 0.83f, 5.83f, +H_LINE_TO, 2.5f, +V_LINE_TO, 4.17f, +H_LINE_TO, 0.83f, +R_V_LINE_TO, 1.67f, CLOSE, -R_MOVE_TO, 2.67f, 8, -R_H_LINE_TO, 1.33f, -R_V_LINE_TO, -1.33f, -H_LINE_TO, 3.33f, -R_V_LINE_TO, 1.33f, +MOVE_TO, 4.17f, 15.83f, +R_H_LINE_TO, 1.67f, +R_V_LINE_TO, -1.67f, +H_LINE_TO, 4.17f, +R_V_LINE_TO, 1.67f, CLOSE, -MOVE_TO, 0.67f, 7.33f, -H_LINE_TO, 2, -V_LINE_TO, 6, -H_LINE_TO, 0.67f, -R_V_LINE_TO, 1.33f, +MOVE_TO, 0.83f, 9.17f, +H_LINE_TO, 2.5f, +V_LINE_TO, 7.5f, +H_LINE_TO, 0.83f, +R_V_LINE_TO, 1.67f, CLOSE, -MOVE_TO, 0.67f, 2, -H_LINE_TO, 2, -V_LINE_TO, 0.67f, -CUBIC_TO, 1.27f, 0.67f, 0.67f, 1.27f, 0.67f, 2, +R_MOVE_TO, 0, -6.67f, +H_LINE_TO, 2.5f, +V_LINE_TO, 0.83f, +R_CUBIC_TO, -0.92f, 0, -1.67f, 0.75f, -1.67f, 1.67f, CLOSE, -R_MOVE_TO, 8, 9.33f, -R_V_LINE_TO, 1.33f, -R_H_LINE_TO, 2.67f, -R_LINE_TO, -0.01f, 2.67f, -R_H_LINE_TO, 1.33f, -R_LINE_TO, 0.01f, -2.66f, -R_LINE_TO, 2.66f, -0.01f, -R_V_LINE_TO, -1.34f, -R_LINE_TO, -2.67f, 0.01f, -V_LINE_TO, 8.67f, -R_H_LINE_TO, -1.33f, -R_V_LINE_TO, 2.67f, -H_LINE_TO, 8.67f, -CLOSE +MOVE_TO, 10.83f, 14.17f, +R_V_LINE_TO, 1.67f, +R_H_LINE_TO, 3.34f, +R_LINE_TO, -0.01f, 3.33f, +R_H_LINE_TO, 1.67f, +R_LINE_TO, 0.01f, -3.33f, +R_LINE_TO, 3.33f, -0.01f, +R_V_LINE_TO, -1.67f, +R_LINE_TO, -3.33f, 0.01f, +R_V_LINE_TO, -3.33f, +R_H_LINE_TO, -1.67f, +R_V_LINE_TO, 3.33f, +R_H_LINE_TO, -3.33f, +CLOSE, +NEW_PATH
diff --git a/ui/views/vector_icons/drag_image_selection.icon b/ui/views/vector_icons/drag_image_selection.icon index 3dd706054..fe9f3b5 100644 --- a/ui/views/vector_icons/drag_image_selection.icon +++ b/ui/views/vector_icons/drag_image_selection.icon
@@ -2,58 +2,63 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -CANVAS_DIMENSIONS, 16, -MOVE_TO, 12, 10.67f, -V_LINE_TO, 8, -R_H_LINE_TO, -1.33f, -R_V_LINE_TO, 2.67f, -H_LINE_TO, 8, -V_LINE_TO, 12, -R_H_LINE_TO, 2.67f, -R_V_LINE_TO, 2.67f, -H_LINE_TO, 12, -R_LINE_TO, 0.01f, -2.66f, -R_LINE_TO, 2.66f, -0.01f, -R_V_LINE_TO, -1.34f, -R_LINE_TO, -2.67f, 0.01f, +CANVAS_DIMENSIONS, 20, +MOVE_TO, 4.5f, 17, +R_QUADRATIC_TO, -0.62f, 0, -1.06f, -0.44f, +QUADRATIC_TO, 3, 16.13f, 3, 15.5f, +V_LINE_TO, 6, +R_H_LINE_TO, 11, +R_V_LINE_TO, 11, CLOSE, -MOVE_TO, 10.67f, 0, -R_V_LINE_TO, 1.33f, -H_LINE_TO, 12, -CUBIC_TO, 12, 0.6f, 11.4f, 0, 10.67f, 0, +R_MOVE_TO, 11, 0, +R_V_LINE_TO, -1.5f, +H_LINE_TO, 17, +R_QUADRATIC_TO, 0, 0.63f, -0.44f, 1.06f, +QUADRATIC_TO, 16.13f, 17, 15.5f, 17, CLOSE, -R_MOVE_TO, -8, 12, -R_H_LINE_TO, 4, -R_V_LINE_TO, -1.33f, -H_LINE_TO, 5.34f, -V_LINE_TO, 12, -H_LINE_TO, 4.01f, -R_V_LINE_TO, -1.33f, -H_LINE_TO, 2.68f, -V_LINE_TO, 12, -MOVE_TO, 1.33f, 6.67f, +R_MOVE_TO, -11, -2, R_H_LINE_TO, 8, -V_LINE_TO, 0, -R_H_LINE_TO, -8, -CUBIC_TO, 0.6f, 0, 0, 0.6f, 0, 1.33f, -R_V_LINE_TO, 9.34f, -R_CUBIC_TO, 0, 0.62f, 0.43f, 1.11f, 1, 1.27f, -R_CUBIC_TO, 0.11f, 0.03f, 0.22f, 0.07f, 0.33f, 0.07f, -R_MOVE_TO, 0, -6.68f, -R_LINE_TO, 2.16f, -3.5f, -R_LINE_TO, 1.29f, 1.5f, -R_LINE_TO, 1.29f, -2, -R_LINE_TO, 2.59f, 4, -H_LINE_TO, 1.33f, +R_LINE_TO, -2.62f, -3.5f, +LINE_TO, 8, 14, +R_LINE_TO, -1.37f, -1.83f, CLOSE, -NEW_PATH, -MOVE_TO, 10.67f, 2.67f, -H_LINE_TO, 12, -V_LINE_TO, 4, -R_H_LINE_TO, -1.33f, +R_MOVE_TO, 11, -1.12f, +R_V_LINE_TO, -1.5f, +H_LINE_TO, 17, +R_V_LINE_TO, 1.5f, CLOSE, -R_MOVE_TO, 0, 2.66f, -H_LINE_TO, 12, -R_V_LINE_TO, 1.33f, -R_H_LINE_TO, -1.33f, +R_MOVE_TO, 0, -3.12f, +R_V_LINE_TO, -1.5f, +H_LINE_TO, 17, +R_V_LINE_TO, 1.5f, +CLOSE, +R_MOVE_TO, 0, -3.12f, +R_V_LINE_TO, -1.5f, +H_LINE_TO, 17, +R_V_LINE_TO, 1.5f, +CLOSE, +MOVE_TO, 3, 4.5f, +R_QUADRATIC_TO, 0, -0.62f, 0.44f, -1.06f, +QUADRATIC_TO, 3.88f, 3, 4.5f, 3, +R_V_LINE_TO, 1.5f, +CLOSE, +R_MOVE_TO, 3.13f, 0, +V_LINE_TO, 3, +R_H_LINE_TO, 1.5f, +R_V_LINE_TO, 1.5f, +CLOSE, +R_MOVE_TO, 3.13f, 0, +V_LINE_TO, 3, +R_H_LINE_TO, 1.5f, +R_V_LINE_TO, 1.5f, +CLOSE, +R_MOVE_TO, 3.13f, 0, +V_LINE_TO, 3, +R_H_LINE_TO, 1.5f, +R_V_LINE_TO, 1.5f, +CLOSE, +R_MOVE_TO, 3.13f, 0, +V_LINE_TO, 3, +R_QUADRATIC_TO, 0.63f, 0, 1.06f, 0.44f, +QUADRATIC_TO, 17, 3.88f, 17, 4.5f, CLOSE
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc index f1d82e98..c221475 100644 --- a/ui/views/window/custom_frame_view.cc +++ b/ui/views/window/custom_frame_view.cc
@@ -15,6 +15,7 @@ #include "third_party/skia/include/core/SkPath.h" #include "ui/base/hit_test.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/models/image_model.h" #include "ui/base/resource/resource_bundle.h" #include "ui/color/color_id.h" #include "ui/color/color_provider.h" @@ -553,12 +554,15 @@ AddChildView(std::make_unique<ImageButton>(std::move(callback))); button->SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY); button->SetAccessibleName(l10n_util::GetStringUTF16(accessibility_string_id)); - button->SetImage(Button::STATE_NORMAL, - rb.GetImageNamed(normal_image_id).ToImageSkia()); - button->SetImage(Button::STATE_HOVERED, - rb.GetImageNamed(hot_image_id).ToImageSkia()); - button->SetImage(Button::STATE_PRESSED, - rb.GetImageNamed(pushed_image_id).ToImageSkia()); + button->SetImageModel( + Button::STATE_NORMAL, + ui::ImageModel::FromImage(rb.GetImageNamed(normal_image_id))); + button->SetImageModel( + Button::STATE_HOVERED, + ui::ImageModel::FromImage(rb.GetImageNamed(hot_image_id))); + button->SetImageModel( + Button::STATE_PRESSED, + ui::ImageModel::FromImage(rb.GetImageNamed(pushed_image_id))); return button; }
diff --git a/ui/webui/resources/cr_components/help_bubble/help_bubble.mojom b/ui/webui/resources/cr_components/help_bubble/help_bubble.mojom index f7090f93f9..d6c96a5 100644 --- a/ui/webui/resources/cr_components/help_bubble/help_bubble.mojom +++ b/ui/webui/resources/cr_components/help_bubble/help_bubble.mojom
@@ -4,8 +4,6 @@ module help_bubble.mojom; -import "mojo/public/mojom/base/time.mojom"; - // Contains IPC calls that allow the HelpBubbleFactory system to connect to // the HelpBubbleMixin and HelpBubbleElement component. // @@ -35,16 +33,6 @@ RIGHT_BOTTOM, }; -// Reason for dismissing a help bubble -enum HelpBubbleClosedReason { - // page navigated away, anchor disappeared, etc. - kPageChanged, - // user dismissed via button or close-icon - kDismissedByUser, - // timeout reached - kTimedOut, -}; - // Simplified version of user_education::HelpBubbleButtonParams. struct HelpBubbleButtonParams { string text; @@ -71,9 +59,6 @@ bool force_close_button = false; Progress? progress; array<HelpBubbleButtonParams> buttons; - - // Auto-dismiss timeout as TimeDelta - mojo_base.mojom.TimeDelta? timeout; }; // Used by the controller to bootstrap IPC. Any WebUIController can implement @@ -109,9 +94,9 @@ HelpBubbleButtonPressed(string native_identifier, uint8 button_index); // Called when the help bubble anchored to `native_identifier` is closed, - // either because the element it is associated with goes away, the user - // canceled it, or the timeout was reached (e.g. pressed the [x] button). - HelpBubbleClosed(string native_identifier, HelpBubbleClosedReason reason); + // either because the element it is associated with goes away, or because the + // user canceled it (e.g. pressed the [x] button). + HelpBubbleClosed(string native_identifier, bool by_user); }; // Represents WebUI component that can display help bubbles. The implementing UI
diff --git a/ui/webui/resources/cr_components/help_bubble/help_bubble.ts b/ui/webui/resources/cr_components/help_bubble/help_bubble.ts index aa78d9ff..4be1e37 100644 --- a/ui/webui/resources/cr_components/help_bubble/help_bubble.ts +++ b/ui/webui/resources/cr_components/help_bubble/help_bubble.ts
@@ -27,7 +27,6 @@ const ACTION_BUTTON_ID_PREFIX = 'action-button-'; export const HELP_BUBBLE_DISMISSED_EVENT = 'help-bubble-dismissed'; -export const HELP_BUBBLE_TIMED_OUT_EVENT = 'help-bubble-timed-out'; export type HelpBubbleDismissedEvent = CustomEvent<{ anchorId: string, @@ -35,10 +34,6 @@ buttonIndex?: number, }>; -export type HelpBubbleTimedOutEvent = CustomEvent<{ - anchorId: string, -}>; - export interface HelpBubbleElement { $: { arrow: HTMLElement, @@ -86,8 +81,6 @@ progress: Progress|null = null; infoIcon: string|null = null; forceCloseButton: boolean; - timeoutMs: number|null = null; - timeoutTimerId: number|null = null; /** * HTMLElement corresponding to |this.anchorId|. @@ -124,17 +117,6 @@ this.removeAttribute('aria-hidden'); this.updatePosition_(); this.setAnchorHighlight_(true); - - if (this.timeoutMs !== null) { - const timedOutCallback = () => { - this.dispatchEvent(new CustomEvent(HELP_BUBBLE_TIMED_OUT_EVENT, { - detail: { - anchorId: this.anchorId, - }, - })); - }; - this.timeoutTimerId = setTimeout(timedOutCallback, this.timeoutMs); - } } /** @@ -150,10 +132,6 @@ this.setAttribute('aria-hidden', 'true'); this.setAnchorHighlight_(false); this.anchorElement_ = null; - if (this.timeoutTimerId !== null) { - clearInterval(this.timeoutTimerId); - this.timeoutTimerId = null; - } } /** @@ -440,6 +418,5 @@ } interface HTMLElementEventMap { [HELP_BUBBLE_DISMISSED_EVENT]: HelpBubbleDismissedEvent; - [HELP_BUBBLE_TIMED_OUT_EVENT]: HelpBubbleTimedOutEvent; } }
diff --git a/ui/webui/resources/cr_components/help_bubble/help_bubble_mixin.ts b/ui/webui/resources/cr_components/help_bubble/help_bubble_mixin.ts index 01a6af5..6568e93 100644 --- a/ui/webui/resources/cr_components/help_bubble/help_bubble_mixin.ts +++ b/ui/webui/resources/cr_components/help_bubble/help_bubble_mixin.ts
@@ -22,8 +22,8 @@ import {EventTracker} from 'chrome://resources/js/event_tracker.m.js'; import {dedupingMixin, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {HELP_BUBBLE_DISMISSED_EVENT, HELP_BUBBLE_TIMED_OUT_EVENT, HelpBubbleDismissedEvent, HelpBubbleElement} from './help_bubble.js'; -import {HelpBubbleClientCallbackRouter, HelpBubbleClosedReason, HelpBubbleHandlerInterface, HelpBubbleParams} from './help_bubble.mojom-webui.js'; +import {HELP_BUBBLE_DISMISSED_EVENT, HelpBubbleDismissedEvent, HelpBubbleElement} from './help_bubble.js'; +import {HelpBubbleClientCallbackRouter, HelpBubbleHandlerInterface, HelpBubbleParams} from './help_bubble.mojom-webui.js'; import {HelpBubbleProxyImpl} from './help_bubble_proxy.js'; type Constructor<T> = new (...args: any[]) => T; @@ -164,9 +164,6 @@ this.dismissedEventTracker_.add( bubble, HELP_BUBBLE_DISMISSED_EVENT, this.onHelpBubbleDismissed_.bind(this)); - this.dismissedEventTracker_.add( - bubble, HELP_BUBBLE_TIMED_OUT_EVENT, - this.onHelpBubbleTimedOut_.bind(this)); bubble.anchorId = anchorId; bubble.closeText = params.closeButtonAltText; @@ -175,14 +172,10 @@ bubble.forceCloseButton = params.forceCloseButton; bubble.titleText = params.titleText || ''; bubble.progress = params.progress || null; - bubble.buttons = params.buttons; - if (params.timeout) { - bubble.timeoutMs = Number(params.timeout!.microseconds / 1000n); - } - assert( !bubble.progress || bubble.progress.total >= bubble.progress.current); + bubble.buttons = params.buttons; bubble.show(); anchor!.focus(); } @@ -213,8 +206,7 @@ const nativeId = this.getNativeIdForAnchor_(target.id); assert(nativeId); if (hidden) { - this.helpBubbleHandler_.helpBubbleClosed( - nativeId, HelpBubbleClosedReason.kPageChanged); + this.helpBubbleHandler_.helpBubbleClosed(nativeId, false); } this.helpBubbleHandler_.helpBubbleAnchorVisibilityChanged( nativeId, isVisible); @@ -298,21 +290,10 @@ this.helpBubbleHandler_.helpBubbleButtonPressed( nativeId, e.detail.buttonIndex!); } else { - this.helpBubbleHandler_.helpBubbleClosed( - nativeId, HelpBubbleClosedReason.kDismissedByUser); + this.helpBubbleHandler_.helpBubbleClosed(nativeId, true); } } } - - private onHelpBubbleTimedOut_(e: HelpBubbleDismissedEvent) { - const hidden = this.hideHelpBubble(e.detail.anchorId); - assert(hidden); - const nativeId = this.getNativeIdForAnchor_(e.detail.anchorId); - if (nativeId) { - this.helpBubbleHandler_.helpBubbleClosed( - nativeId, HelpBubbleClosedReason.kTimedOut); - } - } } return HelpBubbleMixin;